aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock181
-rw-r--r--README.md9
-rw-r--r--appveyor.yml4
-rw-r--r--components/atoms/static_atoms.txt2
-rw-r--r--components/canvas/webgl_mode/inprocess.rs89
-rw-r--r--components/canvas/webgl_thread.rs52
-rw-r--r--components/canvas_traits/webgl.rs15
-rw-r--r--components/canvas_traits/webgl_channel/ipc.rs4
-rw-r--r--components/canvas_traits/webgl_channel/mod.rs53
-rw-r--r--components/canvas_traits/webgl_channel/mpsc.rs11
-rw-r--r--components/compositing/build.rs25
-rw-r--r--components/compositing/compositor.rs450
-rw-r--r--components/compositing/compositor_thread.rs3
-rw-r--r--components/compositing/gl.rs73
-rw-r--r--components/compositing/touch.rs69
-rw-r--r--components/config/basedir.rs7
-rw-r--r--components/config/lib.rs12
-rw-r--r--components/config/opts.rs486
-rw-r--r--components/config/prefs.rs89
-rw-r--r--components/config/tests/opts.rs31
-rw-r--r--components/config/tests/prefs.rs48
-rw-r--r--components/debugger/lib.rs36
-rw-r--r--components/deny_public_fields/lib.rs6
-rw-r--r--components/devtools/actor.rs51
-rw-r--r--components/devtools/actors/console.rs102
-rw-r--r--components/devtools/actors/framerate.rs28
-rw-r--r--components/devtools/actors/inspector.rs259
-rw-r--r--components/devtools/actors/memory.rs14
-rw-r--r--components/devtools/actors/network_event.rs82
-rw-r--r--components/devtools/actors/object.rs12
-rw-r--r--components/devtools/actors/performance.rs54
-rw-r--r--components/devtools/actors/profiler.rs16
-rw-r--r--components/devtools/actors/root.rs31
-rw-r--r--components/devtools/actors/tab.rs48
-rw-r--r--components/devtools/actors/thread.rs26
-rw-r--r--components/devtools/actors/timeline.rs106
-rw-r--r--components/devtools/actors/worker.rs12
-rw-r--r--components/devtools/lib.rs258
-rw-r--r--components/devtools/protocol.rs4
-rw-r--r--components/devtools_traits/lib.rs29
-rw-r--r--components/dom_struct/lib.rs7
-rw-r--r--components/domobject_derive/lib.rs10
-rw-r--r--components/embedder_traits/lib.rs11
-rw-r--r--components/embedder_traits/resources.rs38
-rw-r--r--components/fallible/lib.rs46
-rw-r--r--components/geometry/lib.rs23
-rw-r--r--components/gfx/font.rs200
-rw-r--r--components/gfx/font_cache_thread.rs282
-rw-r--r--components/gfx/font_context.rs68
-rw-r--r--components/gfx/font_template.rs44
-rw-r--r--components/gfx/lib.rs41
-rw-r--r--components/gfx/platform/freetype/android/font_list.rs175
-rw-r--r--components/gfx/platform/freetype/font.rs133
-rw-r--r--components/gfx/platform/freetype/font_context.rs28
-rw-r--r--components/gfx/platform/freetype/font_list.rs43
-rw-r--r--components/gfx/platform/freetype/font_template.rs9
-rw-r--r--components/gfx/platform/macos/font.rs91
-rw-r--r--components/gfx/platform/macos/font_context.rs2
-rw-r--r--components/gfx/platform/macos/font_list.rs61
-rw-r--r--components/gfx/platform/macos/font_template.rs69
-rw-r--r--components/gfx/platform/mod.rs4
-rw-r--r--components/gfx/platform/windows/font.rs115
-rw-r--r--components/gfx/platform/windows/font_list.rs116
-rw-r--r--components/gfx/platform/windows/font_template.rs21
-rw-r--r--components/gfx/tests/font_context.rs101
-rw-r--r--components/gfx/tests/font_template.rs67
-rw-r--r--components/gfx/tests/text_util.rs112
-rw-r--r--components/gfx/text/glyph.rs257
-rw-r--r--components/gfx/text/mod.rs1
-rw-r--r--components/gfx/text/shaping/harfbuzz.rs226
-rw-r--r--components/gfx/text/shaping/mod.rs1
-rw-r--r--components/gfx/text/text_run.rs162
-rw-r--r--components/gfx/text/util.rs39
-rw-r--r--components/gfx_traits/lib.rs14
-rw-r--r--components/hashglobe/src/alloc.rs46
-rw-r--r--components/hashglobe/src/fake.rs87
-rw-r--r--components/hashglobe/src/hash_map.rs409
-rw-r--r--components/hashglobe/src/hash_set.rs229
-rw-r--r--components/hashglobe/src/lib.rs13
-rw-r--r--components/hashglobe/src/shim.rs6
-rw-r--r--components/hashglobe/src/table.rs196
-rw-r--r--components/jstraceable_derive/lib.rs14
-rw-r--r--components/layout/animation.rs56
-rw-r--r--components/layout/block.rs2380
-rw-r--r--components/layout/construct.rs1391
-rw-r--r--components/layout/context.rs65
-rw-r--r--components/layout/data.rs1
-rw-r--r--components/layout/display_list/background.rs3
-rw-r--r--components/layout/display_list/builder.rs16
-rw-r--r--components/layout/display_list/items.rs25
-rw-r--r--components/layout/flex.rs583
-rw-r--r--components/layout/floats.rs282
-rw-r--r--components/layout/flow.rs342
-rw-r--r--components/layout/flow_list.rs11
-rw-r--r--components/layout/flow_ref.rs2
-rw-r--r--components/layout/fragment.rs1426
-rw-r--r--components/layout/generated_content.rs379
-rw-r--r--components/layout/incremental.rs55
-rw-r--r--components/layout/inline.rs1093
-rw-r--r--components/layout/layout_debug.rs2
-rw-r--r--components/layout/lib.rs6
-rw-r--r--components/layout/list_item.rs131
-rw-r--r--components/layout/model.rs280
-rw-r--r--components/layout/multicol.rs103
-rw-r--r--components/layout/parallel.rs115
-rw-r--r--components/layout/persistent_list.rs20
-rw-r--r--components/layout/query.rs413
-rw-r--r--components/layout/sequential.rs75
-rw-r--r--components/layout/table.rs627
-rw-r--r--components/layout/table_caption.rs34
-rw-r--r--components/layout/table_cell.rs216
-rw-r--r--components/layout/table_colgroup.rs35
-rw-r--r--components/layout/table_row.rs642
-rw-r--r--components/layout/table_rowgroup.rs139
-rw-r--r--components/layout/table_wrapper.rs673
-rw-r--r--components/layout/tests/size_of.rs9
-rw-r--r--components/layout/text.rs351
-rw-r--r--components/layout/traversal.rs67
-rw-r--r--components/layout/wrapper.rs21
-rw-r--r--components/layout_thread/dom_wrapper.rs374
-rw-r--r--components/layout_thread/lib.rs1272
-rw-r--r--components/layout_traits/lib.rs36
-rw-r--r--components/malloc_size_of/lib.rs213
-rw-r--r--components/malloc_size_of_derive/lib.rs59
-rw-r--r--components/net/fetch/methods.rs51
-rw-r--r--components/profile/heartbeats.rs63
-rw-r--r--components/profile/mem.rs155
-rw-r--r--components/profile/time.rs234
-rw-r--r--components/profile/trace_dump.rs13
-rw-r--r--components/profile_traits/energy.rs6
-rw-r--r--components/profile_traits/ipc.rs18
-rw-r--r--components/profile_traits/lib.rs3
-rw-r--r--components/profile_traits/mem.rs61
-rw-r--r--components/profile_traits/time.rs65
-rw-r--r--components/script/dom/abstractworkerglobalscope.rs131
-rw-r--r--components/script/dom/audiobuffer.rs7
-rw-r--r--components/script/dom/audiobuffersourcenode.rs16
-rw-r--r--components/script/dom/audionode.rs19
-rw-r--r--components/script/dom/audioscheduledsourcenode.rs9
-rw-r--r--components/script/dom/baseaudiocontext.rs42
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py26
-rw-r--r--components/script/dom/bindings/error.rs8
-rw-r--r--components/script/dom/channelmergernode.rs83
-rw-r--r--components/script/dom/css.rs2
-rw-r--r--components/script/dom/cssmediarule.rs1
-rw-r--r--components/script/dom/csssupportsrule.rs1
-rw-r--r--components/script/dom/dedicatedworkerglobalscope.rs202
-rw-r--r--components/script/dom/document.rs18
-rw-r--r--components/script/dom/gainnode.rs29
-rw-r--r--components/script/dom/globalscope.rs13
-rw-r--r--components/script/dom/htmlimageelement.rs31
-rw-r--r--components/script/dom/htmllinkelement.rs1
-rw-r--r--components/script/dom/htmlstyleelement.rs1
-rw-r--r--components/script/dom/medialist.rs3
-rw-r--r--components/script/dom/mod.rs1
-rw-r--r--components/script/dom/offlineaudiocontext.rs4
-rw-r--r--components/script/dom/oscillatornode.rs16
-rw-r--r--components/script/dom/pannernode.rs33
-rw-r--r--components/script/dom/serviceworkerglobalscope.rs149
-rw-r--r--components/script/dom/vrdisplay.rs10
-rw-r--r--components/script/dom/webgl2renderingcontext.rs22
-rw-r--r--components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs10
-rw-r--r--components/script/dom/webglbuffer.rs19
-rw-r--r--components/script/dom/webglrenderingcontext.rs791
-rw-r--r--components/script/dom/webglvertexarrayobjectoes.rs13
-rw-r--r--components/script/dom/webidls/BaseAudioContext.webidl8
-rw-r--r--components/script/dom/webidls/ChannelMergerNode.webidl16
-rw-r--r--components/script/dom/webidls/PannerNode.webidl2
-rw-r--r--components/script/dom/webidls/WebGL2RenderingContext.webidl5
-rw-r--r--components/script/dom/webidls/WebGLRenderingContext.webidl8
-rw-r--r--components/script/dom/websocket.rs27
-rw-r--r--components/script/dom/window.rs16
-rw-r--r--components/script/dom/worker.rs10
-rw-r--r--components/script/dom/workerglobalscope.rs9
-rw-r--r--components/script/dom/worklet.rs10
-rw-r--r--components/script/lib.rs4
-rw-r--r--components/script/script_runtime.rs5
-rw-r--r--components/script/script_thread.rs77
-rw-r--r--components/script/task_queue.rs166
-rw-r--r--components/script/task_source/dom_manipulation.rs5
-rw-r--r--components/script/task_source/file_reading.rs1
-rw-r--r--components/script/task_source/mod.rs6
-rw-r--r--components/script/task_source/networking.rs2
-rw-r--r--components/script/task_source/performance_timeline.rs3
-rw-r--r--components/script/task_source/remote_event.rs1
-rw-r--r--components/script/task_source/user_interaction.rs3
-rw-r--r--components/script/task_source/websocket.rs37
-rw-r--r--components/script_plugins/lib.rs1
-rw-r--r--components/script_plugins/unrooted_must_root.rs15
-rw-r--r--components/script_plugins/utils.rs2
-rw-r--r--components/servo/lib.rs331
-rw-r--r--components/size_of_test/lib.rs12
-rw-r--r--components/style/animation.rs26
-rw-r--r--components/style/applicable_declarations.rs6
-rw-r--r--components/style/attr.rs18
-rw-r--r--components/style/author_styles.rs6
-rw-r--r--components/style/build_gecko.rs23
-rw-r--r--components/style/cbindgen.toml11
-rw-r--r--components/style/counter_style/mod.rs13
-rw-r--r--components/style/custom_properties.rs6
-rw-r--r--components/style/data.rs14
-rw-r--r--components/style/dom.rs55
-rw-r--r--components/style/dom_apis.rs3
-rw-r--r--components/style/font_face.rs30
-rw-r--r--components/style/gecko/conversions.rs192
-rw-r--r--components/style/gecko/data.rs10
-rw-r--r--components/style/gecko/media_features.rs118
-rw-r--r--components/style/gecko/media_queries.rs3
-rw-r--r--components/style/gecko/non_ts_pseudo_class_list.rs16
-rw-r--r--components/style/gecko/pseudo_element.rs5
-rw-r--r--components/style/gecko/pseudo_element_definition.mako.rs36
-rw-r--r--components/style/gecko/rules.rs6
-rw-r--r--components/style/gecko/selector_parser.rs127
-rw-r--r--components/style/gecko/snapshot_helpers.rs46
-rw-r--r--components/style/gecko/url.rs13
-rw-r--r--components/style/gecko/values.rs7
-rw-r--r--components/style/gecko/wrapper.rs163
-rw-r--r--components/style/gecko_bindings/mod.rs17
-rw-r--r--components/style/gecko_bindings/sugar/ns_style_coord.rs15
-rw-r--r--components/style/gecko_bindings/sugar/ownership.rs9
-rw-r--r--components/style/gecko_bindings/sugar/refptr.rs6
-rw-r--r--components/style/gecko_bindings/sugar/style_complex_color.rs8
-rw-r--r--components/style/invalidation/element/element_wrapper.rs16
-rw-r--r--components/style/invalidation/element/invalidation_map.rs33
-rw-r--r--components/style/invalidation/element/restyle_hints.rs6
-rw-r--r--components/style/invalidation/element/state_and_attributes.rs27
-rw-r--r--components/style/lib.rs2
-rw-r--r--components/style/logical_geometry.rs6
-rw-r--r--components/style/macros.rs16
-rw-r--r--components/style/matching.rs15
-rw-r--r--components/style/media_queries/media_condition.rs24
-rw-r--r--components/style/media_queries/media_feature.rs94
-rw-r--r--components/style/media_queries/media_feature_expression.rs199
-rw-r--r--components/style/media_queries/media_list.rs17
-rw-r--r--components/style/media_queries/media_query.rs20
-rw-r--r--components/style/parser.rs21
-rw-r--r--components/style/properties/declaration_block.rs77
-rw-r--r--components/style/properties/gecko.mako.rs77
-rw-r--r--components/style/properties/helpers/animated_properties.mako.rs24
-rw-r--r--components/style/properties/longhands/background.mako.rs43
-rw-r--r--components/style/properties/longhands/border.mako.rs88
-rw-r--r--components/style/properties/longhands/box.mako.rs505
-rw-r--r--components/style/properties/longhands/color.mako.rs8
-rw-r--r--components/style/properties/longhands/column.mako.rs87
-rw-r--r--components/style/properties/longhands/counters.mako.rs20
-rw-r--r--components/style/properties/longhands/effects.mako.rs37
-rw-r--r--components/style/properties/longhands/inherited_box.mako.rs5
-rw-r--r--components/style/properties/longhands/inherited_svg.mako.rs225
-rw-r--r--components/style/properties/longhands/inherited_table.mako.rs59
-rw-r--r--components/style/properties/longhands/inherited_text.mako.rs241
-rw-r--r--components/style/properties/longhands/inherited_ui.mako.rs70
-rw-r--r--components/style/properties/longhands/list.mako.rs46
-rw-r--r--components/style/properties/longhands/outline.mako.rs34
-rw-r--r--components/style/properties/longhands/position.mako.rs379
-rw-r--r--components/style/properties/longhands/svg.mako.rs98
-rw-r--r--components/style/properties/longhands/table.mako.rs28
-rw-r--r--components/style/properties/longhands/text.mako.rs81
-rw-r--r--components/style/properties/longhands/ui.mako.rs78
-rw-r--r--components/style/properties/longhands/xul.mako.rs124
-rw-r--r--components/style/properties/properties.mako.rs101
-rw-r--r--components/style/rule_tree/mod.rs6
-rw-r--r--components/style/selector_map.rs22
-rw-r--r--components/style/selector_parser.rs57
-rw-r--r--components/style/servo/restyle_damage.rs52
-rw-r--r--components/style/servo/selector_parser.rs15
-rw-r--r--components/style/sharing/mod.rs3
-rw-r--r--components/style/style_adjuster.rs70
-rw-r--r--components/style/style_resolver.rs6
-rw-r--r--components/style/stylesheet_set.rs3
-rw-r--r--components/style/stylesheets/document_rule.rs25
-rw-r--r--components/style/stylesheets/font_feature_values_rule.rs12
-rw-r--r--components/style/stylesheets/keyframes_rule.rs42
-rw-r--r--components/style/stylesheets/mod.rs67
-rw-r--r--components/style/stylesheets/rule_list.rs6
-rw-r--r--components/style/stylesheets/rule_parser.rs68
-rw-r--r--components/style/stylesheets/rules_iterator.rs5
-rw-r--r--components/style/stylesheets/stylesheet.rs23
-rw-r--r--components/style/stylesheets/supports_rule.rs35
-rw-r--r--components/style/stylesheets/viewport_rule.rs9
-rw-r--r--components/style/stylist.rs346
-rw-r--r--components/style/traversal.rs27
-rw-r--r--components/style/use_counters/mod.rs88
-rw-r--r--components/style/values/animated/color.rs19
-rw-r--r--components/style/values/animated/mod.rs14
-rw-r--r--components/style/values/computed/angle.rs8
-rw-r--r--components/style/values/computed/border.rs16
-rw-r--r--components/style/values/computed/box.rs48
-rw-r--r--components/style/values/computed/counters.rs1
-rw-r--r--components/style/values/computed/effects.rs6
-rw-r--r--components/style/values/computed/font.rs38
-rw-r--r--components/style/values/computed/length.rs61
-rw-r--r--components/style/values/computed/mod.rs2
-rw-r--r--components/style/values/computed/motion.rs10
-rw-r--r--components/style/values/computed/percentage.rs18
-rw-r--r--components/style/values/computed/transform.rs23
-rw-r--r--components/style/values/generics/background.rs17
-rw-r--r--components/style/values/generics/basic_shape.rs186
-rw-r--r--components/style/values/generics/border.rs58
-rw-r--r--components/style/values/generics/box.rs34
-rw-r--r--components/style/values/generics/column.rs17
-rw-r--r--components/style/values/generics/counters.rs22
-rw-r--r--components/style/values/generics/effects.rs40
-rw-r--r--components/style/values/generics/flex.rs16
-rw-r--r--components/style/values/generics/font.rs60
-rw-r--r--components/style/values/generics/gecko.rs3
-rw-r--r--components/style/values/generics/grid.rs39
-rw-r--r--components/style/values/generics/image.rs5
-rw-r--r--components/style/values/generics/mod.rs35
-rw-r--r--components/style/values/generics/position.rs29
-rw-r--r--components/style/values/generics/rect.rs13
-rw-r--r--components/style/values/generics/size.rs13
-rw-r--r--components/style/values/generics/svg.rs91
-rw-r--r--components/style/values/generics/text.rs41
-rw-r--r--components/style/values/generics/transform.rs95
-rw-r--r--components/style/values/generics/ui.rs6
-rw-r--r--components/style/values/generics/url.rs16
-rw-r--r--components/style/values/mod.rs32
-rw-r--r--components/style/values/specified/align.rs9
-rw-r--r--components/style/values/specified/background.rs21
-rw-r--r--components/style/values/specified/basic_shape.rs80
-rw-r--r--components/style/values/specified/border.rs6
-rw-r--r--components/style/values/specified/box.rs161
-rw-r--r--components/style/values/specified/color.rs20
-rw-r--r--components/style/values/specified/column.rs3
-rw-r--r--components/style/values/specified/counters.rs6
-rw-r--r--components/style/values/specified/effects.rs18
-rw-r--r--components/style/values/specified/font.rs80
-rw-r--r--components/style/values/specified/grid.rs29
-rw-r--r--components/style/values/specified/image.rs41
-rw-r--r--components/style/values/specified/length.rs42
-rw-r--r--components/style/values/specified/list.rs6
-rw-r--r--components/style/values/specified/mod.rs43
-rw-r--r--components/style/values/specified/motion.rs73
-rw-r--r--components/style/values/specified/outline.rs15
-rw-r--r--components/style/values/specified/position.rs57
-rw-r--r--components/style/values/specified/resolution.rs6
-rw-r--r--components/style/values/specified/source_size_list.rs3
-rw-r--r--components/style/values/specified/svg.rs6
-rw-r--r--components/style/values/specified/svg_path.rs863
-rw-r--r--components/style/values/specified/table.rs5
-rw-r--r--components/style/values/specified/text.rs47
-rw-r--r--components/style/values/specified/time.rs3
-rw-r--r--components/style/values/specified/ui.rs8
-rw-r--r--components/style_derive/animate.rs2
-rw-r--r--components/style_derive/cg.rs172
-rw-r--r--components/style_derive/lib.rs9
-rw-r--r--components/style_derive/parse.rs13
-rw-r--r--components/style_derive/specified_value_info.rs24
-rw-r--r--components/style_derive/to_animated_value.rs16
-rw-r--r--components/style_derive/to_computed_value.rs10
-rw-r--r--components/style_derive/to_css.rs37
-rw-r--r--components/style_traits/lib.rs59
-rw-r--r--components/style_traits/specified_value_info.rs2
-rw-r--r--components/style_traits/values.rs96
-rw-r--r--components/style_traits/viewport.rs28
-rw-r--r--components/url/lib.rs30
-rw-r--r--components/url/origin.rs10
-rw-r--r--components/webdriver_server/keys.rs8
-rw-r--r--components/webdriver_server/lib.rs683
-rw-r--r--components/webvr/webvr_thread.rs210
-rw-r--r--components/webvr_traits/lib.rs3
-rw-r--r--components/webvr_traits/webvr_traits.rs13
-rw-r--r--python/servo/devenv_commands.py3
-rw-r--r--resources/cert-wpt-only20
-rw-r--r--rust-toolchain2
-rw-r--r--servo-tidy.toml8
-rw-r--r--support/android/apk/servoview/src/main/java/com/mozilla/servoview/ServoSurface.java25
-rwxr-xr-xsupport/android/fakeld/fake-ld-arm64.sh3
-rw-r--r--tests/unit/style/parsing/mod.rs12
-rw-r--r--tests/unit/style/properties/mod.rs12
-rw-r--r--tests/unit/style/viewport.rs12
-rw-r--r--tests/wpt/README.md6
-rw-r--r--tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html.ini4
-rw-r--r--tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html.ini4
-rw-r--r--tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html.ini4
-rw-r--r--tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html.ini4
-rw-r--r--tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html.ini4
-rw-r--r--tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-drawImage.html.ini2
-rw-r--r--tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-invalid-args.html.ini2
-rw-r--r--tests/wpt/metadata/2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html.ini4
-rw-r--r--tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini10
-rw-r--r--tests/wpt/metadata/MANIFEST.json16675
-rw-r--r--tests/wpt/metadata/cors/remote-origin.htm.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/borders/groove-default.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/borders/ridge-default.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/box-display/root-box-003.xht.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/floats/float-nowrap-2.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/floats/float-nowrap-3.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/floats/float-nowrap-5.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/floats/float-nowrap-7.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/floats/float-nowrap-8.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/floats/float-nowrap-9.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/linebox/anonymous-inline-inherit-001.html.ini2
-rw-r--r--tests/wpt/metadata/css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-animations/Element-getAnimations.tentative.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-animations/animation-delay-008.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-animations/animation-delay-009.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-animations/animation-delay-010.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-animations/animationevent-pseudoelement.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-animations/animationevent-types.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-animations/parsing/animation-timing-function-valid.html.ini4
-rw-r--r--tests/wpt/metadata/css/css-backgrounds/background-clip-color-repaint.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-backgrounds/background-image-none-gradient-repaint.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-flexbox/css-flexbox-height-animation-stretch.html.ini3
-rw-r--r--tests/wpt/metadata/css/css-flexbox/percentage-heights-quirks-node.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-fonts/font-display/font-display-change.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-fonts/font-display/font-display-preload.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-fonts/matching/fixed-stretch-style-over-weight.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-fonts/matching/stretch-distance-over-weight-distance.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-fonts/matching/style-ranges-over-weight-direction.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-fonts/variations/at-font-face-descriptors.html.ini6
-rw-r--r--tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini6
-rw-r--r--tests/wpt/metadata/css/css-fonts/variations/font-style-interpolation.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-fonts/variations/font-weight-interpolation.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-fonts/variations/variable-box-font.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-fonts/variations/variable-gpos-m2b.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-fonts/variations/variable-gsub.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-br-inside-avoidcolumn-001.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-containing-002.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-fill-auto-002.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-001.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-002.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-fill-balance-001.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-height-block-child-001.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-inherit-003.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-margin-001.xht.ini1
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-overflowing-001.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-rule-002.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-rule-fraction-003.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-span-all-003.xht.ini2
-rw-r--r--tests/wpt/metadata/css/css-multicol/multicol-width-003.xht.ini1
-rw-r--r--tests/wpt/metadata/css/css-paint-api/registered-property-type.https.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-transforms/transform-box/value-changed.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-transitions/events-006.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-transitions/parsing/transition-timing-function-valid.html.ini4
-rw-r--r--tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini72
-rw-r--r--tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini176
-rw-r--r--tests/wpt/metadata/css/css-values/vh-interpolate-pct.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-values/vh-interpolate-px.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-values/vh-interpolate-vh.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini3
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-animation-from-to.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-animation-over-transition.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-shorthand.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-transform.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-fallback.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-multiple.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-animation-to-only.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-transitions-from-no-value.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-transitions-to-no-value.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-transitions-transition-property-variable-before-value.html.ini1
-rw-r--r--tests/wpt/metadata/css/css-variables/variable-transitions-value-before-transition-property-variable.html.ini1
-rw-r--r--tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini2
-rw-r--r--tests/wpt/metadata/css/cssom/css-style-declaration-modifications.html.ini23
-rw-r--r--tests/wpt/metadata/css/cssom/inline-style-001.html.ini17
-rw-r--r--tests/wpt/metadata/css/selectors/focus-within-shadow-001.html.ini1
-rw-r--r--tests/wpt/metadata/css/selectors/focus-within-shadow-002.html.ini1
-rw-r--r--tests/wpt/metadata/css/selectors/focus-within-shadow-003.html.ini1
-rw-r--r--tests/wpt/metadata/css/selectors/focus-within-shadow-004.html.ini1
-rw-r--r--tests/wpt/metadata/css/selectors/focus-within-shadow-005.html.ini1
-rw-r--r--tests/wpt/metadata/css/selectors/focus-within-shadow-006.html.ini1
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-101.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-102.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-103.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-105.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-106.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-108.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-109.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-110.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-125.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-125b.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-126.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-126b.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-127.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-127b.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-128.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-128b.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-129.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-129b.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-134.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-134b.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-135.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-135b.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-136.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-136b.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-168.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-168a.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-169.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-169a.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-173a.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-83.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/old-tests/css3-modsel-99.xml.ini2
-rw-r--r--tests/wpt/metadata/css/selectors/webkit-pseudo-element.html.ini13
-rw-r--r--tests/wpt/metadata/custom-elements/Document-createElement-svg.svg.ini1
-rw-r--r--tests/wpt/metadata/encoding/idlharness.any.js.ini120
-rw-r--r--tests/wpt/metadata/encoding/single-byte-decoder.html.ini548
-rw-r--r--tests/wpt/metadata/encoding/streams/backpressure.any.js.ini17
-rw-r--r--tests/wpt/metadata/encoding/streams/decode-attributes.any.js.ini179
-rw-r--r--tests/wpt/metadata/encoding/streams/decode-bad-chunks.any.js.ini17
-rw-r--r--tests/wpt/metadata/encoding/streams/decode-ignore-bom.any.js.ini83
-rw-r--r--tests/wpt/metadata/encoding/streams/decode-incomplete-input.any.js.ini23
-rw-r--r--tests/wpt/metadata/encoding/streams/decode-non-utf8.any.js.ini71
-rw-r--r--tests/wpt/metadata/encoding/streams/decode-split-character.any.js.ini77
-rw-r--r--tests/wpt/metadata/encoding/streams/decode-utf8.any.js.ini35
-rw-r--r--tests/wpt/metadata/encoding/streams/encode-bad-chunks.any.js.ini47
-rw-r--r--tests/wpt/metadata/encoding/streams/encode-utf8.any.js.ini125
-rw-r--r--tests/wpt/metadata/encoding/streams/readable-writable-properties.any.js.ini23
-rw-r--r--tests/wpt/metadata/encoding/streams/realms.window.js.ini2
-rw-r--r--tests/wpt/metadata/fetch/api/basic/header-value-null-byte.any.js.ini11
-rw-r--r--tests/wpt/metadata/fetch/api/request/request-init-stream.any.js.ini47
-rw-r--r--tests/wpt/metadata/fetch/api/response/response-from-stream.any.js.ini29
-rw-r--r--tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini4
-rw-r--r--tests/wpt/metadata/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html.ini10
-rw-r--r--tests/wpt/metadata/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html.ini4
-rw-r--r--tests/wpt/metadata/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html.ini4
-rw-r--r--tests/wpt/metadata/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html.ini10
-rw-r--r--tests/wpt/metadata/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html.ini10
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini4
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini3
-rw-r--r--tests/wpt/metadata/html/interaction/focus/composed.window.js.ini4
-rw-r--r--tests/wpt/metadata/html/interaction/focus/document-level-focus-apis/document-level-apis.html.ini4
-rw-r--r--tests/wpt/metadata/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini22
-rw-r--r--tests/wpt/metadata/html/interaction/focus/processing-model/preventScroll.html.ini19
-rw-r--r--tests/wpt/metadata/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html.ini7
-rw-r--r--tests/wpt/metadata/html/interaction/focus/tabindex-focus-flag.html.ini13
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html.ini4
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html.ini4
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html.ini4
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html.ini4
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html.ini58
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html.ini7
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html.ini10
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html.ini73
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html.ini13
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html.ini10
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html.ini7
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html.ini4
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html.ini16
-rw-r--r--tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/the-details-element/details-display-property-is-ignored.html.ini2
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini34
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/the-img-element/adoption.html.ini21
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini54
-rw-r--r--tests/wpt/metadata/html/semantics/scripting-1/the-script-element/goal-parameter.htm.ini2
-rw-r--r--tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html.ini2
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016.html.ini7
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js.ini14
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js.ini11
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js.ini11
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js.ini17
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js.ini14
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window.js.ini4
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js.ini13
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-xml.window.js.ini6
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js.ini12
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini30
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js.ini13
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js.ini4
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js.ini4
-rw-r--r--tests/wpt/metadata/quirks/unitless-length/excluded-properties-001.html.ini145
-rw-r--r--tests/wpt/metadata/quirks/unitless-length/excluded-properties-002.html.ini34
-rw-r--r--tests/wpt/metadata/url/urlencoded-parser.any.js.ini22
-rw-r--r--tests/wpt/metadata/webaudio/idlharness.https.window.js.ini108
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html.ini4
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html.ini11
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-one-sample-loop.html.ini5
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-start.html.ini16
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiosource-time-limits.html.ini11
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html.ini16
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/ctor-audiobuffersource.html.ini12
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/note-grain-on-timing.html.ini10
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sample-accurate-scheduling.html.ini10
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html.ini3
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html.ini8
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audionode-interface/audionode.html.ini12
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html.ini31
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exponentialRampToValueAtTime.html.ini202
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime.html.ini204
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setTargetAtTime.html.ini206
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html.ini21
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html.ini4
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/baseaudiocontext-audioworklet.https.html.ini3
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html.ini8
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/ctor-biquadfilter.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html.ini11
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input-non-default.html.ini2
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input.html.ini2
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html.ini11
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/ctor-constantsource.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html.ini8
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/ctor-delay.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-gainnode-interface/ctor-gain.html.ini43
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini8
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini2
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini10
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html.ini33
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html.ini28
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html.ini28
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html.ini15
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html.ini36
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html.ini2
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic.html.ini7
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html.ini6
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-waveshapernode-interface/ctor-waveshaper.html.ini6
-rw-r--r--tests/wpt/metadata/websockets/cookies/006.html.ini3
-rw-r--r--tests/wpt/metadata/workers/importscripts_mime.tentative.any.js.ini45
-rw-r--r--tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini1
-rw-r--r--tests/wpt/metadata/xhr/headers-normalize-response.htm.ini6
-rw-r--r--tests/wpt/metadata/xhr/send-data-readablestream.any.js.ini26
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json94
-rw-r--r--tests/wpt/mozilla/tests/mozilla/interfaces.html1
-rw-r--r--tests/wpt/mozilla/tests/mozilla/task_queue_throttling.any.js45
-rw-r--r--tests/wpt/mozilla/tests/webgl/OWNERS1
-rw-r--r--tests/wpt/mozilla/tests/webgl/bufferSubData.html26
-rw-r--r--tests/wpt/mozilla/tests/webgl/common.js13
-rw-r--r--tests/wpt/mozilla/tests/webgl/compressedTexImage2D.html30
-rw-r--r--tests/wpt/mozilla/tests/webgl/compressedTexSubImage2D.html30
-rw-r--r--tests/wpt/mozilla/tests/webgl/texImage2D.html20
-rw-r--r--tests/wpt/mozilla/tests/webgl/texSubImage2D.html20
-rw-r--r--tests/wpt/mozilla/tests/webgl/uniformMatrixNfv.html33
-rw-r--r--tests/wpt/web-platform-tests/.taskcluster.yml135
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.basic.pngbin1508 -> 1137 bytes
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.pngbin1508 -> 1137 bytes
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.pngbin1508 -> 1137 bytes
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.pngbin2064 -> 1634 bytes
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html51
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html53
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html46
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html46
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html44
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html (renamed from tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.baseline.alphabetic.html)0
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/tools/name2dir.yaml1
-rw-r--r--tests/wpt/web-platform-tests/2dcontext/tools/tests2dtext.yaml115
-rw-r--r--tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js28
-rw-r--r--tests/wpt/web-platform-tests/background-fetch/get.https.window.js2
-rw-r--r--tests/wpt/web-platform-tests/background-fetch/service_workers/sw-helpers.js19
-rw-r--r--tests/wpt/web-platform-tests/background-fetch/service_workers/sw.js20
-rw-r--r--tests/wpt/web-platform-tests/beacon/beacon-readablestream.window.js3
-rw-r--r--tests/wpt/web-platform-tests/common/slow.py (renamed from tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/slow.py)0
-rw-r--r--tests/wpt/web-platform-tests/compat/css-style-declaration-alias-enumeration.html1
-rw-r--r--tests/wpt/web-platform-tests/compat/webkit-appearance.html57
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/blob/blob-urls-do-not-match-self.sub.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/default-src/default-src-inline-blocked.sub.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_1-script-src.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_10_1.sub.html6
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_2.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_3.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_8_1.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/meta/combine-header-and-meta-policies.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/navigation/to-javascript-url-script-src.html12
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-allowed-src-blocked.html20
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-blocked-src-allowed.html23
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-attr-blocked.html29
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-src-blocked.html22
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-attr-allowed.html31
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-src-allowed.html28
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/strict-dynamic-elem-allowed-src-blocked.html22
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/strict-dynamic-elem-blocked-src-allowed.sub.html25
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/support/t_done.js1
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/support/t_fail.js3
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/addInlineTestsWithDOMManipulation.js4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/injected-inline-script-blocked.sub.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/inlineTests.js21
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-hash-policy.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_whitelist.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html22
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/scripthash-unicode-normalization.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-and-scripthash.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-basic-blocked.sub.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/script-src/srcdoc-doesnt-bypass-script-src.sub.html14
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-allowed-src-blocked.html24
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html27
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html33
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked.html27
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-attr-allowed.html33
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-src-allowed.html30
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/injected-inline-style-blocked.sub.html6
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/inline-style-attribute-blocked.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-hash-blocked.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-imported-style-blocked.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-inline-style-blocked.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-blocked.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-none-blocked.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/stylehash-basic-blocked.sub.html6
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-allowed.sub.html6
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-blocked.sub.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/svg/svg-inline.sub.html8
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href_blank.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_open.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href_blank.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_open.html2
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_missing_unsafe_hashes.html6
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_wrong_hash.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes.html4
-rw-r--r--tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash.html2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/attribute-tests.html10
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/charset-tests.html39
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/chromium-tests.html58
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/comma-tests.html42
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/domain-tests.html79
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/general-tests.html10
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/mozilla-tests.html52
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/name-tests.html68
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/ordering-tests.html36
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/path-tests.html68
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/all-tests.html.py-str79
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-http-state-template.js55
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-setter.py58
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/debugging-single-test.html.py-str12
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0001-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0001-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0002-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0002-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0003-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0003-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0004-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0004-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0001-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0001-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0002-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0002-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0003-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0003-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0004-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0004-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0005-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0005-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0006-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0006-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0007-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0007-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0008-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0008-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0009-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0009-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0010-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0010-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0011-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0011-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0012-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0012-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0013-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0013-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0014-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0014-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0015-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0015-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0016-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0016-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0017-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0017-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0018-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0018-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0019-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0019-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0021-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0021-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0001-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0001-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0002-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0002-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0003-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0003-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0004-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0004-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0005-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0005-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0020-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0020-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0022-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0022-testbin0 -> 23 bytes
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0023-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0023-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-path0029-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-path0029-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0001-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0001-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0002-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0002-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0003-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0003-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0004-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0004-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0005-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0005-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0006-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0006-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0007-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0007-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0008-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0008-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0009-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0009-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0010-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0010-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0011-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0011-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0012-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0012-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0013-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0013-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0014-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0014-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0015-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0015-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0016-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0016-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0017-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0017-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0018-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0018-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0019-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0019-test3
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0020-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0020-test3
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0021-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0021-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0022-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0022-test3
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0023-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0023-test3
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0024-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0024-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0025-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0025-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0026-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0026-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0027-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0027-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0028-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0028-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0029-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0029-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0031-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0031-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0033-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0033-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0034-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0034-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0035-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0035-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0036-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0036-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0037-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0037-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0038-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0038-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0039-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0039-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0040-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0040-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0041-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0041-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0042-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0042-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0001-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0001-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0002-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0002-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0003-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0003-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0004-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0004-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0005-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0005-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0006-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0006-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0007-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0007-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0008-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0008-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0009-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0009-test3
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0010-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0010-test4
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0011-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0011-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0012-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0012-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0013-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0013-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0014-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0014-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0015-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0015-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0016-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0016-test3
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0017-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0017-test4
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0001-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0001-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0002-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0002-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0003-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0003-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0004-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0004-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0005-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0005-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0006-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0006-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0007-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0007-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0008-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0008-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0009-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0009-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0010-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0010-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0011-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0011-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0012-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0012-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0013-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0013-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0014-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0014-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0015-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0015-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0016-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0016-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0017-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0017-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0018-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0018-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0019-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0019-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0020-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0020-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0021-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0021-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0022-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0022-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0023-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0023-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0024-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0024-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0025-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0025-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0026-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0026-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0027-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0027-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0028-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0028-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0029-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0029-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0030-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0030-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0031-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0031-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0032-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0032-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0033-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0033-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0030-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0030-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0041-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0041-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0042-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0042-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0043-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0043-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/ordering0001-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/ordering0001-test7
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0001-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0001-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0002-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0002-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0003-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0003-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0004-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0004-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0005-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0005-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0006-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0006-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0007-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0007-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0008-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0008-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0009-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0009-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0010-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0010-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0011-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0011-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0012-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0012-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0013-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0013-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0014-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0014-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0015-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0015-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0016-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0016-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0017-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0017-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0018-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0018-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0019-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0019-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0020-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0020-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0021-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0021-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0022-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0022-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0023-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0023-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0024-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0024-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0025-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0025-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0026-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0026-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0027-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0027-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0028-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0028-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0029-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0029-test2
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0030-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0030-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0031-expected0
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0031-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0032-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0032-test3
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0001-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0001-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0002-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0002-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0003-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0003-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0004-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0004-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0005-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0005-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0006-expected1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0006-test1
-rw-r--r--tests/wpt/web-platform-tests/cookies/http-state/value-tests.html41
-rw-r--r--tests/wpt/web-platform-tests/cookies/prefix/__host.header.html4
-rw-r--r--tests/wpt/web-platform-tests/cookies/prefix/__host.header.https.html4
-rw-r--r--tests/wpt/web-platform-tests/cookies/prefix/__secure.header.html6
-rw-r--r--tests/wpt/web-platform-tests/cookies/prefix/__secure.header.https.html22
-rw-r--r--tests/wpt/web-platform-tests/cookies/prefix/document-cookie.non-secure.html3
-rw-r--r--tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js45
-rw-r--r--tests/wpt/web-platform-tests/cookies/resources/set.py8
-rw-r--r--tests/wpt/web-platform-tests/cookies/samesite/window-open-reload.html2
-rw-r--r--tests/wpt/web-platform-tests/cookies/secure/create-cookie-http.html38
-rw-r--r--tests/wpt/web-platform-tests/cors/simple-requests.htm4
-rw-r--r--tests/wpt/web-platform-tests/css/.gitignore14
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/abspos/static-inside-table-cell.html17
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/borders/groove-default.html15
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/borders/groove-ridge-default-notref.html12
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/borders/ridge-default.html15
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-1-notref.html21
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-1.html24
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-2.html25
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-3-ref.html29
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-3.html28
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-4-ref.html26
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-4.html28
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-5-ref.html5
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-5.html16
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-6.html16
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-7.html26
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-8.html24
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-9.html28
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/linebox/anonymous-inline-inherit-001-ref.html7
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/linebox/anonymous-inline-inherit-001.html15
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/linebox/vertical-align-nested-top-001-ref.html14
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/linebox/vertical-align-nested-top-001.html20
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html10
-rw-r--r--tests/wpt/web-platform-tests/css/CSS2/positioning/abspos-inline-008.xht17
-rw-r--r--tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/compositing/parsing/isolation-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/compositing/parsing/isolation-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-invalid.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-valid.html20
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-direction-invalid.html18
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-direction-valid.html21
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-duration-invalid.html20
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-duration-valid.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-fill-mode-invalid.html18
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-fill-mode-valid.html21
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-iteration-count-invalid.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-iteration-count-valid.html22
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-invalid.html23
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-valid.html29
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-play-state-invalid.html18
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-play-state-valid.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-timing-function-invalid.html23
-rw-r--r--tests/wpt/web-platform-tests/css/css-animations/parsing/animation-timing-function-valid.html31
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/clear-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/clear-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/float-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/float-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/height-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/height-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/margin-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/margin-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/max-height-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/max-height-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/max-width-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/max-width-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/min-height-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/min-height-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/min-width-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/min-width-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/overflow-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/overflow-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/padding-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/padding-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/visibility-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/visibility-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/width-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-box/parsing/width-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-break/reference/widows-orphans-001-ref.html17
-rw-r--r--tests/wpt/web-platform-tests/css/css-break/widows-orphans-001.html32
-rw-r--r--tests/wpt/web-platform-tests/css/css-break/widows-orphans-002.html35
-rw-r--r--tests/wpt/web-platform-tests/css/css-break/widows-orphans-003.html32
-rw-r--r--tests/wpt/web-platform-tests/css/css-break/widows-orphans-004.html35
-rw-r--r--tests/wpt/web-platform-tests/css/css-cascade/parsing/all-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-cascade/parsing/all-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-cascade/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-color/parsing/color-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-color/parsing/color-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-color/parsing/opacity-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-color/parsing/opacity-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-color/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-animation-001.html31
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-layout-018.html21
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-layout-baseline-001.html31
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-paint-025.html21
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-paint-baseline-001.html24
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-size-baseline-001.html24
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-002.html41
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-size-multicol-001.html45
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-size-scrollbars-001.html17
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/contain-style-baseline-001.html24
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/reference/contain-baseline-ref.html18
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/reference/contain-size-scrollbars-001-ref.html13
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-counters-003-ref.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/support/60x60-red.pngbin217 -> 0 bytes
-rw-r--r--tests/wpt/web-platform-tests/css/css-display/display-contents-fieldset-nested-legend-ref.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-display/parsing/display-invalid.html21
-rw-r--r--tests/wpt/web-platform-tests/css/css-display/parsing/display-valid.html40
-rw-r--r--tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-001.html35
-rw-r--r--tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-002.html28
-rw-r--r--tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-ref.html14
-rw-r--r--tests/wpt/web-platform-tests/css/css-flexbox/percentage-heights-quirks-node.html9
-rw-r--r--tests/wpt/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html166
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-002.html129
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-area-invalid.html45
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-area-valid.html67
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-columns-invalid.html37
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-columns-valid.html54
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-flow-invalid.html20
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-flow-valid.html24
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-rows-invalid.html36
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-rows-valid.html54
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-areas-invalid.html20
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-areas-valid.html29
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/object-position-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/object-position-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-001.html23
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-002.html23
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-001-ref.html29
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-002-ref.html29
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-image-hash.html28
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-image.html28
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-local-mask.html33
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-remote-mask.html28
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/mask-image/reference/mask-image-ref.html14
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/mask-image/support/image-with-ref.svg9
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/mask-image/support/image.svg3
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/mask-image/support/mask.svg5
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/parsing/clip-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/parsing/clip-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-masking/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/inline-block-and-column-span-all.html13
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/intrinsic-size-001.html9
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2-ref.xht6
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2.xht31
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001-ref.xht10
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001.xht12
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002-ref.xht1
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002.xht6
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-003.xht14
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-001.xht8
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-ref.xht1
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-001.xht15
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-002.xht6
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001-ref.xht1
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001.xht7
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-001.xht5
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-002.xht7
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-negative-001.xht4
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001-ref.xht1
-rw-r--r--tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001.xht3
-rw-r--r--tests/wpt/web-platform-tests/css/css-paint-api/registered-properties-in-custom-paint.https.html67
-rw-r--r--tests/wpt/web-platform-tests/css/css-paint-api/registered-property-type.https.html148
-rw-r--r--tests/wpt/web-platform-tests/css/css-position/position-sticky-overflow-hidden.html86
-rw-r--r--tests/wpt/web-platform-tests/css/css-properties-values-api/property-cascade.html1
-rw-r--r--tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html315
-rw-r--r--tests/wpt/web-platform-tests/css/css-properties-values-api/unit-cycles.html1
-rw-r--r--tests/wpt/web-platform-tests/css/css-properties-values-api/url-resolution.html1
-rw-r--r--tests/wpt/web-platform-tests/css/css-scroll-snap/scrollTo-scrollBy-snaps.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-scrollbars/textarea-scrollbar-width-none-ref.html16
-rw-r--r--tests/wpt/web-platform-tests/css/css-scrollbars/textarea-scrollbar-width-none.html18
-rw-r--r--tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid-position.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid-position.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-shapes/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-delay-invalid.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-delay-valid.html20
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-duration-invalid.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-duration-valid.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-property-invalid.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-property-valid.html22
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-timing-function-invalid.html24
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid.html31
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/transitions-animatable-properties-01.html1
-rw-r--r--tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/color-interpolation.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-mandatory.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-optional.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-mandatory.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-optional.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/resize-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/resize-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-values/reference/vh_not_refreshing_on_chrome-ref.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-values/support/vh_not_refreshing_on_chrome_iframe.html8
-rw-r--r--tests/wpt/web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-001.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-002.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-003.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-004.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-005.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-006.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-007.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-008.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-001.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-002.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-ref.html16
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-001.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-002.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-003.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-004.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/support/blue-200x100.pngbin0 -> 257 bytes
-rw-r--r--tests/wpt/web-platform-tests/css/css-writing-modes/svg-aliasing-001.html2
-rw-r--r--tests/wpt/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl-ref.html4
-rw-r--r--tests/wpt/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl.html17
-rw-r--r--tests/wpt/web-platform-tests/css/cssom/computed-style-set-property.html1
-rw-r--r--tests/wpt/web-platform-tests/css/cssom/shorthand-serialization.html14
-rw-r--r--tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/filter-effects/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-valid.html28
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-invalid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/support/parsing-testcommon.js39
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/CHANGES241
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/Makefile52
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/README27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/TODO13
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-1.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-10.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-100.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-100b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-101.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-101b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-102.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-102b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-103.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-103b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-104.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-104b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-105.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-105b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-106.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-106b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-107.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-107b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-108.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-108b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-109.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-109b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-11.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-110.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-110b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-111.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-111b.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-112.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-112b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-113.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-113b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-114.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-114b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-115.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-115b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-116.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-116b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-117.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-117b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-118.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-119.xml29
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-12.xml-removed14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-120.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-121.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-122.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-123.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-123b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-124.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-124b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-125.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-125b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-126.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-126b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-127.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-127b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-128.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-128b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-129.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-129b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-13.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-130.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-130b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-131.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-131b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-132.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-132b.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-133.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-133b.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-134.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-134b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-135.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-135b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-136.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-136b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-137.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-137b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-138.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-138b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-139.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-139b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-14.xml27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-140.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-140b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-141.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-141b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-142.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-142b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-143.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-143b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-144.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-145a.xml31
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-145b.xml31
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-146a.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-146b.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-147a.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-147b.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-148.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-149.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-149b.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-14b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-14c.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-14d.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-14e.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-15.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-150.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-151.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-152.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-153.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-154.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-155.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-155a.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-155b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-155c.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-155d.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-156.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-156b.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-156c.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-157.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-158.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-159.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-15b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-15c.xml30
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-16.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-160.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-161.xml47
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-162.xml-removed97
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-163.xml-disabled-contains-removed20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-164.xml-removed38
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-165.xml-removed24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-166.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-166a.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-167.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-167a.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-168.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-168a.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-169.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-169a.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-17.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-170.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-170a.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-170b.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-170c.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-170d.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-171.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-172a.xml28
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-172b.xml29
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-173a.xml28
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-173b.xml28
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-174a.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-174b.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-175a.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-175b.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-175c.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-176.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-177a.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-177b.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-178.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-179.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-179a.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-18.xml62
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-180.xml-disabled-because-we-want-to-allow-for-expansion15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-180a.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-181.xml40
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-182.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-183.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-184a.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-184b.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-184c.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-184d.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-184e.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-184f.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-18a.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-18b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-18c.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-19.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-19a.xml-removed13
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-19b.xml12
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-2.xml11
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-20.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-21.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-21b.xml12
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-21c.xml12
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-22.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-23.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-24.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-25.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-27.xml10
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-27a.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-27b.xml11
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-28.xml95
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-28b.xml97
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-28c.pl-draft32
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-29.xml97
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-29b.xml97
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-3.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-30.xml30
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-31.xml30
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-32.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-33.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-34.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-35.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-36.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-37.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-38.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-39.xml32
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-39a.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-39b.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-39c.xml34
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-3a.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-4.xml11
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-40.xml-removed11
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-41.xml10
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-41a.xml10
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-42.xml10
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-42a.xml10
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-43.xml32
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-43b.xml32
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-44.xml27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-44b.xml27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-44c.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-44d.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-45.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-45b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-45c.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-46.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-46b.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-47.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-48.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-49.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-5.xml12
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-50.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-51.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-52.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-53.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-54.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-55.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-56.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-57.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-57b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-58.xml-removed15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-59.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-6.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-60.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-61.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-62.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-63.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-64.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-65.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-66.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-66b.xml11
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-67.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-68.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-69.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-7.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-70.xml12
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-72.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-72b.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-73.xml96
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-73b.xml97
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-74.xml97
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-74b.xml99
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-75.xml31
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-75b.xml31
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-76.xml32
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-76b.xml32
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-77.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-77b.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-78.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-78b.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-79.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-7b.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-7c.xml-disabled-due-to-limitations-in-the-build-system29
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-7d.xml-disabled-due-to-limitations-in-the-build-system30
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-8.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-80.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-81.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-81b.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-82.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-82b.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-83.xml11
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-84.xml-disabled-contains-removed17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-84b.xml-disabled-contains-removed18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-85.xml-disabled-contains-removed18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-86.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-87.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-87b.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-88.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-88b.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-89.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-9.xml12
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-90.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-90b.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-91.xml11
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-92.xml13
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-93.xml13
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-94.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-94b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-95.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-96.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-96b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-97.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-97b.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-98.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-98b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-99.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-99b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d1.xml34
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d1b.xml38
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d2.xml53
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d3.xml44
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d4.xml34
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5.xml-removed35
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5a.xml-removed35
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5b.xml-removed36
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5c.xml-removed37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5d.xml-removed36
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5e.xml-removed33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/generate.pl106
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/historical-xmlid.xht22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/htaccess1
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/html-full.css59
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/html-shell.css73
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-1.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-10.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-100.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-100b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-101.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-101b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-102.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-102b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-103.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-103b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-104.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-104b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-105.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-105b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-106.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-106b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-107.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-107b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-108.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-108b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-109.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-109b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-11.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-110.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-110b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-111.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-111b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-112.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-112b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-113.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-113b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-114.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-114b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-115.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-115b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-116.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-116b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-117.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-117b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-118.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-119.xml31
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-120.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-121.xml28
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-122.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-123.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-123b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-124.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-124b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-125.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-125b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-126.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-126b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-127.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-127b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-128.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-128b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-129.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-129b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-13.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-130.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-130b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-131.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-131b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-132.xml27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-132b.xml27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-133.xml27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-133b.xml27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-134.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-134b.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-135.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-135b.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-136.xml27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-136b.xml27
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-137.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-137b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-138.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-138b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-139.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-139b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14.xml29
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-140.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-140b.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-141.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-141b.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-142.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-142b.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-143.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-143b.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-144.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-145a.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-145b.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-146a.xml39
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-146b.xml39
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-147a.xml39
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-147b.xml39
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-148.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-149.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-149b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14c.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14d.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14e.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-15.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-150.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-151.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-152.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-153.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-154.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155a.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155c.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155d.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156b.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156c.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-157.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-158.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-159.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-15b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-16.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-160.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-161.xml47
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-166.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-166a.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-167.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-167a.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-168.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-168a.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-169.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-169a.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-17.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170a.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170b.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170c.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170d.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-171.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-172a.xml30
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-172b.xml31
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-173a.xml30
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-173b.xml30
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-174a.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-174b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175a.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175b.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175c.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-176.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-177a.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-177b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-178.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-179.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-179a.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18.xml61
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-180a.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-181.xml36
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-182.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-183.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184-ref.xht13
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184a.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184b.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184c.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184d.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184e.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184f.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18a.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18c.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-19.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-19b.xml13
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-2.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-20.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21b.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21c.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-22.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-23.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-24.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-25.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27a.xml28
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27b.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-28.xml99
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-28b.xml100
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-29.xml100
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-29b.xml100
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-3.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-30.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-31.xml33
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-32.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-33.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-34.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-35.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-36.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-37.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-38.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39.xml36
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39a.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39b.xml36
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39c.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-3a.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-4.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-41.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-41a.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-42.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-42a.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-43.xml36
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-43b.xml36
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44.xml30
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44b.xml30
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44c.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44d.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45c.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-46.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-46b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-47.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-48.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-49.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-5.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-50.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-51.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-52.xml28
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-53.xml28
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-54.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-55.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-56.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-57.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-57b.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-59.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-6.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-60.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-61.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-62.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-63.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-64.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-65.xml17
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-66.xml25
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-66b.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-67.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-68.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-69.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-7.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-70.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-72.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-72b.xml18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-73.xml100
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-73b.xml101
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-74.xml101
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-74b.xml102
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-75.xml34
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-75b.xml34
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-76.xml34
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-76b.xml34
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-77.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-77b.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-78.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-78b.xml37
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-79.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-7b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-8.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-80.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-81.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-81b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-82.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-82b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-83-ref.xml10
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-83.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-86.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-87.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-87b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-88.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-88b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-89.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-9.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-90.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-90b.xml19
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-91.xml14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-92.xml16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-93.xml15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-94.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-94b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-95.xml22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-96.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-96b.xml26
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-97.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-97b.xml20
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-98.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-98b.xml21
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-99.xml24
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-99b.xml23
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d1.xml35
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d1b.xml39
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d2.xml42
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d3.xml44
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d4.xml35
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/bq-u-u-u-green.xht15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht16
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/seven-green-divs.xht18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-address-p-p-p-lime-background.xht18
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-green-background.xht13
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-green-color.xht12
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-lime-background-offset.xht14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-lime-background.xht12
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-test-has-passed-desc.xht13
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht14
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/old-tests/reference/three-paragraph-lime-characters.xht13
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/tng.css6
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/utils/generators.pm1319
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/utils/helpers.pm219
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/utils/parser.pm334
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/webkit-pseudo-element.html47
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/x-pseudo-element.html22
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/xhtml-full.css65
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/xhtml-shell.css74
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/xml-full.css15
-rw-r--r--tests/wpt/web-platform-tests/css/selectors/xml-shell.css15
-rw-r--r--tests/wpt/web-platform-tests/css/support/parsing-testcommon.js (renamed from tests/wpt/web-platform-tests/css/compositing/parsing/support/parsing-testcommon.js)0
-rw-r--r--tests/wpt/web-platform-tests/docs/_writing-tests/h2tests.md155
-rw-r--r--tests/wpt/web-platform-tests/docs/_writing-tests/server-features.md13
-rw-r--r--tests/wpt/web-platform-tests/docs/_writing-tests/testdriver.md22
-rw-r--r--tests/wpt/web-platform-tests/docs/_writing-tests/testharness-api.md6
-rw-r--r--tests/wpt/web-platform-tests/docs/_writing-tests/testharness.md72
-rw-r--r--tests/wpt/web-platform-tests/dom/nodes/selectors.js12
-rw-r--r--tests/wpt/web-platform-tests/editing/run/backcolor.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/bold.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/createlink.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/delete-list-items-in-table-cell.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/delete.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/fontname.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/fontsize.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/forecolor.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/formatblock.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/forwarddelete.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/hilitecolor.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/indent.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/insert-list-items-in-table-cell.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/inserthorizontalrule.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/inserthtml.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/insertimage.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/insertlinebreak.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/insertorderedlist.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/insertparagraph.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/inserttext.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/insertunorderedlist.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/italic.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/justifycenter.html2
-rw-r--r--tests/wpt/web-platform-tests/editing/run/justifyfull.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/justifyleft.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/justifyright.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/misc.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/multitest.html2
-rw-r--r--tests/wpt/web-platform-tests/editing/run/outdent.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/removeformat.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/strikethrough.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/subscript.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/superscript.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/underline.html1
-rw-r--r--tests/wpt/web-platform-tests/editing/run/unlink.html1
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/backpressure.any.js60
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/decode-attributes.any.js71
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/decode-bad-chunks.any.js72
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/decode-ignore-bom.any.js38
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/decode-incomplete-input.any.js24
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/decode-non-utf8.any.js77
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/decode-split-character.any.js50
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/decode-utf8.any.js41
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/encode-bad-chunks.any.js63
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/encode-utf8.any.js144
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/readable-writable-properties.any.js22
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/realms.window.js347
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/resources/readable-stream-from-array.js12
-rw-r--r--tests/wpt/web-platform-tests/encoding/streams/resources/readable-stream-to-array.js11
-rw-r--r--tests/wpt/web-platform-tests/encrypted-media/scripts/playback-temporary-expired.js31
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicSize-with-responsive-images.tentative.https.sub.html97
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicSize-without-unsized-media.tentative.https.sub.html100
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/camera-reporting.https.html30
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/camera-reporting.https.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/document-write-reporting.html32
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/document-write-reporting.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/fullscreen-reporting.html29
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/fullscreen-reporting.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/geolocation-reporting.https.html30
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/geolocation-reporting.https.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/image.jpgbin0 -> 2033 bytes
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/microphone-reporting.https.html30
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/microphone-reporting.https.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/midi-reporting.html32
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/midi-reporting.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/payment-reporting.https.html35
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/payment-reporting.https.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/sync-xhr-reporting.html34
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/sync-xhr-reporting.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/unsized-media-reporting.html24
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/unsized-media-reporting.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/usb-reporting.https.html30
-rw-r--r--tests/wpt/web-platform-tests/feature-policy/reporting/usb-reporting.https.html.headers1
-rw-r--r--tests/wpt/web-platform-tests/fetch/api/basic/header-value-null-byte.any.js5
-rw-r--r--tests/wpt/web-platform-tests/fetch/api/request/request-init-stream.any.js51
-rw-r--r--tests/wpt/web-platform-tests/fetch/api/response/response-from-stream.any.js23
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/font.tentative.https.sub.html88
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html86
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html30
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html31
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html30
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html37
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html37
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html89
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html30
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html31
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html31
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html89
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html31
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html31
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html31
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/resources/helper.js7
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/resources/post-to-owner.py2
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/resources/record-header.py14
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub.html28
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/sharedworker.tentative.https.sub.html28
-rw-r--r--tests/wpt/web-platform-tests/fetch/sec-metadata/style.tentative.https.sub.html113
-rw-r--r--tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-containing-iframe-manual.html7
-rw-r--r--tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-fullscreen-element-sibling-manual.html8
-rw-r--r--tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-non-top-manual.html4
-rw-r--r--tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.html7
-rw-r--r--tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.html7
-rw-r--r--tests/wpt/web-platform-tests/fullscreen/rendering/fullscreen-root-block-scroll-manual.html26
-rw-r--r--tests/wpt/web-platform-tests/fullscreen/rendering/fullscreen-root-block-size-manual.html28
-rw-r--r--tests/wpt/web-platform-tests/hr-time/resources/unload-a.html13
-rw-r--r--tests/wpt/web-platform-tests/hr-time/resources/unload-b.html13
-rw-r--r--tests/wpt/web-platform-tests/hr-time/resources/unload-c.html13
-rw-r--r--tests/wpt/web-platform-tests/hr-time/resources/unload.js51
-rw-r--r--tests/wpt/web-platform-tests/hr-time/unload-manual.html73
-rw-r--r--tests/wpt/web-platform-tests/html/META.yml1
-rw-r--r--tests/wpt/web-platform-tests/html/editing/focus/inert/inert-does-not-match-disabled-selector.html29
-rw-r--r--tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/sharedworker-failure.js13
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/composed.window.js (renamed from tests/wpt/web-platform-tests/html/editing/focus/composed.window.js)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/document-level-focus-apis/document-level-apis.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/document-level-focus-apis/document-level-apis.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/document-level-focus-apis/test.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/document-level-focus-apis/test.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/focus-01.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/focus-01.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/focus-02.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/focus-02.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/focus-management/focus-event-targets-simple.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/focus-management/focus-event-targets-simple.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/focus-management/focus-events.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/focus-management/focus-events.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/processing-model/focus-fixup-rule-one-no-dialogs.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/processing-model/legend-focusable.html17
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/processing-model/legend.html20
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/processing-model/preventScroll.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/processing-model/preventScroll.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/processing-model/support/preventScroll-helper.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/processing-model/support/preventScroll-helper.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/interaction/focus/tabindex-focus-flag.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/tabindex-focus-flag.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/META.yml4
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-block-formatting-context.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap-ref.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap-ref.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html14
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block-ref.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block-ref.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html20
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-display.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-div-display-contents.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-div-display-contents.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html84
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-foo-ref.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-foo-ref.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html85
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item-ref.html9
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html10
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-multicol.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-multicol.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden-ref.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden-ref.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-ref.html23
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html33
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order-ref.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order-ref.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-shadow-dom.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-shadow-dom.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez-ref.html10
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical-ref.html25
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html27
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html27
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align.html50
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins-ref.html37
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html32
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering-ref.html7
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering.html11
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none.html16
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-display.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-dynamic-update.html19
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-abspos.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-ref.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-ref.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-grid-flex-multicol.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item-ref.html7
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html11
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-ref.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative-ref.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html11
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-sans-fieldset-display.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html (renamed from tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/min-inline-size.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/resources/fieldset-vertical.css18
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-flexbox.html71
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-grid.html72
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez-ref.html10
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative.html11
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/the-details-element/details-display-property-is-ignored-ref.html21
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/the-details-element/details-display-property-is-ignored.html26
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html (renamed from tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute.https.sub.html (renamed from tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy-attribute.https.sub.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html (renamed from tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy.https.sub.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html.headers (renamed from tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy.https.sub.html.headers)0
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-default-feature-policy.https.sub.html (renamed from tests/wpt/web-platform-tests/feature-policy/autoplay-default-feature-policy.https.sub.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html (renamed from tests/wpt/web-platform-tests/feature-policy/autoplay-disabled-by-feature-policy.https.sub.html)0
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html.headers (renamed from tests/wpt/web-platform-tests/feature-policy/autoplay-disabled-by-feature-policy.https.sub.html.headers)0
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html2
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html5
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/common/accesskey.js36
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-after-legend-manual.html10
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-before-legend-manual.html13
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-inside-legend-manual.html12
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/focusable-legend-manual.html14
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/focusable-legend-sibling-manual.html17
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/input-outside-fieldset-manual.html17
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/label-sibling-manual.html18
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/no-fieldset-parent-manual.html18
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/goal-parameter.htm138
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-module-goal.mjs1
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-script-goal.js3
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-2.html2
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-3.html2
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications.html2
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-1.html2
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-2.html5
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010.html22
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016-1.html4
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js119
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js69
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js69
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js179
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js104
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js98
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js198
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/history.window.js29
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/mutation-observer.window.js19
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js74
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js25
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/reload.window.js8
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/history-frame.html20
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/http-refresh.py3
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/meta-refresh.py5
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/page-with-frame.html1
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py8
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/url-frame.html9
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js26
-rw-r--r--tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js10
-rw-r--r--tests/wpt/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html (renamed from tests/wpt/web-platform-tests/dom/inert/inert-does-not-match-disabled-selector.html)0
-rw-r--r--tests/wpt/web-platform-tests/inert/inert-in-shadow-dom.tentative.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/inert/inert-in-shadow-dom.html)0
-rw-r--r--tests/wpt/web-platform-tests/inert/inert-inlines.tentative.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/inert/inert-inlines.html)0
-rw-r--r--tests/wpt/web-platform-tests/inert/inert-label-focus.tentative.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/inert/inert-label-focus.html)0
-rw-r--r--tests/wpt/web-platform-tests/inert/inert-node-is-uneditable.tentative.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/inert/inert-node-is-uneditable.html)0
-rw-r--r--tests/wpt/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/inert/inert-node-is-unfocusable.html)0
-rw-r--r--tests/wpt/web-platform-tests/inert/inert-node-is-unselectable.tentative.html (renamed from tests/wpt/web-platform-tests/html/editing/focus/inert/inert-node-is-unselectable.html)0
-rw-r--r--tests/wpt/web-platform-tests/infrastructure/META.yml1
-rw-r--r--tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch.html5
-rw-r--r--tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch_0.html5
-rw-r--r--tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch_1.html4
-rw-r--r--tests/wpt/web-platform-tests/input-device-capabilities/idlharness.window.js14
-rw-r--r--tests/wpt/web-platform-tests/input-device-capabilities/interfaces.html24
-rw-r--r--tests/wpt/web-platform-tests/interfaces/background-fetch.idl20
-rw-r--r--tests/wpt/web-platform-tests/interfaces/cookie-store.idl118
-rw-r--r--tests/wpt/web-platform-tests/interfaces/cssom-view.idl2
-rw-r--r--tests/wpt/web-platform-tests/interfaces/encoding.idl36
-rw-r--r--tests/wpt/web-platform-tests/interfaces/intersection-observer.idl4
-rw-r--r--tests/wpt/web-platform-tests/interfaces/payment-handler.idl2
-rw-r--r--tests/wpt/web-platform-tests/interfaces/payment-request.idl17
-rw-r--r--tests/wpt/web-platform-tests/interfaces/trusted-types.tentative.idl53
-rw-r--r--tests/wpt/web-platform-tests/interfaces/wai-aria.idl59
-rw-r--r--tests/wpt/web-platform-tests/interfaces/wasm-js-api.idl8
-rw-r--r--tests/wpt/web-platform-tests/interfaces/webrtc-dscp.idl8
-rw-r--r--tests/wpt/web-platform-tests/interfaces/webxr.idl2
-rw-r--r--tests/wpt/web-platform-tests/lint.whitelist6
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-MediaTrackSupportedConstraints.html26
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-creation.https.html76
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-grabFrame.html46
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-fast.html85
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.html94
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-reject.html84
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints.html113
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getCapabilities-fast.html29
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getCapabilities.html145
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getConstraints-fast.html75
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getSettings-fast.html29
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getSettings.html68
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/detached-HTMLCanvasElement.html26
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/getPhotoCapabilities.html45
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/getPhotoSettings.html30
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/resources/imagecapture-helpers.js69
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/setOptions-reject.html51
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/takePhoto-with-PhotoSettings.html63
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-image/takePhoto.html29
-rw-r--r--tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html2
-rw-r--r--tests/wpt/web-platform-tests/network-error-logging/support/lock.py12
-rw-r--r--tests/wpt/web-platform-tests/payment-request/META.yml1
-rw-r--r--tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html15
-rw-r--r--tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http.html11
-rw-r--r--tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html76
-rw-r--r--tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js46
-rw-r--r--tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html4
-rw-r--r--tests/wpt/web-platform-tests/payment-request/idlharness.https.window.js1
-rw-r--r--tests/wpt/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html69
-rw-r--r--tests/wpt/web-platform-tests/payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html2
-rw-r--r--tests/wpt/web-platform-tests/pointerevents/extension/pointerevent_pointerrawmove-manual.html55
-rw-r--r--tests/wpt/web-platform-tests/preload/preload-strict-dynamic.html2
-rw-r--r--tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties-001.html78
-rw-r--r--tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties-002.html42
-rw-r--r--tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties.html60
-rw-r--r--tests/wpt/web-platform-tests/resources/chromium/generic_sensor_mocks.js5
-rw-r--r--tests/wpt/web-platform-tests/resources/chromium/image_capture-mojom.js.headers1
-rw-r--r--tests/wpt/web-platform-tests/resources/chromium/image_capture.mojom.js1346
-rw-r--r--tests/wpt/web-platform-tests/resources/chromium/mock-imagecapture.js236
-rw-r--r--tests/wpt/web-platform-tests/resources/chromium/sensor.mojom.js6
-rw-r--r--tests/wpt/web-platform-tests/resources/chromium/webusb-child-test.js40
-rw-r--r--tests/wpt/web-platform-tests/resources/chromium/webusb-child-test.js.headers1
-rw-r--r--tests/wpt/web-platform-tests/resources/chromium/webusb-test.js83
-rw-r--r--tests/wpt/web-platform-tests/resources/idlharness.js12
-rw-r--r--tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html20
-rw-r--r--tests/wpt/web-platform-tests/resources/testharness.js7
-rw-r--r--tests/wpt/web-platform-tests/screen-capture/getdisplaymedia.https.html14
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https.html56
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/navigation-redirect.https.html890
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/redirected-response.https.html15
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/resources/navigation-redirect-other-origin.html26
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/resources/redirect-worker.js41
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-top-level-worker.py18
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/update-top-level.https.html32
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/webvtt-cross-origin.https.html19
-rw-r--r--tests/wpt/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html12
-rw-r--r--tests/wpt/web-platform-tests/shadow-dom/leaktests/get-elements.html12
-rw-r--r--tests/wpt/web-platform-tests/storage/estimate-indexeddb-worker.https.html16
-rw-r--r--tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js92
-rw-r--r--tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.html14
-rw-r--r--tests/wpt/web-platform-tests/storage/estimate-parallel.https.any.js13
-rw-r--r--tests/wpt/web-platform-tests/storage/estimate-parallel.https.html19
-rw-r--r--tests/wpt/web-platform-tests/storage/opaque-origin.https.html79
-rw-r--r--tests/wpt/web-platform-tests/storage/opaque-origin.https.window.js73
-rw-r--r--tests/wpt/web-platform-tests/storage/permission-query.https.any.js10
-rw-r--r--tests/wpt/web-platform-tests/storage/persisted-worker.https.html16
-rw-r--r--tests/wpt/web-platform-tests/storage/persisted.https.any.js14
-rw-r--r--tests/wpt/web-platform-tests/storage/persisted.https.html14
-rw-r--r--tests/wpt/web-platform-tests/storage/resources/storagemanager-persist-worker.js7
-rw-r--r--tests/wpt/web-platform-tests/storage/resources/storagemanager-persisted-worker.js13
-rw-r--r--tests/wpt/web-platform-tests/storage/storage-estimate-indexeddb.js94
-rw-r--r--tests/wpt/web-platform-tests/storage/storage-persisted.js18
-rw-r--r--tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.any.js60
-rw-r--r--tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.html68
-rw-r--r--tests/wpt/web-platform-tests/storage/storagemanager-persist-worker.https.html10
-rw-r--r--tests/wpt/web-platform-tests/storage/storagemanager-persist.https.html18
-rw-r--r--tests/wpt/web-platform-tests/storage/storagemanager-persist.https.window.js10
-rw-r--r--tests/wpt/web-platform-tests/storage/storagemanager-persist.https.worker.js8
-rw-r--r--tests/wpt/web-platform-tests/storage/storagemanager-persisted-worker.https.html10
-rw-r--r--tests/wpt/web-platform-tests/storage/storagemanager-persisted.https.any.js10
-rw-r--r--tests/wpt/web-platform-tests/storage/storagemanager-persisted.https.html18
-rw-r--r--tests/wpt/web-platform-tests/streams/readable-streams/patched-global.js3
-rw-r--r--tests/wpt/web-platform-tests/streams/transform-streams/patched-global.js3
-rw-r--r--tests/wpt/web-platform-tests/svg/path/property/d-interpolation-discrete.svg14
-rw-r--r--tests/wpt/web-platform-tests/svg/path/property/d-interpolation-relative-absolute.svg128
-rw-r--r--tests/wpt/web-platform-tests/svg/path/property/d-interpolation-single.svg288
-rw-r--r--tests/wpt/web-platform-tests/svg/path/property/getComputedStyle.svg16
-rw-r--r--tests/wpt/web-platform-tests/tools/ci/check_stability.py14
-rwxr-xr-xtests/wpt/web-platform-tests/tools/ci/ci_resources_unittest.sh2
-rwxr-xr-xtests/wpt/web-platform-tests/tools/ci/ci_taskcluster.sh8
-rwxr-xr-xtests/wpt/web-platform-tests/tools/ci/ci_wptrunner_infrastructure.sh4
-rw-r--r--tests/wpt/web-platform-tests/tools/ci/commands.json45
-rw-r--r--tests/wpt/web-platform-tests/tools/ci/tcdownload.py95
-rwxr-xr-xtests/wpt/web-platform-tests/tools/docker/start.sh17
-rw-r--r--tests/wpt/web-platform-tests/tools/lint/lint.py3
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/item.py2
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/manifest.py4
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/sourcefile.py4
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py2
-rw-r--r--tests/wpt/web-platform-tests/tools/serve/serve.py24
-rw-r--r--tests/wpt/web-platform-tests/tools/serve/test_functional.py77
-rw-r--r--tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py14
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/browser.py186
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/install.py54
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/run.py77
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/tests/test_run.py18
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py11
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/tox.ini1
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/wpt.py3
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py3
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py20
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_webdriver.py50
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge_webdriver.py12
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari_webdriver.py12
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py6
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py18
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py373
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/stability.py80
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testloader.py5
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py2
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/base.py4
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_stability.py21
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_update.py2
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/update.py27
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py21
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py1
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py7
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/DOMParser-parseFromString.tentative.html14
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Document-write.tentative.html12
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Element-insertAdjacentHTML.tentative.html40
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Element-outerHTML.tentative.html22
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Element-setAttribute.tentative.html67
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/HTMLElement-generic.tentative.html15
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Location-assign.tentative.html12
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Location-href.tentative.html12
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Location-replace.tentative.html12
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Range-createContextualFragment.tentative.html16
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html294
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html14
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html24
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-exposedTests.tentative.html24
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html28
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html299
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Window-TrustedTypes.tentative.html11
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Window-open.tentative.html26
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/Window-trustedTypes.tentative.html11
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html16
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html14
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html42
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html22
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html76
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html17
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html14
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-href.tentative.html14
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html14
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html18
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html59
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/idlharness.window.js18
-rw-r--r--tests/wpt/web-platform-tests/trusted-types/support/helper.sub.js99
-rw-r--r--tests/wpt/web-platform-tests/wai-aria/idlharness.window.js15
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/assertions.js56
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/constructor/compile.any.js77
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/constructor/instantiate.any.js196
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/constructor/validate.any.js96
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/global/constructor.any.js121
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/global/toString.any.js7
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/global/value-set.any.js94
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/global/valueOf.any.js22
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/instance/constructor.any.js138
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/instance/exports.any.js53
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/instance/toString.any.js10
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/interface.any.js15
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/memory/buffer.any.js50
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/memory/constructor.any.js86
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/memory/grow.any.js170
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/memory/toString.any.js7
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/module/constructor.any.js25
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/module/customSections.any.js66
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/module/exports.any.js81
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/module/imports.any.js87
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/module/toString.any.js9
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js11
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/table/constructor.any.js114
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/table/get-set.any.js220
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/table/grow.any.js86
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/table/length.any.js46
-rw-r--r--tests/wpt/web-platform-tests/wasm/jsapi/table/toString.any.js7
-rw-r--r--tests/wpt/web-platform-tests/wasm/resources/frame.html18
-rw-r--r--tests/wpt/web-platform-tests/wasm/resources/service-worker.js30
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/broadcastchannel-success-and-failure.html38
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/broadcastchannel-success.html59
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/identity-not-preserved.html66
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/incrementer.wasm (renamed from tests/wpt/web-platform-tests/wasm/resources/incrementer.wasm)bin46 -> 46 bytes
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/nested-worker-success.any.js9
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/no-transferring.html31
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/blank.html (renamed from tests/wpt/web-platform-tests/wasm/resources/blank.html)0
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-iframe.html20
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-sharedworker.js7
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-worker.js9
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/create-empty-wasm-module.js4
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/echo-iframe.html11
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/echo-worker.js5
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-iframe-domain.sub.html12
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-iframe.html11
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-popup.html11
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-worker-with-channel.js8
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-worker.js5
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer.wasmbin0 -> 46 bytes
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-1.html5
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-2.html5
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-3.html5
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-4-incrementer.html11
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/serviceworker-failure.js34
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/sharedworker-failure.js21
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/resources/test-incrementer.js57
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/serialization-via-history.html34
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/serialization-via-idb.any.js45
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/serialization-via-notifications-api.any.js28
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/window-domain-success.sub.html26
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/window-messagechannel-success.html21
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/window-serviceworker-failure.https.html54
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/window-sharedworker-failure.html33
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/window-similar-but-cross-origin-success.sub.html25
-rw-r--r--tests/wpt/web-platform-tests/wasm/serialization/window-simple-success.html57
-rw-r--r--tests/wpt/web-platform-tests/wasm/wasm_local_iframe_test.html19
-rw-r--r--tests/wpt/web-platform-tests/wasm/wasm_serialization_tests.html8
-rw-r--r--tests/wpt/web-platform-tests/wasm/wasm_serialization_tests.js18
-rw-r--r--tests/wpt/web-platform-tests/wasm/wasm_serialization_worker.js21
-rw-r--r--tests/wpt/web-platform-tests/wasm/wasm_service_worker_test.https.html23
-rw-r--r--tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js4
-rw-r--r--tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-types.js17
-rw-r--r--tests/wpt/web-platform-tests/webaudio/resources/audionodeoptions.js14
-rw-r--r--tests/wpt/web-platform-tests/webaudio/resources/audit.js35
-rw-r--r--tests/wpt/web-platform-tests/webaudio/resources/start-stop-exceptions.js4
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html12
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-sizing.html2
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html20
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html2
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html10
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html4
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html101
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining.html4
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html6
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect.html14
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode.html6
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html7
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html95
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html2
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html6
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-construction.https.html2
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html4
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html4
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html8
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html15
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html4
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html15
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-channels.html2
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-setBuffer-already-has-value.html4
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html9
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html20
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html5
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html18
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html6
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html2
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html154
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html110
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html48
-rw-r--r--tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html24
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/actions/sequence.py61
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/actions/special_keys.py1
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py3
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/conftest.py238
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/scroll_into_view.py3
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py5
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/__init__.py0
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/__init__.py0
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/get.py48
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/user_prompts.py121
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/__init__.py10
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/get.py41
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/user_prompts.py122
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py3
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/__init__.py0
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/enabled.py109
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/user_prompts.py120
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/new_session/invalid_capabilities.py52
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/new_session/support/create.py139
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py58
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py62
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/user_prompts.py62
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py4
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/support/defaults.py8
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py323
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/support/helpers.py119
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/support/inline.py11
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/__init__.py0
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/screenshot.py40
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/user_prompts.py74
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/__init__.py0
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/screenshot.py25
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/user_prompts.py68
-rw-r--r--tests/wpt/web-platform-tests/webrtc/RTCConfiguration-iceServers.html44
-rw-r--r--tests/wpt/web-platform-tests/webrtc/RTCIceTransport-extension.https.html147
-rw-r--r--tests/wpt/web-platform-tests/webrtc/RTCQuicStream.https.html43
-rw-r--r--tests/wpt/web-platform-tests/webrtc/RTCQuicTransport-helper.js10
-rw-r--r--tests/wpt/web-platform-tests/webrtc/RTCQuicTransport.https.html91
-rw-r--r--tests/wpt/web-platform-tests/webrtc/no-media-call.html10
-rw-r--r--tests/wpt/web-platform-tests/webrtc/simplecall.https.html4
-rw-r--r--tests/wpt/web-platform-tests/websockets/cookies/006.html10
-rw-r--r--tests/wpt/web-platform-tests/websockets/cookies/006.https.html37
-rw-r--r--tests/wpt/web-platform-tests/webusb/resources/open-in-iframe.html1
-rw-r--r--tests/wpt/web-platform-tests/webusb/resources/open-in-worker.js15
-rw-r--r--tests/wpt/web-platform-tests/webusb/resources/usb-helpers.js23
-rw-r--r--tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html17
-rw-r--r--tests/wpt/web-platform-tests/webusb/usb.https.window.js26
-rw-r--r--tests/wpt/web-platform-tests/webusb/usbAlternateInterface.https.any.js33
-rw-r--r--tests/wpt/web-platform-tests/webusb/usbConfiguration.https.any.js23
-rw-r--r--tests/wpt/web-platform-tests/webusb/usbDevice-iframe.https.html61
-rw-r--r--tests/wpt/web-platform-tests/webusb/usbDevice-worker.https.html35
-rw-r--r--tests/wpt/web-platform-tests/webusb/usbDevice.https.any.js345
-rw-r--r--tests/wpt/web-platform-tests/webusb/usbEndpoint.https.any.js45
-rw-r--r--tests/wpt/web-platform-tests/webusb/usbInterface.https.any.js53
-rw-r--r--tests/wpt/web-platform-tests/workers/importscripts_mime.tentative.any.js52
-rw-r--r--tests/wpt/web-platform-tests/workers/support/imported_script.py2
-rw-r--r--tests/wpt/web-platform-tests/worklets/audio-worklet-credentials.https.html15
-rw-r--r--tests/wpt/web-platform-tests/worklets/audio-worklet-csp.https.html15
-rw-r--r--tests/wpt/web-platform-tests/worklets/audio-worklet-import.https.html15
-rw-r--r--tests/wpt/web-platform-tests/worklets/audio-worklet-referrer.https.html15
-rw-r--r--tests/wpt/web-platform-tests/worklets/audio-worklet-service-worker-interception.https.html15
-rw-r--r--tests/wpt/web-platform-tests/worklets/resources/worklet-test-utils.js2
-rw-r--r--tests/wpt/web-platform-tests/xhr/abort-after-stop.htm3
-rw-r--r--tests/wpt/web-platform-tests/xhr/headers-normalize-response.htm23
-rw-r--r--tests/wpt/web-platform-tests/xhr/open-after-abort.htm62
-rw-r--r--tests/wpt/web-platform-tests/xhr/open-after-stop.window.js43
-rw-r--r--tests/wpt/web-platform-tests/xhr/send-data-readablestream.any.js27
-rw-r--r--tests/wpt/web-platform-tests/xhr/timeout-multiple-fetches.html9
-rw-r--r--tests/wpt/webgl/meta/MANIFEST.json64
-rw-r--r--tests/wpt/webgl/meta/conformance/attribs/gl-vertex-attrib-render.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/attribs/gl-vertex-attrib.html.ini25
-rw-r--r--tests/wpt/webgl/meta/conformance/attribs/gl-vertexattribpointer.html.ini4
-rw-r--r--tests/wpt/webgl/meta/conformance/buffers/buffer-data-and-buffer-sub-data.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/buffers/buffer-data-array-buffer-delete.html.ini7
-rw-r--r--tests/wpt/webgl/meta/conformance/canvas/canvas-test.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance/canvas/draw-webgl-to-canvas-test.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-static-canvas-test.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-test.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance/canvas/rapid-resizing.html.ini10
-rw-r--r--tests/wpt/webgl/meta/conformance/canvas/to-data-url-test.html.ini4
-rw-r--r--tests/wpt/webgl/meta/conformance/context/constants-and-properties.html.ini7
-rw-r--r--tests/wpt/webgl/meta/conformance/context/context-attribute-preserve-drawing-buffer.html.ini4
-rw-r--r--tests/wpt/webgl/meta/conformance/context/context-attributes-alpha-depth-stencil-antialias.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/context/context-creation-and-destruction.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/context/context-creation.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/context/context-lost.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/context/premultiplyalpha-test.html.ini70
-rw-r--r--tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-canvas.html.ini424
-rw-r--r--tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-video.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-canvas.html.ini424
-rw-r--r--tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-video.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float.html.ini4
-rw-r--r--tests/wpt/webgl/meta/conformance/extensions/oes-vertex-array-object.html.ini25
-rw-r--r--tests/wpt/webgl/meta/conformance/extensions/webgl-compressed-texture-size-limit.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/glsl/misc/fragcolor-fragdata-invariant.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-define-line-continuation.frag.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-uniform-structs.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-varyings.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/misc/expando-loss.html.ini2
-rw-r--r--tests/wpt/webgl/meta/conformance/misc/type-conversion-test.html.ini21
-rw-r--r--tests/wpt/webgl/meta/conformance/misc/uninitialized-test.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/more/conformance/methods.html.ini2
-rw-r--r--tests/wpt/webgl/meta/conformance/more/conformance/quickCheckAPI-S_V.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance/more/functions/readPixelsBadArgs.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/more/functions/texImage2DHTML.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/more/functions/texSubImage2DHTML.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/more/functions/vertexAttribPointerBadArgs.html.ini4
-rw-r--r--tests/wpt/webgl/meta/conformance/reading/read-pixels-pack-alignment.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/reading/read-pixels-test.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance/renderbuffers/depth-renderbuffer-initialization.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/renderbuffers/feedback-loop.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-object-attachment.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-state-restoration.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/renderbuffers/renderbuffer-initialization.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/renderbuffers/stencil-renderbuffer-initialization.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/rendering/draw-elements-out-of-bounds.html.ini4
-rw-r--r--tests/wpt/webgl/meta/conformance/rendering/framebuffer-switch.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/rendering/framebuffer-texture-switch.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/rendering/multisample-corruption.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/rendering/preservedrawingbuffer-leak.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-alpha-alpha-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini86
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini86
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini340
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini88
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini340
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini88
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini88
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/copy-tex-image-2d-formats.html.ini29
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/copy-tex-image-and-sub-image-2d.html.ini578
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/gl-pixelstorei.html.ini9
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/image/tex-2d-luminance-luminance-unsigned_byte.html.ini25
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/image/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini25
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/image_data/tex-2d-luminance-luminance-unsigned_byte.html.ini505
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/image_data/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini505
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/misc/gl-pixelstorei.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/misc/tex-image-with-format-and-type.html.ini37
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/misc/texture-copying-feedback-loops.html.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/misc/texture-corner-case-videos.html.ini4
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/misc/texture-npot-video.html.ini4
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/misc/texture-size-limit.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/origin-clean-conformance.html.ini14
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/svg_image/__dir__.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-alpha-alpha-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-luminance-luminance-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgb-rgb-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html.ini197
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html.ini197
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html.ini200
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html.ini197
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-webgl.html.ini8
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-image-with-format-and-type.html.ini38
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/tex-input-validation.html.ini16
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/texture-attachment-formats.html.ini8
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/texture-copying-feedback-loops.html.ini9
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/texture-fakeblack.html.ini8
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/texture-npot-video.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/texture-npot.html.ini23
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/texture-size-cube-maps.html.ini146
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/texture-sub-image-cube-maps.html.ini116
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/texture-upload-size.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/video/__dir__.ini1
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/video/tex-2d-alpha-alpha-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_byte.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-alpha-alpha-unsigned_byte.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance2/buffers/buffer-copying-restrictions.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/buffers/buffer-type-restrictions.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data-validity.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/buffers/uniform-buffers-state-restoration.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/glsl3/unary-minus-operator-in-dynamic-loop.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/query/occlusion-query.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/rendering/canvas-resizing-with-pbo-bound.html.ini28
-rw-r--r--tests/wpt/webgl/meta/conformance2/rendering/draw-buffers-driver-hang.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/sync/sync-webgl-specific.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/transform_feedback/same-buffer-two-binding-points.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/transform_feedback/simultaneous_binding.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/transform_feedback/switching-objects.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/transform_feedback/too-small-buffers.html.ini3
-rw-r--r--tests/wpt/webgl/meta/conformance2/transform_feedback/transform_feedback.html.ini3
-rw-r--r--tests/wpt/webgl/tests/conformance/buffers/buffer-data-array-buffer-delete.html32
-rw-r--r--tests/wpt/webgl/tests/conformance/canvas/canvas-test.html1
-rw-r--r--tests/wpt/webgl/tests/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html2
-rw-r--r--tests/wpt/webgl/tests/conformance/canvas/draw-webgl-to-canvas-test.html2
-rw-r--r--tests/wpt/webgl/tests/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html5
-rw-r--r--tests/wpt/webgl/tests/conformance/canvas/rapid-resizing.html3
-rw-r--r--tests/wpt/webgl/tests/conformance/canvas/to-data-url-test.html1
-rw-r--r--tests/wpt/webgl/tests/conformance/context/context-attribute-preserve-drawing-buffer.html9
-rw-r--r--tests/wpt/webgl/tests/conformance/context/context-creation-and-destruction.html1
-rw-r--r--tests/wpt/webgl/tests/conformance/context/context-creation.html1
-rw-r--r--tests/wpt/webgl/tests/conformance/context/premultiplyalpha-test.html6
-rw-r--r--tests/wpt/webgl/tests/conformance/renderbuffers/framebuffer-state-restoration.html5
-rw-r--r--tests/wpt/webgl/tests/conformance/rendering/multisample-corruption.html11
-rw-r--r--tests/wpt/webgl/tests/conformance/rendering/preservedrawingbuffer-leak.html11
-rw-r--r--tests/wpt/webgl/tests/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html281
-rw-r--r--tests/wpt/webgl/tests/conformance/textures/misc/texture-upload-size.html3
-rw-r--r--tests/wpt/webgl/tests/conformance2/context/00_test_list.txt1
-rw-r--r--tests/wpt/webgl/tests/conformance2/context/context-mode.html79
-rw-r--r--tests/wpt/webgl/tests/conformance2/rendering/canvas-resizing-with-pbo-bound.html2
-rw-r--r--tests/wpt/webgl/tests/js/js-test-pre.js5
-rw-r--r--tests/wpt/webgl/tests/js/tests/tex-image-and-sub-image-2d-with-webgl-canvas.js5
-rw-r--r--tests/wpt/webgl/tests/js/webgl-test-utils.js31
-rwxr-xr-xtests/wpt/webgl/tools/import-conformance-tests.py4
-rw-r--r--tests/wpt/webgl/tools/js-test-pre.patch7
-rw-r--r--tests/wpt/webgl/tools/js-test-pre2.patch84
-rw-r--r--tests/wpt/webgl/tools/set-zero-timeout.patch40
-rw-r--r--tests/wpt/webgl/tools/timeout.patch36
-rw-r--r--tests/wpt/webgl/tools/unit.patch29
-rw-r--r--tests/wpt/webgl/tools/unit2.patch25
2854 files changed, 68362 insertions, 37480 deletions
diff --git a/Cargo.lock b/Cargo.lock
index edbc9cb1bdc..ee14093c660 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -455,6 +455,14 @@ dependencies = [
]
[[package]]
+name = "cloudabi"
+version = "0.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "cmake"
version = "0.1.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -604,6 +612,18 @@ dependencies = [
]
[[package]]
+name = "crossbeam-channel"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "crossbeam-deque"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -627,6 +647,19 @@ dependencies = [
]
[[package]]
+name = "crossbeam-epoch"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "crossbeam-utils"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -635,6 +668,11 @@ dependencies = [
]
[[package]]
+name = "crossbeam-utils"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "cssparser"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -899,7 +937,7 @@ version = "0.3.0"
source = "git+https://github.com/energymon/energymon-sys.git#f8d77ea2906b25f9c0fd358aa9d300a46dc3e97c"
dependencies = [
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -973,7 +1011,7 @@ version = "2.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1191,7 +1229,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.3 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1218,7 +1256,7 @@ dependencies = [
"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.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "x11-dl 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "x11-dl 2.18.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1238,7 +1276,7 @@ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-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)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1284,7 +1322,7 @@ dependencies = [
"gstreamer-base-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.5.0 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1313,7 +1351,7 @@ dependencies = [
"gstreamer-base-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.5.0 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1340,7 +1378,7 @@ dependencies = [
"gobject-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.5.0 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1369,7 +1407,7 @@ dependencies = [
"gstreamer-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video-sys 0.5.0 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1381,7 +1419,7 @@ dependencies = [
"glib-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-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)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1412,7 +1450,7 @@ dependencies = [
"gstreamer-base-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.5.0 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1432,7 +1470,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1459,7 +1497,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1623,13 +1661,30 @@ dependencies = [
"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.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "mio 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mio 0.6.15 (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)",
"uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
+name = "ipc-channel"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crossbeam-channel 0.2.4 (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.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tempfile 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "itertools"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1844,7 +1899,7 @@ name = "libdbus-sys"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1921,7 +1976,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.18 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2135,7 +2190,7 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.6.12"
+version = "0.6.15"
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)",
@@ -2144,10 +2199,10 @@ dependencies = [
"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.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.1 (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)",
- "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
+ "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2157,7 +2212,7 @@ version = "0.2.1"
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)",
- "net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "net2 0.2.33 (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)",
]
@@ -2285,14 +2340,12 @@ dependencies = [
[[package]]
name = "net2"
-version = "0.2.29"
+version = "0.2.33"
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.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)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2491,7 +2544,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.18 (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.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2566,7 +2619,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "petgraph"
-version = "0.4.12"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2610,7 +2663,7 @@ dependencies = [
[[package]]
name = "pkg-config"
-version = "0.3.12"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -2753,6 +2806,23 @@ dependencies = [
]
[[package]]
+name = "rand"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "range"
version = "0.0.1"
dependencies = [
@@ -2780,7 +2850,7 @@ dependencies = [
"lazy_static 1.0.0 (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)",
+ "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3182,7 +3252,7 @@ version = "4.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3192,13 +3262,13 @@ version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "servo-media"
version = "0.1.0"
-source = "git+https://github.com/servo/media#6ecac1c6259b3995e8d6a368e49777e5c2d398ae"
+source = "git+https://github.com/servo/media#44ad355b020168e78ab32db2c6f5286e7db2ba77"
dependencies = [
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
"servo-media-gstreamer 0.1.0 (git+https://github.com/servo/media)",
@@ -3208,12 +3278,12 @@ dependencies = [
[[package]]
name = "servo-media-audio"
version = "0.1.0"
-source = "git+https://github.com/servo/media#6ecac1c6259b3995e8d6a368e49777e5c2d398ae"
+source = "git+https://github.com/servo/media#44ad355b020168e78ab32db2c6f5286e7db2ba77"
dependencies = [
"byte-slice-cast 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "petgraph 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_media_derive 0.1.0 (git+https://github.com/servo/media)",
"smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3221,7 +3291,7 @@ dependencies = [
[[package]]
name = "servo-media-gstreamer"
version = "0.1.0"
-source = "git+https://github.com/servo/media#6ecac1c6259b3995e8d6a368e49777e5c2d398ae"
+source = "git+https://github.com/servo/media#44ad355b020168e78ab32db2c6f5286e7db2ba77"
dependencies = [
"byte-slice-cast 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3229,7 +3299,7 @@ dependencies = [
"gstreamer-app 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-audio 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-player 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ipc-channel 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)",
@@ -3239,9 +3309,9 @@ dependencies = [
[[package]]
name = "servo-media-player"
version = "0.1.0"
-source = "git+https://github.com/servo/media#6ecac1c6259b3995e8d6a368e49777e5c2d398ae"
+source = "git+https://github.com/servo/media#44ad355b020168e78ab32db2c6f5286e7db2ba77"
dependencies = [
- "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ipc-channel 0.11.0 (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)",
]
@@ -3325,7 +3395,7 @@ dependencies = [
[[package]]
name = "servo_media_derive"
version = "0.1.0"
-source = "git+https://github.com/servo/media#6ecac1c6259b3995e8d6a368e49777e5c2d398ae"
+source = "git+https://github.com/servo/media#44ad355b020168e78ab32db2c6f5286e7db2ba77"
dependencies = [
"quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3401,6 +3471,11 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "slab"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
name = "smallbitvec"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4115,7 +4190,7 @@ dependencies = [
"smithay-client-toolkit 0.2.6 (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.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "x11-dl 2.18.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4135,7 +4210,7 @@ dependencies = [
"bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"httparse 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "mio 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4158,7 +4233,7 @@ version = "2.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4172,12 +4247,12 @@ dependencies = [
[[package]]
name = "x11-dl"
-version = "2.18.1"
+version = "2.18.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4276,6 +4351,7 @@ dependencies = [
"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 cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb"
"checksum cocoa 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5cd1afb83b2de9c41e5dfedb2bcccb779d433b958404876009ae4b01746ff23"
"checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d"
@@ -4286,9 +4362,12 @@ dependencies = [
"checksum core-graphics 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92801c908ea6301ae619ed842a72e01098085fc321b9c2f3f833dad555bba055"
"checksum core-text 11.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "157ff38a92496dc676ce36d9124554e9ac66f1c1039f952690ac64f71cfa5968"
"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb"
+"checksum crossbeam-channel 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6c0a94250b0278d7fc5a894c3d276b11ea164edc8bf8feb10ca1ea517b44a649"
"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-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30fecfcac6abfef8771151f8be4abc9e4edc112c2bcb233314cafde2680536e9"
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
+"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015"
"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"
@@ -4373,6 +4452,7 @@ dependencies = [
"checksum io-surface 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9a33981dff54baaff80f4decb487a65d148a3c00facc97820d0f09128f74dd"
"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
"checksum ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db9daf099728ac5390c73f54e6e3708f0c514d2b51f24373830f568702eadfca"
+"checksum ipc-channel 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd75debad4ffd295c00c6e3634d254df30050b0837a85e5cd039ac424365f24a"
"checksum itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b07332223953b5051bceb67e8c4700aa65291535568e1f12408c43c4a42c0394"
"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682"
"checksum jemalloc-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "479294d130502fada93c7a957e8d059b632b03d6204aca37af557dee947f30a9"
@@ -4406,7 +4486,7 @@ dependencies = [
"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"
"checksum miniz_oxide 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba430291c9d6cedae28bcd2d49d1c32fc57d60cd49086646c5dd5673a870eb5"
"checksum miniz_oxide_c_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5a5b8234d6103ebfba71e29786da4608540f862de5ce980a1c94f86a40ca0d51"
-"checksum mio 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "75f72a93f046f1517e3cfddc0a096eb756a2ba727d36edc8227dee769a50a9b0"
+"checksum mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)" = "4fcfcb32d63961fb6f367bfd5d21e4600b92cd310f71f9dca25acae196eb1560"
"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
"checksum mitochondria 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9de3eca27871df31c33b807f834b94ef7d000956f57aa25c5aed9c5f0aae8f6f"
"checksum mozangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "45a8a18a41cfab0fde25cc2f43ea89064d211a0fbb33225b8ff93ab20406e0e7"
@@ -4416,7 +4496,7 @@ dependencies = [
"checksum mp4parse 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7316728464443fe5793a805dde3257864e9690cf46374daff3ce93de1df2f254"
"checksum msdos_time 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aad9dfe950c057b1bfe9c1f2aa51583a8468ef2a5baba2ebbe06d775efeb7729"
"checksum muldiv 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1cbef5aa2e8cd82a18cc20e26434cc9843e1ef46e55bfabe5bddb022236c5b3e"
-"checksum net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "bc01404e7568680f1259aa5729539f221cb1e6d047a0d9053cab4be8a73b5d67"
+"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
"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"
@@ -4446,12 +4526,12 @@ dependencies = [
"checksum parking_lot_core 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "538ef00b7317875071d5e00f603f24d16f0b474c1a5fc0ccb8b454ca72eafa79"
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
"checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356"
-"checksum petgraph 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "8b30dc85588cd02b9b76f5e386535db546d21dc68506cff2abebee0b6445e8e4"
+"checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f"
"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc"
"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f"
"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03"
"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2"
-"checksum pkg-config 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "6a52e4dbc8354505ee07e484ab07127e06d87ca6fa7f0a516a2b294e5ad5ad16"
+"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
"checksum plane-split 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3a4fc9e31d70eb6828e9a2d7a401a824d9f281686a39a8fc06f08796edb1bb"
"checksum png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f54b9600d584d3b8a739e1662a595fab051329eff43f20e7d8cc22872962145b"
"checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd"
@@ -4464,6 +4544,8 @@ dependencies = [
"checksum quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035"
"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
+"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
+"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2"
"checksum rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "485541959c8ecc49865526fe6c4de9653dd6e60d829d6edf0be228167b60372d"
"checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8"
"checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b"
@@ -4504,6 +4586,7 @@ dependencies = [
"checksum signpost 0.1.0 (git+https://github.com/pcwalton/signpost.git)" = "<none>"
"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
+"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d"
"checksum smallbitvec 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c63726029f0069f88467873e47f392575f28f9f16b72ac65465263db4b3a13c"
"checksum smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "26df3bb03ca5eac2e64192b723d51f56c1b1e0860e7c766281f4598f181acdc8"
"checksum smithay-client-toolkit 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2051bffc6cbf271176e8ba1527f801b6444567daee15951ff5152aaaf7777b2f"
@@ -4573,7 +4656,7 @@ dependencies = [
"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.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "966f78e9291e51d573bd3dd9287b285c0265daa8aa9fbe74c370467baa360c4e"
+"checksum x11-dl 2.18.3 (registry+https://github.com/rust-lang/crates.io-index)" = "940586acb859ea05c53971ac231685799a7ec1dee66ac0bccc0e6ad96e06b4e3"
"checksum xcb 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de"
"checksum xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12ea8eda4b1eb72f02d148402e23832d56a33f55d8c1b2d5bcdde91d79d47cb1"
"checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2"
diff --git a/README.md b/README.md
index e7d5671a54a..db98506d280 100644
--- a/README.md
+++ b/README.md
@@ -101,9 +101,10 @@ If `virtualenv` does not exist, try `python-virtualenv`.
``` sh
sudo dnf install curl libtool gcc-c++ libXi-devel \
freetype-devel mesa-libGL-devel mesa-libEGL-devel glib2-devel libX11-devel libXrandr-devel gperf \
- fontconfig-devel cabextract ttmkfdir python python-virtualenv python-pip expat-devel \
+ fontconfig-devel cabextract ttmkfdir python2 python2-virtualenv python2-pip expat-devel \
rpm-build openssl-devel cmake bzip2-devel libXcursor-devel libXmu-devel mesa-libOSMesa-devel \
- dbus-devel ncurses-devel harfbuzz-devel ccache mesa-libGLU-devel clang clang-libs gstreamer autoconf213
+ dbus-devel ncurses-devel harfbuzz-devel ccache mesa-libGLU-devel clang clang-libs gstreamer1-devel \
+ gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free-devel autoconf213
```
#### On CentOS
@@ -132,13 +133,13 @@ export LIBCLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64
sudo zypper install libX11-devel libexpat-devel libbz2-devel Mesa-libEGL-devel Mesa-libGL-devel cabextract cmake \
dbus-1-devel fontconfig-devel freetype-devel gcc-c++ git glib2-devel gperf \
harfbuzz-devel libOSMesa-devel libXcursor-devel libXi-devel libXmu-devel libXrandr-devel libopenssl-devel \
- python-pip python-virtualenv rpm-build glu-devel ccache llvm-clang libclang
+ python-pip python-virtualenv rpm-build glu-devel ccache llvm-clang libclang
```
#### On Arch Linux
``` sh
sudo pacman -S --needed base-devel git python2 python2-virtualenv python2-pip mesa cmake bzip2 libxmu glu \
- pkg-config ttf-fira-sans harfbuzz ccache clang
+ pkg-config ttf-fira-sans harfbuzz ccache clang autoconf2.13
```
#### On Gentoo Linux
diff --git a/appveyor.yml b/appveyor.yml
index a1d34d8fe05..6be6ea70418 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -44,7 +44,7 @@ cache:
- .ccache
install:
- - choco install pkgconfiglite
+ - appveyor-retry choco install pkgconfiglite
- appveyor-retry appveyor DownloadFile https://gstreamer.freedesktop.org/data/pkg/windows/1.14.1/gstreamer-1.0-devel-x86_64-1.14.1.msi
- appveyor-retry appveyor DownloadFile https://gstreamer.freedesktop.org/data/pkg/windows/1.14.1/gstreamer-1.0-x86_64-1.14.1.msi
- msiexec /i gstreamer-1.0-devel-x86_64-1.14.1.msi /quiet /qn /norestart /log install-devel.log
@@ -54,8 +54,6 @@ install:
- rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain none
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- set PKG_CONFIG_PATH=%PKG_CONFIG_PATH%;C:\gstreamer\1.0\x86_64\lib\pkgconfig
- - set LIB=%LIB%;C:\gstreamer\1.0\x86_64\lib
- - set LIBPATH=C:\gstreamer\1.0\x86_64\lib;%LIBPATH%
- rustup -V
- mach rustc --version
- mach cargo --version
diff --git a/components/atoms/static_atoms.txt b/components/atoms/static_atoms.txt
index 0798179c151..7fbd043dc0f 100644
--- a/components/atoms/static_atoms.txt
+++ b/components/atoms/static_atoms.txt
@@ -36,6 +36,7 @@ invalid
keydown
keypress
left
+ltr
load
loadeddata
loadedmetadata
@@ -65,6 +66,7 @@ readystatechange
reftest-wait
reset
right
+rtl
sans-serif
scan
screen
diff --git a/components/canvas/webgl_mode/inprocess.rs b/components/canvas/webgl_mode/inprocess.rs
index d8d4b4656f1..42a4a112cee 100644
--- a/components/canvas/webgl_mode/inprocess.rs
+++ b/components/canvas/webgl_mode/inprocess.rs
@@ -22,23 +22,38 @@ pub struct WebGLThreads(WebGLSender<WebGLMsg>);
impl WebGLThreads {
/// Creates a new WebGLThreads object
- pub fn new(gl_factory: GLContextFactory,
- webrender_gl: Rc<gl::Gl>,
- webrender_api_sender: webrender_api::RenderApiSender,
- webvr_compositor: Option<Box<WebVRRenderHandler>>)
- -> (WebGLThreads, Box<webrender::ExternalImageHandler>, Option<Box<webrender::OutputImageHandler>>) {
+ pub fn new(
+ gl_factory: GLContextFactory,
+ webrender_gl: Rc<gl::Gl>,
+ webrender_api_sender: webrender_api::RenderApiSender,
+ webvr_compositor: Option<Box<WebVRRenderHandler>>,
+ ) -> (
+ WebGLThreads,
+ Box<webrender::ExternalImageHandler>,
+ Option<Box<webrender::OutputImageHandler>>,
+ ) {
// This implementation creates a single `WebGLThread` for all the pipelines.
- let channel = WebGLThread::start(gl_factory,
- webrender_api_sender,
- webvr_compositor.map(|c| WebVRRenderWrapper(c)),
- PhantomData);
+ let channel = WebGLThread::start(
+ gl_factory,
+ webrender_api_sender,
+ webvr_compositor.map(|c| WebVRRenderWrapper(c)),
+ PhantomData,
+ );
let output_handler = if PREFS.is_dom_to_texture_enabled() {
- Some(Box::new(OutputHandler::new(webrender_gl.clone(), channel.clone())))
+ Some(Box::new(OutputHandler::new(
+ webrender_gl.clone(),
+ channel.clone(),
+ )))
} else {
None
};
- let external = WebGLExternalImageHandler::new(WebGLExternalImages::new(webrender_gl, channel.clone()));
- (WebGLThreads(channel), Box::new(external), output_handler.map(|b| b as Box<_>))
+ let external =
+ WebGLExternalImageHandler::new(WebGLExternalImages::new(webrender_gl, channel.clone()));
+ (
+ WebGLThreads(channel),
+ Box::new(external),
+ output_handler.map(|b| b as Box<_>),
+ )
}
/// Gets the WebGLThread handle for each script pipeline.
@@ -49,7 +64,9 @@ impl WebGLThreads {
/// Sends a exit message to close the WebGLThreads and release all WebGLContexts.
pub fn exit(&self) -> Result<(), &'static str> {
- self.0.send(WebGLMsg::Exit).map_err(|_| "Failed to send Exit message")
+ self.0
+ .send(WebGLMsg::Exit)
+ .map_err(|_| "Failed to send Exit message")
}
}
@@ -58,7 +75,10 @@ struct WebGLExternalImages {
webrender_gl: Rc<gl::Gl>,
webgl_channel: WebGLSender<WebGLMsg>,
// Used to avoid creating a new channel on each received WebRender request.
- lock_channel: (WebGLSender<(u32, Size2D<i32>, usize)>, WebGLReceiver<(u32, Size2D<i32>, usize)>),
+ lock_channel: (
+ WebGLSender<(u32, Size2D<i32>, usize)>,
+ WebGLReceiver<(u32, Size2D<i32>, usize)>,
+ ),
}
impl WebGLExternalImages {
@@ -75,12 +95,15 @@ impl WebGLExternalImageApi for WebGLExternalImages {
fn lock(&mut self, ctx_id: WebGLContextId) -> (u32, Size2D<i32>) {
// WebGL Thread has it's own GL command queue that we need to synchronize with the WR GL command queue.
// The WebGLMsg::Lock message inserts a fence in the WebGL command queue.
- self.webgl_channel.send(WebGLMsg::Lock(ctx_id, self.lock_channel.0.clone())).unwrap();
+ self.webgl_channel
+ .send(WebGLMsg::Lock(ctx_id, self.lock_channel.0.clone()))
+ .unwrap();
let (image_id, size, gl_sync) = self.lock_channel.1.recv().unwrap();
// The next glWaitSync call is run on the WR thread and it's used to synchronize the two
// flows of OpenGL commands in order to avoid WR using a semi-ready WebGL texture.
// glWaitSync doesn't block WR thread, it affects only internal OpenGL subsystem.
- self.webrender_gl.wait_sync(gl_sync as gl::GLsync, 0, gl::TIMEOUT_IGNORED);
+ self.webrender_gl
+ .wait_sync(gl_sync as gl::GLsync, 0, gl::TIMEOUT_IGNORED);
(image_id, size)
}
@@ -92,11 +115,17 @@ impl WebGLExternalImageApi for WebGLExternalImages {
/// Custom observer used in a `WebGLThread`.
impl WebGLThreadObserver for PhantomData<()> {
fn on_context_create(&mut self, ctx_id: WebGLContextId, texture_id: u32, size: Size2D<i32>) {
- debug!("WebGLContext created (ctx_id: {:?} texture_id: {:?} size: {:?}", ctx_id, texture_id, size);
+ debug!(
+ "WebGLContext created (ctx_id: {:?} texture_id: {:?} size: {:?}",
+ ctx_id, texture_id, size
+ );
}
fn on_context_resize(&mut self, ctx_id: WebGLContextId, texture_id: u32, size: Size2D<i32>) {
- debug!("WebGLContext resized (ctx_id: {:?} texture_id: {:?} size: {:?}", ctx_id, texture_id, size);
+ debug!(
+ "WebGLContext resized (ctx_id: {:?} texture_id: {:?} size: {:?}",
+ ctx_id, texture_id, size
+ );
}
fn on_context_delete(&mut self, ctx_id: WebGLContextId) {
@@ -104,7 +133,6 @@ impl WebGLThreadObserver for PhantomData<()> {
}
}
-
/// Wrapper to send WebVR commands used in `WebGLThread`.
struct WebVRRenderWrapper(Box<WebVRRenderHandler>);
@@ -120,7 +148,10 @@ struct OutputHandler {
webrender_gl: Rc<gl::Gl>,
webgl_channel: WebGLSender<WebGLMsg>,
// Used to avoid creating a new channel on each received WebRender request.
- lock_channel: (WebGLSender<OutputHandlerData>, WebGLReceiver<OutputHandlerData>),
+ lock_channel: (
+ WebGLSender<OutputHandlerData>,
+ WebGLReceiver<OutputHandlerData>,
+ ),
sync_objects: FnvHashMap<webrender_api::PipelineId, gl::GLsync>,
}
@@ -137,14 +168,24 @@ impl OutputHandler {
/// Bridge between the WR frame outputs and WebGL to implement DOMToTexture synchronization.
impl webrender::OutputImageHandler for OutputHandler {
- fn lock(&mut self, id: webrender_api::PipelineId) -> Option<(u32, webrender_api::DeviceIntSize)> {
+ fn lock(
+ &mut self,
+ id: webrender_api::PipelineId,
+ ) -> Option<(u32, webrender_api::DeviceIntSize)> {
// Insert a fence in the WR command queue
- let gl_sync = self.webrender_gl.fence_sync(gl::SYNC_GPU_COMMANDS_COMPLETE, 0);
+ let gl_sync = self
+ .webrender_gl
+ .fence_sync(gl::SYNC_GPU_COMMANDS_COMPLETE, 0);
// The lock command adds a WaitSync call on the WebGL command flow.
let command = DOMToTextureCommand::Lock(id, gl_sync as usize, self.lock_channel.0.clone());
- self.webgl_channel.send(WebGLMsg::DOMToTextureCommand(command)).unwrap();
+ self.webgl_channel
+ .send(WebGLMsg::DOMToTextureCommand(command))
+ .unwrap();
self.lock_channel.1.recv().unwrap().map(|(tex_id, size)| {
- (tex_id, webrender_api::DeviceIntSize::new(size.width, size.height))
+ (
+ tex_id,
+ webrender_api::DeviceIntSize::new(size.width, size.height),
+ )
})
}
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index 7430145e5ee..efbb4ca71c5 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -7,8 +7,8 @@ use canvas_traits::webgl::*;
use euclid::Size2D;
use fnv::FnvHashMap;
use gleam::gl;
+use ipc_channel::ipc::IpcBytesSender;
use offscreen_gl_context::{GLContext, GLContextAttributes, GLLimits, NativeGLContextMethods};
-use serde_bytes::ByteBuf;
use std::thread;
use super::gl_context::{GLContextFactory, GLContextWrapper};
use webrender;
@@ -659,10 +659,12 @@ impl WebGLImpl {
ctx.gl().blend_func(src, dest),
WebGLCommand::BlendFuncSeparate(src_rgb, dest_rgb, src_alpha, dest_alpha) =>
ctx.gl().blend_func_separate(src_rgb, dest_rgb, src_alpha, dest_alpha),
- WebGLCommand::BufferData(buffer_type, ref data, usage) =>
- gl::buffer_data(ctx.gl(), buffer_type, data, usage),
- WebGLCommand::BufferSubData(buffer_type, offset, ref data) =>
- gl::buffer_sub_data(ctx.gl(), buffer_type, offset, data),
+ WebGLCommand::BufferData(buffer_type, ref receiver, usage) => {
+ gl::buffer_data(ctx.gl(), buffer_type, &receiver.recv().unwrap(), usage)
+ },
+ WebGLCommand::BufferSubData(buffer_type, offset, ref receiver) => {
+ gl::buffer_sub_data(ctx.gl(), buffer_type, offset, &receiver.recv().unwrap())
+ },
WebGLCommand::Clear(mask) =>
ctx.gl().clear(mask),
WebGLCommand::ClearColor(r, g, b, a) =>
@@ -711,8 +713,9 @@ impl WebGLImpl {
ctx.gl().pixel_store_i(name, val),
WebGLCommand::PolygonOffset(factor, units) =>
ctx.gl().polygon_offset(factor, units),
- WebGLCommand::ReadPixels(x, y, width, height, format, pixel_type, ref chan) =>
- Self::read_pixels(ctx.gl(), x, y, width, height, format, pixel_type, chan),
+ WebGLCommand::ReadPixels(x, y, width, height, format, pixel_type, ref chan) => {
+ Self::read_pixels(ctx.gl(), x, y, width, height, format, pixel_type, chan)
+ }
WebGLCommand::RenderbufferStorage(target, format, width, height) =>
ctx.gl().renderbuffer_storage(target, format, width, height),
WebGLCommand::SampleCoverage(value, invert) =>
@@ -831,11 +834,32 @@ impl WebGLImpl {
WebGLCommand::SetViewport(x, y, width, height) => {
ctx.gl().viewport(x, y, width, height);
}
- WebGLCommand::TexImage2D(target, level, internal, width, height, format, data_type, ref data) =>
- ctx.gl().tex_image_2d(target, level, internal, width, height,
- /*border*/0, format, data_type, Some(data)),
- WebGLCommand::TexSubImage2D(target, level, xoffset, yoffset, x, y, width, height, ref data) =>
- ctx.gl().tex_sub_image_2d(target, level, xoffset, yoffset, x, y, width, height, data),
+ WebGLCommand::TexImage2D(target, level, internal, width, height, format, data_type, ref chan) => {
+ ctx.gl().tex_image_2d(
+ target,
+ level,
+ internal,
+ width,
+ height,
+ 0,
+ format,
+ data_type,
+ Some(&chan.recv().unwrap()),
+ )
+ }
+ WebGLCommand::TexSubImage2D(target, level, xoffset, yoffset, x, y, width, height, ref chan) => {
+ ctx.gl().tex_sub_image_2d(
+ target,
+ level,
+ xoffset,
+ yoffset,
+ x,
+ y,
+ width,
+ height,
+ &chan.recv().unwrap(),
+ )
+ }
WebGLCommand::DrawingBufferWidth(ref sender) =>
sender.send(ctx.borrow_draw_buffer().unwrap().size().width).unwrap(),
WebGLCommand::DrawingBufferHeight(ref sender) =>
@@ -1163,10 +1187,10 @@ impl WebGLImpl {
height: i32,
format: u32,
pixel_type: u32,
- chan: &WebGLSender<ByteBuf>,
+ chan: &IpcBytesSender,
) {
let result = gl.read_pixels(x, y, width, height, format, pixel_type);
- chan.send(result.into()).unwrap()
+ chan.send(&result).unwrap()
}
fn finish(gl: &gl::Gl, chan: &WebGLSender<()>) {
diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs
index bdffd586287..57647204910 100644
--- a/components/canvas_traits/webgl.rs
+++ b/components/canvas_traits/webgl.rs
@@ -4,6 +4,7 @@
use euclid::Size2D;
use gleam::gl;
+use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender};
use offscreen_gl_context::{GLContextAttributes, GLLimits};
use serde_bytes::ByteBuf;
use std::borrow::Cow;
@@ -24,7 +25,7 @@ pub use ::webgl_channel::WebGLPipeline;
pub use ::webgl_channel::WebGLChan;
/// WebGL Message API
-#[derive(Clone, Deserialize, Serialize)]
+#[derive(Deserialize, Serialize)]
pub enum WebGLMsg {
/// Creates a new WebGLContext.
CreateContext(WebGLVersion, Size2D<i32>, GLContextAttributes,
@@ -155,7 +156,7 @@ impl WebGLMsgSender {
}
/// WebGL Commands for a specific WebGLContext
-#[derive(Clone, Debug, Deserialize, Serialize)]
+#[derive(Debug, Deserialize, Serialize)]
pub enum WebGLCommand {
GetContextAttributes(WebGLSender<GLContextAttributes>),
ActiveTexture(u32),
@@ -167,8 +168,8 @@ pub enum WebGLCommand {
AttachShader(WebGLProgramId, WebGLShaderId),
DetachShader(WebGLProgramId, WebGLShaderId),
BindAttribLocation(WebGLProgramId, u32, String),
- BufferData(u32, ByteBuf, u32),
- BufferSubData(u32, isize, ByteBuf),
+ BufferData(u32, IpcBytesReceiver, u32),
+ BufferSubData(u32, isize, IpcBytesReceiver),
Clear(u32),
ClearColor(f32, f32, f32, f32),
ClearDepth(f32),
@@ -213,7 +214,7 @@ pub enum WebGLCommand {
GetRenderbufferParameter(u32, u32, WebGLSender<i32>),
PolygonOffset(f32, f32),
RenderbufferStorage(u32, u32, i32, i32),
- ReadPixels(i32, i32, i32, i32, u32, u32, WebGLSender<ByteBuf>),
+ ReadPixels(i32, i32, i32, i32, u32, u32, IpcBytesSender),
SampleCoverage(f32, bool),
Scissor(i32, i32, i32, i32),
StencilFunc(u32, i32, u32),
@@ -251,8 +252,8 @@ pub enum WebGLCommand {
VertexAttribPointer(u32, i32, u32, bool, i32, u32),
VertexAttribPointer2f(u32, i32, bool, i32, u32),
SetViewport(i32, i32, i32, i32),
- TexImage2D(u32, i32, i32, i32, i32, u32, u32, ByteBuf),
- TexSubImage2D(u32, i32, i32, i32, i32, i32, u32, u32, ByteBuf),
+ TexImage2D(u32, i32, i32, i32, i32, u32, u32, IpcBytesReceiver),
+ TexSubImage2D(u32, i32, i32, i32, i32, i32, u32, u32, IpcBytesReceiver),
DrawingBufferWidth(WebGLSender<i32>),
DrawingBufferHeight(WebGLSender<i32>),
Finish(WebGLSender<()>),
diff --git a/components/canvas_traits/webgl_channel/ipc.rs b/components/canvas_traits/webgl_channel/ipc.rs
index ac3020bbc7a..a00ceda75ed 100644
--- a/components/canvas_traits/webgl_channel/ipc.rs
+++ b/components/canvas_traits/webgl_channel/ipc.rs
@@ -9,7 +9,7 @@ use std::io;
pub type WebGLSender<T> = ipc_channel::ipc::IpcSender<T>;
pub type WebGLReceiver<T> = ipc_channel::ipc::IpcReceiver<T>;
-pub fn webgl_channel<T: Serialize + for<'de> Deserialize<'de>>()
- -> Result<(WebGLSender<T>, WebGLReceiver<T>), io::Error> {
+pub fn webgl_channel<T: Serialize + for<'de> Deserialize<'de>>(
+) -> Result<(WebGLSender<T>, WebGLReceiver<T>), io::Error> {
ipc_channel::ipc::channel()
}
diff --git a/components/canvas_traits/webgl_channel/mod.rs b/components/canvas_traits/webgl_channel/mod.rs
index c7376501049..3c6bd1690b0 100644
--- a/components/canvas_traits/webgl_channel/mod.rs
+++ b/components/canvas_traits/webgl_channel/mod.rs
@@ -13,17 +13,27 @@ use servo_config::opts;
use std::fmt;
lazy_static! {
- static ref IS_MULTIPROCESS: bool = {
- opts::multiprocess()
- };
+ static ref IS_MULTIPROCESS: bool = { opts::multiprocess() };
}
-#[derive(Clone, Deserialize, Serialize)]
+#[derive(Deserialize, Serialize)]
pub enum WebGLSender<T: Serialize> {
Ipc(ipc::WebGLSender<T>),
Mpsc(mpsc::WebGLSender<T>),
}
+impl<T> Clone for WebGLSender<T>
+where
+ T: Serialize,
+{
+ fn clone(&self) -> Self {
+ match *self {
+ WebGLSender::Ipc(ref chan) => WebGLSender::Ipc(chan.clone()),
+ WebGLSender::Mpsc(ref chan) => WebGLSender::Mpsc(chan.clone()),
+ }
+ }
+}
+
impl<T: Serialize> fmt::Debug for WebGLSender<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "WebGLSender(..)")
@@ -34,41 +44,42 @@ impl<T: Serialize> WebGLSender<T> {
#[inline]
pub fn send(&self, msg: T) -> WebGLSendResult {
match *self {
- WebGLSender::Ipc(ref sender) => {
- sender.send(msg).map_err(|_| ())
- },
- WebGLSender::Mpsc(ref sender) => {
- sender.send(msg).map_err(|_| ())
- }
+ WebGLSender::Ipc(ref sender) => sender.send(msg).map_err(|_| ()),
+ WebGLSender::Mpsc(ref sender) => sender.send(msg).map_err(|_| ()),
}
}
}
pub type WebGLSendResult = Result<(), ()>;
-pub enum WebGLReceiver<T> where T: for<'de> Deserialize<'de> + Serialize {
+pub enum WebGLReceiver<T>
+where
+ T: for<'de> Deserialize<'de> + Serialize,
+{
Ipc(ipc::WebGLReceiver<T>),
Mpsc(mpsc::WebGLReceiver<T>),
}
-impl<T> WebGLReceiver<T> where T: for<'de> Deserialize<'de> + Serialize {
+impl<T> WebGLReceiver<T>
+where
+ T: for<'de> Deserialize<'de> + Serialize,
+{
pub fn recv(&self) -> Result<T, ()> {
match *self {
- WebGLReceiver::Ipc(ref receiver) => {
- receiver.recv().map_err(|_| ())
- },
- WebGLReceiver::Mpsc(ref receiver) => {
- receiver.recv().map_err(|_| ())
- }
+ WebGLReceiver::Ipc(ref receiver) => receiver.recv().map_err(|_| ()),
+ WebGLReceiver::Mpsc(ref receiver) => receiver.recv().map_err(|_| ()),
}
}
}
pub fn webgl_channel<T>() -> Result<(WebGLSender<T>, WebGLReceiver<T>), ()>
- where T: for<'de> Deserialize<'de> + Serialize {
+where
+ T: for<'de> Deserialize<'de> + Serialize,
+{
if *IS_MULTIPROCESS {
- ipc::webgl_channel().map(|(tx, rx)| (WebGLSender::Ipc(tx), WebGLReceiver::Ipc(rx)))
- .map_err(|_| ())
+ ipc::webgl_channel()
+ .map(|(tx, rx)| (WebGLSender::Ipc(tx), WebGLReceiver::Ipc(rx)))
+ .map_err(|_| ())
} else {
mpsc::webgl_channel().map(|(tx, rx)| (WebGLSender::Mpsc(tx), WebGLReceiver::Mpsc(rx)))
}
diff --git a/components/canvas_traits/webgl_channel/mpsc.rs b/components/canvas_traits/webgl_channel/mpsc.rs
index b0fe29241f3..92b83791d36 100644
--- a/components/canvas_traits/webgl_channel/mpsc.rs
+++ b/components/canvas_traits/webgl_channel/mpsc.rs
@@ -17,17 +17,24 @@ macro_rules! unreachable_serializable {
impl<'a, T> Deserialize<'a> for $name<T> {
fn deserialize<D>(_: D) -> Result<$name<T>, D::Error>
- where D: Deserializer<'a> {
+ where
+ D: Deserializer<'a>,
+ {
unreachable!();
}
}
};
}
-#[derive(Clone)]
pub struct WebGLSender<T>(mpsc::Sender<T>);
pub struct WebGLReceiver<T>(mpsc::Receiver<T>);
+impl<T> Clone for WebGLSender<T> {
+ fn clone(&self) -> Self {
+ WebGLSender(self.0.clone())
+ }
+}
+
impl<T> WebGLSender<T> {
#[inline]
pub fn send(&self, data: T) -> Result<(), mpsc::SendError<T>> {
diff --git a/components/compositing/build.rs b/components/compositing/build.rs
index db081f795ad..8a13f9632d7 100644
--- a/components/compositing/build.rs
+++ b/components/compositing/build.rs
@@ -10,24 +10,33 @@ use std::io::{Read, Write};
use std::path::Path;
fn main() {
- let lockfile_path = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap()).join("..").join("..").join("Cargo.lock");
- let revision_file_path = Path::new(&env::var_os("OUT_DIR").unwrap()).join("webrender_revision.rs");
+ let lockfile_path = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap())
+ .join("..")
+ .join("..")
+ .join("Cargo.lock");
+ let revision_file_path =
+ Path::new(&env::var_os("OUT_DIR").unwrap()).join("webrender_revision.rs");
let mut lockfile = String::new();
- File::open(lockfile_path).expect("Cannot open lockfile")
+ File::open(lockfile_path)
+ .expect("Cannot open lockfile")
.read_to_string(&mut lockfile)
.expect("Failed to read lockfile");
match toml::from_str::<toml::value::Table>(&lockfile) {
Ok(result) => {
- let packages = result.get("package").expect("Cargo lockfile should contain package list");
+ let packages = result
+ .get("package")
+ .expect("Cargo lockfile should contain package list");
match *packages {
toml::Value::Array(ref arr) => {
let source = arr
.iter()
- .find(|pkg| pkg.get("name").and_then(|name| name.as_str()).unwrap_or("") == "webrender")
- .and_then(|pkg| pkg.get("source").and_then(|source| source.as_str()))
+ .find(|pkg| {
+ pkg.get("name").and_then(|name| name.as_str()).unwrap_or("") ==
+ "webrender"
+ }).and_then(|pkg| pkg.get("source").and_then(|source| source.as_str()))
.unwrap_or("unknown");
let parsed: Vec<&str> = source.split("#").collect();
@@ -36,9 +45,9 @@ fn main() {
let mut revision_module_file = File::create(&revision_file_path).unwrap();
write!(&mut revision_module_file, "{}", format!("\"{}\"", revision)).unwrap();
},
- _ => panic!("Cannot find package definitions in lockfile")
+ _ => panic!("Cannot find package definitions in lockfile"),
}
},
- Err(e) => panic!(e)
+ Err(e) => panic!(e),
}
}
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index fc775125d86..2a4845b6c2a 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -43,7 +43,6 @@ use webrender_api::{self, DeviceIntPoint, DevicePoint, HitTestFlags, HitTestResu
use webrender_api::{LayoutVector2D, ScrollLocation};
use windowing::{self, EmbedderCoordinates, MouseWindowEvent, WebRenderDebugOption, WindowMethods};
-
#[derive(Debug, PartialEq)]
enum UnableToComposite {
WindowUnprepared,
@@ -251,7 +250,7 @@ enum CompositeTarget {
WindowAndPng,
/// Compose to a PNG, write it to disk, and then exit the browser (used for reftests)
- PngFile
+ PngFile,
}
#[derive(Clone)]
@@ -273,7 +272,8 @@ impl webrender_api::RenderNotifier for RenderNotifier {
}
fn wake_up(&self) {
- self.compositor_proxy.recomposite(CompositingReason::NewWebRenderFrame);
+ self.compositor_proxy
+ .recomposite(CompositingReason::NewWebRenderFrame);
}
fn new_frame_ready(
@@ -284,7 +284,8 @@ impl webrender_api::RenderNotifier for RenderNotifier {
_render_time_ns: Option<u64>,
) {
if scrolled {
- self.compositor_proxy.send(Msg::NewScrollFrameReady(composite_needed));
+ self.compositor_proxy
+ .send(Msg::NewScrollFrameReady(composite_needed));
} else {
self.wake_up();
}
@@ -295,7 +296,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
fn new(window: Rc<Window>, state: InitialCompositorState) -> Self {
let composite_target = match opts::get().output_file {
Some(_) => CompositeTarget::PngFile,
- None => CompositeTarget::Window
+ None => CompositeTarget::Window,
};
IOCompositor {
@@ -372,7 +373,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
// Tell the profiler, memory profiler, and scrolling timer to shut down.
if let Ok((sender, receiver)) = ipc::channel() {
- self.time_profiler_chan.send(time::ProfilerMsg::Exit(sender));
+ self.time_profiler_chan
+ .send(time::ProfilerMsg::Exit(sender));
let _ = receiver.recv();
}
@@ -383,33 +385,33 @@ impl<Window: WindowMethods> IOCompositor<Window> {
match (msg, self.shutdown_state) {
(_, ShutdownState::FinishedShuttingDown) => {
error!("compositor shouldn't be handling messages after shutting down");
- return false
- }
+ return false;
+ },
(Msg::ShutdownComplete, _) => {
self.finish_shutting_down();
return false;
- }
+ },
- (Msg::ChangeRunningAnimationsState(pipeline_id, animation_state),
- ShutdownState::NotShuttingDown) => {
+ (
+ Msg::ChangeRunningAnimationsState(pipeline_id, animation_state),
+ ShutdownState::NotShuttingDown,
+ ) => {
self.change_running_animations_state(pipeline_id, animation_state);
- }
+ },
- (Msg::SetFrameTree(frame_tree),
- ShutdownState::NotShuttingDown) => {
+ (Msg::SetFrameTree(frame_tree), ShutdownState::NotShuttingDown) => {
self.set_frame_tree(&frame_tree);
self.send_viewport_rects();
- }
+ },
(Msg::Recomposite(reason), ShutdownState::NotShuttingDown) => {
self.composition_request = CompositionRequest::CompositeNow(reason)
- }
-
+ },
(Msg::TouchEventProcessed(result), ShutdownState::NotShuttingDown) => {
self.touch_handler.on_event_processed(result);
- }
+ },
(Msg::CreatePng(reply), ShutdownState::NotShuttingDown) => {
let res = self.composite_specific_target(CompositeTarget::WindowAndPng);
@@ -420,15 +422,20 @@ impl<Window: WindowMethods> IOCompositor<Window> {
if let Err(e) = reply.send(img) {
warn!("Sending reply to create png failed ({}).", e);
}
- }
+ },
- (Msg::ViewportConstrained(pipeline_id, constraints),
- ShutdownState::NotShuttingDown) => {
+ (
+ Msg::ViewportConstrained(pipeline_id, constraints),
+ ShutdownState::NotShuttingDown,
+ ) => {
self.constrain_viewport(pipeline_id, constraints);
- }
+ },
(Msg::IsReadyToSaveImageReply(is_ready), ShutdownState::NotShuttingDown) => {
- assert_eq!(self.ready_to_save_state, ReadyState::WaitingForConstellationReply);
+ assert_eq!(
+ self.ready_to_save_state,
+ ReadyState::WaitingForConstellationReply
+ );
if is_ready {
self.ready_to_save_state = ReadyState::ReadyToSaveImage;
if opts::get().is_running_problem_test {
@@ -441,34 +448,38 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
}
self.composite_if_necessary(CompositingReason::Headless);
- }
+ },
- (Msg::PipelineVisibilityChanged(pipeline_id, visible), ShutdownState::NotShuttingDown) => {
+ (
+ Msg::PipelineVisibilityChanged(pipeline_id, visible),
+ ShutdownState::NotShuttingDown,
+ ) => {
self.pipeline_details(pipeline_id).visible = visible;
if visible {
self.process_animations();
}
- }
+ },
(Msg::PipelineExited(pipeline_id, sender), _) => {
debug!("Compositor got pipeline exited: {:?}", pipeline_id);
self.remove_pipeline_root_layer(pipeline_id);
let _ = sender.send(());
- }
+ },
(Msg::NewScrollFrameReady(recomposite_needed), ShutdownState::NotShuttingDown) => {
self.waiting_for_results_of_scroll = false;
if recomposite_needed {
self.composition_request = CompositionRequest::CompositeNow(
- CompositingReason::NewWebRenderScrollFrame);
+ CompositingReason::NewWebRenderScrollFrame,
+ );
}
- }
+ },
(Msg::Dispatch(func), ShutdownState::NotShuttingDown) => {
// The functions sent here right now are really dumb, so they can't panic.
// But if we start running more complex code here, we should really catch panic here.
func();
- }
+ },
(Msg::LoadComplete(_), ShutdownState::NotShuttingDown) => {
// If we're painting in headless mode, schedule a recomposite.
@@ -479,30 +490,30 @@ impl<Window: WindowMethods> IOCompositor<Window> {
(Msg::PendingPaintMetric(pipeline_id, epoch), _) => {
self.pending_paint_metrics.insert(pipeline_id, epoch);
- }
+ },
(Msg::GetClientWindow(req), ShutdownState::NotShuttingDown) => {
if let Err(e) = req.send(self.embedder_coordinates.window) {
warn!("Sending response to get client window failed ({}).", e);
}
- }
+ },
(Msg::GetScreenSize(req), ShutdownState::NotShuttingDown) => {
if let Err(e) = req.send(self.embedder_coordinates.screen) {
warn!("Sending response to get screen size failed ({}).", e);
}
- }
+ },
(Msg::GetScreenAvailSize(req), ShutdownState::NotShuttingDown) => {
if let Err(e) = req.send(self.embedder_coordinates.screen_avail) {
warn!("Sending response to get screen avail size failed ({}).", e);
}
- }
+ },
// When we are shutting_down, we need to avoid performing operations
// such as Paint that may crash because we have begun tearing down
// the rest of our resources.
- (_, ShutdownState::ShuttingDown) => {}
+ (_, ShutdownState::ShuttingDown) => {},
}
true
@@ -522,42 +533,53 @@ impl<Window: WindowMethods> IOCompositor<Window> {
if visible {
self.composite_if_necessary(CompositingReason::Animation);
}
- }
+ },
AnimationState::AnimationCallbacksPresent => {
let visible = self.pipeline_details(pipeline_id).visible;
- self.pipeline_details(pipeline_id).animation_callbacks_running = true;
+ self.pipeline_details(pipeline_id)
+ .animation_callbacks_running = true;
if visible {
self.tick_animations_for_pipeline(pipeline_id);
}
- }
+ },
AnimationState::NoAnimationsPresent => {
self.pipeline_details(pipeline_id).animations_running = false;
- }
+ },
AnimationState::NoAnimationCallbacksPresent => {
- self.pipeline_details(pipeline_id).animation_callbacks_running = false;
- }
+ self.pipeline_details(pipeline_id)
+ .animation_callbacks_running = false;
+ },
}
}
fn pipeline_details(&mut self, pipeline_id: PipelineId) -> &mut PipelineDetails {
if !self.pipeline_details.contains_key(&pipeline_id) {
- self.pipeline_details.insert(pipeline_id, PipelineDetails::new());
+ self.pipeline_details
+ .insert(pipeline_id, PipelineDetails::new());
}
- self.pipeline_details.get_mut(&pipeline_id).expect("Insert then get failed!")
+ self.pipeline_details
+ .get_mut(&pipeline_id)
+ .expect("Insert then get failed!")
}
pub fn pipeline(&self, pipeline_id: PipelineId) -> Option<&CompositionPipeline> {
match self.pipeline_details.get(&pipeline_id) {
Some(ref details) => details.pipeline.as_ref(),
None => {
- warn!("Compositor layer has an unknown pipeline ({:?}).", pipeline_id);
+ warn!(
+ "Compositor layer has an unknown pipeline ({:?}).",
+ pipeline_id
+ );
None
- }
+ },
}
}
fn set_frame_tree(&mut self, frame_tree: &SendableFrameTree) {
- debug!("Setting the frame tree for pipeline {}", frame_tree.pipeline.id);
+ debug!(
+ "Setting the frame tree for pipeline {}",
+ frame_tree.pipeline.id
+ );
self.root_pipeline = Some(frame_tree.pipeline.clone());
@@ -565,7 +587,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
let mut txn = webrender_api::Transaction::new();
txn.set_root_pipeline(pipeline_id);
txn.generate_frame();
- self.webrender_api.send_transaction(self.webrender_document, txn);
+ self.webrender_api
+ .send_transaction(self.webrender_document, txn);
self.create_pipeline_details_for_frame_tree(&frame_tree);
@@ -589,10 +612,12 @@ impl<Window: WindowMethods> IOCompositor<Window> {
fn send_window_size(&self, size_type: WindowSizeType) {
let dppx = self.page_zoom * self.embedder_coordinates.hidpi_factor;
- self.webrender_api.set_window_parameters(self.webrender_document,
- self.embedder_coordinates.framebuffer,
- self.embedder_coordinates.viewport,
- self.embedder_coordinates.hidpi_factor.get());
+ self.webrender_api.set_window_parameters(
+ self.webrender_document,
+ self.embedder_coordinates.framebuffer,
+ self.embedder_coordinates.viewport,
+ self.embedder_coordinates.hidpi_factor.get(),
+ );
let initial_viewport = self.embedder_coordinates.viewport.size.to_f32() / dppx;
@@ -601,9 +626,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
initial_viewport: initial_viewport,
};
- let top_level_browsing_context_id = self.root_pipeline.as_ref().map(|pipeline| {
- pipeline.top_level_browsing_context_id
- });
+ let top_level_browsing_context_id = self
+ .root_pipeline
+ .as_ref()
+ .map(|pipeline| pipeline.top_level_browsing_context_id);
let msg = ConstellationMsg::WindowSize(top_level_browsing_context_id, data, size_type);
@@ -624,7 +650,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
if self.embedder_coordinates.viewport == old_coords.viewport &&
- self.embedder_coordinates.framebuffer == old_coords.framebuffer {
+ self.embedder_coordinates.framebuffer == old_coords.framebuffer
+ {
return;
}
@@ -634,11 +661,11 @@ impl<Window: WindowMethods> IOCompositor<Window> {
pub fn on_mouse_window_event_class(&mut self, mouse_window_event: MouseWindowEvent) {
if opts::get().convert_mouse_to_touch {
match mouse_window_event {
- MouseWindowEvent::Click(_, _) => {}
+ MouseWindowEvent::Click(_, _) => {},
MouseWindowEvent::MouseDown(_, p) => self.on_touch_down(TouchId(0), p),
MouseWindowEvent::MouseUp(_, p) => self.on_touch_up(TouchId(0), p),
}
- return
+ return;
}
self.dispatch_mouse_window_event_class(mouse_window_event);
@@ -687,15 +714,14 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.webrender_document,
None,
world_cursor,
- HitTestFlags::empty()
+ HitTestFlags::empty(),
)
-
}
pub fn on_mouse_window_move_event_class(&mut self, cursor: DevicePoint) {
if opts::get().convert_mouse_to_touch {
self.on_touch_move(TouchId(0), cursor);
- return
+ return;
}
self.dispatch_mouse_window_move_event_class(cursor);
@@ -720,7 +746,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
warn!("Sending event to constellation failed ({}).", e);
}
- if let Some(cursor) = CursorKind::from_u8(item.tag.1 as _).ok() {
+ if let Some(cursor) = CursorKind::from_u8(item.tag.1 as _).ok() {
let msg = ConstellationMsg::SetCursor(cursor);
if let Err(e) = self.constellation_chan.send(msg) {
warn!("Sending event to constellation failed ({}).", e);
@@ -733,8 +759,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
&self,
event_type: TouchEventType,
identifier: TouchId,
- point: DevicePoint)
- {
+ point: DevicePoint,
+ ) {
let results = self.hit_test_at_point(point);
if let Some(item) = results.items.first() {
let event = TouchEvent(
@@ -751,10 +777,12 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
}
- pub fn on_touch_event(&mut self,
- event_type: TouchEventType,
- identifier: TouchId,
- location: DevicePoint) {
+ pub fn on_touch_event(
+ &mut self,
+ event_type: TouchEventType,
+ identifier: TouchId,
+ location: DevicePoint,
+ ) {
match event_type {
TouchEventType::Down => self.on_touch_down(identifier, location),
TouchEventType::Move => self.on_touch_move(identifier, location),
@@ -770,28 +798,25 @@ impl<Window: WindowMethods> IOCompositor<Window> {
fn on_touch_move(&mut self, identifier: TouchId, point: DevicePoint) {
match self.touch_handler.on_touch_move(identifier, point) {
- TouchAction::Scroll(delta) => {
- self.on_scroll_window_event(
- ScrollLocation::Delta(
- LayoutVector2D::from_untyped(&delta.to_untyped())
- ),
- point.cast()
- )
- }
+ TouchAction::Scroll(delta) => self.on_scroll_window_event(
+ ScrollLocation::Delta(LayoutVector2D::from_untyped(&delta.to_untyped())),
+ point.cast(),
+ ),
TouchAction::Zoom(magnification, scroll_delta) => {
- let cursor = TypedPoint2D::new(-1, -1); // Make sure this hits the base layer.
+ let cursor = TypedPoint2D::new(-1, -1); // Make sure this hits the base layer.
self.pending_scroll_zoom_events.push(ScrollZoomEvent {
magnification: magnification,
- scroll_location: ScrollLocation::Delta(webrender_api::LayoutVector2D::from_untyped(
- &scroll_delta.to_untyped())),
+ scroll_location: ScrollLocation::Delta(
+ webrender_api::LayoutVector2D::from_untyped(&scroll_delta.to_untyped()),
+ ),
cursor: cursor,
event_count: 1,
});
- }
+ },
TouchAction::DispatchEvent => {
self.send_touch_event(TouchEventType::Move, identifier, point);
- }
- _ => {}
+ },
+ _ => {},
}
}
@@ -818,24 +843,24 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.dispatch_mouse_window_event_class(MouseWindowEvent::Click(button, p));
}
- pub fn on_scroll_event(&mut self,
- delta: ScrollLocation,
- cursor: DeviceIntPoint,
- phase: TouchEventType) {
+ pub fn on_scroll_event(
+ &mut self,
+ delta: ScrollLocation,
+ cursor: DeviceIntPoint,
+ phase: TouchEventType,
+ ) {
match phase {
TouchEventType::Move => self.on_scroll_window_event(delta, cursor),
TouchEventType::Up | TouchEventType::Cancel => {
self.on_scroll_end_window_event(delta, cursor);
- }
+ },
TouchEventType::Down => {
self.on_scroll_start_window_event(delta, cursor);
- }
+ },
}
}
- fn on_scroll_window_event(&mut self,
- scroll_location: ScrollLocation,
- cursor: DeviceIntPoint) {
+ fn on_scroll_window_event(&mut self, scroll_location: ScrollLocation, cursor: DeviceIntPoint) {
self.in_scroll_transaction = Some(Instant::now());
self.pending_scroll_zoom_events.push(ScrollZoomEvent {
magnification: 1.0,
@@ -845,9 +870,11 @@ impl<Window: WindowMethods> IOCompositor<Window> {
});
}
- fn on_scroll_start_window_event(&mut self,
- scroll_location: ScrollLocation,
- cursor: DeviceIntPoint) {
+ fn on_scroll_start_window_event(
+ &mut self,
+ scroll_location: ScrollLocation,
+ cursor: DeviceIntPoint,
+ ) {
self.scroll_in_progress = true;
self.pending_scroll_zoom_events.push(ScrollZoomEvent {
magnification: 1.0,
@@ -857,9 +884,11 @@ impl<Window: WindowMethods> IOCompositor<Window> {
});
}
- fn on_scroll_end_window_event(&mut self,
- scroll_location: ScrollLocation,
- cursor: DeviceIntPoint) {
+ fn on_scroll_end_window_event(
+ &mut self,
+ scroll_location: ScrollLocation,
+ cursor: DeviceIntPoint,
+ ) {
self.scroll_in_progress = false;
self.pending_scroll_zoom_events.push(ScrollZoomEvent {
magnification: 1.0,
@@ -884,19 +913,20 @@ impl<Window: WindowMethods> IOCompositor<Window> {
// disregard other pending events and exit the loop.
last_combined_event = Some(scroll_event);
break;
- }
+ },
};
match &mut last_combined_event {
last_combined_event @ &mut None => {
*last_combined_event = Some(ScrollZoomEvent {
magnification: scroll_event.magnification,
- scroll_location: ScrollLocation::Delta(webrender_api::LayoutVector2D::from_untyped(
- &this_delta.to_untyped())),
+ scroll_location: ScrollLocation::Delta(
+ webrender_api::LayoutVector2D::from_untyped(&this_delta.to_untyped()),
+ ),
cursor: this_cursor,
event_count: 1,
})
- }
+ },
&mut Some(ref mut last_combined_event) => {
// Mac OS X sometimes delivers scroll events out of vsync during a
// fling. This causes events to get bunched up occasionally, causing
@@ -909,21 +939,23 @@ impl<Window: WindowMethods> IOCompositor<Window> {
let new_event_count =
TypedScale::new(last_combined_event.event_count as f32);
last_combined_event.scroll_location = ScrollLocation::Delta(
- (delta * old_event_count + this_delta) /
- new_event_count);
+ (delta * old_event_count + this_delta) / new_event_count,
+ );
}
last_combined_event.magnification *= scroll_event.magnification;
- }
+ },
}
}
if let Some(combined_event) = last_combined_event {
let scroll_location = match combined_event.scroll_location {
ScrollLocation::Delta(delta) => {
- let scaled_delta = (TypedVector2D::from_untyped(&delta.to_untyped()) / self.scale)
- .to_untyped();
- let calculated_delta = webrender_api::LayoutVector2D::from_untyped(&scaled_delta);
- ScrollLocation::Delta(calculated_delta)
+ let scaled_delta = (TypedVector2D::from_untyped(&delta.to_untyped()) /
+ self.scale)
+ .to_untyped();
+ let calculated_delta =
+ webrender_api::LayoutVector2D::from_untyped(&scaled_delta);
+ ScrollLocation::Delta(calculated_delta)
},
// Leave ScrollLocation unchanged if it is Start or End location.
sl @ ScrollLocation::Start | sl @ ScrollLocation::End => sl,
@@ -938,7 +970,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
txn.set_pinch_zoom(webrender_api::ZoomFactor::new(self.pinch_zoom_level()));
}
txn.generate_frame();
- self.webrender_api.send_transaction(self.webrender_document, txn);
+ self.webrender_api
+ .send_transaction(self.webrender_document, txn);
self.waiting_for_results_of_scroll = true
}
@@ -951,10 +984,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
fn process_animations(&mut self) {
let mut pipeline_ids = vec![];
for (pipeline_id, pipeline_details) in &self.pipeline_details {
- if (pipeline_details.animations_running ||
- pipeline_details.animation_callbacks_running) &&
- pipeline_details.visible {
- pipeline_ids.push(*pipeline_id);
+ if (pipeline_details.animations_running || pipeline_details.animation_callbacks_running) &&
+ pipeline_details.visible
+ {
+ pipeline_ids.push(*pipeline_id);
}
}
let animation_state = if pipeline_ids.is_empty() {
@@ -969,7 +1002,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
fn tick_animations_for_pipeline(&mut self, pipeline_id: PipelineId) {
- let animation_callbacks_running = self.pipeline_details(pipeline_id).animation_callbacks_running;
+ let animation_callbacks_running = self
+ .pipeline_details(pipeline_id)
+ .animation_callbacks_running;
if animation_callbacks_running {
let msg = ConstellationMsg::TickAnimation(pipeline_id, AnimationTickType::Script);
if let Err(e) = self.constellation_chan.send(msg) {
@@ -988,9 +1023,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
fn constrain_viewport(&mut self, pipeline_id: PipelineId, constraints: ViewportConstraints) {
- let is_root = self.root_pipeline.as_ref().map_or(false, |root_pipeline| {
- root_pipeline.id == pipeline_id
- });
+ let is_root = self
+ .root_pipeline
+ .as_ref()
+ .map_or(false, |root_pipeline| root_pipeline.id == pipeline_id);
if is_root {
self.viewport_zoom = constraints.initial_zoom;
@@ -1006,7 +1042,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
None => match opts::get().output_file {
Some(_) => TypedScale::new(1.0),
None => self.embedder_coordinates.hidpi_factor,
- }
+ },
}
}
@@ -1027,8 +1063,11 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
pub fn on_zoom_window_event(&mut self, magnification: f32) {
- self.page_zoom = TypedScale::new((self.page_zoom.get() * magnification)
- .max(MIN_ZOOM).min(MAX_ZOOM));
+ self.page_zoom = TypedScale::new(
+ (self.page_zoom.get() * magnification)
+ .max(MIN_ZOOM)
+ .min(MAX_ZOOM),
+ );
self.update_zoom_transform();
self.send_window_size(WindowSizeType::Resize);
self.update_page_zoom_for_webrender();
@@ -1039,7 +1078,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
let mut txn = webrender_api::Transaction::new();
txn.set_page_zoom(page_zoom);
- self.webrender_api.send_transaction(self.webrender_document, txn);
+ self.webrender_api
+ .send_transaction(self.webrender_document, txn);
}
/// Simulate a pinch zoom
@@ -1047,14 +1087,17 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.pending_scroll_zoom_events.push(ScrollZoomEvent {
magnification: magnification,
scroll_location: ScrollLocation::Delta(TypedVector2D::zero()), // TODO: Scroll to keep the center in view?
- cursor: TypedPoint2D::new(-1, -1), // Make sure this hits the base layer.
+ cursor: TypedPoint2D::new(-1, -1), // Make sure this hits the base layer.
event_count: 1,
});
}
fn send_viewport_rects(&self) {
let mut scroll_states_per_pipeline = HashMap::new();
- for scroll_layer_state in self.webrender_api.get_scroll_node_state(self.webrender_document) {
+ for scroll_layer_state in self
+ .webrender_api
+ .get_scroll_node_state(self.webrender_document)
+ {
let scroll_state = ScrollState {
scroll_id: scroll_layer_state.id,
scroll_offset: scroll_layer_state.scroll_offset.to_untyped(),
@@ -1105,8 +1148,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
let mut pipeline_epochs = HashMap::new();
for (id, _) in &self.pipeline_details {
let webrender_pipeline_id = id.to_webrender();
- if let Some(webrender_api::Epoch(epoch)) = self.webrender
- .current_epoch(webrender_pipeline_id) {
+ if let Some(webrender_api::Epoch(epoch)) =
+ self.webrender.current_epoch(webrender_pipeline_id)
+ {
let epoch = Epoch(epoch);
pipeline_epochs.insert(*id, epoch);
}
@@ -1120,12 +1164,12 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
self.ready_to_save_state = ReadyState::WaitingForConstellationReply;
Err(NotReadyToPaint::JustNotifiedConstellation)
- }
+ },
ReadyState::WaitingForConstellationReply => {
// If waiting on a reply from the constellation to the last
// query if the image is stable, then assume not ready yet.
Err(NotReadyToPaint::WaitingOnConstellation)
- }
+ },
ReadyState::ReadyToSaveImage => {
// Constellation has replied at some point in the past
// that the current output image is stable and ready
@@ -1137,7 +1181,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
self.ready_to_save_state = ReadyState::Unknown;
Ok(())
- }
+ },
}
}
@@ -1149,7 +1193,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.start_shutting_down();
},
Err(e) => if opts::get().is_running_problem_test {
- if e != UnableToComposite::NotReadyToPaintImage(NotReadyToPaint::WaitingOnConstellation) {
+ if e != UnableToComposite::NotReadyToPaintImage(
+ NotReadyToPaint::WaitingOnConstellation,
+ ) {
println!("not ready to composite: {:?}", e);
}
},
@@ -1161,13 +1207,14 @@ impl<Window: WindowMethods> IOCompositor<Window> {
/// for some reason. If CompositeTarget is Window or Png no image data is returned;
/// in the latter case the image is written directly to a file. If CompositeTarget
/// is WindowAndPng Ok(Some(png::Image)) is returned.
- fn composite_specific_target(&mut self,
- target: CompositeTarget)
- -> Result<Option<Image>, UnableToComposite> {
+ fn composite_specific_target(
+ &mut self,
+ target: CompositeTarget,
+ ) -> Result<Option<Image>, UnableToComposite> {
let width = self.embedder_coordinates.framebuffer.width_typed();
let height = self.embedder_coordinates.framebuffer.height_typed();
if !self.window.prepare_for_composite(width, height) {
- return Err(UnableToComposite::WindowUnprepared)
+ return Err(UnableToComposite::WindowUnprepared);
}
self.webrender.update();
@@ -1183,34 +1230,40 @@ impl<Window: WindowMethods> IOCompositor<Window> {
// all active animations to complete.
if self.animations_active() {
self.process_animations();
- return Err(UnableToComposite::NotReadyToPaintImage(NotReadyToPaint::AnimationsActive));
+ return Err(UnableToComposite::NotReadyToPaintImage(
+ NotReadyToPaint::AnimationsActive,
+ ));
}
if let Err(result) = self.is_ready_to_paint_image_output() {
- return Err(UnableToComposite::NotReadyToPaintImage(result))
+ return Err(UnableToComposite::NotReadyToPaintImage(result));
}
}
let rt_info = match target {
#[cfg(feature = "gleam")]
- CompositeTarget::Window => {
- gl::RenderTargetInfo::default()
- }
+ CompositeTarget::Window => gl::RenderTargetInfo::default(),
#[cfg(feature = "gleam")]
- CompositeTarget::WindowAndPng |
- CompositeTarget::PngFile => {
+ CompositeTarget::WindowAndPng | CompositeTarget::PngFile => {
gl::initialize_png(&*self.window.gl(), width, height)
- }
+ },
#[cfg(not(feature = "gleam"))]
- _ => ()
+ _ => (),
};
- profile(ProfilerCategory::Compositing, None, self.time_profiler_chan.clone(), || {
- debug!("compositor: compositing");
-
- // Paint the scene.
- // TODO(gw): Take notice of any errors the renderer returns!
- self.webrender.render(self.embedder_coordinates.framebuffer).ok();
- });
+ profile(
+ ProfilerCategory::Compositing,
+ None,
+ self.time_profiler_chan.clone(),
+ || {
+ debug!("compositor: compositing");
+
+ // Paint the scene.
+ // TODO(gw): Take notice of any errors the renderer returns!
+ self.webrender
+ .render(self.embedder_coordinates.framebuffer)
+ .ok();
+ },
+ );
// If there are pending paint metrics, we check if any of the painted epochs is
// one of the ones that the paint metrics recorder is expecting . In that case,
@@ -1222,7 +1275,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
// For each pending paint metrics pipeline id
for (id, pending_epoch) in &self.pending_paint_metrics {
// we get the last painted frame id from webrender
- if let Some(webrender_api::Epoch(epoch)) = self.webrender.current_epoch(id.to_webrender()) {
+ if let Some(webrender_api::Epoch(epoch)) =
+ self.webrender.current_epoch(id.to_webrender())
+ {
// and check if it is the one the layout thread is expecting,
let epoch = Epoch(epoch);
if *pending_epoch != epoch {
@@ -1233,7 +1288,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
if let Some(pipeline) = self.pipeline(*id) {
// and inform the layout thread with the measured paint time.
let msg = LayoutControlMsg::PaintMetric(epoch, paint_time);
- if let Err(e) = pipeline.layout_chan.send(msg) {
+ if let Err(e) = pipeline.layout_chan.send(msg) {
warn!("Sending PaintMetric message to layout failed ({}).", e);
}
}
@@ -1256,27 +1311,31 @@ impl<Window: WindowMethods> IOCompositor<Window> {
bytes: ipc::IpcSharedMemory::from_bytes(&*img),
id: None,
})
- }
+ },
#[cfg(feature = "gleam")]
CompositeTarget::PngFile => {
let gl = &*self.window.gl();
- profile(ProfilerCategory::ImageSaving, None, self.time_profiler_chan.clone(), || {
- match opts::get().output_file.as_ref() {
+ profile(
+ ProfilerCategory::ImageSaving,
+ None,
+ self.time_profiler_chan.clone(),
+ || match opts::get().output_file.as_ref() {
Some(path) => match File::create(path) {
Ok(mut file) => {
let img = gl::draw_img(gl, rt_info, width, height);
let dynamic_image = DynamicImage::ImageRgb8(img);
- if let Err(e) = dynamic_image.write_to(&mut file, ImageFormat::PNG) {
+ if let Err(e) = dynamic_image.write_to(&mut file, ImageFormat::PNG)
+ {
error!("Failed to save {} ({}).", path, e);
}
},
Err(e) => error!("Failed to create {} ({}).", path, e),
},
None => error!("No file specified."),
- }
- });
+ },
+ );
None
- }
+ },
#[cfg(not(feature = "gleam"))]
_ => None,
};
@@ -1301,7 +1360,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
self.composition_request = CompositionRequest::CompositeNow(reason)
} else if opts::get().is_running_problem_test {
- println!("composition_request is already {:?}", self.composition_request);
+ println!(
+ "composition_request is already {:?}",
+ self.composition_request
+ );
}
}
@@ -1315,17 +1377,17 @@ impl<Window: WindowMethods> IOCompositor<Window> {
let mut found_recomposite_msg = false;
while let Some(msg) = self.port.try_recv_compositor_msg() {
match msg {
- Msg::Recomposite(_) if found_recomposite_msg => {}
+ Msg::Recomposite(_) if found_recomposite_msg => {},
Msg::Recomposite(_) => {
found_recomposite_msg = true;
compositor_messages.push(msg)
- }
+ },
_ => compositor_messages.push(msg),
}
}
for msg in compositor_messages {
if !self.handle_browser_message(msg) {
- return false
+ return false;
}
}
true
@@ -1342,10 +1404,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
match self.composition_request {
- CompositionRequest::NoCompositingNecessary => {}
- CompositionRequest::CompositeNow(_) => {
- self.composite()
- }
+ CompositionRequest::NoCompositingNecessary => {},
+ CompositionRequest::CompositeNow(_) => self.composite(),
}
if !self.pending_scroll_zoom_events.is_empty() && !self.waiting_for_results_of_scroll {
@@ -1368,10 +1428,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
let keep_going = self.handle_browser_message(msg);
if need_recomposite {
self.composite();
- break
+ break;
}
if !keep_going {
- break
+ break;
}
}
}
@@ -1395,44 +1455,47 @@ impl<Window: WindowMethods> IOCompositor<Window> {
let flag = match option {
WebRenderDebugOption::Profiler => {
webrender::DebugFlags::PROFILER_DBG |
- webrender::DebugFlags::GPU_TIME_QUERIES |
- webrender::DebugFlags::GPU_SAMPLE_QUERIES
- }
- WebRenderDebugOption::TextureCacheDebug => {
- webrender::DebugFlags::TEXTURE_CACHE_DBG
- }
- WebRenderDebugOption::RenderTargetDebug => {
- webrender::DebugFlags::RENDER_TARGET_DBG
- }
+ webrender::DebugFlags::GPU_TIME_QUERIES |
+ webrender::DebugFlags::GPU_SAMPLE_QUERIES
+ },
+ WebRenderDebugOption::TextureCacheDebug => webrender::DebugFlags::TEXTURE_CACHE_DBG,
+ WebRenderDebugOption::RenderTargetDebug => webrender::DebugFlags::RENDER_TARGET_DBG,
};
flags.toggle(flag);
self.webrender.set_debug_flags(flags);
let mut txn = webrender_api::Transaction::new();
txn.generate_frame();
- self.webrender_api.send_transaction(self.webrender_document, txn);
+ self.webrender_api
+ .send_transaction(self.webrender_document, txn);
}
pub fn capture_webrender(&mut self) {
let capture_id = now().to_timespec().sec.to_string();
- let available_path = [env::current_dir(), Ok(env::temp_dir())].iter()
- .filter_map(|val| val.as_ref().map(|dir| dir.join("capture_webrender").join(&capture_id)).ok())
- .find(|val| {
- match create_dir_all(&val) {
- Ok(_) => true,
- Err(err) => {
- eprintln!("Unable to create path '{:?}' for capture: {:?}", &val, err);
- false
- }
- }
+ let available_path = [env::current_dir(), Ok(env::temp_dir())]
+ .iter()
+ .filter_map(|val| {
+ val.as_ref()
+ .map(|dir| dir.join("capture_webrender").join(&capture_id))
+ .ok()
+ }).find(|val| match create_dir_all(&val) {
+ Ok(_) => true,
+ Err(err) => {
+ eprintln!("Unable to create path '{:?}' for capture: {:?}", &val, err);
+ false
+ },
});
match available_path {
Some(capture_path) => {
let revision_file_path = capture_path.join("wr.txt");
- debug!("Trying to save webrender capture under {:?}", &revision_file_path);
- self.webrender_api.save_capture(capture_path, webrender_api::CaptureBits::all());
+ debug!(
+ "Trying to save webrender capture under {:?}",
+ &revision_file_path
+ );
+ self.webrender_api
+ .save_capture(capture_path, webrender_api::CaptureBits::all());
match File::create(revision_file_path) {
Ok(mut file) => {
@@ -1440,11 +1503,14 @@ impl<Window: WindowMethods> IOCompositor<Window> {
if let Err(err) = write!(&mut file, "{}", revision) {
eprintln!("Unable to write webrender revision: {:?}", err)
}
- }
- Err(err) => eprintln!("Capture triggered, creating webrender revision info skipped: {:?}", err)
+ },
+ Err(err) => eprintln!(
+ "Capture triggered, creating webrender revision info skipped: {:?}",
+ err
+ ),
}
},
- None => eprintln!("Unable to locate path to save captures")
+ None => eprintln!("Unable to locate path to save captures"),
}
}
}
diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs
index 15fd4d31cd6..9ea2f73ab35 100644
--- a/components/compositing/compositor_thread.rs
+++ b/components/compositing/compositor_thread.rs
@@ -20,7 +20,6 @@ use style_traits::viewport::ViewportConstraints;
use webrender;
use webrender_api::{self, DeviceIntPoint, DeviceUintSize};
-
/// Sends messages to the compositor.
pub struct CompositorProxy {
pub sender: Sender<Msg>,
@@ -48,7 +47,7 @@ impl Clone for CompositorProxy {
/// The port that the compositor receives messages on.
pub struct CompositorReceiver {
- pub receiver: Receiver<Msg>
+ pub receiver: Receiver<Msg>,
}
impl CompositorReceiver {
diff --git a/components/compositing/gl.rs b/components/compositing/gl.rs
index 4c7f1261fbe..6637ef203ea 100644
--- a/components/compositing/gl.rs
+++ b/components/compositing/gl.rs
@@ -2,12 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
use gleam::gl;
use image::RgbImage;
use servo_geometry::DeviceUintLength;
-
#[derive(Default)]
pub struct RenderTargetInfo {
framebuffer_ids: Vec<gl::GLuint>,
@@ -16,7 +14,9 @@ pub struct RenderTargetInfo {
}
pub fn initialize_png(
- gl: &gl::Gl, width: DeviceUintLength, height: DeviceUintLength
+ gl: &gl::Gl,
+ width: DeviceUintLength,
+ height: DeviceUintLength,
) -> RenderTargetInfo {
let framebuffer_ids = gl.gen_framebuffers(1);
gl.bind_framebuffer(gl::FRAMEBUFFER, framebuffer_ids[0]);
@@ -24,27 +24,53 @@ pub fn initialize_png(
let texture_ids = gl.gen_textures(1);
gl.bind_texture(gl::TEXTURE_2D, texture_ids[0]);
- gl.tex_image_2d(gl::TEXTURE_2D, 0, gl::RGB as gl::GLint, width.get() as gl::GLsizei,
- height.get() as gl::GLsizei, 0, gl::RGB, gl::UNSIGNED_BYTE, None);
- gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::NEAREST as gl::GLint);
- gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::NEAREST as gl::GLint);
+ gl.tex_image_2d(
+ gl::TEXTURE_2D,
+ 0,
+ gl::RGB as gl::GLint,
+ width.get() as gl::GLsizei,
+ height.get() as gl::GLsizei,
+ 0,
+ gl::RGB,
+ gl::UNSIGNED_BYTE,
+ None,
+ );
+ gl.tex_parameter_i(
+ gl::TEXTURE_2D,
+ gl::TEXTURE_MAG_FILTER,
+ gl::NEAREST as gl::GLint,
+ );
+ gl.tex_parameter_i(
+ gl::TEXTURE_2D,
+ gl::TEXTURE_MIN_FILTER,
+ gl::NEAREST as gl::GLint,
+ );
- gl.framebuffer_texture_2d(gl::FRAMEBUFFER, gl::COLOR_ATTACHMENT0, gl::TEXTURE_2D,
- texture_ids[0], 0);
+ gl.framebuffer_texture_2d(
+ gl::FRAMEBUFFER,
+ gl::COLOR_ATTACHMENT0,
+ gl::TEXTURE_2D,
+ texture_ids[0],
+ 0,
+ );
gl.bind_texture(gl::TEXTURE_2D, 0);
let renderbuffer_ids = gl.gen_renderbuffers(1);
let depth_rb = renderbuffer_ids[0];
gl.bind_renderbuffer(gl::RENDERBUFFER, depth_rb);
- gl.renderbuffer_storage(gl::RENDERBUFFER,
- gl::DEPTH_COMPONENT24,
- width.get() as gl::GLsizei,
- height.get() as gl::GLsizei);
- gl.framebuffer_renderbuffer(gl::FRAMEBUFFER,
- gl::DEPTH_ATTACHMENT,
- gl::RENDERBUFFER,
- depth_rb);
+ gl.renderbuffer_storage(
+ gl::RENDERBUFFER,
+ gl::DEPTH_COMPONENT24,
+ width.get() as gl::GLsizei,
+ height.get() as gl::GLsizei,
+ );
+ gl.framebuffer_renderbuffer(
+ gl::FRAMEBUFFER,
+ gl::DEPTH_ATTACHMENT,
+ gl::RENDERBUFFER,
+ depth_rb,
+ );
RenderTargetInfo {
framebuffer_ids,
@@ -70,10 +96,12 @@ pub fn draw_img(
gl.bind_vertex_array(0);
let mut pixels = gl.read_pixels(
- 0, 0,
+ 0,
+ 0,
width as gl::GLsizei,
height as gl::GLsizei,
- gl::RGB, gl::UNSIGNED_BYTE,
+ gl::RGB,
+ gl::UNSIGNED_BYTE,
);
gl.bind_framebuffer(gl::FRAMEBUFFER, 0);
@@ -88,10 +116,9 @@ pub fn draw_img(
for y in 0..height {
let dst_start = y * stride;
let src_start = (height - y - 1) * stride;
- let src_slice = &orig_pixels[src_start .. src_start + stride];
- (&mut pixels[dst_start .. dst_start + stride]).clone_from_slice(&src_slice[..stride]);
+ let src_slice = &orig_pixels[src_start..src_start + stride];
+ (&mut pixels[dst_start..dst_start + stride]).clone_from_slice(&src_slice[..stride]);
}
- RgbImage::from_raw(width as u32, height as u32, pixels)
- .expect("Flipping image failed!")
+ RgbImage::from_raw(width as u32, height as u32, pixels).expect("Flipping image failed!")
}
diff --git a/components/compositing/touch.rs b/components/compositing/touch.rs
index fd4877ead75..28a2588a91f 100644
--- a/components/compositing/touch.rs
+++ b/components/compositing/touch.rs
@@ -19,12 +19,15 @@ pub struct TouchHandler {
#[derive(Clone, Copy, Debug)]
pub struct TouchPoint {
pub id: TouchId,
- pub point: TypedPoint2D<f32, DevicePixel>
+ pub point: TypedPoint2D<f32, DevicePixel>,
}
impl TouchPoint {
pub fn new(id: TouchId, point: TypedPoint2D<f32, DevicePixel>) -> Self {
- TouchPoint { id: id, point: point }
+ TouchPoint {
+ id: id,
+ point: point,
+ }
}
}
@@ -79,22 +82,25 @@ impl TouchHandler {
self.active_touch_points.push(point);
self.state = match self.state {
- Nothing => WaitingForScript,
- Touching | Panning => Pinching,
- WaitingForScript => WaitingForScript,
- DefaultPrevented => DefaultPrevented,
+ Nothing => WaitingForScript,
+ Touching | Panning => Pinching,
+ WaitingForScript => WaitingForScript,
+ DefaultPrevented => DefaultPrevented,
Pinching | MultiTouch => MultiTouch,
};
}
- pub fn on_touch_move(&mut self, id: TouchId, point: TypedPoint2D<f32, DevicePixel>)
- -> TouchAction {
+ pub fn on_touch_move(
+ &mut self,
+ id: TouchId,
+ point: TypedPoint2D<f32, DevicePixel>,
+ ) -> TouchAction {
let idx = match self.active_touch_points.iter_mut().position(|t| t.id == id) {
Some(i) => i,
None => {
warn!("Got a touchmove event for a non-active touch point");
return TouchAction::NoAction;
- }
+ },
};
let old_point = self.active_touch_points[idx].point;
@@ -103,21 +109,19 @@ impl TouchHandler {
let delta = point - old_point;
if delta.x.abs() > TOUCH_PAN_MIN_SCREEN_PX ||
- delta.y.abs() > TOUCH_PAN_MIN_SCREEN_PX
+ delta.y.abs() > TOUCH_PAN_MIN_SCREEN_PX
{
self.state = Panning;
TouchAction::Scroll(delta)
} else {
TouchAction::NoAction
}
- }
+ },
Panning => {
let delta = point - old_point;
TouchAction::Scroll(delta)
- }
- DefaultPrevented => {
- TouchAction::DispatchEvent
- }
+ },
+ DefaultPrevented => TouchAction::DispatchEvent,
Pinching => {
let (d0, c0) = self.pinch_distance_and_center();
self.active_touch_points[idx].point = point;
@@ -127,7 +131,7 @@ impl TouchHandler {
let scroll_delta = c1 - c0 * TypedScale::new(magnification);
TouchAction::Zoom(magnification, scroll_delta)
- }
+ },
WaitingForScript => TouchAction::NoAction,
MultiTouch => TouchAction::NoAction,
Nothing => unreachable!(),
@@ -141,15 +145,18 @@ impl TouchHandler {
action
}
- pub fn on_touch_up(&mut self, id: TouchId, _point: TypedPoint2D<f32, DevicePixel>)
- -> TouchAction {
+ pub fn on_touch_up(
+ &mut self,
+ id: TouchId,
+ _point: TypedPoint2D<f32, DevicePixel>,
+ ) -> TouchAction {
match self.active_touch_points.iter().position(|t| t.id == id) {
Some(i) => {
self.active_touch_points.swap_remove(i);
- }
+ },
None => {
warn!("Got a touch up event for a non-active touch point");
- }
+ },
}
match self.state {
Touching => {
@@ -157,21 +164,21 @@ impl TouchHandler {
// FIXME: Don't send a click if preventDefault is called on the touchend event.
self.state = Nothing;
TouchAction::Click
- }
+ },
Nothing | Panning => {
self.state = Nothing;
TouchAction::NoAction
- }
+ },
Pinching => {
self.state = Panning;
TouchAction::NoAction
- }
+ },
WaitingForScript | DefaultPrevented | MultiTouch => {
if self.active_touch_points.is_empty() {
self.state = Nothing;
}
TouchAction::NoAction
- }
+ },
}
}
@@ -179,25 +186,25 @@ impl TouchHandler {
match self.active_touch_points.iter().position(|t| t.id == id) {
Some(i) => {
self.active_touch_points.swap_remove(i);
- }
+ },
None => {
warn!("Got a touchcancel event for a non-active touch point");
return;
- }
+ },
}
match self.state {
- Nothing => {}
+ Nothing => {},
Touching | Panning => {
self.state = Nothing;
- }
+ },
Pinching => {
self.state = Panning;
- }
+ },
WaitingForScript | DefaultPrevented | MultiTouch => {
if self.active_touch_points.is_empty() {
self.state = Nothing;
}
- }
+ },
}
}
@@ -209,7 +216,7 @@ impl TouchHandler {
1 => Touching,
2 => Pinching,
_ => MultiTouch,
- }
+ },
}
}
}
diff --git a/components/config/basedir.rs b/components/config/basedir.rs
index c0970ce9770..562f049bbd2 100644
--- a/components/config/basedir.rs
+++ b/components/config/basedir.rs
@@ -8,7 +8,12 @@
use std::path::PathBuf;
-#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
+#[cfg(all(
+ unix,
+ not(target_os = "macos"),
+ not(target_os = "ios"),
+ not(target_os = "android")
+))]
pub fn default_config_dir() -> Option<PathBuf> {
let mut config_dir = ::dirs::config_dir().unwrap();
config_dir.push("servo");
diff --git a/components/config/lib.rs b/components/config/lib.rs
index c5aac6e9f70..d1a63520f11 100644
--- a/components/config/lib.rs
+++ b/components/config/lib.rs
@@ -9,17 +9,21 @@ extern crate dirs;
extern crate embedder_traits;
extern crate euclid;
extern crate getopts;
-#[macro_use] extern crate lazy_static;
-#[macro_use] extern crate log;
+#[macro_use]
+extern crate lazy_static;
+#[macro_use]
+extern crate log;
extern crate num_cpus;
extern crate rustc_serialize;
-#[macro_use] extern crate serde;
+#[macro_use]
+extern crate serde;
extern crate servo_geometry;
extern crate servo_url;
extern crate url;
pub mod basedir;
-#[allow(unsafe_code)] pub mod opts;
+#[allow(unsafe_code)]
+pub mod opts;
pub mod prefs;
pub fn servo_version() -> String {
diff --git a/components/config/opts.rs b/components/config/opts.rs
index a93d39bdf73..293a5f64c10 100644
--- a/components/config/opts.rs
+++ b/components/config/opts.rs
@@ -22,7 +22,6 @@ use std::process;
use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
use url::{self, Url};
-
/// Global flags for Servo, currently set on the command line.
#[derive(Clone, Deserialize, Serialize)]
pub struct Opts {
@@ -230,11 +229,13 @@ pub struct Opts {
}
fn print_usage(app: &str, opts: &Options) {
- let message = format!("Usage: {} [ options ... ] [URL]\n\twhere options include", app);
+ let message = format!(
+ "Usage: {} [ options ... ] [URL]\n\twhere options include",
+ app
+ );
println!("{}", opts.usage(&message));
}
-
/// Debug options for Servo, currently set on the command line with -Z
#[derive(Default)]
pub struct DebugOptions {
@@ -333,7 +334,6 @@ pub struct DebugOptions {
pub signpost: bool,
}
-
impl DebugOptions {
pub fn extend(&mut self, debug_string: String) -> Result<(), String> {
for option in debug_string.split(',') {
@@ -371,50 +371,103 @@ impl DebugOptions {
"" => {},
_ => return Err(String::from(option)),
};
- };
+ }
Ok(())
}
}
-
fn print_debug_usage(app: &str) -> ! {
fn print_option(name: &str, description: &str) {
println!("\t{:<35} {}", name, description);
}
- println!("Usage: {} debug option,[options,...]\n\twhere options include\n\nOptions:", app);
+ println!(
+ "Usage: {} debug option,[options,...]\n\twhere options include\n\nOptions:",
+ app
+ );
- print_option("bubble-widths", "Bubble intrinsic widths separately like other engines.");
+ print_option(
+ "bubble-widths",
+ "Bubble intrinsic widths separately like other engines.",
+ );
print_option("disable-text-aa", "Disable antialiasing of rendered text.");
- print_option("disable-canvas-aa", "Disable antialiasing on the HTML canvas element.");
- print_option("dump-style-tree", "Print the DOM with computed styles after each restyle.");
+ print_option(
+ "disable-canvas-aa",
+ "Disable antialiasing on the HTML canvas element.",
+ );
+ print_option(
+ "dump-style-tree",
+ "Print the DOM with computed styles after each restyle.",
+ );
print_option("dump-flow-tree", "Print the flow tree after each layout.");
- print_option("dump-display-list", "Print the display list after each layout.");
- print_option("dump-display-list-json", "Print the display list in JSON form.");
- print_option("relayout-event", "Print notifications when there is a relayout.");
- print_option("profile-script-events", "Enable profiling of script-related events.");
- print_option("profile-heartbeats", "Enable heartbeats for all thread categories.");
- print_option("show-fragment-borders", "Paint borders along fragment boundaries.");
- print_option("show-parallel-layout", "Mark which thread laid each flow out with colors.");
- print_option("trace-layout", "Write layout trace to an external file for debugging.");
- print_option("disable-share-style-cache",
- "Disable the style sharing cache.");
- print_option("parallel-display-list-building", "Build display lists in parallel.");
- print_option("convert-mouse-to-touch", "Send touch events instead of mouse events");
- print_option("replace-surrogates", "Replace unpaires surrogates in DOM strings with U+FFFD. \
- See https://github.com/servo/servo/issues/6564");
+ print_option(
+ "dump-display-list",
+ "Print the display list after each layout.",
+ );
+ print_option(
+ "dump-display-list-json",
+ "Print the display list in JSON form.",
+ );
+ print_option(
+ "relayout-event",
+ "Print notifications when there is a relayout.",
+ );
+ print_option(
+ "profile-script-events",
+ "Enable profiling of script-related events.",
+ );
+ print_option(
+ "profile-heartbeats",
+ "Enable heartbeats for all thread categories.",
+ );
+ print_option(
+ "show-fragment-borders",
+ "Paint borders along fragment boundaries.",
+ );
+ print_option(
+ "show-parallel-layout",
+ "Mark which thread laid each flow out with colors.",
+ );
+ print_option(
+ "trace-layout",
+ "Write layout trace to an external file for debugging.",
+ );
+ print_option(
+ "disable-share-style-cache",
+ "Disable the style sharing cache.",
+ );
+ print_option(
+ "parallel-display-list-building",
+ "Build display lists in parallel.",
+ );
+ print_option(
+ "convert-mouse-to-touch",
+ "Send touch events instead of mouse events",
+ );
+ print_option(
+ "replace-surrogates",
+ "Replace unpaires surrogates in DOM strings with U+FFFD. \
+ See https://github.com/servo/servo/issues/6564",
+ );
print_option("gc-profile", "Log GC passes and their durations.");
- print_option("load-webfonts-synchronously",
- "Load web fonts synchronously to avoid non-deterministic network-driven reflows");
- print_option("disable-vsync",
- "Disable vsync mode in the compositor to allow profiling at more than monitor refresh rate");
+ print_option(
+ "load-webfonts-synchronously",
+ "Load web fonts synchronously to avoid non-deterministic network-driven reflows",
+ );
+ print_option(
+ "disable-vsync",
+ "Disable vsync mode in the compositor to allow profiling at more than monitor refresh rate",
+ );
print_option("wr-stats", "Show WebRender profiler on screen.");
print_option("msaa", "Use multisample antialiasing in WebRender.");
print_option("full-backtraces", "Print full backtraces for all errors");
print_option("wr-debug", "Display webrender tile borders.");
print_option("wr-no-batch", "Disable webrender instanced batching.");
print_option("precache-shaders", "Compile all shaders during init.");
- print_option("signpost", "Emit native OS signposts for profile events (currently macOS only)");
+ print_option(
+ "signpost",
+ "Emit native OS signposts for profile events (currently macOS only)",
+ );
println!("");
@@ -445,7 +498,7 @@ enum UserAgent {
Desktop,
Android,
#[allow(non_camel_case_types)]
- iOS
+ iOS,
}
fn default_user_agent_string(agent: UserAgent) -> &'static str {
@@ -468,17 +521,12 @@ fn default_user_agent_string(agent: UserAgent) -> &'static str {
const DESKTOP_UA_STRING: &'static str =
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:55.0) Servo/1.0 Firefox/55.0";
-
match agent {
- UserAgent::Desktop => {
- DESKTOP_UA_STRING
- }
- UserAgent::Android => {
- "Mozilla/5.0 (Android; Mobile; rv:55.0) Servo/1.0 Firefox/55.0"
- }
+ UserAgent::Desktop => DESKTOP_UA_STRING,
+ UserAgent::Android => "Mozilla/5.0 (Android; Mobile; rv:55.0) Servo/1.0 Firefox/55.0",
UserAgent::iOS => {
"Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X; rv:55.0) Servo/1.0 Firefox/55.0"
- }
+ },
}
}
@@ -564,54 +612,146 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
opts.optopt("o", "output", "Output file", "output.png");
opts.optopt("s", "size", "Size of tiles", "512");
opts.optopt("", "device-pixel-ratio", "Device pixels per px", "");
- opts.optflagopt("p", "profile", "Time profiler flag and either a TSV output filename \
- OR an interval for output to Stdout (blank for Stdout with interval of 5s)", "10 \
- OR time.tsv");
- opts.optflagopt("", "profiler-trace-path",
- "Path to dump a self-contained HTML timeline of profiler traces",
- "");
- opts.optflagopt("m", "memory-profile", "Memory profiler flag and output interval", "10");
+ opts.optflagopt(
+ "p",
+ "profile",
+ "Time profiler flag and either a TSV output filename \
+ OR an interval for output to Stdout (blank for Stdout with interval of 5s)",
+ "10 \
+ OR time.tsv",
+ );
+ opts.optflagopt(
+ "",
+ "profiler-trace-path",
+ "Path to dump a self-contained HTML timeline of profiler traces",
+ "",
+ );
+ opts.optflagopt(
+ "m",
+ "memory-profile",
+ "Memory profiler flag and output interval",
+ "10",
+ );
opts.optflag("x", "exit", "Exit after load flag");
- opts.optopt("y", "layout-threads", "Number of threads to use for layout", "1");
- opts.optflag("i", "nonincremental-layout", "Enable to turn off incremental layout.");
- opts.optflagopt("", "userscripts",
- "Uses userscripts in resources/user-agent-js, or a specified full path", "");
- opts.optmulti("", "user-stylesheet",
- "A user stylesheet to be added to every document", "file.css");
- opts.optopt("", "shaders",
- "Shaders will be loaded from the specified directory instead of using the builtin ones.", "");
+ opts.optopt(
+ "y",
+ "layout-threads",
+ "Number of threads to use for layout",
+ "1",
+ );
+ opts.optflag(
+ "i",
+ "nonincremental-layout",
+ "Enable to turn off incremental layout.",
+ );
+ opts.optflagopt(
+ "",
+ "userscripts",
+ "Uses userscripts in resources/user-agent-js, or a specified full path",
+ "",
+ );
+ opts.optmulti(
+ "",
+ "user-stylesheet",
+ "A user stylesheet to be added to every document",
+ "file.css",
+ );
+ opts.optopt(
+ "",
+ "shaders",
+ "Shaders will be loaded from the specified directory instead of using the builtin ones.",
+ "",
+ );
opts.optflag("z", "headless", "Headless mode");
- opts.optflag("f", "hard-fail", "Exit on thread failure instead of displaying about:failure");
- opts.optflag("F", "soft-fail", "Display about:failure on thread failure instead of exiting");
- opts.optflagopt("", "remote-debugging-port", "Start remote debugger server on port", "2794");
- opts.optflagopt("", "devtools", "Start remote devtools server on port", "6000");
- opts.optflagopt("", "webdriver", "Start remote WebDriver server on port", "7000");
+ opts.optflag(
+ "f",
+ "hard-fail",
+ "Exit on thread failure instead of displaying about:failure",
+ );
+ opts.optflag(
+ "F",
+ "soft-fail",
+ "Display about:failure on thread failure instead of exiting",
+ );
+ opts.optflagopt(
+ "",
+ "remote-debugging-port",
+ "Start remote debugger server on port",
+ "2794",
+ );
+ opts.optflagopt(
+ "",
+ "devtools",
+ "Start remote devtools server on port",
+ "6000",
+ );
+ opts.optflagopt(
+ "",
+ "webdriver",
+ "Start remote WebDriver server on port",
+ "7000",
+ );
opts.optopt("", "resolution", "Set window resolution.", "1024x740");
- opts.optopt("u",
- "user-agent",
- "Set custom user agent string (or ios / android / desktop for platform default)",
- "NCSA Mosaic/1.0 (X11;SunOS 4.1.4 sun4m)");
+ opts.optopt(
+ "u",
+ "user-agent",
+ "Set custom user agent string (or ios / android / desktop for platform default)",
+ "NCSA Mosaic/1.0 (X11;SunOS 4.1.4 sun4m)",
+ );
opts.optflag("M", "multiprocess", "Run in multiprocess mode");
opts.optflag("S", "sandbox", "Run in a sandbox if multiprocess");
- opts.optopt("",
- "random-pipeline-closure-probability",
- "Probability of randomly closing a pipeline (for testing constellation hardening).",
- "0.0");
- opts.optopt("", "random-pipeline-closure-seed", "A fixed seed for repeatbility of random pipeline closure.", "");
- opts.optmulti("Z", "debug",
- "A comma-separated string of debug options. Pass help to show available options.", "");
+ opts.optopt(
+ "",
+ "random-pipeline-closure-probability",
+ "Probability of randomly closing a pipeline (for testing constellation hardening).",
+ "0.0",
+ );
+ opts.optopt(
+ "",
+ "random-pipeline-closure-seed",
+ "A fixed seed for repeatbility of random pipeline closure.",
+ "",
+ );
+ opts.optmulti(
+ "Z",
+ "debug",
+ "A comma-separated string of debug options. Pass help to show available options.",
+ "",
+ );
opts.optflag("h", "help", "Print this message");
- opts.optopt("", "resources-path", "Path to find static resources", "/home/servo/resources");
- opts.optopt("", "certificate-path", "Path to find SSL certificates", "/home/servo/resources/certs");
- opts.optopt("", "content-process" , "Run as a content process and connect to the given pipe",
- "servo-ipc-channel.abcdefg");
- opts.optmulti("", "pref",
- "A preference to set to enable", "dom.bluetooth.enabled");
+ opts.optopt(
+ "",
+ "resources-path",
+ "Path to find static resources",
+ "/home/servo/resources",
+ );
+ opts.optopt(
+ "",
+ "certificate-path",
+ "Path to find SSL certificates",
+ "/home/servo/resources/certs",
+ );
+ opts.optopt(
+ "",
+ "content-process",
+ "Run as a content process and connect to the given pipe",
+ "servo-ipc-channel.abcdefg",
+ );
+ opts.optmulti(
+ "",
+ "pref",
+ "A preference to set to enable",
+ "dom.bluetooth.enabled",
+ );
opts.optflag("b", "no-native-titlebar", "Do not use native titlebar");
opts.optflag("w", "webrender", "Use webrender backend");
opts.optopt("G", "graphics", "Select graphics backend (gl or es2)", "gl");
- opts.optopt("", "config-dir",
- "config directory following xdg spec on linux platform", "");
+ opts.optopt(
+ "",
+ "config-dir",
+ "config directory following xdg spec on linux platform",
+ "",
+ );
opts.optflag("v", "version", "Display servo version information");
opts.optflag("", "unminify-js", "Unminify Javascript");
opts.optopt("", "profiler-db-user", "Profiler database user", "");
@@ -654,44 +794,50 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
} else {
None
};
- let is_running_problem_test =
- url_opt
- .as_ref()
- .map_or(false, |url|
- url.starts_with("http://web-platform.test:8000/2dcontext/drawing-images-to-the-canvas/") ||
- url.starts_with("http://web-platform.test:8000/_mozilla/mozilla/canvas/") ||
- url.starts_with("http://web-platform.test:8000/_mozilla/css/canvas_over_area.html"));
-
- let url_opt = url_opt.and_then(|url_string| parse_url_or_filename(&cwd, url_string)
- .or_else(|error| {
- warn!("URL parsing failed ({:?}).", error);
- Err(error)
- }).ok());
+ let is_running_problem_test = url_opt.as_ref().map_or(false, |url| {
+ url.starts_with("http://web-platform.test:8000/2dcontext/drawing-images-to-the-canvas/") ||
+ url.starts_with("http://web-platform.test:8000/_mozilla/mozilla/canvas/") ||
+ url.starts_with("http://web-platform.test:8000/_mozilla/css/canvas_over_area.html")
+ });
+
+ let url_opt = url_opt.and_then(|url_string| {
+ parse_url_or_filename(&cwd, url_string)
+ .or_else(|error| {
+ warn!("URL parsing failed ({:?}).", error);
+ Err(error)
+ }).ok()
+ });
let tile_size: usize = match opt_match.opt_str("s") {
- Some(tile_size_str) => tile_size_str.parse()
+ Some(tile_size_str) => tile_size_str
+ .parse()
.unwrap_or_else(|err| args_fail(&format!("Error parsing option: -s ({})", err))),
None => 512,
};
- let device_pixels_per_px = opt_match.opt_str("device-pixel-ratio").map(|dppx_str|
- dppx_str.parse()
- .unwrap_or_else(|err| args_fail(&format!("Error parsing option: --device-pixel-ratio ({})", err)))
- );
+ let device_pixels_per_px = opt_match.opt_str("device-pixel-ratio").map(|dppx_str| {
+ dppx_str.parse().unwrap_or_else(|err| {
+ args_fail(&format!(
+ "Error parsing option: --device-pixel-ratio ({})",
+ err
+ ))
+ })
+ });
// If only the flag is present, default to a 5 second period for both profilers
let time_profiling = if opt_match.opt_present("p") {
match opt_match.opt_str("p") {
Some(argument) => match argument.parse::<f64>() {
- Ok(interval) => Some(OutputOptions::Stdout(interval)) ,
- Err(_) => {
- match ServoUrl::parse(&argument) {
- Ok(url) => Some(OutputOptions::DB(url, opt_match.opt_str("profiler-db-name"),
- opt_match.opt_str("profiler-db-user"),
- opt_match.opt_str("profiler-db-pass"))),
- Err(_) => Some(OutputOptions::FileName(argument)),
- }
- }
+ Ok(interval) => Some(OutputOptions::Stdout(interval)),
+ Err(_) => match ServoUrl::parse(&argument) {
+ Ok(url) => Some(OutputOptions::DB(
+ url,
+ opt_match.opt_str("profiler-db-name"),
+ opt_match.opt_str("profiler-db-user"),
+ opt_match.opt_str("profiler-db-pass"),
+ )),
+ Err(_) => Some(OutputOptions::FileName(argument)),
+ },
},
None => Some(OutputOptions::Stdout(5.0 as f64)),
}
@@ -704,34 +850,50 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
let mut path = PathBuf::from(time_profiler_trace_path);
path.pop();
if let Err(why) = fs::create_dir_all(&path) {
- error!("Couldn't create/open {:?}: {:?}",
- Path::new(time_profiler_trace_path).to_string_lossy(), why);
+ error!(
+ "Couldn't create/open {:?}: {:?}",
+ Path::new(time_profiler_trace_path).to_string_lossy(),
+ why
+ );
}
}
let mem_profiler_period = opt_match.opt_default("m", "5").map(|period| {
- period.parse().unwrap_or_else(|err| args_fail(&format!("Error parsing option: -m ({})", err)))
+ period
+ .parse()
+ .unwrap_or_else(|err| args_fail(&format!("Error parsing option: -m ({})", err)))
});
- let mut layout_threads: Option<usize> = opt_match.opt_str("y")
- .map(|layout_threads_str| {
- layout_threads_str.parse()
- .unwrap_or_else(|err| args_fail(&format!("Error parsing option: -y ({})", err)))
- });
+ let mut layout_threads: Option<usize> = opt_match.opt_str("y").map(|layout_threads_str| {
+ layout_threads_str
+ .parse()
+ .unwrap_or_else(|err| args_fail(&format!("Error parsing option: -y ({})", err)))
+ });
let nonincremental_layout = opt_match.opt_present("i");
- let random_pipeline_closure_probability = opt_match.opt_str("random-pipeline-closure-probability").map(|prob|
- prob.parse().unwrap_or_else(|err| {
- args_fail(&format!("Error parsing option: --random-pipeline-closure-probability ({})", err))
- })
- );
+ let random_pipeline_closure_probability = opt_match
+ .opt_str("random-pipeline-closure-probability")
+ .map(|prob| {
+ prob.parse().unwrap_or_else(|err| {
+ args_fail(&format!(
+ "Error parsing option: --random-pipeline-closure-probability ({})",
+ err
+ ))
+ })
+ });
- let random_pipeline_closure_seed = opt_match.opt_str("random-pipeline-closure-seed").map(|seed|
- seed.parse().unwrap_or_else(|err| {
- args_fail(&format!("Error parsing option: --random-pipeline-closure-seed ({})", err))
- })
- );
+ let random_pipeline_closure_seed =
+ opt_match
+ .opt_str("random-pipeline-closure-seed")
+ .map(|seed| {
+ seed.parse().unwrap_or_else(|err| {
+ args_fail(&format!(
+ "Error parsing option: --random-pipeline-closure-seed ({})",
+ err
+ ))
+ })
+ });
let mut bubble_inline_sizes_separately = debug_options.bubble_widths;
if debug_options.trace_layout {
@@ -739,29 +901,40 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
bubble_inline_sizes_separately = true;
}
- let debugger_port = opt_match.opt_default("remote-debugging-port", "2794").map(|port| {
- port.parse()
- .unwrap_or_else(|err| args_fail(&format!("Error parsing option: --remote-debugging-port ({})", err)))
- });
+ let debugger_port = opt_match
+ .opt_default("remote-debugging-port", "2794")
+ .map(|port| {
+ port.parse().unwrap_or_else(|err| {
+ args_fail(&format!(
+ "Error parsing option: --remote-debugging-port ({})",
+ err
+ ))
+ })
+ });
let devtools_port = opt_match.opt_default("devtools", "6000").map(|port| {
- port.parse().unwrap_or_else(|err| args_fail(&format!("Error parsing option: --devtools ({})", err)))
+ port.parse()
+ .unwrap_or_else(|err| args_fail(&format!("Error parsing option: --devtools ({})", err)))
});
let webdriver_port = opt_match.opt_default("webdriver", "7000").map(|port| {
- port.parse().unwrap_or_else(|err| args_fail(&format!("Error parsing option: --webdriver ({})", err)))
+ port.parse().unwrap_or_else(|err| {
+ args_fail(&format!("Error parsing option: --webdriver ({})", err))
+ })
});
let initial_window_size = match opt_match.opt_str("resolution") {
Some(res_string) => {
- let res: Vec<u32> = res_string.split('x').map(|r| {
- r.parse().unwrap_or_else(|err| args_fail(&format!("Error parsing option: --resolution ({})", err)))
- }).collect();
+ let res: Vec<u32> = res_string
+ .split('x')
+ .map(|r| {
+ r.parse().unwrap_or_else(|err| {
+ args_fail(&format!("Error parsing option: --resolution ({})", err))
+ })
+ }).collect();
TypedSize2D::new(res[0], res[1])
- }
- None => {
- TypedSize2D::new(1024, 740)
- }
+ },
+ None => TypedSize2D::new(1024, 740),
};
if opt_match.opt_present("M") {
@@ -776,20 +949,24 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
None => default_user_agent_string(DEFAULT_USER_AGENT).into(),
};
- let user_stylesheets = opt_match.opt_strs("user-stylesheet").iter().map(|filename| {
- let path = cwd.join(filename);
- let url = ServoUrl::from_url(Url::from_file_path(&path).unwrap());
- let mut contents = Vec::new();
- File::open(path)
- .unwrap_or_else(|err| args_fail(&format!("Couldn't open {}: {}", filename, err)))
- .read_to_end(&mut contents)
- .unwrap_or_else(|err| args_fail(&format!("Couldn't read {}: {}", filename, err)));
- (contents, url)
- }).collect();
-
- let do_not_use_native_titlebar =
- opt_match.opt_present("b") ||
- !PREFS.get("shell.native-titlebar.enabled").as_boolean().unwrap();
+ let user_stylesheets = opt_match
+ .opt_strs("user-stylesheet")
+ .iter()
+ .map(|filename| {
+ let path = cwd.join(filename);
+ let url = ServoUrl::from_url(Url::from_file_path(&path).unwrap());
+ let mut contents = Vec::new();
+ File::open(path)
+ .unwrap_or_else(|err| args_fail(&format!("Couldn't open {}: {}", filename, err)))
+ .read_to_end(&mut contents)
+ .unwrap_or_else(|err| args_fail(&format!("Couldn't read {}: {}", filename, err)));
+ (contents, url)
+ }).collect();
+
+ let do_not_use_native_titlebar = opt_match.opt_present("b") || !PREFS
+ .get("shell.native-titlebar.enabled")
+ .as_boolean()
+ .unwrap();
let is_printing_version = opt_match.opt_present("v") || opt_match.opt_present("version");
@@ -870,7 +1047,10 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
if let Some(layout_threads) = layout_threads {
PREFS.set("layout.threads", PrefValue::Number(layout_threads as f64));
} else if let Some(layout_threads) = PREFS.get("layout.threads").as_string() {
- PREFS.set("layout.threads", PrefValue::Number(layout_threads.parse::<f64>().unwrap()));
+ PREFS.set(
+ "layout.threads",
+ PrefValue::Number(layout_threads.parse::<f64>().unwrap()),
+ );
} else if *PREFS.get("layout.threads") == PrefValue::Missing {
let layout_threads = cmp::max(num_cpus::get() * 3 / 4, 1);
PREFS.set("layout.threads", PrefValue::Number(layout_threads as f64));
@@ -926,8 +1106,8 @@ pub fn parse_pref_from_command_line(pref: &str) {
Some(&"true") | None => PREFS.set(pref_name, PrefValue::Boolean(true)),
Some(value) => match value.parse::<f64>() {
Ok(v) => PREFS.set(pref_name, PrefValue::Number(v)),
- Err(_) => PREFS.set(pref_name, PrefValue::String(value.to_string()))
- }
+ Err(_) => PREFS.set(pref_name, PrefValue::String(value.to_string())),
+ },
};
}
@@ -941,7 +1121,7 @@ pub fn parse_url_or_filename(cwd: &Path, input: &str) -> Result<ServoUrl, ()> {
Ok(url) => Ok(url),
Err(url::ParseError::RelativeUrlWithoutBase) => {
Url::from_file_path(&*cwd.join(input)).map(ServoUrl::from_url)
- }
+ },
Err(_) => Err(()),
}
}
diff --git a/components/config/prefs.rs b/components/config/prefs.rs
index e5019ea4fcb..792f3c9fb8f 100644
--- a/components/config/prefs.rs
+++ b/components/config/prefs.rs
@@ -30,7 +30,7 @@ pub enum PrefValue {
Boolean(bool),
String(String),
Number(f64),
- Missing
+ Missing,
}
impl PrefValue {
@@ -41,26 +41,22 @@ impl PrefValue {
Json::F64(x) => PrefValue::Number(x),
Json::I64(x) => PrefValue::Number(x as f64),
Json::U64(x) => PrefValue::Number(x as f64),
- _ => return Err(())
+ _ => return Err(()),
};
Ok(value)
}
pub fn as_boolean(&self) -> Option<bool> {
match *self {
- PrefValue::Boolean(value) => {
- Some(value)
- },
- _ => None
+ PrefValue::Boolean(value) => Some(value),
+ _ => None,
}
}
pub fn as_string(&self) -> Option<&str> {
match *self {
- PrefValue::String(ref value) => {
- Some(&value)
- },
- _ => None
+ PrefValue::String(ref value) => Some(&value),
+ _ => None,
}
}
@@ -82,16 +78,10 @@ impl PrefValue {
impl ToJson for PrefValue {
fn to_json(&self) -> Json {
match *self {
- PrefValue::Boolean(x) => {
- Json::Boolean(x)
- },
- PrefValue::String(ref x) => {
- Json::String(x.clone())
- },
- PrefValue::Number(x) => {
- Json::F64(x)
- },
- PrefValue::Missing => Json::Null
+ PrefValue::Boolean(x) => Json::Boolean(x),
+ PrefValue::String(ref x) => Json::String(x.clone()),
+ PrefValue::Number(x) => Json::F64(x),
+ PrefValue::Missing => Json::Null,
}
}
}
@@ -99,10 +89,9 @@ impl ToJson for PrefValue {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub enum Pref {
NoDefault(Arc<PrefValue>),
- WithDefault(Arc<PrefValue>, Option<Arc<PrefValue>>)
+ WithDefault(Arc<PrefValue>, Option<Arc<PrefValue>>),
}
-
impl Pref {
pub fn new(value: PrefValue) -> Pref {
Pref::NoDefault(Arc::new(value))
@@ -120,12 +109,10 @@ impl Pref {
pub fn value(&self) -> &Arc<PrefValue> {
match *self {
Pref::NoDefault(ref x) => x,
- Pref::WithDefault(ref default, ref override_value) => {
- match *override_value {
- Some(ref x) => x,
- None => default
- }
- }
+ Pref::WithDefault(ref default, ref override_value) => match *override_value {
+ Some(ref x) => x,
+ None => default,
+ },
}
}
@@ -133,12 +120,8 @@ impl Pref {
// TODO - this should error if we try to override a pref of one type
// with a value of a different type
match *self {
- Pref::NoDefault(ref mut pref_value) => {
- *pref_value = Arc::new(value)
- },
- Pref::WithDefault(_, ref mut override_value) => {
- *override_value = Some(Arc::new(value))
- }
+ Pref::NoDefault(ref mut pref_value) => *pref_value = Arc::new(value),
+ Pref::WithDefault(_, ref mut override_value) => *override_value = Some(Arc::new(value)),
}
}
}
@@ -151,8 +134,10 @@ impl ToJson for Pref {
pub fn default_prefs() -> Preferences {
let prefs = Preferences(Arc::new(RwLock::new(HashMap::new())));
- prefs.set("layout.threads", PrefValue::Number(
- max(num_cpus::get() * 3 / 4, 1) as f64));
+ prefs.set(
+ "layout.threads",
+ PrefValue::Number(max(num_cpus::get() * 3 / 4, 1) as f64),
+ );
prefs
}
@@ -169,7 +154,10 @@ pub fn read_prefs(txt: &str) -> Result<HashMap<String, Pref>, ()> {
Ok(x) => {
prefs.insert(name, x);
},
- Err(_) => println!("Ignoring non-boolean/string/i64 preference value for {:?}", name),
+ Err(_) => println!(
+ "Ignoring non-boolean/string/i64 preference value for {:?}",
+ name
+ ),
}
}
}
@@ -181,14 +169,14 @@ pub fn add_user_prefs() {
Some(ref config_path) => {
let mut path = PathBuf::from(config_path);
init_user_prefs(&mut path);
- }
+ },
None => {
if let Some(mut path) = default_config_dir() {
if path.join("prefs.json").exists() {
init_user_prefs(&mut path);
}
}
- }
+ },
}
}
@@ -201,8 +189,10 @@ fn init_user_prefs(path: &mut PathBuf) {
PREFS.extend(prefs);
}
} else {
- writeln!(&mut stderr(), "Error opening prefs.json from config directory")
- .expect("failed printing to stderr");
+ writeln!(
+ &mut stderr(),
+ "Error opening prefs.json from config directory"
+ ).expect("failed printing to stderr");
}
}
@@ -210,7 +200,11 @@ pub struct Preferences(Arc<RwLock<HashMap<String, Pref>>>);
impl Preferences {
pub fn get(&self, name: &str) -> Arc<PrefValue> {
- self.0.read().unwrap().get(name).map_or(Arc::new(PrefValue::Missing), |x| x.value().clone())
+ self.0
+ .read()
+ .unwrap()
+ .get(name)
+ .map_or(Arc::new(PrefValue::Missing), |x| x.value().clone())
}
pub fn cloned(&self) -> HashMap<String, Pref> {
@@ -244,7 +238,12 @@ impl Preferences {
pub fn reset_all(&self) {
let names = {
- self.0.read().unwrap().keys().cloned().collect::<Vec<String>>()
+ self.0
+ .read()
+ .unwrap()
+ .keys()
+ .cloned()
+ .collect::<Vec<String>>()
};
for name in names.iter() {
self.reset(name);
@@ -260,7 +259,9 @@ impl Preferences {
}
pub fn is_dom_to_texture_enabled(&self) -> bool {
- self.get("dom.webgl.dom_to_texture.enabled").as_boolean().unwrap_or(false)
+ self.get("dom.webgl.dom_to_texture.enabled")
+ .as_boolean()
+ .unwrap_or(false)
}
pub fn is_webgl2_enabled(&self) -> bool {
diff --git a/components/config/tests/opts.rs b/components/config/tests/opts.rs
index 53a049e103c..e2db853a991 100644
--- a/components/config/tests/opts.rs
+++ b/components/config/tests/opts.rs
@@ -24,7 +24,10 @@ fn test_argument_parsing() {
let url = parse_url_or_filename(fake_cwd, "file:///foo/bar.html").unwrap();
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["foo", "bar.html"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["foo", "bar.html"]
+ );
}
#[test]
@@ -34,7 +37,10 @@ fn test_file_path_parsing() {
let url = parse_url_or_filename(fake_cwd, "bar.html").unwrap();
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["fake", "cwd", "bar.html"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["fake", "cwd", "bar.html"]
+ );
}
#[test]
@@ -44,7 +50,10 @@ fn test_file_path_parsing() {
let url = parse_url_or_filename(fake_cwd, "bar.html").unwrap();
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["C:", "fake", "cwd", "bar.html"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["C:", "fake", "cwd", "bar.html"]
+ );
}
#[test]
@@ -57,16 +66,24 @@ fn test_argument_parsing_special() {
let url = parse_url_or_filename(fake_cwd, "file:///foo/bar?baz#buzz.html").unwrap();
assert_eq!(&*url.to_file_path().unwrap(), Path::new("/foo/bar"));
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["foo", "bar"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["foo", "bar"]
+ );
assert_eq!(url.query(), Some("baz"));
assert_eq!(url.fragment(), Some("buzz.html"));
// but not in file names.
let url = parse_url_or_filename(fake_cwd, "./bar?baz#buzz.html").unwrap();
- assert_eq!(&*url.to_file_path().unwrap(), Path::new("/fake/cwd/bar?baz#buzz.html"));
+ assert_eq!(
+ &*url.to_file_path().unwrap(),
+ Path::new("/fake/cwd/bar?baz#buzz.html")
+ );
assert_eq!(url.scheme(), "file");
- assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(),
- ["fake", "cwd", "bar%3Fbaz%23buzz.html"]);
+ assert_eq!(
+ url.path_segments().unwrap().collect::<Vec<_>>(),
+ ["fake", "cwd", "bar%3Fbaz%23buzz.html"]
+ );
assert_eq!(url.query(), None);
assert_eq!(url.fragment(), None);
}
diff --git a/components/config/tests/prefs.rs b/components/config/tests/prefs.rs
index 68188600ee8..823b03b76c2 100644
--- a/components/config/tests/prefs.rs
+++ b/components/config/tests/prefs.rs
@@ -12,10 +12,10 @@ use std::io::{Read, Write};
#[test]
fn test_create_pref() {
let json_str = "{\
- \"layout.writing-mode.enabled\": true,\
- \"network.mime.sniff\": false,\
- \"shell.homepage\": \"https://servo.org\"\
-}";
+ \"layout.writing-mode.enabled\": true,\
+ \"network.mime.sniff\": false,\
+ \"shell.homepage\": \"https://servo.org\"\
+ }";
let prefs = read_prefs(json_str);
assert!(prefs.is_ok());
@@ -27,40 +27,52 @@ fn test_create_pref() {
#[test]
fn test_get_set_reset_extend() {
let json_str = "{\
- \"layout.writing-mode.enabled\": true,\
- \"extra.stuff\": false,\
- \"shell.homepage\": \"https://google.com\"\
-}";
+ \"layout.writing-mode.enabled\": true,\
+ \"extra.stuff\": false,\
+ \"shell.homepage\": \"https://google.com\"\
+ }";
assert_eq!(*PREFS.get("test"), PrefValue::Missing);
PREFS.set("test", PrefValue::String("hi".to_owned()));
assert_eq!(*PREFS.get("test"), PrefValue::String("hi".to_owned()));
- assert_eq!(*PREFS.get("shell.homepage"), PrefValue::String("https://servo.org".to_owned()));
+ assert_eq!(
+ *PREFS.get("shell.homepage"),
+ PrefValue::String("https://servo.org".to_owned())
+ );
PREFS.set("shell.homepage", PrefValue::Boolean(true));
assert_eq!(*PREFS.get("shell.homepage"), PrefValue::Boolean(true));
PREFS.reset("shell.homepage");
- assert_eq!(*PREFS.get("shell.homepage"), PrefValue::String("https://servo.org".to_owned()));
+ assert_eq!(
+ *PREFS.get("shell.homepage"),
+ PrefValue::String("https://servo.org".to_owned())
+ );
let extension = read_prefs(json_str).unwrap();
PREFS.extend(extension);
- assert_eq!(*PREFS.get("shell.homepage"), PrefValue::String("https://google.com".to_owned()));
- assert_eq!(*PREFS.get("layout.writing-mode.enabled"), PrefValue::Boolean(true));
+ assert_eq!(
+ *PREFS.get("shell.homepage"),
+ PrefValue::String("https://google.com".to_owned())
+ );
+ assert_eq!(
+ *PREFS.get("layout.writing-mode.enabled"),
+ PrefValue::Boolean(true)
+ );
assert_eq!(*PREFS.get("extra.stuff"), PrefValue::Boolean(false));
}
#[cfg(not(target_os = "android"))]
#[test]
fn test_default_config_dir_create_read_write() {
- let json_str = "{\
- \"layout.writing-mode.enabled\": true,\
- \"extra.stuff\": false,\
- \"shell.homepage\": \"https://google.com\"\
-}";
+ let json_str = "{\
+ \"layout.writing-mode.enabled\": true,\
+ \"extra.stuff\": false,\
+ \"shell.homepage\": \"https://google.com\"\
+ }";
let mut expected_json = String::new();
let config_path = basedir::default_config_dir().unwrap();
if !config_path.exists() {
- fs::create_dir_all(&config_path).unwrap();
+ fs::create_dir_all(&config_path).unwrap();
}
let json_path = config_path.join("test_config.json");
diff --git a/components/debugger/lib.rs b/components/debugger/lib.rs
index ec0e5ba0e80..6190ebec89b 100644
--- a/components/debugger/lib.rs
+++ b/components/debugger/lib.rs
@@ -18,7 +18,7 @@ enum Message {
pub struct Sender(mpsc::Sender<Message>);
struct Connection {
- sender: ws::Sender
+ sender: ws::Sender,
}
impl Handler for Connection {
@@ -39,23 +39,27 @@ impl Handler for Connection {
pub fn start_server(port: u16) -> Sender {
debug!("Starting server.");
let (sender, receiver) = channel();
- thread::Builder::new().name("debugger".to_owned()).spawn(move || {
- let socket = Builder::new().build(|sender: ws::Sender| {
- Connection { sender: sender }
- }).unwrap();
- let sender = socket.broadcaster();
- thread::Builder::new().name("debugger-websocket".to_owned()).spawn(move || {
- socket.listen(("127.0.0.1", port)).unwrap();
- }).expect("Thread spawning failed");
- while let Ok(message) = receiver.recv() {
- match message {
- Message::ShutdownServer => {
- break;
+ thread::Builder::new()
+ .name("debugger".to_owned())
+ .spawn(move || {
+ let socket = Builder::new()
+ .build(|sender: ws::Sender| Connection { sender: sender })
+ .unwrap();
+ let sender = socket.broadcaster();
+ thread::Builder::new()
+ .name("debugger-websocket".to_owned())
+ .spawn(move || {
+ socket.listen(("127.0.0.1", port)).unwrap();
+ }).expect("Thread spawning failed");
+ while let Ok(message) = receiver.recv() {
+ match message {
+ Message::ShutdownServer => {
+ break;
+ },
}
}
- }
- sender.shutdown().unwrap();
- }).expect("Thread spawning failed");
+ sender.shutdown().unwrap();
+ }).expect("Thread spawning failed");
Sender(sender)
}
diff --git a/components/deny_public_fields/lib.rs b/components/deny_public_fields/lib.rs
index 8d5feb39cbe..28fbf85add0 100644
--- a/components/deny_public_fields/lib.rs
+++ b/components/deny_public_fields/lib.rs
@@ -14,8 +14,10 @@ decl_derive!([DenyPublicFields] => deny_public_fields_derive);
fn deny_public_fields_derive(s: synstructure::Structure) -> proc_macro::TokenStream {
s.each(|binding| {
if binding.ast().vis != syn::Visibility::Inherited {
- panic!("Field `{}` should not be public",
- binding.ast().ident.as_ref().unwrap_or(&binding.binding));
+ panic!(
+ "Field `{}` should not be public",
+ binding.ast().ident.as_ref().unwrap_or(&binding.binding)
+ );
}
"".to_owned()
diff --git a/components/devtools/actor.rs b/components/devtools/actor.rs
index f2ee6398e9b..634622a2068 100644
--- a/components/devtools/actor.rs
+++ b/components/devtools/actor.rs
@@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/// General actor system infrastructure.
-
use devtools_traits::PreciseTime;
use serde_json::{Map, Value};
use std::any::Any;
@@ -23,11 +22,13 @@ pub enum ActorMessageStatus {
/// and the ability to process messages that are directed to particular actors.
/// TODO: ensure the name is immutable
pub trait Actor: Any + ActorAsAny {
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()>;
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()>;
fn name(&self) -> String;
}
@@ -37,8 +38,12 @@ pub trait ActorAsAny {
}
impl<T: Actor> ActorAsAny for T {
- fn actor_as_any(&self) -> &Any { self }
- fn actor_as_any_mut(&mut self) -> &mut Any { self }
+ fn actor_as_any(&self) -> &Any {
+ self
+ }
+ fn actor_as_any_mut(&mut self) -> &mut Any {
+ self
+ }
}
/// A list of known, owned actors.
@@ -57,8 +62,8 @@ impl ActorRegistry {
pub fn new() -> ActorRegistry {
ActorRegistry {
actors: HashMap::new(),
- new_actors: RefCell::new(vec!()),
- old_actors: RefCell::new(vec!()),
+ new_actors: RefCell::new(vec![]),
+ old_actors: RefCell::new(vec![]),
script_actors: RefCell::new(HashMap::new()),
shareable: None,
next: Cell::new(0),
@@ -149,29 +154,33 @@ impl ActorRegistry {
/// Attempt to process a message as directed by its `to` property. If the actor is not
/// found or does not indicate that it knew how to process the message, ignore the failure.
- pub fn handle_message(&mut self,
- msg: &Map<String, Value>,
- stream: &mut TcpStream)
- -> Result<(), ()> {
+ pub fn handle_message(
+ &mut self,
+ msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<(), ()> {
let to = msg.get("to").unwrap().as_str().unwrap();
match self.actors.get(to) {
None => debug!("message received for unknown actor \"{}\"", to),
Some(actor) => {
let msg_type = msg.get("type").unwrap().as_str().unwrap();
- if actor.handle_message(self, msg_type, msg, stream)?
- != ActorMessageStatus::Processed {
- debug!("unexpected message type \"{}\" found for actor \"{}\"",
- msg_type, to);
+ if actor.handle_message(self, msg_type, msg, stream)? !=
+ ActorMessageStatus::Processed
+ {
+ debug!(
+ "unexpected message type \"{}\" found for actor \"{}\"",
+ msg_type, to
+ );
}
- }
+ },
}
- let new_actors = replace(&mut *self.new_actors.borrow_mut(), vec!());
+ let new_actors = replace(&mut *self.new_actors.borrow_mut(), vec![]);
for actor in new_actors.into_iter() {
self.actors.insert(actor.name().to_owned(), actor);
}
- let old_actors = replace(&mut *self.old_actors.borrow_mut(), vec!());
+ let old_actors = replace(&mut *self.old_actors.borrow_mut(), vec![]);
for name in old_actors {
self.drop_actor(name);
}
diff --git a/components/devtools/actors/console.rs b/components/devtools/actors/console.rs
index 295ebca489b..e1996570164 100644
--- a/components/devtools/actors/console.rs
+++ b/components/devtools/actors/console.rs
@@ -94,32 +94,48 @@ impl Actor for ConsoleActor {
self.name.clone()
}
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"getCachedMessages" => {
- let str_types = msg.get("messageTypes").unwrap().as_array().unwrap().into_iter().map(|json_type| {
- json_type.as_str().unwrap()
- });
+ let str_types = msg
+ .get("messageTypes")
+ .unwrap()
+ .as_array()
+ .unwrap()
+ .into_iter()
+ .map(|json_type| json_type.as_str().unwrap());
let mut message_types = CachedConsoleMessageTypes::empty();
for str_type in str_types {
match str_type {
"PageError" => message_types.insert(CachedConsoleMessageTypes::PAGE_ERROR),
- "ConsoleAPI" => message_types.insert(CachedConsoleMessageTypes::CONSOLE_API),
+ "ConsoleAPI" => {
+ message_types.insert(CachedConsoleMessageTypes::CONSOLE_API)
+ },
s => debug!("unrecognized message type requested: \"{}\"", s),
};
- };
+ }
let (chan, port) = ipc::channel().unwrap();
- self.script_chan.send(DevtoolScriptControlMsg::GetCachedMessages(
- self.pipeline, message_types, chan)).unwrap();
- let messages = port.recv().map_err(|_| ())?.into_iter().map(|message| {
- let json_string = message.encode().unwrap();
- let json = serde_json::from_str::<Value>(&json_string).unwrap();
- json.as_object().unwrap().to_owned()
- }).collect();
+ self.script_chan
+ .send(DevtoolScriptControlMsg::GetCachedMessages(
+ self.pipeline,
+ message_types,
+ chan,
+ )).unwrap();
+ let messages = port
+ .recv()
+ .map_err(|_| ())?
+ .into_iter()
+ .map(|message| {
+ let json_string = message.encode().unwrap();
+ let json = serde_json::from_str::<Value>(&json_string).unwrap();
+ json.as_object().unwrap().to_owned()
+ }).collect();
let msg = GetCachedMessagesReply {
from: self.name(),
@@ -127,56 +143,60 @@ impl Actor for ConsoleActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"startListeners" => {
//TODO: actually implement listener filters that support starting/stopping
let msg = StartedListenersReply {
from: self.name(),
nativeConsoleAPI: true,
- startedListeners:
- vec!("PageError".to_owned(), "ConsoleAPI".to_owned()),
+ startedListeners: vec!["PageError".to_owned(), "ConsoleAPI".to_owned()],
traits: StartedListenersTraits {
customNetworkRequest: true,
- }
+ },
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"stopListeners" => {
//TODO: actually implement listener filters that support starting/stopping
let msg = StopListenersReply {
from: self.name(),
- stoppedListeners: msg.get("listeners")
- .unwrap()
- .as_array()
- .unwrap_or(&vec!())
- .iter()
- .map(|listener| listener.as_str().unwrap().to_owned())
- .collect(),
+ stoppedListeners: msg
+ .get("listeners")
+ .unwrap()
+ .as_array()
+ .unwrap_or(&vec![])
+ .iter()
+ .map(|listener| listener.as_str().unwrap().to_owned())
+ .collect(),
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
//TODO: implement autocompletion like onAutocomplete in
// http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/webconsole.js
"autocomplete" => {
let msg = AutocompleteReply {
from: self.name(),
- matches: vec!(),
+ matches: vec![],
matchProp: "".to_owned(),
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"evaluateJS" => {
let input = msg.get("text").unwrap().as_str().unwrap().to_owned();
let (chan, port) = ipc::channel().unwrap();
- self.script_chan.send(DevtoolScriptControlMsg::EvaluateJS(
- self.pipeline, input.clone(), chan)).unwrap();
+ self.script_chan
+ .send(DevtoolScriptControlMsg::EvaluateJS(
+ self.pipeline,
+ input.clone(),
+ chan,
+ )).unwrap();
//TODO: extract conversion into protocol module or some other useful place
let result = match port.recv().map_err(|_| ())? {
@@ -184,12 +204,12 @@ impl Actor for ConsoleActor {
let mut m = Map::new();
m.insert("type".to_owned(), Value::String("undefined".to_owned()));
Value::Object(m)
- }
+ },
NullValue => {
let mut m = Map::new();
m.insert("type".to_owned(), Value::String("null".to_owned()));
Value::Object(m)
- }
+ },
BooleanValue(val) => Value::Bool(val),
NumberValue(val) => {
if val.is_nan() {
@@ -211,7 +231,7 @@ impl Actor for ConsoleActor {
} else {
Value::Number(Number::from_f64(val).unwrap())
}
- }
+ },
StringValue(s) => Value::String(s),
ActorValue { class, uuid } => {
//TODO: make initial ActorValue message include these properties?
@@ -225,7 +245,7 @@ impl Actor for ConsoleActor {
m.insert("frozen".to_owned(), Value::Bool(false));
m.insert("sealed".to_owned(), Value::Bool(false));
Value::Object(m)
- }
+ },
};
//TODO: catch and return exception values from JS evaluation
@@ -240,7 +260,7 @@ impl Actor for ConsoleActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"setPreferences" => {
let msg = SetPreferencesReply {
@@ -249,9 +269,9 @@ impl Actor for ConsoleActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
- _ => ActorMessageStatus::Ignored
+ _ => ActorMessageStatus::Ignored,
})
}
}
diff --git a/components/devtools/actors/framerate.rs b/components/devtools/actors/framerate.rs
index 39776c131cb..56145c63620 100644
--- a/components/devtools/actors/framerate.rs
+++ b/components/devtools/actors/framerate.rs
@@ -26,21 +26,24 @@ impl Actor for FramerateActor {
self.name.clone()
}
-
- fn handle_message(&self,
- _registry: &ActorRegistry,
- _msg_type: &str,
- _msg: &Map<String, Value>,
- _stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ _registry: &ActorRegistry,
+ _msg_type: &str,
+ _msg: &Map<String, Value>,
+ _stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(ActorMessageStatus::Ignored)
}
}
impl FramerateActor {
/// return name of actor
- pub fn create(registry: &ActorRegistry,
- pipeline_id: PipelineId,
- script_sender: IpcSender<DevtoolScriptControlMsg>) -> String {
+ pub fn create(
+ registry: &ActorRegistry,
+ pipeline_id: PipelineId,
+ script_sender: IpcSender<DevtoolScriptControlMsg>,
+ ) -> String {
let actor_name = registry.new_name("framerate");
let mut actor = FramerateActor {
name: actor_name.clone(),
@@ -60,8 +63,7 @@ impl FramerateActor {
self.ticks.push(HighResolutionStamp::wrap(tick));
if self.is_recording {
- let msg = DevtoolScriptControlMsg::RequestAnimationFrame(self.pipeline,
- self.name());
+ let msg = DevtoolScriptControlMsg::RequestAnimationFrame(self.pipeline, self.name());
self.script_sender.send(msg).unwrap();
}
}
@@ -78,8 +80,7 @@ impl FramerateActor {
self.start_time = Some(precise_time_ns());
self.is_recording = true;
- let msg = DevtoolScriptControlMsg::RequestAnimationFrame(self.pipeline,
- self.name());
+ let msg = DevtoolScriptControlMsg::RequestAnimationFrame(self.pipeline, self.name());
self.script_sender.send(msg).unwrap();
}
@@ -90,7 +91,6 @@ impl FramerateActor {
self.is_recording = false;
self.start_time = None;
}
-
}
impl Drop for FramerateActor {
diff --git a/components/devtools/actors/inspector.rs b/components/devtools/actors/inspector.rs
index 22a69421ad8..040ba342155 100644
--- a/components/devtools/actors/inspector.rs
+++ b/components/devtools/actors/inspector.rs
@@ -61,27 +61,25 @@ impl Actor for HighlighterActor {
self.name.clone()
}
- fn handle_message(&self,
- _registry: &ActorRegistry,
- msg_type: &str,
- _msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ _registry: &ActorRegistry,
+ msg_type: &str,
+ _msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"showBoxModel" => {
- let msg = ShowBoxModelReply {
- from: self.name(),
- };
+ let msg = ShowBoxModelReply { from: self.name() };
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"hideBoxModel" => {
- let msg = HideBoxModelReply {
- from: self.name(),
- };
+ let msg = HideBoxModelReply { from: self.name() };
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
_ => ActorMessageStatus::Ignored,
})
@@ -98,29 +96,33 @@ impl Actor for NodeActor {
self.name.clone()
}
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"modifyAttributes" => {
let target = msg.get("to").unwrap().as_str().unwrap();
let mods = msg.get("modifications").unwrap().as_array().unwrap();
- let modifications = mods.iter().map(|json_mod| {
- serde_json::from_str(&serde_json::to_string(json_mod).unwrap()).unwrap()
- }).collect();
-
- self.script_chan.send(ModifyAttribute(self.pipeline,
- registry.actor_to_script(target.to_owned()),
- modifications))
- .unwrap();
- let reply = ModifyAttributeReply {
- from: self.name(),
- };
+ let modifications = mods
+ .iter()
+ .map(|json_mod| {
+ serde_json::from_str(&serde_json::to_string(json_mod).unwrap()).unwrap()
+ }).collect();
+
+ self.script_chan
+ .send(ModifyAttribute(
+ self.pipeline,
+ registry.actor_to_script(target.to_owned()),
+ modifications,
+ )).unwrap();
+ let reply = ModifyAttributeReply { from: self.name() };
stream.write_json_packet(&reply);
ActorMessageStatus::Processed
- }
+ },
_ => ActorMessageStatus::Ignored,
})
@@ -175,19 +177,23 @@ struct NodeActorMsg {
}
trait NodeInfoToProtocol {
- fn encode(self,
- actors: &ActorRegistry,
- display: bool,
- script_chan: IpcSender<DevtoolScriptControlMsg>,
- pipeline: PipelineId) -> NodeActorMsg;
+ fn encode(
+ self,
+ actors: &ActorRegistry,
+ display: bool,
+ script_chan: IpcSender<DevtoolScriptControlMsg>,
+ pipeline: PipelineId,
+ ) -> NodeActorMsg;
}
impl NodeInfoToProtocol for NodeInfo {
- fn encode(self,
- actors: &ActorRegistry,
- display: bool,
- script_chan: IpcSender<DevtoolScriptControlMsg>,
- pipeline: PipelineId) -> NodeActorMsg {
+ fn encode(
+ self,
+ actors: &ActorRegistry,
+ display: bool,
+ script_chan: IpcSender<DevtoolScriptControlMsg>,
+ pipeline: PipelineId,
+ ) -> NodeActorMsg {
let actor_name = if !actors.script_actor_registered(self.uniqueId.clone()) {
let name = actors.new_name("node");
let node_actor = NodeActor {
@@ -215,15 +221,16 @@ impl NodeInfoToProtocol for NodeInfo {
publicId: self.publicId,
systemId: self.systemId,
- attrs: self.attrs.into_iter().map(|attr| {
- AttrMsg {
+ attrs: self
+ .attrs
+ .into_iter()
+ .map(|attr| AttrMsg {
namespace: attr.namespace,
name: attr.name,
value: attr.value,
- }
- }).collect(),
+ }).collect(),
- pseudoClassLocks: vec!(), //TODO get this data from script
+ pseudoClassLocks: vec![], //TODO get this data from script
isDisplayed: display,
@@ -272,25 +279,28 @@ impl Actor for WalkerActor {
self.name.clone()
}
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"querySelector" => {
- let msg = QuerySelectorReply {
- from: self.name(),
- };
+ let msg = QuerySelectorReply { from: self.name() };
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"documentElement" => {
let (tx, rx) = ipc::channel().unwrap();
- self.script_chan.send(GetDocumentElement(self.pipeline, tx)).unwrap();
+ self.script_chan
+ .send(GetDocumentElement(self.pipeline, tx))
+ .unwrap();
let doc_elem_info = rx.recv().unwrap().ok_or(())?;
- let node = doc_elem_info.encode(registry, true, self.script_chan.clone(), self.pipeline);
+ let node =
+ doc_elem_info.encode(registry, true, self.script_chan.clone(), self.pipeline);
let msg = DocumentElementReply {
from: self.name(),
@@ -298,36 +308,38 @@ impl Actor for WalkerActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"clearPseudoClassLocks" => {
- let msg = ClearPseudoclassesReply {
- from: self.name(),
- };
+ let msg = ClearPseudoclassesReply { from: self.name() };
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"children" => {
let target = msg.get("node").unwrap().as_str().unwrap();
let (tx, rx) = ipc::channel().unwrap();
- self.script_chan.send(GetChildren(self.pipeline,
- registry.actor_to_script(target.to_owned()),
- tx))
- .unwrap();
+ self.script_chan
+ .send(GetChildren(
+ self.pipeline,
+ registry.actor_to_script(target.to_owned()),
+ tx,
+ )).unwrap();
let children = rx.recv().unwrap().ok_or(())?;
let msg = ChildrenReply {
hasFirst: true,
hasLast: true,
- nodes: children.into_iter().map(|child| {
- child.encode(registry, true, self.script_chan.clone(), self.pipeline)
- }).collect(),
+ nodes: children
+ .into_iter()
+ .map(|child| {
+ child.encode(registry, true, self.script_chan.clone(), self.pipeline)
+ }).collect(),
from: self.name(),
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
_ => ActorMessageStatus::Ignored,
})
@@ -447,52 +459,72 @@ impl Actor for PageStyleActor {
self.name.clone()
}
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"getApplied" => {
//TODO: query script for relevant applied styles to node (msg.node)
let msg = GetAppliedReply {
- entries: vec!(),
- rules: vec!(),
- sheets: vec!(),
+ entries: vec![],
+ rules: vec![],
+ sheets: vec![],
from: self.name(),
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"getComputed" => {
//TODO: query script for relevant computed styles on node (msg.node)
let msg = GetComputedReply {
- computed: vec!(),
+ computed: vec![],
from: self.name(),
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
//TODO: query script for box layout properties of node (msg.node)
"getLayout" => {
let target = msg.get("node").unwrap().as_str().unwrap();
let (tx, rx) = ipc::channel().unwrap();
- self.script_chan.send(GetLayout(self.pipeline,
- registry.actor_to_script(target.to_owned()),
- tx))
- .unwrap();
+ self.script_chan
+ .send(GetLayout(
+ self.pipeline,
+ registry.actor_to_script(target.to_owned()),
+ tx,
+ )).unwrap();
let ComputedNodeLayout {
- display, position, zIndex, boxSizing,
- autoMargins, marginTop, marginRight, marginBottom, marginLeft,
- borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,
- paddingTop, paddingRight, paddingBottom, paddingLeft,
- width, height,
+ display,
+ position,
+ zIndex,
+ boxSizing,
+ autoMargins,
+ marginTop,
+ marginRight,
+ marginBottom,
+ marginLeft,
+ borderTopWidth,
+ borderRightWidth,
+ borderBottomWidth,
+ borderLeftWidth,
+ paddingTop,
+ paddingRight,
+ paddingBottom,
+ paddingLeft,
+ width,
+ height,
} = rx.recv().unwrap().ok_or(())?;
- let auto_margins = msg.get("autoMargins")
- .and_then(&Value::as_bool).unwrap_or(false);
+ let auto_margins = msg
+ .get("autoMargins")
+ .and_then(&Value::as_bool)
+ .unwrap_or(false);
// http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js
let msg = GetLayoutReply {
@@ -504,10 +536,18 @@ impl Actor for PageStyleActor {
autoMargins: if auto_margins {
let mut m = Map::new();
let auto = serde_json::value::Value::String("auto".to_owned());
- if autoMargins.top { m.insert("top".to_owned(), auto.clone()); }
- if autoMargins.right { m.insert("right".to_owned(), auto.clone()); }
- if autoMargins.bottom { m.insert("bottom".to_owned(), auto.clone()); }
- if autoMargins.left { m.insert("left".to_owned(), auto.clone()); }
+ if autoMargins.top {
+ m.insert("top".to_owned(), auto.clone());
+ }
+ if autoMargins.right {
+ m.insert("right".to_owned(), auto.clone());
+ }
+ if autoMargins.bottom {
+ m.insert("bottom".to_owned(), auto.clone());
+ }
+ if autoMargins.left {
+ m.insert("left".to_owned(), auto.clone());
+ }
serde_json::value::Value::Object(m)
} else {
serde_json::value::Value::Null
@@ -531,7 +571,7 @@ impl Actor for PageStyleActor {
let msg = serde_json::from_str::<Value>(&msg).unwrap();
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
_ => ActorMessageStatus::Ignored,
})
@@ -543,11 +583,13 @@ impl Actor for InspectorActor {
self.name.clone()
}
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- _msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ _msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"getWalker" => {
if self.walker.borrow().is_none() {
@@ -562,21 +604,24 @@ impl Actor for InspectorActor {
}
let (tx, rx) = ipc::channel().unwrap();
- self.script_chan.send(GetRootNode(self.pipeline, tx)).unwrap();
+ self.script_chan
+ .send(GetRootNode(self.pipeline, tx))
+ .unwrap();
let root_info = rx.recv().unwrap().ok_or(())?;
- let node = root_info.encode(registry, false, self.script_chan.clone(), self.pipeline);
+ let node =
+ root_info.encode(registry, false, self.script_chan.clone(), self.pipeline);
let msg = GetWalkerReply {
from: self.name(),
walker: WalkerMsg {
actor: self.walker.borrow().clone().unwrap(),
root: node,
- }
+ },
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"getPageStyle" => {
if self.pageStyle.borrow().is_none() {
@@ -598,7 +643,7 @@ impl Actor for InspectorActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
//TODO: this is an old message; try adding highlightable to the root traits instead
// and support getHighlighter instead
@@ -621,7 +666,7 @@ impl Actor for InspectorActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
_ => ActorMessageStatus::Ignored,
})
diff --git a/components/devtools/actors/memory.rs b/components/devtools/actors/memory.rs
index 518358ea69b..b88b5a3cf20 100644
--- a/components/devtools/actors/memory.rs
+++ b/components/devtools/actors/memory.rs
@@ -28,11 +28,13 @@ impl Actor for MemoryActor {
self.name.clone()
}
- fn handle_message(&self,
- _registry: &ActorRegistry,
- _msg_type: &str,
- _msg: &Map<String, Value>,
- _stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ _registry: &ActorRegistry,
+ _msg_type: &str,
+ _msg: &Map<String, Value>,
+ _stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(ActorMessageStatus::Ignored)
}
}
@@ -42,7 +44,7 @@ impl MemoryActor {
pub fn create(registry: &ActorRegistry) -> String {
let actor_name = registry.new_name("memory");
let actor = MemoryActor {
- name: actor_name.clone()
+ name: actor_name.clone(),
};
registry.register_later(Box::new(actor));
diff --git a/components/devtools/actors/network_event.rs b/components/devtools/actors/network_event.rs
index 0906971821a..5e4fe01bcf3 100644
--- a/components/devtools/actors/network_event.rs
+++ b/components/devtools/actors/network_event.rs
@@ -34,7 +34,7 @@ struct HttpRequest {
struct HttpResponse {
headers: Option<Headers>,
status: Option<RawStatus>,
- body: Option<Vec<u8>>
+ body: Option<Vec<u8>>,
}
pub struct NetworkEventActor {
@@ -52,7 +52,7 @@ pub struct EventActor {
pub startedDateTime: String,
pub timeStamp: i64,
pub isXHR: bool,
- pub private: bool
+ pub private: bool,
}
#[derive(Serialize)]
@@ -79,14 +79,12 @@ pub struct ResponseContentMsg {
pub discardResponseBody: bool,
}
-
#[derive(Serialize)]
pub struct ResponseHeadersMsg {
pub headers: usize,
pub headersSize: usize,
}
-
#[derive(Serialize)]
pub struct RequestCookiesMsg {
pub cookies: usize,
@@ -103,7 +101,7 @@ struct GetRequestHeadersReply {
from: String,
headers: Vec<Header>,
headerSize: usize,
- rawHeaders: String
+ rawHeaders: String,
}
#[derive(Serialize)]
@@ -117,7 +115,7 @@ struct GetResponseHeadersReply {
from: String,
headers: Vec<Header>,
headerSize: usize,
- rawHeaders: String
+ rawHeaders: String,
}
#[derive(Serialize)]
@@ -131,19 +129,19 @@ struct GetResponseContentReply {
struct GetRequestPostDataReply {
from: String,
postData: Option<Vec<u8>>,
- postDataDiscarded: bool
+ postDataDiscarded: bool,
}
#[derive(Serialize)]
struct GetRequestCookiesReply {
from: String,
- cookies: Vec<u8>
+ cookies: Vec<u8>,
}
#[derive(Serialize)]
struct GetResponseCookiesReply {
from: String,
- cookies: Vec<u8>
+ cookies: Vec<u8>,
}
#[derive(Serialize)]
@@ -179,11 +177,13 @@ impl Actor for NetworkEventActor {
self.name.clone()
}
- fn handle_message(&self,
- _registry: &ActorRegistry,
- msg_type: &str,
- _msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ _registry: &ActorRegistry,
+ msg_type: &str,
+ _msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"getRequestHeaders" => {
let mut headers = Vec::new();
@@ -194,7 +194,10 @@ impl Actor for NetworkEventActor {
let value = item.value_string();
rawHeadersString = rawHeadersString + name + ":" + &value + "\r\n";
headersSize += name.len() + value.len();
- headers.push(Header { name: name.to_owned(), value: value.to_owned() });
+ headers.push(Header {
+ name: name.to_owned(),
+ value: value.to_owned(),
+ });
}
let msg = GetRequestHeadersReply {
from: self.name(),
@@ -204,7 +207,7 @@ impl Actor for NetworkEventActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"getRequestCookies" => {
let mut cookies = Vec::new();
if let Some(req_cookies) = self.request.headers.get_raw("Cookie") {
@@ -221,7 +224,7 @@ impl Actor for NetworkEventActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"getRequestPostData" => {
let msg = GetRequestPostDataReply {
from: self.name(),
@@ -230,7 +233,7 @@ impl Actor for NetworkEventActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"getResponseHeaders" => {
if let Some(ref response_headers) = self.response.headers {
let mut headers = vec![];
@@ -258,7 +261,7 @@ impl Actor for NetworkEventActor {
stream.write_json_packet(&msg);
}
ActorMessageStatus::Processed
- }
+ },
"getResponseCookies" => {
let mut cookies = Vec::new();
if let Some(res_cookies) = self.request.headers.get_raw("set-cookie") {
@@ -275,7 +278,7 @@ impl Actor for NetworkEventActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"getResponseContent" => {
let msg = GetResponseContentReply {
from: self.name(),
@@ -284,7 +287,7 @@ impl Actor for NetworkEventActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"getEventTimings" => {
// TODO: This is a fake timings msg
let timingsObj = Timings {
@@ -304,19 +307,19 @@ impl Actor for NetworkEventActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"getSecurityInfo" => {
// TODO: Send the correct values for securityInfo.
let msg = GetSecurityInfoReply {
from: self.name(),
securityInfo: SecurityInfo {
- state: "insecure".to_owned()
+ state: "insecure".to_owned(),
},
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
- _ => ActorMessageStatus::Ignored
+ },
+ _ => ActorMessageStatus::Ignored,
})
}
}
@@ -382,8 +385,13 @@ impl NetworkEventActor {
// TODO: Send the correct values for all these fields.
let hSizeOption = self.response.headers.as_ref().map(|headers| headers.len());
let hSize = hSizeOption.unwrap_or(0);
- let (status_code, status_message) = self.response.status.as_ref().
- map_or((0, "".to_owned()), |&RawStatus(ref code, ref text)| (*code, text.clone().into_owned()));
+ let (status_code, status_message) = self
+ .response
+ .status
+ .as_ref()
+ .map_or((0, "".to_owned()), |&RawStatus(ref code, ref text)| {
+ (*code, text.clone().into_owned())
+ });
// TODO: Send the correct values for remoteAddress and remotePort and http_version.
ResponseStartMsg {
httpVersion: "HTTP/1.1".to_owned(),
@@ -392,7 +400,7 @@ impl NetworkEventActor {
status: status_code.to_string(),
statusText: status_message,
headersSize: hSize,
- discardResponseBody: false
+ discardResponseBody: false,
}
}
@@ -401,7 +409,7 @@ impl NetworkEventActor {
if let Some(ref headers) = self.response.headers {
mString = match headers.get() {
Some(&ContentType(ref mime)) => mime.to_string(),
- None => "".to_owned()
+ None => "".to_owned(),
};
}
// TODO: Set correct values when response's body is sent to the devtools in http_loader.
@@ -418,7 +426,7 @@ impl NetworkEventActor {
if let Some(ref headers) = self.response.headers {
cookies_size = match headers.get() {
Some(&Cookie(ref cookie)) => cookie.len(),
- None => 0
+ None => 0,
};
}
ResponseCookiesMsg {
@@ -431,10 +439,9 @@ impl NetworkEventActor {
let mut headers_byte_count = 0;
if let Some(ref headers) = self.response.headers {
headers_size = headers.len();
- for item in headers.iter() {
+ for item in headers.iter() {
headers_byte_count += item.name().len() + item.value_string().len();
}
-
}
ResponseHeadersMsg {
headers: headers_size,
@@ -443,10 +450,11 @@ impl NetworkEventActor {
}
pub fn request_headers(&self) -> RequestHeadersMsg {
- let size = self.request
- .headers
- .iter()
- .fold(0, |acc, h| acc + h.name().len() + h.value_string().len());
+ let size = self
+ .request
+ .headers
+ .iter()
+ .fold(0, |acc, h| acc + h.name().len() + h.value_string().len());
RequestHeadersMsg {
headers: self.request.headers.len(),
headersSize: size,
@@ -456,7 +464,7 @@ impl NetworkEventActor {
pub fn request_cookies(&self) -> RequestCookiesMsg {
let cookies_size = match self.request.headers.get() {
Some(&Cookie(ref cookie)) => cookie.len(),
- None => 0
+ None => 0,
};
RequestCookiesMsg {
cookies: cookies_size,
diff --git a/components/devtools/actors/object.rs b/components/devtools/actors/object.rs
index 943adf8b5fc..0ed2facf848 100644
--- a/components/devtools/actors/object.rs
+++ b/components/devtools/actors/object.rs
@@ -15,11 +15,13 @@ impl Actor for ObjectActor {
fn name(&self) -> String {
self.name.clone()
}
- fn handle_message(&self,
- _: &ActorRegistry,
- _: &str,
- _: &Map<String, Value>,
- _: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ _: &ActorRegistry,
+ _: &str,
+ _: &Map<String, Value>,
+ _: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(ActorMessageStatus::Ignored)
}
}
diff --git a/components/devtools/actors/performance.rs b/components/devtools/actors/performance.rs
index c246cb26fa4..b3f367958a6 100644
--- a/components/devtools/actors/performance.rs
+++ b/components/devtools/actors/performance.rs
@@ -51,11 +51,13 @@ impl Actor for PerformanceActor {
self.name.clone()
}
- fn handle_message(&self,
- _registry: &ActorRegistry,
- msg_type: &str,
- _msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ _registry: &ActorRegistry,
+ msg_type: &str,
+ _msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"connect" => {
let msg = ConnectReply {
@@ -79,11 +81,11 @@ impl Actor for PerformanceActor {
value: SuccessMsg {
success: true,
errors: vec![],
- }
+ },
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
_ => ActorMessageStatus::Ignored,
})
}
@@ -91,28 +93,34 @@ impl Actor for PerformanceActor {
impl PerformanceActor {
pub fn new(name: String) -> PerformanceActor {
- PerformanceActor {
- name: name,
- }
+ PerformanceActor { name: name }
}
pub fn description() -> ActorDescription {
ActorDescription {
category: "actor",
typeName: "performance",
- methods: vec![
- Method {
- name: "canCurrentlyRecord",
- request: Value::Object(vec![
- ("type".to_owned(), Value::String("canCurrentlyRecord".to_owned())),
- ].into_iter().collect()),
- response: Value::Object(vec![
- ("value".to_owned(), Value::Object(vec![
- ("_retval".to_owned(), Value::String("json".to_owned())),
- ].into_iter().collect())),
- ].into_iter().collect()),
- },
- ],
+ methods: vec![Method {
+ name: "canCurrentlyRecord",
+ request: Value::Object(
+ vec![(
+ "type".to_owned(),
+ Value::String("canCurrentlyRecord".to_owned()),
+ )].into_iter()
+ .collect(),
+ ),
+ response: Value::Object(
+ vec![(
+ "value".to_owned(),
+ Value::Object(
+ vec![("_retval".to_owned(), Value::String("json".to_owned()))]
+ .into_iter()
+ .collect(),
+ ),
+ )].into_iter()
+ .collect(),
+ ),
+ }],
}
}
}
diff --git a/components/devtools/actors/profiler.rs b/components/devtools/actors/profiler.rs
index a80e3c0018b..cb19f7afb6b 100644
--- a/components/devtools/actors/profiler.rs
+++ b/components/devtools/actors/profiler.rs
@@ -15,19 +15,19 @@ impl Actor for ProfilerActor {
self.name.clone()
}
- fn handle_message(&self,
- _registry: &ActorRegistry,
- _msg_type: &str,
- _msg: &Map<String, Value>,
- _stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ _registry: &ActorRegistry,
+ _msg_type: &str,
+ _msg: &Map<String, Value>,
+ _stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(ActorMessageStatus::Ignored)
}
}
impl ProfilerActor {
pub fn new(name: String) -> ProfilerActor {
- ProfilerActor {
- name: name,
- }
+ ProfilerActor { name: name }
}
}
diff --git a/components/devtools/actors/root.rs b/components/devtools/actors/root.rs
index 20629ea7a7b..4e12055ec8e 100644
--- a/components/devtools/actors/root.rs
+++ b/components/devtools/actors/root.rs
@@ -6,7 +6,6 @@
/// (http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/root.js).
/// Connection point for all new remote devtools interactions, providing lists of know actors
/// that perform more specific actions (tabs, addons, browser chrome, etc.)
-
use actor::{Actor, ActorMessageStatus, ActorRegistry};
use actors::performance::PerformanceActor;
use actors::tab::{TabActor, TabActorMsg};
@@ -65,11 +64,13 @@ impl Actor for RootActor {
"root".to_owned()
}
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- _msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ _msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"listAddons" => {
let actor = ListAddonsReply {
@@ -78,20 +79,22 @@ impl Actor for RootActor {
};
stream.write_json_packet(&actor);
ActorMessageStatus::Processed
- }
+ },
//https://wiki.mozilla.org/Remote_Debugging_Protocol#Listing_Browser_Tabs
"listTabs" => {
let actor = ListTabsReply {
from: "root".to_owned(),
selected: 0,
- tabs: self.tabs.iter().map(|tab| {
- registry.find::<TabActor>(tab).encodable()
- }).collect()
+ tabs: self
+ .tabs
+ .iter()
+ .map(|tab| registry.find::<TabActor>(tab).encodable())
+ .collect(),
};
stream.write_json_packet(&actor);
ActorMessageStatus::Processed
- }
+ },
"protocolDescription" => {
let msg = ProtocolDescriptionReply {
@@ -102,9 +105,9 @@ impl Actor for RootActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
- _ => ActorMessageStatus::Ignored
+ _ => ActorMessageStatus::Ignored,
})
}
}
@@ -118,7 +121,7 @@ impl RootActor {
sources: true,
highlightable: true,
customHighlighters: true,
- networkMonitor: true
+ networkMonitor: true,
},
}
}
diff --git a/components/devtools/actors/tab.rs b/components/devtools/actors/tab.rs
index 916c5319386..e6f50773f68 100644
--- a/components/devtools/actors/tab.rs
+++ b/components/devtools/actors/tab.rs
@@ -37,7 +37,7 @@ struct TabDetachedReply {
#[derive(Serialize)]
struct ReconfigureReply {
- from: String
+ from: String,
}
#[derive(Serialize)]
@@ -84,25 +84,28 @@ impl Actor for TabActor {
self.name.clone()
}
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"reconfigure" => {
if let Some(options) = msg.get("options").and_then(|o| o.as_object()) {
if let Some(val) = options.get("performReload") {
if val.as_bool().unwrap_or(false) {
let console_actor = registry.find::<ConsoleActor>(&self.console);
- let _ = console_actor.script_chan.send(
- DevtoolScriptControlMsg::Reload(console_actor.pipeline));
+ let _ = console_actor
+ .script_chan
+ .send(DevtoolScriptControlMsg::Reload(console_actor.pipeline));
}
}
}
stream.write_json_packet(&ReconfigureReply { from: self.name() });
ActorMessageStatus::Processed
- }
+ },
// https://wiki.mozilla.org/Remote_Debugging_Protocol#Listing_Browser_Tabs
// (see "To attach to a _tabActor_")
@@ -116,12 +119,17 @@ impl Actor for TabActor {
traits: TabTraits,
};
let console_actor = registry.find::<ConsoleActor>(&self.console);
- console_actor.streams.borrow_mut().push(stream.try_clone().unwrap());
+ console_actor
+ .streams
+ .borrow_mut()
+ .push(stream.try_clone().unwrap());
stream.write_json_packet(&msg);
- console_actor.script_chan.send(
- WantsLiveNotifications(console_actor.pipeline, true)).unwrap();
+ console_actor
+ .script_chan
+ .send(WantsLiveNotifications(console_actor.pipeline, true))
+ .unwrap();
ActorMessageStatus::Processed
- }
+ },
//FIXME: The current implementation won't work for multiple connections. Need to ensure 105
// that the correct stream is removed.
@@ -133,21 +141,23 @@ impl Actor for TabActor {
let console_actor = registry.find::<ConsoleActor>(&self.console);
console_actor.streams.borrow_mut().pop();
stream.write_json_packet(&msg);
- console_actor.script_chan.send(
- WantsLiveNotifications(console_actor.pipeline, false)).unwrap();
+ console_actor
+ .script_chan
+ .send(WantsLiveNotifications(console_actor.pipeline, false))
+ .unwrap();
ActorMessageStatus::Processed
- }
+ },
"listFrames" => {
let msg = ListFramesReply {
from: self.name(),
- frames: vec!(),
+ frames: vec![],
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
- _ => ActorMessageStatus::Ignored
+ _ => ActorMessageStatus::Ignored,
})
}
}
diff --git a/components/devtools/actors/thread.rs b/components/devtools/actors/thread.rs
index 7be5bc55f23..dc2638bd135 100644
--- a/components/devtools/actors/thread.rs
+++ b/components/devtools/actors/thread.rs
@@ -35,7 +35,7 @@ struct ThreadResumedReply {
#[derive(Serialize)]
struct ReconfigureReply {
- from: String
+ from: String,
}
#[derive(Serialize)]
@@ -53,9 +53,7 @@ pub struct ThreadActor {
impl ThreadActor {
pub fn new(name: String) -> ThreadActor {
- ThreadActor {
- name: name,
- }
+ ThreadActor { name: name }
}
}
@@ -64,11 +62,13 @@ impl Actor for ThreadActor {
self.name.clone()
}
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- _msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ _msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"attach" => {
let msg = ThreadAttachedReply {
@@ -76,7 +76,9 @@ impl Actor for ThreadActor {
type_: "paused".to_owned(),
actor: registry.new_name("pause"),
poppedFrames: vec![],
- why: WhyMsg { type_: "attached".to_owned() },
+ why: WhyMsg {
+ type_: "attached".to_owned(),
+ },
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
@@ -94,7 +96,7 @@ impl Actor for ThreadActor {
"reconfigure" => {
stream.write_json_packet(&ReconfigureReply { from: self.name() });
ActorMessageStatus::Processed
- }
+ },
"sources" => {
let msg = SourcesReply {
@@ -103,7 +105,7 @@ impl Actor for ThreadActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
_ => ActorMessageStatus::Ignored,
})
diff --git a/components/devtools/actors/timeline.rs b/components/devtools/actors/timeline.rs
index 0ea57ad8dbb..d5b5295a138 100644
--- a/components/devtools/actors/timeline.rs
+++ b/components/devtools/actors/timeline.rs
@@ -44,7 +44,7 @@ struct Emitter {
#[derive(Serialize)]
struct IsRecordingReply {
from: String,
- value: bool
+ value: bool,
}
#[derive(Serialize)]
@@ -103,8 +103,10 @@ pub struct HighResolutionStamp(f64);
impl HighResolutionStamp {
pub fn new(start_stamp: PreciseTime, time: PreciseTime) -> HighResolutionStamp {
- let duration = start_stamp.to(time).num_microseconds()
- .expect("Too big duration in microseconds");
+ let duration = start_stamp
+ .to(time)
+ .num_microseconds()
+ .expect("Too big duration in microseconds");
HighResolutionStamp(duration as f64 / 1000 as f64)
}
@@ -122,11 +124,12 @@ impl Serialize for HighResolutionStamp {
static DEFAULT_TIMELINE_DATA_PULL_TIMEOUT: u64 = 200; //ms
impl TimelineActor {
- pub fn new(name: String,
- pipeline: PipelineId,
- script_sender: IpcSender<DevtoolScriptControlMsg>) -> TimelineActor {
- let marker_types = vec!(TimelineMarkerType::Reflow,
- TimelineMarkerType::DOMEvent);
+ pub fn new(
+ name: String,
+ pipeline: PipelineId,
+ script_sender: IpcSender<DevtoolScriptControlMsg>,
+ ) -> TimelineActor {
+ let marker_types = vec![TimelineMarkerType::Reflow, TimelineMarkerType::DOMEvent];
TimelineActor {
name: name,
@@ -141,15 +144,20 @@ impl TimelineActor {
}
}
- fn pull_timeline_data(&self, receiver: IpcReceiver<Option<TimelineMarker>>, mut emitter: Emitter) {
+ fn pull_timeline_data(
+ &self,
+ receiver: IpcReceiver<Option<TimelineMarker>>,
+ mut emitter: Emitter,
+ ) {
let is_recording = self.is_recording.clone();
if !*is_recording.lock().unwrap() {
return;
}
- thread::Builder::new().name("PullTimelineMarkers".to_owned()).spawn(move || {
- loop {
+ thread::Builder::new()
+ .name("PullTimelineMarkers".to_owned())
+ .spawn(move || loop {
if !*is_recording.lock().unwrap() {
break;
}
@@ -161,8 +169,7 @@ impl TimelineActor {
emitter.send(markers);
thread::sleep(Duration::from_millis(DEFAULT_TIMELINE_DATA_PULL_TIMEOUT));
- }
- }).expect("Thread spawning failed");
+ }).expect("Thread spawning failed");
}
}
@@ -171,19 +178,24 @@ impl Actor for TimelineActor {
self.name.clone()
}
- fn handle_message(&self,
- registry: &ActorRegistry,
- msg_type: &str,
- msg: &Map<String, Value>,
- stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ registry: &ActorRegistry,
+ msg_type: &str,
+ msg: &Map<String, Value>,
+ stream: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"start" => {
**self.is_recording.lock().as_mut().unwrap() = true;
let (tx, rx) = ipc::channel::<Option<TimelineMarker>>().unwrap();
- self.script_sender.send(SetTimelineMarkers(self.pipeline,
- self.marker_types.clone(),
- tx)).unwrap();
+ self.script_sender
+ .send(SetTimelineMarkers(
+ self.pipeline,
+ self.marker_types.clone(),
+ tx,
+ )).unwrap();
*self.stream.borrow_mut() = stream.try_clone().ok();
@@ -198,18 +210,22 @@ impl Actor for TimelineActor {
if let Some(with_ticks) = msg.get("withTicks") {
if let Some(true) = with_ticks.as_bool() {
let framerate_actor = Some(FramerateActor::create(
- registry,
- self.pipeline.clone(),
- self.script_sender.clone()));
+ registry,
+ self.pipeline.clone(),
+ self.script_sender.clone(),
+ ));
*self.framerate_actor.borrow_mut() = framerate_actor;
}
}
- let emitter = Emitter::new(self.name(), registry.shareable(),
- registry.start_stamp(),
- stream.try_clone().unwrap(),
- self.memory_actor.borrow().clone(),
- self.framerate_actor.borrow().clone());
+ let emitter = Emitter::new(
+ self.name(),
+ registry.shareable(),
+ registry.start_stamp(),
+ stream.try_clone().unwrap(),
+ self.memory_actor.borrow().clone(),
+ self.framerate_actor.borrow().clone(),
+ );
self.pull_timeline_data(rx, emitter);
@@ -219,7 +235,7 @@ impl Actor for TimelineActor {
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
"stop" => {
let msg = StopReply {
@@ -228,7 +244,11 @@ impl Actor for TimelineActor {
};
stream.write_json_packet(&msg);
- self.script_sender.send(DropTimelineMarkers(self.pipeline, self.marker_types.clone())).unwrap();
+ self.script_sender
+ .send(DropTimelineMarkers(
+ self.pipeline,
+ self.marker_types.clone(),
+ )).unwrap();
if let Some(ref actor_name) = *self.framerate_actor.borrow() {
registry.drop_actor_later(actor_name.clone());
@@ -241,32 +261,32 @@ impl Actor for TimelineActor {
**self.is_recording.lock().as_mut().unwrap() = false;
self.stream.borrow_mut().take();
ActorMessageStatus::Processed
- }
+ },
"isRecording" => {
let msg = IsRecordingReply {
from: self.name(),
- value: self.is_recording.lock().unwrap().clone()
+ value: self.is_recording.lock().unwrap().clone(),
};
stream.write_json_packet(&msg);
ActorMessageStatus::Processed
- }
+ },
- _ => {
- ActorMessageStatus::Ignored
- }
+ _ => ActorMessageStatus::Ignored,
})
}
}
impl Emitter {
- pub fn new(name: String,
- registry: Arc<Mutex<ActorRegistry>>,
- start_stamp: PreciseTime,
- stream: TcpStream,
- memory_actor_name: Option<String>,
- framerate_actor_name: Option<String>) -> Emitter {
+ pub fn new(
+ name: String,
+ registry: Arc<Mutex<ActorRegistry>>,
+ start_stamp: PreciseTime,
+ stream: TcpStream,
+ memory_actor_name: Option<String>,
+ framerate_actor_name: Option<String>,
+ ) -> Emitter {
Emitter {
from: name,
stream: stream,
diff --git a/components/devtools/actors/worker.rs b/components/devtools/actors/worker.rs
index 1beead719dc..9ccc5b2e10b 100644
--- a/components/devtools/actors/worker.rs
+++ b/components/devtools/actors/worker.rs
@@ -17,11 +17,13 @@ impl Actor for WorkerActor {
fn name(&self) -> String {
self.name.clone()
}
- fn handle_message(&self,
- _: &ActorRegistry,
- _: &str,
- _: &Map<String, Value>,
- _: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
+ fn handle_message(
+ &self,
+ _: &ActorRegistry,
+ _: &str,
+ _: &Map<String, Value>,
+ _: &mut TcpStream,
+ ) -> Result<ActorMessageStatus, ()> {
Ok(ActorMessageStatus::Processed)
}
}
diff --git a/components/devtools/lib.rs b/components/devtools/lib.rs
index 31a98d7d5a6..2e11fa0eda2 100644
--- a/components/devtools/lib.rs
+++ b/components/devtools/lib.rs
@@ -9,7 +9,6 @@
#![crate_name = "devtools"]
#![crate_type = "rlib"]
-
#![allow(non_snake_case)]
#![deny(unsafe_code)]
@@ -19,7 +18,8 @@ extern crate ipc_channel;
#[macro_use]
extern crate log;
extern crate msg;
-#[macro_use] extern crate serde;
+#[macro_use]
+extern crate serde;
extern crate serde_json;
extern crate time;
@@ -128,23 +128,24 @@ pub fn start_server(port: u16) -> Sender<DevtoolsControlMsg> {
let (sender, receiver) = channel();
{
let sender = sender.clone();
- thread::Builder::new().name("Devtools".to_owned()).spawn(move || {
- run_server(sender, receiver, port)
- }).expect("Thread spawning failed");
+ thread::Builder::new()
+ .name("Devtools".to_owned())
+ .spawn(move || run_server(sender, receiver, port))
+ .expect("Thread spawning failed");
}
sender
}
-fn run_server(sender: Sender<DevtoolsControlMsg>,
- receiver: Receiver<DevtoolsControlMsg>,
- port: u16) {
+fn run_server(
+ sender: Sender<DevtoolsControlMsg>,
+ receiver: Receiver<DevtoolsControlMsg>,
+ port: u16,
+) {
let listener = TcpListener::bind(&("127.0.0.1", port)).unwrap();
let mut registry = ActorRegistry::new();
- let root = Box::new(RootActor {
- tabs: vec!(),
- });
+ let root = Box::new(RootActor { tabs: vec![] });
registry.register(root);
registry.find::<RootActor>("root");
@@ -158,7 +159,6 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
let mut actor_workers: HashMap<(PipelineId, WorkerId), String> = HashMap::new();
-
/// Process the input from a single devtools client until EOF.
fn handle_client(actors: Arc<Mutex<ActorRegistry>>, mut stream: TcpStream) {
debug!("connection established to {}", stream.peer_addr().unwrap());
@@ -171,21 +171,24 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
'outer: loop {
match stream.read_json_packet() {
Ok(Some(json_packet)) => {
- if let Err(()) = actors.lock().unwrap().handle_message(json_packet.as_object().unwrap(),
- &mut stream) {
+ if let Err(()) = actors
+ .lock()
+ .unwrap()
+ .handle_message(json_packet.as_object().unwrap(), &mut stream)
+ {
debug!("error: devtools actor stopped responding");
let _ = stream.shutdown(Shutdown::Both);
- break 'outer
+ break 'outer;
}
- }
+ },
Ok(None) => {
debug!("error: EOF");
- break 'outer
- }
+ break 'outer;
+ },
Err(err_msg) => {
debug!("error: {}", err_msg);
- break 'outer
- }
+ break 'outer;
+ },
}
}
}
@@ -199,12 +202,14 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
// We need separate actor representations for each script global that exists;
// clients can theoretically connect to multiple globals simultaneously.
// TODO: move this into the root or tab modules?
- fn handle_new_global(actors: Arc<Mutex<ActorRegistry>>,
- ids: (PipelineId, Option<WorkerId>),
- script_sender: IpcSender<DevtoolScriptControlMsg>,
- actor_pipelines: &mut HashMap<PipelineId, String>,
- actor_workers: &mut HashMap<(PipelineId, WorkerId), String>,
- page_info: DevtoolsPageInfo) {
+ fn handle_new_global(
+ actors: Arc<Mutex<ActorRegistry>>,
+ ids: (PipelineId, Option<WorkerId>),
+ script_sender: IpcSender<DevtoolScriptControlMsg>,
+ actor_pipelines: &mut HashMap<PipelineId, String>,
+ actor_workers: &mut HashMap<(PipelineId, WorkerId), String>,
+ page_info: DevtoolsPageInfo,
+ ) {
let mut actors = actors.lock().unwrap();
let (pipeline, worker_id) = ids;
@@ -226,9 +231,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
pipeline: pipeline,
};
- let timeline = TimelineActor::new(actors.new_name("timeline"),
- pipeline,
- script_sender);
+ let timeline = TimelineActor::new(actors.new_name("timeline"), pipeline, script_sender);
let profiler = ProfilerActor::new(actors.new_name("profiler"));
let performance = PerformanceActor::new(actors.new_name("performance"));
@@ -251,7 +254,15 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
let root = actors.find_mut::<RootActor>("root");
root.tabs.push(tab.name.clone());
- (tab, console, inspector, timeline, profiler, performance, thread)
+ (
+ tab,
+ console,
+ inspector,
+ timeline,
+ profiler,
+ performance,
+ thread,
+ )
};
if let Some(id) = worker_id {
@@ -274,14 +285,21 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
actors.register(Box::new(thread));
}
- fn handle_console_message(actors: Arc<Mutex<ActorRegistry>>,
- id: PipelineId,
- worker_id: Option<WorkerId>,
- console_message: ConsoleMessage,
- actor_pipelines: &HashMap<PipelineId, String>,
- actor_workers: &HashMap<(PipelineId, WorkerId), String>) {
- let console_actor_name = match find_console_actor(actors.clone(), id, worker_id, actor_workers,
- actor_pipelines) {
+ fn handle_console_message(
+ actors: Arc<Mutex<ActorRegistry>>,
+ id: PipelineId,
+ worker_id: Option<WorkerId>,
+ console_message: ConsoleMessage,
+ actor_pipelines: &HashMap<PipelineId, String>,
+ actor_workers: &HashMap<(PipelineId, WorkerId), String>,
+ ) {
+ let console_actor_name = match find_console_actor(
+ actors.clone(),
+ id,
+ worker_id,
+ actor_workers,
+ actor_pipelines,
+ ) {
Some(name) => name,
None => return,
};
@@ -296,10 +314,10 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
LogLevel::Info => "info",
LogLevel::Warn => "warn",
LogLevel::Error => "error",
- _ => "log"
+ _ => "log",
}.to_owned(),
timeStamp: precise_time_ns(),
- arguments: vec!(console_message.message),
+ arguments: vec![console_message.message],
filename: console_message.filename,
lineNumber: console_message.lineNumber,
columnNumber: console_message.columnNumber,
@@ -310,11 +328,13 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
}
}
- fn find_console_actor(actors: Arc<Mutex<ActorRegistry>>,
- id: PipelineId,
- worker_id: Option<WorkerId>,
- actor_workers: &HashMap<(PipelineId, WorkerId), String>,
- actor_pipelines: &HashMap<PipelineId, String>) -> Option<String> {
+ fn find_console_actor(
+ actors: Arc<Mutex<ActorRegistry>>,
+ id: PipelineId,
+ worker_id: Option<WorkerId>,
+ actor_workers: &HashMap<(PipelineId, WorkerId), String>,
+ actor_pipelines: &HashMap<PipelineId, String>,
+ ) -> Option<String> {
let actors = actors.lock().unwrap();
if let Some(worker_id) = worker_id {
let actor_name = (*actor_workers).get(&(id, worker_id))?;
@@ -325,20 +345,28 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
}
}
- fn handle_network_event(actors: Arc<Mutex<ActorRegistry>>,
- mut connections: Vec<TcpStream>,
- actor_pipelines: &HashMap<PipelineId, String>,
- actor_requests: &mut HashMap<String, String>,
- actor_workers: &HashMap<(PipelineId, WorkerId), String>,
- pipeline_id: PipelineId,
- request_id: String,
- network_event: NetworkEvent) {
- let console_actor_name = match find_console_actor(actors.clone(), pipeline_id, None,
- actor_workers, actor_pipelines) {
+ fn handle_network_event(
+ actors: Arc<Mutex<ActorRegistry>>,
+ mut connections: Vec<TcpStream>,
+ actor_pipelines: &HashMap<PipelineId, String>,
+ actor_requests: &mut HashMap<String, String>,
+ actor_workers: &HashMap<(PipelineId, WorkerId), String>,
+ pipeline_id: PipelineId,
+ request_id: String,
+ network_event: NetworkEvent,
+ ) {
+ let console_actor_name = match find_console_actor(
+ actors.clone(),
+ pipeline_id,
+ None,
+ actor_workers,
+ actor_pipelines,
+ ) {
Some(name) => name,
None => return,
};
- let netevent_actor_name = find_network_event_actor(actors.clone(), actor_requests, request_id.clone());
+ let netevent_actor_name =
+ find_network_event_actor(actors.clone(), actor_requests, request_id.clone());
let mut actors = actors.lock().unwrap();
let actor = actors.find_mut::<NetworkEventActor>(&netevent_actor_name);
@@ -356,8 +384,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
for stream in &mut connections {
stream.write_json_packet(&msg);
}
-
- }
+ },
NetworkEvent::HttpResponse(httpresponse) => {
//Store the response information in the actor
actor.add_response(httpresponse);
@@ -385,7 +412,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
from: netevent_actor_name.clone(),
type_: "networkEventUpdate".to_owned(),
updateType: "responseStart".to_owned(),
- response: actor.response_start()
+ response: actor.response_start(),
};
for stream in &mut connections {
@@ -441,78 +468,109 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
for stream in &mut connections {
stream.write_merged_json_packet(&msg, &actor.response_headers());
}
- }
+ },
}
}
// Find the name of NetworkEventActor corresponding to request_id
// Create a new one if it does not exist, add it to the actor_requests hashmap
- fn find_network_event_actor(actors: Arc<Mutex<ActorRegistry>>,
- actor_requests: &mut HashMap<String, String>,
- request_id: String) -> String {
+ fn find_network_event_actor(
+ actors: Arc<Mutex<ActorRegistry>>,
+ actor_requests: &mut HashMap<String, String>,
+ request_id: String,
+ ) -> String {
let mut actors = actors.lock().unwrap();
match (*actor_requests).entry(request_id) {
Occupied(name) => {
//TODO: Delete from map like Firefox does?
name.into_mut().clone()
- }
+ },
Vacant(entry) => {
let actor_name = actors.new_name("netevent");
let actor = NetworkEventActor::new(actor_name.clone());
entry.insert(actor_name.clone());
actors.register(Box::new(actor));
actor_name
- }
+ },
}
}
let sender_clone = sender.clone();
- thread::Builder::new().name("DevtoolsClientAcceptor".to_owned()).spawn(move || {
- // accept connections and process them, spawning a new thread for each one
- for stream in listener.incoming() {
- // connection succeeded
- sender_clone.send(DevtoolsControlMsg::FromChrome(
- ChromeToDevtoolsControlMsg::AddClient(stream.unwrap()))).unwrap();
- }
- }).expect("Thread spawning failed");
+ thread::Builder::new()
+ .name("DevtoolsClientAcceptor".to_owned())
+ .spawn(move || {
+ // accept connections and process them, spawning a new thread for each one
+ for stream in listener.incoming() {
+ // connection succeeded
+ sender_clone
+ .send(DevtoolsControlMsg::FromChrome(
+ ChromeToDevtoolsControlMsg::AddClient(stream.unwrap()),
+ )).unwrap();
+ }
+ }).expect("Thread spawning failed");
while let Ok(msg) = receiver.recv() {
match msg {
DevtoolsControlMsg::FromChrome(ChromeToDevtoolsControlMsg::AddClient(stream)) => {
let actors = actors.clone();
accepted_connections.push(stream.try_clone().unwrap());
- thread::Builder::new().name("DevtoolsClientHandler".to_owned()).spawn(move || {
- handle_client(actors, stream.try_clone().unwrap())
- }).expect("Thread spawning failed");
- }
+ thread::Builder::new()
+ .name("DevtoolsClientHandler".to_owned())
+ .spawn(move || handle_client(actors, stream.try_clone().unwrap()))
+ .expect("Thread spawning failed");
+ },
DevtoolsControlMsg::FromScript(ScriptToDevtoolsControlMsg::FramerateTick(
- actor_name, tick)) =>
- handle_framerate_tick(actors.clone(), actor_name, tick),
+ actor_name,
+ tick,
+ )) => handle_framerate_tick(actors.clone(), actor_name, tick),
DevtoolsControlMsg::FromScript(ScriptToDevtoolsControlMsg::NewGlobal(
- ids, script_sender, pageinfo)) =>
- handle_new_global(actors.clone(), ids, script_sender, &mut actor_pipelines,
- &mut actor_workers, pageinfo),
+ ids,
+ script_sender,
+ pageinfo,
+ )) => handle_new_global(
+ actors.clone(),
+ ids,
+ script_sender,
+ &mut actor_pipelines,
+ &mut actor_workers,
+ pageinfo,
+ ),
DevtoolsControlMsg::FromScript(ScriptToDevtoolsControlMsg::ConsoleAPI(
- id,
- console_message,
- worker_id)) =>
- handle_console_message(actors.clone(), id, worker_id, console_message,
- &actor_pipelines, &actor_workers),
+ id,
+ console_message,
+ worker_id,
+ )) => handle_console_message(
+ actors.clone(),
+ id,
+ worker_id,
+ console_message,
+ &actor_pipelines,
+ &actor_workers,
+ ),
DevtoolsControlMsg::FromScript(ScriptToDevtoolsControlMsg::ReportCSSError(
- id,
- css_error)) => {
- let console_message = ConsoleMessage {
+ id,
+ css_error,
+ )) => {
+ let console_message = ConsoleMessage {
message: css_error.msg,
logLevel: LogLevel::Warn,
filename: css_error.filename,
lineNumber: css_error.line as usize,
columnNumber: css_error.column as usize,
};
- handle_console_message(actors.clone(), id, None, console_message,
- &actor_pipelines, &actor_workers)
+ handle_console_message(
+ actors.clone(),
+ id,
+ None,
+ console_message,
+ &actor_pipelines,
+ &actor_workers,
+ )
},
DevtoolsControlMsg::FromChrome(ChromeToDevtoolsControlMsg::NetworkEvent(
- request_id, network_event)) => {
+ request_id,
+ network_event,
+ )) => {
// copy the accepted_connections vector
let mut connections = Vec::<TcpStream>::new();
for stream in &accepted_connections {
@@ -523,10 +581,18 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
NetworkEvent::HttpResponse(ref response) => response.pipeline_id,
NetworkEvent::HttpRequest(ref request) => request.pipeline_id,
};
- handle_network_event(actors.clone(), connections, &actor_pipelines, &mut actor_requests,
- &actor_workers, pipeline_id, request_id, network_event);
+ handle_network_event(
+ actors.clone(),
+ connections,
+ &actor_pipelines,
+ &mut actor_requests,
+ &actor_workers,
+ pipeline_id,
+ request_id,
+ network_event,
+ );
},
- DevtoolsControlMsg::FromChrome(ChromeToDevtoolsControlMsg::ServerExitMsg) => break
+ DevtoolsControlMsg::FromChrome(ChromeToDevtoolsControlMsg::ServerExitMsg) => break,
}
}
for connection in &mut accepted_connections {
diff --git a/components/devtools/protocol.rs b/components/devtools/protocol.rs
index f0bfce4b3d7..999514affde 100644
--- a/components/devtools/protocol.rs
+++ b/components/devtools/protocol.rs
@@ -55,11 +55,11 @@ impl JsonPacketStream for TcpStream {
fn read_json_packet(&mut self) -> Result<Option<Value>, String> {
// https://wiki.mozilla.org/Remote_Debugging_Protocol_Stream_Transport
// In short, each JSON packet is [ascii length]:[JSON data of given length]
- let mut buffer = vec!();
+ let mut buffer = vec![];
loop {
let mut buf = [0];
let byte = match self.read(&mut buf) {
- Ok(0) => return Ok(None), // EOF
+ Ok(0) => return Ok(None), // EOF
Ok(1) => buf[0],
Ok(_) => unreachable!(),
Err(e) => return Err(e.description().to_owned()),
diff --git a/components/devtools_traits/lib.rs b/components/devtools_traits/lib.rs
index fe0f91c7e52..764af5da0a2 100644
--- a/components/devtools_traits/lib.rs
+++ b/components/devtools_traits/lib.rs
@@ -8,7 +8,6 @@
#![crate_name = "devtools_traits"]
#![crate_type = "rlib"]
-
#![allow(non_snake_case)]
#![deny(unsafe_code)]
@@ -17,9 +16,11 @@ extern crate bitflags;
extern crate hyper;
extern crate ipc_channel;
extern crate malloc_size_of;
-#[macro_use] extern crate malloc_size_of_derive;
+#[macro_use]
+extern crate malloc_size_of_derive;
extern crate msg;
-#[macro_use] extern crate serde;
+#[macro_use]
+extern crate serde;
extern crate servo_url;
extern crate time;
@@ -45,7 +46,7 @@ pub struct CSSError {
pub filename: String,
pub line: u32,
pub column: u32,
- pub msg: String
+ pub msg: String,
}
/// Messages to instruct the devtools server to update its known actors/state
@@ -75,9 +76,11 @@ pub enum ChromeToDevtoolsControlMsg {
pub enum ScriptToDevtoolsControlMsg {
/// A new global object was created, associated with a particular pipeline.
/// The means of communicating directly with it are provided.
- NewGlobal((PipelineId, Option<WorkerId>),
- IpcSender<DevtoolScriptControlMsg>,
- DevtoolsPageInfo),
+ NewGlobal(
+ (PipelineId, Option<WorkerId>),
+ IpcSender<DevtoolScriptControlMsg>,
+ DevtoolsPageInfo,
+ ),
/// A particular page has invoked the console API.
ConsoleAPI(PipelineId, ConsoleMessage, Option<WorkerId>),
/// An animation frame with the given timestamp was processed in a script thread.
@@ -201,13 +204,21 @@ pub enum DevtoolScriptControlMsg {
/// Retrieve the computed layout properties of the given node in the given pipeline.
GetLayout(PipelineId, String, IpcSender<Option<ComputedNodeLayout>>),
/// Retrieve all stored console messages for the given pipeline.
- GetCachedMessages(PipelineId, CachedConsoleMessageTypes, IpcSender<Vec<CachedConsoleMessage>>),
+ GetCachedMessages(
+ PipelineId,
+ CachedConsoleMessageTypes,
+ IpcSender<Vec<CachedConsoleMessage>>,
+ ),
/// Update a given node's attributes with a list of modifications.
ModifyAttribute(PipelineId, String, Vec<Modification>),
/// Request live console messages for a given pipeline (true if desired, false otherwise).
WantsLiveNotifications(PipelineId, bool),
/// Request live notifications for a given set of timeline events for a given pipeline.
- SetTimelineMarkers(PipelineId, Vec<TimelineMarkerType>, IpcSender<Option<TimelineMarker>>),
+ SetTimelineMarkers(
+ PipelineId,
+ Vec<TimelineMarkerType>,
+ IpcSender<Option<TimelineMarker>>,
+ ),
/// Withdraw request for live timeline notifications for a given pipeline.
DropTimelineMarkers(PipelineId, Vec<TimelineMarkerType>),
/// Request a callback directed at the given actor name from the next animation frame
diff --git a/components/dom_struct/lib.rs b/components/dom_struct/lib.rs
index 0fa5f4f8163..442aa6cf2cd 100644
--- a/components/dom_struct/lib.rs
+++ b/components/dom_struct/lib.rs
@@ -25,7 +25,6 @@ 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();
-
let output: TokenStream = attributes.into_iter().chain(input.into_iter()).collect();
let item: Item = syn::parse(output).unwrap();
@@ -36,7 +35,11 @@ pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream {
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 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;
diff --git a/components/domobject_derive/lib.rs b/components/domobject_derive/lib.rs
index 1db1af05d70..7eff765b928 100644
--- a/components/domobject_derive/lib.rs
+++ b/components/domobject_derive/lib.rs
@@ -5,8 +5,10 @@
#![recursion_limit = "128"]
extern crate proc_macro;
-#[macro_use] extern crate quote;
-#[macro_use] extern crate syn;
+#[macro_use]
+extern crate quote;
+#[macro_use]
+extern crate syn;
#[proc_macro_derive(DomObject)]
pub fn expand_token_stream(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
@@ -74,7 +76,9 @@ fn expand_dom_object(input: syn::DeriveInput) -> quote::Tokens {
}));
let mut generics = input.generics.clone();
- generics.params.push(parse_quote!(__T: ::dom::bindings::reflector::DomObject));
+ generics
+ .params
+ .push(parse_quote!(__T: ::dom::bindings::reflector::DomObject));
let (impl_generics, _, where_clause) = generics.split_for_impl();
diff --git a/components/embedder_traits/lib.rs b/components/embedder_traits/lib.rs
index 3d932281e0c..a02eb31a0f4 100644
--- a/components/embedder_traits/lib.rs
+++ b/components/embedder_traits/lib.rs
@@ -24,9 +24,8 @@ use std::sync::mpsc::{Receiver, Sender};
use style_traits::cursor::CursorKind;
use webrender_api::{DeviceIntPoint, DeviceUintSize};
-
/// Used to wake up the event loop, provided by the servo port/embedder.
-pub trait EventLoopWaker : 'static + Send {
+pub trait EventLoopWaker: 'static + Send {
fn clone(&self) -> Box<EventLoopWaker + Send>;
fn wake(&self);
}
@@ -58,11 +57,13 @@ impl Clone for EmbedderProxy {
/// The port that the embedder receives messages on.
pub struct EmbedderReceiver {
- pub receiver: Receiver<(Option<TopLevelBrowsingContextId>, EmbedderMsg)>
+ pub receiver: Receiver<(Option<TopLevelBrowsingContextId>, EmbedderMsg)>,
}
impl EmbedderReceiver {
- pub fn try_recv_embedder_msg(&mut self) -> Option<(Option<TopLevelBrowsingContextId>, EmbedderMsg)> {
+ pub fn try_recv_embedder_msg(
+ &mut self,
+ ) -> Option<(Option<TopLevelBrowsingContextId>, EmbedderMsg)> {
self.receiver.try_recv().ok()
}
pub fn recv_embedder_msg(&mut self) -> (Option<TopLevelBrowsingContextId>, EmbedderMsg) {
@@ -148,7 +149,7 @@ impl Debug for EmbedderMsg {
EmbedderMsg::HideIME => write!(f, "HideIME"),
EmbedderMsg::Shutdown => write!(f, "Shutdown"),
EmbedderMsg::AllowOpeningBrowser(..) => write!(f, "AllowOpeningBrowser"),
- EmbedderMsg::BrowserCreated(..) => write!(f, "BrowserCreated")
+ EmbedderMsg::BrowserCreated(..) => write!(f, "BrowserCreated"),
}
}
}
diff --git a/components/embedder_traits/resources.rs b/components/embedder_traits/resources.rs
index 603a2a83c28..b38b36181a0 100644
--- a/components/embedder_traits/resources.rs
+++ b/components/embedder_traits/resources.rs
@@ -7,10 +7,12 @@ use std::sync::RwLock;
lazy_static! {
static ref RES: RwLock<Option<Box<ResourceReaderMethods + Sync + Send>>> = RwLock::new({
- #[cfg(not(feature = "tests"))] {
+ #[cfg(not(feature = "tests"))]
+ {
None
}
- #[cfg(feature = "tests")] {
+ #[cfg(feature = "tests")]
+ {
Some(resources_for_tests())
}
});
@@ -21,7 +23,11 @@ pub fn set(reader: Box<ResourceReaderMethods + Sync + Send>) {
}
pub fn read_bytes(res: Resource) -> Vec<u8> {
- RES.read().unwrap().as_ref().expect("Resource reader not set.").read(res)
+ RES.read()
+ .unwrap()
+ .as_ref()
+ .expect("Resource reader not set.")
+ .read(res)
}
pub fn read_string(res: Resource) -> String {
@@ -29,11 +35,19 @@ pub fn read_string(res: Resource) -> String {
}
pub fn sandbox_access_files() -> Vec<PathBuf> {
- RES.read().unwrap().as_ref().expect("Resource reader not set.").sandbox_access_files()
+ RES.read()
+ .unwrap()
+ .as_ref()
+ .expect("Resource reader not set.")
+ .sandbox_access_files()
}
pub fn sandbox_access_files_dirs() -> Vec<PathBuf> {
- RES.read().unwrap().as_ref().expect("Resource reader not set.").sandbox_access_files_dirs()
+ RES.read()
+ .unwrap()
+ .as_ref()
+ .expect("Resource reader not set.")
+ .sandbox_access_files_dirs()
}
pub enum Resource {
@@ -64,8 +78,12 @@ fn resources_for_tests() -> Box<ResourceReaderMethods + Sync + Send> {
use std::io::Read;
struct ResourceReader;
impl ResourceReaderMethods for ResourceReader {
- fn sandbox_access_files(&self) -> Vec<PathBuf> { vec![] }
- fn sandbox_access_files_dirs(&self) -> Vec<PathBuf> { vec![] }
+ fn sandbox_access_files(&self) -> Vec<PathBuf> {
+ vec![]
+ }
+ fn sandbox_access_files_dirs(&self) -> Vec<PathBuf> {
+ vec![]
+ }
fn read(&self, file: Resource) -> Vec<u8> {
let file = match file {
Resource::Preferences => "prefs.json",
@@ -92,8 +110,10 @@ fn resources_for_tests() -> Box<ResourceReaderMethods + Sync + Send> {
}
path.push(file);
let mut buffer = vec![];
- File::open(path).expect(&format!("Can't find file: {}", file))
- .read_to_end(&mut buffer).expect("Can't read file");
+ File::open(path)
+ .expect(&format!("Can't find file: {}", file))
+ .read_to_end(&mut buffer)
+ .expect("Can't read file");
buffer
}
}
diff --git a/components/fallible/lib.rs b/components/fallible/lib.rs
index c220699a786..ae6a40dc789 100644
--- a/components/fallible/lib.rs
+++ b/components/fallible/lib.rs
@@ -18,7 +18,6 @@ pub trait FallibleVec<T> {
fn try_push(&mut self, value: T) -> Result<(), FailedAllocationError>;
}
-
/////////////////////////////////////////////////////////////////
// Vec
@@ -52,14 +51,14 @@ fn try_double_vec<T>(vec: &mut Vec<T>) -> Result<(), FailedAllocationError> {
let new_cap: usize = if old_cap == 0 {
4
} else {
- old_cap.checked_mul(2).ok_or(FailedAllocationError::new(
- "capacity overflow for Vec",
- ))?
+ old_cap
+ .checked_mul(2)
+ .ok_or(FailedAllocationError::new("capacity overflow for Vec"))?
};
- let new_size_bytes = new_cap.checked_mul(mem::size_of::<T>()).ok_or(
- FailedAllocationError::new("capacity overflow for Vec"),
- )?;
+ let new_size_bytes = new_cap
+ .checked_mul(mem::size_of::<T>())
+ .ok_or(FailedAllocationError::new("capacity overflow for Vec"))?;
let new_ptr = unsafe {
if old_cap == 0 {
@@ -75,15 +74,12 @@ fn try_double_vec<T>(vec: &mut Vec<T>) -> Result<(), FailedAllocationError> {
));
}
- let new_vec = unsafe {
- Vec::from_raw_parts(new_ptr as *mut T, old_len, new_cap)
- };
+ let new_vec = unsafe { Vec::from_raw_parts(new_ptr as *mut T, old_len, new_cap) };
mem::forget(mem::replace(vec, new_vec));
Ok(())
}
-
/////////////////////////////////////////////////////////////////
// SmallVec
@@ -107,8 +103,7 @@ impl<T: Array> FallibleVec<T::Item> for SmallVec<T> {
#[cfg(feature = "known_system_malloc")]
#[inline(never)]
#[cold]
-fn try_double_small_vec<T>(svec: &mut SmallVec<T>)
--> Result<(), FailedAllocationError>
+fn try_double_small_vec<T>(svec: &mut SmallVec<T>) -> Result<(), FailedAllocationError>
where
T: Array,
{
@@ -122,20 +117,20 @@ where
let new_cap: usize = if old_cap == 0 {
4
} else {
- old_cap.checked_mul(2).ok_or(FailedAllocationError::new(
- "capacity overflow for SmallVec",
- ))?
+ old_cap
+ .checked_mul(2)
+ .ok_or(FailedAllocationError::new("capacity overflow for SmallVec"))?
};
// This surely shouldn't fail, if |old_cap| was previously accepted as a
// valid value. But err on the side of caution.
- let old_size_bytes = old_cap.checked_mul(mem::size_of::<T>()).ok_or(
- FailedAllocationError::new("capacity overflow for SmallVec"),
- )?;
+ let old_size_bytes = old_cap
+ .checked_mul(mem::size_of::<T>())
+ .ok_or(FailedAllocationError::new("capacity overflow for SmallVec"))?;
- let new_size_bytes = new_cap.checked_mul(mem::size_of::<T>()).ok_or(
- FailedAllocationError::new("capacity overflow for SmallVec"),
- )?;
+ let new_size_bytes = new_cap
+ .checked_mul(mem::size_of::<T>())
+ .ok_or(FailedAllocationError::new("capacity overflow for SmallVec"))?;
let new_ptr;
if svec.spilled() {
@@ -149,8 +144,7 @@ where
unsafe {
new_ptr = alloc::alloc(new_size_bytes, 0);
if !new_ptr.is_null() && old_size_bytes > 0 {
- copy_nonoverlapping(old_ptr as *const u8,
- new_ptr as *mut u8, old_size_bytes);
+ copy_nonoverlapping(old_ptr as *const u8, new_ptr as *mut u8, old_size_bytes);
}
}
}
@@ -161,9 +155,7 @@ where
));
}
- let new_vec = unsafe {
- Vec::from_raw_parts(new_ptr as *mut T::Item, old_len, new_cap)
- };
+ let new_vec = unsafe { Vec::from_raw_parts(new_ptr as *mut T::Item, old_len, new_cap) };
let new_svec = SmallVec::from_vec(new_vec);
mem::forget(mem::replace(svec, new_svec));
diff --git a/components/geometry/lib.rs b/components/geometry/lib.rs
index c4bb9721bf6..2f421f6a277 100644
--- a/components/geometry/lib.rs
+++ b/components/geometry/lib.rs
@@ -5,8 +5,9 @@
extern crate app_units;
extern crate euclid;
extern crate malloc_size_of;
+#[macro_use]
+extern crate malloc_size_of_derive;
extern crate style_traits;
-#[macro_use] extern crate malloc_size_of_derive;
extern crate webrender_api;
use app_units::{Au, MAX_AU, MIN_AU};
@@ -48,7 +49,7 @@ impl MaxRect for Rect<Au> {
fn max_rect() -> Rect<Au> {
Rect::new(
Point2D::new(MIN_AU / 2, MIN_AU / 2),
- Size2D::new(MAX_AU, MAX_AU)
+ Size2D::new(MAX_AU, MAX_AU),
)
}
}
@@ -64,12 +65,22 @@ impl MaxRect for LayoutRect {
/// A helper function to convert a rect of `f32` pixels to a rect of app units.
pub fn f32_rect_to_au_rect(rect: Rect<f32>) -> Rect<Au> {
- Rect::new(Point2D::new(Au::from_f32_px(rect.origin.x), Au::from_f32_px(rect.origin.y)),
- Size2D::new(Au::from_f32_px(rect.size.width), Au::from_f32_px(rect.size.height)))
+ Rect::new(
+ Point2D::new(
+ Au::from_f32_px(rect.origin.x),
+ Au::from_f32_px(rect.origin.y),
+ ),
+ Size2D::new(
+ Au::from_f32_px(rect.size.width),
+ Au::from_f32_px(rect.size.height),
+ ),
+ )
}
/// A helper function to convert a rect of `Au` pixels to a rect of f32 units.
pub fn au_rect_to_f32_rect(rect: Rect<Au>) -> Rect<f32> {
- Rect::new(Point2D::new(rect.origin.x.to_f32_px(), rect.origin.y.to_f32_px()),
- Size2D::new(rect.size.width.to_f32_px(), rect.size.height.to_f32_px()))
+ Rect::new(
+ Point2D::new(rect.origin.x.to_f32_px(), rect.origin.y.to_f32_px()),
+ Size2D::new(rect.size.width.to_f32_px(), rect.size.height.to_f32_px()),
+ )
}
diff --git a/components/gfx/font.rs b/components/gfx/font.rs
index de056747bd9..a3591e3b41a 100644
--- a/components/gfx/font.rs
+++ b/components/gfx/font.rs
@@ -32,9 +32,9 @@ use unicode_script::Script;
use webrender_api;
macro_rules! ot_tag {
- ($t1:expr, $t2:expr, $t3:expr, $t4:expr) => (
+ ($t1:expr, $t2:expr, $t3:expr, $t4:expr) => {
(($t1 as u32) << 24) | (($t2 as u32) << 16) | (($t3 as u32) << 8) | ($t4 as u32)
- );
+ };
}
pub const GPOS: u32 = ot_tag!('G', 'P', 'O', 'S');
@@ -87,10 +87,12 @@ trait FontTableTagConversions {
impl FontTableTagConversions for FontTableTag {
fn tag_to_str(&self) -> String {
- let bytes = [(self >> 24) as u8,
- (self >> 16) as u8,
- (self >> 8) as u8,
- (self >> 0) as u8];
+ let bytes = [
+ (self >> 24) as u8,
+ (self >> 16) as u8,
+ (self >> 8) as u8,
+ (self >> 0) as u8,
+ ];
str::from_utf8(&bytes).unwrap().to_owned()
}
}
@@ -101,18 +103,18 @@ pub trait FontTableMethods {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct FontMetrics {
- pub underline_size: Au,
+ pub underline_size: Au,
pub underline_offset: Au,
- pub strikeout_size: Au,
+ pub strikeout_size: Au,
pub strikeout_offset: Au,
- pub leading: Au,
- pub x_height: Au,
- pub em_size: Au,
- pub ascent: Au,
- pub descent: Au,
- pub max_advance: Au,
- pub average_advance: Au,
- pub line_gap: Au,
+ pub leading: Au,
+ pub x_height: Au,
+ pub em_size: Au,
+ pub ascent: Au,
+ pub descent: Au,
+ pub max_advance: Au,
+ pub average_advance: Au,
+ pub line_gap: Au,
}
/// `FontDescriptor` describes the parameters of a `Font`. It represents rendering a given font
@@ -149,10 +151,12 @@ pub struct Font {
}
impl Font {
- pub fn new(handle: FontHandle,
- descriptor: FontDescriptor,
- actual_pt_size: Au,
- font_key: webrender_api::FontInstanceKey) -> Font {
+ pub fn new(
+ handle: FontHandle,
+ descriptor: FontDescriptor,
+ actual_pt_size: Au,
+ font_key: webrender_api::FontInstanceKey,
+ ) -> Font {
let metrics = handle.metrics();
Font {
@@ -218,28 +222,39 @@ impl Font {
text: text.to_owned(),
options: *options,
};
- let result = self.shape_cache.borrow_mut().entry(lookup_key).or_insert_with(|| {
- let start_time = time::precise_time_ns();
- let mut glyphs = GlyphStore::new(text.len(),
- options.flags.contains(ShapingFlags::IS_WHITESPACE_SHAPING_FLAG),
- options.flags.contains(ShapingFlags::RTL_FLAG));
-
- if self.can_do_fast_shaping(text, options) {
- debug!("shape_text: Using ASCII fast path.");
- self.shape_text_fast(text, options, &mut glyphs);
- } else {
- debug!("shape_text: Using Harfbuzz.");
- if shaper.is_none() {
- shaper = Some(Shaper::new(this));
+ let result = self
+ .shape_cache
+ .borrow_mut()
+ .entry(lookup_key)
+ .or_insert_with(|| {
+ let start_time = time::precise_time_ns();
+ let mut glyphs = GlyphStore::new(
+ text.len(),
+ options
+ .flags
+ .contains(ShapingFlags::IS_WHITESPACE_SHAPING_FLAG),
+ options.flags.contains(ShapingFlags::RTL_FLAG),
+ );
+
+ if self.can_do_fast_shaping(text, options) {
+ debug!("shape_text: Using ASCII fast path.");
+ self.shape_text_fast(text, options, &mut glyphs);
+ } else {
+ debug!("shape_text: Using Harfbuzz.");
+ if shaper.is_none() {
+ shaper = Some(Shaper::new(this));
+ }
+ shaper
+ .as_ref()
+ .unwrap()
+ .shape_text(text, options, &mut glyphs);
}
- shaper.as_ref().unwrap().shape_text(text, options, &mut glyphs);
- }
- let end_time = time::precise_time_ns();
- TEXT_SHAPING_PERFORMANCE_COUNTER.fetch_add((end_time - start_time) as usize,
- Ordering::Relaxed);
- Arc::new(glyphs)
- }).clone();
+ let end_time = time::precise_time_ns();
+ TEXT_SHAPING_PERFORMANCE_COUNTER
+ .fetch_add((end_time - start_time) as usize, Ordering::Relaxed);
+ Arc::new(glyphs)
+ }).clone();
self.shaper = shaper;
result
}
@@ -285,12 +300,21 @@ impl Font {
pub fn table_for_tag(&self, tag: FontTableTag) -> Option<FontTable> {
let result = self.handle.table_for_tag(tag);
- let status = if result.is_some() { "Found" } else { "Didn't find" };
+ let status = if result.is_some() {
+ "Found"
+ } else {
+ "Didn't find"
+ };
- debug!("{} font table[{}] with family={}, face={}",
- status, tag.tag_to_str(),
- self.handle.family_name().unwrap_or("unavailable".to_owned()),
- self.handle.face_name().unwrap_or("unavailable".to_owned()));
+ debug!(
+ "{} font table[{}] with family={}, face={}",
+ status,
+ tag.tag_to_str(),
+ self.handle
+ .family_name()
+ .unwrap_or("unavailable".to_owned()),
+ self.handle.face_name().unwrap_or("unavailable".to_owned())
+ );
result
}
@@ -308,18 +332,21 @@ impl Font {
self.glyph_index(codepoint).is_some()
}
- pub fn glyph_h_kerning(&self, first_glyph: GlyphId, second_glyph: GlyphId)
- -> FractionalPixel {
+ pub fn glyph_h_kerning(&self, first_glyph: GlyphId, second_glyph: GlyphId) -> FractionalPixel {
self.handle.glyph_h_kerning(first_glyph, second_glyph)
}
pub fn glyph_h_advance(&self, glyph: GlyphId) -> FractionalPixel {
- *self.glyph_advance_cache.borrow_mut().entry(glyph).or_insert_with(|| {
- match self.handle.glyph_h_advance(glyph) {
- Some(adv) => adv,
- None => 10f64 as FractionalPixel // FIXME: Need fallback strategy
- }
- })
+ *self
+ .glyph_advance_cache
+ .borrow_mut()
+ .entry(glyph)
+ .or_insert_with(|| {
+ match self.handle.glyph_h_advance(glyph) {
+ Some(adv) => adv,
+ None => 10f64 as FractionalPixel, // FIXME: Need fallback strategy
+ }
+ })
}
}
@@ -339,10 +366,12 @@ impl FontGroup {
pub fn new(style: &FontStyleStruct) -> FontGroup {
let descriptor = FontDescriptor::from(style);
- let families =
- style.font_family.0.iter()
- .map(|family| FontGroupFamily::new(descriptor.clone(), &family))
- .collect();
+ let families = style
+ .font_family
+ .0
+ .iter()
+ .map(|family| FontGroupFamily::new(descriptor.clone(), &family))
+ .collect();
FontGroup {
descriptor,
@@ -358,25 +387,25 @@ impl FontGroup {
pub fn find_by_codepoint<S: FontSource>(
&mut self,
mut font_context: &mut FontContext<S>,
- codepoint: char
+ codepoint: char,
) -> Option<FontRef> {
let has_glyph = |font: &FontRef| font.borrow().has_glyph_for(codepoint);
let font = self.find(&mut font_context, |font| has_glyph(font));
if font.is_some() {
- return font
+ return font;
}
if let Some(ref fallback) = self.last_matching_fallback {
if has_glyph(&fallback) {
- return self.last_matching_fallback.clone()
+ return self.last_matching_fallback.clone();
}
}
let font = self.find_fallback(&mut font_context, Some(codepoint), has_glyph);
if font.is_some() {
self.last_matching_fallback = font.clone();
- return font
+ return font;
}
self.first(&mut font_context)
@@ -385,7 +414,7 @@ impl FontGroup {
/// Find the first available font in the group, or the first available fallback font.
pub fn first<S: FontSource>(
&mut self,
- mut font_context: &mut FontContext<S>
+ mut font_context: &mut FontContext<S>,
) -> Option<FontRef> {
self.find(&mut font_context, |_| true)
.or_else(|| self.find_fallback(&mut font_context, None, |_| true))
@@ -393,16 +422,13 @@ impl FontGroup {
/// Find a font which returns true for `predicate`. This method mutates because we may need to
/// load new font data in the process of finding a suitable font.
- fn find<S, P>(
- &mut self,
- mut font_context: &mut FontContext<S>,
- predicate: P,
- ) -> Option<FontRef>
+ fn find<S, P>(&mut self, mut font_context: &mut FontContext<S>, predicate: P) -> Option<FontRef>
where
S: FontSource,
P: FnMut(&FontRef) -> bool,
{
- self.families.iter_mut()
+ self.families
+ .iter_mut()
.filter_map(|family| family.font(&mut font_context))
.find(predicate)
}
@@ -422,15 +448,9 @@ impl FontGroup {
P: FnMut(&FontRef) -> bool,
{
iter::once(FontFamilyDescriptor::default())
- .chain(
- fallback_font_families(codepoint).into_iter().map(|family| {
- FontFamilyDescriptor::new(
- FontFamilyName::from(family),
- FontSearchScope::Local,
- )
- })
- )
- .filter_map(|family| font_context.font(&self.descriptor, &family))
+ .chain(fallback_font_families(codepoint).into_iter().map(|family| {
+ FontFamilyDescriptor::new(FontFamilyName::from(family), FontSearchScope::Local)
+ })).filter_map(|family| font_context.font(&self.descriptor, &family))
.find(predicate)
}
}
@@ -448,10 +468,8 @@ struct FontGroupFamily {
impl FontGroupFamily {
fn new(font_descriptor: FontDescriptor, family: &SingleFontFamily) -> FontGroupFamily {
- let family_descriptor = FontFamilyDescriptor::new(
- FontFamilyName::from(family),
- FontSearchScope::Any
- );
+ let family_descriptor =
+ FontFamilyDescriptor::new(FontFamilyName::from(family), FontSearchScope::Any);
FontGroupFamily {
font_descriptor,
@@ -477,17 +495,19 @@ impl FontGroupFamily {
pub struct RunMetrics {
// may be negative due to negative width (i.e., kerning of '.' in 'P.T.')
pub advance_width: Au,
- pub ascent: Au, // nonzero
+ pub ascent: Au, // nonzero
pub descent: Au, // nonzero
// this bounding box is relative to the left origin baseline.
// so, bounding_box.position.y = -ascent
- pub bounding_box: Rect<Au>
+ pub bounding_box: Rect<Au>,
}
impl RunMetrics {
pub fn new(advance: Au, ascent: Au, descent: Au) -> RunMetrics {
- let bounds = Rect::new(Point2D::new(Au(0), -ascent),
- Size2D::new(advance, ascent + descent));
+ let bounds = Rect::new(
+ Point2D::new(Au(0), -ascent),
+ Size2D::new(advance, ascent + descent),
+ );
// TODO(Issue #125): support loose and tight bounding boxes; using the
// ascent+descent and advance is sometimes too generous and
@@ -540,11 +560,13 @@ impl FontFamilyName {
impl<'a> From<&'a SingleFontFamily> for FontFamilyName {
fn from(other: &'a SingleFontFamily) -> FontFamilyName {
match *other {
- SingleFontFamily::FamilyName(ref family_name) =>
- FontFamilyName::Specific(family_name.name.clone()),
+ SingleFontFamily::FamilyName(ref family_name) => {
+ FontFamilyName::Specific(family_name.name.clone())
+ },
- SingleFontFamily::Generic(ref generic_name) =>
- FontFamilyName::Generic(generic_name.clone()),
+ SingleFontFamily::Generic(ref generic_name) => {
+ FontFamilyName::Generic(generic_name.clone())
+ },
}
}
}
diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs
index 334a1bb41ec..4bfa3e6dfc2 100644
--- a/components/gfx/font_cache_thread.rs
+++ b/components/gfx/font_cache_thread.rs
@@ -40,14 +40,15 @@ pub struct FontTemplateInfo {
impl FontTemplates {
pub fn new() -> FontTemplates {
- FontTemplates {
- templates: vec!(),
- }
+ FontTemplates { templates: vec![] }
}
/// Find a font in this family that matches a given descriptor.
- pub fn find_font_for_style(&mut self, desc: &FontTemplateDescriptor, fctx: &FontContextHandle)
- -> Option<Arc<FontTemplateData>> {
+ pub fn find_font_for_style(
+ &mut self,
+ desc: &FontTemplateDescriptor,
+ fctx: &FontContextHandle,
+ ) -> Option<Arc<FontTemplateData>> {
// TODO(Issue #189): optimize lookup for
// regular/bold/italic/bolditalic with fixed offsets and a
// static decision table for fallback between these values.
@@ -63,7 +64,8 @@ impl FontTemplates {
let (mut best_template_data, mut best_distance) = (None, f32::MAX);
for template in &mut self.templates {
if let Some((template_data, distance)) =
- template.data_for_approximate_descriptor(fctx, desc) {
+ template.data_for_approximate_descriptor(fctx, desc)
+ {
if distance < best_distance {
best_template_data = Some(template_data);
best_distance = distance
@@ -71,7 +73,7 @@ impl FontTemplates {
}
}
if best_template_data.is_some() {
- return best_template_data
+ return best_template_data;
}
// If a request is made for a font family that exists,
@@ -103,8 +105,16 @@ impl FontTemplates {
/// Commands that the FontContext sends to the font cache thread.
#[derive(Debug, Deserialize, Serialize)]
pub enum Command {
- GetFontTemplate(FontTemplateDescriptor, FontFamilyDescriptor, IpcSender<Reply>),
- GetFontInstance(webrender_api::FontKey, Au, IpcSender<webrender_api::FontInstanceKey>),
+ GetFontTemplate(
+ FontTemplateDescriptor,
+ FontFamilyDescriptor,
+ IpcSender<Reply>,
+ ),
+ GetFontInstance(
+ webrender_api::FontKey,
+ Au,
+ IpcSender<webrender_api::FontInstanceKey>,
+ ),
AddWebFont(LowercaseString, EffectiveSources, IpcSender<()>),
AddDownloadedWebFont(LowercaseString, ServoUrl, Vec<u8>, IpcSender<()>),
Exit(IpcSender<()>),
@@ -148,7 +158,7 @@ fn populate_generic_fonts() -> HashMap<FontFamilyName, LowercaseString> {
) {
let family_name = match system_default_family(generic_name) {
Some(system_default) => LowercaseString::new(&system_default),
- None => LowercaseString::new(mapped_name)
+ None => LowercaseString::new(mapped_name),
};
let generic_name = FontFamilyName::Generic(Atom::from(generic_name));
@@ -156,7 +166,6 @@ fn populate_generic_fonts() -> HashMap<FontFamilyName, LowercaseString> {
generic_fonts.insert(generic_name, family_name);
}
-
generic_fonts
}
@@ -167,50 +176,50 @@ impl FontCache {
match msg {
Command::GetFontTemplate(template_descriptor, family_descriptor, result) => {
- let maybe_font_template = self.find_font_template(&template_descriptor, &family_descriptor);
+ let maybe_font_template =
+ self.find_font_template(&template_descriptor, &family_descriptor);
let _ = result.send(Reply::GetFontTemplateReply(maybe_font_template));
- }
+ },
Command::GetFontInstance(font_key, size, result) => {
let webrender_api = &self.webrender_api;
- let instance_key = *self.font_instances
- .entry((font_key, size))
- .or_insert_with(|| {
- let key = webrender_api.generate_font_instance_key();
- let mut txn = webrender_api::Transaction::new();
- txn.add_font_instance(key,
- font_key,
- size,
- None,
- None,
- Vec::new());
- webrender_api.update_resources(txn.resource_updates);
- key
- });
+ let instance_key =
+ *self
+ .font_instances
+ .entry((font_key, size))
+ .or_insert_with(|| {
+ let key = webrender_api.generate_font_instance_key();
+ let mut txn = webrender_api::Transaction::new();
+ txn.add_font_instance(key, font_key, size, None, None, Vec::new());
+ webrender_api.update_resources(txn.resource_updates);
+ key
+ });
let _ = result.send(instance_key);
- }
+ },
Command::AddWebFont(family_name, sources, result) => {
self.handle_add_web_font(family_name, sources, result);
- }
+ },
Command::AddDownloadedWebFont(family_name, url, bytes, result) => {
let templates = &mut self.web_families.get_mut(&family_name).unwrap();
templates.add_template(Atom::from(url.to_string()), Some(bytes));
drop(result.send(()));
- }
+ },
Command::Ping => (),
Command::Exit(result) => {
let _ = result.send(());
break;
- }
+ },
}
}
}
- fn handle_add_web_font(&mut self,
- family_name: LowercaseString,
- mut sources: EffectiveSources,
- sender: IpcSender<()>) {
+ fn handle_add_web_font(
+ &mut self,
+ family_name: LowercaseString,
+ mut sources: EffectiveSources,
+ sender: IpcSender<()>,
+ ) {
let src = if let Some(src) = sources.next() {
src
} else {
@@ -236,7 +245,7 @@ impl FontCache {
destination: Destination::Font,
// TODO: Add a proper origin - Can't import GlobalScope from gfx
// We can leave origin to be set by default
- .. RequestInit::default()
+ ..RequestInit::default()
};
let channel_to_self = self.channel_to_self.clone();
@@ -248,19 +257,27 @@ impl FontCache {
FetchResponseMsg::ProcessRequestBody |
FetchResponseMsg::ProcessRequestEOF => (),
FetchResponseMsg::ProcessResponse(meta_result) => {
- trace!("@font-face {} metadata ok={:?}", family_name, meta_result.is_ok());
+ trace!(
+ "@font-face {} metadata ok={:?}",
+ family_name,
+ meta_result.is_ok()
+ );
*response_valid.lock().unwrap() = meta_result.is_ok();
- }
+ },
FetchResponseMsg::ProcessResponseChunk(new_bytes) => {
trace!("@font-face {} chunk={:?}", family_name, new_bytes);
if *response_valid.lock().unwrap() {
bytes.lock().unwrap().extend(new_bytes.into_iter())
}
- }
+ },
FetchResponseMsg::ProcessResponseEOF(response) => {
trace!("@font-face {} EOF={:?}", family_name, response);
if response.is_err() || !*response_valid.lock().unwrap() {
- let msg = Command::AddWebFont(family_name.clone(), sources.clone(), sender.clone());
+ let msg = Command::AddWebFont(
+ family_name.clone(),
+ sources.clone(),
+ sender.clone(),
+ );
channel_to_self.send(msg).unwrap();
return;
}
@@ -270,23 +287,31 @@ impl FontCache {
Ok(san) => san,
Err(_) => {
// FIXME(servo/fontsan#1): get an error message
- debug!("Sanitiser rejected web font: \
- family={} url={:?}", family_name, url);
- let msg = Command::AddWebFont(family_name.clone(), sources.clone(), sender.clone());
+ debug!(
+ "Sanitiser rejected web font: \
+ family={} url={:?}",
+ family_name, url
+ );
+ let msg = Command::AddWebFont(
+ family_name.clone(),
+ sources.clone(),
+ sender.clone(),
+ );
channel_to_self.send(msg).unwrap();
return;
},
};
- let command =
- Command::AddDownloadedWebFont(family_name.clone(),
- url.clone(),
- bytes,
- sender.clone());
+ let command = Command::AddDownloadedWebFont(
+ family_name.clone(),
+ url.clone(),
+ bytes,
+ sender.clone(),
+ );
channel_to_self.send(command).unwrap();
- }
+ },
}
});
- }
+ },
Source::Local(ref font) => {
let font_face_name = LowercaseString::new(&font.name);
let templates = &mut self.web_families.get_mut(&family_name).unwrap();
@@ -301,7 +326,7 @@ impl FontCache {
let msg = Command::AddWebFont(family_name, sources, sender);
self.channel_to_self.send(msg).unwrap();
}
- }
+ },
}
}
@@ -319,7 +344,7 @@ impl FontCache {
fn transform_family(&self, family_name: &FontFamilyName) -> LowercaseString {
match self.generic_fonts.get(family_name) {
None => LowercaseString::from(family_name),
- Some(mapped_family) => (*mapped_family).clone()
+ Some(mapped_family) => (*mapped_family).clone(),
}
}
@@ -347,7 +372,10 @@ impl FontCache {
s.find_font_for_style(template_descriptor, &self.font_context)
} else {
- debug!("FontList: Couldn't find font family with name={}", &*family_name);
+ debug!(
+ "FontList: Couldn't find font family with name={}",
+ &*family_name
+ );
None
}
}
@@ -371,17 +399,19 @@ impl FontCache {
let webrender_api = &self.webrender_api;
let webrender_fonts = &mut self.webrender_fonts;
- let font_key = *webrender_fonts.entry(template.identifier.clone()).or_insert_with(|| {
- let font_key = webrender_api.generate_font_key();
- let mut txn = webrender_api::Transaction::new();
- match (template.bytes_if_in_memory(), template.native_font()) {
- (Some(bytes), _) => txn.add_raw_font(font_key, bytes, 0),
- (None, Some(native_font)) => txn.add_native_font(font_key, native_font),
- (None, None) => txn.add_raw_font(font_key, template.bytes().clone(), 0),
- }
- webrender_api.update_resources(txn.resource_updates);
- font_key
- });
+ let font_key = *webrender_fonts
+ .entry(template.identifier.clone())
+ .or_insert_with(|| {
+ let font_key = webrender_api.generate_font_key();
+ let mut txn = webrender_api::Transaction::new();
+ match (template.bytes_if_in_memory(), template.native_font()) {
+ (Some(bytes), _) => txn.add_raw_font(font_key, bytes, 0),
+ (None, Some(native_font)) => txn.add_native_font(font_key, native_font),
+ (None, None) => txn.add_raw_font(font_key, template.bytes().clone(), 0),
+ }
+ webrender_api.update_resources(txn.resource_updates);
+ font_key
+ });
FontTemplateInfo {
font_template: template,
@@ -395,14 +425,15 @@ impl FontCache {
family_descriptor: &FontFamilyDescriptor,
) -> Option<FontTemplateInfo> {
match family_descriptor.scope {
- FontSearchScope::Any => {
- self.find_font_in_web_family(&template_descriptor, &family_descriptor.name)
- .or_else(|| self.find_font_in_local_family(&template_descriptor, &family_descriptor.name))
- }
+ FontSearchScope::Any => self
+ .find_font_in_web_family(&template_descriptor, &family_descriptor.name)
+ .or_else(|| {
+ self.find_font_in_local_family(&template_descriptor, &family_descriptor.name)
+ }),
FontSearchScope::Local => {
self.find_font_in_local_family(&template_descriptor, &family_descriptor.name)
- }
+ },
}.map(|t| self.get_font_template_info(t))
}
}
@@ -415,59 +446,82 @@ pub struct FontCacheThread {
}
impl FontCacheThread {
- pub fn new(core_resource_thread: CoreResourceThread,
- webrender_api: webrender_api::RenderApi) -> FontCacheThread {
+ pub fn new(
+ core_resource_thread: CoreResourceThread,
+ webrender_api: webrender_api::RenderApi,
+ ) -> FontCacheThread {
let (chan, port) = ipc::channel().unwrap();
let channel_to_self = chan.clone();
- thread::Builder::new().name("FontCacheThread".to_owned()).spawn(move || {
- // TODO: Allow users to specify these.
- let generic_fonts = populate_generic_fonts();
-
- let mut cache = FontCache {
- port: port,
- channel_to_self,
- generic_fonts,
- local_families: HashMap::new(),
- web_families: HashMap::new(),
- font_context: FontContextHandle::new(),
- core_resource_thread,
- webrender_api,
- webrender_fonts: HashMap::new(),
- font_instances: HashMap::new(),
- };
-
- cache.refresh_local_families();
- cache.run();
- }).expect("Thread spawning failed");
-
- FontCacheThread {
- chan: chan,
- }
+ thread::Builder::new()
+ .name("FontCacheThread".to_owned())
+ .spawn(move || {
+ // TODO: Allow users to specify these.
+ let generic_fonts = populate_generic_fonts();
+
+ let mut cache = FontCache {
+ port: port,
+ channel_to_self,
+ generic_fonts,
+ local_families: HashMap::new(),
+ web_families: HashMap::new(),
+ font_context: FontContextHandle::new(),
+ core_resource_thread,
+ webrender_api,
+ webrender_fonts: HashMap::new(),
+ font_instances: HashMap::new(),
+ };
+
+ cache.refresh_local_families();
+ cache.run();
+ }).expect("Thread spawning failed");
+
+ FontCacheThread { chan: chan }
}
- pub fn add_web_font(&self, family: FamilyName, sources: EffectiveSources, sender: IpcSender<()>) {
- self.chan.send(Command::AddWebFont(LowercaseString::new(&family.name), sources, sender)).unwrap();
+ pub fn add_web_font(
+ &self,
+ family: FamilyName,
+ sources: EffectiveSources,
+ sender: IpcSender<()>,
+ ) {
+ self.chan
+ .send(Command::AddWebFont(
+ LowercaseString::new(&family.name),
+ sources,
+ sender,
+ )).unwrap();
}
pub fn exit(&self) {
let (response_chan, response_port) = ipc::channel().unwrap();
- self.chan.send(Command::Exit(response_chan)).expect("Couldn't send FontCacheThread exit message");
- response_port.recv().expect("Couldn't receive FontCacheThread reply");
+ self.chan
+ .send(Command::Exit(response_chan))
+ .expect("Couldn't send FontCacheThread exit message");
+ response_port
+ .recv()
+ .expect("Couldn't receive FontCacheThread reply");
}
}
impl FontSource for FontCacheThread {
- fn get_font_instance(&mut self, key: webrender_api::FontKey, size: Au) -> webrender_api::FontInstanceKey {
- let (response_chan, response_port) =
- ipc::channel().expect("failed to create IPC channel");
- self.chan.send(Command::GetFontInstance(key, size, response_chan))
+ fn get_font_instance(
+ &mut self,
+ key: webrender_api::FontKey,
+ size: Au,
+ ) -> webrender_api::FontInstanceKey {
+ let (response_chan, response_port) = ipc::channel().expect("failed to create IPC channel");
+ self.chan
+ .send(Command::GetFontInstance(key, size, response_chan))
.expect("failed to send message to font cache thread");
let instance_key = response_port.recv();
if instance_key.is_err() {
let font_thread_has_closed = self.chan.send(Command::Ping).is_err();
- assert!(font_thread_has_closed, "Failed to receive a response from live font cache");
+ assert!(
+ font_thread_has_closed,
+ "Failed to receive a response from live font cache"
+ );
panic!("Font cache thread has already exited.");
}
instance_key.unwrap()
@@ -478,23 +532,27 @@ impl FontSource for FontCacheThread {
template_descriptor: FontTemplateDescriptor,
family_descriptor: FontFamilyDescriptor,
) -> Option<FontTemplateInfo> {
- let (response_chan, response_port) =
- ipc::channel().expect("failed to create IPC channel");
- self.chan.send(Command::GetFontTemplate(template_descriptor, family_descriptor, response_chan))
- .expect("failed to send message to font cache thread");
+ let (response_chan, response_port) = ipc::channel().expect("failed to create IPC channel");
+ self.chan
+ .send(Command::GetFontTemplate(
+ template_descriptor,
+ family_descriptor,
+ response_chan,
+ )).expect("failed to send message to font cache thread");
let reply = response_port.recv();
if reply.is_err() {
let font_thread_has_closed = self.chan.send(Command::Ping).is_err();
- assert!(font_thread_has_closed, "Failed to receive a response from live font cache");
+ assert!(
+ font_thread_has_closed,
+ "Failed to receive a response from live font cache"
+ );
panic!("Font cache thread has already exited.");
}
match reply.unwrap() {
- Reply::GetFontTemplateReply(data) => {
- data
- }
+ Reply::GetFontTemplateReply(data) => data,
}
}
}
diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs
index a09e6cf7b57..6cb4d8e7ed6 100644
--- a/components/gfx/font_context.rs
+++ b/components/gfx/font_context.rs
@@ -21,14 +21,18 @@ use style::computed_values::font_variant_caps::T as FontVariantCaps;
use style::properties::style_structs::Font as FontStyleStruct;
use webrender_api;
-static SMALL_CAPS_SCALE_FACTOR: f32 = 0.8; // Matches FireFox (see gfxFont.h)
+static SMALL_CAPS_SCALE_FACTOR: f32 = 0.8; // Matches FireFox (see gfxFont.h)
/// An epoch for the font context cache. The cache is flushed if the current epoch does not match
/// this one.
static FONT_CACHE_EPOCH: AtomicUsize = ATOMIC_USIZE_INIT;
pub trait FontSource {
- fn get_font_instance(&mut self, key: webrender_api::FontKey, size: Au) -> webrender_api::FontInstanceKey;
+ fn get_font_instance(
+ &mut self,
+ key: webrender_api::FontKey,
+ size: Au,
+ ) -> webrender_api::FontInstanceKey;
fn font_template(
&mut self,
@@ -74,7 +78,7 @@ impl<S: FontSource> FontContext<S> {
fn expire_font_caches_if_necessary(&mut self) {
let current_epoch = FONT_CACHE_EPOCH.load(Ordering::SeqCst);
if current_epoch == self.epoch {
- return
+ return;
}
self.font_cache.clear();
@@ -95,7 +99,7 @@ impl<S: FontSource> FontContext<S> {
};
if let Some(ref font_group) = self.font_group_cache.get(&cache_key) {
- return (*font_group).clone()
+ return (*font_group).clone();
}
let font_group = Rc::new(RefCell::new(FontGroup::new(&cache_key.style)));
@@ -115,27 +119,31 @@ impl<S: FontSource> FontContext<S> {
family_descriptor: family_descriptor.clone(),
};
- self.font_cache.get(&cache_key).map(|v| v.clone()).unwrap_or_else(|| {
- debug!(
- "FontContext::font cache miss for font_descriptor={:?} family_descriptor={:?}",
- font_descriptor,
- family_descriptor
- );
-
- let font =
- self.font_template(&font_descriptor.template_descriptor, family_descriptor)
- .and_then(|template_info| self.create_font(template_info, font_descriptor.to_owned()).ok())
- .map(|font| Rc::new(RefCell::new(font)));
-
- self.font_cache.insert(cache_key, font.clone());
- font
- })
+ self.font_cache
+ .get(&cache_key)
+ .map(|v| v.clone())
+ .unwrap_or_else(|| {
+ debug!(
+ "FontContext::font cache miss for font_descriptor={:?} family_descriptor={:?}",
+ font_descriptor, family_descriptor
+ );
+
+ let font = self
+ .font_template(&font_descriptor.template_descriptor, family_descriptor)
+ .and_then(|template_info| {
+ self.create_font(template_info, font_descriptor.to_owned())
+ .ok()
+ }).map(|font| Rc::new(RefCell::new(font)));
+
+ self.font_cache.insert(cache_key, font.clone());
+ font
+ })
}
fn font_template(
&mut self,
template_descriptor: &FontTemplateDescriptor,
- family_descriptor: &FontFamilyDescriptor
+ family_descriptor: &FontFamilyDescriptor,
) -> Option<FontTemplateInfo> {
let cache_key = FontTemplateCacheKey {
template_descriptor: template_descriptor.clone(),
@@ -164,7 +172,7 @@ impl<S: FontSource> FontContext<S> {
fn create_font(
&mut self,
info: FontTemplateInfo,
- descriptor: FontDescriptor
+ descriptor: FontDescriptor,
) -> Result<Font, ()> {
// TODO: (Bug #3463): Currently we only support fake small-caps
// painting. We should also support true small-caps (where the
@@ -177,11 +185,18 @@ impl<S: FontSource> FontContext<S> {
let handle = FontHandle::new_from_template(
&self.platform_handle,
info.font_template,
- Some(actual_pt_size)
+ Some(actual_pt_size),
)?;
- let font_instance_key = self.font_source.get_font_instance(info.font_key, actual_pt_size);
- Ok(Font::new(handle, descriptor.to_owned(), actual_pt_size, font_instance_key))
+ let font_instance_key = self
+ .font_source
+ .get_font_instance(info.font_key, actual_pt_size);
+ Ok(Font::new(
+ handle,
+ descriptor.to_owned(),
+ actual_pt_size,
+ font_instance_key,
+ ))
}
}
@@ -219,7 +234,10 @@ impl PartialEq for FontGroupCacheKey {
impl Eq for FontGroupCacheKey {}
impl Hash for FontGroupCacheKey {
- fn hash<H>(&self, hasher: &mut H) where H: Hasher {
+ fn hash<H>(&self, hasher: &mut H)
+ where
+ H: Hasher,
+ {
self.style.hash.hash(hasher)
}
}
diff --git a/components/gfx/font_template.rs b/components/gfx/font_template.rs
index 8a72360d0dc..80527dfae38 100644
--- a/components/gfx/font_template.rs
+++ b/components/gfx/font_template.rs
@@ -26,7 +26,6 @@ pub struct FontTemplateDescriptor {
pub style: FontStyle,
}
-
/// FontTemplateDescriptor contains floats, which are not Eq because of NaN. However,
/// we know they will never be NaN, so we can manually implement Eq.
impl Eq for FontTemplateDescriptor {}
@@ -41,14 +40,9 @@ fn style_to_number(s: &FontStyle) -> f32 {
}
}
-
impl FontTemplateDescriptor {
#[inline]
- pub fn new(
- weight: FontWeight,
- stretch: FontStretch,
- style: FontStyle,
- ) -> Self {
+ pub fn new(weight: FontWeight, stretch: FontStretch, style: FontStyle) -> Self {
Self {
weight,
stretch,
@@ -138,7 +132,10 @@ impl FontTemplate {
}
/// Get the descriptor. Returns `None` when instantiating the data fails.
- pub fn descriptor(&mut self, font_context: &FontContextHandle) -> Option<FontTemplateDescriptor> {
+ pub fn descriptor(
+ &mut self,
+ font_context: &FontContextHandle,
+ ) -> Option<FontTemplateDescriptor> {
// The font template data can be unloaded when nothing is referencing
// it (via the Weak reference to the Arc above). However, if we have
// already loaded a font, store the style information about it separately,
@@ -147,18 +144,22 @@ impl FontTemplate {
self.descriptor.or_else(|| {
if self.instantiate(font_context).is_err() {
- return None
+ return None;
};
- Some(self.descriptor.expect("Instantiation succeeded but no descriptor?"))
+ Some(
+ self.descriptor
+ .expect("Instantiation succeeded but no descriptor?"),
+ )
})
}
/// Get the data for creating a font if it matches a given descriptor.
- pub fn data_for_descriptor(&mut self,
- fctx: &FontContextHandle,
- requested_desc: &FontTemplateDescriptor)
- -> Option<Arc<FontTemplateData>> {
+ pub fn data_for_descriptor(
+ &mut self,
+ fctx: &FontContextHandle,
+ requested_desc: &FontTemplateDescriptor,
+ ) -> Option<Arc<FontTemplateData>> {
self.descriptor(&fctx).and_then(|descriptor| {
if *requested_desc == descriptor {
self.data().ok()
@@ -176,21 +177,20 @@ impl FontTemplate {
requested_descriptor: &FontTemplateDescriptor,
) -> Option<(Arc<FontTemplateData>, f32)> {
self.descriptor(&font_context).and_then(|descriptor| {
- self.data().ok().map(|data| {
- (data, descriptor.distance_from(requested_descriptor))
- })
+ self.data()
+ .ok()
+ .map(|data| (data, descriptor.distance_from(requested_descriptor)))
})
}
fn instantiate(&mut self, font_context: &FontContextHandle) -> Result<(), ()> {
if !self.is_valid {
- return Err(())
+ return Err(());
}
let data = self.data().map_err(|_| ())?;
- let handle: Result<FontHandle, ()> = FontHandleMethods::new_from_template(font_context,
- data,
- None);
+ let handle: Result<FontHandle, ()> =
+ FontHandleMethods::new_from_template(font_context, data, None);
self.is_valid = handle.is_ok();
let handle = handle?;
self.descriptor = Some(FontTemplateDescriptor::new(
@@ -220,7 +220,7 @@ impl FontTemplate {
};
if let Some(data) = maybe_data {
- return Ok(data)
+ return Ok(data);
}
assert!(self.strong_ref.is_none());
diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs
index a1b72e4e0c9..442a9c8ae3a 100644
--- a/components/gfx/lib.rs
+++ b/components/gfx/lib.rs
@@ -9,14 +9,18 @@ extern crate app_units;
extern crate bitflags;
// Mac OS-specific library dependencies
-#[cfg(target_os = "macos")] extern crate byteorder;
-#[cfg(target_os = "macos")] extern crate core_foundation;
-#[cfg(target_os = "macos")] extern crate core_graphics;
-#[cfg(target_os = "macos")] extern crate core_text;
+#[cfg(target_os = "macos")]
+extern crate byteorder;
+#[cfg(target_os = "macos")]
+extern crate core_foundation;
+#[cfg(target_os = "macos")]
+extern crate core_graphics;
+#[cfg(target_os = "macos")]
+extern crate core_text;
// Windows-specific library dependencies
-#[cfg(target_os = "windows")] extern crate dwrote;
-#[cfg(target_os = "windows")] extern crate truetype;
+#[cfg(target_os = "windows")]
+extern crate dwrote;
extern crate euclid;
extern crate fnv;
@@ -24,8 +28,8 @@ extern crate fnv;
#[cfg(target_os = "linux")]
extern crate fontconfig;
extern crate fontsan;
-#[cfg(any(target_os = "linux", target_os = "android"))] extern crate freetype;
-#[cfg(any(target_os = "linux", target_os = "android"))] extern crate servo_allocator;
+#[cfg(any(target_os = "linux", target_os = "android"))]
+extern crate freetype;
extern crate gfx_traits;
// Eventually we would like the shaper to be pluggable, as many operating systems have their own
@@ -35,23 +39,33 @@ extern crate harfbuzz_sys as harfbuzz;
extern crate ipc_channel;
#[macro_use]
extern crate lazy_static;
-#[cfg(any(target_os = "linux", target_os = "android"))] extern crate libc;
+#[cfg(any(target_os = "linux", target_os = "android"))]
+extern crate libc;
#[macro_use]
extern crate log;
#[cfg_attr(target_os = "windows", macro_use)]
extern crate malloc_size_of;
extern crate net_traits;
extern crate ordered_float;
-#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))]
+#[cfg(all(
+ feature = "unstable",
+ any(target_feature = "sse2", target_feature = "neon")
+))]
extern crate packed_simd;
extern crate range;
-#[macro_use] extern crate serde;
+#[macro_use]
+extern crate serde;
+#[cfg(any(target_os = "linux", target_os = "android"))]
+extern crate servo_allocator;
extern crate servo_arc;
-#[macro_use] extern crate servo_atoms;
+#[macro_use]
+extern crate servo_atoms;
extern crate servo_url;
extern crate smallvec;
extern crate style;
extern crate time;
+#[cfg(target_os = "windows")]
+extern crate truetype;
extern crate ucd;
extern crate unicode_bidi;
extern crate unicode_script;
@@ -61,7 +75,8 @@ extern crate xi_unicode;
extern crate xml5ever;
// Fonts
-#[macro_use] pub mod font;
+#[macro_use]
+pub mod font;
pub mod font_cache_thread;
pub mod font_context;
pub mod font_template;
diff --git a/components/gfx/platform/freetype/android/font_list.rs b/components/gfx/platform/freetype/android/font_list.rs
index 3c52e854112..ebca244078e 100644
--- a/components/gfx/platform/freetype/android/font_list.rs
+++ b/components/gfx/platform/freetype/android/font_list.rs
@@ -116,21 +116,18 @@ struct FontFamily {
struct FontAlias {
from: String,
to: String,
- weight: Option<i32>
+ weight: Option<i32>,
}
struct FontList {
families: Vec<FontFamily>,
- aliases: Vec<FontAlias>
+ aliases: Vec<FontAlias>,
}
impl FontList {
fn new() -> FontList {
// Possible paths containing the font mapping xml file.
- let paths = [
- "/etc/fonts.xml",
- "/system/etc/system_fonts.xml"
- ];
+ let paths = ["/etc/fonts.xml", "/system/etc/system_fonts.xml"];
// Try to load and parse paths until one of them success.
let mut result = None;
@@ -146,7 +143,7 @@ impl FontList {
None => FontList {
families: Self::fallback_font_families(),
aliases: Vec::new(),
- }
+ },
}
}
@@ -154,25 +151,26 @@ impl FontList {
fn from_path(path: &str) -> Option<FontList> {
let xml = match Self::load_file(path) {
Ok(xml) => xml,
- _=> { return None; },
+ _ => {
+ return None;
+ },
};
- let dom: RcDom = parse_document(RcDom::default(), Default::default())
- .one(xml);
+ let dom: RcDom = parse_document(RcDom::default(), Default::default()).one(xml);
let doc = &dom.document;
// find familyset root node
let children = doc.children.borrow();
- let familyset = children.iter().find(|child| {
- match child.data {
- NodeData::Element { ref name, .. } => &*name.local == "familyset",
- _ => false,
- }
+ let familyset = children.iter().find(|child| match child.data {
+ NodeData::Element { ref name, .. } => &*name.local == "familyset",
+ _ => false,
});
let familyset = match familyset {
Some(node) => node,
- _ => { return None; }
+ _ => {
+ return None;
+ },
};
// Parse familyset node
@@ -181,7 +179,11 @@ impl FontList {
for node in familyset.children.borrow().iter() {
match node.data {
- NodeData::Element { ref name, ref attrs, .. } => {
+ NodeData::Element {
+ ref name,
+ ref attrs,
+ ..
+ } => {
if &*name.local == "family" {
Self::parse_family(&node, attrs, &mut families);
} else if &*name.local == "alias" {
@@ -191,13 +193,13 @@ impl FontList {
}
}
},
- _=> {}
+ _ => {},
}
}
Some(FontList {
families: families,
- aliases: aliases
+ aliases: aliases,
})
}
@@ -209,17 +211,16 @@ impl FontList {
("Droid Sans", "DroidSans.ttf"),
];
- alternatives.iter().filter(|item| {
- Path::new(&Self::font_absolute_path(item.1)).exists()
- }).map(|item| {
- FontFamily {
+ alternatives
+ .iter()
+ .filter(|item| Path::new(&Self::font_absolute_path(item.1)).exists())
+ .map(|item| FontFamily {
name: item.0.into(),
fonts: vec![Font {
filename: item.1.into(),
weight: None,
- }]
- }
- }). collect()
+ }],
+ }).collect()
}
// All Android fonts are located in /system/fonts
@@ -227,15 +228,14 @@ impl FontList {
format!("/system/fonts/{}", filename)
}
- fn find_family(&self, name: &str) -> Option<&FontFamily>{
+ fn find_family(&self, name: &str) -> Option<&FontFamily> {
self.families.iter().find(|f| f.name == name)
}
- fn find_alias(&self, name: &str) -> Option<&FontAlias>{
+ fn find_alias(&self, name: &str) -> Option<&FontAlias> {
self.aliases.iter().find(|f| f.from == name)
}
-
fn load_file(path: &str) -> Result<String, io::Error> {
let mut file = File::open(path)?;
let mut content = String::new();
@@ -253,14 +253,16 @@ impl FontList {
// <font weight="300" style="italic">Roboto-LightItalic.ttf</font>
// <font weight="400" style="normal">Roboto-Regular.ttf</font>
// </family>
- fn parse_family(familyset: &Node, attrs: &RefCell<Vec<Attribute>>, out:&mut Vec<FontFamily>) {
+ fn parse_family(familyset: &Node, attrs: &RefCell<Vec<Attribute>>, out: &mut Vec<FontFamily>) {
// Fallback to old Android API v17 xml format if required
- let using_api_17 = familyset.children.borrow().iter().any(|node| {
- match node.data {
+ let using_api_17 = familyset
+ .children
+ .borrow()
+ .iter()
+ .any(|node| match node.data {
NodeData::Element { ref name, .. } => &*name.local == "nameset",
- _=> false,
- }
- });
+ _ => false,
+ });
if using_api_17 {
Self::parse_family_v17(familyset, out);
return;
@@ -269,25 +271,31 @@ impl FontList {
// Parse family name
let name = match Self::find_attrib("name", attrs) {
Some(name) => name,
- _ => { return; },
+ _ => {
+ return;
+ },
};
let mut fonts = Vec::new();
// Parse font variants
for node in familyset.children.borrow().iter() {
match node.data {
- NodeData::Element { ref name, ref attrs, .. } => {
+ NodeData::Element {
+ ref name,
+ ref attrs,
+ ..
+ } => {
if &*name.local == "font" {
FontList::parse_font(&node, attrs, &mut fonts);
}
},
- _=> {}
+ _ => {},
}
}
out.push(FontFamily {
name: name,
- fonts: fonts
+ fonts: fonts,
});
}
@@ -308,7 +316,7 @@ impl FontList {
// <file>Roboto-BoldItalic.ttf</file>
// </fileset>
// </family>
- fn parse_family_v17(familyset: &Node, out:&mut Vec<FontFamily>) {
+ fn parse_family_v17(familyset: &Node, out: &mut Vec<FontFamily>) {
let mut nameset = Vec::new();
let mut fileset = Vec::new();
for node in familyset.children.borrow().iter() {
@@ -320,21 +328,23 @@ impl FontList {
Self::collect_contents_with_tag(node, "file", &mut fileset);
}
},
- _=> {}
+ _ => {},
}
}
// Create a families for each variation
for name in nameset {
- let fonts: Vec<Font> = fileset.iter().map(|f| Font {
- filename: f.clone(),
- weight: None,
- }).collect();
+ let fonts: Vec<Font> = fileset
+ .iter()
+ .map(|f| Font {
+ filename: f.clone(),
+ weight: None,
+ }).collect();
if !fonts.is_empty() {
out.push(FontFamily {
name: name,
- fonts: fonts
+ fonts: fonts,
})
}
}
@@ -342,11 +352,13 @@ impl FontList {
// Example:
// <font weight="100" style="normal">Roboto-Thin.ttf</font>
- fn parse_font(node: &Node, attrs: &RefCell<Vec<Attribute>>, out:&mut Vec<Font>) {
+ fn parse_font(node: &Node, attrs: &RefCell<Vec<Attribute>>, out: &mut Vec<Font>) {
// Parse font filename
let filename = match Self::text_content(node) {
Some(filename) => filename,
- _ => { return; }
+ _ => {
+ return;
+ },
};
// Parse font weight
@@ -367,17 +379,21 @@ impl FontList {
// <alias name="helvetica" to="sans-serif" />
// <alias name="tahoma" to="sans-serif" />
// <alias name="verdana" to="sans-serif" />
- fn parse_alias(attrs: &RefCell<Vec<Attribute>>, out:&mut Vec<FontAlias>) {
+ fn parse_alias(attrs: &RefCell<Vec<Attribute>>, out: &mut Vec<FontAlias>) {
// Parse alias name and referenced font
let from = match Self::find_attrib("name", attrs) {
Some(from) => from,
- _ => { return; },
+ _ => {
+ return;
+ },
};
// Parse referenced font
let to = match Self::find_attrib("to", attrs) {
Some(to) => to,
- _ => { return; },
+ _ => {
+ return;
+ },
};
// Parse optional weight filter
@@ -391,23 +407,28 @@ impl FontList {
}
fn find_attrib(name: &str, attrs: &RefCell<Vec<Attribute>>) -> Option<String> {
- attrs.borrow().iter().find(|attr| &*attr.name.local == name).map(|s| String::from(&s.value))
+ attrs
+ .borrow()
+ .iter()
+ .find(|attr| &*attr.name.local == name)
+ .map(|s| String::from(&s.value))
}
fn text_content(node: &Node) -> Option<String> {
- node.children.borrow().get(0).and_then(|child| {
- match child.data {
+ node.children
+ .borrow()
+ .get(0)
+ .and_then(|child| match child.data {
NodeData::Text { ref contents } => {
let mut result = String::new();
result.push_str(&contents.borrow());
Some(result)
},
- _ => None
- }
- })
+ _ => None,
+ })
}
- fn collect_contents_with_tag(node: &Node, tag: &str, out:&mut Vec<String>) {
+ fn collect_contents_with_tag(node: &Node, tag: &str, out: &mut Vec<String>) {
for child in node.children.borrow().iter() {
match child.data {
NodeData::Element { ref name, .. } => {
@@ -417,14 +438,17 @@ impl FontList {
}
}
},
- _=> {}
+ _ => {},
}
}
}
}
// Functions used by FontCacheThread
-pub fn for_each_available_family<F>(mut callback: F) where F: FnMut(String) {
+pub fn for_each_available_family<F>(mut callback: F)
+where
+ F: FnMut(String),
+{
for family in &FONT_LIST.families {
callback(family.name.clone());
}
@@ -434,7 +458,8 @@ 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)
+where
+ F: FnMut(String),
{
if let Some(family) = FONT_LIST.find_family(family_name) {
for font in &family.fonts {
@@ -453,7 +478,7 @@ pub fn for_each_variation<F>(family_name: &str, mut callback: F)
callback(FontList::font_absolute_path(&font.filename))
}
},
- _ => {}
+ _ => {},
}
}
}
@@ -473,46 +498,44 @@ pub fn system_default_family(generic_name: &str) -> Option<String> {
// Based on gfxAndroidPlatform::GetCommonFallbackFonts() in Gecko
pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
- let mut families = vec!();
+ let mut families = vec![];
if let Some(block) = codepoint.and_then(|c| c.block()) {
match block {
UnicodeBlock::Armenian => {
families.push("Droid Sans Armenian");
- }
+ },
UnicodeBlock::Hebrew => {
families.push("Droid Sans Hebrew");
- }
+ },
UnicodeBlock::Arabic => {
families.push("Droid Sans Arabic");
- }
+ },
UnicodeBlock::Devanagari => {
families.push("Noto Sans Devanagari");
families.push("Droid Sans Devanagari");
- }
+ },
UnicodeBlock::Tamil => {
families.push("Noto Sans Tamil");
families.push("Droid Sans Tamil");
- }
+ },
UnicodeBlock::Thai => {
families.push("Noto Sans Thai");
families.push("Droid Sans Thai");
- }
+ },
- UnicodeBlock::Georgian |
- UnicodeBlock::GeorgianSupplement => {
+ UnicodeBlock::Georgian | UnicodeBlock::GeorgianSupplement => {
families.push("Droid Sans Georgian");
- }
+ },
- UnicodeBlock::Ethiopic |
- UnicodeBlock::EthiopicSupplement => {
+ UnicodeBlock::Ethiopic | UnicodeBlock::EthiopicSupplement => {
families.push("Droid Sans Ethiopic");
- }
+ },
_ => {
if is_cjk(codepoint.unwrap()) {
@@ -520,7 +543,7 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
families.push("Noto Sans CJK JP");
families.push("Droid Sans Japanese");
}
- }
+ },
}
}
diff --git a/components/gfx/platform/freetype/font.rs b/components/gfx/platform/freetype/font.rs
index 04318ce7ff8..c774728fef0 100644
--- a/components/gfx/platform/freetype/font.rs
+++ b/components/gfx/platform/freetype/font.rs
@@ -98,14 +98,21 @@ fn create_face(
let face_index = 0 as FT_Long;
let result = if let Some(ref bytes) = template.bytes {
- FT_New_Memory_Face(lib, bytes.as_ptr(), bytes.len() as FT_Long, face_index, &mut face)
+ FT_New_Memory_Face(
+ lib,
+ bytes.as_ptr(),
+ bytes.len() as FT_Long,
+ face_index,
+ &mut face,
+ )
} else {
// This will trigger a synchronous file read in the layout thread, which we may want to
// revisit at some point. See discussion here:
//
// https://github.com/servo/servo/pull/20506#issuecomment-378838800
- let filename = CString::new(&*template.identifier).expect("filename contains NUL byte!");
+ let filename =
+ CString::new(&*template.identifier).expect("filename contains NUL byte!");
FT_New_Face(lib, filename.as_ptr(), face_index, &mut face)
};
@@ -122,25 +129,27 @@ fn create_face(
}
impl FontHandleMethods for FontHandle {
- fn new_from_template(fctx: &FontContextHandle,
- template: Arc<FontTemplateData>,
- pt_size: Option<Au>)
- -> Result<FontHandle, ()> {
+ fn new_from_template(
+ fctx: &FontContextHandle,
+ template: Arc<FontTemplateData>,
+ pt_size: Option<Au>,
+ ) -> Result<FontHandle, ()> {
let ft_ctx: FT_Library = fctx.ctx.ctx;
- if ft_ctx.is_null() { return Err(()); }
+ if ft_ctx.is_null() {
+ return Err(());
+ }
let face = create_face(ft_ctx, &template, pt_size)?;
let mut handle = FontHandle {
- face: face,
- font_data: template.clone(),
- handle: fctx.clone(),
- can_do_fast_shaping: false,
+ face: face,
+ font_data: template.clone(),
+ handle: fctx.clone(),
+ can_do_fast_shaping: false,
};
// TODO (#11310): Implement basic support for GPOS and GSUB.
- handle.can_do_fast_shaping = handle.has_table(KERN) &&
- !handle.has_table(GPOS) &&
- !handle.has_table(GSUB);
+ handle.can_do_fast_shaping =
+ handle.has_table(KERN) && !handle.has_table(GPOS) && !handle.has_table(GSUB);
Ok(handle)
}
@@ -203,7 +212,7 @@ impl FontHandleMethods for FontHandle {
7 => FontStretchKeyword::Expanded,
8 => FontStretchKeyword::ExtraExpanded,
9 => FontStretchKeyword::UltraExpanded,
- _ => FontStretchKeyword::Normal
+ _ => FontStretchKeyword::Normal,
}
} else {
FontStretchKeyword::Normal
@@ -218,20 +227,26 @@ impl FontHandleMethods for FontHandle {
if idx != 0 as FT_UInt {
Some(idx as GlyphId)
} else {
- debug!("Invalid codepoint: U+{:04X} ('{}')", codepoint as u32, codepoint);
+ debug!(
+ "Invalid codepoint: U+{:04X} ('{}')",
+ codepoint as u32, codepoint
+ );
None
}
}
}
- fn glyph_h_kerning(&self, first_glyph: GlyphId, second_glyph: GlyphId)
- -> FractionalPixel {
+ fn glyph_h_kerning(&self, first_glyph: GlyphId, second_glyph: GlyphId) -> FractionalPixel {
assert!(!self.face.is_null());
let mut delta = FT_Vector { x: 0, y: 0 };
unsafe {
- FT_Get_Kerning(self.face, first_glyph, second_glyph,
- FT_Kerning_Mode::FT_KERNING_DEFAULT as FT_UInt,
- &mut delta);
+ FT_Get_Kerning(
+ self.face,
+ first_glyph,
+ second_glyph,
+ FT_Kerning_Mode::FT_KERNING_DEFAULT as FT_UInt,
+ &mut delta,
+ );
}
fixed_to_float_ft(delta.x as i32)
}
@@ -243,9 +258,7 @@ impl FontHandleMethods for FontHandle {
fn glyph_h_advance(&self, glyph: GlyphId) -> Option<FractionalPixel> {
assert!(!self.face.is_null());
unsafe {
- let res = FT_Load_Glyph(self.face,
- glyph as FT_UInt,
- GLYPH_LOAD_FLAGS);
+ let res = FT_Load_Glyph(self.face, glyph as FT_UInt, GLYPH_LOAD_FLAGS);
if succeeded(res) {
let void_glyph = (*self.face).glyph;
let slot: FT_GlyphSlot = mem::transmute(void_glyph);
@@ -291,23 +304,24 @@ impl FontHandleMethods for FontHandle {
x_height = self.font_units_to_au(os2.sx_height as f64);
}
- let average_advance = self.glyph_index('0')
- .and_then(|idx| self.glyph_h_advance(idx))
- .map_or(max_advance, |advance| self.font_units_to_au(advance));
+ let average_advance = self
+ .glyph_index('0')
+ .and_then(|idx| self.glyph_h_advance(idx))
+ .map_or(max_advance, |advance| self.font_units_to_au(advance));
let metrics = FontMetrics {
- underline_size: underline_size,
+ underline_size: underline_size,
underline_offset: underline_offset,
- strikeout_size: strikeout_size,
+ strikeout_size: strikeout_size,
strikeout_offset: strikeout_offset,
- leading: leading,
- x_height: x_height,
- em_size: em_size,
- ascent: ascent,
- descent: -descent, // linux font's seem to use the opposite sign from mac
- max_advance: max_advance,
- average_advance: average_advance,
- line_gap: height,
+ leading: leading,
+ x_height: x_height,
+ em_size: em_size,
+ ascent: ascent,
+ descent: -descent, // linux font's seem to use the opposite sign from mac
+ max_advance: max_advance,
+ average_advance: average_advance,
+ line_gap: height,
};
debug!("Font metrics (@{}px): {:?}", em_size.to_f32_px(), metrics);
@@ -320,13 +334,25 @@ impl FontHandleMethods for FontHandle {
unsafe {
// Get the length
let mut len = 0;
- if !succeeded(FT_Load_Sfnt_Table(self.face, tag, 0, ptr::null_mut(), &mut len)) {
- return None
+ if !succeeded(FT_Load_Sfnt_Table(
+ self.face,
+ tag,
+ 0,
+ ptr::null_mut(),
+ &mut len,
+ )) {
+ return None;
}
// Get the bytes
let mut buf = vec![0u8; len as usize];
- if !succeeded(FT_Load_Sfnt_Table(self.face, tag, 0, buf.as_mut_ptr(), &mut len)) {
- return None
+ if !succeeded(FT_Load_Sfnt_Table(
+ self.face,
+ tag,
+ 0,
+ buf.as_mut_ptr(),
+ &mut len,
+ )) {
+ return None;
}
Some(FontTable { buffer: buf })
}
@@ -338,25 +364,33 @@ impl FontHandleMethods for FontHandle {
}
impl<'a> FontHandle {
- fn set_char_size(face: FT_Face, pt_size: Au) -> Result<(), ()>{
+ fn set_char_size(face: FT_Face, pt_size: Au) -> Result<(), ()> {
let char_size = pt_size.to_f64_px() * 64.0 + 0.5;
unsafe {
let result = FT_Set_Char_Size(face, char_size as FT_F26Dot6, 0, 0, 0);
- if succeeded(result) { Ok(()) } else { Err(()) }
+ if succeeded(result) {
+ Ok(())
+ } else {
+ Err(())
+ }
}
}
fn has_table(&self, tag: FontTableTag) -> bool {
unsafe {
- succeeded(FT_Load_Sfnt_Table(self.face, tag as FT_ULong, 0, ptr::null_mut(), &mut 0))
+ succeeded(FT_Load_Sfnt_Table(
+ self.face,
+ tag as FT_ULong,
+ 0,
+ ptr::null_mut(),
+ &mut 0,
+ ))
}
}
fn face_rec_mut(&'a self) -> &'a mut FT_FaceRec {
- unsafe {
- &mut (*self.face)
- }
+ unsafe { &mut (*self.face) }
}
fn font_units_to_au(&self, value: f64) -> Au {
@@ -378,11 +412,12 @@ impl<'a> FontHandle {
fn os2_table(&self) -> Option<OS2Table> {
unsafe {
- let os2 = FT_Get_Sfnt_Table(self.face_rec_mut(), FT_Sfnt_Tag::FT_SFNT_OS2) as *mut TT_OS2;
+ let os2 =
+ FT_Get_Sfnt_Table(self.face_rec_mut(), FT_Sfnt_Tag::FT_SFNT_OS2) as *mut TT_OS2;
let valid = !os2.is_null() && (*os2).version != 0xffff;
if !valid {
- return None
+ return None;
}
Some(OS2Table {
diff --git a/components/gfx/platform/freetype/font_context.rs b/components/gfx/platform/freetype/font_context.rs
index 231d91ce17c..dbc8816efc5 100644
--- a/components/gfx/platform/freetype/font_context.rs
+++ b/components/gfx/platform/freetype/font_context.rs
@@ -23,10 +23,10 @@ pub struct User {
size: usize,
}
-extern fn ft_alloc(mem: FT_Memory, req_size: c_long) -> *mut c_void {
+extern "C" fn ft_alloc(mem: FT_Memory, req_size: c_long) -> *mut c_void {
unsafe {
let ptr = malloc(req_size as usize);
- let ptr = ptr as *mut c_void; // libc::c_void vs std::os::raw::c_void
+ let ptr = ptr as *mut c_void; // libc::c_void vs std::os::raw::c_void
let actual_size = usable_size(ptr);
let user = (*mem).user as *mut User;
(*user).size += actual_size;
@@ -34,7 +34,7 @@ extern fn ft_alloc(mem: FT_Memory, req_size: c_long) -> *mut c_void {
}
}
-extern fn ft_free(mem: FT_Memory, ptr: *mut c_void) {
+extern "C" fn ft_free(mem: FT_Memory, ptr: *mut c_void) {
unsafe {
let actual_size = usable_size(ptr);
let user = (*mem).user as *mut User;
@@ -43,8 +43,12 @@ extern fn ft_free(mem: FT_Memory, ptr: *mut c_void) {
}
}
-extern fn ft_realloc(mem: FT_Memory, _old_size: c_long, new_req_size: c_long,
- old_ptr: *mut c_void) -> *mut c_void {
+extern "C" fn ft_realloc(
+ mem: FT_Memory,
+ _old_size: c_long,
+ new_req_size: c_long,
+ old_ptr: *mut c_void,
+) -> *mut c_void {
unsafe {
let old_actual_size = usable_size(old_ptr);
let new_ptr = realloc(old_ptr as *mut _, new_req_size as usize);
@@ -108,9 +112,7 @@ impl MallocSizeOf for FontContextHandle {
impl FontContextHandle {
pub fn new() -> FontContextHandle {
- let user = Box::into_raw(Box::new(User {
- size: 0,
- }));
+ let user = Box::into_raw(Box::new(User { size: 0 }));
let mem = Box::into_raw(Box::new(FT_MemoryRec_ {
user: user as *mut c_void,
alloc: Some(ft_alloc),
@@ -121,12 +123,18 @@ impl FontContextHandle {
let mut ctx: FT_Library = ptr::null_mut();
let result = FT_New_Library(mem, &mut ctx);
- if !succeeded(result) { panic!("Unable to initialize FreeType library"); }
+ if !succeeded(result) {
+ panic!("Unable to initialize FreeType library");
+ }
FT_Add_Default_Modules(ctx);
FontContextHandle {
- ctx: Rc::new(FreeTypeLibraryHandle { ctx: ctx, mem: mem, user: user }),
+ ctx: Rc::new(FreeTypeLibraryHandle {
+ ctx: ctx,
+ mem: mem,
+ user: user,
+ }),
}
}
}
diff --git a/components/gfx/platform/freetype/font_list.rs b/components/gfx/platform/freetype/font_list.rs
index ddafb94a031..e1ef486fa43 100644
--- a/components/gfx/platform/freetype/font_list.rs
+++ b/components/gfx/platform/freetype/font_list.rs
@@ -20,7 +20,10 @@ static FC_FILE: &'static [u8] = b"file\0";
static FC_INDEX: &'static [u8] = b"index\0";
static FC_FONTFORMAT: &'static [u8] = b"fontformat\0";
-pub fn for_each_available_family<F>(mut callback: F) where F: FnMut(String) {
+pub fn for_each_available_family<F>(mut callback: F)
+where
+ F: FnMut(String),
+{
unsafe {
let config = FcConfigGetCurrent();
let font_set = FcConfigGetFonts(config, FcSetSystem);
@@ -29,19 +32,21 @@ pub fn for_each_available_family<F>(mut callback: F) where F: FnMut(String) {
let mut family: *mut FcChar8 = ptr::null_mut();
let mut format: *mut FcChar8 = ptr::null_mut();
let mut v: c_int = 0;
- if FcPatternGetString(*font, FC_FONTFORMAT.as_ptr() as *mut c_char, v, &mut format) != FcResultMatch {
+ if FcPatternGetString(*font, FC_FONTFORMAT.as_ptr() as *mut c_char, v, &mut format) !=
+ FcResultMatch
+ {
continue;
}
// Skip bitmap fonts. They aren't supported by FreeType.
let fontformat = c_str_to_string(format as *const c_char);
- if fontformat != "TrueType" &&
- fontformat != "CFF" &&
- fontformat != "Type 1" {
+ if fontformat != "TrueType" && fontformat != "CFF" && fontformat != "Type 1" {
continue;
}
- while FcPatternGetString(*font, FC_FAMILY.as_ptr() as *mut c_char, v, &mut family) == FcResultMatch {
+ while FcPatternGetString(*font, FC_FAMILY.as_ptr() as *mut c_char, v, &mut family) ==
+ FcResultMatch
+ {
let family_name = c_str_to_string(family as *const c_char);
callback(family_name);
v += 1;
@@ -51,7 +56,8 @@ 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)
+where
+ F: FnMut(String),
{
debug!("getting variations for {}", family_name);
unsafe {
@@ -62,7 +68,11 @@ pub fn for_each_variation<F>(family_name: &str, mut callback: F)
assert!(!pattern.is_null());
let family_name_c = CString::new(family_name).unwrap();
let family_name = family_name_c.as_ptr();
- let ok = FcPatternAddString(pattern, FC_FAMILY.as_ptr() as *mut c_char, family_name as *mut FcChar8);
+ let ok = FcPatternAddString(
+ pattern,
+ FC_FAMILY.as_ptr() as *mut c_char,
+ family_name as *mut FcChar8,
+ );
assert_ne!(ok, 0);
let object_set = FcObjectSetCreate();
@@ -85,7 +95,8 @@ pub fn for_each_variation<F>(family_name: &str, mut callback: F)
panic!();
};
let mut index: libc::c_int = 0;
- let result = FcPatternGetInteger(*font, FC_INDEX.as_ptr() as *mut c_char, 0, &mut index);
+ let result =
+ FcPatternGetInteger(*font, FC_INDEX.as_ptr() as *mut c_char, 0, &mut index);
let index = if result == FcResultMatch {
index
} else {
@@ -119,7 +130,12 @@ pub fn system_default_family(generic_name: &str) -> Option<String> {
let family_name = if result == FcResultMatch {
let mut match_string: *mut FcChar8 = ptr::null_mut();
- FcPatternGetString(family_match, FC_FAMILY.as_ptr() as *mut c_char, 0, &mut match_string);
+ FcPatternGetString(
+ family_match,
+ FC_FAMILY.as_ptr() as *mut c_char,
+ 0,
+ &mut match_string,
+ );
let result = c_str_to_string(match_string as *const c_char);
FcPatternDestroy(family_match);
Some(result)
@@ -136,12 +152,7 @@ pub static SANS_SERIF_FONT_FAMILY: &'static str = "DejaVu Sans";
// Based on gfxPlatformGtk::GetCommonFallbackFonts() in Gecko
pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
- let mut families = vec!(
- "DejaVu Serif",
- "FreeSerif",
- "DejaVu Sans",
- "FreeSans",
- );
+ let mut families = vec!["DejaVu Serif", "FreeSerif", "DejaVu Sans", "FreeSans"];
if let Some(codepoint) = codepoint {
if is_cjk(codepoint) {
diff --git a/components/gfx/platform/freetype/font_template.rs b/components/gfx/platform/freetype/font_template.rs
index c4b4a9bc9e7..674739b69ce 100644
--- a/components/gfx/platform/freetype/font_template.rs
+++ b/components/gfx/platform/freetype/font_template.rs
@@ -15,7 +15,6 @@ use webrender_api::NativeFontHandle;
#[derive(Deserialize, Serialize)]
pub struct FontTemplateData {
// If you add members here, review the Debug impl below
-
pub bytes: Option<Vec<u8>>,
pub identifier: Atom,
}
@@ -23,9 +22,11 @@ pub struct FontTemplateData {
impl fmt::Debug for FontTemplateData {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt.debug_struct("FontTemplateData")
- .field("bytes", &self.bytes.as_ref().map(|b| format!("[{} bytes]", b.len())))
- .field("identifier", &self.identifier)
- .finish()
+ .field(
+ "bytes",
+ &self.bytes.as_ref().map(|b| format!("[{} bytes]", b.len())),
+ ).field("identifier", &self.identifier)
+ .finish()
}
}
diff --git a/components/gfx/platform/macos/font.rs b/components/gfx/platform/macos/font.rs
index e09407b9a39..842c52fd70c 100644
--- a/components/gfx/platform/macos/font.rs
+++ b/components/gfx/platform/macos/font.rs
@@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/// Implementation of Quartz (CoreGraphics) fonts.
-
use app_units::Au;
use byteorder::{BigEndian, ByteOrder};
use core_foundation::base::CFIndex;
@@ -111,8 +110,8 @@ impl FontHandle {
return None;
}
- let pt_per_font_unit = self.ctfont.pt_size() as f64 /
- self.ctfont.units_per_em() as f64;
+ let pt_per_font_unit =
+ self.ctfont.pt_size() as f64 / self.ctfont.units_per_em() as f64;
result.px_per_font_unit = pt_to_px(pt_per_font_unit);
}
start = end;
@@ -160,15 +159,15 @@ impl fmt::Debug for CachedKernTable {
}
}
-
impl FontHandleMethods for FontHandle {
- fn new_from_template(_fctx: &FontContextHandle,
- template: Arc<FontTemplateData>,
- pt_size: Option<Au>)
- -> Result<FontHandle, ()> {
+ fn new_from_template(
+ _fctx: &FontContextHandle,
+ template: Arc<FontTemplateData>,
+ pt_size: Option<Au>,
+ ) -> Result<FontHandle, ()> {
let size = match pt_size {
Some(s) => s.to_f64_px(),
- None => 0.0
+ None => 0.0,
};
match template.ctfont(size) {
Some(ref ctfont) => {
@@ -181,13 +180,11 @@ impl FontHandleMethods for FontHandle {
handle.h_kern_subtable = handle.find_h_kern_subtable();
// TODO (#11310): Implement basic support for GPOS and GSUB.
handle.can_do_fast_shaping = handle.h_kern_subtable.is_some() &&
- handle.table_for_tag(GPOS).is_none() &&
- handle.table_for_tag(GSUB).is_none();
+ handle.table_for_tag(GPOS).is_none() &&
+ handle.table_for_tag(GSUB).is_none();
Ok(handle)
- }
- None => {
- Err(())
- }
+ },
+ None => Err(()),
}
}
@@ -213,13 +210,14 @@ impl FontHandleMethods for FontHandle {
}
fn boldness(&self) -> FontWeight {
- let normalized = self.ctfont.all_traits().normalized_weight(); // [-1.0, 1.0]
+ let normalized = self.ctfont.all_traits().normalized_weight(); // [-1.0, 1.0]
+
// TODO(emilio): It may make sense to make this range [.01, 10.0], to
// align with css-fonts-4's range of [1, 1000].
let normalized = if normalized <= 0.0 {
- 4.0 + normalized * 3.0 // [1.0, 4.0]
+ 4.0 + normalized * 3.0 // [1.0, 4.0]
} else {
- 4.0 + normalized * 5.0 // [4.0, 9.0]
+ 4.0 + normalized * 5.0 // [4.0, 9.0]
}; // [1.0, 9.0], centered on 4.0
FontWeight(normalized as f32 * 100.)
}
@@ -228,7 +226,7 @@ impl FontHandleMethods for FontHandle {
use style::values::computed::Percentage;
use style::values::generics::NonNegative;
- let normalized = self.ctfont.all_traits().normalized_width(); // [-1.0, 1.0]
+ let normalized = self.ctfont.all_traits().normalized_width(); // [-1.0, 1.0]
FontStretch(NonNegative(Percentage(normalized as f32 + 1.0)))
}
@@ -237,9 +235,9 @@ impl FontHandleMethods for FontHandle {
let mut glyphs: [CGGlyph; 1] = [0 as CGGlyph];
let count: CFIndex = 1;
- let result = self.ctfont.get_glyphs_for_characters(&characters[0],
- &mut glyphs[0],
- count);
+ let result = self
+ .ctfont
+ .get_glyphs_for_characters(&characters[0], &mut glyphs[0], count);
if !result {
// No glyph for this character
@@ -265,10 +263,12 @@ impl FontHandleMethods for FontHandle {
fn glyph_h_advance(&self, glyph: GlyphId) -> Option<FractionalPixel> {
let glyphs = [glyph as CGGlyph];
- let advance = self.ctfont.get_advances_for_glyphs(kCTFontDefaultOrientation,
- &glyphs[0],
- ptr::null_mut(),
- 1);
+ let advance = self.ctfont.get_advances_for_glyphs(
+ kCTFontDefaultOrientation,
+ &glyphs[0],
+ ptr::null_mut(),
+ 1,
+ );
Some(advance as FractionalPixel)
}
@@ -283,39 +283,42 @@ impl FontHandleMethods for FontHandle {
let line_gap = (ascent + descent + leading + 0.5).floor();
let max_advance_width = au_from_pt(bounding_rect.size.width as f64);
- let average_advance = self.glyph_index('0')
- .and_then(|idx| self.glyph_h_advance(idx))
- .map(Au::from_f64_px)
- .unwrap_or(max_advance_width);
+ let average_advance = self
+ .glyph_index('0')
+ .and_then(|idx| self.glyph_h_advance(idx))
+ .map(Au::from_f64_px)
+ .unwrap_or(max_advance_width);
let metrics = FontMetrics {
- underline_size: au_from_pt(self.ctfont.underline_thickness() as f64),
+ underline_size: au_from_pt(self.ctfont.underline_thickness() as f64),
// TODO(Issue #201): underline metrics are not reliable. Have to pull out of font table
// directly.
//
// see also: https://bugs.webkit.org/show_bug.cgi?id=16768
// see also: https://bugreports.qt-project.org/browse/QTBUG-13364
underline_offset: au_from_pt(self.ctfont.underline_position() as f64),
- strikeout_size: Au(0), // FIXME(Issue #942)
+ strikeout_size: Au(0), // FIXME(Issue #942)
strikeout_offset: Au(0), // FIXME(Issue #942)
- leading: au_from_pt(leading),
- x_height: au_from_pt((self.ctfont.x_height() as f64) * scale),
- em_size: em_size,
- ascent: au_from_pt(ascent * scale),
- descent: au_from_pt(descent * scale),
- max_advance: max_advance_width,
- average_advance: average_advance,
- line_gap: Au::from_f64_px(line_gap),
+ leading: au_from_pt(leading),
+ x_height: au_from_pt((self.ctfont.x_height() as f64) * scale),
+ em_size: em_size,
+ ascent: au_from_pt(ascent * scale),
+ descent: au_from_pt(descent * scale),
+ max_advance: max_advance_width,
+ average_advance: average_advance,
+ line_gap: Au::from_f64_px(line_gap),
};
- debug!("Font metrics (@{} pt): {:?}", self.ctfont.pt_size() as f64, metrics);
+ debug!(
+ "Font metrics (@{} pt): {:?}",
+ self.ctfont.pt_size() as f64,
+ metrics
+ );
metrics
}
fn table_for_tag(&self, tag: FontTableTag) -> Option<FontTable> {
let result: Option<CFData> = self.ctfont.get_font_table(tag);
- result.and_then(|data| {
- Some(FontTable::wrap(data))
- })
+ result.and_then(|data| Some(FontTable::wrap(data)))
}
fn identifier(&self) -> Atom {
diff --git a/components/gfx/platform/macos/font_context.rs b/components/gfx/platform/macos/font_context.rs
index b9a6b193a6d..3de73025a82 100644
--- a/components/gfx/platform/macos/font_context.rs
+++ b/components/gfx/platform/macos/font_context.rs
@@ -6,7 +6,7 @@ use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
#[derive(Clone, Debug)]
pub struct FontContextHandle {
- ctx: ()
+ ctx: (),
}
impl FontContextHandle {
diff --git a/components/gfx/platform/macos/font_list.rs b/components/gfx/platform/macos/font_list.rs
index 656cc043907..df78a3917c8 100644
--- a/components/gfx/platform/macos/font_list.rs
+++ b/components/gfx/platform/macos/font_list.rs
@@ -6,14 +6,20 @@ use core_text;
use text::util::unicode_plane;
use ucd::{Codepoint, UnicodeBlock};
-pub fn for_each_available_family<F>(mut callback: F) where F: FnMut(String) {
+pub fn for_each_available_family<F>(mut callback: F)
+where
+ F: FnMut(String),
+{
let family_names = core_text::font_collection::get_family_names();
for family_name in family_names.iter() {
callback(family_name.to_string());
}
}
-pub fn for_each_variation<F>(family_name: &str, mut callback: F) where F: FnMut(String) {
+pub fn for_each_variation<F>(family_name: &str, mut callback: F)
+where
+ F: FnMut(String),
+{
debug!("Looking for faces of family: {}", family_name);
let family_collection = core_text::font_collection::create_for_family(family_name);
@@ -31,7 +37,7 @@ pub fn system_default_family(_generic_name: &str) -> Option<String> {
// Based on gfxPlatformMac::GetCommonFallbackFonts() in Gecko
pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
- let mut families = vec!("Lucida Grande");
+ let mut families = vec!["Lucida Grande"];
if let Some(codepoint) = codepoint {
match unicode_plane(codepoint) {
@@ -45,66 +51,65 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
UnicodeBlock::Thaana |
UnicodeBlock::NKo => {
families.push("Geeza Pro");
- }
+ },
UnicodeBlock::Devanagari => {
families.push("Devanagari Sangam MN");
- }
+ },
UnicodeBlock::Gurmukhi => {
families.push("Gurmukhi MN");
- }
+ },
UnicodeBlock::Gujarati => {
families.push("Gujarati Sangam MN");
- }
+ },
UnicodeBlock::Tamil => {
families.push("Tamil MN");
- }
+ },
UnicodeBlock::Lao => {
families.push("Lao MN");
- }
+ },
UnicodeBlock::Tibetan => {
families.push("Songti SC");
- }
+ },
UnicodeBlock::Myanmar => {
families.push("Myanmar MN");
- }
+ },
UnicodeBlock::Ethiopic |
UnicodeBlock::EthiopicSupplement |
UnicodeBlock::EthiopicExtended |
UnicodeBlock::EthiopicExtendedA => {
families.push("Kefa");
- }
+ },
UnicodeBlock::Cherokee => {
families.push("Plantagenet Cherokee");
- }
+ },
UnicodeBlock::UnifiedCanadianAboriginalSyllabics |
UnicodeBlock::UnifiedCanadianAboriginalSyllabicsExtended => {
families.push("Euphemia UCAS");
- }
+ },
UnicodeBlock::Mongolian |
UnicodeBlock::YiSyllables |
UnicodeBlock::YiRadicals => {
families.push("STHeiti");
- }
+ },
- UnicodeBlock::Khmer |
- UnicodeBlock::KhmerSymbols => {
+ UnicodeBlock::Khmer | UnicodeBlock::KhmerSymbols => {
families.push("Khmer MN");
- }
+ },
UnicodeBlock::TaiLe => {
families.push("Microsoft Tai Le");
- }
+ },
UnicodeBlock::GeneralPunctuation |
UnicodeBlock::SuperscriptsandSubscripts |
@@ -134,11 +139,11 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
families.push("Apple Symbols");
families.push("Menlo");
families.push("STIXGeneral");
- }
+ },
UnicodeBlock::BraillePatterns => {
families.push("Apple Braille");
- }
+ },
UnicodeBlock::Bopomofo |
UnicodeBlock::HangulCompatibilityJamo |
@@ -147,7 +152,7 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
UnicodeBlock::CJKStrokes |
UnicodeBlock::KatakanaPhoneticExtensions => {
families.push("Hiragino Sans GB");
- }
+ },
UnicodeBlock::YijingHexagramSymbols |
UnicodeBlock::CyrillicExtendedB |
@@ -158,27 +163,27 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
UnicodeBlock::HalfwidthandFullwidthForms |
UnicodeBlock::Specials => {
families.push("Apple Symbols");
- }
+ },
- _ => {}
+ _ => {},
}
}
- }
+ },
// https://en.wikipedia.org/wiki/Plane_(Unicode)#Supplementary_Multilingual_Plane
1 => {
families.push("Apple Symbols");
families.push("STIXGeneral");
- }
+ },
// https://en.wikipedia.org/wiki/Plane_(Unicode)#Supplementary_Ideographic_Plane
2 => {
// Systems with MS Office may have these fonts
families.push("MingLiU-ExtB");
families.push("SimSun-ExtB");
- }
+ },
- _ => {}
+ _ => {},
}
}
diff --git a/components/gfx/platform/macos/font_template.rs b/components/gfx/platform/macos/font_template.rs
index 15cc2a8689c..85d134f45a2 100644
--- a/components/gfx/platform/macos/font_template.rs
+++ b/components/gfx/platform/macos/font_template.rs
@@ -27,7 +27,6 @@ use webrender_api::NativeFontHandle;
#[derive(Deserialize, Serialize)]
pub struct FontTemplateData {
// If you add members here, review the Debug impl below
-
/// The `CTFont` object, if present. This is cached here so that we don't have to keep creating
/// `CTFont` instances over and over. It can always be recreated from the `identifier` and/or
/// `font_data` fields.
@@ -38,21 +37,21 @@ pub struct FontTemplateData {
ctfont: CachedCTFont,
pub identifier: Atom,
- pub font_data: Option<Arc<Vec<u8>>>
+ pub font_data: Option<Arc<Vec<u8>>>,
}
impl fmt::Debug for FontTemplateData {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt.debug_struct("FontTemplateData")
- .field("ctfont", &self.ctfont)
- .field("identifier", &self.identifier)
- .field(
- "font_data",
- &self.font_data
+ .field("ctfont", &self.ctfont)
+ .field("identifier", &self.identifier)
+ .field(
+ "font_data",
+ &self
+ .font_data
.as_ref()
- .map(|bytes| format!("[{} bytes]", bytes.len()))
- )
- .finish()
+ .map(|bytes| format!("[{} bytes]", bytes.len())),
+ ).finish()
}
}
@@ -64,7 +63,7 @@ impl FontTemplateData {
Ok(FontTemplateData {
ctfont: CachedCTFont(Mutex::new(HashMap::new())),
identifier: identifier.to_owned(),
- font_data: font_data.map(Arc::new)
+ font_data: font_data.map(Arc::new),
})
}
@@ -83,10 +82,10 @@ impl FontTemplateData {
match cgfont_result {
Ok(cgfont) => {
Some(core_text::font::new_from_CGFont(&cgfont, clamped_pt_size))
- }
- Err(_) => None
+ },
+ Err(_) => None,
}
- }
+ },
None => core_text::font::new_from_name(&*self.identifier, clamped_pt_size).ok(),
};
if let Some(ctfont) = ctfont {
@@ -104,16 +103,23 @@ impl FontTemplateData {
return font_data;
}
- let path = ServoUrl::parse(&*self.ctfont(0.0)
- .expect("No Core Text font available!")
- .url()
- .expect("No URL for Core Text font!")
- .get_string()
- .to_string()).expect("Couldn't parse Core Text font URL!")
- .as_url().to_file_path()
- .expect("Core Text font didn't name a path!");
+ let path = ServoUrl::parse(
+ &*self
+ .ctfont(0.0)
+ .expect("No Core Text font available!")
+ .url()
+ .expect("No URL for Core Text font!")
+ .get_string()
+ .to_string(),
+ ).expect("Couldn't parse Core Text font URL!")
+ .as_url()
+ .to_file_path()
+ .expect("Core Text font didn't name a path!");
let mut bytes = Vec::new();
- File::open(path).expect("Couldn't open font file!").read_to_end(&mut bytes).unwrap();
+ File::open(path)
+ .expect("Couldn't open font file!")
+ .read_to_end(&mut bytes)
+ .unwrap();
bytes
}
@@ -125,7 +131,8 @@ impl FontTemplateData {
/// Returns the native font that underlies this font template, if applicable.
pub fn native_font(&self) -> Option<NativeFontHandle> {
- self.ctfont(0.0).map(|ctfont| NativeFontHandle(ctfont.copy_to_CGFont()))
+ self.ctfont(0.0)
+ .map(|ctfont| NativeFontHandle(ctfont.copy_to_CGFont()))
}
}
@@ -140,14 +147,19 @@ impl Deref for CachedCTFont {
}
impl Serialize for CachedCTFont {
- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
serializer.serialize_none()
}
}
impl<'de> Deserialize<'de> for CachedCTFont {
fn deserialize<D>(deserializer: D) -> Result<CachedCTFont, D::Error>
- where D: Deserializer<'de> {
+ where
+ D: Deserializer<'de>,
+ {
struct NoneOptionVisitor;
impl<'de> Visitor<'de> for NoneOptionVisitor {
@@ -158,7 +170,10 @@ impl<'de> Deserialize<'de> for CachedCTFont {
}
#[inline]
- fn visit_none<E>(self) -> Result<CachedCTFont, E> where E: Error {
+ fn visit_none<E>(self) -> Result<CachedCTFont, E>
+ where
+ E: Error,
+ {
Ok(CachedCTFont(Mutex::new(HashMap::new())))
}
}
diff --git a/components/gfx/platform/mod.rs b/components/gfx/platform/mod.rs
index 897fbe9e8d3..106b232e308 100644
--- a/components/gfx/platform/mod.rs
+++ b/components/gfx/platform/mod.rs
@@ -23,7 +23,9 @@ mod freetype {
/// Creates a String from the given null-terminated buffer.
/// Panics if the buffer does not contain UTF-8.
unsafe fn c_str_to_string(s: *const c_char) -> String {
- str::from_utf8(CStr::from_ptr(s).to_bytes()).unwrap().to_owned()
+ str::from_utf8(CStr::from_ptr(s).to_bytes())
+ .unwrap()
+ .to_owned()
}
pub mod font;
diff --git a/components/gfx/platform/windows/font.rs b/components/gfx/platform/windows/font.rs
index 6ea8dcf0538..074bc62748a 100644
--- a/components/gfx/platform/windows/font.rs
+++ b/components/gfx/platform/windows/font.rs
@@ -27,10 +27,18 @@ use text::glyph::GlyphId;
use truetype;
// 1em = 12pt = 16px, assuming 72 points per inch and 96 px per inch
-fn pt_to_px(pt: f64) -> f64 { pt / 72. * 96. }
-fn em_to_px(em: f64) -> f64 { em * 16. }
-fn au_from_em(em: f64) -> Au { Au::from_f64_px(em_to_px(em)) }
-fn au_from_pt(pt: f64) -> Au { Au::from_f64_px(pt_to_px(pt)) }
+fn pt_to_px(pt: f64) -> f64 {
+ pt / 72. * 96.
+}
+fn em_to_px(em: f64) -> f64 {
+ em * 16.
+}
+fn au_from_em(em: f64) -> Au {
+ Au::from_f64_px(em_to_px(em))
+}
+fn au_from_pt(pt: f64) -> Au {
+ Au::from_f64_px(pt_to_px(pt))
+}
pub struct FontTable {
data: Vec<u8>,
@@ -38,7 +46,9 @@ pub struct FontTable {
impl FontTable {
pub fn wrap(data: &[u8]) -> FontTable {
- FontTable { data: data.to_vec() }
+ FontTable {
+ data: data.to_vec(),
+ }
}
}
@@ -139,7 +149,7 @@ impl FontInfo {
} else {
return Err(());
}
- }
+ },
};
let mut os2_table_cursor = Cursor::new(os2_table_bytes.as_ref().unwrap());
@@ -163,18 +173,20 @@ impl FontInfo {
let weight = StyleFontWeight(weight_val as f32);
- let stretch = StyleFontStretch(NonNegative(match min(9, max(1, width_val)) {
- 1 => FontStretchKeyword::UltraCondensed,
- 2 => FontStretchKeyword::ExtraCondensed,
- 3 => FontStretchKeyword::Condensed,
- 4 => FontStretchKeyword::SemiCondensed,
- 5 => FontStretchKeyword::Normal,
- 6 => FontStretchKeyword::SemiExpanded,
- 7 => FontStretchKeyword::Expanded,
- 8 => FontStretchKeyword::ExtraExpanded,
- 9 => FontStretchKeyword::UltraExpanded,
- _ => return Err(()),
- }.compute()));
+ let stretch = StyleFontStretch(NonNegative(
+ match min(9, max(1, width_val)) {
+ 1 => FontStretchKeyword::UltraCondensed,
+ 2 => FontStretchKeyword::ExtraCondensed,
+ 3 => FontStretchKeyword::Condensed,
+ 4 => FontStretchKeyword::SemiCondensed,
+ 5 => FontStretchKeyword::Normal,
+ 6 => FontStretchKeyword::SemiExpanded,
+ 7 => FontStretchKeyword::Expanded,
+ 8 => FontStretchKeyword::ExtraExpanded,
+ 9 => FontStretchKeyword::UltraExpanded,
+ _ => return Err(()),
+ }.compute(),
+ ));
let style = if italic_bool {
GenericFontStyle::Italic
@@ -212,18 +224,20 @@ impl FontInfo {
// slightly blacker black
FontWeight::ExtraBlack => 1000.,
});
- let stretch = StyleFontStretch(NonNegative(match font.stretch() {
- FontStretch::Undefined => FontStretchKeyword::Normal,
- FontStretch::UltraCondensed => FontStretchKeyword::UltraCondensed,
- FontStretch::ExtraCondensed => FontStretchKeyword::ExtraCondensed,
- FontStretch::Condensed => FontStretchKeyword::Condensed,
- FontStretch::SemiCondensed => FontStretchKeyword::SemiCondensed,
- FontStretch::Normal => FontStretchKeyword::Normal,
- FontStretch::SemiExpanded => FontStretchKeyword::SemiExpanded,
- FontStretch::Expanded => FontStretchKeyword::Expanded,
- FontStretch::ExtraExpanded => FontStretchKeyword::ExtraExpanded,
- FontStretch::UltraExpanded => FontStretchKeyword::UltraExpanded,
- }.compute()));
+ let stretch = StyleFontStretch(NonNegative(
+ match font.stretch() {
+ FontStretch::Undefined => FontStretchKeyword::Normal,
+ FontStretch::UltraCondensed => FontStretchKeyword::UltraCondensed,
+ FontStretch::ExtraCondensed => FontStretchKeyword::ExtraCondensed,
+ FontStretch::Condensed => FontStretchKeyword::Condensed,
+ FontStretch::SemiCondensed => FontStretchKeyword::SemiCondensed,
+ FontStretch::Normal => FontStretchKeyword::Normal,
+ FontStretch::SemiExpanded => FontStretchKeyword::SemiExpanded,
+ FontStretch::Expanded => FontStretchKeyword::Expanded,
+ FontStretch::ExtraExpanded => FontStretchKeyword::ExtraExpanded,
+ FontStretch::UltraExpanded => FontStretchKeyword::UltraExpanded,
+ }.compute(),
+ ));
Ok(FontInfo {
family_name: font.family_name(),
@@ -246,13 +260,14 @@ pub struct FontHandle {
scaled_du_to_px: f32,
}
-impl FontHandle {
-}
+impl FontHandle {}
impl FontHandleMethods for FontHandle {
- fn new_from_template(_: &FontContextHandle, template: Arc<FontTemplateData>, pt_size: Option<Au>)
- -> Result<Self, ()>
- {
+ fn new_from_template(
+ _: &FontContextHandle,
+ template: Arc<FontTemplateData>,
+ pt_size: Option<Au>,
+ ) -> Result<Self, ()> {
let (info, face) = if let Some(ref raw_font) = template.bytes {
let font_file = FontFile::new_from_data(&raw_font);
if font_file.is_none() {
@@ -260,7 +275,9 @@ impl FontHandleMethods for FontHandle {
return Err(());
}
- let face = font_file.unwrap().create_face(0, dwrote::DWRITE_FONT_SIMULATIONS_NONE);
+ let face = font_file
+ .unwrap()
+ .create_face(0, dwrote::DWRITE_FONT_SIMULATIONS_NONE);
let info = FontInfo::new_from_face(&face)?;
(info, face)
} else {
@@ -350,32 +367,34 @@ impl FontHandleMethods for FontHandle {
let dm = self.face.metrics();
let au_from_du = |du| -> Au { Au::from_f32_px(du as f32 * self.du_to_px) };
- let au_from_du_s = |du| -> Au { Au:: from_f32_px(du as f32 * self.scaled_du_to_px) };
+ let au_from_du_s = |du| -> Au { Au::from_f32_px(du as f32 * self.scaled_du_to_px) };
// anything that we calculate and don't just pull out of self.face.metrics
// is pulled out here for clarity
let leading = dm.ascent - dm.capHeight;
let metrics = FontMetrics {
- underline_size: au_from_du(dm.underlineThickness as i32),
+ underline_size: au_from_du(dm.underlineThickness as i32),
underline_offset: au_from_du_s(dm.underlinePosition as i32),
- strikeout_size: au_from_du(dm.strikethroughThickness as i32),
+ strikeout_size: au_from_du(dm.strikethroughThickness as i32),
strikeout_offset: au_from_du_s(dm.strikethroughPosition as i32),
- leading: au_from_du_s(leading as i32),
- x_height: au_from_du_s(dm.xHeight as i32),
- em_size: au_from_em(self.em_size as f64),
- ascent: au_from_du_s(dm.ascent as i32),
- descent: au_from_du_s(dm.descent as i32),
- max_advance: au_from_pt(0.0), // FIXME
- average_advance: au_from_pt(0.0), // FIXME
- line_gap: au_from_du_s((dm.ascent + dm.descent + dm.lineGap as u16) as i32),
+ leading: au_from_du_s(leading as i32),
+ x_height: au_from_du_s(dm.xHeight as i32),
+ em_size: au_from_em(self.em_size as f64),
+ ascent: au_from_du_s(dm.ascent as i32),
+ descent: au_from_du_s(dm.descent as i32),
+ max_advance: au_from_pt(0.0), // FIXME
+ average_advance: au_from_pt(0.0), // FIXME
+ line_gap: au_from_du_s((dm.ascent + dm.descent + dm.lineGap as u16) as i32),
};
debug!("Font metrics (@{} pt): {:?}", self.em_size * 12., metrics);
metrics
}
fn table_for_tag(&self, tag: FontTableTag) -> Option<FontTable> {
- self.face.get_font_table(tag).map(|bytes| FontTable { data: bytes })
+ self.face
+ .get_font_table(tag)
+ .map(|bytes| FontTable { data: bytes })
}
fn identifier(&self) -> Atom {
diff --git a/components/gfx/platform/windows/font_list.rs b/components/gfx/platform/windows/font_list.rs
index 3271b77e7fb..b2d73b3db5c 100644
--- a/components/gfx/platform/windows/font_list.rs
+++ b/components/gfx/platform/windows/font_list.rs
@@ -21,7 +21,10 @@ pub fn system_default_family(_: &str) -> Option<String> {
Some("Verdana".to_owned())
}
-pub fn for_each_available_family<F>(mut callback: F) where F: FnMut(String) {
+pub fn for_each_available_family<F>(mut callback: F)
+where
+ F: FnMut(String),
+{
let system_fc = FontCollection::system();
for family in system_fc.families_iter() {
callback(family.name());
@@ -37,7 +40,10 @@ pub fn for_each_available_family<F>(mut callback: F) where F: FnMut(String) {
// we'll stringify, and then put them all in a HashMap with
// the actual FontDescriptor there.
-pub fn for_each_variation<F>(family_name: &str, mut callback: F) where F: FnMut(String) {
+pub fn for_each_variation<F>(family_name: &str, mut callback: F)
+where
+ F: FnMut(String),
+{
let system_fc = FontCollection::system();
if let Some(family) = system_fc.get_font_family_by_name(family_name) {
let count = family.get_font_count();
@@ -65,12 +71,14 @@ pub fn descriptor_from_atom(ident: &Atom) -> FontDescriptor {
pub fn font_from_atom(ident: &Atom) -> Font {
let fonts = FONT_ATOM_MAP.lock().unwrap();
- FontCollection::system().get_font_from_descriptor(fonts.get(ident).unwrap()).unwrap()
+ FontCollection::system()
+ .get_font_from_descriptor(fonts.get(ident).unwrap())
+ .unwrap()
}
// Based on gfxWindowsPlatform::GetCommonFallbackFonts() in Gecko
pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
- let mut families = vec!("Arial");
+ let mut families = vec!["Arial"];
if let Some(codepoint) = codepoint {
match unicode_plane(codepoint) {
@@ -83,31 +91,29 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
UnicodeBlock::Hebrew => {
families.push("Estrangelo Edessa");
families.push("Cambria");
- }
+ },
- UnicodeBlock::Arabic |
- UnicodeBlock::ArabicSupplement => {
+ UnicodeBlock::Arabic | UnicodeBlock::ArabicSupplement => {
families.push("Microsoft Uighur");
- }
+ },
UnicodeBlock::Syriac => {
families.push("Estrangelo Edessa");
- }
+ },
UnicodeBlock::Thaana => {
families.push("MV Boli");
- }
+ },
UnicodeBlock::NKo => {
families.push("Ebrima");
- }
+ },
- UnicodeBlock::Devanagari |
- UnicodeBlock::Bengali => {
+ UnicodeBlock::Devanagari | UnicodeBlock::Bengali => {
families.push("Nirmala UI");
families.push("Utsaah");
families.push("Aparajita");
- }
+ },
UnicodeBlock::Gurmukhi |
UnicodeBlock::Gujarati |
@@ -123,21 +129,21 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
UnicodeBlock::SundaneseSupplement |
UnicodeBlock::VedicExtensions => {
families.push("Nirmala UI");
- }
+ },
UnicodeBlock::Thai => {
families.push("Leelawadee UI");
- }
+ },
UnicodeBlock::Lao => {
families.push("Lao UI");
- }
+ },
UnicodeBlock::Myanmar |
UnicodeBlock::MyanmarExtendedA |
UnicodeBlock::MyanmarExtendedB => {
families.push("Myanmar Text");
- }
+ },
UnicodeBlock::HangulJamo |
UnicodeBlock::HangulJamoExtendedA |
@@ -145,48 +151,47 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
UnicodeBlock::HangulJamoExtendedB |
UnicodeBlock::HangulCompatibilityJamo => {
families.push("Malgun Gothic");
- }
+ },
UnicodeBlock::Ethiopic |
UnicodeBlock::EthiopicSupplement |
UnicodeBlock::EthiopicExtended |
UnicodeBlock::EthiopicExtendedA => {
families.push("Nyala");
- }
+ },
UnicodeBlock::Cherokee => {
families.push("Plantagenet Cherokee");
- }
+ },
UnicodeBlock::UnifiedCanadianAboriginalSyllabics |
UnicodeBlock::UnifiedCanadianAboriginalSyllabicsExtended => {
families.push("Euphemia");
families.push("Segoe UI");
- }
+ },
- UnicodeBlock::Khmer |
- UnicodeBlock::KhmerSymbols => {
+ UnicodeBlock::Khmer | UnicodeBlock::KhmerSymbols => {
families.push("Khmer UI");
families.push("Leelawadee UI");
- }
+ },
UnicodeBlock::Mongolian => {
families.push("Mongolian Baiti");
- }
+ },
UnicodeBlock::TaiLe => {
families.push("Microsoft Tai Le");
- }
+ },
UnicodeBlock::NewTaiLue => {
families.push("Microsoft New Tai Lue");
- }
+ },
UnicodeBlock::Buginese |
UnicodeBlock::TaiTham |
UnicodeBlock::CombiningDiacriticalMarksExtended => {
families.push("Leelawadee UI");
- }
+ },
UnicodeBlock::GeneralPunctuation |
UnicodeBlock::SuperscriptsandSubscripts |
@@ -220,7 +225,7 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
families.push("Meiryo");
families.push("Lucida Sans Unicode");
families.push("Ebrima");
- }
+ },
UnicodeBlock::GeorgianSupplement |
UnicodeBlock::Tifinagh |
@@ -232,11 +237,11 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
families.push("Segoe UI");
families.push("Segoe UI Symbol");
families.push("Meiryo");
- }
+ },
UnicodeBlock::BraillePatterns => {
families.push("Segoe UI Symbol");
- }
+ },
UnicodeBlock::CJKSymbolsandPunctuation |
UnicodeBlock::Hiragana |
@@ -249,21 +254,20 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
UnicodeBlock::CJKUnifiedIdeographs => {
families.push("Microsoft YaHei");
families.push("Yu Gothic");
- }
+ },
UnicodeBlock::EnclosedCJKLettersandMonths => {
families.push("Malgun Gothic");
- }
+ },
UnicodeBlock::YijingHexagramSymbols => {
families.push("Segoe UI Symbol");
- }
+ },
- UnicodeBlock::YiSyllables |
- UnicodeBlock::YiRadicals => {
+ UnicodeBlock::YiSyllables | UnicodeBlock::YiRadicals => {
families.push("Microsoft Yi Baiti");
families.push("Segoe UI");
- }
+ },
UnicodeBlock::Vai |
UnicodeBlock::CyrillicExtendedB |
@@ -273,36 +277,34 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
families.push("Ebrima");
families.push("Segoe UI");
families.push("Cambria Math");
- }
+ },
UnicodeBlock::SylotiNagri |
UnicodeBlock::CommonIndicNumberForms |
UnicodeBlock::Phagspa |
UnicodeBlock::Saurashtra |
UnicodeBlock::DevanagariExtended => {
- families.push("Microsoft PhagsPa");
- families.push("Nirmala UI");
- }
-
- UnicodeBlock::KayahLi |
- UnicodeBlock::Rejang |
- UnicodeBlock::Javanese => {
- families.push("Malgun Gothic");
- families.push("Javanese Text");
- families.push("Leelawadee UI");
- }
+ families.push("Microsoft PhagsPa");
+ families.push("Nirmala UI");
+ },
+
+ UnicodeBlock::KayahLi | UnicodeBlock::Rejang | UnicodeBlock::Javanese => {
+ families.push("Malgun Gothic");
+ families.push("Javanese Text");
+ families.push("Leelawadee UI");
+ },
UnicodeBlock::AlphabeticPresentationForms => {
families.push("Microsoft Uighur");
families.push("Gabriola");
families.push("Sylfaen");
- }
+ },
UnicodeBlock::ArabicPresentationFormsA |
UnicodeBlock::ArabicPresentationFormsB => {
families.push("Traditional Arabic");
families.push("Arabic Typesetting");
- }
+ },
UnicodeBlock::VariationSelectors |
UnicodeBlock::VerticalForms |
@@ -312,12 +314,12 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
UnicodeBlock::HalfwidthandFullwidthForms |
UnicodeBlock::Specials => {
families.push("Microsoft JhengHei");
- }
+ },
- _ => {}
+ _ => {},
}
}
- }
+ },
// https://en.wikipedia.org/wiki/Plane_(Unicode)#Supplementary_Multilingual_Plane
1 => {
@@ -325,9 +327,9 @@ pub fn fallback_font_families(codepoint: Option<char>) -> Vec<&'static str> {
families.push("Ebrima");
families.push("Nirmala UI");
families.push("Cambria Math");
- }
+ },
- _ => {}
+ _ => {},
}
}
diff --git a/components/gfx/platform/windows/font_template.rs b/components/gfx/platform/windows/font_template.rs
index 5aff546701f..53eae0347fd 100644
--- a/components/gfx/platform/windows/font_template.rs
+++ b/components/gfx/platform/windows/font_template.rs
@@ -11,7 +11,6 @@ use webrender_api::NativeFontHandle;
#[derive(Deserialize, Serialize)]
pub struct FontTemplateData {
// If you add members here, review the Debug impl below
-
pub bytes: Option<Vec<u8>>,
pub identifier: Atom,
}
@@ -19,20 +18,22 @@ pub struct FontTemplateData {
impl fmt::Debug for FontTemplateData {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt.debug_struct("FontTemplateData")
- .field(
- "bytes",
- &self.bytes
+ .field(
+ "bytes",
+ &self
+ .bytes
.as_ref()
- .map(|bytes| format!("[{} bytes]", bytes.len()))
- )
- .field("identifier", &self.identifier)
- .finish()
+ .map(|bytes| format!("[{} bytes]", bytes.len())),
+ ).field("identifier", &self.identifier)
+ .finish()
}
}
impl FontTemplateData {
- pub fn new(identifier: Atom,
- font_data: Option<Vec<u8>>) -> Result<FontTemplateData, io::Error> {
+ pub fn new(
+ identifier: Atom,
+ font_data: Option<Vec<u8>>,
+ ) -> Result<FontTemplateData, io::Error> {
Ok(FontTemplateData {
bytes: font_data,
identifier: identifier,
diff --git a/components/gfx/tests/font_context.rs b/components/gfx/tests/font_context.rs
index dc9d1ac2df5..8608f38329e 100644
--- a/components/gfx/tests/font_context.rs
+++ b/components/gfx/tests/font_context.rs
@@ -58,26 +58,24 @@ impl TestFontSource {
}
fn add_face(family: &mut FontTemplates, name: &str, identifier: Option<&str>) {
- let mut path: PathBuf = [
- env!("CARGO_MANIFEST_DIR"),
- "tests",
- "support",
- "CSSTest",
- ].iter().collect();
+ let mut path: PathBuf = [env!("CARGO_MANIFEST_DIR"), "tests", "support", "CSSTest"]
+ .iter()
+ .collect();
path.push(format!("{}.ttf", name));
let file = File::open(path).unwrap();
let identifier = Atom::from(identifier.unwrap_or(name));
- family.add_template(
- identifier,
- Some(file.bytes().map(|b| b.unwrap()).collect())
- )
+ family.add_template(identifier, Some(file.bytes().map(|b| b.unwrap()).collect()))
}
}
impl FontSource for TestFontSource {
- fn get_font_instance(&mut self, _key: webrender_api::FontKey, _size: Au) -> webrender_api::FontInstanceKey {
+ fn get_font_instance(
+ &mut self,
+ _key: webrender_api::FontKey,
+ _size: Au,
+ ) -> webrender_api::FontInstanceKey {
webrender_api::FontInstanceKey(webrender_api::IdNamespace(0), 0)
}
@@ -92,11 +90,9 @@ impl FontSource for TestFontSource {
self.families
.get_mut(family_descriptor.name())
.and_then(|family| family.find_font_for_style(&template_descriptor, handle))
- .map(|template| {
- FontTemplateInfo {
- font_template: template,
- font_key: webrender_api::FontKey(webrender_api::IdNamespace(0), 0),
- }
+ .map(|template| FontTemplateInfo {
+ font_template: template,
+ font_key: webrender_api::FontKey(webrender_api::IdNamespace(0), 0),
})
}
}
@@ -116,12 +112,14 @@ fn style() -> FontStyleStruct {
}
fn font_family(names: Vec<&str>) -> FontFamily {
- let names: Vec<SingleFontFamily> = names.into_iter().map(|name|
- SingleFontFamily::FamilyName(FamilyName {
- name: Atom::from(name),
- syntax: FamilyNameSyntax::Quoted,
- })
- ).collect();
+ let names: Vec<SingleFontFamily> = names
+ .into_iter()
+ .map(|name| {
+ SingleFontFamily::FamilyName(FamilyName {
+ name: Atom::from(name),
+ syntax: FamilyNameSyntax::Quoted,
+ })
+ }).collect();
FontFamily(FontFamilyList::new(names.into_boxed_slice()))
}
@@ -156,19 +154,36 @@ fn test_font_group_find_by_codepoint() {
let mut context = FontContext::new(source);
let mut style = style();
- style.set_font_family(font_family(vec!("CSSTest ASCII", "CSSTest Basic")));
+ style.set_font_family(font_family(vec!["CSSTest ASCII", "CSSTest Basic"]));
let group = context.font_group(Arc::new(style));
- let font = group.borrow_mut().find_by_codepoint(&mut context, 'a').unwrap();
+ let font = group
+ .borrow_mut()
+ .find_by_codepoint(&mut context, 'a')
+ .unwrap();
assert_eq!(&*font.borrow().identifier(), "csstest-ascii");
- assert_eq!(count.get(), 1, "only the first font in the list should have been loaded");
+ assert_eq!(
+ count.get(),
+ 1,
+ "only the first font in the list should have been loaded"
+ );
- let font = group.borrow_mut().find_by_codepoint(&mut context, 'a').unwrap();
+ let font = group
+ .borrow_mut()
+ .find_by_codepoint(&mut context, 'a')
+ .unwrap();
assert_eq!(&*font.borrow().identifier(), "csstest-ascii");
- assert_eq!(count.get(), 1, "we shouldn't load the same font a second time");
+ assert_eq!(
+ count.get(),
+ 1,
+ "we shouldn't load the same font a second time"
+ );
- let font = group.borrow_mut().find_by_codepoint(&mut context, 'á').unwrap();
+ let font = group
+ .borrow_mut()
+ .find_by_codepoint(&mut context, 'á')
+ .unwrap();
assert_eq!(&*font.borrow().identifier(), "csstest-basic-regular");
assert_eq!(count.get(), 2, "both fonts should now have been loaded");
}
@@ -179,19 +194,27 @@ fn test_font_fallback() {
let mut context = FontContext::new(source);
let mut style = style();
- style.set_font_family(font_family(vec!("CSSTest ASCII")));
+ style.set_font_family(font_family(vec!["CSSTest ASCII"]));
let group = context.font_group(Arc::new(style));
- let font = group.borrow_mut().find_by_codepoint(&mut context, 'a').unwrap();
+ let font = group
+ .borrow_mut()
+ .find_by_codepoint(&mut context, 'a')
+ .unwrap();
assert_eq!(
- &*font.borrow().identifier(), "csstest-ascii",
+ &*font.borrow().identifier(),
+ "csstest-ascii",
"a family in the group should be used if there is a matching glyph"
);
- let font = group.borrow_mut().find_by_codepoint(&mut context, 'á').unwrap();
+ let font = group
+ .borrow_mut()
+ .find_by_codepoint(&mut context, 'á')
+ .unwrap();
assert_eq!(
- &*font.borrow().identifier(), "fallback",
+ &*font.borrow().identifier(),
+ "fallback",
"a fallback font should be used if there is no matching glyph in the group"
);
}
@@ -212,10 +235,8 @@ fn test_font_template_is_cached() {
pt_size: Au(10),
};
- let family_descriptor = FontFamilyDescriptor::new(
- FontFamilyName::from("CSSTest Basic"),
- FontSearchScope::Any,
- );
+ let family_descriptor =
+ FontFamilyDescriptor::new(FontFamilyName::from("CSSTest Basic"), FontSearchScope::Any);
let font1 = context.font(&font_descriptor, &family_descriptor).unwrap();
@@ -228,5 +249,9 @@ fn test_font_template_is_cached() {
"the same font should not have been returned"
);
- assert_eq!(count.get(), 1, "we should only have fetched the template data from the cache thread once");
+ assert_eq!(
+ count.get(),
+ 1,
+ "we should only have fetched the template data from the cache thread once"
+ );
}
diff --git a/components/gfx/tests/font_template.rs b/components/gfx/tests/font_template.rs
index e5857ce4ef7..a6caea2f375 100644
--- a/components/gfx/tests/font_template.rs
+++ b/components/gfx/tests/font_template.rs
@@ -2,9 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#[cfg(not(target_os = "macos"))] extern crate gfx;
-#[cfg(not(target_os = "macos"))] extern crate servo_atoms;
-#[cfg(not(target_os = "macos"))] extern crate style;
+#[cfg(not(target_os = "macos"))]
+extern crate gfx;
+#[cfg(not(target_os = "macos"))]
+extern crate servo_atoms;
+#[cfg(not(target_os = "macos"))]
+extern crate style;
// Test doesn't yet run on Mac, see https://github.com/servo/servo/pull/19928 for explanation.
#[cfg(not(target_os = "macos"))]
@@ -28,14 +31,16 @@ fn test_font_template_descriptor() {
"support",
"dejavu-fonts-ttf-2.37",
"ttf",
- ].iter().collect();
+ ]
+ .iter()
+ .collect();
path.push(format!("{}.ttf", filename));
let file = File::open(path).unwrap();
let mut template = FontTemplate::new(
Atom::from(filename),
- Some(file.bytes().map(|b| b.unwrap()).collect())
+ Some(file.bytes().map(|b| b.unwrap()).collect()),
).unwrap();
let context = FontContextHandle::new();
@@ -43,27 +48,39 @@ fn test_font_template_descriptor() {
template.descriptor(&context).unwrap()
}
- assert_eq!(descriptor("DejaVuSans"), FontTemplateDescriptor {
- weight: FontWeight::normal(),
- stretch: FontStretch::hundred(),
- style: FontStyle::Normal,
- });
+ assert_eq!(
+ descriptor("DejaVuSans"),
+ FontTemplateDescriptor {
+ weight: FontWeight::normal(),
+ stretch: FontStretch::hundred(),
+ style: FontStyle::Normal,
+ }
+ );
- assert_eq!(descriptor("DejaVuSans-Bold"), FontTemplateDescriptor {
- weight: FontWeight::bold(),
- stretch: FontStretch::hundred(),
- style: FontStyle::Normal,
- });
+ assert_eq!(
+ descriptor("DejaVuSans-Bold"),
+ FontTemplateDescriptor {
+ weight: FontWeight::bold(),
+ stretch: FontStretch::hundred(),
+ style: FontStyle::Normal,
+ }
+ );
- assert_eq!(descriptor("DejaVuSans-Oblique"), FontTemplateDescriptor {
- weight: FontWeight::normal(),
- stretch: FontStretch::hundred(),
- style: FontStyle::Italic,
- });
+ assert_eq!(
+ descriptor("DejaVuSans-Oblique"),
+ FontTemplateDescriptor {
+ weight: FontWeight::normal(),
+ stretch: FontStretch::hundred(),
+ style: FontStyle::Italic,
+ }
+ );
- assert_eq!(descriptor("DejaVuSansCondensed-BoldOblique"), FontTemplateDescriptor {
- weight: FontWeight::bold(),
- stretch: FontStretch(NonNegative(Percentage(0.875))),
- style: FontStyle::Italic,
- });
+ assert_eq!(
+ descriptor("DejaVuSansCondensed-BoldOblique"),
+ FontTemplateDescriptor {
+ weight: FontWeight::bold(),
+ stretch: FontStretch(NonNegative(Percentage(0.875))),
+ style: FontStyle::Italic,
+ }
+ );
}
diff --git a/components/gfx/tests/text_util.rs b/components/gfx/tests/text_util.rs
index 7729a6f78a7..0b8132e9c88 100644
--- a/components/gfx/tests/text_util.rs
+++ b/components/gfx/tests/text_util.rs
@@ -29,26 +29,13 @@ fn test_transform_compress_none() {
#[test]
fn test_transform_discard_newline() {
let test_strs = [
- (" foo bar",
- " foo bar"),
-
- ("foo bar ",
- "foo bar "),
-
- ("foo\n bar",
- "foo bar"),
-
- ("foo \nbar",
- "foo bar"),
-
- (" foo bar \nbaz",
- " foo bar baz"),
-
- ("foo bar baz",
- "foo bar baz"),
-
- ("foobarbaz\n\n",
- "foobarbaz"),
+ (" foo bar", " foo bar"),
+ ("foo bar ", "foo bar "),
+ ("foo\n bar", "foo bar"),
+ ("foo \nbar", "foo bar"),
+ (" foo bar \nbaz", " foo bar baz"),
+ ("foo bar baz", "foo bar baz"),
+ ("foobarbaz\n\n", "foobarbaz"),
];
let mode = CompressionMode::DiscardNewline;
@@ -62,26 +49,13 @@ fn test_transform_discard_newline() {
#[test]
fn test_transform_compress_whitespace() {
let test_strs = [
- (" foo bar",
- "foo bar"),
-
- ("foo bar ",
- "foo bar "),
-
- ("foo\n bar",
- "foo\n bar"),
-
- ("foo \nbar",
- "foo \nbar"),
-
- (" foo bar \nbaz",
- "foo bar \nbaz"),
-
- ("foo bar baz",
- "foo bar baz"),
-
- ("foobarbaz\n\n",
- "foobarbaz\n\n"),
+ (" foo bar", "foo bar"),
+ ("foo bar ", "foo bar "),
+ ("foo\n bar", "foo\n bar"),
+ ("foo \nbar", "foo \nbar"),
+ (" foo bar \nbaz", "foo bar \nbaz"),
+ ("foo bar baz", "foo bar baz"),
+ ("foobarbaz\n\n", "foobarbaz\n\n"),
];
let mode = CompressionMode::CompressWhitespace;
@@ -95,26 +69,13 @@ fn test_transform_compress_whitespace() {
#[test]
fn test_transform_compress_whitespace_newline() {
let test_strs = vec![
- (" foo bar",
- "foo bar"),
-
- ("foo bar ",
- "foo bar "),
-
- ("foo\n bar",
- "foo bar"),
-
- ("foo \nbar",
- "foo bar"),
-
- (" foo bar \nbaz",
- "foo bar baz"),
-
- ("foo bar baz",
- "foo bar baz"),
-
- ("foobarbaz\n\n",
- "foobarbaz "),
+ (" foo bar", "foo bar"),
+ ("foo bar ", "foo bar "),
+ ("foo\n bar", "foo bar"),
+ ("foo \nbar", "foo bar"),
+ (" foo bar \nbaz", "foo bar baz"),
+ ("foo bar baz", "foo bar baz"),
+ ("foobarbaz\n\n", "foobarbaz "),
];
let mode = CompressionMode::CompressWhitespaceNewline;
@@ -128,29 +89,14 @@ fn test_transform_compress_whitespace_newline() {
#[test]
fn test_transform_compress_whitespace_newline_no_incoming() {
let test_strs = [
- (" foo bar",
- " foo bar"),
-
- ("\nfoo bar",
- " foo bar"),
-
- ("foo bar ",
- "foo bar "),
-
- ("foo\n bar",
- "foo bar"),
-
- ("foo \nbar",
- "foo bar"),
-
- (" foo bar \nbaz",
- " foo bar baz"),
-
- ("foo bar baz",
- "foo bar baz"),
-
- ("foobarbaz\n\n",
- "foobarbaz "),
+ (" foo bar", " foo bar"),
+ ("\nfoo bar", " foo bar"),
+ ("foo bar ", "foo bar "),
+ ("foo\n bar", "foo bar"),
+ ("foo \nbar", "foo bar"),
+ (" foo bar \nbaz", " foo bar baz"),
+ ("foo bar baz", "foo bar baz"),
+ ("foobarbaz\n\n", "foobarbaz "),
];
let mode = CompressionMode::CompressWhitespaceNewline;
diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs
index 78f02881058..8e4c56e309b 100644
--- a/components/gfx/text/glyph.rs
+++ b/components/gfx/text/glyph.rs
@@ -4,7 +4,10 @@
use app_units::Au;
use euclid::Point2D;
-#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))]
+#[cfg(all(
+ feature = "unstable",
+ any(target_feature = "sse2", target_feature = "neon")
+))]
use packed_simd::u32x4;
use range::{self, EachIndex, Range, RangeIndex};
use std::{fmt, mem, u16};
@@ -28,9 +31,7 @@ pub struct GlyphEntry {
impl GlyphEntry {
fn new(value: u32) -> GlyphEntry {
- GlyphEntry {
- value: value,
- }
+ GlyphEntry { value: value }
}
fn initial() -> GlyphEntry {
@@ -54,11 +55,11 @@ impl GlyphEntry {
fn complex(starts_cluster: bool, starts_ligature: bool, glyph_count: usize) -> GlyphEntry {
assert!(glyph_count <= u16::MAX as usize);
- debug!("creating complex glyph entry: starts_cluster={}, starts_ligature={}, \
- glyph_count={}",
- starts_cluster,
- starts_ligature,
- glyph_count);
+ debug!(
+ "creating complex glyph entry: starts_cluster={}, starts_ligature={}, \
+ glyph_count={}",
+ starts_cluster, starts_ligature, glyph_count
+ );
GlyphEntry::new(glyph_count as u32)
}
@@ -73,16 +74,16 @@ pub type GlyphId = u32;
// TODO: make this more type-safe.
-const FLAG_CHAR_IS_SPACE: u32 = 0x40000000;
+const FLAG_CHAR_IS_SPACE: u32 = 0x40000000;
#[cfg(feature = "unstable")]
#[cfg(any(target_feature = "sse2", target_feature = "neon"))]
const FLAG_CHAR_IS_SPACE_SHIFT: u32 = 30;
-const FLAG_IS_SIMPLE_GLYPH: u32 = 0x80000000;
+const FLAG_IS_SIMPLE_GLYPH: u32 = 0x80000000;
// glyph advance; in Au's.
-const GLYPH_ADVANCE_MASK: u32 = 0x3FFF0000;
-const GLYPH_ADVANCE_SHIFT: u32 = 16;
-const GLYPH_ID_MASK: u32 = 0x0000FFFF;
+const GLYPH_ADVANCE_MASK: u32 = 0x3FFF0000;
+const GLYPH_ADVANCE_SHIFT: u32 = 16;
+const GLYPH_ID_MASK: u32 = 0x0000FFFF;
// Non-simple glyphs (more than one glyph per char; missing glyph,
// newline, tab, large advance, or nonzero x/y offsets) may have one
@@ -91,7 +92,7 @@ const GLYPH_ID_MASK: u32 = 0x0000FFFF;
// unicode char.
// The number of detailed glyphs for this char.
-const GLYPH_COUNT_MASK: u32 = 0x0000FFFF;
+const GLYPH_COUNT_MASK: u32 = 0x0000FFFF;
fn is_simple_glyph_id(id: GlyphId) -> bool {
((id as u32) & GLYPH_ID_MASK) == id
@@ -205,8 +206,8 @@ struct DetailedGlyphStore {
impl<'a> DetailedGlyphStore {
fn new() -> DetailedGlyphStore {
DetailedGlyphStore {
- detail_buffer: vec!(), // TODO: default size?
- detail_lookup: vec!(),
+ detail_buffer: vec![], // TODO: default size?
+ detail_lookup: vec![],
lookup_is_sorted: false,
}
}
@@ -217,7 +218,10 @@ impl<'a> DetailedGlyphStore {
detail_offset: self.detail_buffer.len(),
};
- debug!("Adding entry[off={:?}] for detailed glyphs: {:?}", entry_offset, glyphs);
+ debug!(
+ "Adding entry[off={:?}] for detailed glyphs: {:?}",
+ entry_offset, glyphs
+ );
/* TODO: don't actually assert this until asserts are compiled
in/out based on severity, debug/release, etc. This assertion
@@ -235,9 +239,15 @@ impl<'a> DetailedGlyphStore {
self.lookup_is_sorted = false;
}
- fn detailed_glyphs_for_entry(&'a self, entry_offset: ByteIndex, count: u16)
- -> &'a [DetailedGlyph] {
- debug!("Requesting detailed glyphs[n={}] for entry[off={:?}]", count, entry_offset);
+ fn detailed_glyphs_for_entry(
+ &'a self,
+ entry_offset: ByteIndex,
+ count: u16,
+ ) -> &'a [DetailedGlyph] {
+ debug!(
+ "Requesting detailed glyphs[n={}] for entry[off={:?}]",
+ count, entry_offset
+ );
// FIXME: Is this right? --pcwalton
// TODO: should fix this somewhere else
@@ -253,18 +263,21 @@ impl<'a> DetailedGlyphStore {
detail_offset: 0, // unused
};
- let i = self.detail_lookup.binary_search(&key)
+ let i = self
+ .detail_lookup
+ .binary_search(&key)
.expect("Invalid index not found in detailed glyph lookup table!");
let main_detail_offset = self.detail_lookup[i].detail_offset;
assert!(main_detail_offset + (count as usize) <= self.detail_buffer.len());
// return a slice into the buffer
- &self.detail_buffer[main_detail_offset .. main_detail_offset + count as usize]
+ &self.detail_buffer[main_detail_offset..main_detail_offset + count as usize]
}
- fn detailed_glyph_with_index(&'a self,
- entry_offset: ByteIndex,
- detail_offset: u16)
- -> &'a DetailedGlyph {
+ fn detailed_glyph_with_index(
+ &'a self,
+ entry_offset: ByteIndex,
+ detail_offset: u16,
+ ) -> &'a DetailedGlyph {
assert!((detail_offset as usize) <= self.detail_buffer.len());
assert!(self.lookup_is_sorted);
@@ -273,7 +286,9 @@ impl<'a> DetailedGlyphStore {
detail_offset: 0, // unused
};
- let i = self.detail_lookup.binary_search(&key)
+ let i = self
+ .detail_lookup
+ .binary_search(&key)
.expect("Invalid index not found in detailed glyph lookup table!");
let main_detail_offset = self.detail_lookup[i].detail_offset;
assert!(main_detail_offset + (detail_offset as usize) < self.detail_buffer.len());
@@ -290,7 +305,7 @@ impl<'a> DetailedGlyphStore {
// immutable locations thus don't play well with freezing.
// Thar be dragons here. You have been warned. (Tips accepted.)
- let mut unsorted_records: Vec<DetailedGlyphRecord> = vec!();
+ let mut unsorted_records: Vec<DetailedGlyphRecord> = vec![];
mem::swap(&mut self.detail_lookup, &mut unsorted_records);
let mut mut_records: Vec<DetailedGlyphRecord> = unsorted_records;
mut_records.sort_by(|a, b| {
@@ -320,12 +335,13 @@ pub struct GlyphData {
impl GlyphData {
/// Creates a new entry for one glyph.
- pub fn new(id: GlyphId,
- advance: Au,
- offset: Option<Point2D<Au>>,
- cluster_start: bool,
- ligature_start: bool)
- -> GlyphData {
+ pub fn new(
+ id: GlyphId,
+ advance: Au,
+ offset: Option<Point2D<Au>>,
+ cluster_start: bool,
+ ligature_start: bool,
+ ) -> GlyphData {
GlyphData {
id: id,
advance: advance,
@@ -351,8 +367,11 @@ impl<'a> GlyphInfo<'a> {
match self {
GlyphInfo::Simple(store, entry_i) => store.entry_buffer[entry_i.to_usize()].id(),
GlyphInfo::Detail(store, entry_i, detail_j) => {
- store.detail_store.detailed_glyph_with_index(entry_i, detail_j).id
- }
+ store
+ .detail_store
+ .detailed_glyph_with_index(entry_i, detail_j)
+ .id
+ },
}
}
@@ -362,8 +381,11 @@ impl<'a> GlyphInfo<'a> {
match self {
GlyphInfo::Simple(store, entry_i) => store.entry_buffer[entry_i.to_usize()].advance(),
GlyphInfo::Detail(store, entry_i, detail_j) => {
- store.detail_store.detailed_glyph_with_index(entry_i, detail_j).advance
- }
+ store
+ .detail_store
+ .detailed_glyph_with_index(entry_i, detail_j)
+ .advance
+ },
}
}
@@ -371,9 +393,12 @@ impl<'a> GlyphInfo<'a> {
pub fn offset(self) -> Option<Point2D<Au>> {
match self {
GlyphInfo::Simple(_, _) => None,
- GlyphInfo::Detail(store, entry_i, detail_j) => {
- Some(store.detail_store.detailed_glyph_with_index(entry_i, detail_j).offset)
- }
+ GlyphInfo::Detail(store, entry_i, detail_j) => Some(
+ store
+ .detail_store
+ .detailed_glyph_with_index(entry_i, detail_j)
+ .offset,
+ ),
}
}
@@ -477,14 +502,11 @@ impl<'a> GlyphStore {
}
/// Adds a single glyph.
- pub fn add_glyph_for_byte_index(&mut self,
- i: ByteIndex,
- character: char,
- data: &GlyphData) {
+ pub fn add_glyph_for_byte_index(&mut self, i: ByteIndex, character: char, data: &GlyphData) {
let glyph_is_compressible = is_simple_glyph_id(data.id) &&
is_simple_advance(data.advance) &&
- data.offset == Point2D::zero() &&
- data.cluster_start; // others are stored in detail buffer
+ data.offset == Point2D::zero() &&
+ data.cluster_start; // others are stored in detail buffer
debug_assert!(data.ligature_start); // can't compress ligature continuation glyphs.
debug_assert!(i < self.len());
@@ -512,20 +534,29 @@ impl<'a> GlyphStore {
let glyph_count = data_for_glyphs.len();
let first_glyph_data = data_for_glyphs[0];
- let glyphs_vec: Vec<DetailedGlyph> = (0..glyph_count).map(|i| {
- DetailedGlyph::new(data_for_glyphs[i].id,
- data_for_glyphs[i].advance,
- data_for_glyphs[i].offset)
- }).collect();
+ let glyphs_vec: Vec<DetailedGlyph> = (0..glyph_count)
+ .map(|i| {
+ DetailedGlyph::new(
+ data_for_glyphs[i].id,
+ data_for_glyphs[i].advance,
+ data_for_glyphs[i].offset,
+ )
+ }).collect();
self.has_detailed_glyphs = true;
- self.detail_store.add_detailed_glyphs_for_entry(i, &glyphs_vec);
+ self.detail_store
+ .add_detailed_glyphs_for_entry(i, &glyphs_vec);
- let entry = GlyphEntry::complex(first_glyph_data.cluster_start,
- first_glyph_data.ligature_start,
- glyph_count);
+ let entry = GlyphEntry::complex(
+ first_glyph_data.cluster_start,
+ first_glyph_data.ligature_start,
+ glyph_count,
+ );
- debug!("Adding multiple glyphs[idx={:?}, count={}]: {:?}", i, glyph_count, entry);
+ debug!(
+ "Adding multiple glyphs[idx={:?}, count={}]: {:?}",
+ i, glyph_count, entry
+ );
self.entry_buffer[i.to_usize()] = entry;
}
@@ -540,9 +571,13 @@ impl<'a> GlyphStore {
}
GlyphIterator {
- store: self,
- byte_index: if self.is_rtl { range.end() } else { range.begin() - ByteIndex(1) },
- byte_range: *range,
+ store: self,
+ byte_index: if self.is_rtl {
+ range.end()
+ } else {
+ range.begin() - ByteIndex(1)
+ },
+ byte_range: *range,
glyph_range: None,
}
}
@@ -551,7 +586,12 @@ impl<'a> GlyphStore {
// and advance of the glyph in the range at the given advance, if reached. Otherwise, returns the
// the number of glyphs and the advance for the given range.
#[inline]
- pub fn range_index_of_advance(&self, range: &Range<ByteIndex>, advance: Au, extra_word_spacing: Au) -> (usize, Au) {
+ pub fn range_index_of_advance(
+ &self,
+ range: &Range<ByteIndex>,
+ advance: Au,
+ extra_word_spacing: Au,
+ ) -> (usize, Au) {
let mut index = 0;
let mut current_advance = Au(0);
for glyph in self.iter_glyphs_for_byte_range(range) {
@@ -580,7 +620,11 @@ impl<'a> GlyphStore {
}
#[inline]
- pub fn advance_for_byte_range_slow_path(&self, range: &Range<ByteIndex>, extra_word_spacing: Au) -> Au {
+ pub fn advance_for_byte_range_slow_path(
+ &self,
+ range: &Range<ByteIndex>,
+ extra_word_spacing: Au,
+ ) -> Au {
self.iter_glyphs_for_byte_range(range)
.fold(Au(0), |advance, glyph| {
if glyph.char_is_space() {
@@ -594,7 +638,11 @@ impl<'a> GlyphStore {
#[inline]
#[cfg(feature = "unstable")]
#[cfg(any(target_feature = "sse2", target_feature = "neon"))]
- fn advance_for_byte_range_simple_glyphs(&self, range: &Range<ByteIndex>, extra_word_spacing: Au) -> Au {
+ fn advance_for_byte_range_simple_glyphs(
+ &self,
+ range: &Range<ByteIndex>,
+ extra_word_spacing: Au,
+ ) -> Au {
let advance_mask = u32x4::splat(GLYPH_ADVANCE_MASK);
let space_flag_mask = u32x4::splat(FLAG_CHAR_IS_SPACE);
let mut simd_advance = u32x4::splat(0);
@@ -614,16 +662,14 @@ impl<'a> GlyphStore {
simd_spaces = simd_spaces + spaces;
}
- let advance =
- (simd_advance.extract(0) +
- simd_advance.extract(1) +
- simd_advance.extract(2) +
- simd_advance.extract(3)) as i32;
- let spaces =
- (simd_spaces.extract(0) +
- simd_spaces.extract(1) +
- simd_spaces.extract(2) +
- simd_spaces.extract(3)) as i32;
+ let advance = (simd_advance.extract(0) +
+ simd_advance.extract(1) +
+ simd_advance.extract(2) +
+ simd_advance.extract(3)) as i32;
+ let spaces = (simd_spaces.extract(0) +
+ simd_spaces.extract(1) +
+ simd_spaces.extract(2) +
+ simd_spaces.extract(3)) as i32;
let mut leftover_advance = Au(0);
let mut leftover_spaces = 0;
for i in leftover_entries..range.end().to_usize() {
@@ -637,8 +683,15 @@ impl<'a> GlyphStore {
/// When SIMD isn't available, fallback to the slow path.
#[inline]
- #[cfg(not(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon"))))]
- fn advance_for_byte_range_simple_glyphs(&self, range: &Range<ByteIndex>, extra_word_spacing: Au) -> Au {
+ #[cfg(not(all(
+ feature = "unstable",
+ any(target_feature = "sse2", target_feature = "neon")
+ )))]
+ fn advance_for_byte_range_simple_glyphs(
+ &self,
+ range: &Range<ByteIndex>,
+ extra_word_spacing: Au,
+ ) -> Au {
self.advance_for_byte_range_slow_path(range, extra_word_spacing)
}
@@ -676,23 +729,27 @@ impl fmt::Debug for GlyphStore {
let mut detailed_buffer = self.detail_store.detail_buffer.iter();
for entry in self.entry_buffer.iter() {
if entry.is_simple() {
- write!(formatter,
- " simple id={:?} advance={:?}\n",
- entry.id(),
- entry.advance())?;
- continue
+ write!(
+ formatter,
+ " simple id={:?} advance={:?}\n",
+ entry.id(),
+ entry.advance()
+ )?;
+ continue;
}
if entry.is_initial() {
- continue
+ continue;
}
write!(formatter, " complex...")?;
if detailed_buffer.next().is_none() {
- continue
+ continue;
}
- write!(formatter,
- " detailed id={:?} advance={:?}\n",
- entry.id(),
- entry.advance())?;
+ write!(
+ formatter,
+ " detailed id={:?} advance={:?}\n",
+ entry.id(),
+ entry.advance()
+ )?;
}
Ok(())
}
@@ -712,27 +769,37 @@ impl<'a> GlyphIterator<'a> {
fn next_glyph_range(&mut self) -> Option<GlyphInfo<'a>> {
match self.glyph_range.as_mut().unwrap().next() {
Some(j) => {
- Some(GlyphInfo::Detail(self.store, self.byte_index, j.get() as u16 /* ??? */))
- }
+ Some(GlyphInfo::Detail(
+ self.store,
+ self.byte_index,
+ j.get() as u16, /* ??? */
+ ))
+ },
None => {
// No more glyphs for current character. Try to get another.
self.glyph_range = None;
self.next()
- }
+ },
}
}
// Slow path when there is a complex glyph.
#[inline(never)]
fn next_complex_glyph(&mut self, entry: &GlyphEntry, i: ByteIndex) -> Option<GlyphInfo<'a>> {
- let glyphs = self.store.detail_store.detailed_glyphs_for_entry(i, entry.glyph_count());
- self.glyph_range = Some(range::each_index(ByteIndex(0), ByteIndex(glyphs.len() as isize)));
+ let glyphs = self
+ .store
+ .detail_store
+ .detailed_glyphs_for_entry(i, entry.glyph_count());
+ self.glyph_range = Some(range::each_index(
+ ByteIndex(0),
+ ByteIndex(glyphs.len() as isize),
+ ));
self.next()
}
}
impl<'a> Iterator for GlyphIterator<'a> {
- type Item = GlyphInfo<'a>;
+ type Item = GlyphInfo<'a>;
// I tried to start with something simpler and apply FlatMap, but the
// inability to store free variables in the FlatMap struct was problematic.
@@ -744,7 +811,7 @@ impl<'a> Iterator for GlyphIterator<'a> {
fn next(&mut self) -> Option<GlyphInfo<'a>> {
// Would use 'match' here but it borrows contents in a way that interferes with mutation.
if self.glyph_range.is_some() {
- return self.next_glyph_range()
+ return self.next_glyph_range();
}
// No glyph range. Look at next byte.
@@ -755,7 +822,7 @@ impl<'a> Iterator for GlyphIterator<'a> {
};
let i = self.byte_index;
if !self.byte_range.contains(i) {
- return None
+ return None;
}
debug_assert!(i < self.store.len());
let entry = self.store.entry_buffer[i.to_usize()];
diff --git a/components/gfx/text/mod.rs b/components/gfx/text/mod.rs
index 5aae0876428..24c434e2e69 100644
--- a/components/gfx/text/mod.rs
+++ b/components/gfx/text/mod.rs
@@ -9,4 +9,3 @@ pub mod glyph;
pub mod shaping;
pub mod text_run;
pub mod util;
-
diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs
index a07003b6ec3..eb6b7b8cd4a 100644
--- a/components/gfx/text/shaping/harfbuzz.rs
+++ b/components/gfx/text/shaping/harfbuzz.rs
@@ -147,10 +147,11 @@ impl Drop for Shaper {
impl Shaper {
pub fn new(font: *const Font) -> Shaper {
unsafe {
- let hb_face: *mut hb_face_t =
- hb_face_create_for_tables(Some(font_table_func),
- font as *const c_void as *mut c_void,
- None);
+ let hb_face: *mut hb_face_t = hb_face_create_for_tables(
+ Some(font_table_func),
+ font as *const c_void as *mut c_void,
+ None,
+ );
let hb_font: *mut hb_font_t = hb_font_create(hb_face);
// Set points-per-em. if zero, performs no hinting in that direction.
@@ -158,12 +159,19 @@ impl Shaper {
hb_font_set_ppem(hb_font, pt_size as c_uint, pt_size as c_uint);
// Set scaling. Note that this takes 16.16 fixed point.
- hb_font_set_scale(hb_font,
- Shaper::float_to_fixed(pt_size) as c_int,
- Shaper::float_to_fixed(pt_size) as c_int);
+ hb_font_set_scale(
+ hb_font,
+ Shaper::float_to_fixed(pt_size) as c_int,
+ Shaper::float_to_fixed(pt_size) as c_int,
+ );
// configure static function callbacks.
- hb_font_set_funcs(hb_font, HB_FONT_FUNCS.0, font as *mut Font as *mut c_void, None);
+ hb_font_set_funcs(
+ hb_font,
+ HB_FONT_FUNCS.0,
+ font as *mut Font as *mut c_void,
+ None,
+ );
Shaper {
hb_face: hb_face,
@@ -188,22 +196,30 @@ impl ShaperMethods for Shaper {
fn shape_text(&self, text: &str, options: &ShapingOptions, glyphs: &mut GlyphStore) {
unsafe {
let hb_buffer: *mut hb_buffer_t = hb_buffer_create();
- hb_buffer_set_direction(hb_buffer, if options.flags.contains(ShapingFlags::RTL_FLAG) {
- HB_DIRECTION_RTL
- } else {
- HB_DIRECTION_LTR
- });
+ hb_buffer_set_direction(
+ hb_buffer,
+ if options.flags.contains(ShapingFlags::RTL_FLAG) {
+ HB_DIRECTION_RTL
+ } else {
+ HB_DIRECTION_LTR
+ },
+ );
hb_buffer_set_script(hb_buffer, options.script.to_hb_script());
- hb_buffer_add_utf8(hb_buffer,
- text.as_ptr() as *const c_char,
- text.len() as c_int,
- 0,
- text.len() as c_int);
+ hb_buffer_add_utf8(
+ hb_buffer,
+ text.as_ptr() as *const c_char,
+ text.len() as c_int,
+ 0,
+ text.len() as c_int,
+ );
let mut features = Vec::new();
- if options.flags.contains(ShapingFlags::IGNORE_LIGATURES_SHAPING_FLAG) {
+ if options
+ .flags
+ .contains(ShapingFlags::IGNORE_LIGATURES_SHAPING_FLAG)
+ {
features.push(hb_feature_t {
tag: LIGA,
value: 0,
@@ -211,7 +227,10 @@ impl ShaperMethods for Shaper {
end: hb_buffer_get_length(hb_buffer),
})
}
- if options.flags.contains(ShapingFlags::DISABLE_KERNING_SHAPING_FLAG) {
+ if options
+ .flags
+ .contains(ShapingFlags::DISABLE_KERNING_SHAPING_FLAG)
+ {
features.push(hb_feature_t {
tag: KERN,
value: 0,
@@ -220,7 +239,12 @@ impl ShaperMethods for Shaper {
})
}
- hb_shape(self.hb_font, hb_buffer, features.as_mut_ptr(), features.len() as u32);
+ hb_shape(
+ self.hb_font,
+ hb_buffer,
+ features.as_mut_ptr(),
+ features.len() as u32,
+ );
self.save_glyph_results(text, options, glyphs, hb_buffer);
hb_buffer_destroy(hb_buffer);
}
@@ -228,18 +252,21 @@ impl ShaperMethods for Shaper {
}
impl Shaper {
- fn save_glyph_results(&self,
- text: &str,
- options: &ShapingOptions,
- glyphs: &mut GlyphStore,
- buffer: *mut hb_buffer_t) {
+ fn save_glyph_results(
+ &self,
+ text: &str,
+ options: &ShapingOptions,
+ glyphs: &mut GlyphStore,
+ buffer: *mut hb_buffer_t,
+ ) {
let glyph_data = ShapedGlyphData::new(buffer);
let glyph_count = glyph_data.len();
let byte_max = text.len();
- debug!("Shaped text[byte count={}], got back {} glyph info records.",
- byte_max,
- glyph_count);
+ debug!(
+ "Shaped text[byte count={}], got back {} glyph info records.",
+ byte_max, glyph_count
+ );
// make map of what chars have glyphs
let mut byte_to_glyph = vec![NO_GLYPH; byte_max];
@@ -250,9 +277,10 @@ impl Shaper {
if loc < byte_max {
byte_to_glyph[loc] = i as i32;
} else {
- debug!("ERROR: tried to set out of range byte_to_glyph: idx={}, glyph idx={}",
- loc,
- i);
+ debug!(
+ "ERROR: tried to set out of range byte_to_glyph: idx={}, glyph idx={}",
+ loc, i
+ );
}
debug!("{} -> {}", i, loc);
}
@@ -296,10 +324,14 @@ impl Shaper {
}
// if there's just one glyph, then we don't need further checks.
- if glyph_span.len() == 1 { break; }
+ if glyph_span.len() == 1 {
+ break;
+ }
// if no glyphs were found yet, extend the char byte range more.
- if glyph_span.len() == 0 { continue; }
+ if glyph_span.len() == 0 {
+ continue;
+ }
// If byte_range now includes all the byte offsets found in glyph_span, then we
// have found a contiguous "cluster" and can stop extending it.
@@ -308,11 +340,11 @@ impl Shaper {
let loc = glyph_data.byte_offset_of_glyph(j) as usize;
if !(byte_range.start <= loc && loc < byte_range.end) {
all_glyphs_are_within_cluster = false;
- break
+ break;
}
}
if all_glyphs_are_within_cluster {
- break
+ break;
}
// Otherwise, the bytes we have seen so far correspond to a non-contiguous set of
@@ -348,34 +380,29 @@ impl Shaper {
const TAB_COLS: i32 = 8;
let (space_glyph_id, space_advance) = glyph_space_advance(self.font);
let advance = Au::from_f64_px(space_advance) * TAB_COLS;
- let data = GlyphData::new(space_glyph_id,
- advance,
- Default::default(),
- true,
- true);
+ let data =
+ GlyphData::new(space_glyph_id, advance, Default::default(), true, true);
glyphs.add_glyph_for_byte_index(byte_idx, character, &data);
} else {
let shape = glyph_data.entry_for_glyph(glyph_span.start, &mut y_pos);
let advance = self.advance_for_shaped_glyph(shape.advance, character, options);
- let data = GlyphData::new(shape.codepoint,
- advance,
- shape.offset,
- true,
- true);
+ let data = GlyphData::new(shape.codepoint, advance, shape.offset, true, true);
glyphs.add_glyph_for_byte_index(byte_idx, character, &data);
}
} else {
// collect all glyphs to be assigned to the first character.
- let mut datas = vec!();
+ let mut datas = vec![];
for glyph_i in glyph_span.clone() {
let shape = glyph_data.entry_for_glyph(glyph_i, &mut y_pos);
- datas.push(GlyphData::new(shape.codepoint,
- shape.advance,
- shape.offset,
- true, // treat as cluster start
- glyph_i > glyph_span.start));
- // all but first are ligature continuations
+ datas.push(GlyphData::new(
+ shape.codepoint,
+ shape.advance,
+ shape.offset,
+ true, // treat as cluster start
+ glyph_i > glyph_span.start,
+ ));
+ // all but first are ligature continuations
}
// now add the detailed glyph entry.
glyphs.add_glyphs_for_byte_index(byte_idx, &datas);
@@ -390,8 +417,12 @@ impl Shaper {
glyphs.finalize_changes();
}
- fn advance_for_shaped_glyph(&self, mut advance: Au, character: char, options: &ShapingOptions)
- -> Au {
+ fn advance_for_shaped_glyph(
+ &self,
+ mut advance: Au,
+ character: char,
+ options: &ShapingOptions,
+ ) -> Au {
if let Some(letter_spacing) = options.letter_spacing {
advance = advance + letter_spacing;
};
@@ -403,7 +434,8 @@ impl Shaper {
if character == ' ' || character == '\u{a0}' {
// https://drafts.csswg.org/css-text-3/#word-spacing-property
let (length, percent) = options.word_spacing;
- advance = (advance + length) + Au::new((advance.0 as f32 * percent.into_inner()) as i32);
+ advance =
+ (advance + length) + Au::new((advance.0 as f32 * percent.into_inner()) as i32);
}
advance
@@ -420,20 +452,29 @@ lazy_static! {
let hb_funcs = hb_font_funcs_create();
hb_font_funcs_set_nominal_glyph_func(hb_funcs, Some(glyph_func), ptr::null_mut(), None);
hb_font_funcs_set_glyph_h_advance_func(
- hb_funcs, Some(glyph_h_advance_func), ptr::null_mut(), None);
+ hb_funcs,
+ Some(glyph_h_advance_func),
+ ptr::null_mut(),
+ None,
+ );
hb_font_funcs_set_glyph_h_kerning_func(
- hb_funcs, Some(glyph_h_kerning_func), ptr::null_mut(), None);
+ hb_funcs,
+ Some(glyph_h_kerning_func),
+ ptr::null_mut(),
+ None,
+ );
FontFuncs(hb_funcs)
};
}
-extern fn glyph_func(_: *mut hb_font_t,
- font_data: *mut c_void,
- unicode: hb_codepoint_t,
- glyph: *mut hb_codepoint_t,
- _: *mut c_void)
- -> hb_bool_t {
+extern "C" fn glyph_func(
+ _: *mut hb_font_t,
+ font_data: *mut c_void,
+ unicode: hb_codepoint_t,
+ glyph: *mut hb_codepoint_t,
+ _: *mut c_void,
+) -> hb_bool_t {
let font: *const Font = font_data as *const Font;
assert!(!font.is_null());
@@ -442,17 +483,18 @@ extern fn glyph_func(_: *mut hb_font_t,
Some(g) => {
*glyph = g as hb_codepoint_t;
true as hb_bool_t
- }
- None => false as hb_bool_t
+ },
+ None => false as hb_bool_t,
}
}
}
-extern fn glyph_h_advance_func(_: *mut hb_font_t,
- font_data: *mut c_void,
- glyph: hb_codepoint_t,
- _: *mut c_void)
- -> hb_position_t {
+extern "C" fn glyph_h_advance_func(
+ _: *mut hb_font_t,
+ font_data: *mut c_void,
+ glyph: hb_codepoint_t,
+ _: *mut c_void,
+) -> hb_position_t {
let font: *mut Font = font_data as *mut Font;
assert!(!font.is_null());
@@ -468,19 +510,20 @@ fn glyph_space_advance(font: *const Font) -> (hb_codepoint_t, f64) {
match unsafe { (*font).glyph_index(space_unicode) } {
Some(g) => {
space_glyph = g as hb_codepoint_t;
- }
- None => panic!("No space info")
+ },
+ None => panic!("No space info"),
}
let space_advance = unsafe { (*font).glyph_h_advance(space_glyph as GlyphId) };
(space_glyph, space_advance)
}
-extern fn glyph_h_kerning_func(_: *mut hb_font_t,
- font_data: *mut c_void,
- first_glyph: hb_codepoint_t,
- second_glyph: hb_codepoint_t,
- _: *mut c_void)
- -> hb_position_t {
+extern "C" fn glyph_h_kerning_func(
+ _: *mut hb_font_t,
+ font_data: *mut c_void,
+ first_glyph: hb_codepoint_t,
+ second_glyph: hb_codepoint_t,
+ _: *mut c_void,
+) -> hb_position_t {
let font: *mut Font = font_data as *mut Font;
assert!(!font.is_null());
@@ -491,10 +534,11 @@ extern fn glyph_h_kerning_func(_: *mut hb_font_t,
}
// Callback to get a font table out of a font.
-extern fn font_table_func(_: *mut hb_face_t,
- tag: hb_tag_t,
- user_data: *mut c_void)
- -> *mut hb_blob_t {
+extern "C" fn font_table_func(
+ _: *mut hb_face_t,
+ tag: hb_tag_t,
+ user_data: *mut c_void,
+) -> *mut hb_blob_t {
unsafe {
// NB: These asserts have security implications.
let font = user_data as *const Font;
@@ -511,20 +555,22 @@ extern fn font_table_func(_: *mut hb_face_t,
let buf = (*font_table_ptr).buffer();
// HarfBuzz calls `destroy_blob_func` when the buffer is no longer needed.
- let blob = hb_blob_create(buf.as_ptr() as *const c_char,
- buf.len() as c_uint,
- HB_MEMORY_MODE_READONLY,
- font_table_ptr as *mut c_void,
- Some(destroy_blob_func));
+ let blob = hb_blob_create(
+ buf.as_ptr() as *const c_char,
+ buf.len() as c_uint,
+ HB_MEMORY_MODE_READONLY,
+ font_table_ptr as *mut c_void,
+ Some(destroy_blob_func),
+ );
assert!(!blob.is_null());
blob
- }
+ },
}
}
}
-extern fn destroy_blob_func(font_table_ptr: *mut c_void) {
+extern "C" fn destroy_blob_func(font_table_ptr: *mut c_void) {
unsafe {
drop(Box::from_raw(font_table_ptr as *mut FontTable));
}
diff --git a/components/gfx/text/shaping/mod.rs b/components/gfx/text/shaping/mod.rs
index 79e5452db06..97d96980596 100644
--- a/components/gfx/text/shaping/mod.rs
+++ b/components/gfx/text/shaping/mod.rs
@@ -17,4 +17,3 @@ pub mod harfbuzz;
pub trait ShaperMethods {
fn shape_text(&self, text: &str, options: &ShapingOptions, glyphs: &mut GlyphStore);
}
-
diff --git a/components/gfx/text/text_run.rs b/components/gfx/text/text_run.rs
index 62126ab838a..39b96a934e6 100644
--- a/components/gfx/text/text_run.rs
+++ b/components/gfx/text/text_run.rs
@@ -155,7 +155,7 @@ impl<'a> Iterator for CharacterSliceIterator<'a> {
let byte_start = self.range.begin();
let byte_len = match self.text[byte_start.to_usize()..].chars().next() {
Some(ch) => ByteIndex(ch.len_utf8() as isize),
- None => unreachable!() // XXX refactor?
+ None => unreachable!(), // XXX refactor?
};
self.range.adjust_by(byte_len, -byte_len);
@@ -178,24 +178,36 @@ impl<'a> Iterator for CharacterSliceIterator<'a> {
impl<'a> TextRun {
/// Constructs a new text run. Also returns if there is a line break at the beginning
- pub fn new(font: &mut Font, text: String, options: &ShapingOptions,
- bidi_level: bidi::Level, breaker: &mut Option<LineBreakLeafIter>) -> (TextRun, bool) {
+ pub fn new(
+ font: &mut Font,
+ text: String,
+ options: &ShapingOptions,
+ bidi_level: bidi::Level,
+ breaker: &mut Option<LineBreakLeafIter>,
+ ) -> (TextRun, bool) {
let (glyphs, break_at_zero) = TextRun::break_and_shape(font, &text, options, breaker);
- (TextRun {
- text: Arc::new(text),
- font_metrics: font.metrics.clone(),
- font_template: font.handle.template(),
- font_key: font.font_key,
- actual_pt_size: font.actual_pt_size,
- glyphs: Arc::new(glyphs),
- bidi_level: bidi_level,
- extra_word_spacing: Au(0),
- }, break_at_zero)
+ (
+ TextRun {
+ text: Arc::new(text),
+ font_metrics: font.metrics.clone(),
+ font_template: font.handle.template(),
+ font_key: font.font_key,
+ actual_pt_size: font.actual_pt_size,
+ glyphs: Arc::new(glyphs),
+ bidi_level: bidi_level,
+ extra_word_spacing: Au(0),
+ },
+ break_at_zero,
+ )
}
- pub fn break_and_shape(font: &mut Font, text: &str, options: &ShapingOptions,
- breaker: &mut Option<LineBreakLeafIter>) -> (Vec<GlyphRun>, bool) {
- let mut glyphs = vec!();
+ pub fn break_and_shape(
+ font: &mut Font,
+ text: &str,
+ options: &ShapingOptions,
+ breaker: &mut Option<LineBreakLeafIter>,
+ ) -> (Vec<GlyphRun>, bool) {
+ let mut glyphs = vec![];
let mut slice = 0..0;
let mut finished = false;
@@ -203,7 +215,7 @@ impl<'a> TextRun {
if breaker.is_none() {
if text.len() == 0 {
- return (glyphs, true)
+ return (glyphs, true);
}
*breaker = Some(LineBreakLeafIter::new(&text, 0));
}
@@ -225,29 +237,39 @@ impl<'a> TextRun {
// Split off any trailing whitespace into a separate glyph run.
let mut whitespace = slice.end..slice.end;
- if let Some((i, _)) = word.char_indices().rev()
- .take_while(|&(_, c)| char_is_whitespace(c)).last() {
- whitespace.start = slice.start + i;
- slice.end = whitespace.start;
- } else if idx != text.len() && options.flags.contains(ShapingFlags::KEEP_ALL_FLAG) {
- // If there's no whitespace and word-break is set to
- // keep-all, try increasing the slice.
- continue;
- }
+ if let Some((i, _)) = word
+ .char_indices()
+ .rev()
+ .take_while(|&(_, c)| char_is_whitespace(c))
+ .last()
+ {
+ whitespace.start = slice.start + i;
+ slice.end = whitespace.start;
+ } else if idx != text.len() && options.flags.contains(ShapingFlags::KEEP_ALL_FLAG) {
+ // If there's no whitespace and word-break is set to
+ // keep-all, try increasing the slice.
+ continue;
+ }
if slice.len() > 0 {
glyphs.push(GlyphRun {
glyph_store: font.shape_text(&text[slice.clone()], options),
- range: Range::new(ByteIndex(slice.start as isize),
- ByteIndex(slice.len() as isize)),
+ range: Range::new(
+ ByteIndex(slice.start as isize),
+ ByteIndex(slice.len() as isize),
+ ),
});
}
if whitespace.len() > 0 {
let mut options = options.clone();
- options.flags.insert(ShapingFlags::IS_WHITESPACE_SHAPING_FLAG);
+ options
+ .flags
+ .insert(ShapingFlags::IS_WHITESPACE_SHAPING_FLAG);
glyphs.push(GlyphRun {
glyph_store: font.shape_text(&text[whitespace.clone()], &options),
- range: Range::new(ByteIndex(whitespace.start as isize),
- ByteIndex(whitespace.len() as isize)),
+ range: Range::new(
+ ByteIndex(whitespace.start as isize),
+ ByteIndex(whitespace.len() as isize),
+ ),
});
}
slice.start = whitespace.end;
@@ -265,36 +287,46 @@ impl<'a> TextRun {
pub fn advance_for_range(&self, range: &Range<ByteIndex>) -> Au {
if range.is_empty() {
- return Au(0)
+ return Au(0);
}
// TODO(Issue #199): alter advance direction for RTL
// TODO(Issue #98): using inter-char and inter-word spacing settings when measuring text
self.natural_word_slices_in_range(range)
.fold(Au(0), |advance, slice| {
- advance + slice.glyphs.advance_for_byte_range(&slice.range, self.extra_word_spacing)
+ advance + slice
+ .glyphs
+ .advance_for_byte_range(&slice.range, self.extra_word_spacing)
})
}
pub fn metrics_for_range(&self, range: &Range<ByteIndex>) -> RunMetrics {
- RunMetrics::new(self.advance_for_range(range),
- self.font_metrics.ascent,
- self.font_metrics.descent)
+ RunMetrics::new(
+ self.advance_for_range(range),
+ self.font_metrics.ascent,
+ self.font_metrics.descent,
+ )
}
- pub fn metrics_for_slice(&self, glyphs: &GlyphStore, slice_range: &Range<ByteIndex>)
- -> RunMetrics {
- RunMetrics::new(glyphs.advance_for_byte_range(slice_range, self.extra_word_spacing),
- self.font_metrics.ascent,
- self.font_metrics.descent)
+ pub fn metrics_for_slice(
+ &self,
+ glyphs: &GlyphStore,
+ slice_range: &Range<ByteIndex>,
+ ) -> RunMetrics {
+ RunMetrics::new(
+ glyphs.advance_for_byte_range(slice_range, self.extra_word_spacing),
+ self.font_metrics.ascent,
+ self.font_metrics.descent,
+ )
}
pub fn min_width_for_range(&self, range: &Range<ByteIndex>) -> Au {
debug!("iterating outer range {:?}", range);
- self.natural_word_slices_in_range(range).fold(Au(0), |max_piece_width, slice| {
- debug!("iterated on {:?}[{:?}]", slice.offset, slice.range);
- max(max_piece_width, self.advance_for_range(&slice.range))
- })
+ self.natural_word_slices_in_range(range)
+ .fold(Au(0), |max_piece_width, slice| {
+ debug!("iterated on {:?}[{:?}]", slice.offset, slice.range);
+ max(max_piece_width, self.advance_for_range(&slice.range))
+ })
}
pub fn minimum_splittable_inline_size(&self, range: &Range<ByteIndex>) -> Au {
@@ -309,13 +341,15 @@ impl<'a> TextRun {
let self_ptr = self as *const TextRun;
INDEX_OF_FIRST_GLYPH_RUN_CACHE.with(|index_of_first_glyph_run_cache| {
if let Some((last_text_run, last_index, last_result)) =
- index_of_first_glyph_run_cache.get() {
+ index_of_first_glyph_run_cache.get()
+ {
if last_text_run == self_ptr && last_index == index {
- return Some(last_result)
+ return Some(last_result);
}
}
- if let Ok(result) = (&**self.glyphs).binary_search_by(|current| current.compare(&index)) {
+ if let Ok(result) = (&**self.glyphs).binary_search_by(|current| current.compare(&index))
+ {
index_of_first_glyph_run_cache.set(Some((self_ptr, index, result)));
Some(result)
} else {
@@ -339,18 +373,22 @@ impl<'a> TextRun {
let mut remaining = advance;
self.natural_word_slices_in_range(range)
.map(|slice| {
- let (slice_index, slice_advance) =
- slice.glyphs.range_index_of_advance(&slice.range, remaining, self.extra_word_spacing);
+ let (slice_index, slice_advance) = slice.glyphs.range_index_of_advance(
+ &slice.range,
+ remaining,
+ self.extra_word_spacing,
+ );
remaining -= slice_advance;
slice_index
- })
- .sum()
+ }).sum()
}
/// Returns an iterator that will iterate over all slices of glyphs that represent natural
/// words in the given range.
- pub fn natural_word_slices_in_range(&'a self, range: &Range<ByteIndex>)
- -> NaturalWordSliceIterator<'a> {
+ pub fn natural_word_slices_in_range(
+ &'a self,
+ range: &Range<ByteIndex>,
+ ) -> NaturalWordSliceIterator<'a> {
let index = match self.index_of_first_glyph_run_containing(range.begin()) {
None => self.glyphs.len(),
Some(index) => index,
@@ -365,20 +403,22 @@ impl<'a> TextRun {
/// Returns an iterator that over natural word slices in visual order (left to right or
/// right to left, depending on the bidirectional embedding level).
- pub fn natural_word_slices_in_visual_order(&'a self, range: &Range<ByteIndex>)
- -> NaturalWordSliceIterator<'a> {
+ pub fn natural_word_slices_in_visual_order(
+ &'a self,
+ range: &Range<ByteIndex>,
+ ) -> NaturalWordSliceIterator<'a> {
// Iterate in reverse order if bidi level is RTL.
let reverse = self.bidi_level.is_rtl();
let index = if reverse {
match self.index_of_first_glyph_run_containing(range.end() - ByteIndex(1)) {
Some(i) => i + 1, // In reverse mode, index points one past the next element.
- None => 0
+ None => 0,
}
} else {
match self.index_of_first_glyph_run_containing(range.begin()) {
Some(i) => i,
- None => self.glyphs.len()
+ None => self.glyphs.len(),
}
};
NaturalWordSliceIterator {
@@ -391,8 +431,10 @@ impl<'a> TextRun {
/// Returns an iterator that will iterate over all slices of glyphs that represent individual
/// characters in the given range.
- pub fn character_slices_in_range(&'a self, range: &Range<ByteIndex>)
- -> CharacterSliceIterator<'a> {
+ pub fn character_slices_in_range(
+ &'a self,
+ range: &Range<ByteIndex>,
+ ) -> CharacterSliceIterator<'a> {
let index = match self.index_of_first_glyph_run_containing(range.begin()) {
None => self.glyphs.len(),
Some(index) => index,
diff --git a/components/gfx/text/util.rs b/components/gfx/text/util.rs
index f740c4a54e6..b1bf25724ba 100644
--- a/components/gfx/text/util.rs
+++ b/components/gfx/text/util.rs
@@ -9,7 +9,7 @@ pub enum CompressionMode {
CompressNone,
CompressWhitespace,
CompressWhitespaceNewline,
- DiscardNewline
+ DiscardNewline,
}
// ported from Gecko's nsTextFrameUtils::TransformText.
@@ -22,11 +22,12 @@ pub enum CompressionMode {
// * Issue #114: record skipped and kept chars for mapping original to new text
//
// * Untracked: various edge cases for bidi, CJK, etc.
-pub fn transform_text(text: &str,
- mode: CompressionMode,
- incoming_whitespace: bool,
- output_text: &mut String)
- -> bool {
+pub fn transform_text(
+ text: &str,
+ mode: CompressionMode,
+ incoming_whitespace: bool,
+ output_text: &mut String,
+) -> bool {
let out_whitespace = match mode {
CompressionMode::CompressNone | CompressionMode::DiscardNewline => {
for ch in text.chars() {
@@ -53,12 +54,13 @@ pub fn transform_text(text: &str,
if is_always_discardable_char(ch) {
// revert whitespace setting, since this char was discarded
next_in_whitespace = in_whitespace;
- // TODO: record skipped char
+ // TODO: record skipped char
} else {
// TODO: record kept char
output_text.push(ch);
}
- } else { /* next_in_whitespace; possibly add a space char */
+ } else {
+ /* next_in_whitespace; possibly add a space char */
if in_whitespace {
// TODO: record skipped char
} else {
@@ -70,17 +72,17 @@ pub fn transform_text(text: &str,
in_whitespace = next_in_whitespace;
} /* /for str::each_char */
in_whitespace
- }
+ },
};
return out_whitespace;
fn is_in_whitespace(ch: char, mode: CompressionMode) -> bool {
match (ch, mode) {
- (' ', _) => true,
+ (' ', _) => true,
('\t', _) => true,
('\n', CompressionMode::CompressWhitespaceNewline) => true,
- (_, _) => false
+ (_, _) => false,
}
}
@@ -89,8 +91,10 @@ pub fn transform_text(text: &str,
return true;
}
match mode {
- CompressionMode::DiscardNewline | CompressionMode::CompressWhitespaceNewline => ch == '\n',
- _ => false
+ CompressionMode::DiscardNewline | CompressionMode::CompressWhitespaceNewline => {
+ ch == '\n'
+ },
+ _ => false,
}
}
@@ -113,7 +117,7 @@ pub fn is_bidi_control(c: char) -> bool {
'\u{202A}'...'\u{202E}' => true,
'\u{2066}'...'\u{2069}' => true,
'\u{200E}' | '\u{200F}' | '\u{061C}' => true,
- _ => false
+ _ => false,
}
}
@@ -143,15 +147,12 @@ pub fn is_cjk(codepoint: char) -> bool {
UnicodeBlock::CJKUnifiedIdeographs |
UnicodeBlock::CJKCompatibilityIdeographs |
UnicodeBlock::CJKCompatibilityForms |
- UnicodeBlock::HalfwidthandFullwidthForms => {
- return true
- }
+ UnicodeBlock::HalfwidthandFullwidthForms => return true,
- _ => {}
+ _ => {},
}
}
-
// https://en.wikipedia.org/wiki/Plane_(Unicode)#Supplementary_Ideographic_Plane
unicode_plane(codepoint) == 2
}
diff --git a/components/gfx_traits/lib.rs b/components/gfx_traits/lib.rs
index 247396ca04e..457814abddf 100644
--- a/components/gfx_traits/lib.rs
+++ b/components/gfx_traits/lib.rs
@@ -4,13 +4,15 @@
#![crate_name = "gfx_traits"]
#![crate_type = "rlib"]
-
#![deny(unsafe_code)]
extern crate malloc_size_of;
-#[macro_use] extern crate malloc_size_of_derive;
-#[macro_use] extern crate range;
-#[macro_use] extern crate serde;
+#[macro_use]
+extern crate malloc_size_of_derive;
+#[macro_use]
+extern crate range;
+#[macro_use]
+extern crate serde;
pub mod print_tree;
@@ -32,7 +34,7 @@ impl Epoch {
pub struct StackingContextId(
/// The identifier for this StackingContext, derived from the Flow's memory address
/// and fragment type. As a space optimization, these are combined into a single word.
- pub u64
+ pub u64,
);
impl StackingContextId {
@@ -87,7 +89,7 @@ fn next_special_id() -> usize {
SPECIAL_SCROLL_ROOT_ID_MASK
}
-pub fn combine_id_with_fragment_type(id: usize, fragment_type: FragmentType) -> usize {
+pub fn combine_id_with_fragment_type(id: usize, fragment_type: FragmentType) -> usize {
debug_assert_eq!(id & (fragment_type as usize), 0);
if fragment_type == FragmentType::FragmentBody {
id
diff --git a/components/hashglobe/src/alloc.rs b/components/hashglobe/src/alloc.rs
index b0d622972db..b1c7a6eca5e 100644
--- a/components/hashglobe/src/alloc.rs
+++ b/components/hashglobe/src/alloc.rs
@@ -1,25 +1,26 @@
// FORK NOTE: Copied from liballoc_system, removed unnecessary APIs,
// APIs take size/align directly instead of Layout
-
-
-
// The minimum alignment guaranteed by the architecture. This value is used to
// add fast paths for low alignment values. In practice, the alignment is a
// constant at the call site and the branch will be optimized out.
-#[cfg(all(any(target_arch = "x86",
- target_arch = "arm",
- target_arch = "mips",
- target_arch = "powerpc",
- target_arch = "powerpc64",
- target_arch = "asmjs",
- target_arch = "wasm32")))]
+#[cfg(all(any(
+ target_arch = "x86",
+ target_arch = "arm",
+ target_arch = "mips",
+ target_arch = "powerpc",
+ target_arch = "powerpc64",
+ target_arch = "asmjs",
+ target_arch = "wasm32"
+)))]
const MIN_ALIGN: usize = 8;
-#[cfg(all(any(target_arch = "x86_64",
- target_arch = "aarch64",
- target_arch = "mips64",
- target_arch = "s390x",
- target_arch = "sparc64")))]
+#[cfg(all(any(
+ target_arch = "x86_64",
+ target_arch = "aarch64",
+ target_arch = "mips64",
+ target_arch = "s390x",
+ target_arch = "sparc64"
+)))]
const MIN_ALIGN: usize = 16;
pub use self::platform::{alloc, dealloc, realloc};
@@ -100,7 +101,6 @@ mod platform {
type DWORD = u32;
type BOOL = i32;
-
extern "system" {
fn GetProcessHeap() -> HANDLE;
fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
@@ -123,8 +123,7 @@ mod platform {
}
#[inline]
- unsafe fn allocate_with_flags(size: usize, align: usize, flags: DWORD) -> *mut u8
- {
+ unsafe fn allocate_with_flags(size: usize, align: usize, flags: DWORD) -> *mut u8 {
if align <= MIN_ALIGN {
HeapAlloc(GetProcessHeap(), flags, size)
} else {
@@ -147,21 +146,16 @@ mod platform {
pub unsafe fn dealloc(ptr: *mut u8, align: usize) {
if align <= MIN_ALIGN {
let err = HeapFree(GetProcessHeap(), 0, ptr as LPVOID);
- debug_assert!(err != 0, "Failed to free heap memory: {}",
- GetLastError());
+ debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());
} else {
let header = get_header(ptr);
let err = HeapFree(GetProcessHeap(), 0, header.0 as LPVOID);
- debug_assert!(err != 0, "Failed to free heap memory: {}",
- GetLastError());
+ debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());
}
}
#[inline]
pub unsafe fn realloc(ptr: *mut u8, new_size: usize) -> *mut u8 {
- HeapReAlloc(GetProcessHeap(),
- 0,
- ptr as LPVOID,
- new_size) as *mut u8
+ HeapReAlloc(GetProcessHeap(), 0, ptr as LPVOID, new_size) as *mut u8
}
}
diff --git a/components/hashglobe/src/fake.rs b/components/hashglobe/src/fake.rs
index eba21e04148..c5cd9d39bb7 100644
--- a/components/hashglobe/src/fake.rs
+++ b/components/hashglobe/src/fake.rs
@@ -26,7 +26,6 @@ pub use std::collections::hash_set::{Iter as SetIter, IntoIter as SetIntoIter};
#[derive(Clone)]
pub struct HashMap<K, V, S = RandomState>(StdMap<K, V, S>);
-
use FailedAllocationError;
impl<K, V, S> Deref for HashMap<K, V, S> {
@@ -43,8 +42,9 @@ impl<K, V, S> DerefMut for HashMap<K, V, S> {
}
impl<K, V, S> HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
#[inline]
pub fn try_with_hasher(hash_builder: S) -> Result<HashMap<K, V, S>, FailedAllocationError> {
@@ -52,17 +52,20 @@ impl<K, V, S> HashMap<K, V, S>
}
#[inline]
- pub fn try_with_capacity_and_hasher(capacity: usize,
- hash_builder: S)
- -> Result<HashMap<K, V, S>, FailedAllocationError> {
- Ok(HashMap(StdMap::with_capacity_and_hasher(capacity, hash_builder)))
+ pub fn try_with_capacity_and_hasher(
+ capacity: usize,
+ hash_builder: S,
+ ) -> Result<HashMap<K, V, S>, FailedAllocationError> {
+ Ok(HashMap(StdMap::with_capacity_and_hasher(
+ capacity,
+ hash_builder,
+ )))
}
pub fn with_capacity_and_hasher(capacity: usize, hash_builder: S) -> HashMap<K, V, S> {
HashMap(StdMap::with_capacity_and_hasher(capacity, hash_builder))
}
-
#[inline]
pub fn try_reserve(&mut self, additional: usize) -> Result<(), FailedAllocationError> {
Ok(self.reserve(additional))
@@ -85,7 +88,6 @@ impl<K, V, S> HashMap<K, V, S>
#[derive(Clone)]
pub struct HashSet<T, S = RandomState>(StdSet<T, S>);
-
impl<T, S> Deref for HashSet<T, S> {
type Target = StdSet<T, S>;
fn deref(&self) -> &Self::Target {
@@ -111,17 +113,16 @@ impl<T: Hash + Eq> HashSet<T, RandomState> {
}
}
-
impl<T, S> HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
#[inline]
pub fn with_hasher(hasher: S) -> HashSet<T, S> {
HashSet(StdSet::with_hasher(hasher))
}
-
#[inline]
pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> HashSet<T, S> {
HashSet(StdSet::with_capacity_and_hasher(capacity, hasher))
@@ -153,18 +154,21 @@ impl<K: Hash + Eq, V, S: BuildHasher + Default> Default for HashMap<K, V, S> {
}
impl<K, V, S> fmt::Debug for HashMap<K, V, S>
- where K: Eq + Hash + fmt::Debug,
- V: fmt::Debug,
- S: BuildHasher {
+where
+ K: Eq + Hash + fmt::Debug,
+ V: fmt::Debug,
+ S: BuildHasher,
+{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)
}
}
impl<K, V, S> PartialEq for HashMap<K, V, S>
- where K: Eq + Hash,
- V: PartialEq,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ V: PartialEq,
+ S: BuildHasher,
{
fn eq(&self, other: &HashMap<K, V, S>) -> bool {
self.0.eq(&other.0)
@@ -172,15 +176,17 @@ impl<K, V, S> PartialEq for HashMap<K, V, S>
}
impl<K, V, S> Eq for HashMap<K, V, S>
- where K: Eq + Hash,
- V: Eq,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ V: Eq,
+ S: BuildHasher,
{
}
impl<'a, K, V, S> IntoIterator for &'a HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
type Item = (&'a K, &'a V);
type IntoIter = MapIter<'a, K, V>;
@@ -191,8 +197,9 @@ impl<'a, K, V, S> IntoIterator for &'a HashMap<K, V, S>
}
impl<'a, K, V, S> IntoIterator for &'a mut HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
type Item = (&'a K, &'a mut V);
type IntoIter = MapIterMut<'a, K, V>;
@@ -209,8 +216,9 @@ impl<T: Eq + Hash, S: BuildHasher + Default> Default for HashSet<T, S> {
}
impl<T, S> fmt::Debug for HashSet<T, S>
- where T: Eq + Hash + fmt::Debug,
- S: BuildHasher
+where
+ T: Eq + Hash + fmt::Debug,
+ S: BuildHasher,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)
@@ -218,8 +226,9 @@ impl<T, S> fmt::Debug for HashSet<T, S>
}
impl<T, S> PartialEq for HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
fn eq(&self, other: &HashSet<T, S>) -> bool {
self.0.eq(&other.0)
@@ -227,14 +236,16 @@ impl<T, S> PartialEq for HashSet<T, S>
}
impl<T, S> Eq for HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
}
impl<'a, T, S> IntoIterator for &'a HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
type Item = &'a T;
type IntoIter = SetIter<'a, T>;
@@ -245,16 +256,14 @@ impl<'a, T, S> IntoIterator for &'a HashSet<T, S>
}
impl<T, S> IntoIterator for HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
type Item = T;
type IntoIter = SetIntoIter<T>;
-
fn into_iter(self) -> SetIntoIter<T> {
self.0.into_iter()
}
}
-
-
diff --git a/components/hashglobe/src/hash_map.rs b/components/hashglobe/src/hash_map.rs
index 27077526b3a..57ac9bcc049 100644
--- a/components/hashglobe/src/hash_map.rs
+++ b/components/hashglobe/src/hash_map.rs
@@ -25,7 +25,7 @@ use super::table::BucketState::{Empty, Full};
use FailedAllocationError;
-const MIN_NONZERO_RAW_CAPACITY: usize = 32; // must be a power of two
+const MIN_NONZERO_RAW_CAPACITY: usize = 32; // must be a power of two
/// The default behavior of HashMap implements a maximum load factor of 90.9%.
#[derive(Clone)]
@@ -50,7 +50,9 @@ impl DefaultResizePolicy {
// 3. Ensure it is at least the minimum size.
let mut raw_cap = len * 11 / 10;
assert!(raw_cap >= len, "raw_cap overflow");
- raw_cap = raw_cap.checked_next_power_of_two().expect("raw_capacity overflow");
+ raw_cap = raw_cap
+ .checked_next_power_of_two()
+ .expect("raw_capacity overflow");
raw_cap = max(MIN_NONZERO_RAW_CAPACITY, raw_cap);
raw_cap
}
@@ -398,8 +400,9 @@ pub struct HashMap<K, V, S = RandomState> {
/// Search for a pre-hashed key.
#[inline]
fn search_hashed<K, V, M, F>(table: M, hash: SafeHash, mut is_match: F) -> InternalEntry<K, V, M>
- where M: Deref<Target = RawTable<K, V>>,
- F: FnMut(&K) -> bool
+where
+ M: Deref<Target = RawTable<K, V>>,
+ F: FnMut(&K) -> bool,
{
// This is the only function where capacity can be zero. To avoid
// undefined behavior when Bucket::new gets the raw bucket in this
@@ -420,7 +423,7 @@ fn search_hashed<K, V, M, F>(table: M, hash: SafeHash, mut is_match: F) -> Inter
hash,
elem: NoElem(bucket, displacement),
};
- }
+ },
Full(bucket) => bucket,
};
@@ -449,9 +452,7 @@ fn search_hashed<K, V, M, F>(table: M, hash: SafeHash, mut is_match: F) -> Inter
}
}
-fn pop_internal<K, V>(starting_bucket: FullBucketMut<K, V>)
- -> (K, V, &mut RawTable<K, V>)
-{
+fn pop_internal<K, V>(starting_bucket: FullBucketMut<K, V>) -> (K, V, &mut RawTable<K, V>) {
let (empty, retkey, retval) = starting_bucket.take();
let mut gap = match empty.gap_peek() {
Ok(b) => b,
@@ -475,12 +476,13 @@ fn pop_internal<K, V>(starting_bucket: FullBucketMut<K, V>)
/// also pass that bucket's displacement so we don't have to recalculate it.
///
/// `hash`, `key`, and `val` are the elements to "robin hood" into the hashtable.
-fn robin_hood<'a, K: 'a, V: 'a>(bucket: FullBucketMut<'a, K, V>,
- mut displacement: usize,
- mut hash: SafeHash,
- mut key: K,
- mut val: V)
- -> FullBucketMut<'a, K, V> {
+fn robin_hood<'a, K: 'a, V: 'a>(
+ bucket: FullBucketMut<'a, K, V>,
+ mut displacement: usize,
+ mut hash: SafeHash,
+ mut key: K,
+ mut val: V,
+) -> FullBucketMut<'a, K, V> {
let size = bucket.table().size();
let raw_capacity = bucket.table().capacity();
// There can be at most `size - dib` buckets to displace, because
@@ -513,7 +515,7 @@ fn robin_hood<'a, K: 'a, V: 'a>(bucket: FullBucketMut<'a, K, V>,
// FullBucketMut, into just one FullBucketMut. The "table"
// refers to the inner FullBucketMut in this context.
return bucket.into_table();
- }
+ },
Full(bucket) => bucket,
};
@@ -531,11 +533,13 @@ fn robin_hood<'a, K: 'a, V: 'a>(bucket: FullBucketMut<'a, K, V>,
}
impl<K, V, S> HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
fn make_hash<X: ?Sized>(&self, x: &X) -> SafeHash
- where X: Hash
+ where
+ X: Hash,
{
table::make_hash(&self.hash_builder, x)
}
@@ -545,8 +549,9 @@ impl<K, V, S> HashMap<K, V, S>
/// search_hashed.
#[inline]
fn search<'a, Q: ?Sized>(&'a self, q: &Q) -> InternalEntry<K, V, &'a RawTable<K, V>>
- where K: Borrow<Q>,
- Q: Eq + Hash
+ where
+ K: Borrow<Q>,
+ Q: Eq + Hash,
{
let hash = self.make_hash(q);
search_hashed(&self.table, hash, |k| q.eq(k.borrow()))
@@ -554,8 +559,9 @@ impl<K, V, S> HashMap<K, V, S>
#[inline]
fn search_mut<'a, Q: ?Sized>(&'a mut self, q: &Q) -> InternalEntry<K, V, &'a mut RawTable<K, V>>
- where K: Borrow<Q>,
- Q: Eq + Hash
+ where
+ K: Borrow<Q>,
+ Q: Eq + Hash,
{
let hash = self.make_hash(q);
search_hashed(&mut self.table, hash, |k| q.eq(k.borrow()))
@@ -574,7 +580,7 @@ impl<K, V, S> HashMap<K, V, S>
Empty(empty) => {
empty.put(hash, k, v);
return;
- }
+ },
Full(b) => b.into_bucket(),
};
buckets.next();
@@ -584,8 +590,9 @@ impl<K, V, S> HashMap<K, V, S>
}
impl<K, V, S> HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
/// Creates an empty `HashMap` which will use the given hash builder to hash
/// keys.
@@ -643,7 +650,10 @@ impl<K, V, S> HashMap<K, V, S>
/// map.insert(1, 2);
/// ```
#[inline]
- pub fn try_with_capacity_and_hasher(capacity: usize, hash_builder: S) -> Result<HashMap<K, V, S>, FailedAllocationError> {
+ pub fn try_with_capacity_and_hasher(
+ capacity: usize,
+ hash_builder: S,
+ ) -> Result<HashMap<K, V, S>, FailedAllocationError> {
let resize_policy = DefaultResizePolicy::new();
let raw_cap = resize_policy.raw_capacity(capacity);
Ok(HashMap {
@@ -708,12 +718,14 @@ impl<K, V, S> HashMap<K, V, S>
self.try_reserve(additional).unwrap();
}
-
#[inline]
pub fn try_reserve(&mut self, additional: usize) -> Result<(), FailedAllocationError> {
let remaining = self.capacity() - self.len(); // this can't overflow
if remaining < additional {
- let min_cap = self.len().checked_add(additional).expect("reserve overflow");
+ let min_cap = self
+ .len()
+ .checked_add(additional)
+ .expect("reserve overflow");
let raw_cap = self.resize_policy.raw_capacity(min_cap);
self.try_resize(raw_cap)?;
} else if self.table.tag() && remaining <= self.len() {
@@ -763,7 +775,7 @@ impl<K, V, S> HashMap<K, V, S>
break;
}
b.into_bucket()
- }
+ },
Empty(b) => b.into_bucket(),
};
bucket.next();
@@ -822,7 +834,7 @@ impl<K, V, S> HashMap<K, V, S>
Some(Vacant(elem)) => {
elem.insert(v);
None
- }
+ },
None => unreachable!(),
}
}
@@ -892,7 +904,9 @@ impl<K, V, S> HashMap<K, V, S>
/// }
/// ```
pub fn values_mut(&mut self) -> ValuesMut<K, V> {
- ValuesMut { inner: self.iter_mut() }
+ ValuesMut {
+ inner: self.iter_mut(),
+ }
}
/// An iterator visiting all key-value pairs in arbitrary order.
@@ -913,7 +927,9 @@ impl<K, V, S> HashMap<K, V, S>
/// }
/// ```
pub fn iter(&self) -> Iter<K, V> {
- Iter { inner: self.table.iter() }
+ Iter {
+ inner: self.table.iter(),
+ }
}
/// An iterator visiting all key-value pairs in arbitrary order,
@@ -940,7 +956,9 @@ impl<K, V, S> HashMap<K, V, S>
/// }
/// ```
pub fn iter_mut(&mut self) -> IterMut<K, V> {
- IterMut { inner: self.table.iter_mut() }
+ IterMut {
+ inner: self.table.iter_mut(),
+ }
}
/// Gets the given key's corresponding entry in the map for in-place manipulation.
@@ -972,7 +990,8 @@ impl<K, V, S> HashMap<K, V, S>
self.try_reserve(1)?;
let hash = self.make_hash(&key);
Ok(search_hashed(&mut self.table, hash, |q| q.eq(&key))
- .into_entry(key).expect("unreachable"))
+ .into_entry(key)
+ .expect("unreachable"))
}
/// Returns the number of elements in the map.
@@ -1028,8 +1047,14 @@ impl<K, V, S> HashMap<K, V, S>
/// assert!(a.is_empty());
/// ```
#[inline]
- pub fn drain(&mut self) -> Drain<K, V> where K: 'static, V: 'static {
- Drain { inner: self.table.drain() }
+ pub fn drain(&mut self) -> Drain<K, V>
+ where
+ K: 'static,
+ V: 'static,
+ {
+ Drain {
+ inner: self.table.drain(),
+ }
}
/// Clears the map, removing all key-value pairs. Keeps the allocated memory
@@ -1046,7 +1071,11 @@ impl<K, V, S> HashMap<K, V, S>
/// assert!(a.is_empty());
/// ```
#[inline]
- pub fn clear(&mut self) where K: 'static, V: 'static {
+ pub fn clear(&mut self)
+ where
+ K: 'static,
+ V: 'static,
+ {
self.drain();
}
@@ -1070,10 +1099,13 @@ impl<K, V, S> HashMap<K, V, S>
/// assert_eq!(map.get(&2), None);
/// ```
pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<&V>
- where K: Borrow<Q>,
- Q: Hash + Eq
+ where
+ K: Borrow<Q>,
+ Q: Hash + Eq,
{
- self.search(k).into_occupied_bucket().map(|bucket| bucket.into_refs().1)
+ self.search(k)
+ .into_occupied_bucket()
+ .map(|bucket| bucket.into_refs().1)
}
/// Returns true if the map contains a value for the specified key.
@@ -1096,8 +1128,9 @@ impl<K, V, S> HashMap<K, V, S>
/// assert_eq!(map.contains_key(&2), false);
/// ```
pub fn contains_key<Q: ?Sized>(&self, k: &Q) -> bool
- where K: Borrow<Q>,
- Q: Hash + Eq
+ where
+ K: Borrow<Q>,
+ Q: Hash + Eq,
{
self.search(k).into_occupied_bucket().is_some()
}
@@ -1124,10 +1157,13 @@ impl<K, V, S> HashMap<K, V, S>
/// assert_eq!(map[&1], "b");
/// ```
pub fn get_mut<Q: ?Sized>(&mut self, k: &Q) -> Option<&mut V>
- where K: Borrow<Q>,
- Q: Hash + Eq
+ where
+ K: Borrow<Q>,
+ Q: Hash + Eq,
{
- self.search_mut(k).into_occupied_bucket().map(|bucket| bucket.into_mut_refs().1)
+ self.search_mut(k)
+ .into_occupied_bucket()
+ .map(|bucket| bucket.into_mut_refs().1)
}
/// Inserts a key-value pair into the map.
@@ -1187,14 +1223,17 @@ impl<K, V, S> HashMap<K, V, S>
/// assert_eq!(map.remove(&1), None);
/// ```
pub fn remove<Q: ?Sized>(&mut self, k: &Q) -> Option<V>
- where K: Borrow<Q>,
- Q: Hash + Eq
+ where
+ K: Borrow<Q>,
+ Q: Hash + Eq,
{
if self.table.size() == 0 {
return None;
}
- self.search_mut(k).into_occupied_bucket().map(|bucket| pop_internal(bucket).1)
+ self.search_mut(k)
+ .into_occupied_bucket()
+ .map(|bucket| pop_internal(bucket).1)
}
/// Retains only the elements specified by the predicate.
@@ -1211,7 +1250,8 @@ impl<K, V, S> HashMap<K, V, S>
/// assert_eq!(map.len(), 4);
/// ```
pub fn retain<F>(&mut self, mut f: F)
- where F: FnMut(&K, &mut V) -> bool
+ where
+ F: FnMut(&K, &mut V) -> bool,
{
if self.table.size() == 0 {
return;
@@ -1236,41 +1276,43 @@ impl<K, V, S> HashMap<K, V, S>
full.into_bucket()
}
},
- Empty(b) => {
- b.into_bucket()
- }
+ Empty(b) => b.into_bucket(),
};
- bucket.prev(); // reverse iteration
+ bucket.prev(); // reverse iteration
debug_assert!(elems_left == 0 || bucket.index() != start_index);
}
}
}
impl<K, V, S> PartialEq for HashMap<K, V, S>
- where K: Eq + Hash,
- V: PartialEq,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ V: PartialEq,
+ S: BuildHasher,
{
fn eq(&self, other: &HashMap<K, V, S>) -> bool {
if self.len() != other.len() {
return false;
}
- self.iter().all(|(key, value)| other.get(key).map_or(false, |v| *value == *v))
+ self.iter()
+ .all(|(key, value)| other.get(key).map_or(false, |v| *value == *v))
}
}
impl<K, V, S> Eq for HashMap<K, V, S>
- where K: Eq + Hash,
- V: Eq,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ V: Eq,
+ S: BuildHasher,
{
}
impl<K, V, S> Debug for HashMap<K, V, S>
- where K: Eq + Hash + Debug,
- V: Debug,
- S: BuildHasher
+where
+ K: Eq + Hash + Debug,
+ V: Debug,
+ S: BuildHasher,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_map().entries(self.iter()).finish()
@@ -1278,8 +1320,9 @@ impl<K, V, S> Debug for HashMap<K, V, S>
}
impl<K, V, S> Default for HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher + Default
+where
+ K: Eq + Hash,
+ S: BuildHasher + Default,
{
/// Creates an empty `HashMap<K, V, S>`, with the `Default` value for the hasher.
fn default() -> HashMap<K, V, S> {
@@ -1288,9 +1331,10 @@ impl<K, V, S> Default for HashMap<K, V, S>
}
impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap<K, V, S>
- where K: Eq + Hash + Borrow<Q>,
- Q: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash + Borrow<Q>,
+ Q: Eq + Hash,
+ S: BuildHasher,
{
type Output = V;
@@ -1314,15 +1358,15 @@ pub struct Iter<'a, K: 'a, V: 'a> {
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
impl<'a, K, V> Clone for Iter<'a, K, V> {
fn clone(&self) -> Iter<'a, K, V> {
- Iter { inner: self.inner.clone() }
+ Iter {
+ inner: self.inner.clone(),
+ }
}
}
impl<'a, K: Debug, V: Debug> fmt::Debug for Iter<'a, K, V> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.debug_list()
- .entries(self.clone())
- .finish()
+ f.debug_list().entries(self.clone()).finish()
}
}
@@ -1362,15 +1406,15 @@ pub struct Keys<'a, K: 'a, V: 'a> {
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
impl<'a, K, V> Clone for Keys<'a, K, V> {
fn clone(&self) -> Keys<'a, K, V> {
- Keys { inner: self.inner.clone() }
+ Keys {
+ inner: self.inner.clone(),
+ }
}
}
impl<'a, K: Debug, V> fmt::Debug for Keys<'a, K, V> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.debug_list()
- .entries(self.clone())
- .finish()
+ f.debug_list().entries(self.clone()).finish()
}
}
@@ -1388,15 +1432,15 @@ pub struct Values<'a, K: 'a, V: 'a> {
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
impl<'a, K, V> Clone for Values<'a, K, V> {
fn clone(&self) -> Values<'a, K, V> {
- Values { inner: self.inner.clone() }
+ Values {
+ inner: self.inner.clone(),
+ }
}
}
impl<'a, K, V: Debug> fmt::Debug for Values<'a, K, V> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.debug_list()
- .entries(self.clone())
- .finish()
+ f.debug_list().entries(self.clone()).finish()
}
}
@@ -1423,7 +1467,9 @@ pub struct ValuesMut<'a, K: 'a, V: 'a> {
}
enum InternalEntry<K, V, M> {
- Occupied { elem: FullBucket<K, V, M> },
+ Occupied {
+ elem: FullBucket<K, V, M>,
+ },
Vacant {
hash: SafeHash,
elem: VacantEntryState<K, V, M>,
@@ -1445,19 +1491,11 @@ impl<'a, K, V> InternalEntry<K, V, &'a mut RawTable<K, V>> {
#[inline]
fn into_entry(self, key: K) -> Option<Entry<'a, K, V>> {
match self {
- InternalEntry::Occupied { elem } => {
- Some(Occupied(OccupiedEntry {
- key: Some(key),
- elem,
- }))
- }
- InternalEntry::Vacant { hash, elem } => {
- Some(Vacant(VacantEntry {
- hash,
- key,
- elem,
- }))
- }
+ InternalEntry::Occupied { elem } => Some(Occupied(OccupiedEntry {
+ key: Some(key),
+ elem,
+ })),
+ InternalEntry::Vacant { hash, elem } => Some(Vacant(VacantEntry { hash, key, elem })),
InternalEntry::TableIsEmpty => None,
}
}
@@ -1471,25 +1509,17 @@ impl<'a, K, V> InternalEntry<K, V, &'a mut RawTable<K, V>> {
/// [`entry`]: struct.HashMap.html#method.entry
pub enum Entry<'a, K: 'a, V: 'a> {
/// An occupied entry.
- Occupied( OccupiedEntry<'a, K, V>),
+ Occupied(OccupiedEntry<'a, K, V>),
/// A vacant entry.
- Vacant( VacantEntry<'a, K, V>),
+ Vacant(VacantEntry<'a, K, V>),
}
impl<'a, K: 'a + Debug, V: 'a + Debug> Debug for Entry<'a, K, V> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
- Vacant(ref v) => {
- f.debug_tuple("Entry")
- .field(v)
- .finish()
- }
- Occupied(ref o) => {
- f.debug_tuple("Entry")
- .field(o)
- .finish()
- }
+ Vacant(ref v) => f.debug_tuple("Entry").field(v).finish(),
+ Occupied(ref o) => f.debug_tuple("Entry").field(o).finish(),
}
}
}
@@ -1524,9 +1554,7 @@ pub struct VacantEntry<'a, K: 'a, V: 'a> {
impl<'a, K: 'a + Debug, V: 'a> Debug for VacantEntry<'a, K, V> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.debug_tuple("VacantEntry")
- .field(self.key())
- .finish()
+ f.debug_tuple("VacantEntry").field(self.key()).finish()
}
}
@@ -1540,8 +1568,9 @@ enum VacantEntryState<K, V, M> {
}
impl<'a, K, V, S> IntoIterator for &'a HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
type Item = (&'a K, &'a V);
type IntoIter = Iter<'a, K, V>;
@@ -1552,8 +1581,9 @@ impl<'a, K, V, S> IntoIterator for &'a HashMap<K, V, S>
}
impl<'a, K, V, S> IntoIterator for &'a mut HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
type Item = (&'a K, &'a mut V);
type IntoIter = IterMut<'a, K, V>;
@@ -1564,8 +1594,9 @@ impl<'a, K, V, S> IntoIterator for &'a mut HashMap<K, V, S>
}
impl<K, V, S> IntoIterator for HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
type Item = (K, V);
type IntoIter = IntoIter<K, V>;
@@ -1588,7 +1619,9 @@ impl<K, V, S> IntoIterator for HashMap<K, V, S>
/// let vec: Vec<(&str, isize)> = map.into_iter().collect();
/// ```
fn into_iter(self) -> IntoIter<K, V> {
- IntoIter { inner: self.table.into_iter() }
+ IntoIter {
+ inner: self.table.into_iter(),
+ }
}
}
@@ -1611,7 +1644,6 @@ impl<'a, K, V> ExactSizeIterator for Iter<'a, K, V> {
}
}
-
impl<'a, K, V> Iterator for IterMut<'a, K, V> {
type Item = (&'a K, &'a mut V);
@@ -1632,13 +1664,12 @@ impl<'a, K, V> ExactSizeIterator for IterMut<'a, K, V> {
}
impl<'a, K, V> fmt::Debug for IterMut<'a, K, V>
- where K: fmt::Debug,
- V: fmt::Debug,
+where
+ K: fmt::Debug,
+ V: fmt::Debug,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.debug_list()
- .entries(self.inner.iter())
- .finish()
+ f.debug_list().entries(self.inner.iter()).finish()
}
}
@@ -1663,9 +1694,7 @@ impl<K, V> ExactSizeIterator for IntoIter<K, V> {
impl<K: Debug, V: Debug> fmt::Debug for IntoIter<K, V> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.debug_list()
- .entries(self.inner.iter())
- .finish()
+ f.debug_list().entries(self.inner.iter()).finish()
}
}
@@ -1726,13 +1755,12 @@ impl<'a, K, V> ExactSizeIterator for ValuesMut<'a, K, V> {
}
impl<'a, K, V> fmt::Debug for ValuesMut<'a, K, V>
- where K: fmt::Debug,
- V: fmt::Debug,
+where
+ K: fmt::Debug,
+ V: fmt::Debug,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.debug_list()
- .entries(self.inner.inner.iter())
- .finish()
+ f.debug_list().entries(self.inner.inner.iter()).finish()
}
}
@@ -1756,20 +1784,19 @@ impl<'a, K, V> ExactSizeIterator for Drain<'a, K, V> {
}
impl<'a, K, V> fmt::Debug for Drain<'a, K, V>
- where K: fmt::Debug,
- V: fmt::Debug,
+where
+ K: fmt::Debug,
+ V: fmt::Debug,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- f.debug_list()
- .entries(self.inner.iter())
- .finish()
+ f.debug_list().entries(self.inner.iter()).finish()
}
}
// FORK NOTE: Removed Placer impl
impl<'a, K, V> Entry<'a, K, V> {
- /// Ensures a value is in the entry by inserting the default if empty, and returns
+ /// Ensures a value is in the entry by inserting the default if empty, and returns
/// a mutable reference to the value in the entry.
///
/// # Examples
@@ -1792,7 +1819,7 @@ impl<'a, K, V> Entry<'a, K, V> {
}
}
- /// Ensures a value is in the entry by inserting the result of the default function if empty,
+ /// Ensures a value is in the entry by inserting the result of the default function if empty,
/// and returns a mutable reference to the value in the entry.
///
/// # Examples
@@ -1824,7 +1851,7 @@ impl<'a, K, V> Entry<'a, K, V> {
/// let mut map: HashMap<&str, u32> = HashMap::new();
/// assert_eq!(map.entry("poneyland").key(), &"poneyland");
/// ```
- pub fn key(&self) -> &K {
+ pub fn key(&self) -> &K {
match *self {
Occupied(ref entry) => entry.key(),
Vacant(ref entry) => entry.key(),
@@ -1844,7 +1871,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
/// map.entry("poneyland").or_insert(12);
/// assert_eq!(map.entry("poneyland").key(), &"poneyland");
/// ```
- pub fn key(&self) -> &K {
+ pub fn key(&self) -> &K {
self.elem.read().0
}
@@ -1866,7 +1893,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
///
/// assert_eq!(map.contains_key("poneyland"), false);
/// ```
- pub fn remove_entry(self) -> (K, V) {
+ pub fn remove_entry(self) -> (K, V) {
let (k, v, _) = pop_internal(self.elem);
(k, v)
}
@@ -1886,7 +1913,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
/// assert_eq!(o.get(), &12);
/// }
/// ```
- pub fn get(&self) -> &V {
+ pub fn get(&self) -> &V {
self.elem.read().1
}
@@ -1908,7 +1935,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
///
/// assert_eq!(map["poneyland"], 22);
/// ```
- pub fn get_mut(&mut self) -> &mut V {
+ pub fn get_mut(&mut self) -> &mut V {
self.elem.read_mut().1
}
@@ -1931,7 +1958,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
///
/// assert_eq!(map["poneyland"], 22);
/// ```
- pub fn into_mut(self) -> &'a mut V {
+ pub fn into_mut(self) -> &'a mut V {
self.elem.into_mut_refs().1
}
@@ -1952,7 +1979,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
///
/// assert_eq!(map["poneyland"], 15);
/// ```
- pub fn insert(&mut self, mut value: V) -> V {
+ pub fn insert(&mut self, mut value: V) -> V {
let old_value = self.get_mut();
mem::swap(&mut value, old_value);
value
@@ -1975,7 +2002,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
///
/// assert_eq!(map.contains_key("poneyland"), false);
/// ```
- pub fn remove(self) -> V {
+ pub fn remove(self) -> V {
pop_internal(self.elem).1
}
@@ -1999,7 +2026,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
/// let mut map: HashMap<&str, u32> = HashMap::new();
/// assert_eq!(map.entry("poneyland").key(), &"poneyland");
/// ```
- pub fn key(&self) -> &K {
+ pub fn key(&self) -> &K {
&self.key
}
@@ -2017,7 +2044,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
/// v.into_key();
/// }
/// ```
- pub fn into_key(self) -> K {
+ pub fn into_key(self) -> K {
self.key
}
@@ -2037,7 +2064,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
/// }
/// assert_eq!(map["poneyland"], 37);
/// ```
- pub fn insert(self, value: V) -> &'a mut V {
+ pub fn insert(self, value: V) -> &'a mut V {
let b = match self.elem {
NeqElem(mut bucket, disp) => {
if disp >= DISPLACEMENT_THRESHOLD {
@@ -2057,8 +2084,9 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
}
impl<K, V, S> FromIterator<(K, V)> for HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher + Default
+where
+ K: Eq + Hash,
+ S: BuildHasher + Default,
{
fn from_iter<T: IntoIterator<Item = (K, V)>>(iter: T) -> HashMap<K, V, S> {
let mut map = HashMap::with_hasher(Default::default());
@@ -2068,8 +2096,9 @@ impl<K, V, S> FromIterator<(K, V)> for HashMap<K, V, S>
}
impl<K, V, S> Extend<(K, V)> for HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
fn extend<T: IntoIterator<Item = (K, V)>>(&mut self, iter: T) {
// Keys may be already present or show multiple times in the iterator.
@@ -2090,9 +2119,10 @@ impl<K, V, S> Extend<(K, V)> for HashMap<K, V, S>
}
impl<'a, K, V, S> Extend<(&'a K, &'a V)> for HashMap<K, V, S>
- where K: Eq + Hash + Copy,
- V: Copy,
- S: BuildHasher
+where
+ K: Eq + Hash + Copy,
+ V: Copy,
+ S: BuildHasher,
{
fn extend<T: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: T) {
self.extend(iter.into_iter().map(|(&key, &value)| (key, value)));
@@ -2102,16 +2132,18 @@ impl<'a, K, V, S> Extend<(&'a K, &'a V)> for HashMap<K, V, S>
// FORK NOTE: These can be reused
pub use std::collections::hash_map::{DefaultHasher, RandomState};
-
impl<K, S, Q: ?Sized> super::Recover<Q> for HashMap<K, (), S>
- where K: Eq + Hash + Borrow<Q>,
- S: BuildHasher,
- Q: Eq + Hash
+where
+ K: Eq + Hash + Borrow<Q>,
+ S: BuildHasher,
+ Q: Eq + Hash,
{
type Key = K;
fn get(&self, key: &Q) -> Option<&K> {
- self.search(key).into_occupied_bucket().map(|bucket| bucket.into_refs().0)
+ self.search(key)
+ .into_occupied_bucket()
+ .map(|bucket| bucket.into_refs().0)
}
fn take(&mut self, key: &Q) -> Option<K> {
@@ -2119,7 +2151,9 @@ impl<K, S, Q: ?Sized> super::Recover<Q> for HashMap<K, (), S>
return None;
}
- self.search_mut(key).into_occupied_bucket().map(|bucket| pop_internal(bucket).0)
+ self.search_mut(key)
+ .into_occupied_bucket()
+ .map(|bucket| pop_internal(bucket).0)
}
fn replace(&mut self, key: K) -> Option<K> {
@@ -2129,11 +2163,11 @@ impl<K, S, Q: ?Sized> super::Recover<Q> for HashMap<K, (), S>
Occupied(mut occupied) => {
let key = occupied.take_key().unwrap();
Some(mem::replace(occupied.elem.read_mut().0, key))
- }
+ },
Vacant(vacant) => {
vacant.insert(());
None
- }
+ },
}
}
}
@@ -2170,8 +2204,9 @@ fn assert_covariance() {
fn values_val<'a, 'new>(v: Values<'a, u8, &'static str>) -> Values<'a, u8, &'new str> {
v
}
- fn drain<'new>(d: Drain<'static, &'static str, &'static str>)
- -> Drain<'new, &'new str, &'new str> {
+ fn drain<'new>(
+ d: Drain<'static, &'static str, &'static str>,
+ ) -> Drain<'new, &'new str, &'new str> {
d
}
}
@@ -2319,19 +2354,19 @@ mod test_map {
DROP_VECTOR.with(|v| {
assert_eq!(v.borrow()[i], 1);
- assert_eq!(v.borrow()[i+100], 1);
+ assert_eq!(v.borrow()[i + 100], 1);
});
}
DROP_VECTOR.with(|v| {
for i in 0..50 {
assert_eq!(v.borrow()[i], 0);
- assert_eq!(v.borrow()[i+100], 0);
+ assert_eq!(v.borrow()[i + 100], 0);
}
for i in 50..100 {
assert_eq!(v.borrow()[i], 1);
- assert_eq!(v.borrow()[i+100], 1);
+ assert_eq!(v.borrow()[i + 100], 1);
}
});
}
@@ -2388,13 +2423,9 @@ mod test_map {
for _ in half.by_ref() {}
DROP_VECTOR.with(|v| {
- let nk = (0..100)
- .filter(|&i| v.borrow()[i] == 1)
- .count();
+ let nk = (0..100).filter(|&i| v.borrow()[i] == 1).count();
- let nv = (0..100)
- .filter(|&i| v.borrow()[i + 100] == 1)
- .count();
+ let nv = (0..100).filter(|&i| v.borrow()[i + 100] == 1).count();
assert_eq!(nk, 50);
assert_eq!(nv, 50);
@@ -2419,7 +2450,7 @@ mod test_map {
let mut m: HashMap<isize, bool> = HashMap::new();
match m.entry(0) {
Occupied(_) => panic!(),
- Vacant(_) => {}
+ Vacant(_) => {},
}
assert!(*m.entry(0).or_insert(true));
assert_eq!(m.len(), 1);
@@ -2574,7 +2605,7 @@ mod test_map {
fn test_iterate() {
let mut m = HashMap::with_capacity(4);
for i in 0..32 {
- assert!(m.insert(i, i*2).is_none());
+ assert!(m.insert(i, i * 2).is_none());
}
assert_eq!(m.len(), 32);
@@ -2662,8 +2693,7 @@ mod test_map {
let map_str = format!("{:?}", map);
- assert!(map_str == "{1: 2, 3: 4}" ||
- map_str == "{3: 4, 1: 2}");
+ assert!(map_str == "{1: 2, 3: 4}" || map_str == "{3: 4, 1: 2}");
assert_eq!(format!("{:?}", empty), "{}");
}
@@ -2876,12 +2906,11 @@ mod test_map {
Occupied(mut view) => {
assert_eq!(view.get(), &10);
assert_eq!(view.insert(100), 10);
- }
+ },
}
assert_eq!(map.get(&1).unwrap(), &100);
assert_eq!(map.len(), 6);
-
// Existing key (update)
match map.entry(2) {
Vacant(_) => unreachable!(),
@@ -2889,7 +2918,7 @@ mod test_map {
let v = view.get_mut();
let new_v = (*v) * 10;
*v = new_v;
- }
+ },
}
assert_eq!(map.get(&2).unwrap(), &200);
assert_eq!(map.len(), 6);
@@ -2899,18 +2928,17 @@ mod test_map {
Vacant(_) => unreachable!(),
Occupied(view) => {
assert_eq!(view.remove(), 30);
- }
+ },
}
assert_eq!(map.get(&3), None);
assert_eq!(map.len(), 5);
-
// Inexistent key (insert)
match map.entry(10) {
Occupied(_) => unreachable!(),
Vacant(view) => {
assert_eq!(*view.insert(1000), 1000);
- }
+ },
}
assert_eq!(map.get(&10).unwrap(), &1000);
assert_eq!(map.len(), 6);
@@ -2919,11 +2947,10 @@ mod test_map {
#[test]
fn test_entry_take_doesnt_corrupt() {
#![allow(deprecated)] //rand
- // Test for #19292
+ // Test for #19292
fn check(m: &HashMap<isize, ()>) {
for k in m.keys() {
- assert!(m.contains_key(k),
- "{} is in keys() but not in the map?", k);
+ assert!(m.contains_key(k), "{} is in keys() but not in the map?", k);
}
}
@@ -2939,11 +2966,11 @@ mod test_map {
for i in 0..1000 {
let x = rng.gen_range(-10, 10);
match m.entry(x) {
- Vacant(_) => {}
+ Vacant(_) => {},
Occupied(e) => {
println!("{}: remove {}", i, x);
e.remove();
- }
+ },
}
check(&m);
@@ -3021,7 +3048,7 @@ mod test_map {
Vacant(e) => {
assert_eq!(key, *e.key());
e.insert(value.clone());
- }
+ },
}
assert_eq!(a.len(), 1);
assert_eq!(a[key], value);
@@ -3029,7 +3056,7 @@ mod test_map {
#[test]
fn test_retain() {
- let mut map: HashMap<isize, isize> = (0..100).map(|x|(x, x*10)).collect();
+ let mut map: HashMap<isize, isize> = (0..100).map(|x| (x, x * 10)).collect();
map.retain(|&k, _| k % 2 == 0);
assert_eq!(map.len(), 50);
diff --git a/components/hashglobe/src/hash_set.rs b/components/hashglobe/src/hash_set.rs
index 2139b58a601..34e657e44fc 100644
--- a/components/hashglobe/src/hash_set.rs
+++ b/components/hashglobe/src/hash_set.rs
@@ -122,8 +122,9 @@ pub struct HashSet<T, S = RandomState> {
}
impl<T, S> HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
/// Creates a new empty hash set which will use the given hasher to hash
/// keys.
@@ -147,7 +148,9 @@ impl<T, S> HashSet<T, S>
/// ```
#[inline]
pub fn with_hasher(hasher: S) -> HashSet<T, S> {
- HashSet { map: HashMap::with_hasher(hasher) }
+ HashSet {
+ map: HashMap::with_hasher(hasher),
+ }
}
/// Creates an empty `HashSet` with with the specified capacity, using
@@ -173,7 +176,9 @@ impl<T, S> HashSet<T, S>
/// ```
#[inline]
pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> HashSet<T, S> {
- HashSet { map: HashMap::with_capacity_and_hasher(capacity, hasher) }
+ HashSet {
+ map: HashMap::with_capacity_and_hasher(capacity, hasher),
+ }
}
/// Returns a reference to the set's [`BuildHasher`].
@@ -265,7 +270,9 @@ impl<T, S> HashSet<T, S>
/// }
/// ```
pub fn iter(&self) -> Iter<T> {
- Iter { iter: self.map.keys() }
+ Iter {
+ iter: self.map.keys(),
+ }
}
/// Visits the values representing the difference,
@@ -319,10 +326,13 @@ impl<T, S> HashSet<T, S>
/// assert_eq!(diff1, diff2);
/// assert_eq!(diff1, [1, 4].iter().collect());
/// ```
- pub fn symmetric_difference<'a>(&'a self,
- other: &'a HashSet<T, S>)
- -> SymmetricDifference<'a, T, S> {
- SymmetricDifference { iter: self.difference(other).chain(other.difference(self)) }
+ pub fn symmetric_difference<'a>(
+ &'a self,
+ other: &'a HashSet<T, S>,
+ ) -> SymmetricDifference<'a, T, S> {
+ SymmetricDifference {
+ iter: self.difference(other).chain(other.difference(self)),
+ }
}
/// Visits the values representing the intersection,
@@ -369,7 +379,9 @@ impl<T, S> HashSet<T, S>
/// assert_eq!(union, [1, 2, 3, 4].iter().collect());
/// ```
pub fn union<'a>(&'a self, other: &'a HashSet<T, S>) -> Union<'a, T, S> {
- Union { iter: self.iter().chain(other.difference(self)) }
+ Union {
+ iter: self.iter().chain(other.difference(self)),
+ }
}
/// Returns the number of elements in the set.
@@ -423,7 +435,9 @@ impl<T, S> HashSet<T, S>
/// ```
#[inline]
pub fn drain(&mut self) -> Drain<T> {
- Drain { iter: self.map.drain() }
+ Drain {
+ iter: self.map.drain(),
+ }
}
/// Clears the set, removing all values.
@@ -438,7 +452,10 @@ impl<T, S> HashSet<T, S>
/// v.clear();
/// assert!(v.is_empty());
/// ```
- pub fn clear(&mut self) where T: 'static {
+ pub fn clear(&mut self)
+ where
+ T: 'static,
+ {
self.map.clear()
}
@@ -461,8 +478,9 @@ impl<T, S> HashSet<T, S>
/// [`Eq`]: ../../std/cmp/trait.Eq.html
/// [`Hash`]: ../../std/hash/trait.Hash.html
pub fn contains<Q: ?Sized>(&self, value: &Q) -> bool
- where T: Borrow<Q>,
- Q: Hash + Eq
+ where
+ T: Borrow<Q>,
+ Q: Hash + Eq,
{
self.map.contains_key(value)
}
@@ -476,8 +494,9 @@ impl<T, S> HashSet<T, S>
/// [`Eq`]: ../../std/cmp/trait.Eq.html
/// [`Hash`]: ../../std/hash/trait.Hash.html
pub fn get<Q: ?Sized>(&self, value: &Q) -> Option<&T>
- where T: Borrow<Q>,
- Q: Hash + Eq
+ where
+ T: Borrow<Q>,
+ Q: Hash + Eq,
{
Recover::get(&self.map, value)
}
@@ -598,8 +617,9 @@ impl<T, S> HashSet<T, S>
/// [`Eq`]: ../../std/cmp/trait.Eq.html
/// [`Hash`]: ../../std/hash/trait.Hash.html
pub fn remove<Q: ?Sized>(&mut self, value: &Q) -> bool
- where T: Borrow<Q>,
- Q: Hash + Eq
+ where
+ T: Borrow<Q>,
+ Q: Hash + Eq,
{
self.map.remove(value).is_some()
}
@@ -613,8 +633,9 @@ impl<T, S> HashSet<T, S>
/// [`Eq`]: ../../std/cmp/trait.Eq.html
/// [`Hash`]: ../../std/hash/trait.Hash.html
pub fn take<Q: ?Sized>(&mut self, value: &Q) -> Option<T>
- where T: Borrow<Q>,
- Q: Hash + Eq
+ where
+ T: Borrow<Q>,
+ Q: Hash + Eq,
{
Recover::take(&mut self.map, value)
}
@@ -634,15 +655,17 @@ impl<T, S> HashSet<T, S>
/// assert_eq!(set.len(), 3);
/// ```
pub fn retain<F>(&mut self, mut f: F)
- where F: FnMut(&T) -> bool
+ where
+ F: FnMut(&T) -> bool,
{
self.map.retain(|k, _| f(k));
}
}
impl<T, S> PartialEq for HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
fn eq(&self, other: &HashSet<T, S>) -> bool {
if self.len() != other.len() {
@@ -654,14 +677,16 @@ impl<T, S> PartialEq for HashSet<T, S>
}
impl<T, S> Eq for HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
}
impl<T, S> fmt::Debug for HashSet<T, S>
- where T: Eq + Hash + fmt::Debug,
- S: BuildHasher
+where
+ T: Eq + Hash + fmt::Debug,
+ S: BuildHasher,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_set().entries(self.iter()).finish()
@@ -669,8 +694,9 @@ impl<T, S> fmt::Debug for HashSet<T, S>
}
impl<T, S> FromIterator<T> for HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher + Default
+where
+ T: Eq + Hash,
+ S: BuildHasher + Default,
{
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> HashSet<T, S> {
let mut set = HashSet::with_hasher(Default::default());
@@ -680,8 +706,9 @@ impl<T, S> FromIterator<T> for HashSet<T, S>
}
impl<T, S> Extend<T> for HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I) {
self.map.extend(iter.into_iter().map(|k| (k, ())));
@@ -689,8 +716,9 @@ impl<T, S> Extend<T> for HashSet<T, S>
}
impl<'a, T, S> Extend<&'a T> for HashSet<T, S>
- where T: 'a + Eq + Hash + Copy,
- S: BuildHasher
+where
+ T: 'a + Eq + Hash + Copy,
+ S: BuildHasher,
{
fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I) {
self.extend(iter.into_iter().cloned());
@@ -698,18 +726,22 @@ impl<'a, T, S> Extend<&'a T> for HashSet<T, S>
}
impl<T, S> Default for HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher + Default
+where
+ T: Eq + Hash,
+ S: BuildHasher + Default,
{
/// Creates an empty `HashSet<T, S>` with the `Default` value for the hasher.
fn default() -> HashSet<T, S> {
- HashSet { map: HashMap::default() }
+ HashSet {
+ map: HashMap::default(),
+ }
}
}
impl<'a, 'b, T, S> BitOr<&'b HashSet<T, S>> for &'a HashSet<T, S>
- where T: Eq + Hash + Clone,
- S: BuildHasher + Default
+where
+ T: Eq + Hash + Clone,
+ S: BuildHasher + Default,
{
type Output = HashSet<T, S>;
@@ -739,8 +771,9 @@ impl<'a, 'b, T, S> BitOr<&'b HashSet<T, S>> for &'a HashSet<T, S>
}
impl<'a, 'b, T, S> BitAnd<&'b HashSet<T, S>> for &'a HashSet<T, S>
- where T: Eq + Hash + Clone,
- S: BuildHasher + Default
+where
+ T: Eq + Hash + Clone,
+ S: BuildHasher + Default,
{
type Output = HashSet<T, S>;
@@ -770,8 +803,9 @@ impl<'a, 'b, T, S> BitAnd<&'b HashSet<T, S>> for &'a HashSet<T, S>
}
impl<'a, 'b, T, S> BitXor<&'b HashSet<T, S>> for &'a HashSet<T, S>
- where T: Eq + Hash + Clone,
- S: BuildHasher + Default
+where
+ T: Eq + Hash + Clone,
+ S: BuildHasher + Default,
{
type Output = HashSet<T, S>;
@@ -801,8 +835,9 @@ impl<'a, 'b, T, S> BitXor<&'b HashSet<T, S>> for &'a HashSet<T, S>
}
impl<'a, 'b, T, S> Sub<&'b HashSet<T, S>> for &'a HashSet<T, S>
- where T: Eq + Hash + Clone,
- S: BuildHasher + Default
+where
+ T: Eq + Hash + Clone,
+ S: BuildHasher + Default,
{
type Output = HashSet<T, S>;
@@ -915,8 +950,9 @@ pub struct Union<'a, T: 'a, S: 'a> {
}
impl<'a, T, S> IntoIterator for &'a HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
type Item = &'a T;
type IntoIter = Iter<'a, T>;
@@ -927,8 +963,9 @@ impl<'a, T, S> IntoIterator for &'a HashSet<T, S>
}
impl<T, S> IntoIterator for HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
type Item = T;
type IntoIter = IntoIter<T>;
@@ -954,13 +991,17 @@ impl<T, S> IntoIterator for HashSet<T, S>
/// }
/// ```
fn into_iter(self) -> IntoIter<T> {
- IntoIter { iter: self.map.into_iter() }
+ IntoIter {
+ iter: self.map.into_iter(),
+ }
}
}
impl<'a, K> Clone for Iter<'a, K> {
fn clone(&self) -> Iter<'a, K> {
- Iter { iter: self.iter.clone() }
+ Iter {
+ iter: self.iter.clone(),
+ }
}
}
impl<'a, K> Iterator for Iter<'a, K> {
@@ -1003,10 +1044,7 @@ impl<K> ExactSizeIterator for IntoIter<K> {
impl<K: fmt::Debug> fmt::Debug for IntoIter<K> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- let entries_iter = self.iter
- .inner
- .iter()
- .map(|(k, _)| k);
+ let entries_iter = self.iter.inner.iter().map(|(k, _)| k);
f.debug_list().entries(entries_iter).finish()
}
}
@@ -1029,23 +1067,24 @@ impl<'a, K> ExactSizeIterator for Drain<'a, K> {
impl<'a, K: fmt::Debug> fmt::Debug for Drain<'a, K> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- let entries_iter = self.iter
- .inner
- .iter()
- .map(|(k, _)| k);
+ let entries_iter = self.iter.inner.iter().map(|(k, _)| k);
f.debug_list().entries(entries_iter).finish()
}
}
impl<'a, T, S> Clone for Intersection<'a, T, S> {
fn clone(&self) -> Intersection<'a, T, S> {
- Intersection { iter: self.iter.clone(), ..*self }
+ Intersection {
+ iter: self.iter.clone(),
+ ..*self
+ }
}
}
impl<'a, T, S> Iterator for Intersection<'a, T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
type Item = &'a T;
@@ -1065,8 +1104,9 @@ impl<'a, T, S> Iterator for Intersection<'a, T, S>
}
impl<'a, T, S> fmt::Debug for Intersection<'a, T, S>
- where T: fmt::Debug + Eq + Hash,
- S: BuildHasher
+where
+ T: fmt::Debug + Eq + Hash,
+ S: BuildHasher,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_list().entries(self.clone()).finish()
@@ -1075,13 +1115,17 @@ impl<'a, T, S> fmt::Debug for Intersection<'a, T, S>
impl<'a, T, S> Clone for Difference<'a, T, S> {
fn clone(&self) -> Difference<'a, T, S> {
- Difference { iter: self.iter.clone(), ..*self }
+ Difference {
+ iter: self.iter.clone(),
+ ..*self
+ }
}
}
impl<'a, T, S> Iterator for Difference<'a, T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
type Item = &'a T;
@@ -1101,8 +1145,9 @@ impl<'a, T, S> Iterator for Difference<'a, T, S>
}
impl<'a, T, S> fmt::Debug for Difference<'a, T, S>
- where T: fmt::Debug + Eq + Hash,
- S: BuildHasher
+where
+ T: fmt::Debug + Eq + Hash,
+ S: BuildHasher,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_list().entries(self.clone()).finish()
@@ -1111,13 +1156,16 @@ impl<'a, T, S> fmt::Debug for Difference<'a, T, S>
impl<'a, T, S> Clone for SymmetricDifference<'a, T, S> {
fn clone(&self) -> SymmetricDifference<'a, T, S> {
- SymmetricDifference { iter: self.iter.clone() }
+ SymmetricDifference {
+ iter: self.iter.clone(),
+ }
}
}
impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
type Item = &'a T;
@@ -1130,8 +1178,9 @@ impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S>
}
impl<'a, T, S> fmt::Debug for SymmetricDifference<'a, T, S>
- where T: fmt::Debug + Eq + Hash,
- S: BuildHasher
+where
+ T: fmt::Debug + Eq + Hash,
+ S: BuildHasher,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_list().entries(self.clone()).finish()
@@ -1140,13 +1189,16 @@ impl<'a, T, S> fmt::Debug for SymmetricDifference<'a, T, S>
impl<'a, T, S> Clone for Union<'a, T, S> {
fn clone(&self) -> Union<'a, T, S> {
- Union { iter: self.iter.clone() }
+ Union {
+ iter: self.iter.clone(),
+ }
}
}
impl<'a, T, S> fmt::Debug for Union<'a, T, S>
- where T: fmt::Debug + Eq + Hash,
- S: BuildHasher
+where
+ T: fmt::Debug + Eq + Hash,
+ S: BuildHasher,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_list().entries(self.clone()).finish()
@@ -1154,8 +1206,9 @@ impl<'a, T, S> fmt::Debug for Union<'a, T, S>
}
impl<'a, T, S> Iterator for Union<'a, T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
type Item = &'a T;
@@ -1178,20 +1231,24 @@ fn assert_covariance() {
fn into_iter<'new>(v: IntoIter<&'static str>) -> IntoIter<&'new str> {
v
}
- fn difference<'a, 'new>(v: Difference<'a, &'static str, RandomState>)
- -> Difference<'a, &'new str, RandomState> {
+ fn difference<'a, 'new>(
+ v: Difference<'a, &'static str, RandomState>,
+ ) -> Difference<'a, &'new str, RandomState> {
v
}
- fn symmetric_difference<'a, 'new>(v: SymmetricDifference<'a, &'static str, RandomState>)
- -> SymmetricDifference<'a, &'new str, RandomState> {
+ fn symmetric_difference<'a, 'new>(
+ v: SymmetricDifference<'a, &'static str, RandomState>,
+ ) -> SymmetricDifference<'a, &'new str, RandomState> {
v
}
- fn intersection<'a, 'new>(v: Intersection<'a, &'static str, RandomState>)
- -> Intersection<'a, &'new str, RandomState> {
+ fn intersection<'a, 'new>(
+ v: Intersection<'a, &'static str, RandomState>,
+ ) -> Intersection<'a, &'new str, RandomState> {
v
}
- fn union<'a, 'new>(v: Union<'a, &'static str, RandomState>)
- -> Union<'a, &'new str, RandomState> {
+ fn union<'a, 'new>(
+ v: Union<'a, &'static str, RandomState>,
+ ) -> Union<'a, &'new str, RandomState> {
v
}
fn drain<'new>(d: Drain<'static, &'static str>) -> Drain<'new, &'new str> {
diff --git a/components/hashglobe/src/lib.rs b/components/hashglobe/src/lib.rs
index 49038a51859..cf6e9710f5f 100644
--- a/components/hashglobe/src/lib.rs
+++ b/components/hashglobe/src/lib.rs
@@ -44,7 +44,10 @@ pub struct FailedAllocationError {
impl FailedAllocationError {
#[inline]
pub fn new(reason: &'static str) -> Self {
- Self { reason, allocation_info: None }
+ Self {
+ reason,
+ allocation_info: None,
+ }
}
}
@@ -57,9 +60,11 @@ impl error::Error for FailedAllocationError {
impl fmt::Display for FailedAllocationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self.allocation_info {
- Some(ref info) => {
- write!(f, "{}, allocation: (size: {}, alignment: {})", self.reason, info.size, info.alignment)
- },
+ Some(ref info) => write!(
+ f,
+ "{}, allocation: (size: {}, alignment: {})",
+ self.reason, info.size, info.alignment
+ ),
None => self.reason.fmt(f),
}
}
diff --git a/components/hashglobe/src/shim.rs b/components/hashglobe/src/shim.rs
index 146ff851a0e..855dbdcfa15 100644
--- a/components/hashglobe/src/shim.rs
+++ b/components/hashglobe/src/shim.rs
@@ -29,11 +29,11 @@ impl<T: 'static> Unique<T> {
}
}
-unsafe impl<T: Send + 'static> Send for Unique<T> { }
+unsafe impl<T: Send + 'static> Send for Unique<T> {}
-unsafe impl<T: Sync + 'static> Sync for Unique<T> { }
+unsafe impl<T: Sync + 'static> Sync for Unique<T> {}
-pub struct Shared<T: 'static> {
+pub struct Shared<T: 'static> {
ptr: NonZeroPtr<T>,
_marker: PhantomData<T>,
// force it to be !Send/!Sync
diff --git a/components/hashglobe/src/table.rs b/components/hashglobe/src/table.rs
index bd801b43544..0b8b49001e2 100644
--- a/components/hashglobe/src/table.rs
+++ b/components/hashglobe/src/table.rs
@@ -203,7 +203,9 @@ impl SafeHash {
//
// Truncate hash to fit in `HashUint`.
let hash_bits = size_of::<HashUint>() * 8;
- SafeHash { hash: (1 << (hash_bits - 1)) | (hash as HashUint) }
+ SafeHash {
+ hash: (1 << (hash_bits - 1)) | (hash as HashUint),
+ }
}
}
@@ -211,8 +213,9 @@ impl SafeHash {
/// This function wraps up `hash_keyed` to be the only way outside this
/// module to generate a SafeHash.
pub fn make_hash<T: ?Sized, S>(hash_state: &S, t: &T) -> SafeHash
- where T: Hash,
- S: BuildHasher
+where
+ T: Hash,
+ S: BuildHasher,
{
let mut state = hash_state.build_hasher();
t.hash(&mut state);
@@ -294,7 +297,8 @@ impl<K, V, M> Bucket<K, V, M> {
}
impl<K, V, M> Deref for FullBucket<K, V, M>
- where M: Deref<Target = RawTable<K, V>>
+where
+ M: Deref<Target = RawTable<K, V>>,
{
type Target = RawTable<K, V>;
fn deref(&self) -> &RawTable<K, V> {
@@ -308,7 +312,6 @@ pub trait Put<K, V> {
unsafe fn borrow_table_mut(&mut self) -> &mut RawTable<K, V>;
}
-
impl<'t, K, V> Put<K, V> for &'t mut RawTable<K, V> {
unsafe fn borrow_table_mut(&mut self) -> &mut RawTable<K, V> {
*self
@@ -316,7 +319,8 @@ impl<'t, K, V> Put<K, V> for &'t mut RawTable<K, V> {
}
impl<K, V, M> Put<K, V> for Bucket<K, V, M>
- where M: Put<K, V>
+where
+ M: Put<K, V>,
{
unsafe fn borrow_table_mut(&mut self) -> &mut RawTable<K, V> {
self.table.borrow_table_mut()
@@ -324,7 +328,8 @@ impl<K, V, M> Put<K, V> for Bucket<K, V, M>
}
impl<K, V, M> Put<K, V> for FullBucket<K, V, M>
- where M: Put<K, V>
+where
+ M: Put<K, V>,
{
unsafe fn borrow_table_mut(&mut self) -> &mut RawTable<K, V> {
self.table.borrow_table_mut()
@@ -336,20 +341,17 @@ impl<K, V, M: Deref<Target = RawTable<K, V>>> Bucket<K, V, M> {
Bucket::at_index(table, hash.inspect() as usize)
}
- pub fn new_from(r: RawBucket<K, V>, t: M)
- -> Bucket<K, V, M>
- {
- Bucket {
- raw: r,
- table: t,
- }
+ pub fn new_from(r: RawBucket<K, V>, t: M) -> Bucket<K, V, M> {
+ Bucket { raw: r, table: t }
}
pub fn at_index(table: M, ib_index: usize) -> Bucket<K, V, M> {
// if capacity is 0, then the RawBucket will be populated with bogus pointers.
// This is an uncommon case though, so avoid it in release builds.
- debug_assert!(table.capacity() > 0,
- "Table should have capacity at this point");
+ debug_assert!(
+ table.capacity() > 0,
+ "Table should have capacity at this point"
+ );
let ib_index = ib_index & table.capacity_mask;
Bucket {
raw: table.raw_bucket_at(ib_index),
@@ -387,11 +389,11 @@ impl<K, V, M: Deref<Target = RawTable<K, V>>> Bucket<K, V, M> {
}
// Leaving this bucket in the last cluster for later.
full.into_bucket()
- }
+ },
Empty(b) => {
// Encountered a hole between clusters.
b.into_bucket()
- }
+ },
};
bucket.next();
}
@@ -404,18 +406,14 @@ impl<K, V, M: Deref<Target = RawTable<K, V>>> Bucket<K, V, M> {
/// this module.
pub fn peek(self) -> BucketState<K, V, M> {
match unsafe { *self.raw.hash() } {
- EMPTY_BUCKET => {
- Empty(EmptyBucket {
- raw: self.raw,
- table: self.table,
- })
- }
- _ => {
- Full(FullBucket {
- raw: self.raw,
- table: self.table,
- })
- }
+ EMPTY_BUCKET => Empty(EmptyBucket {
+ raw: self.raw,
+ table: self.table,
+ }),
+ _ => Full(FullBucket {
+ raw: self.raw,
+ table: self.table,
+ }),
}
}
@@ -453,19 +451,15 @@ impl<K, V, M: Deref<Target = RawTable<K, V>>> EmptyBucket<K, V, M> {
};
match self.next().peek() {
- Full(bucket) => {
- Ok(GapThenFull {
- gap,
- full: bucket,
- })
- }
+ Full(bucket) => Ok(GapThenFull { gap, full: bucket }),
Empty(e) => Err(e.into_bucket()),
}
}
}
impl<K, V, M> EmptyBucket<K, V, M>
- where M: Put<K, V>
+where
+ M: Put<K, V>,
{
/// Puts given key and value pair, along with the key's hash,
/// into this bucket in the hashtable. Note how `self` is 'moved' into
@@ -528,7 +522,11 @@ impl<K, V, M: Deref<Target = RawTable<K, V>>> FullBucket<K, V, M> {
#[inline]
pub fn hash(&self) -> SafeHash {
- unsafe { SafeHash { hash: *self.raw.hash() } }
+ unsafe {
+ SafeHash {
+ hash: *self.raw.hash(),
+ }
+ }
}
/// Gets references to the key and value at a given index.
@@ -554,12 +552,14 @@ impl<'t, K, V> FullBucket<K, V, &'t mut RawTable<K, V>> {
unsafe {
*self.raw.hash() = EMPTY_BUCKET;
let (k, v) = ptr::read(self.raw.pair());
- (EmptyBucket {
- raw: self.raw,
- table: self.table,
- },
- k,
- v)
+ (
+ EmptyBucket {
+ raw: self.raw,
+ table: self.table,
+ },
+ k,
+ v,
+ )
}
}
}
@@ -567,7 +567,8 @@ impl<'t, K, V> FullBucket<K, V, &'t mut RawTable<K, V>> {
// This use of `Put` is misleading and restrictive, but safe and sufficient for our use cases
// where `M` is a full bucket or table reference type with mutable access to the table.
impl<K, V, M> FullBucket<K, V, M>
- where M: Put<K, V>
+where
+ M: Put<K, V>,
{
pub fn replace(&mut self, h: SafeHash, k: K, v: V) -> (SafeHash, K, V) {
unsafe {
@@ -580,7 +581,8 @@ impl<K, V, M> FullBucket<K, V, M>
}
impl<K, V, M> FullBucket<K, V, M>
- where M: Deref<Target = RawTable<K, V>> + DerefMut
+where
+ M: Deref<Target = RawTable<K, V>> + DerefMut,
{
/// Gets mutable references to the key and value at a given index.
pub fn read_mut(&mut self) -> (&mut K, &mut V) {
@@ -592,7 +594,8 @@ impl<K, V, M> FullBucket<K, V, M>
}
impl<'t, K, V, M> FullBucket<K, V, M>
- where M: Deref<Target = RawTable<K, V>> + 't
+where
+ M: Deref<Target = RawTable<K, V>> + 't,
{
/// Exchange a bucket state for immutable references into the table.
/// Because the underlying reference to the table is also consumed,
@@ -608,7 +611,8 @@ impl<'t, K, V, M> FullBucket<K, V, M>
}
impl<'t, K, V, M> FullBucket<K, V, M>
- where M: Deref<Target = RawTable<K, V>> + DerefMut + 't
+where
+ M: Deref<Target = RawTable<K, V>> + DerefMut + 't,
{
/// This works similarly to `into_refs`, exchanging a bucket state
/// for mutable references into the table.
@@ -621,7 +625,8 @@ impl<'t, K, V, M> FullBucket<K, V, M>
}
impl<K, V, M> GapThenFull<K, V, M>
- where M: Deref<Target = RawTable<K, V>>
+where
+ M: Deref<Target = RawTable<K, V>>,
{
#[inline]
pub fn full(&self) -> &FullBucket<K, V, M> {
@@ -649,13 +654,12 @@ impl<K, V, M> GapThenFull<K, V, M>
self.full = bucket;
Ok(self)
- }
+ },
Empty(b) => Err(b.into_bucket()),
}
}
}
-
/// Rounds up to a multiple of a power of two. Returns the closest multiple
/// of `target_alignment` that is higher or equal to `unrounded`.
///
@@ -681,10 +685,11 @@ fn test_rounding() {
// Returns a tuple of (pairs_offset, end_of_pairs_offset),
// from the start of a mallocated array.
#[inline]
-fn calculate_offsets(hashes_size: usize,
- pairs_size: usize,
- pairs_align: usize)
- -> (usize, usize, bool) {
+fn calculate_offsets(
+ hashes_size: usize,
+ pairs_size: usize,
+ pairs_align: usize,
+) -> (usize, usize, bool) {
let pairs_offset = round_up_to_next(hashes_size, pairs_align);
let (end_of_pairs, oflo) = pairs_offset.overflowing_add(pairs_size);
@@ -693,11 +698,12 @@ fn calculate_offsets(hashes_size: usize,
// Returns a tuple of (minimum required malloc alignment, hash_offset,
// array_size), from the start of a mallocated array.
-fn calculate_allocation(hash_size: usize,
- hash_align: usize,
- pairs_size: usize,
- pairs_align: usize)
- -> (usize, usize, usize, bool) {
+fn calculate_allocation(
+ hash_size: usize,
+ hash_align: usize,
+ pairs_size: usize,
+ pairs_align: usize,
+) -> (usize, usize, usize, bool) {
let hash_offset = 0;
let (_, end_of_pairs, oflo) = calculate_offsets(hash_size, pairs_size, pairs_align);
@@ -728,7 +734,9 @@ impl<K, V> RawTable<K, V> {
/// Does not initialize the buckets. The caller should ensure they,
/// at the very least, set every hash to EMPTY_BUCKET.
- unsafe fn try_new_uninitialized(capacity: usize) -> Result<RawTable<K, V>, FailedAllocationError> {
+ unsafe fn try_new_uninitialized(
+ capacity: usize,
+ ) -> Result<RawTable<K, V>, FailedAllocationError> {
if capacity == 0 {
return Ok(RawTable {
size: 0,
@@ -751,29 +759,38 @@ impl<K, V> RawTable<K, V> {
// This is great in theory, but in practice getting the alignment
// right is a little subtle. Therefore, calculating offsets has been
// factored out into a different function.
- let (alignment, hash_offset, size, oflo) = calculate_allocation(hashes_size,
- align_of::<HashUint>(),
- pairs_size,
- align_of::<(K, V)>());
+ let (alignment, hash_offset, size, oflo) = calculate_allocation(
+ hashes_size,
+ align_of::<HashUint>(),
+ pairs_size,
+ align_of::<(K, V)>(),
+ );
if oflo {
- return Err(FailedAllocationError::new("capacity overflow when allocating RawTable" ));
+ return Err(FailedAllocationError::new(
+ "capacity overflow when allocating RawTable",
+ ));
}
// One check for overflow that covers calculation and rounding of size.
- let size_of_bucket = size_of::<HashUint>().checked_add(size_of::<(K, V)>()).unwrap();
+ let size_of_bucket = size_of::<HashUint>()
+ .checked_add(size_of::<(K, V)>())
+ .unwrap();
let cap_bytes = capacity.checked_mul(size_of_bucket);
if let Some(cap_bytes) = cap_bytes {
if size < cap_bytes {
- return Err(FailedAllocationError::new("capacity overflow when allocating RawTable"));
+ return Err(FailedAllocationError::new(
+ "capacity overflow when allocating RawTable",
+ ));
}
} else {
- return Err(FailedAllocationError::new("capacity overflow when allocating RawTable"));
+ return Err(FailedAllocationError::new(
+ "capacity overflow when allocating RawTable",
+ ));
}
-
// FORK NOTE: Uses alloc shim instead of Heap.alloc
let buffer = alloc(size, alignment);
@@ -857,7 +874,9 @@ impl<K, V> RawTable<K, V> {
}
pub fn into_iter(self) -> IntoIter<K, V> {
- let RawBuckets { raw, elems_left, .. } = self.raw_buckets();
+ let RawBuckets {
+ raw, elems_left, ..
+ } = self.raw_buckets();
// Replace the marker regardless of lifetime bounds on parameters.
IntoIter {
iter: RawBuckets {
@@ -870,7 +889,9 @@ impl<K, V> RawTable<K, V> {
}
pub fn drain(&mut self) -> Drain<K, V> {
- let RawBuckets { raw, elems_left, .. } = self.raw_buckets();
+ let RawBuckets {
+ raw, elems_left, ..
+ } = self.raw_buckets();
// Replace the marker regardless of lifetime bounds on parameters.
Drain {
iter: RawBuckets {
@@ -937,7 +958,6 @@ impl<'a, K, V> Clone for RawBuckets<'a, K, V> {
}
}
-
impl<'a, K, V> Iterator for RawBuckets<'a, K, V> {
type Item = RawBucket<K, V>;
@@ -1112,12 +1132,16 @@ impl<'a, K, V> Iterator for Drain<'a, K, V> {
#[inline]
fn next(&mut self) -> Option<(SafeHash, K, V)> {
- self.iter.next().map(|raw| {
- unsafe {
- self.table.as_mut().size -= 1;
- let (k, v) = ptr::read(raw.pair());
- (SafeHash { hash: ptr::replace(&mut *raw.hash(), EMPTY_BUCKET) }, k, v)
- }
+ self.iter.next().map(|raw| unsafe {
+ self.table.as_mut().size -= 1;
+ let (k, v) = ptr::read(raw.pair());
+ (
+ SafeHash {
+ hash: ptr::replace(&mut *raw.hash(), EMPTY_BUCKET),
+ },
+ k,
+ v,
+ )
})
}
@@ -1181,17 +1205,19 @@ impl<K, V> Drop for RawTable<K, V> {
unsafe {
// FORK NOTE: Can't needs_drop on stable
// if needs_drop::<(K, V)>() {
- // avoid linear runtime for types that don't need drop
- self.rev_drop_buckets();
+ // avoid linear runtime for types that don't need drop
+ self.rev_drop_buckets();
// }
}
let hashes_size = self.capacity() * size_of::<HashUint>();
let pairs_size = self.capacity() * size_of::<(K, V)>();
- let (align, _, _, oflo) = calculate_allocation(hashes_size,
- align_of::<HashUint>(),
- pairs_size,
- align_of::<(K, V)>());
+ let (align, _, _, oflo) = calculate_allocation(
+ hashes_size,
+ align_of::<HashUint>(),
+ pairs_size,
+ align_of::<(K, V)>(),
+ );
debug_assert!(!oflo, "should be impossible");
diff --git a/components/jstraceable_derive/lib.rs b/components/jstraceable_derive/lib.rs
index a780a6e2167..ac793f4d85a 100644
--- a/components/jstraceable_derive/lib.rs
+++ b/components/jstraceable_derive/lib.rs
@@ -3,15 +3,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
extern crate quote;
-#[macro_use] extern crate syn;
-#[macro_use] extern crate synstructure;
+#[macro_use]
+extern crate syn;
+#[macro_use]
+extern crate synstructure;
decl_derive!([JSTraceable] => js_traceable_derive);
fn js_traceable_derive(s: synstructure::Structure) -> quote::Tokens {
- let match_body = s.each(|binding| {
- Some(quote!(#binding.trace(tracer);))
- });
+ let match_body = s.each(|binding| Some(quote!(#binding.trace(tracer);)));
let ast = s.ast();
let name = ast.ident;
@@ -19,7 +19,9 @@ fn js_traceable_derive(s: synstructure::Structure) -> quote::Tokens {
let mut where_clause = where_clause.unwrap_or(&parse_quote!(where)).clone();
for param in ast.generics.type_params() {
let ident = param.ident;
- where_clause.predicates.push(parse_quote!(#ident: ::dom::bindings::trace::JSTraceable))
+ where_clause
+ .predicates
+ .push(parse_quote!(#ident: ::dom::bindings::trace::JSTraceable))
}
let tokens = quote! {
diff --git a/components/layout/animation.rs b/components/layout/animation.rs
index 3a09094b2a9..d8b305644c0 100644
--- a/components/layout/animation.rs
+++ b/components/layout/animation.rs
@@ -32,8 +32,7 @@ pub fn update_animation_state<E>(
new_animations_receiver: &Receiver<Animation>,
pipeline_id: PipelineId,
timer: &Timer,
-)
-where
+) where
E: TElement,
{
let mut new_running_animations = vec![];
@@ -66,7 +65,7 @@ where
if running_animations.is_empty() && new_running_animations.is_empty() {
// Nothing to do. Return early so we don't flood the compositor with
// `ChangeRunningAnimationsState` messages.
- return
+ return;
}
let now = timer.seconds();
@@ -82,30 +81,32 @@ where
let still_running = !running_animation.is_expired() && match running_animation {
Animation::Transition(_, started_at, ref frame, _expired) => {
now < started_at + frame.duration
- }
+ },
Animation::Keyframes(_, _, _, ref mut state) => {
// This animation is still running, or we need to keep
// iterating.
now < state.started_at + state.duration || state.tick()
- }
+ },
};
if still_running {
animations_still_running.push(running_animation);
- continue
+ continue;
}
if let Animation::Transition(node, _, ref frame, _) = running_animation {
- script_chan.send(ConstellationControlMsg::TransitionEnd(node.to_untrusted_node_address(),
- frame.property_animation
- .property_name().into(),
- frame.duration))
- .unwrap();
+ script_chan
+ .send(ConstellationControlMsg::TransitionEnd(
+ node.to_untrusted_node_address(),
+ frame.property_animation.property_name().into(),
+ frame.duration,
+ )).unwrap();
}
- expired_animations.entry(*key)
- .or_insert_with(Vec::new)
- .push(running_animation);
+ expired_animations
+ .entry(*key)
+ .or_insert_with(Vec::new)
+ .push(running_animation);
}
if animations_still_running.is_empty() {
@@ -125,16 +126,17 @@ where
match newly_transitioning_nodes {
Some(ref mut nodes) => {
nodes.push(new_running_animation.node().to_untrusted_node_address());
- }
+ },
None => {
warn!("New transition encountered from compositor-initiated layout.");
- }
+ },
}
}
- running_animations.entry(*new_running_animation.node())
- .or_insert_with(Vec::new)
- .push(new_running_animation)
+ running_animations
+ .entry(*new_running_animation.node())
+ .or_insert_with(Vec::new)
+ .push(new_running_animation)
}
let animation_state = if running_animations.is_empty() {
@@ -143,9 +145,11 @@ where
AnimationState::AnimationsPresent
};
- constellation_chan.send(ConstellationMsg::ChangeRunningAnimationsState(pipeline_id,
- animation_state))
- .unwrap();
+ constellation_chan
+ .send(ConstellationMsg::ChangeRunningAnimationsState(
+ pipeline_id,
+ animation_state,
+ )).unwrap();
}
/// Recalculates style for a set of animations. This does *not* run with the DOM
@@ -154,8 +158,7 @@ pub fn recalc_style_for_animations<E>(
context: &LayoutContext,
flow: &mut Flow,
animations: &FxHashMap<OpaqueNode, Vec<Animation>>,
-)
-where
+) where
E: TElement,
{
let mut damage = RestyleDamage::empty();
@@ -170,10 +173,7 @@ where
&ServoMetricsProvider,
);
let difference =
- RestyleDamage::compute_style_difference(
- &old_style,
- &fragment.style,
- );
+ RestyleDamage::compute_style_difference(&old_style, &fragment.style);
damage |= difference.damage;
}
}
diff --git a/components/layout/block.rs b/components/layout/block.rs
index 00759909063..ae1bc242e32 100644
--- a/components/layout/block.rs
+++ b/components/layout/block.rs
@@ -93,15 +93,16 @@ struct BSizeConstraintSolution {
block_start: Au,
block_size: Au,
margin_block_start: Au,
- margin_block_end: Au
+ margin_block_end: Au,
}
impl BSizeConstraintSolution {
- fn new(block_start: Au,
- block_size: Au,
- margin_block_start: Au,
- margin_block_end: Au)
- -> BSizeConstraintSolution {
+ fn new(
+ block_start: Au,
+ block_size: Au,
+ margin_block_start: Au,
+ margin_block_end: Au,
+ ) -> BSizeConstraintSolution {
BSizeConstraintSolution {
block_start: block_start,
block_size: block_size,
@@ -119,14 +120,15 @@ impl BSizeConstraintSolution {
/// [aka available_block-size]
///
/// Return the solution for the equation.
- fn solve_vertical_constraints_abs_nonreplaced(block_size: MaybeAuto,
- block_start_margin: MaybeAuto,
- block_end_margin: MaybeAuto,
- block_start: MaybeAuto,
- block_end: MaybeAuto,
- content_block_size: Au,
- available_block_size: Au)
- -> BSizeConstraintSolution {
+ fn solve_vertical_constraints_abs_nonreplaced(
+ block_size: MaybeAuto,
+ block_start_margin: MaybeAuto,
+ block_end_margin: MaybeAuto,
+ block_start: MaybeAuto,
+ block_end: MaybeAuto,
+ content_block_size: Au,
+ available_block_size: Au,
+ ) -> BSizeConstraintSolution {
let (block_start, block_size, margin_block_start, margin_block_end) =
match (block_start, block_end, block_size) {
(MaybeAuto::Auto, MaybeAuto::Auto, MaybeAuto::Auto) => {
@@ -137,64 +139,103 @@ impl BSizeConstraintSolution {
let block_size = content_block_size;
// Use a dummy value for `block_start`, since it has the static position.
(Au(0), block_size, margin_block_start, margin_block_end)
- }
- (MaybeAuto::Specified(block_start),
- MaybeAuto::Specified(block_end),
- MaybeAuto::Specified(block_size)) => {
+ },
+ (
+ MaybeAuto::Specified(block_start),
+ MaybeAuto::Specified(block_end),
+ MaybeAuto::Specified(block_size),
+ ) => {
match (block_start_margin, block_end_margin) {
(MaybeAuto::Auto, MaybeAuto::Auto) => {
let total_margin_val =
available_block_size - block_start - block_end - block_size;
- (block_start,
- block_size,
- total_margin_val.scale_by(0.5),
- total_margin_val.scale_by(0.5))
- }
+ (
+ block_start,
+ block_size,
+ total_margin_val.scale_by(0.5),
+ total_margin_val.scale_by(0.5),
+ )
+ },
(MaybeAuto::Specified(margin_block_start), MaybeAuto::Auto) => {
let sum = block_start + block_end + block_size + margin_block_start;
- (block_start,
- block_size,
- margin_block_start,
- available_block_size - sum)
- }
+ (
+ block_start,
+ block_size,
+ margin_block_start,
+ available_block_size - sum,
+ )
+ },
(MaybeAuto::Auto, MaybeAuto::Specified(margin_block_end)) => {
let sum = block_start + block_end + block_size + margin_block_end;
- (block_start, block_size, available_block_size - sum, margin_block_end)
- }
- (MaybeAuto::Specified(margin_block_start),
- MaybeAuto::Specified(margin_block_end)) => {
+ (
+ block_start,
+ block_size,
+ available_block_size - sum,
+ margin_block_end,
+ )
+ },
+ (
+ MaybeAuto::Specified(margin_block_start),
+ MaybeAuto::Specified(margin_block_end),
+ ) => {
// Values are over-constrained. Ignore value for 'block-end'.
- (block_start, block_size, margin_block_start, margin_block_end)
- }
+ (
+ block_start,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
+ },
}
- }
+ },
// For the rest of the cases, auto values for margin are set to 0
// If only one is Auto, solve for it
- (MaybeAuto::Auto,
- MaybeAuto::Specified(block_end),
- MaybeAuto::Specified(block_size)) => {
+ (
+ MaybeAuto::Auto,
+ MaybeAuto::Specified(block_end),
+ MaybeAuto::Specified(block_size),
+ ) => {
let margin_block_start = block_start_margin.specified_or_zero();
let margin_block_end = block_end_margin.specified_or_zero();
let sum = block_end + block_size + margin_block_start + margin_block_end;
- (available_block_size - sum, block_size, margin_block_start, margin_block_end)
- }
- (MaybeAuto::Specified(block_start),
- MaybeAuto::Auto,
- MaybeAuto::Specified(block_size)) => {
+ (
+ available_block_size - sum,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
+ },
+ (
+ MaybeAuto::Specified(block_start),
+ MaybeAuto::Auto,
+ MaybeAuto::Specified(block_size),
+ ) => {
let margin_block_start = block_start_margin.specified_or_zero();
let margin_block_end = block_end_margin.specified_or_zero();
- (block_start, block_size, margin_block_start, margin_block_end)
- }
- (MaybeAuto::Specified(block_start),
- MaybeAuto::Specified(block_end),
- MaybeAuto::Auto) => {
+ (
+ block_start,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
+ },
+ (
+ MaybeAuto::Specified(block_start),
+ MaybeAuto::Specified(block_end),
+ MaybeAuto::Auto,
+ ) => {
let margin_block_start = block_start_margin.specified_or_zero();
let margin_block_end = block_end_margin.specified_or_zero();
let sum = block_start + block_end + margin_block_start + margin_block_end;
- (block_start, available_block_size - sum, margin_block_start, margin_block_end)
- }
+ (
+ block_start,
+ available_block_size - sum,
+ margin_block_start,
+ margin_block_end,
+ )
+ },
// If block-size is auto, then block-size is content block-size. Solve for the
// non-auto value.
@@ -202,25 +243,40 @@ impl BSizeConstraintSolution {
let margin_block_start = block_start_margin.specified_or_zero();
let margin_block_end = block_end_margin.specified_or_zero();
let block_size = content_block_size;
- (block_start, block_size, margin_block_start, margin_block_end)
- }
+ (
+ block_start,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
+ },
(MaybeAuto::Auto, MaybeAuto::Specified(block_end), MaybeAuto::Auto) => {
let margin_block_start = block_start_margin.specified_or_zero();
let margin_block_end = block_end_margin.specified_or_zero();
let block_size = content_block_size;
let sum = block_end + block_size + margin_block_start + margin_block_end;
- (available_block_size - sum, block_size, margin_block_start, margin_block_end)
- }
+ (
+ available_block_size - sum,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
+ },
(MaybeAuto::Auto, MaybeAuto::Auto, MaybeAuto::Specified(block_size)) => {
let margin_block_start = block_start_margin.specified_or_zero();
let margin_block_end = block_end_margin.specified_or_zero();
// Use a dummy value for `block_start`, since it has the static position.
(Au(0), block_size, margin_block_start, margin_block_end)
- }
+ },
};
- BSizeConstraintSolution::new(block_start, block_size, margin_block_start, margin_block_end)
+ BSizeConstraintSolution::new(
+ block_start,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
}
/// Solve the vertical constraint equation for absolute replaced elements.
@@ -234,14 +290,15 @@ impl BSizeConstraintSolution {
/// [aka available block-size]
///
/// Return the solution for the equation.
- fn solve_vertical_constraints_abs_replaced(block_size: Au,
- block_start_margin: MaybeAuto,
- block_end_margin: MaybeAuto,
- block_start: MaybeAuto,
- block_end: MaybeAuto,
- _: Au,
- available_block_size: Au)
- -> BSizeConstraintSolution {
+ fn solve_vertical_constraints_abs_replaced(
+ block_size: Au,
+ block_start_margin: MaybeAuto,
+ block_end_margin: MaybeAuto,
+ block_start: MaybeAuto,
+ block_end: MaybeAuto,
+ _: Au,
+ available_block_size: Au,
+ ) -> BSizeConstraintSolution {
let (block_start, block_size, margin_block_start, margin_block_end) =
match (block_start, block_end) {
(MaybeAuto::Auto, MaybeAuto::Auto) => {
@@ -249,50 +306,81 @@ impl BSizeConstraintSolution {
let margin_block_end = block_end_margin.specified_or_zero();
// Use a dummy value for `block_start`, since it has the static position.
(Au(0), block_size, margin_block_start, margin_block_end)
- }
+ },
(MaybeAuto::Specified(block_start), MaybeAuto::Specified(block_end)) => {
match (block_start_margin, block_end_margin) {
(MaybeAuto::Auto, MaybeAuto::Auto) => {
- let total_margin_val = available_block_size - block_start - block_end -
- block_size;
- (block_start,
- block_size,
- total_margin_val.scale_by(0.5),
- total_margin_val.scale_by(0.5))
- }
+ let total_margin_val =
+ available_block_size - block_start - block_end - block_size;
+ (
+ block_start,
+ block_size,
+ total_margin_val.scale_by(0.5),
+ total_margin_val.scale_by(0.5),
+ )
+ },
(MaybeAuto::Specified(margin_block_start), MaybeAuto::Auto) => {
let sum = block_start + block_end + block_size + margin_block_start;
- (block_start,
- block_size,
- margin_block_start,
- available_block_size - sum)
- }
+ (
+ block_start,
+ block_size,
+ margin_block_start,
+ available_block_size - sum,
+ )
+ },
(MaybeAuto::Auto, MaybeAuto::Specified(margin_block_end)) => {
let sum = block_start + block_end + block_size + margin_block_end;
- (block_start, block_size, available_block_size - sum, margin_block_end)
- }
- (MaybeAuto::Specified(margin_block_start),
- MaybeAuto::Specified(margin_block_end)) => {
+ (
+ block_start,
+ block_size,
+ available_block_size - sum,
+ margin_block_end,
+ )
+ },
+ (
+ MaybeAuto::Specified(margin_block_start),
+ MaybeAuto::Specified(margin_block_end),
+ ) => {
// Values are over-constrained. Ignore value for 'block-end'.
- (block_start, block_size, margin_block_start, margin_block_end)
- }
+ (
+ block_start,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
+ },
}
- }
+ },
// If only one is Auto, solve for it
(MaybeAuto::Auto, MaybeAuto::Specified(block_end)) => {
let margin_block_start = block_start_margin.specified_or_zero();
let margin_block_end = block_end_margin.specified_or_zero();
let sum = block_end + block_size + margin_block_start + margin_block_end;
- (available_block_size - sum, block_size, margin_block_start, margin_block_end)
- }
+ (
+ available_block_size - sum,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
+ },
(MaybeAuto::Specified(block_start), MaybeAuto::Auto) => {
let margin_block_start = block_start_margin.specified_or_zero();
let margin_block_end = block_end_margin.specified_or_zero();
- (block_start, block_size, margin_block_start, margin_block_end)
- }
+ (
+ block_start,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
+ },
};
- BSizeConstraintSolution::new(block_start, block_size, margin_block_start, margin_block_end)
+ BSizeConstraintSolution::new(
+ block_start,
+ block_size,
+ margin_block_start,
+ margin_block_end,
+ )
}
}
@@ -314,21 +402,26 @@ impl CandidateBSizeIterator {
/// Creates a new candidate block-size iterator. `block_container_block-size` is `None` if the block-size
/// of the block container has not been determined yet. It will always be `Some` in the case of
/// absolutely-positioned containing blocks.
- pub fn new(fragment: &Fragment, block_container_block_size: Option<Au>)
- -> CandidateBSizeIterator {
+ pub fn new(
+ fragment: &Fragment,
+ block_container_block_size: Option<Au>,
+ ) -> CandidateBSizeIterator {
// Per CSS 2.1 § 10.7, (assuming an horizontal writing mode,)
// percentages in `min-height` and `max-height` refer to the height of
// the containing block.
// If that is not determined yet by the time we need to resolve
// `min-height` and `max-height`, percentage values are ignored.
- let block_size = match (fragment.style.content_block_size(), block_container_block_size) {
+ let block_size = match (
+ fragment.style.content_block_size(),
+ block_container_block_size,
+ ) {
(LengthOrPercentageOrAuto::Percentage(percent), Some(block_container_block_size)) => {
MaybeAuto::Specified(block_container_block_size.scale_by(percent.0))
- }
+ },
(LengthOrPercentageOrAuto::Calc(calc), _) => {
MaybeAuto::from_option(calc.to_used_value(block_container_block_size))
- }
+ },
(LengthOrPercentageOrAuto::Percentage(_), None) |
(LengthOrPercentageOrAuto::Auto, _) => MaybeAuto::Auto,
(LengthOrPercentageOrAuto::Length(length), _) => MaybeAuto::Specified(Au::from(length)),
@@ -336,10 +429,10 @@ impl CandidateBSizeIterator {
let max_block_size = match (fragment.style.max_block_size(), block_container_block_size) {
(LengthOrPercentageOrNone::Percentage(percent), Some(block_container_block_size)) => {
Some(block_container_block_size.scale_by(percent.0))
- }
+ },
(LengthOrPercentageOrNone::Calc(calc), _) => {
calc.to_used_value(block_container_block_size)
- }
+ },
(LengthOrPercentageOrNone::Percentage(_), None) |
(LengthOrPercentageOrNone::None, _) => None,
(LengthOrPercentageOrNone::Length(length), _) => Some(Au::from(length)),
@@ -347,10 +440,10 @@ impl CandidateBSizeIterator {
let min_block_size = match (fragment.style.min_block_size(), block_container_block_size) {
(LengthOrPercentage::Percentage(percent), Some(block_container_block_size)) => {
block_container_block_size.scale_by(percent.0)
- }
- (LengthOrPercentage::Calc(calc), _) => {
- calc.to_used_value(block_container_block_size).unwrap_or(Au(0))
- }
+ },
+ (LengthOrPercentage::Calc(calc), _) => calc
+ .to_used_value(block_container_block_size)
+ .unwrap_or(Au(0)),
(LengthOrPercentage::Percentage(_), None) => Au(0),
(LengthOrPercentage::Length(length), _) => Au::from(length),
};
@@ -380,37 +473,35 @@ impl Iterator for CandidateBSizeIterator {
fn next(&mut self) -> Option<MaybeAuto> {
self.status = match self.status {
CandidateBSizeIteratorStatus::Initial => CandidateBSizeIteratorStatus::Trying,
- CandidateBSizeIteratorStatus::Trying => {
- match self.max_block_size {
- Some(max_block_size) if self.candidate_value > max_block_size => {
- CandidateBSizeIteratorStatus::TryingMax
- }
- _ if self.candidate_value < self.min_block_size => {
- CandidateBSizeIteratorStatus::TryingMin
- }
- _ => CandidateBSizeIteratorStatus::Found,
- }
- }
+ CandidateBSizeIteratorStatus::Trying => match self.max_block_size {
+ Some(max_block_size) if self.candidate_value > max_block_size => {
+ CandidateBSizeIteratorStatus::TryingMax
+ },
+ _ if self.candidate_value < self.min_block_size => {
+ CandidateBSizeIteratorStatus::TryingMin
+ },
+ _ => CandidateBSizeIteratorStatus::Found,
+ },
CandidateBSizeIteratorStatus::TryingMax => {
if self.candidate_value < self.min_block_size {
CandidateBSizeIteratorStatus::TryingMin
} else {
CandidateBSizeIteratorStatus::Found
}
- }
+ },
CandidateBSizeIteratorStatus::TryingMin | CandidateBSizeIteratorStatus::Found => {
CandidateBSizeIteratorStatus::Found
- }
+ },
};
match self.status {
CandidateBSizeIteratorStatus::Trying => Some(self.block_size),
CandidateBSizeIteratorStatus::TryingMax => {
Some(MaybeAuto::Specified(self.max_block_size.unwrap()))
- }
+ },
CandidateBSizeIteratorStatus::TryingMin => {
Some(MaybeAuto::Specified(self.min_block_size))
- }
+ },
CandidateBSizeIteratorStatus::Found => None,
CandidateBSizeIteratorStatus::Initial => panic!(),
}
@@ -451,17 +542,25 @@ impl<'a> PreorderFlowTraversal for AbsoluteAssignBSizesTraversal<'a> {
#[inline]
fn process(&self, flow: &mut Flow) {
if !flow.is_block_like() {
- return
+ return;
}
// This flow might not be an absolutely positioned flow if it is the root of the tree.
let block = flow.as_mut_block();
- if !block.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if !block
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
return;
}
- if !block.base.restyle_damage.intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW) {
- return
+ if !block
+ .base
+ .restyle_damage
+ .intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW)
+ {
+ return;
}
block.calculate_absolute_block_size_and_margins(self.0);
@@ -533,14 +632,20 @@ impl BlockFlow {
BlockFlow::from_fragment_and_float_kind(fragment, None)
}
- pub fn from_fragment_and_float_kind(fragment: Fragment, float_kind: Option<FloatKind>)
- -> BlockFlow {
+ pub fn from_fragment_and_float_kind(
+ fragment: Fragment,
+ float_kind: Option<FloatKind>,
+ ) -> BlockFlow {
let writing_mode = fragment.style().writing_mode;
BlockFlow {
- base: BaseFlow::new(Some(fragment.style()), writing_mode, match float_kind {
- Some(_) => ForceNonfloatedFlag::FloatIfNecessary,
- None => ForceNonfloatedFlag::ForceNonfloated,
- }),
+ base: BaseFlow::new(
+ Some(fragment.style()),
+ writing_mode,
+ match float_kind {
+ Some(_) => ForceNonfloatedFlag::FloatIfNecessary,
+ None => ForceNonfloatedFlag::ForceNonfloated,
+ },
+ ),
fragment: fragment,
float: float_kind.map(|kind| Box::new(FloatedBlockInfo::new(kind))),
flags: BlockFlowFlags::empty(),
@@ -552,7 +657,11 @@ impl BlockFlow {
/// This determines the algorithm used to calculate inline-size, block-size, and the
/// relevant margins for this Block.
pub fn block_type(&self) -> BlockType {
- if self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
if self.fragment.is_replaced() {
BlockType::AbsoluteReplaced
} else {
@@ -582,65 +691,85 @@ impl BlockFlow {
}
/// Compute the actual inline size and position for this block.
- pub fn compute_used_inline_size(&mut self,
- shared_context: &SharedStyleContext,
- containing_block_inline_size: Au) {
+ pub fn compute_used_inline_size(
+ &mut self,
+ shared_context: &SharedStyleContext,
+ containing_block_inline_size: Au,
+ ) {
let block_type = self.block_type();
match block_type {
BlockType::AbsoluteReplaced => {
let inline_size_computer = AbsoluteReplaced;
- inline_size_computer.compute_used_inline_size(self,
- shared_context,
- containing_block_inline_size);
- }
+ inline_size_computer.compute_used_inline_size(
+ self,
+ shared_context,
+ containing_block_inline_size,
+ );
+ },
BlockType::AbsoluteNonReplaced => {
let inline_size_computer = AbsoluteNonReplaced;
- inline_size_computer.compute_used_inline_size(self,
- shared_context,
- containing_block_inline_size);
- }
+ inline_size_computer.compute_used_inline_size(
+ self,
+ shared_context,
+ containing_block_inline_size,
+ );
+ },
BlockType::FloatReplaced => {
let inline_size_computer = FloatReplaced;
- inline_size_computer.compute_used_inline_size(self,
- shared_context,
- containing_block_inline_size);
- }
+ inline_size_computer.compute_used_inline_size(
+ self,
+ shared_context,
+ containing_block_inline_size,
+ );
+ },
BlockType::FloatNonReplaced => {
let inline_size_computer = FloatNonReplaced;
- inline_size_computer.compute_used_inline_size(self,
- shared_context,
- containing_block_inline_size);
- }
+ inline_size_computer.compute_used_inline_size(
+ self,
+ shared_context,
+ containing_block_inline_size,
+ );
+ },
BlockType::InlineBlockReplaced => {
let inline_size_computer = InlineBlockReplaced;
- inline_size_computer.compute_used_inline_size(self,
- shared_context,
- containing_block_inline_size);
- }
+ inline_size_computer.compute_used_inline_size(
+ self,
+ shared_context,
+ containing_block_inline_size,
+ );
+ },
BlockType::InlineBlockNonReplaced => {
let inline_size_computer = InlineBlockNonReplaced;
- inline_size_computer.compute_used_inline_size(self,
- shared_context,
- containing_block_inline_size);
- }
+ inline_size_computer.compute_used_inline_size(
+ self,
+ shared_context,
+ containing_block_inline_size,
+ );
+ },
BlockType::Replaced => {
let inline_size_computer = BlockReplaced;
- inline_size_computer.compute_used_inline_size(self,
- shared_context,
- containing_block_inline_size);
- }
+ inline_size_computer.compute_used_inline_size(
+ self,
+ shared_context,
+ containing_block_inline_size,
+ );
+ },
BlockType::NonReplaced => {
let inline_size_computer = BlockNonReplaced;
- inline_size_computer.compute_used_inline_size(self,
- shared_context,
- containing_block_inline_size);
- }
+ inline_size_computer.compute_used_inline_size(
+ self,
+ shared_context,
+ containing_block_inline_size,
+ );
+ },
BlockType::InlineFlexItem => {
let inline_size_computer = InlineFlexItem;
- inline_size_computer.compute_used_inline_size(self,
- shared_context,
- containing_block_inline_size);
- }
+ inline_size_computer.compute_used_inline_size(
+ self,
+ shared_context,
+ containing_block_inline_size,
+ );
+ },
}
}
@@ -652,9 +781,15 @@ impl BlockFlow {
pub fn stacking_relative_border_box(&self, coor: CoordinateSystem) -> Rect<Au> {
return self.fragment.stacking_relative_border_box(
&self.base.stacking_relative_position,
- &self.base.early_absolute_position_info.relative_containing_block_size,
- self.base.early_absolute_position_info.relative_containing_block_mode,
- coor);
+ &self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size,
+ self.base
+ .early_absolute_position_info
+ .relative_containing_block_mode,
+ coor,
+ );
}
/// Return the size of the containing block for the given immediate absolute descendant of this
@@ -663,14 +798,23 @@ impl BlockFlow {
/// Right now, this only gets the containing block size for absolutely positioned elements.
/// Note: We assume this is called in a top-down traversal, so it is ok to reference the CB.
#[inline]
- pub fn containing_block_size(&self, viewport_size: &Size2D<Au>, descendant: OpaqueFlow)
- -> LogicalSize<Au> {
- debug_assert!(self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED));
+ pub fn containing_block_size(
+ &self,
+ viewport_size: &Size2D<Au>,
+ descendant: OpaqueFlow,
+ ) -> LogicalSize<Au> {
+ debug_assert!(
+ self.base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ );
if self.is_fixed() || self.is_root() {
// Initial containing block is the CB for the root
LogicalSize::from_physical(self.base.writing_mode, *viewport_size)
} else {
- self.base.absolute_cb.generated_containing_block_size(descendant)
+ self.base
+ .absolute_cb
+ .generated_containing_block_size(descendant)
}
}
@@ -680,8 +824,13 @@ impl BlockFlow {
/// calculated in the bubble-inline-sizes traversal.
pub fn get_shrink_to_fit_inline_size(&self, available_inline_size: Au) -> Au {
let content_intrinsic_inline_sizes = self.content_intrinsic_inline_sizes();
- min(content_intrinsic_inline_sizes.preferred_inline_size,
- max(content_intrinsic_inline_sizes.minimum_inline_size, available_inline_size))
+ min(
+ content_intrinsic_inline_sizes.preferred_inline_size,
+ max(
+ content_intrinsic_inline_sizes.minimum_inline_size,
+ available_inline_size,
+ ),
+ )
}
/// If this is the root flow, shifts all kids down and adjusts our size to account for
@@ -689,22 +838,24 @@ impl BlockFlow {
///
/// TODO(#2017, pcwalton): This is somewhat inefficient (traverses kids twice); can we do
/// better?
- fn adjust_fragments_for_collapsed_margins_if_root(&mut self,
- shared_context: &SharedStyleContext) {
+ fn adjust_fragments_for_collapsed_margins_if_root(
+ &mut self,
+ shared_context: &SharedStyleContext,
+ ) {
if !self.is_root() {
- return
+ return;
}
- let (block_start_margin_value, block_end_margin_value) =
- match self.base.collapsible_margins {
- CollapsibleMargins::CollapseThrough(_) => {
- panic!("Margins unexpectedly collapsed through root flow.")
- }
- CollapsibleMargins::Collapse(block_start_margin, block_end_margin) => {
- (block_start_margin.collapse(), block_end_margin.collapse())
- }
- CollapsibleMargins::None(block_start, block_end) => (block_start, block_end),
- };
+ let (block_start_margin_value, block_end_margin_value) = match self.base.collapsible_margins
+ {
+ CollapsibleMargins::CollapseThrough(_) => {
+ panic!("Margins unexpectedly collapsed through root flow.")
+ },
+ CollapsibleMargins::Collapse(block_start_margin, block_end_margin) => {
+ (block_start_margin.collapse(), block_end_margin.collapse())
+ },
+ CollapsibleMargins::None(block_start, block_end) => (block_start, block_end),
+ };
// Shift all kids down (or up, if margins are negative) if necessary.
if block_start_margin_value != Au(0) {
@@ -718,12 +869,14 @@ impl BlockFlow {
// is not correct behavior according to CSS 2.1 § 10.5. Instead I think we should treat the
// root element as having `overflow: scroll` and use the layers-based scrolling
// infrastructure to make it scrollable.
- let viewport_size =
- LogicalSize::from_physical(self.fragment.style.writing_mode,
- shared_context.viewport_size());
- let block_size = max(viewport_size.block,
- self.fragment.border_box.size.block + block_start_margin_value +
- block_end_margin_value);
+ let viewport_size = LogicalSize::from_physical(
+ self.fragment.style.writing_mode,
+ shared_context.viewport_size(),
+ );
+ let block_size = max(
+ viewport_size.block,
+ self.fragment.border_box.size.block + block_start_margin_value + block_end_margin_value,
+ );
self.base.position.size.block = block_size;
self.fragment.border_box.size.block = block_size;
@@ -774,69 +927,95 @@ impl BlockFlow {
/// `inline(always)` because this is only ever called by in-order or non-in-order top-level
/// methods.
#[inline(always)]
- pub fn assign_block_size_block_base(&mut self,
- layout_context: &LayoutContext,
- mut fragmentation_context: Option<FragmentationContext>,
- margins_may_collapse: MarginsMayCollapseFlag)
- -> Option<Arc<Flow>> {
- let _scope = layout_debug_scope!("assign_block_size_block_base {:x}",
- self.base.debug_id());
+ pub fn assign_block_size_block_base(
+ &mut self,
+ layout_context: &LayoutContext,
+ mut fragmentation_context: Option<FragmentationContext>,
+ margins_may_collapse: MarginsMayCollapseFlag,
+ ) -> Option<Arc<Flow>> {
+ let _scope = layout_debug_scope!("assign_block_size_block_base {:x}", self.base.debug_id());
let mut break_at = None;
let content_box = self.fragment.content_box();
- if self.base.restyle_damage.contains(ServoRestyleDamage::REFLOW) {
+ if self
+ .base
+ .restyle_damage
+ .contains(ServoRestyleDamage::REFLOW)
+ {
// Our current border-box position.
let mut cur_b = Au(0);
// Absolute positioning establishes a block formatting context. Don't propagate floats
// in or out. (But do propagate them between kids.)
- if self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) ||
- margins_may_collapse != MarginsMayCollapseFlag::MarginsMayCollapse {
+ if self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) ||
+ margins_may_collapse != MarginsMayCollapseFlag::MarginsMayCollapse
+ {
self.base.floats = Floats::new(self.fragment.style.writing_mode);
}
let writing_mode = self.base.floats.writing_mode;
self.base.floats.translate(LogicalSize::new(
- writing_mode, -self.fragment.inline_start_offset(), Au(0)));
+ writing_mode,
+ -self.fragment.inline_start_offset(),
+ Au(0),
+ ));
// The sum of our block-start border and block-start padding.
let block_start_offset = self.fragment.border_padding.block_start;
translate_including_floats(&mut cur_b, block_start_offset, &mut self.base.floats);
- let can_collapse_block_start_margin_with_kids =
- margins_may_collapse == MarginsMayCollapseFlag::MarginsMayCollapse &&
- !self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
+ let can_collapse_block_start_margin_with_kids = margins_may_collapse ==
+ MarginsMayCollapseFlag::MarginsMayCollapse &&
+ !self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
self.fragment.border_padding.block_start == Au(0);
let mut margin_collapse_info = MarginCollapseInfo::initialize_block_start_margin(
&self.fragment,
- can_collapse_block_start_margin_with_kids);
+ can_collapse_block_start_margin_with_kids,
+ );
// At this point, `cur_b` is at the content edge of our box. Now iterate over children.
let mut floats = self.base.floats.clone();
let thread_id = self.base.thread_id;
let (mut had_floated_children, mut had_children_with_clearance) = (false, false);
for (child_index, kid) in self.base.child_iter_mut().enumerate() {
- if kid.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if kid
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
// Assume that the *hypothetical box* for an absolute flow starts immediately
// after the margin-end border edge of the previous flow.
- if kid.base().flags.contains(FlowFlags::BLOCK_POSITION_IS_STATIC) {
+ if kid
+ .base()
+ .flags
+ .contains(FlowFlags::BLOCK_POSITION_IS_STATIC)
+ {
let previous_bottom_margin = margin_collapse_info.current_float_ceiling();
kid.mut_base().position.start.b = cur_b +
- kid.base().collapsible_margins
- .block_start_margin_for_noncollapsible_context() +
+ kid.base()
+ .collapsible_margins
+ .block_start_margin_for_noncollapsible_context() +
previous_bottom_margin
}
kid.place_float_if_applicable();
if !kid.base().flags.is_float() {
- kid.assign_block_size_for_inorder_child_if_necessary(layout_context,
- thread_id,
- content_box);
+ kid.assign_block_size_for_inorder_child_if_necessary(
+ layout_context,
+ thread_id,
+ content_box,
+ );
}
// Skip the collapsing and float processing for absolute flow kids and continue
// with the next flow.
- continue
+ continue;
}
let previous_b = cur_b;
@@ -865,7 +1044,7 @@ impl BlockFlow {
let kid_base = kid.mut_base();
floats = kid_base.floats.clone();
- continue
+ continue;
}
// If we have clearance, assume there are no floats in.
@@ -880,22 +1059,26 @@ impl BlockFlow {
}
// Lay the child out if this was an in-order traversal.
- let need_to_process_child_floats =
- kid.assign_block_size_for_inorder_child_if_necessary(layout_context,
- thread_id,
- content_box);
+ let need_to_process_child_floats = kid
+ .assign_block_size_for_inorder_child_if_necessary(
+ layout_context,
+ thread_id,
+ content_box,
+ );
if !had_children_with_clearance &&
- floats.is_present() &&
- (kid.base().flags.contains(FlowFlags::CLEARS_LEFT) ||
- kid.base().flags.contains(FlowFlags::CLEARS_RIGHT)) {
+ floats.is_present() &&
+ (kid.base().flags.contains(FlowFlags::CLEARS_LEFT) ||
+ kid.base().flags.contains(FlowFlags::CLEARS_RIGHT))
+ {
had_children_with_clearance = true
}
// Handle any (possibly collapsed) top margin.
let delta = margin_collapse_info.advance_block_start_margin(
&kid.base().collapsible_margins,
- !had_children_with_clearance);
+ !had_children_with_clearance,
+ );
translate_including_floats(&mut cur_b, delta, &mut floats);
// Collapse-through margins should be placed at the top edge,
@@ -905,8 +1088,10 @@ impl BlockFlow {
}
// Clear past the floats that came in, if necessary.
- let clearance = match (kid.base().flags.contains(FlowFlags::CLEARS_LEFT),
- kid.base().flags.contains(FlowFlags::CLEARS_RIGHT)) {
+ let clearance = match (
+ kid.base().flags.contains(FlowFlags::CLEARS_LEFT),
+ kid.base().flags.contains(FlowFlags::CLEARS_RIGHT),
+ ) {
(false, false) => Au(0),
(true, false) => floats.clearance(ClearType::Left),
(false, true) => floats.clearance(ClearType::Right),
@@ -942,19 +1127,19 @@ impl BlockFlow {
cur_b = cur_b + delta;
kid_base.position.start.b = kid_base.position.start.b + delta;
delta
- }
- _ => Au(0)
+ },
+ _ => Au(0),
};
if break_at.is_some() {
- break
+ break;
}
if let Some(ref mut ctx) = fragmentation_context {
if cur_b > ctx.available_block_size && !ctx.this_fragment_is_empty {
break_at = Some((child_index, None));
cur_b = previous_b;
- break
+ break;
}
ctx.this_fragment_is_empty = false
}
@@ -965,38 +1150,50 @@ impl BlockFlow {
}
// Add in our block-end margin and compute our collapsible margins.
- let can_collapse_block_end_margin_with_kids =
- margins_may_collapse == MarginsMayCollapseFlag::MarginsMayCollapse &&
- !self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
+ let can_collapse_block_end_margin_with_kids = margins_may_collapse ==
+ MarginsMayCollapseFlag::MarginsMayCollapse &&
+ !self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
self.fragment.border_padding.block_end == Au(0);
- let (collapsible_margins, delta) =
- margin_collapse_info.finish_and_compute_collapsible_margins(
- &self.fragment,
- self.base.block_container_explicit_block_size,
- can_collapse_block_end_margin_with_kids,
- !had_floated_children);
+ let (collapsible_margins, delta) = margin_collapse_info
+ .finish_and_compute_collapsible_margins(
+ &self.fragment,
+ self.base.block_container_explicit_block_size,
+ can_collapse_block_end_margin_with_kids,
+ !had_floated_children,
+ );
self.base.collapsible_margins = collapsible_margins;
translate_including_floats(&mut cur_b, delta, &mut floats);
let mut block_size = cur_b - block_start_offset;
let is_root = self.is_root();
- if is_root || self.formatting_context_type() != FormattingContextType::None ||
- self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if is_root || self.formatting_context_type() != FormattingContextType::None || self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
// The content block-size includes all the floats per CSS 2.1 § 10.6.7. The easiest
// way to handle this is to just treat it as clearance.
block_size = block_size + floats.clearance(ClearType::Both);
}
- if self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
// FIXME(#2003, pcwalton): The max is taken here so that you can scroll the page,
// but this is not correct behavior according to CSS 2.1 § 10.5. Instead I think we
// should treat the root element as having `overflow: scroll` and use the layers-
// based scrolling infrastructure to make it scrollable.
if is_root {
- let viewport_size =
- LogicalSize::from_physical(self.fragment.style.writing_mode,
- layout_context.shared_context().viewport_size());
+ let viewport_size = LogicalSize::from_physical(
+ self.fragment.style.writing_mode,
+ layout_context.shared_context().viewport_size(),
+ );
block_size = max(viewport_size.block, block_size)
}
@@ -1007,23 +1204,26 @@ impl BlockFlow {
self.fragment.border_box.size.block = block_size;
}
-
- if self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
self.propagate_early_absolute_position_info_to_children();
- return None
+ return None;
}
// Compute any explicitly-specified block size.
// Can't use `for` because we assign to `candidate_block_size_iterator.candidate_value`.
let mut candidate_block_size_iterator = CandidateBSizeIterator::new(
&self.fragment,
- self.base.block_container_explicit_block_size);
+ self.base.block_container_explicit_block_size,
+ );
while let Some(candidate_block_size) = candidate_block_size_iterator.next() {
- candidate_block_size_iterator.candidate_value =
- match candidate_block_size {
- MaybeAuto::Auto => block_size,
- MaybeAuto::Specified(value) => value
- }
+ candidate_block_size_iterator.candidate_value = match candidate_block_size {
+ MaybeAuto::Auto => block_size,
+ MaybeAuto::Specified(value) => value,
+ }
}
// Adjust `cur_b` as necessary to account for the explicitly-specified block-size.
@@ -1046,9 +1246,11 @@ impl BlockFlow {
// Translate the current set of floats back into the parent coordinate system in the
// inline direction, and store them in the flow so that flows that come later in the
// document can access them.
- floats.translate(LogicalSize::new(writing_mode,
- self.fragment.inline_start_offset(),
- Au(0)));
+ floats.translate(LogicalSize::new(
+ writing_mode,
+ self.fragment.inline_start_offset(),
+ Au(0),
+ ));
self.base.floats = floats.clone();
self.adjust_fragments_for_collapsed_margins_if_root(layout_context.shared_context());
} else {
@@ -1056,9 +1258,11 @@ impl BlockFlow {
// necessary.
let thread_id = self.base.thread_id;
for kid in self.base.child_iter_mut() {
- kid.assign_block_size_for_inorder_child_if_necessary(layout_context,
- thread_id,
- content_box);
+ kid.assign_block_size_for_inorder_child_if_necessary(
+ layout_context,
+ thread_id,
+ content_box,
+ );
}
}
@@ -1075,10 +1279,18 @@ impl BlockFlow {
// Also don't remove the dirty bits if we're a block formatting context since our inline
// size has not yet been computed. (See `assign_inline_position_for_formatting_context()`.)
if (self.base.flags.is_float() ||
- self.formatting_context_type() == FormattingContextType::None) &&
- !self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
- self.base.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
- self.fragment.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.formatting_context_type() == FormattingContextType::None) &&
+ !self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
+ self.base
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
}
break_at.and_then(|(i, child_remaining)| {
@@ -1116,15 +1328,18 @@ impl BlockFlow {
// Our `position` field accounts for positive margins, but not negative margins. (See
// calculation of `extra_inline_size_from_margin` below.) Negative margins must be taken
// into account for float placement, however. So we add them in here.
- let inline_size_for_float_placement = self.base.position.size.inline +
- min(Au(0), self.fragment.margin.inline_start_end());
+ let inline_size_for_float_placement =
+ self.base.position.size.inline + min(Au(0), self.fragment.margin.inline_start_end());
let info = PlacementInfo {
size: LogicalSize::new(
self.fragment.style.writing_mode,
inline_size_for_float_placement,
- block_size + self.fragment.margin.block_start_end())
- .convert(self.fragment.style.writing_mode, self.base.floats.writing_mode),
+ block_size + self.fragment.margin.block_start_end(),
+ ).convert(
+ self.fragment.style.writing_mode,
+ self.base.floats.writing_mode,
+ ),
ceiling: clearance + float_info.float_ceiling,
max_inline_size: float_info.containing_inline_size,
kind: float_info.float_kind,
@@ -1139,32 +1354,51 @@ impl BlockFlow {
// Move in from the margin edge, as per CSS 2.1 § 9.5, floats may not overlap anything on
// their margin edges.
- let float_offset = self.base.floats.last_float_pos().unwrap()
- .convert(self.base.floats.writing_mode,
- self.base.writing_mode,
- container_size)
- .start;
- let margin_offset = LogicalPoint::new(self.base.writing_mode,
- Au(0),
- self.fragment.margin.block_start);
-
- let mut origin = LogicalPoint::new(self.base.writing_mode,
- self.base.position.start.i,
- self.base.position.start.b);
+ let float_offset = self
+ .base
+ .floats
+ .last_float_pos()
+ .unwrap()
+ .convert(
+ self.base.floats.writing_mode,
+ self.base.writing_mode,
+ container_size,
+ ).start;
+ let margin_offset = LogicalPoint::new(
+ self.base.writing_mode,
+ Au(0),
+ self.fragment.margin.block_start,
+ );
+
+ let mut origin = LogicalPoint::new(
+ self.base.writing_mode,
+ self.base.position.start.i,
+ self.base.position.start.b,
+ );
origin = origin.add_point(&float_offset).add_point(&margin_offset);
- self.base.position = LogicalRect::from_point_size(self.base.writing_mode,
- origin,
- self.base.position.size);
+ self.base.position =
+ LogicalRect::from_point_size(self.base.writing_mode, origin, self.base.position.size);
}
- pub fn explicit_block_containing_size(&self, shared_context: &SharedStyleContext) -> Option<Au> {
+ pub fn explicit_block_containing_size(
+ &self,
+ shared_context: &SharedStyleContext,
+ ) -> Option<Au> {
if self.is_root() || self.is_fixed() {
- let viewport_size = LogicalSize::from_physical(self.fragment.style.writing_mode,
- shared_context.viewport_size());
+ let viewport_size = LogicalSize::from_physical(
+ self.fragment.style.writing_mode,
+ shared_context.viewport_size(),
+ );
Some(viewport_size.block)
- } else if self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
- self.base.block_container_explicit_block_size.is_none() {
- self.base.absolute_cb.explicit_block_containing_size(shared_context)
+ } else if self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
+ self.base.block_container_explicit_block_size.is_none()
+ {
+ self.base
+ .absolute_cb
+ .explicit_block_containing_size(shared_context)
} else {
self.base.block_container_explicit_block_size
}
@@ -1174,58 +1408,56 @@ impl BlockFlow {
let content_block_size = self.fragment.style().content_block_size();
match (content_block_size, containing_block_size) {
- (LengthOrPercentageOrAuto::Calc(calc), _) => {
- calc.to_used_value(containing_block_size)
- }
+ (LengthOrPercentageOrAuto::Calc(calc), _) => calc.to_used_value(containing_block_size),
(LengthOrPercentageOrAuto::Length(length), _) => Some(Au::from(length)),
(LengthOrPercentageOrAuto::Percentage(percent), Some(container_size)) => {
Some(container_size.scale_by(percent.0))
- }
+ },
(LengthOrPercentageOrAuto::Percentage(_), None) |
- (LengthOrPercentageOrAuto::Auto, None) => {
- None
- }
+ (LengthOrPercentageOrAuto::Auto, None) => None,
(LengthOrPercentageOrAuto::Auto, Some(container_size)) => {
let (block_start, block_end) = {
let position = self.fragment.style().logical_position();
- (MaybeAuto::from_style(position.block_start, container_size),
- MaybeAuto::from_style(position.block_end, container_size))
+ (
+ MaybeAuto::from_style(position.block_start, container_size),
+ MaybeAuto::from_style(position.block_end, container_size),
+ )
};
match (block_start, block_end) {
(MaybeAuto::Specified(block_start), MaybeAuto::Specified(block_end)) => {
- let available_block_size = container_size - self.fragment.border_padding.block_start_end();
+ let available_block_size =
+ container_size - self.fragment.border_padding.block_start_end();
// Non-auto margin-block-start and margin-block-end values have already been
// calculated during assign-inline-size.
let margin = self.fragment.style().logical_margin();
let margin_block_start = match margin.block_start {
LengthOrPercentageOrAuto::Auto => MaybeAuto::Auto,
- _ => MaybeAuto::Specified(self.fragment.margin.block_start)
+ _ => MaybeAuto::Specified(self.fragment.margin.block_start),
};
let margin_block_end = match margin.block_end {
LengthOrPercentageOrAuto::Auto => MaybeAuto::Auto,
- _ => MaybeAuto::Specified(self.fragment.margin.block_end)
+ _ => MaybeAuto::Specified(self.fragment.margin.block_end),
};
let margin_block_start = margin_block_start.specified_or_zero();
let margin_block_end = margin_block_end.specified_or_zero();
let sum = block_start + block_end + margin_block_start + margin_block_end;
Some(available_block_size - sum)
- }
+ },
- (_, _) => {
- None
- }
+ (_, _) => None,
}
- }
+ },
}
}
fn calculate_absolute_block_size_and_margins(&mut self, shared_context: &SharedStyleContext) {
let opaque_self = OpaqueFlow::from_flow(self);
- let containing_block_block_size =
- self.containing_block_size(&shared_context.viewport_size(), opaque_self).block;
+ let containing_block_block_size = self
+ .containing_block_size(&shared_context.viewport_size(), opaque_self)
+ .block;
// This is the stored content block-size value from assign-block-size
let content_block_size = self.fragment.border_box.size.block;
@@ -1237,24 +1469,24 @@ impl BlockFlow {
let margin = self.fragment.style().logical_margin();
let margin_block_start = match margin.block_start {
LengthOrPercentageOrAuto::Auto => MaybeAuto::Auto,
- _ => MaybeAuto::Specified(self.fragment.margin.block_start)
+ _ => MaybeAuto::Specified(self.fragment.margin.block_start),
};
let margin_block_end = match margin.block_end {
LengthOrPercentageOrAuto::Auto => MaybeAuto::Auto,
- _ => MaybeAuto::Specified(self.fragment.margin.block_end)
+ _ => MaybeAuto::Specified(self.fragment.margin.block_end),
};
let block_start;
let block_end;
{
let position = self.fragment.style().logical_position();
- block_start = MaybeAuto::from_style(position.block_start,
- containing_block_block_size);
+ block_start =
+ MaybeAuto::from_style(position.block_start, containing_block_block_size);
block_end = MaybeAuto::from_style(position.block_end, containing_block_block_size);
}
- let available_block_size = containing_block_block_size -
- self.fragment.border_padding.block_start_end();
+ let available_block_size =
+ containing_block_block_size - self.fragment.border_padding.block_start_end();
if self.fragment.is_replaced() {
// Calculate used value of block-size just like we do for inline replaced elements.
// TODO: Pass in the containing block block-size when Fragment's
@@ -1265,21 +1497,24 @@ impl BlockFlow {
// Check this when that has been fixed.
let block_size_used_val = self.fragment.border_box.size.block -
self.fragment.border_padding.block_start_end();
- solution = Some(BSizeConstraintSolution::solve_vertical_constraints_abs_replaced(
+ solution = Some(
+ BSizeConstraintSolution::solve_vertical_constraints_abs_replaced(
block_size_used_val,
margin_block_start,
margin_block_end,
block_start,
block_end,
content_block_size,
- available_block_size))
+ available_block_size,
+ ),
+ )
} else {
let mut candidate_block_size_iterator =
CandidateBSizeIterator::new(&self.fragment, Some(containing_block_block_size));
// Can't use `for` because we assign to
// `candidate_block_size_iterator.candidate_value`.
- while let Some(block_size_used_val) = candidate_block_size_iterator.next() {
+ while let Some(block_size_used_val) = candidate_block_size_iterator.next() {
solution = Some(
BSizeConstraintSolution::solve_vertical_constraints_abs_nonreplaced(
block_size_used_val,
@@ -1288,10 +1523,11 @@ impl BlockFlow {
block_start,
block_end,
content_block_size,
- available_block_size));
+ available_block_size,
+ ),
+ );
- candidate_block_size_iterator.candidate_value =
- solution.unwrap().block_size;
+ candidate_block_size_iterator.candidate_value = solution.unwrap().block_size;
}
}
}
@@ -1301,7 +1537,11 @@ impl BlockFlow {
self.fragment.margin.block_end = solution.margin_block_end;
self.fragment.border_box.start.b = Au(0);
- if !self.base.flags.contains(FlowFlags::BLOCK_POSITION_IS_STATIC) {
+ if !self
+ .base
+ .flags
+ .contains(FlowFlags::BLOCK_POSITION_IS_STATIC)
+ {
self.base.position.start.b = solution.block_start + self.fragment.margin.block_start
}
@@ -1310,8 +1550,12 @@ impl BlockFlow {
self.fragment.border_box.size.block = block_size;
self.base.position.size.block = block_size;
- self.base.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
- self.fragment.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.base
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
}
/// Compute inline size based using the `block_container_inline_size` set by the parent flow.
@@ -1332,18 +1576,16 @@ impl BlockFlow {
/// `#[inline(always)]` because this is called only from block or table inline-size assignment
/// and the code for block layout is significantly simpler.
#[inline(always)]
- pub fn propagate_assigned_inline_size_to_children<F>(&mut self,
- shared_context: &SharedStyleContext,
- inline_start_content_edge: Au,
- inline_end_content_edge: Au,
- content_inline_size: Au,
- mut callback: F)
- where F: FnMut(&mut Flow,
- usize,
- Au,
- WritingMode,
- &mut Au,
- &mut Au) {
+ pub fn propagate_assigned_inline_size_to_children<F>(
+ &mut self,
+ shared_context: &SharedStyleContext,
+ inline_start_content_edge: Au,
+ inline_end_content_edge: Au,
+ content_inline_size: Au,
+ mut callback: F,
+ ) where
+ F: FnMut(&mut Flow, usize, Au, WritingMode, &mut Au, &mut Au),
+ {
let flags = self.base.flags.clone();
let opaque_self = OpaqueFlow::from_flow(self);
@@ -1355,13 +1597,20 @@ impl BlockFlow {
};
let parent_container_size = self.explicit_block_containing_size(shared_context);
// https://drafts.csswg.org/css-ui-3/#box-sizing
- let mut explicit_content_size = self
- .explicit_block_size(parent_container_size)
- .map(|x| if x < box_border { Au(0) } else { x - box_border });
- if self.is_root() { explicit_content_size = max(parent_container_size, explicit_content_size); }
+ let mut explicit_content_size = self.explicit_block_size(parent_container_size).map(|x| {
+ if x < box_border {
+ Au(0)
+ } else {
+ x - box_border
+ }
+ });
+ if self.is_root() {
+ explicit_content_size = max(parent_container_size, explicit_content_size);
+ }
// Calculate containing block inline size.
let containing_block_size = if flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
- self.containing_block_size(&shared_context.viewport_size(), opaque_self).inline
+ self.containing_block_size(&shared_context.viewport_size(), opaque_self)
+ .inline
} else {
content_inline_size
};
@@ -1388,13 +1637,17 @@ impl BlockFlow {
// float child does not have `REFLOW` set, we must be careful to avoid touching its
// inline position, as no logic will run afterward to set its true value.
let kid_base = kid.mut_base();
- let reflow_damage = if kid_base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ let reflow_damage = if kid_base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
ServoRestyleDamage::REFLOW_OUT_OF_FLOW
} else {
ServoRestyleDamage::REFLOW
};
- if kid_base.flags.contains(FlowFlags::INLINE_POSITION_IS_STATIC) &&
- kid_base.restyle_damage.contains(reflow_damage) {
+ if kid_base
+ .flags
+ .contains(FlowFlags::INLINE_POSITION_IS_STATIC) &&
+ kid_base.restyle_damage.contains(reflow_damage)
+ {
kid_base.position.start.i =
if kid_mode.is_bidi_ltr() == containing_block_mode.is_bidi_ltr() {
inline_start_content_edge
@@ -1409,26 +1662,33 @@ impl BlockFlow {
// Call the callback to propagate extra inline size information down to the child. This
// is currently used for tables.
- callback(kid,
- i,
- content_inline_size,
- containing_block_mode,
- &mut inline_start_margin_edge,
- &mut inline_end_margin_edge);
+ callback(
+ kid,
+ i,
+ content_inline_size,
+ containing_block_mode,
+ &mut inline_start_margin_edge,
+ &mut inline_end_margin_edge,
+ );
// Per CSS 2.1 § 16.3.1, text alignment propagates to all children in flow.
//
// TODO(#2265, pcwalton): Do this in the cascade instead.
let containing_block_text_align = self.fragment.style().get_inherited_text().text_align;
- kid.mut_base().flags.set_text_align(containing_block_text_align);
+ kid.mut_base()
+ .flags
+ .set_text_align(containing_block_text_align);
// Handle `text-indent` on behalf of any inline children that we have. This is
// necessary because any percentages are relative to the containing block, which only
// we know.
if kid.is_inline_flow() {
- kid.as_mut_inline().first_line_indentation =
- self.fragment.style().get_inherited_text().text_indent
- .to_used_value(containing_block_size);
+ kid.as_mut_inline().first_line_indentation = self
+ .fragment
+ .style()
+ .get_inherited_text()
+ .text_indent
+ .to_used_value(containing_block_size);
}
}
}
@@ -1437,11 +1697,11 @@ impl BlockFlow {
/// `FormattingContextType`.
pub fn formatting_context_type(&self) -> FormattingContextType {
if self.is_inline_flex_item() || self.is_block_flex_item() {
- return FormattingContextType::Other
+ return FormattingContextType::Other;
}
let style = self.fragment.style();
if style.get_box().float != Float::None {
- return FormattingContextType::Other
+ return FormattingContextType::Other;
}
match style.get_box().display {
Display::TableCell |
@@ -1449,14 +1709,13 @@ impl BlockFlow {
Display::TableRowGroup |
Display::Table |
Display::InlineBlock |
- Display::Flex => {
- FormattingContextType::Other
- }
+ Display::Flex => FormattingContextType::Other,
_ if style.get_box().overflow_x != StyleOverflow::Visible ||
- style.get_box().overflow_y != StyleOverflow::Visible ||
- style.is_multicol() => {
+ style.get_box().overflow_y != StyleOverflow::Visible ||
+ style.is_multicol() =>
+ {
FormattingContextType::Block
- }
+ },
_ => FormattingContextType::None,
}
}
@@ -1472,18 +1731,28 @@ impl BlockFlow {
/// on the floats we could see at the time of inline-size assignment. The job of this function,
/// therefore, is not only to assign the final size but also to perform the layout again for
/// this block formatting context if our speculation was wrong.
- fn assign_inline_position_for_formatting_context(&mut self,
- layout_context: &LayoutContext,
- content_box: LogicalRect<Au>) {
+ fn assign_inline_position_for_formatting_context(
+ &mut self,
+ layout_context: &LayoutContext,
+ content_box: LogicalRect<Au>,
+ ) {
debug_assert_ne!(self.formatting_context_type(), FormattingContextType::None);
- if !self.base.restyle_damage.intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW) {
- return
+ if !self
+ .base
+ .restyle_damage
+ .intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW)
+ {
+ return;
}
// We do this first to avoid recomputing our inline size when we propagate it.
- self.base.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
- self.fragment.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.base
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
// The code below would completely wreck the layout if run on a flex item, however:
// * Flex items are always the children of flex containers.
@@ -1494,16 +1763,18 @@ impl BlockFlow {
// Therefore, a flex item cannot be impacted by a float.
// See also: https://www.w3.org/TR/css-flexbox-1/#flex-containers
if !self.base.might_have_floats_in() {
- return
+ return;
}
// If you remove the might_have_floats_in conditional, this will go off.
debug_assert!(!self.is_inline_flex_item());
// Compute the available space for us, based on the actual floats.
- let rect = self.base.floats.available_rect(Au(0),
- self.fragment.border_box.size.block,
- content_box.size.inline);
+ let rect = self.base.floats.available_rect(
+ Au(0),
+ self.fragment.border_box.size.block,
+ content_box.size.inline,
+ );
let available_inline_size = if let Some(rect) = rect {
// Offset our position by whatever displacement is needed to not impact the floats.
// Also, account for margins sliding behind floats.
@@ -1525,25 +1796,29 @@ impl BlockFlow {
} else {
content_box.size.inline
} - self.fragment.margin.inline_start_end();
- let max_inline_size =
- self.fragment.style().max_inline_size()
- .to_used_value(self.base.block_container_inline_size)
- .unwrap_or(MAX_AU);
- let min_inline_size =
- self.fragment.style().min_inline_size().to_used_value(self.base.block_container_inline_size);
+ let max_inline_size = self
+ .fragment
+ .style()
+ .max_inline_size()
+ .to_used_value(self.base.block_container_inline_size)
+ .unwrap_or(MAX_AU);
+ let min_inline_size = self
+ .fragment
+ .style()
+ .min_inline_size()
+ .to_used_value(self.base.block_container_inline_size);
let specified_inline_size = self.fragment.style().content_inline_size();
let container_size = self.base.block_container_inline_size;
- let inline_size =
- if let MaybeAuto::Specified(size) = MaybeAuto::from_style(specified_inline_size,
- container_size) {
- match self.fragment.style().get_position().box_sizing {
- BoxSizing::BorderBox => size,
- BoxSizing::ContentBox =>
- size + self.fragment.border_padding.inline_start_end(),
- }
- } else {
- max(min_inline_size, min(available_inline_size, max_inline_size))
- };
+ let inline_size = if let MaybeAuto::Specified(size) =
+ MaybeAuto::from_style(specified_inline_size, container_size)
+ {
+ match self.fragment.style().get_position().box_sizing {
+ BoxSizing::BorderBox => size,
+ BoxSizing::ContentBox => size + self.fragment.border_padding.inline_start_end(),
+ }
+ } else {
+ max(min_inline_size, min(available_inline_size, max_inline_size))
+ };
self.base.position.size.inline = inline_size + self.fragment.margin.inline_start_end();
// If float speculation failed, fixup our layout, and re-layout all the children.
@@ -1563,12 +1838,15 @@ impl BlockFlow {
self.assign_block_size(layout_context);
}
- debug_assert_eq!(self.fragment.margin_box_inline_size(), self.base.position.size.inline);
+ debug_assert_eq!(
+ self.fragment.margin_box_inline_size(),
+ self.base.position.size.inline
+ );
}
fn is_inline_block_or_inline_flex(&self) -> bool {
self.fragment.style().get_box().display == Display::InlineBlock ||
- self.fragment.style().get_box().display == Display::InlineFlex
+ self.fragment.style().get_box().display == Display::InlineFlex
}
/// Computes the content portion (only) of the intrinsic inline sizes of this flow. This is
@@ -1578,9 +1856,11 @@ impl BlockFlow {
let (border_padding, margin) = self.fragment.surrounding_intrinsic_inline_size();
IntrinsicISizes {
minimum_inline_size: self.base.intrinsic_inline_sizes.minimum_inline_size -
- border_padding - margin,
+ border_padding -
+ margin,
preferred_inline_size: self.base.intrinsic_inline_sizes.preferred_inline_size -
- border_padding - margin,
+ border_padding -
+ margin,
}
}
@@ -1599,9 +1879,13 @@ impl BlockFlow {
} else {
flags.remove(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS);
for kid in self.base.children.iter() {
- if kid.base().flags.contains(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS) {
+ if kid
+ .base()
+ .flags
+ .contains(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS)
+ {
flags.insert(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS);
- break
+ break;
}
}
}
@@ -1617,15 +1901,21 @@ impl BlockFlow {
let (mut left_float_width_accumulator, mut right_float_width_accumulator) = (Au(0), Au(0));
let mut preferred_inline_size_of_children_without_text_or_replaced_fragments = Au(0);
for kid in self.base.child_iter_mut() {
- if kid.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) || !consult_children {
- continue
+ if kid
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) ||
+ !consult_children
+ {
+ continue;
}
let child_base = kid.mut_base();
let float_kind = child_base.flags.float_kind();
- computation.content_intrinsic_sizes.minimum_inline_size =
- max(computation.content_intrinsic_sizes.minimum_inline_size,
- child_base.intrinsic_inline_sizes.minimum_inline_size);
+ computation.content_intrinsic_sizes.minimum_inline_size = max(
+ computation.content_intrinsic_sizes.minimum_inline_size,
+ child_base.intrinsic_inline_sizes.minimum_inline_size,
+ );
if child_base.flags.contains(FlowFlags::CLEARS_LEFT) {
left_float_width = max(left_float_width, left_float_width_accumulator);
@@ -1636,25 +1926,34 @@ impl BlockFlow {
right_float_width_accumulator = Au(0)
}
- match (float_kind, child_base.flags.contains(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS)) {
+ match (
+ float_kind,
+ child_base
+ .flags
+ .contains(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS),
+ ) {
(Float::None, true) => {
- computation.content_intrinsic_sizes.preferred_inline_size =
- max(computation.content_intrinsic_sizes.preferred_inline_size,
- child_base.intrinsic_inline_sizes.preferred_inline_size);
- }
+ computation.content_intrinsic_sizes.preferred_inline_size = max(
+ computation.content_intrinsic_sizes.preferred_inline_size,
+ child_base.intrinsic_inline_sizes.preferred_inline_size,
+ );
+ },
(Float::None, false) => {
preferred_inline_size_of_children_without_text_or_replaced_fragments = max(
preferred_inline_size_of_children_without_text_or_replaced_fragments,
- child_base.intrinsic_inline_sizes.preferred_inline_size)
- }
+ child_base.intrinsic_inline_sizes.preferred_inline_size,
+ )
+ },
(Float::Left, _) => {
- left_float_width_accumulator = left_float_width_accumulator +
- child_base.intrinsic_inline_sizes.preferred_inline_size;
- }
+ left_float_width_accumulator = left_float_width_accumulator + child_base
+ .intrinsic_inline_sizes
+ .preferred_inline_size;
+ },
(Float::Right, _) => {
- right_float_width_accumulator = right_float_width_accumulator +
- child_base.intrinsic_inline_sizes.preferred_inline_size;
- }
+ right_float_width_accumulator = right_float_width_accumulator + child_base
+ .intrinsic_inline_sizes
+ .preferred_inline_size;
+ },
}
}
@@ -1662,37 +1961,50 @@ impl BlockFlow {
right_float_width = max(right_float_width, right_float_width_accumulator);
computation.content_intrinsic_sizes.preferred_inline_size =
- computation.content_intrinsic_sizes.preferred_inline_size + left_float_width +
- right_float_width;
- computation.content_intrinsic_sizes.preferred_inline_size =
- max(computation.content_intrinsic_sizes.preferred_inline_size,
- preferred_inline_size_of_children_without_text_or_replaced_fragments);
+ computation.content_intrinsic_sizes.preferred_inline_size +
+ left_float_width +
+ right_float_width;
+ computation.content_intrinsic_sizes.preferred_inline_size = max(
+ computation.content_intrinsic_sizes.preferred_inline_size,
+ preferred_inline_size_of_children_without_text_or_replaced_fragments,
+ );
self.base.intrinsic_inline_sizes = computation.finish();
self.base.flags = flags
}
pub fn overflow_style_may_require_clip_scroll_node(&self) -> bool {
- match (self.fragment.style().get_box().overflow_x,
- self.fragment.style().get_box().overflow_y) {
- (StyleOverflow::Auto, _) | (StyleOverflow::Scroll, _) | (StyleOverflow::Hidden, _) |
- (_, StyleOverflow::Auto) | (_, StyleOverflow::Scroll) | (_, StyleOverflow::Hidden) =>
- true,
+ match (
+ self.fragment.style().get_box().overflow_x,
+ self.fragment.style().get_box().overflow_y,
+ ) {
+ (StyleOverflow::Auto, _) |
+ (StyleOverflow::Scroll, _) |
+ (StyleOverflow::Hidden, _) |
+ (_, StyleOverflow::Auto) |
+ (_, StyleOverflow::Scroll) |
+ (_, StyleOverflow::Hidden) => true,
(_, _) => false,
}
}
pub fn compute_inline_sizes(&mut self, shared_context: &SharedStyleContext) {
- if !self.base.restyle_damage.intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW) {
- return
+ if !self
+ .base
+ .restyle_damage
+ .intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW)
+ {
+ return;
}
- debug!("assign_inline_sizes({}): assigning inline_size for flow",
- if self.base.flags.is_float() {
- "float"
- } else {
- "block"
- });
+ debug!(
+ "assign_inline_sizes({}): assigning inline_size for flow",
+ if self.base.flags.is_float() {
+ "float"
+ } else {
+ "block"
+ }
+ );
self.base.floats = Floats::new(self.base.writing_mode);
@@ -1712,8 +2024,9 @@ impl BlockFlow {
if self.is_root() {
debug!("Setting root position");
self.base.position.start = LogicalPoint::zero(self.base.writing_mode);
- self.base.block_container_inline_size = LogicalSize::from_physical(
- self.base.writing_mode, shared_context.viewport_size()).inline;
+ self.base.block_container_inline_size =
+ LogicalSize::from_physical(self.base.writing_mode, shared_context.viewport_size())
+ .inline;
self.base.block_container_writing_mode = self.base.writing_mode;
}
}
@@ -1721,14 +2034,14 @@ impl BlockFlow {
fn guess_inline_size_for_block_formatting_context_if_necessary(&mut self) {
// We don't need to guess anything unless this is a block formatting context.
if self.formatting_context_type() != FormattingContextType::Block {
- return
+ return;
}
// If `max-width` is set, then don't perform this speculation. We guess that the
// page set `max-width` in order to avoid hitting floats. The search box on Google
// SERPs falls into this category.
if self.fragment.style.max_inline_size() != LengthOrPercentageOrNone::None {
- return
+ return;
}
// At this point, we know we can't precisely compute the inline-size of this block now,
@@ -1736,39 +2049,51 @@ impl BlockFlow {
// inline-size computed above minus the inline-size of the previous left and/or right
// floats.
let speculated_left_float_size = if self.fragment.margin.inline_start >= Au(0) &&
- self.base.speculated_float_placement_in.left > self.fragment.margin.inline_start {
+ self.base.speculated_float_placement_in.left > self.fragment.margin.inline_start
+ {
self.base.speculated_float_placement_in.left - self.fragment.margin.inline_start
} else {
Au(0)
};
let speculated_right_float_size = if self.fragment.margin.inline_end >= Au(0) &&
- self.base.speculated_float_placement_in.right > self.fragment.margin.inline_end {
+ self.base.speculated_float_placement_in.right > self.fragment.margin.inline_end
+ {
self.base.speculated_float_placement_in.right - self.fragment.margin.inline_end
} else {
Au(0)
};
self.fragment.border_box.size.inline = self.fragment.border_box.size.inline -
- speculated_left_float_size - speculated_right_float_size
+ speculated_left_float_size -
+ speculated_right_float_size
}
fn definitely_has_zero_block_size(&self) -> bool {
- if !self.fragment.style.content_block_size().is_definitely_zero() {
- return false
+ if !self
+ .fragment
+ .style
+ .content_block_size()
+ .is_definitely_zero()
+ {
+ return false;
}
let border_width = self.fragment.border_width();
if border_width.block_start != Au(0) || border_width.block_end != Au(0) {
- return false
+ return false;
}
let padding = self.fragment.style.logical_padding();
padding.block_start.is_definitely_zero() && padding.block_end.is_definitely_zero()
}
pub fn is_inline_flex_item(&self) -> bool {
- self.fragment.flags.contains(FragmentFlags::IS_INLINE_FLEX_ITEM)
+ self.fragment
+ .flags
+ .contains(FragmentFlags::IS_INLINE_FLEX_ITEM)
}
pub fn is_block_flex_item(&self) -> bool {
- self.fragment.flags.contains(FragmentFlags::IS_BLOCK_FLEX_ITEM)
+ self.fragment
+ .flags
+ .contains(FragmentFlags::IS_BLOCK_FLEX_ITEM)
}
pub fn mark_scrolling_overflow(&mut self, has_scrolling_overflow: bool) {
@@ -1785,22 +2110,30 @@ impl BlockFlow {
// Return offset from original position because of `position: sticky`.
pub fn sticky_position(&self) -> SideOffsets2D<MaybeAuto> {
- let containing_block_size = &self.base.early_absolute_position_info
- .relative_containing_block_size;
- let writing_mode = self.base.early_absolute_position_info.relative_containing_block_mode;
+ let containing_block_size = &self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size;
+ let writing_mode = self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_mode;
let offsets = self.fragment.style().logical_position();
- let as_margins = LogicalMargin::new(writing_mode,
+ let as_margins = LogicalMargin::new(
+ writing_mode,
MaybeAuto::from_style(offsets.block_start, containing_block_size.inline),
MaybeAuto::from_style(offsets.inline_end, containing_block_size.inline),
MaybeAuto::from_style(offsets.block_end, containing_block_size.inline),
- MaybeAuto::from_style(offsets.inline_start, containing_block_size.inline));
+ MaybeAuto::from_style(offsets.inline_start, containing_block_size.inline),
+ );
as_margins.to_physical(writing_mode)
}
pub fn background_border_section(&self) -> DisplayListSection {
if self.base.flags.is_float() {
DisplayListSection::BackgroundAndBorders
- } else if self.base
+ } else if self
+ .base
.flags
.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
{
@@ -1842,7 +2175,9 @@ impl Flow for BlockFlow {
_ => true,
};
self.bubble_inline_sizes_for_block(consult_children);
- self.fragment.restyle_damage.remove(ServoRestyleDamage::BUBBLE_ISIZES);
+ self.fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::BUBBLE_ISIZES);
}
/// Recursively (top-down) determines the actual inline-size of child contexts and fragments.
@@ -1857,23 +2192,24 @@ impl Flow for BlockFlow {
self.compute_inline_sizes(shared_context);
// Move in from the inline-start border edge.
- let inline_start_content_edge = self.fragment.border_box.start.i +
- self.fragment.border_padding.inline_start;
+ let inline_start_content_edge =
+ self.fragment.border_box.start.i + self.fragment.border_padding.inline_start;
let padding_and_borders = self.fragment.border_padding.inline_start_end();
// Distance from the inline-end margin edge to the inline-end content edge.
let inline_end_content_edge =
- self.fragment.margin.inline_end +
- self.fragment.border_padding.inline_end;
+ self.fragment.margin.inline_end + self.fragment.border_padding.inline_end;
let content_inline_size = self.fragment.border_box.size.inline - padding_and_borders;
- self.propagate_assigned_inline_size_to_children(shared_context,
- inline_start_content_edge,
- inline_end_content_edge,
- content_inline_size,
- |_, _, _, _, _, _| {});
+ self.propagate_assigned_inline_size_to_children(
+ shared_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ content_inline_size,
+ |_, _, _, _, _, _| {},
+ );
}
fn place_float_if_applicable<'a>(&mut self) {
@@ -1882,29 +2218,38 @@ impl Flow for BlockFlow {
}
}
- fn assign_block_size_for_inorder_child_if_necessary(&mut self,
- layout_context: &LayoutContext,
- parent_thread_id: u8,
- content_box: LogicalRect<Au>)
- -> bool {
+ fn assign_block_size_for_inorder_child_if_necessary(
+ &mut self,
+ layout_context: &LayoutContext,
+ parent_thread_id: u8,
+ content_box: LogicalRect<Au>,
+ ) -> bool {
if self.base.flags.is_float() {
- return false
+ return false;
}
let is_formatting_context = self.formatting_context_type() != FormattingContextType::None;
- if !self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) && is_formatting_context {
+ if !self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
+ is_formatting_context
+ {
self.assign_inline_position_for_formatting_context(layout_context, content_box);
}
if (self as &Flow).floats_might_flow_through() {
self.base.thread_id = parent_thread_id;
- if self.base.restyle_damage.intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
- ServoRestyleDamage::REFLOW) {
+ if self
+ .base
+ .restyle_damage
+ .intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW)
+ {
self.assign_block_size(layout_context);
// Don't remove the restyle damage; `assign_block_size` decides whether that is
// appropriate (which in the case of e.g. absolutely-positioned flows, it is not).
}
- return true
+ return true;
}
if is_formatting_context {
@@ -1912,8 +2257,10 @@ impl Flow for BlockFlow {
// translate the floats past us.
let writing_mode = self.base.floats.writing_mode;
let delta = self.base.position.size.block;
- self.base.floats.translate(LogicalSize::new(writing_mode, Au(0), -delta));
- return true
+ self.base
+ .floats
+ .translate(LogicalSize::new(writing_mode, Au(0), -delta));
+ return true;
}
false
@@ -1924,47 +2271,68 @@ impl Flow for BlockFlow {
debug_assert!(remaining.is_none());
}
- fn fragment(&mut self, layout_context: &LayoutContext,
- fragmentation_context: Option<FragmentationContext>)
- -> Option<Arc<Flow>> {
+ fn fragment(
+ &mut self,
+ layout_context: &LayoutContext,
+ fragmentation_context: Option<FragmentationContext>,
+ ) -> Option<Arc<Flow>> {
if self.fragment.is_replaced() {
- let _scope = layout_debug_scope!("assign_replaced_block_size_if_necessary {:x}",
- self.base.debug_id());
+ let _scope = layout_debug_scope!(
+ "assign_replaced_block_size_if_necessary {:x}",
+ self.base.debug_id()
+ );
// Assign block-size for fragment if it is an image fragment.
self.fragment.assign_replaced_block_size_if_necessary();
- if !self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if !self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
self.base.position.size.block = self.fragment.border_box.size.block;
- let mut block_start = AdjoiningMargins::from_margin(self.fragment.margin.block_start);
+ let mut block_start =
+ AdjoiningMargins::from_margin(self.fragment.margin.block_start);
let block_end = AdjoiningMargins::from_margin(self.fragment.margin.block_end);
if self.fragment.border_box.size.block == Au(0) {
block_start.union(block_end);
- self.base.collapsible_margins = CollapsibleMargins::CollapseThrough(block_start);
+ self.base.collapsible_margins =
+ CollapsibleMargins::CollapseThrough(block_start);
} else {
- self.base.collapsible_margins = CollapsibleMargins::Collapse(block_start, block_end);
+ self.base.collapsible_margins =
+ CollapsibleMargins::Collapse(block_start, block_end);
}
- self.base.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
- self.fragment.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
- ServoRestyleDamage::REFLOW);
+ self.base
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
}
None
} else if self.is_root() ||
- self.formatting_context_type() != FormattingContextType::None ||
- self.base.flags.contains(FlowFlags::MARGINS_CANNOT_COLLAPSE) {
+ self.formatting_context_type() != FormattingContextType::None ||
+ self.base.flags.contains(FlowFlags::MARGINS_CANNOT_COLLAPSE)
+ {
// Root element margins should never be collapsed according to CSS § 8.3.1.
- debug!("assign_block_size: assigning block_size for root flow {:?}",
- self.base().debug_id());
+ debug!(
+ "assign_block_size: assigning block_size for root flow {:?}",
+ self.base().debug_id()
+ );
self.assign_block_size_block_base(
layout_context,
fragmentation_context,
- MarginsMayCollapseFlag::MarginsMayNotCollapse)
+ MarginsMayCollapseFlag::MarginsMayNotCollapse,
+ )
} else {
- debug!("assign_block_size: assigning block_size for block {:?}",
- self.base().debug_id());
+ debug!(
+ "assign_block_size: assigning block_size for block {:?}",
+ self.base().debug_id()
+ );
self.assign_block_size_block_base(
layout_context,
fragmentation_context,
- MarginsMayCollapseFlag::MarginsMayCollapse)
+ MarginsMayCollapseFlag::MarginsMayCollapse,
+ )
}
}
@@ -1977,9 +2345,16 @@ impl Flow for BlockFlow {
self.base.clip = Rect::max_rect();
}
- if self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
- let position_start = self.base.position.start.to_physical(self.base.writing_mode,
- container_size);
+ if self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
+ let position_start = self
+ .base
+ .position
+ .start
+ .to_physical(self.base.writing_mode, container_size);
// Compute our position relative to the nearest ancestor stacking context. This will be
// passed down later as part of containing block details for absolute descendants.
@@ -1991,21 +2366,38 @@ impl Flow for BlockFlow {
// flow w.r.t. the containing block.
self.base
.late_absolute_position_info
- .stacking_relative_position_of_absolute_containing_block + position_start.to_vector()
+ .stacking_relative_position_of_absolute_containing_block +
+ position_start.to_vector()
};
if !self.base.writing_mode.is_vertical() {
- if !self.base.flags.contains(FlowFlags::INLINE_POSITION_IS_STATIC) {
+ if !self
+ .base
+ .flags
+ .contains(FlowFlags::INLINE_POSITION_IS_STATIC)
+ {
self.base.stacking_relative_position.x = absolute_stacking_relative_position.x
}
- if !self.base.flags.contains(FlowFlags::BLOCK_POSITION_IS_STATIC) {
+ if !self
+ .base
+ .flags
+ .contains(FlowFlags::BLOCK_POSITION_IS_STATIC)
+ {
self.base.stacking_relative_position.y = absolute_stacking_relative_position.y
}
} else {
- if !self.base.flags.contains(FlowFlags::INLINE_POSITION_IS_STATIC) {
+ if !self
+ .base
+ .flags
+ .contains(FlowFlags::INLINE_POSITION_IS_STATIC)
+ {
self.base.stacking_relative_position.y = absolute_stacking_relative_position.y
}
- if !self.base.flags.contains(FlowFlags::BLOCK_POSITION_IS_STATIC) {
+ if !self
+ .base
+ .flags
+ .contains(FlowFlags::BLOCK_POSITION_IS_STATIC)
+ {
self.base.stacking_relative_position.x = absolute_stacking_relative_position.x
}
}
@@ -2014,28 +2406,33 @@ impl Flow for BlockFlow {
// For relatively-positioned descendants, the containing block formed by a block is just
// the content box. The containing block for absolutely-positioned descendants, on the
// other hand, is established in other circumstances (see `is_absolute_containing_block').
- let relative_offset =
- self.fragment.relative_position(&self.base
- .early_absolute_position_info
- .relative_containing_block_size);
+ let relative_offset = self.fragment.relative_position(
+ &self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size,
+ );
if self.is_absolute_containing_block() {
- let border_box_origin = (self.fragment.border_box -
- self.fragment.style.logical_border_width()).start;
+ let border_box_origin =
+ (self.fragment.border_box - self.fragment.style.logical_border_width()).start;
self.base
.late_absolute_position_info
.stacking_relative_position_of_absolute_containing_block =
- self.base.stacking_relative_position.to_point() +
- (border_box_origin + relative_offset).to_physical(self.base.writing_mode,
- container_size).to_vector()
+ self.base.stacking_relative_position.to_point() +
+ (border_box_origin + relative_offset)
+ .to_physical(self.base.writing_mode, container_size)
+ .to_vector()
}
// Compute absolute position info for children.
let stacking_relative_position_of_absolute_containing_block_for_children =
if self.fragment.establishes_stacking_context() {
let logical_border_width = self.fragment.style().logical_border_width();
- let position = LogicalPoint::new(self.base.writing_mode,
- logical_border_width.inline_start,
- logical_border_width.block_start);
+ let position = LogicalPoint::new(
+ self.base.writing_mode,
+ logical_border_width.inline_start,
+ logical_border_width.block_start,
+ );
let position = position.to_physical(self.base.writing_mode, container_size);
// Some blocks establish a stacking context, but not a containing block for
@@ -2061,7 +2458,9 @@ impl Flow for BlockFlow {
self.base.position.size.to_physical(self.base.writing_mode);
// Compute the origin and clipping rectangle for children.
- let relative_offset = relative_offset.to_physical(self.base.writing_mode).to_vector();
+ let relative_offset = relative_offset
+ .to_physical(self.base.writing_mode)
+ .to_vector();
let is_stacking_context = self.fragment.establishes_stacking_context();
let origin_for_children = if is_stacking_context {
// We establish a stacking context, so the position of our children is vertically
@@ -2078,36 +2477,48 @@ impl Flow for BlockFlow {
// Process children.
for kid in self.base.child_iter_mut() {
- if kid.base().flags.contains(FlowFlags::INLINE_POSITION_IS_STATIC) ||
- kid.base().flags.contains(FlowFlags::BLOCK_POSITION_IS_STATIC) {
+ if kid
+ .base()
+ .flags
+ .contains(FlowFlags::INLINE_POSITION_IS_STATIC) ||
+ kid.base()
+ .flags
+ .contains(FlowFlags::BLOCK_POSITION_IS_STATIC)
+ {
let kid_base = kid.mut_base();
- let physical_position = kid_base.position.to_physical(kid_base.writing_mode,
- container_size_for_children);
+ let physical_position = kid_base
+ .position
+ .to_physical(kid_base.writing_mode, container_size_for_children);
// Set the inline and block positions as necessary.
if !kid_base.writing_mode.is_vertical() {
- if kid_base.flags.contains(FlowFlags::INLINE_POSITION_IS_STATIC) {
- kid_base.stacking_relative_position.x = origin_for_children.x +
- physical_position.origin.x
+ if kid_base
+ .flags
+ .contains(FlowFlags::INLINE_POSITION_IS_STATIC)
+ {
+ kid_base.stacking_relative_position.x =
+ origin_for_children.x + physical_position.origin.x
}
if kid_base.flags.contains(FlowFlags::BLOCK_POSITION_IS_STATIC) {
- kid_base.stacking_relative_position.y = origin_for_children.y +
- physical_position.origin.y
+ kid_base.stacking_relative_position.y =
+ origin_for_children.y + physical_position.origin.y
}
} else {
- if kid_base.flags.contains(FlowFlags::INLINE_POSITION_IS_STATIC) {
- kid_base.stacking_relative_position.y = origin_for_children.y +
- physical_position.origin.y
+ if kid_base
+ .flags
+ .contains(FlowFlags::INLINE_POSITION_IS_STATIC)
+ {
+ kid_base.stacking_relative_position.y =
+ origin_for_children.y + physical_position.origin.y
}
if kid_base.flags.contains(FlowFlags::BLOCK_POSITION_IS_STATIC) {
- kid_base.stacking_relative_position.x = origin_for_children.x +
- physical_position.origin.x
+ kid_base.stacking_relative_position.x =
+ origin_for_children.x + physical_position.origin.x
}
}
}
- kid.mut_base().late_absolute_position_info =
- late_absolute_position_info_for_children;
+ kid.mut_base().late_absolute_position_info = late_absolute_position_info_for_children;
}
}
@@ -2132,8 +2543,9 @@ impl Flow for BlockFlow {
/// Returns true if this flow contains fragments that are roots of an absolute flow tree.
fn contains_roots_of_absolute_flow_tree(&self) -> bool {
- self.contains_relatively_positioned_fragments() || self.is_root() ||
- self.fragment.has_filter_transform_or_perspective()
+ self.contains_relatively_positioned_fragments() ||
+ self.is_root() ||
+ self.fragment.has_filter_transform_or_perspective()
}
/// Returns true if this is an absolute containing block.
@@ -2142,21 +2554,27 @@ impl Flow for BlockFlow {
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- if self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
- self.fragment.style().logical_position().inline_start ==
- LengthOrPercentageOrAuto::Auto &&
- self.fragment.style().logical_position().inline_end ==
- LengthOrPercentageOrAuto::Auto {
+ if self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
+ self.fragment.style().logical_position().inline_start ==
+ LengthOrPercentageOrAuto::Auto &&
+ self.fragment.style().logical_position().inline_end == LengthOrPercentageOrAuto::Auto
+ {
self.base.position.start.i = inline_position
}
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- if self.base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
- self.fragment.style().logical_position().block_start ==
- LengthOrPercentageOrAuto::Auto &&
- self.fragment.style().logical_position().block_end ==
- LengthOrPercentageOrAuto::Auto {
+ if self
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) &&
+ self.fragment.style().logical_position().block_start ==
+ LengthOrPercentageOrAuto::Auto &&
+ self.fragment.style().logical_position().block_end == LengthOrPercentageOrAuto::Auto
+ {
self.base.position.start.b = block_position
}
}
@@ -2175,33 +2593,43 @@ impl Flow for BlockFlow {
fn compute_overflow(&self) -> Overflow {
let flow_size = self.base.position.size.to_physical(self.base.writing_mode);
- let overflow = self.fragment.compute_overflow(&flow_size,
- &self.base
- .early_absolute_position_info
- .relative_containing_block_size);
+ let overflow = self.fragment.compute_overflow(
+ &flow_size,
+ &self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size,
+ );
overflow
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
if !iterator.should_process(&self.fragment) {
- return
+ return;
}
- iterator.process(&self.fragment,
- level,
- &self.fragment
- .stacking_relative_border_box(&self.base.stacking_relative_position,
- &self.base
- .early_absolute_position_info
- .relative_containing_block_size,
- self.base
- .early_absolute_position_info
- .relative_containing_block_mode,
- CoordinateSystem::Own)
- .translate(&stacking_context_position.to_vector()));
+ iterator.process(
+ &self.fragment,
+ level,
+ &self
+ .fragment
+ .stacking_relative_border_box(
+ &self.base.stacking_relative_position,
+ &self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size,
+ self.base
+ .early_absolute_position_info
+ .relative_containing_block_mode,
+ CoordinateSystem::Own,
+ ).translate(&stacking_context_position.to_vector()),
+ );
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
@@ -2215,11 +2643,13 @@ impl Flow for BlockFlow {
impl fmt::Debug for BlockFlow {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f,
- "{:?}({:x}) {:?}",
- self.class(),
- self.base.debug_id(),
- self.base)
+ write!(
+ f,
+ "{:?}({:x}) {:?}",
+ self.class(),
+ self.base.debug_id(),
+ self.base
+ )
}
}
@@ -2236,14 +2666,15 @@ pub struct ISizeConstraintInput {
}
impl ISizeConstraintInput {
- pub fn new(computed_inline_size: MaybeAuto,
- inline_start_margin: MaybeAuto,
- inline_end_margin: MaybeAuto,
- inline_start: MaybeAuto,
- inline_end: MaybeAuto,
- text_align: TextAlign,
- available_inline_size: Au)
- -> ISizeConstraintInput {
+ pub fn new(
+ computed_inline_size: MaybeAuto,
+ inline_start_margin: MaybeAuto,
+ inline_end_margin: MaybeAuto,
+ inline_start: MaybeAuto,
+ inline_end: MaybeAuto,
+ text_align: TextAlign,
+ available_inline_size: Au,
+ ) -> ISizeConstraintInput {
ISizeConstraintInput {
computed_inline_size: computed_inline_size,
inline_start_margin: inline_start_margin,
@@ -2262,12 +2693,15 @@ pub struct ISizeConstraintSolution {
pub inline_start: Au,
pub inline_size: Au,
pub margin_inline_start: Au,
- pub margin_inline_end: Au
+ pub margin_inline_end: Au,
}
impl ISizeConstraintSolution {
- pub fn new(inline_size: Au, margin_inline_start: Au, margin_inline_end: Au)
- -> ISizeConstraintSolution {
+ pub fn new(
+ inline_size: Au,
+ margin_inline_start: Au,
+ margin_inline_end: Au,
+ ) -> ISizeConstraintSolution {
ISizeConstraintSolution {
inline_start: Au(0),
inline_size: inline_size,
@@ -2276,11 +2710,12 @@ impl ISizeConstraintSolution {
}
}
- fn for_absolute_flow(inline_start: Au,
- inline_size: Au,
- margin_inline_start: Au,
- margin_inline_end: Au)
- -> ISizeConstraintSolution {
+ fn for_absolute_flow(
+ inline_start: Au,
+ inline_size: Au,
+ margin_inline_start: Au,
+ margin_inline_end: Au,
+ ) -> ISizeConstraintSolution {
ISizeConstraintSolution {
inline_start: inline_start,
inline_size: inline_size,
@@ -2296,54 +2731,57 @@ impl ISizeConstraintSolution {
pub trait ISizeAndMarginsComputer {
/// Instructs the fragment to compute its border and padding.
fn compute_border_and_padding(&self, block: &mut BlockFlow, containing_block_inline_size: Au) {
- block.fragment.compute_border_and_padding(containing_block_inline_size);
+ block
+ .fragment
+ .compute_border_and_padding(containing_block_inline_size);
}
/// Compute the inputs for the ISize constraint equation.
///
/// This is called only once to compute the initial inputs. For calculations involving
/// minimum and maximum inline-size, we don't need to recompute these.
- fn compute_inline_size_constraint_inputs(&self,
- block: &mut BlockFlow,
- parent_flow_inline_size: Au,
- shared_context: &SharedStyleContext)
- -> ISizeConstraintInput {
+ fn compute_inline_size_constraint_inputs(
+ &self,
+ block: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ shared_context: &SharedStyleContext,
+ ) -> ISizeConstraintInput {
let containing_block_inline_size =
self.containing_block_inline_size(block, parent_flow_inline_size, shared_context);
- block.fragment.compute_block_direction_margins(containing_block_inline_size);
- block.fragment.compute_inline_direction_margins(containing_block_inline_size);
+ block
+ .fragment
+ .compute_block_direction_margins(containing_block_inline_size);
+ block
+ .fragment
+ .compute_inline_direction_margins(containing_block_inline_size);
self.compute_border_and_padding(block, containing_block_inline_size);
- let mut computed_inline_size = self.initial_computed_inline_size(block,
- parent_flow_inline_size,
- shared_context);
+ let mut computed_inline_size =
+ self.initial_computed_inline_size(block, parent_flow_inline_size, shared_context);
let style = block.fragment.style();
match (computed_inline_size, style.get_position().box_sizing) {
(MaybeAuto::Specified(size), BoxSizing::BorderBox) => {
computed_inline_size =
MaybeAuto::Specified(size - block.fragment.border_padding.inline_start_end())
- }
- (MaybeAuto::Auto, BoxSizing::BorderBox) |
- (_, BoxSizing::ContentBox) => {}
+ },
+ (MaybeAuto::Auto, BoxSizing::BorderBox) | (_, BoxSizing::ContentBox) => {},
}
let margin = style.logical_margin();
let position = style.logical_position();
- let available_inline_size = containing_block_inline_size -
- block.fragment.border_padding.inline_start_end();
- ISizeConstraintInput::new(computed_inline_size,
- MaybeAuto::from_style(margin.inline_start,
- containing_block_inline_size),
- MaybeAuto::from_style(margin.inline_end,
- containing_block_inline_size),
- MaybeAuto::from_style(position.inline_start,
- containing_block_inline_size),
- MaybeAuto::from_style(position.inline_end,
- containing_block_inline_size),
- style.get_inherited_text().text_align,
- available_inline_size)
+ let available_inline_size =
+ containing_block_inline_size - block.fragment.border_padding.inline_start_end();
+ ISizeConstraintInput::new(
+ computed_inline_size,
+ MaybeAuto::from_style(margin.inline_start, containing_block_inline_size),
+ MaybeAuto::from_style(margin.inline_end, containing_block_inline_size),
+ MaybeAuto::from_style(position.inline_start, containing_block_inline_size),
+ MaybeAuto::from_style(position.inline_end, containing_block_inline_size),
+ style.get_inherited_text().text_align,
+ available_inline_size,
+ )
}
/// Set the used values for inline-size and margins from the relevant constraint equation.
@@ -2355,9 +2793,11 @@ pub trait ISizeAndMarginsComputer {
/// * Inline-start coordinate of this flow's box;
/// * Inline-start coordinate of the flow with respect to its containing block (if this is an
/// absolute flow).
- fn set_inline_size_constraint_solutions(&self,
- block: &mut BlockFlow,
- solution: ISizeConstraintSolution) {
+ fn set_inline_size_constraint_solutions(
+ &self,
+ block: &mut BlockFlow,
+ solution: ISizeConstraintSolution,
+ ) {
let inline_size;
let extra_inline_size_from_margin;
{
@@ -2388,8 +2828,8 @@ pub trait ISizeAndMarginsComputer {
// To calculate the total size of this block, we also need to account for any
// additional size contribution from positive margins. Negative margins means the block
// isn't made larger at all by the margin.
- extra_inline_size_from_margin = max(Au(0), fragment.margin.inline_start) +
- max(Au(0), fragment.margin.inline_end);
+ extra_inline_size_from_margin =
+ max(Au(0), fragment.margin.inline_start) + max(Au(0), fragment.margin.inline_end);
}
// We also resize the block itself, to ensure that overflow is not calculated
@@ -2399,45 +2839,55 @@ pub trait ISizeAndMarginsComputer {
}
/// Set the inline coordinate of the given flow if it is absolutely positioned.
- fn set_inline_position_of_flow_if_necessary(&self,
- _: &mut BlockFlow,
- _: ISizeConstraintSolution) {}
+ fn set_inline_position_of_flow_if_necessary(
+ &self,
+ _: &mut BlockFlow,
+ _: ISizeConstraintSolution,
+ ) {
+ }
/// Solve the inline-size and margins constraints for this block flow.
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution;
-
- fn initial_computed_inline_size(&self,
- block: &mut BlockFlow,
- parent_flow_inline_size: Au,
- shared_context: &SharedStyleContext)
- -> MaybeAuto {
- MaybeAuto::from_style(block.fragment().style().content_inline_size(),
- self.containing_block_inline_size(block,
- parent_flow_inline_size,
- shared_context))
- }
-
- fn containing_block_inline_size(&self,
- _: &mut BlockFlow,
- parent_flow_inline_size: Au,
- _: &SharedStyleContext)
- -> Au {
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution;
+
+ fn initial_computed_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ shared_context: &SharedStyleContext,
+ ) -> MaybeAuto {
+ MaybeAuto::from_style(
+ block.fragment().style().content_inline_size(),
+ self.containing_block_inline_size(block, parent_flow_inline_size, shared_context),
+ )
+ }
+
+ fn containing_block_inline_size(
+ &self,
+ _: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ _: &SharedStyleContext,
+ ) -> Au {
parent_flow_inline_size
}
/// Compute the used value of inline-size, taking care of min-inline-size and max-inline-size.
///
/// CSS Section 10.4: Minimum and Maximum inline-sizes
- fn compute_used_inline_size(&self,
- block: &mut BlockFlow,
- shared_context: &SharedStyleContext,
- parent_flow_inline_size: Au) {
- let mut input = self.compute_inline_size_constraint_inputs(block,
- parent_flow_inline_size,
- shared_context);
+ fn compute_used_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ shared_context: &SharedStyleContext,
+ parent_flow_inline_size: Au,
+ ) {
+ let mut input = self.compute_inline_size_constraint_inputs(
+ block,
+ parent_flow_inline_size,
+ shared_context,
+ );
let containing_block_inline_size =
self.containing_block_inline_size(block, parent_flow_inline_size, shared_context);
@@ -2447,19 +2897,27 @@ pub trait ISizeAndMarginsComputer {
// If the tentative used inline-size is greater than 'max-inline-size', inline-size should
// be recalculated, but this time using the computed value of 'max-inline-size' as the
// computed value for 'inline-size'.
- match block.fragment().style().max_inline_size().to_used_value(containing_block_inline_size) {
+ match block
+ .fragment()
+ .style()
+ .max_inline_size()
+ .to_used_value(containing_block_inline_size)
+ {
Some(max_inline_size) if max_inline_size < solution.inline_size => {
input.computed_inline_size = MaybeAuto::Specified(max_inline_size);
solution = self.solve_inline_size_constraints(block, &input);
- }
- _ => {}
+ },
+ _ => {},
}
// If the resulting inline-size is smaller than 'min-inline-size', inline-size should be
// recalculated, but this time using the value of 'min-inline-size' as the computed value
// for 'inline-size'.
- let computed_min_inline_size =
- block.fragment().style().min_inline_size().to_used_value(containing_block_inline_size);
+ let computed_min_inline_size = block
+ .fragment()
+ .style()
+ .min_inline_size()
+ .to_used_value(containing_block_inline_size);
if computed_min_inline_size > solution.inline_size {
input.computed_inline_size = MaybeAuto::Specified(computed_min_inline_size);
solution = self.solve_inline_size_constraints(block, &input);
@@ -2477,15 +2935,17 @@ pub trait ISizeAndMarginsComputer {
/// Constraint Equation: margin-inline-start + margin-inline-end + inline-size =
/// available_inline-size
/// where available_inline-size = CB inline-size - (horizontal border + padding)
- fn solve_block_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
- let (computed_inline_size, inline_start_margin, inline_end_margin, available_inline_size) =
- (input.computed_inline_size,
- input.inline_start_margin,
- input.inline_end_margin,
- input.available_inline_size);
+ fn solve_block_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
+ let (computed_inline_size, inline_start_margin, inline_end_margin, available_inline_size) = (
+ input.computed_inline_size,
+ input.inline_start_margin,
+ input.inline_end_margin,
+ input.available_inline_size,
+ );
// Check for direction of parent flow (NOT Containing Block)
let block_mode = block.base.writing_mode;
@@ -2504,11 +2964,14 @@ pub trait ISizeAndMarginsComputer {
let inline_end = inline_end_margin.specified_or_zero();
if (inline_start + inline_end + inline_size) > available_inline_size {
- (MaybeAuto::Specified(inline_start), MaybeAuto::Specified(inline_end))
+ (
+ MaybeAuto::Specified(inline_start),
+ MaybeAuto::Specified(inline_end),
+ )
} else {
(inline_start_margin, inline_end_margin)
}
- }
+ },
};
// Invariant: inline-start_margin + inline-size + inline-end_margin ==
@@ -2516,9 +2979,11 @@ pub trait ISizeAndMarginsComputer {
let (inline_start_margin, inline_size, inline_end_margin) =
match (inline_start_margin, computed_inline_size, inline_end_margin) {
// If all have a computed value other than 'auto', the system is over-constrained.
- (MaybeAuto::Specified(margin_start),
- MaybeAuto::Specified(inline_size),
- MaybeAuto::Specified(margin_end)) => {
+ (
+ MaybeAuto::Specified(margin_start),
+ MaybeAuto::Specified(inline_size),
+ MaybeAuto::Specified(margin_end),
+ ) => {
// servo_left, servo_right, and servo_center are used to implement
// the "align descendants" rule in HTML5 § 14.2.
if block_align == TextAlign::ServoCenter {
@@ -2533,52 +2998,66 @@ pub trait ISizeAndMarginsComputer {
_ => parent_has_same_direction,
};
if ignore_end_margin {
- (margin_start, inline_size, available_inline_size -
- (margin_start + inline_size))
+ (
+ margin_start,
+ inline_size,
+ available_inline_size - (margin_start + inline_size),
+ )
} else {
- (available_inline_size - (margin_end + inline_size),
- inline_size,
- margin_end)
+ (
+ available_inline_size - (margin_end + inline_size),
+ inline_size,
+ margin_end,
+ )
}
}
- }
+ },
// If exactly one value is 'auto', solve for it
- (MaybeAuto::Auto,
- MaybeAuto::Specified(inline_size),
- MaybeAuto::Specified(margin_end)) =>
- (available_inline_size - (inline_size + margin_end), inline_size, margin_end),
- (MaybeAuto::Specified(margin_start),
- MaybeAuto::Auto,
- MaybeAuto::Specified(margin_end)) => {
- (margin_start,
- available_inline_size - (margin_start + margin_end),
- margin_end)
- }
- (MaybeAuto::Specified(margin_start),
- MaybeAuto::Specified(inline_size),
- MaybeAuto::Auto) => {
- (margin_start,
- inline_size,
- available_inline_size - (margin_start + inline_size))
- }
+ (
+ MaybeAuto::Auto,
+ MaybeAuto::Specified(inline_size),
+ MaybeAuto::Specified(margin_end),
+ ) => (
+ available_inline_size - (inline_size + margin_end),
+ inline_size,
+ margin_end,
+ ),
+ (
+ MaybeAuto::Specified(margin_start),
+ MaybeAuto::Auto,
+ MaybeAuto::Specified(margin_end),
+ ) => (
+ margin_start,
+ available_inline_size - (margin_start + margin_end),
+ margin_end,
+ ),
+ (
+ MaybeAuto::Specified(margin_start),
+ MaybeAuto::Specified(inline_size),
+ MaybeAuto::Auto,
+ ) => (
+ margin_start,
+ inline_size,
+ available_inline_size - (margin_start + inline_size),
+ ),
// If inline-size is set to 'auto', any other 'auto' value becomes '0',
// and inline-size is solved for
(MaybeAuto::Auto, MaybeAuto::Auto, MaybeAuto::Specified(margin_end)) => {
(Au(0), available_inline_size - margin_end, margin_end)
- }
+ },
(MaybeAuto::Specified(margin_start), MaybeAuto::Auto, MaybeAuto::Auto) => {
(margin_start, available_inline_size - margin_start, Au(0))
- }
+ },
(MaybeAuto::Auto, MaybeAuto::Auto, MaybeAuto::Auto) => {
(Au(0), available_inline_size, Au(0))
- }
+ },
// If inline-start and inline-end margins are auto, they become equal
(MaybeAuto::Auto, MaybeAuto::Specified(inline_size), MaybeAuto::Auto) => {
let margin = (available_inline_size - inline_size).scale_by(0.5);
(margin, inline_size, margin)
- }
+ },
};
ISizeConstraintSolution::new(inline_size, inline_start_margin, inline_end_margin)
@@ -2609,10 +3088,11 @@ impl ISizeAndMarginsComputer for AbsoluteNonReplaced {
/// [aka available inline-size]
///
/// Return the solution for the equation.
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
let &ISizeConstraintInput {
computed_inline_size,
inline_start_margin,
@@ -2639,14 +3119,16 @@ impl ISizeAndMarginsComputer for AbsoluteNonReplaced {
// and inline-size Auto.
// Set inline-end to zero to calculate inline-size.
- let inline_size =
- block.get_shrink_to_fit_inline_size(available_inline_size -
- (margin_start + margin_end));
+ let inline_size = block.get_shrink_to_fit_inline_size(
+ available_inline_size - (margin_start + margin_end),
+ );
(Au(0), inline_size, margin_start, margin_end)
- }
- (MaybeAuto::Specified(inline_start),
- MaybeAuto::Specified(inline_end),
- MaybeAuto::Specified(inline_size)) => {
+ },
+ (
+ MaybeAuto::Specified(inline_start),
+ MaybeAuto::Specified(inline_end),
+ MaybeAuto::Specified(inline_size),
+ ) => {
match (inline_start_margin, inline_end_margin) {
(MaybeAuto::Auto, MaybeAuto::Auto) => {
let total_margin_val =
@@ -2662,20 +3144,32 @@ impl ISizeAndMarginsComputer for AbsoluteNonReplaced {
}
} else {
// Equal margins
- (inline_start,
- inline_size,
- total_margin_val.scale_by(0.5),
- total_margin_val.scale_by(0.5))
+ (
+ inline_start,
+ inline_size,
+ total_margin_val.scale_by(0.5),
+ total_margin_val.scale_by(0.5),
+ )
}
- }
+ },
(MaybeAuto::Specified(margin_start), MaybeAuto::Auto) => {
let sum = inline_start + inline_end + inline_size + margin_start;
- (inline_start, inline_size, margin_start, available_inline_size - sum)
- }
+ (
+ inline_start,
+ inline_size,
+ margin_start,
+ available_inline_size - sum,
+ )
+ },
(MaybeAuto::Auto, MaybeAuto::Specified(margin_end)) => {
let sum = inline_start + inline_end + inline_size + margin_end;
- (inline_start, inline_size, available_inline_size - sum, margin_end)
- }
+ (
+ inline_start,
+ inline_size,
+ available_inline_size - sum,
+ margin_end,
+ )
+ },
(MaybeAuto::Specified(margin_start), MaybeAuto::Specified(margin_end)) => {
// Values are over-constrained.
let sum = inline_start + inline_size + margin_start + margin_end;
@@ -2684,40 +3178,58 @@ impl ISizeAndMarginsComputer for AbsoluteNonReplaced {
(inline_start, inline_size, margin_start, margin_end)
} else {
// Ignore value for 'inline-start'
- (available_inline_size - sum,
- inline_size,
- margin_start,
- margin_end)
+ (
+ available_inline_size - sum,
+ inline_size,
+ margin_start,
+ margin_end,
+ )
}
- }
+ },
}
- }
+ },
// For the rest of the cases, auto values for margin are set to 0
// If only one is Auto, solve for it
- (MaybeAuto::Auto,
- MaybeAuto::Specified(inline_end),
- MaybeAuto::Specified(inline_size)) => {
+ (
+ MaybeAuto::Auto,
+ MaybeAuto::Specified(inline_end),
+ MaybeAuto::Specified(inline_size),
+ ) => {
let margin_start = inline_start_margin.specified_or_zero();
let margin_end = inline_end_margin.specified_or_zero();
let sum = inline_end + inline_size + margin_start + margin_end;
- (available_inline_size - sum, inline_size, margin_start, margin_end)
- }
- (MaybeAuto::Specified(inline_start),
- MaybeAuto::Auto,
- MaybeAuto::Specified(inline_size)) => {
+ (
+ available_inline_size - sum,
+ inline_size,
+ margin_start,
+ margin_end,
+ )
+ },
+ (
+ MaybeAuto::Specified(inline_start),
+ MaybeAuto::Auto,
+ MaybeAuto::Specified(inline_size),
+ ) => {
let margin_start = inline_start_margin.specified_or_zero();
let margin_end = inline_end_margin.specified_or_zero();
(inline_start, inline_size, margin_start, margin_end)
- }
- (MaybeAuto::Specified(inline_start),
- MaybeAuto::Specified(inline_end),
- MaybeAuto::Auto) => {
+ },
+ (
+ MaybeAuto::Specified(inline_start),
+ MaybeAuto::Specified(inline_end),
+ MaybeAuto::Auto,
+ ) => {
let margin_start = inline_start_margin.specified_or_zero();
let margin_end = inline_end_margin.specified_or_zero();
let sum = inline_start + inline_end + margin_start + margin_end;
- (inline_start, available_inline_size - sum, margin_start, margin_end)
- }
+ (
+ inline_start,
+ available_inline_size - sum,
+ margin_start,
+ margin_end,
+ )
+ },
// If inline-size is auto, then inline-size is shrink-to-fit. Solve for the
// non-auto value.
@@ -2725,21 +3237,26 @@ impl ISizeAndMarginsComputer for AbsoluteNonReplaced {
let margin_start = inline_start_margin.specified_or_zero();
let margin_end = inline_end_margin.specified_or_zero();
// Set inline-end to zero to calculate inline-size
- let inline_size =
- block.get_shrink_to_fit_inline_size(available_inline_size -
- (margin_start + margin_end));
+ let inline_size = block.get_shrink_to_fit_inline_size(
+ available_inline_size - (margin_start + margin_end),
+ );
(inline_start, inline_size, margin_start, margin_end)
- }
+ },
(MaybeAuto::Auto, MaybeAuto::Specified(inline_end), MaybeAuto::Auto) => {
let margin_start = inline_start_margin.specified_or_zero();
let margin_end = inline_end_margin.specified_or_zero();
// Set inline-start to zero to calculate inline-size
- let inline_size =
- block.get_shrink_to_fit_inline_size(available_inline_size -
- (margin_start + margin_end));
+ let inline_size = block.get_shrink_to_fit_inline_size(
+ available_inline_size - (margin_start + margin_end),
+ );
let sum = inline_end + inline_size + margin_start + margin_end;
- (available_inline_size - sum, inline_size, margin_start, margin_end)
- }
+ (
+ available_inline_size - sum,
+ inline_size,
+ margin_start,
+ margin_end,
+ )
+ },
(MaybeAuto::Auto, MaybeAuto::Auto, MaybeAuto::Specified(inline_size)) => {
let margin_start = inline_start_margin.specified_or_zero();
@@ -2747,28 +3264,39 @@ impl ISizeAndMarginsComputer for AbsoluteNonReplaced {
// Setting 'inline-start' to static position because direction is 'ltr'.
// TODO: Handle 'rtl' when it is implemented.
(Au(0), inline_size, margin_start, margin_end)
- }
+ },
};
- ISizeConstraintSolution::for_absolute_flow(inline_start,
- inline_size,
- margin_inline_start,
- margin_inline_end)
- }
-
- fn containing_block_inline_size(&self,
- block: &mut BlockFlow,
- _: Au,
- shared_context: &SharedStyleContext)
- -> Au {
+ ISizeConstraintSolution::for_absolute_flow(
+ inline_start,
+ inline_size,
+ margin_inline_start,
+ margin_inline_end,
+ )
+ }
+
+ fn containing_block_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ _: Au,
+ shared_context: &SharedStyleContext,
+ ) -> Au {
let opaque_block = OpaqueFlow::from_flow(block);
- block.containing_block_size(&shared_context.viewport_size(), opaque_block).inline
+ block
+ .containing_block_size(&shared_context.viewport_size(), opaque_block)
+ .inline
}
- fn set_inline_position_of_flow_if_necessary(&self,
- block: &mut BlockFlow,
- solution: ISizeConstraintSolution) {
+ fn set_inline_position_of_flow_if_necessary(
+ &self,
+ block: &mut BlockFlow,
+ solution: ISizeConstraintSolution,
+ ) {
// Set the inline position of the absolute flow wrt to its containing block.
- if !block.base.flags.contains(FlowFlags::INLINE_POSITION_IS_STATIC) {
+ if !block
+ .base
+ .flags
+ .contains(FlowFlags::INLINE_POSITION_IS_STATIC)
+ {
block.base.position.start.i = solution.inline_start;
}
}
@@ -2784,8 +3312,11 @@ impl ISizeAndMarginsComputer for AbsoluteReplaced {
/// [aka available_inline-size]
///
/// Return the solution for the equation.
- fn solve_inline_size_constraints(&self, _: &mut BlockFlow, input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ fn solve_inline_size_constraints(
+ &self,
+ _: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
let &ISizeConstraintInput {
computed_inline_size,
inline_start_margin,
@@ -2803,9 +3334,11 @@ impl ISizeAndMarginsComputer for AbsoluteReplaced {
let inline_size = match computed_inline_size {
MaybeAuto::Specified(w) => w,
- _ => panic!("{} {}",
- "The used value for inline_size for absolute replaced flow",
- "should have already been calculated by now.")
+ _ => panic!(
+ "{} {}",
+ "The used value for inline_size for absolute replaced flow",
+ "should have already been calculated by now."
+ ),
};
let (inline_start, inline_size, margin_inline_start, margin_inline_end) =
@@ -2814,86 +3347,115 @@ impl ISizeAndMarginsComputer for AbsoluteReplaced {
let margin_start = inline_start_margin.specified_or_zero();
let margin_end = inline_end_margin.specified_or_zero();
(Au(0), inline_size, margin_start, margin_end)
- }
+ },
// If only one is Auto, solve for it
(MaybeAuto::Auto, MaybeAuto::Specified(inline_end)) => {
let margin_start = inline_start_margin.specified_or_zero();
let margin_end = inline_end_margin.specified_or_zero();
let sum = inline_end + inline_size + margin_start + margin_end;
- (available_inline_size - sum, inline_size, margin_start, margin_end)
- }
+ (
+ available_inline_size - sum,
+ inline_size,
+ margin_start,
+ margin_end,
+ )
+ },
(MaybeAuto::Specified(inline_start), MaybeAuto::Auto) => {
let margin_start = inline_start_margin.specified_or_zero();
let margin_end = inline_end_margin.specified_or_zero();
(inline_start, inline_size, margin_start, margin_end)
- }
+ },
(MaybeAuto::Specified(inline_start), MaybeAuto::Specified(inline_end)) => {
match (inline_start_margin, inline_end_margin) {
(MaybeAuto::Auto, MaybeAuto::Auto) => {
- let total_margin_val = available_inline_size - inline_start -
- inline_end - inline_size;
+ let total_margin_val =
+ available_inline_size - inline_start - inline_end - inline_size;
if total_margin_val < Au(0) {
// margin-inline-start becomes 0 because direction is 'ltr'.
(inline_start, inline_size, Au(0), total_margin_val)
} else {
// Equal margins
- (inline_start,
- inline_size,
- total_margin_val.scale_by(0.5),
- total_margin_val.scale_by(0.5))
+ (
+ inline_start,
+ inline_size,
+ total_margin_val.scale_by(0.5),
+ total_margin_val.scale_by(0.5),
+ )
}
- }
+ },
(MaybeAuto::Specified(margin_start), MaybeAuto::Auto) => {
let sum = inline_start + inline_end + inline_size + margin_start;
- (inline_start, inline_size, margin_start, available_inline_size - sum)
- }
+ (
+ inline_start,
+ inline_size,
+ margin_start,
+ available_inline_size - sum,
+ )
+ },
(MaybeAuto::Auto, MaybeAuto::Specified(margin_end)) => {
let sum = inline_start + inline_end + inline_size + margin_end;
- (inline_start, inline_size, available_inline_size - sum, margin_end)
- }
+ (
+ inline_start,
+ inline_size,
+ available_inline_size - sum,
+ margin_end,
+ )
+ },
(MaybeAuto::Specified(margin_start), MaybeAuto::Specified(margin_end)) => {
// Values are over-constrained.
// Ignore value for 'inline-end' cos direction is 'ltr'.
(inline_start, inline_size, margin_start, margin_end)
- }
+ },
}
- }
+ },
};
- ISizeConstraintSolution::for_absolute_flow(inline_start,
- inline_size,
- margin_inline_start,
- margin_inline_end)
+ ISizeConstraintSolution::for_absolute_flow(
+ inline_start,
+ inline_size,
+ margin_inline_start,
+ margin_inline_end,
+ )
}
/// Calculate used value of inline-size just like we do for inline replaced elements.
- fn initial_computed_inline_size(&self,
- block: &mut BlockFlow,
- _: Au,
- shared_context: &SharedStyleContext)
- -> MaybeAuto {
+ fn initial_computed_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ _: Au,
+ shared_context: &SharedStyleContext,
+ ) -> MaybeAuto {
let opaque_block = OpaqueFlow::from_flow(block);
- let containing_block_inline_size =
- block.containing_block_size(&shared_context.viewport_size(), opaque_block).inline;
+ let containing_block_inline_size = block
+ .containing_block_size(&shared_context.viewport_size(), opaque_block)
+ .inline;
let container_block_size = block.explicit_block_containing_size(shared_context);
let fragment = block.fragment();
- fragment.assign_replaced_inline_size_if_necessary(containing_block_inline_size, container_block_size);
+ fragment.assign_replaced_inline_size_if_necessary(
+ containing_block_inline_size,
+ container_block_size,
+ );
// For replaced absolute flow, the rest of the constraint solving will
// take inline-size to be specified as the value computed here.
MaybeAuto::Specified(fragment.content_box().size.inline)
}
- fn containing_block_inline_size(&self,
- block: &mut BlockFlow,
- _: Au,
- shared_context: &SharedStyleContext)
- -> Au {
+ fn containing_block_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ _: Au,
+ shared_context: &SharedStyleContext,
+ ) -> Au {
let opaque_block = OpaqueFlow::from_flow(block);
- block.containing_block_size(&shared_context.viewport_size(), opaque_block).inline
+ block
+ .containing_block_size(&shared_context.viewport_size(), opaque_block)
+ .inline
}
- fn set_inline_position_of_flow_if_necessary(&self,
- block: &mut BlockFlow,
- solution: ISizeConstraintSolution) {
+ fn set_inline_position_of_flow_if_necessary(
+ &self,
+ block: &mut BlockFlow,
+ solution: ISizeConstraintSolution,
+ ) {
// Set the x-coordinate of the absolute flow wrt to its containing block.
block.base.position.start.i = solution.inline_start;
}
@@ -2901,10 +3463,11 @@ impl ISizeAndMarginsComputer for AbsoluteReplaced {
impl ISizeAndMarginsComputer for BlockNonReplaced {
/// Compute inline-start and inline-end margins and inline-size.
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
self.solve_block_inline_size_constraints(block, input)
}
}
@@ -2914,55 +3477,64 @@ impl ISizeAndMarginsComputer for BlockReplaced {
///
/// ISize has already been calculated. We now calculate the margins just
/// like for non-replaced blocks.
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
match input.computed_inline_size {
MaybeAuto::Specified(_) => {},
MaybeAuto::Auto => {
panic!("BlockReplaced: inline_size should have been computed by now")
- }
+ },
};
self.solve_block_inline_size_constraints(block, input)
}
/// Calculate used value of inline-size just like we do for inline replaced elements.
- fn initial_computed_inline_size(&self,
- block: &mut BlockFlow,
- parent_flow_inline_size: Au,
- shared_context: &SharedStyleContext)
- -> MaybeAuto {
+ fn initial_computed_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ shared_context: &SharedStyleContext,
+ ) -> MaybeAuto {
let container_block_size = block.explicit_block_containing_size(shared_context);
let fragment = block.fragment();
- fragment.assign_replaced_inline_size_if_necessary(parent_flow_inline_size, container_block_size);
+ fragment.assign_replaced_inline_size_if_necessary(
+ parent_flow_inline_size,
+ container_block_size,
+ );
// For replaced block flow, the rest of the constraint solving will
// take inline-size to be specified as the value computed here.
MaybeAuto::Specified(fragment.content_box().size.inline)
}
-
}
impl ISizeAndMarginsComputer for FloatNonReplaced {
/// CSS Section 10.3.5
///
/// If inline-size is computed as 'auto', the used value is the 'shrink-to-fit' inline-size.
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
- let (computed_inline_size, inline_start_margin, inline_end_margin, available_inline_size) =
- (input.computed_inline_size,
- input.inline_start_margin,
- input.inline_end_margin,
- input.available_inline_size);
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
+ let (computed_inline_size, inline_start_margin, inline_end_margin, available_inline_size) = (
+ input.computed_inline_size,
+ input.inline_start_margin,
+ input.inline_end_margin,
+ input.available_inline_size,
+ );
let margin_inline_start = inline_start_margin.specified_or_zero();
let margin_inline_end = inline_end_margin.specified_or_zero();
- let available_inline_size_float = available_inline_size - margin_inline_start -
- margin_inline_end;
+ let available_inline_size_float =
+ available_inline_size - margin_inline_start - margin_inline_end;
let shrink_to_fit = block.get_shrink_to_fit_inline_size(available_inline_size_float);
let inline_size = computed_inline_size.specified_or_default(shrink_to_fit);
- debug!("assign_inline_sizes_float -- inline_size: {:?}", inline_size);
+ debug!(
+ "assign_inline_sizes_float -- inline_size: {:?}",
+ inline_size
+ );
ISizeConstraintSolution::new(inline_size, margin_inline_start, margin_inline_end)
}
}
@@ -2971,29 +3543,44 @@ impl ISizeAndMarginsComputer for FloatReplaced {
/// CSS Section 10.3.5
///
/// If inline-size is computed as 'auto', the used value is the 'shrink-to-fit' inline-size.
- fn solve_inline_size_constraints(&self, _: &mut BlockFlow, input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
- let (computed_inline_size, inline_start_margin, inline_end_margin) =
- (input.computed_inline_size, input.inline_start_margin, input.inline_end_margin);
+ fn solve_inline_size_constraints(
+ &self,
+ _: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
+ let (computed_inline_size, inline_start_margin, inline_end_margin) = (
+ input.computed_inline_size,
+ input.inline_start_margin,
+ input.inline_end_margin,
+ );
let margin_inline_start = inline_start_margin.specified_or_zero();
let margin_inline_end = inline_end_margin.specified_or_zero();
let inline_size = match computed_inline_size {
MaybeAuto::Specified(w) => w,
- MaybeAuto::Auto => panic!("FloatReplaced: inline_size should have been computed by now")
+ MaybeAuto::Auto => {
+ panic!("FloatReplaced: inline_size should have been computed by now")
+ },
};
- debug!("assign_inline_sizes_float -- inline_size: {:?}", inline_size);
+ debug!(
+ "assign_inline_sizes_float -- inline_size: {:?}",
+ inline_size
+ );
ISizeConstraintSolution::new(inline_size, margin_inline_start, margin_inline_end)
}
/// Calculate used value of inline-size just like we do for inline replaced elements.
- fn initial_computed_inline_size(&self,
- block: &mut BlockFlow,
- parent_flow_inline_size: Au,
- shared_context: &SharedStyleContext)
- -> MaybeAuto {
+ fn initial_computed_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ shared_context: &SharedStyleContext,
+ ) -> MaybeAuto {
let container_block_size = block.explicit_block_containing_size(shared_context);
let fragment = block.fragment();
- fragment.assign_replaced_inline_size_if_necessary(parent_flow_inline_size, container_block_size);
+ fragment.assign_replaced_inline_size_if_necessary(
+ parent_flow_inline_size,
+ container_block_size,
+ );
// For replaced block flow, the rest of the constraint solving will
// take inline-size to be specified as the value computed here.
MaybeAuto::Specified(fragment.content_box().size.inline)
@@ -3002,18 +3589,17 @@ impl ISizeAndMarginsComputer for FloatReplaced {
impl ISizeAndMarginsComputer for InlineBlockNonReplaced {
/// Compute inline-start and inline-end margins and inline-size.
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
- let (computed_inline_size,
- inline_start_margin,
- inline_end_margin,
- available_inline_size) =
- (input.computed_inline_size,
- input.inline_start_margin,
- input.inline_end_margin,
- input.available_inline_size);
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
+ let (computed_inline_size, inline_start_margin, inline_end_margin, available_inline_size) = (
+ input.computed_inline_size,
+ input.inline_start_margin,
+ input.inline_end_margin,
+ input.available_inline_size,
+ );
// For inline-blocks, `auto` margins compute to 0.
let inline_start_margin = inline_start_margin.specified_or_zero();
@@ -3022,10 +3608,9 @@ impl ISizeAndMarginsComputer for InlineBlockNonReplaced {
// If inline-size is set to 'auto', and this is an inline block, use the
// shrink to fit algorithm (see CSS 2.1 § 10.3.9)
let inline_size = match computed_inline_size {
- MaybeAuto::Auto => {
- block.get_shrink_to_fit_inline_size(available_inline_size - (inline_start_margin +
- inline_end_margin))
- }
+ MaybeAuto::Auto => block.get_shrink_to_fit_inline_size(
+ available_inline_size - (inline_start_margin + inline_end_margin),
+ ),
MaybeAuto::Specified(inline_size) => inline_size,
};
@@ -3038,23 +3623,22 @@ impl ISizeAndMarginsComputer for InlineBlockReplaced {
///
/// ISize has already been calculated. We now calculate the margins just
/// like for non-replaced blocks.
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
debug_assert!(match input.computed_inline_size {
MaybeAuto::Specified(_) => true,
MaybeAuto::Auto => false,
});
- let (computed_inline_size,
- inline_start_margin,
- inline_end_margin,
- available_inline_size) =
- (input.computed_inline_size,
- input.inline_start_margin,
- input.inline_end_margin,
- input.available_inline_size);
+ let (computed_inline_size, inline_start_margin, inline_end_margin, available_inline_size) = (
+ input.computed_inline_size,
+ input.inline_start_margin,
+ input.inline_end_margin,
+ input.available_inline_size,
+ );
// For inline-blocks, `auto` margins compute to 0.
let inline_start_margin = inline_start_margin.specified_or_zero();
@@ -3063,10 +3647,9 @@ impl ISizeAndMarginsComputer for InlineBlockReplaced {
// If inline-size is set to 'auto', and this is an inline block, use the
// shrink to fit algorithm (see CSS 2.1 § 10.3.9)
let inline_size = match computed_inline_size {
- MaybeAuto::Auto => {
- block.get_shrink_to_fit_inline_size(available_inline_size - (inline_start_margin +
- inline_end_margin))
- }
+ MaybeAuto::Auto => block.get_shrink_to_fit_inline_size(
+ available_inline_size - (inline_start_margin + inline_end_margin),
+ ),
MaybeAuto::Specified(inline_size) => inline_size,
};
@@ -3074,14 +3657,18 @@ impl ISizeAndMarginsComputer for InlineBlockReplaced {
}
/// Calculate used value of inline-size just like we do for inline replaced elements.
- fn initial_computed_inline_size(&self,
- block: &mut BlockFlow,
- parent_flow_inline_size: Au,
- shared_context: &SharedStyleContext)
- -> MaybeAuto {
+ fn initial_computed_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ shared_context: &SharedStyleContext,
+ ) -> MaybeAuto {
let container_block_size = block.explicit_block_containing_size(shared_context);
let fragment = block.fragment();
- fragment.assign_replaced_inline_size_if_necessary(parent_flow_inline_size, container_block_size);
+ fragment.assign_replaced_inline_size_if_necessary(
+ parent_flow_inline_size,
+ container_block_size,
+ );
// For replaced block flow, the rest of the constraint solving will
// take inline-size to be specified as the value computed here.
MaybeAuto::Specified(fragment.content_box().size.inline)
@@ -3091,23 +3678,30 @@ impl ISizeAndMarginsComputer for InlineBlockReplaced {
impl ISizeAndMarginsComputer for InlineFlexItem {
// Replace the default method directly to prevent recalculating and setting margins again
// which has already been set by its parent.
- fn compute_used_inline_size(&self,
- block: &mut BlockFlow,
- shared_context: &SharedStyleContext,
- parent_flow_inline_size: Au) {
+ fn compute_used_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ shared_context: &SharedStyleContext,
+ parent_flow_inline_size: Au,
+ ) {
let container_block_size = block.explicit_block_containing_size(shared_context);
- block.fragment.assign_replaced_inline_size_if_necessary(parent_flow_inline_size,
- container_block_size);
+ block.fragment.assign_replaced_inline_size_if_necessary(
+ parent_flow_inline_size,
+ container_block_size,
+ );
}
// The used inline size and margins are set by parent flex flow, do nothing here.
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- _: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ _: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
let fragment = block.fragment();
- ISizeConstraintSolution::new(fragment.border_box.size.inline,
- fragment.margin.inline_start,
- fragment.margin.inline_end)
+ ISizeConstraintSolution::new(
+ fragment.border_box.size.inline,
+ fragment.margin.inline_start,
+ fragment.margin.inline_end,
+ )
}
}
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 063b1ee710f..dd4ef419bbd 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -111,7 +111,12 @@ pub enum ConstructionItem {
///
/// FIXME(emilio): How could whitespace have any PseudoElementType other
/// than Normal?
- Whitespace(OpaqueNode, PseudoElementType, ServoArc<ComputedValues>, RestyleDamage),
+ Whitespace(
+ OpaqueNode,
+ PseudoElementType,
+ ServoArc<ComputedValues>,
+ RestyleDamage,
+ ),
/// TableColumn Fragment
TableColumnFragment(Fragment),
}
@@ -182,15 +187,17 @@ impl InlineBlockSplit {
let split = InlineBlockSplit {
predecessors: mem::replace(
fragment_accumulator,
- InlineFragmentsAccumulator::from_inline_node(
- node,
- style_context,
- )).to_intermediate_inline_fragments::<ConcreteThreadSafeLayoutNode>(style_context),
+ InlineFragmentsAccumulator::from_inline_node(node, style_context),
+ ).to_intermediate_inline_fragments::<ConcreteThreadSafeLayoutNode>(style_context),
flow: flow,
};
- fragment_accumulator.enclosing_node.as_mut().unwrap().flags.remove(
- InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT);
+ fragment_accumulator
+ .enclosing_node
+ .as_mut()
+ .unwrap()
+ .flags
+ .remove(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT);
split
}
@@ -220,7 +227,8 @@ impl IntermediateInlineFragments {
fn push_all(&mut self, mut other: IntermediateInlineFragments) {
self.fragments.append(&mut other.fragments);
- self.absolute_descendants.push_descendants(other.absolute_descendants);
+ self.absolute_descendants
+ .push_descendants(other.absolute_descendants);
}
}
@@ -256,8 +264,13 @@ impl InlineFragmentsAccumulator {
}
}
- fn from_inline_node<N>(node: &N, style_context: &SharedStyleContext) -> InlineFragmentsAccumulator
- where N: ThreadSafeLayoutNode {
+ fn from_inline_node<N>(
+ node: &N,
+ style_context: &SharedStyleContext,
+ ) -> InlineFragmentsAccumulator
+ where
+ N: ThreadSafeLayoutNode,
+ {
InlineFragmentsAccumulator {
fragments: IntermediateInlineFragments::new(),
enclosing_node: Some(InlineFragmentNodeInfo {
@@ -266,7 +279,7 @@ impl InlineFragmentsAccumulator {
style: node.style(style_context),
selected_style: node.selected_style(),
flags: InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT |
- InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT,
+ InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT,
}),
bidi_control_chars: None,
restyle_damage: node.restyle_damage(),
@@ -279,7 +292,9 @@ impl InlineFragmentsAccumulator {
fn push_all(&mut self, mut fragments: IntermediateInlineFragments) {
self.fragments.fragments.append(&mut fragments.fragments);
- self.fragments.absolute_descendants.push_descendants(fragments.absolute_descendants);
+ self.fragments
+ .absolute_descendants
+ .push_descendants(fragments.absolute_descendants);
}
fn to_intermediate_inline_fragments<N>(
@@ -300,36 +315,42 @@ impl InlineFragmentsAccumulator {
for (index, fragment) in fragments.fragments.iter_mut().enumerate() {
let mut enclosing_node = enclosing_node.clone();
if index != 0 {
- enclosing_node.flags.remove(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT)
+ enclosing_node
+ .flags
+ .remove(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT)
}
if index != fragment_count - 1 {
- enclosing_node.flags.remove(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT)
+ enclosing_node
+ .flags
+ .remove(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT)
}
fragment.add_inline_context_style(enclosing_node);
}
// Control characters are later discarded in transform_text, so they don't affect the
// is_first/is_last styles above.
- enclosing_node.flags.remove(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT |
- InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT);
+ enclosing_node.flags.remove(
+ InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT |
+ InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT,
+ );
if let Some((start, end)) = bidi_control_chars {
- fragments.fragments.push_front(
- control_chars_to_fragment::<N::ConcreteElement>(
+ fragments
+ .fragments
+ .push_front(control_chars_to_fragment::<N::ConcreteElement>(
&enclosing_node,
context,
start,
restyle_damage,
- )
- );
- fragments.fragments.push_back(
- control_chars_to_fragment::<N::ConcreteElement>(
+ ));
+ fragments
+ .fragments
+ .push_back(control_chars_to_fragment::<N::ConcreteElement>(
&enclosing_node,
context,
end,
restyle_damage,
- )
- );
+ ));
}
}
fragments
@@ -346,7 +367,8 @@ pub struct FlowConstructor<'a, N: ThreadSafeLayoutNode> {
}
impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
- FlowConstructor<'a, ConcreteThreadSafeLayoutNode> {
+ FlowConstructor<'a, ConcreteThreadSafeLayoutNode>
+{
/// Creates a new flow constructor.
pub fn new(layout_context: &'a LayoutContext<'a>) -> Self {
FlowConstructor {
@@ -361,9 +383,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
}
#[inline]
- fn set_flow_construction_result(&self,
- node: &ConcreteThreadSafeLayoutNode,
- result: ConstructionResult) {
+ fn set_flow_construction_result(
+ &self,
+ node: &ConcreteThreadSafeLayoutNode,
+ result: ConstructionResult,
+ ) {
node.set_flow_construction_result(result);
}
@@ -372,44 +396,48 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let specific_fragment_info = match node.type_id() {
Some(LayoutNodeType::Element(LayoutElementType::HTMLIFrameElement)) => {
SpecificFragmentInfo::Iframe(IframeFragmentInfo::new(node))
- }
+ },
Some(LayoutNodeType::Element(LayoutElementType::HTMLImageElement)) => {
let image_info = Box::new(ImageFragmentInfo::new(
- node.image_url(), node, &self.layout_context
+ node.image_url(),
+ node,
+ &self.layout_context,
));
SpecificFragmentInfo::Image(image_info)
- }
+ },
Some(LayoutNodeType::Element(LayoutElementType::HTMLObjectElement)) => {
let image_info = Box::new(ImageFragmentInfo::new(
- node.object_data(), node, &self.layout_context
- ));
+ node.object_data(),
+ node,
+ &self.layout_context,
+ ));
SpecificFragmentInfo::Image(image_info)
- }
+ },
Some(LayoutNodeType::Element(LayoutElementType::HTMLTableElement)) => {
SpecificFragmentInfo::TableWrapper
- }
+ },
Some(LayoutNodeType::Element(LayoutElementType::HTMLTableColElement)) => {
SpecificFragmentInfo::TableColumn(TableColumnFragmentInfo::new(node))
- }
+ },
Some(LayoutNodeType::Element(LayoutElementType::HTMLTableCellElement)) => {
SpecificFragmentInfo::TableCell
- }
+ },
Some(LayoutNodeType::Element(LayoutElementType::HTMLTableRowElement)) |
Some(LayoutNodeType::Element(LayoutElementType::HTMLTableSectionElement)) => {
SpecificFragmentInfo::TableRow
- }
+ },
Some(LayoutNodeType::Element(LayoutElementType::HTMLCanvasElement)) => {
let data = node.canvas_data().unwrap();
SpecificFragmentInfo::Canvas(Box::new(CanvasFragmentInfo::new(data)))
- }
+ },
Some(LayoutNodeType::Element(LayoutElementType::SVGSVGElement)) => {
let data = node.svg_data().unwrap();
SpecificFragmentInfo::Svg(Box::new(SvgFragmentInfo::new(data)))
- }
+ },
_ => {
// This includes pseudo-elements.
SpecificFragmentInfo::Generic
- }
+ },
};
Fragment::new(node, specific_fragment_info, self.layout_context)
@@ -429,35 +457,33 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
legalizer: &mut Legalizer,
node: &ConcreteThreadSafeLayoutNode,
) {
- let mut fragments =
- fragment_accumulator.to_intermediate_inline_fragments::<ConcreteThreadSafeLayoutNode>(
- self.style_context(),
- );
+ let mut fragments = fragment_accumulator
+ .to_intermediate_inline_fragments::<ConcreteThreadSafeLayoutNode>(self.style_context());
if fragments.is_empty() {
- return
+ return;
};
strip_ignorable_whitespace_from_start(&mut fragments.fragments);
strip_ignorable_whitespace_from_end(&mut fragments.fragments);
if fragments.fragments.is_empty() {
absolute_descendants.push_descendants(fragments.absolute_descendants);
- return
+ return;
}
// Build a list of all the inline-block fragments before fragments is moved.
- let mut inline_block_flows = vec!();
+ let mut inline_block_flows = vec![];
for fragment in &fragments.fragments {
match fragment.specific {
SpecificFragmentInfo::InlineBlock(ref info) => {
inline_block_flows.push(info.flow_ref.clone())
- }
+ },
SpecificFragmentInfo::InlineAbsoluteHypothetical(ref info) => {
inline_block_flows.push(info.flow_ref.clone())
- }
+ },
SpecificFragmentInfo::InlineAbsolute(ref info) => {
inline_block_flows.push(info.flow_ref.clone())
- }
- _ => {}
+ },
+ _ => {},
}
}
@@ -466,12 +492,15 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
// remain. In that case the inline flow will compute its ascent and descent to be zero.
let scanned_fragments =
with_thread_local_font_context(self.layout_context, |font_context| {
- TextRunScanner::new().scan_for_runs(font_context,
- mem::replace(&mut fragments.fragments, LinkedList::new()))
+ TextRunScanner::new().scan_for_runs(
+ font_context,
+ mem::replace(&mut fragments.fragments, LinkedList::new()),
+ )
});
- let mut inline_flow_ref =
- FlowRef::new(Arc::new(InlineFlow::from_fragments(scanned_fragments,
- node.style(self.style_context()).writing_mode)));
+ let mut inline_flow_ref = FlowRef::new(Arc::new(InlineFlow::from_fragments(
+ scanned_fragments,
+ node.style(self.style_context()).writing_mode,
+ )));
// Add all the inline-block fragments as children of the inline flow.
for inline_block_flow in &inline_block_flows {
@@ -498,7 +527,8 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let inline_flow = FlowRef::deref_mut(&mut inline_flow_ref).as_mut_inline();
inline_flow.minimum_line_metrics =
with_thread_local_font_context(self.layout_context, |font_context| {
- inline_flow.minimum_line_metrics(font_context, &node.style(self.style_context()))
+ inline_flow
+ .minimum_line_metrics(font_context, &node.style(self.style_context()))
});
}
@@ -511,15 +541,16 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
}
fn build_block_flow_using_construction_result_of_child(
- &mut self,
- flow: &mut FlowRef,
- node: &ConcreteThreadSafeLayoutNode,
- kid: ConcreteThreadSafeLayoutNode,
- inline_fragment_accumulator: &mut InlineFragmentsAccumulator,
- abs_descendants: &mut AbsoluteDescendants,
- legalizer: &mut Legalizer) {
+ &mut self,
+ flow: &mut FlowRef,
+ node: &ConcreteThreadSafeLayoutNode,
+ kid: ConcreteThreadSafeLayoutNode,
+ inline_fragment_accumulator: &mut InlineFragmentsAccumulator,
+ abs_descendants: &mut AbsoluteDescendants,
+ legalizer: &mut Legalizer,
+ ) {
match kid.get_construction_result() {
- ConstructionResult::None => {}
+ ConstructionResult::None => {},
ConstructionResult::Flow(kid_flow, kid_abs_descendants) => {
// If kid_flow is TableCaptionFlow, kid_flow should be added under
// TableWrapperFlow.
@@ -528,17 +559,24 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
ConstructionResult::Flow(kid_flow, AbsoluteDescendants::new());
self.set_flow_construction_result(&kid, construction_result)
} else {
- if !kid_flow.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if !kid_flow
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
// Flush any inline fragments that we were gathering up. This allows us to
// handle {ib} splits.
- let old_inline_fragment_accumulator =
- mem::replace(inline_fragment_accumulator,
- InlineFragmentsAccumulator::new());
- self.flush_inline_fragments_to_flow(old_inline_fragment_accumulator,
- flow,
- abs_descendants,
- legalizer,
- node);
+ let old_inline_fragment_accumulator = mem::replace(
+ inline_fragment_accumulator,
+ InlineFragmentsAccumulator::new(),
+ );
+ self.flush_inline_fragments_to_flow(
+ old_inline_fragment_accumulator,
+ flow,
+ abs_descendants,
+ legalizer,
+ node,
+ );
}
legalizer.add_child::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
self.style_context(),
@@ -547,35 +585,41 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
)
}
abs_descendants.push_descendants(kid_abs_descendants);
- }
+ },
ConstructionResult::ConstructionItem(ConstructionItem::InlineFragments(
- InlineFragmentsConstructionResult {
- splits,
- fragments: successor_fragments,
- })) => {
+ InlineFragmentsConstructionResult {
+ splits,
+ fragments: successor_fragments,
+ },
+ )) => {
// Add any {ib} splits.
for split in splits {
// Pull apart the {ib} split object and push its predecessor fragments
// onto the list.
let InlineBlockSplit {
predecessors,
- flow: kid_flow
+ flow: kid_flow,
} = split;
inline_fragment_accumulator.push_all(predecessors);
// Flush any inline fragments that we were gathering up.
- debug!("flushing {} inline box(es) to flow A",
- inline_fragment_accumulator.fragments.fragments.len());
- let old_inline_fragment_accumulator =
- mem::replace(inline_fragment_accumulator,
- InlineFragmentsAccumulator::new());
+ debug!(
+ "flushing {} inline box(es) to flow A",
+ inline_fragment_accumulator.fragments.fragments.len()
+ );
+ let old_inline_fragment_accumulator = mem::replace(
+ inline_fragment_accumulator,
+ InlineFragmentsAccumulator::new(),
+ );
let absolute_descendants =
&mut inline_fragment_accumulator.fragments.absolute_descendants;
- self.flush_inline_fragments_to_flow(old_inline_fragment_accumulator,
- flow,
- absolute_descendants,
- legalizer,
- node);
+ self.flush_inline_fragments_to_flow(
+ old_inline_fragment_accumulator,
+ flow,
+ absolute_descendants,
+ legalizer,
+ node,
+ );
// Push the flow generated by the {ib} split onto our list of flows.
legalizer.add_child::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
@@ -587,29 +631,35 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
// Add the fragments to the list we're maintaining.
inline_fragment_accumulator.push_all(successor_fragments);
- }
+ },
ConstructionResult::ConstructionItem(ConstructionItem::Whitespace(
+ whitespace_node,
+ whitespace_pseudo,
+ whitespace_style,
+ whitespace_damage,
+ )) => {
+ // Add whitespace results. They will be stripped out later on when
+ // between block elements, and retained when between inline elements.
+ let fragment_info = SpecificFragmentInfo::UnscannedText(Box::new(
+ UnscannedTextFragmentInfo::new(Box::<str>::from(" "), None),
+ ));
+ let fragment = Fragment::from_opaque_node_and_style(
whitespace_node,
whitespace_pseudo,
whitespace_style,
- whitespace_damage)) => {
- // Add whitespace results. They will be stripped out later on when
- // between block elements, and retained when between inline elements.
- let fragment_info = SpecificFragmentInfo::UnscannedText(
- Box::new(UnscannedTextFragmentInfo::new(Box::<str>::from(" "), None))
+ node.selected_style(),
+ whitespace_damage,
+ fragment_info,
);
- let fragment = Fragment::from_opaque_node_and_style(whitespace_node,
- whitespace_pseudo,
- whitespace_style,
- node.selected_style(),
- whitespace_damage,
- fragment_info);
- inline_fragment_accumulator.fragments.fragments.push_back(fragment);
- }
+ inline_fragment_accumulator
+ .fragments
+ .fragments
+ .push_back(fragment);
+ },
ConstructionResult::ConstructionItem(ConstructionItem::TableColumnFragment(_)) => {
// TODO: Implement anonymous table objects for missing parents
// CSS 2.1 § 17.2.1, step 3-2
- }
+ },
}
}
@@ -617,15 +667,17 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// appending the construction results of children to the child list of the block flow. {ib}
/// splits and absolutely-positioned descendants are handled correctly.
fn build_flow_for_block_starting_with_fragments(
- &mut self,
- mut flow: FlowRef,
- node: &ConcreteThreadSafeLayoutNode,
- initial_fragments: IntermediateInlineFragments)
- -> ConstructionResult {
+ &mut self,
+ mut flow: FlowRef,
+ node: &ConcreteThreadSafeLayoutNode,
+ initial_fragments: IntermediateInlineFragments,
+ ) -> ConstructionResult {
// Gather up fragments for the inline flows we might need to create.
let mut inline_fragment_accumulator = InlineFragmentsAccumulator::new();
- inline_fragment_accumulator.fragments.push_all(initial_fragments);
+ inline_fragment_accumulator
+ .fragments
+ .push_all(initial_fragments);
// List of absolute descendants, in tree order.
let mut abs_descendants = AbsoluteDescendants::new();
@@ -642,17 +694,20 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
kid,
&mut inline_fragment_accumulator,
&mut abs_descendants,
- &mut legalizer);
+ &mut legalizer,
+ );
}
}
// Perform a final flush of any inline fragments that we were gathering up to handle {ib}
// splits, after stripping ignorable whitespace.
- self.flush_inline_fragments_to_flow(inline_fragment_accumulator,
- &mut flow,
- &mut abs_descendants,
- &mut legalizer,
- node);
+ self.flush_inline_fragments_to_flow(
+ inline_fragment_accumulator,
+ &mut flow,
+ &mut abs_descendants,
+ &mut legalizer,
+ node,
+ );
// The flow is done.
legalizer.finish(&mut flow);
@@ -664,7 +719,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
flow.set_absolute_descendants(abs_descendants);
abs_descendants = AbsoluteDescendants::new();
- if flow.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if flow
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
// This is now the only absolute flow in the subtree which hasn't yet
// reached its CB.
abs_descendants.push(flow.clone());
@@ -684,17 +743,23 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
///
/// FIXME(pcwalton): It is not clear to me that there isn't a cleaner way to handle
/// `<textarea>`.
- fn build_flow_for_block_like(&mut self, flow: FlowRef, node: &ConcreteThreadSafeLayoutNode)
- -> ConstructionResult {
+ fn build_flow_for_block_like(
+ &mut self,
+ flow: FlowRef,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
let mut fragments = IntermediateInlineFragments::new();
let node_is_input_or_text_area =
- node.type_id() == Some(LayoutNodeType::Element(LayoutElementType::HTMLInputElement)) ||
- node.type_id() == Some(LayoutNodeType::Element(LayoutElementType::HTMLTextAreaElement));
- if node.get_pseudo_element_type().is_replaced_content() ||
- node_is_input_or_text_area {
+ node.type_id() == Some(LayoutNodeType::Element(LayoutElementType::HTMLInputElement)) ||
+ node.type_id() == Some(LayoutNodeType::Element(
+ LayoutElementType::HTMLTextAreaElement,
+ ));
+ if node.get_pseudo_element_type().is_replaced_content() || node_is_input_or_text_area {
// A TextArea's text contents are displayed through the input text
// box, so don't construct them.
- if node.type_id() == Some(LayoutNodeType::Element(LayoutElementType::HTMLTextAreaElement)) {
+ if node.type_id() == Some(LayoutNodeType::Element(
+ LayoutElementType::HTMLTextAreaElement,
+ )) {
for kid in node.children() {
self.set_flow_construction_result(&kid, ConstructionResult::None)
}
@@ -702,17 +767,21 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let context = self.style_context();
let mut style = node.style(context);
- style = context.stylist.style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
- &context.guards,
- &PseudoElement::ServoText,
- &style,
- );
- if node_is_input_or_text_area {
- style = context.stylist.style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
+ style = context
+ .stylist
+ .style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
&context.guards,
- &PseudoElement::ServoInputText,
+ &PseudoElement::ServoText,
&style,
- )
+ );
+ if node_is_input_or_text_area {
+ style = context
+ .stylist
+ .style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
+ &context.guards,
+ &PseudoElement::ServoInputText,
+ &style,
+ )
}
self.create_fragments_for_node_text_content(&mut fragments, node, &style)
@@ -721,14 +790,16 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
}
/// Pushes fragments appropriate for the content of the given node onto the given list.
- fn create_fragments_for_node_text_content(&self,
- fragments: &mut IntermediateInlineFragments,
- node: &ConcreteThreadSafeLayoutNode,
- style: &ServoArc<ComputedValues>) {
+ fn create_fragments_for_node_text_content(
+ &self,
+ fragments: &mut IntermediateInlineFragments,
+ node: &ConcreteThreadSafeLayoutNode,
+ style: &ServoArc<ComputedValues>,
+ ) {
// Fast path: If there is no text content, return immediately.
let text_content = node.text_content();
if text_content.is_empty() {
- return
+ return;
}
let style = (*style).clone();
@@ -738,14 +809,17 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
TextContent::Text(string) => {
let info = Box::new(UnscannedTextFragmentInfo::new(string, node.selection()));
let specific_fragment_info = SpecificFragmentInfo::UnscannedText(info);
- fragments.fragments.push_back(Fragment::from_opaque_node_and_style(
+ fragments
+ .fragments
+ .push_back(Fragment::from_opaque_node_and_style(
node.opaque(),
node.get_pseudo_element_type(),
style,
selected_style,
node.restyle_damage(),
- specific_fragment_info))
- }
+ specific_fragment_info,
+ ))
+ },
TextContent::GeneratedContent(content_items) => {
for content_item in content_items.into_iter() {
let specific_fragment_info = match content_item {
@@ -754,52 +828,66 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
SpecificFragmentInfo::UnscannedText(info)
},
content_item => {
- let content_item = Box::new(GeneratedContentInfo::ContentItem(content_item));
+ let content_item =
+ Box::new(GeneratedContentInfo::ContentItem(content_item));
SpecificFragmentInfo::GeneratedContent(content_item)
- }
+ },
};
- fragments.fragments.push_back(Fragment::from_opaque_node_and_style(
+ fragments
+ .fragments
+ .push_back(Fragment::from_opaque_node_and_style(
node.opaque(),
node.get_pseudo_element_type(),
style.clone(),
selected_style.clone(),
node.restyle_damage(),
- specific_fragment_info))
+ specific_fragment_info,
+ ))
}
- }
+ },
}
}
/// Builds a flow for a node with `display: block`. This yields a `BlockFlow` with possibly
/// other `BlockFlow`s or `InlineFlow`s underneath it, depending on whether {ib} splits needed
/// to happen.
- fn build_flow_for_block(&mut self, node: &ConcreteThreadSafeLayoutNode, float_kind: Option<FloatKind>)
- -> ConstructionResult {
+ fn build_flow_for_block(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ float_kind: Option<FloatKind>,
+ ) -> ConstructionResult {
if node.style(self.style_context()).is_multicol() {
- return self.build_flow_for_multicol(node, float_kind)
+ return self.build_flow_for_multicol(node, float_kind);
}
let fragment = self.build_fragment_for_block(node);
- let flow =
- FlowRef::new(Arc::new(BlockFlow::from_fragment_and_float_kind(fragment, float_kind)));
+ let flow = FlowRef::new(Arc::new(BlockFlow::from_fragment_and_float_kind(
+ fragment, float_kind,
+ )));
self.build_flow_for_block_like(flow, node)
}
/// Bubbles up {ib} splits.
- fn accumulate_inline_block_splits(&mut self,
- splits: LinkedList<InlineBlockSplit>,
- node: &ConcreteThreadSafeLayoutNode,
- fragment_accumulator: &mut InlineFragmentsAccumulator,
- opt_inline_block_splits: &mut LinkedList<InlineBlockSplit>) {
+ fn accumulate_inline_block_splits(
+ &mut self,
+ splits: LinkedList<InlineBlockSplit>,
+ node: &ConcreteThreadSafeLayoutNode,
+ fragment_accumulator: &mut InlineFragmentsAccumulator,
+ opt_inline_block_splits: &mut LinkedList<InlineBlockSplit>,
+ ) {
for split in splits {
let InlineBlockSplit {
predecessors,
- flow: kid_flow
+ flow: kid_flow,
} = split;
fragment_accumulator.push_all(predecessors);
- opt_inline_block_splits.push_back(
- InlineBlockSplit::new(fragment_accumulator, node, self.style_context(), kid_flow));
+ opt_inline_block_splits.push_back(InlineBlockSplit::new(
+ fragment_accumulator,
+ node,
+ self.style_context(),
+ kid_flow,
+ ));
}
}
@@ -807,11 +895,15 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// Returns the `InlineFragmentsConstructionResult`, if any. There will be no
/// `InlineFragmentsConstructionResult` if this node consisted entirely of ignorable
/// whitespace.
- fn build_fragments_for_nonreplaced_inline_content(&mut self, node: &ConcreteThreadSafeLayoutNode)
- -> ConstructionResult {
+ fn build_fragments_for_nonreplaced_inline_content(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
let mut opt_inline_block_splits: LinkedList<InlineBlockSplit> = LinkedList::new();
- let mut fragment_accumulator = InlineFragmentsAccumulator::from_inline_node(node, self.style_context());
- fragment_accumulator.bidi_control_chars = bidi_control_chars(&node.style(self.style_context()));
+ let mut fragment_accumulator =
+ InlineFragmentsAccumulator::from_inline_node(node, self.style_context());
+ fragment_accumulator.bidi_control_chars =
+ bidi_control_chars(&node.style(self.style_context()));
let mut abs_descendants = AbsoluteDescendants::new();
@@ -823,11 +915,19 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
self.process(&kid);
}
match kid.get_construction_result() {
- ConstructionResult::None => {}
+ ConstructionResult::None => {},
ConstructionResult::Flow(flow, kid_abs_descendants) => {
- if !flow.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if !flow
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
opt_inline_block_splits.push_back(InlineBlockSplit::new(
- &mut fragment_accumulator, node, self.style_context(), flow));
+ &mut fragment_accumulator,
+ node,
+ self.style_context(),
+ flow,
+ ));
abs_descendants.push_descendants(kid_abs_descendants);
} else {
// Push the absolutely-positioned kid as an inline containing block.
@@ -837,93 +937,110 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let kid_selected_style = flow.as_block().fragment.selected_style.clone();
let kid_restyle_damage = flow.as_block().fragment.restyle_damage;
let fragment_info = SpecificFragmentInfo::InlineAbsolute(
- InlineAbsoluteFragmentInfo::new(flow));
+ InlineAbsoluteFragmentInfo::new(flow),
+ );
fragment_accumulator.push(Fragment::from_opaque_node_and_style(
- kid_node,
- kid_pseudo,
- kid_style,
- kid_selected_style,
- kid_restyle_damage,
- fragment_info));
- fragment_accumulator.fragments
- .absolute_descendants
- .push_descendants(kid_abs_descendants);
+ kid_node,
+ kid_pseudo,
+ kid_style,
+ kid_selected_style,
+ kid_restyle_damage,
+ fragment_info,
+ ));
+ fragment_accumulator
+ .fragments
+ .absolute_descendants
+ .push_descendants(kid_abs_descendants);
}
- }
+ },
ConstructionResult::ConstructionItem(ConstructionItem::InlineFragments(
- InlineFragmentsConstructionResult {
- splits,
- fragments: successors,
- })) => {
+ InlineFragmentsConstructionResult {
+ splits,
+ fragments: successors,
+ },
+ )) => {
// Bubble up {ib} splits.
- self.accumulate_inline_block_splits(splits,
- node,
- &mut fragment_accumulator,
- &mut opt_inline_block_splits);
+ self.accumulate_inline_block_splits(
+ splits,
+ node,
+ &mut fragment_accumulator,
+ &mut opt_inline_block_splits,
+ );
// Push residual fragments.
fragment_accumulator.push_all(successors);
- }
+ },
ConstructionResult::ConstructionItem(ConstructionItem::Whitespace(
+ whitespace_node,
+ whitespace_pseudo,
+ whitespace_style,
+ whitespace_damage,
+ )) => {
+ // Instantiate the whitespace fragment.
+ let fragment_info = SpecificFragmentInfo::UnscannedText(Box::new(
+ UnscannedTextFragmentInfo::new(Box::<str>::from(" "), None),
+ ));
+ let fragment = Fragment::from_opaque_node_and_style(
whitespace_node,
whitespace_pseudo,
whitespace_style,
- whitespace_damage)) => {
- // Instantiate the whitespace fragment.
- let fragment_info = SpecificFragmentInfo::UnscannedText(
- Box::new(UnscannedTextFragmentInfo::new(Box::<str>::from(" "), None))
+ node.selected_style(),
+ whitespace_damage,
+ fragment_info,
);
- let fragment =
- Fragment::from_opaque_node_and_style(whitespace_node,
- whitespace_pseudo,
- whitespace_style,
- node.selected_style(),
- whitespace_damage,
- fragment_info);
fragment_accumulator.fragments.fragments.push_back(fragment)
- }
+ },
ConstructionResult::ConstructionItem(ConstructionItem::TableColumnFragment(_)) => {
// TODO: Implement anonymous table objects for missing parents
// CSS 2.1 § 17.2.1, step 3-2
- }
+ },
}
}
let node_style = node.style(self.style_context());
if is_empty && node_style.has_padding_or_border() {
// An empty inline box needs at least one fragment to draw its background and borders.
- let info = SpecificFragmentInfo::UnscannedText(
- Box::new(UnscannedTextFragmentInfo::new(Box::<str>::from(""), None))
+ let info = SpecificFragmentInfo::UnscannedText(Box::new(
+ UnscannedTextFragmentInfo::new(Box::<str>::from(""), None),
+ ));
+ let fragment = Fragment::from_opaque_node_and_style(
+ node.opaque(),
+ node.get_pseudo_element_type(),
+ node_style.clone(),
+ node.selected_style(),
+ node.restyle_damage(),
+ info,
);
- let fragment = Fragment::from_opaque_node_and_style(node.opaque(),
- node.get_pseudo_element_type(),
- node_style.clone(),
- node.selected_style(),
- node.restyle_damage(),
- info);
fragment_accumulator.fragments.fragments.push_back(fragment)
}
// Finally, make a new construction result.
- if opt_inline_block_splits.len() > 0 || !fragment_accumulator.fragments.is_empty()
- || abs_descendants.len() > 0 {
- fragment_accumulator.fragments.absolute_descendants.push_descendants(abs_descendants);
+ if opt_inline_block_splits.len() > 0 ||
+ !fragment_accumulator.fragments.is_empty() ||
+ abs_descendants.len() > 0
+ {
+ fragment_accumulator
+ .fragments
+ .absolute_descendants
+ .push_descendants(abs_descendants);
// If the node is positioned, then it's the containing block for all absolutely-
// positioned descendants.
if node_style.get_box().position != Position::Static {
- fragment_accumulator.fragments
- .absolute_descendants
- .mark_as_having_reached_containing_block();
- }
-
- let construction_item = ConstructionItem::InlineFragments(
- InlineFragmentsConstructionResult {
- splits: opt_inline_block_splits,
- fragments: fragment_accumulator.to_intermediate_inline_fragments::<ConcreteThreadSafeLayoutNode>(
- self.style_context(),
- ),
- });
+ fragment_accumulator
+ .fragments
+ .absolute_descendants
+ .mark_as_having_reached_containing_block();
+ }
+
+ let construction_item =
+ ConstructionItem::InlineFragments(InlineFragmentsConstructionResult {
+ splits: opt_inline_block_splits,
+ fragments: fragment_accumulator
+ .to_intermediate_inline_fragments::<ConcreteThreadSafeLayoutNode>(
+ self.style_context(),
+ ),
+ });
ConstructionResult::ConstructionItem(construction_item)
} else {
ConstructionResult::None
@@ -933,8 +1050,10 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// Creates an `InlineFragmentsConstructionResult` for replaced content. Replaced content
/// doesn't render its children, so this just nukes a child's fragments and creates a
/// `Fragment`.
- fn build_fragments_for_replaced_inline_content(&mut self, node: &ConcreteThreadSafeLayoutNode)
- -> ConstructionResult {
+ fn build_fragments_for_replaced_inline_content(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
for kid in node.children() {
self.set_flow_construction_result(&kid, ConstructionResult::None)
}
@@ -946,13 +1065,15 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
return ConstructionResult::ConstructionItem(ConstructionItem::Whitespace(
node.opaque(),
node.get_pseudo_element_type(),
- context.stylist.style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
- &context.guards,
- &PseudoElement::ServoText,
- &style,
- ),
+ context
+ .stylist
+ .style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
+ &context.guards,
+ &PseudoElement::ServoText,
+ &style,
+ ),
node.restyle_damage(),
- ))
+ ));
}
// If this is generated content, then we need to initialize the accumulator with the
@@ -961,16 +1082,20 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let mut fragments = IntermediateInlineFragments::new();
match (node.get_pseudo_element_type(), node.type_id()) {
(_, Some(LayoutNodeType::Text)) => {
- let text_style = context.stylist.style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
- &context.guards,
- &PseudoElement::ServoText,
- &style,
- );
+ let text_style = context
+ .stylist
+ .style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
+ &context.guards,
+ &PseudoElement::ServoText,
+ &style,
+ );
self.create_fragments_for_node_text_content(&mut fragments, node, &text_style)
- }
+ },
(PseudoElementType::Normal, _) => {
- fragments.fragments.push_back(self.build_fragment_for_block(node));
- }
+ fragments
+ .fragments
+ .push_back(self.build_fragment_for_block(node));
+ },
(_, _) => self.create_fragments_for_node_text_content(&mut fragments, node, &style),
}
@@ -991,32 +1116,39 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let block_flow_result = match display {
Display::InlineBlock => self.build_flow_for_block(node, None),
Display::InlineFlex => self.build_flow_for_flex(node, None),
- _ => panic!("The flag should be inline-block or inline-flex")
+ _ => panic!("The flag should be inline-block or inline-flex"),
};
let (block_flow, abs_descendants) = match block_flow_result {
ConstructionResult::Flow(block_flow, abs_descendants) => (block_flow, abs_descendants),
- _ => unreachable!()
+ _ => unreachable!(),
};
let context = self.style_context();
let style = node.style(context);
- let style = context.stylist.style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
- &context.guards,
- &PseudoElement::ServoInlineBlockWrapper,
- &style,
+ let style = context
+ .stylist
+ .style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
+ &context.guards,
+ &PseudoElement::ServoInlineBlockWrapper,
+ &style,
+ );
+ let fragment_info =
+ SpecificFragmentInfo::InlineBlock(InlineBlockFragmentInfo::new(block_flow));
+ let fragment = Fragment::from_opaque_node_and_style(
+ node.opaque(),
+ node.get_pseudo_element_type(),
+ style,
+ node.selected_style(),
+ node.restyle_damage(),
+ fragment_info,
);
- let fragment_info = SpecificFragmentInfo::InlineBlock(InlineBlockFragmentInfo::new(
- block_flow));
- let fragment = Fragment::from_opaque_node_and_style(node.opaque(),
- node.get_pseudo_element_type(),
- style,
- node.selected_style(),
- node.restyle_damage(),
- fragment_info);
let mut fragment_accumulator = InlineFragmentsAccumulator::new();
fragment_accumulator.fragments.fragments.push_back(fragment);
- fragment_accumulator.fragments.absolute_descendants.push_descendants(abs_descendants);
+ fragment_accumulator
+ .fragments
+ .absolute_descendants
+ .push_descendants(abs_descendants);
let construction_item =
ConstructionItem::InlineFragments(InlineFragmentsConstructionResult {
@@ -1029,47 +1161,62 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// This is an annoying case, because the computed `display` value is `block`, but the
/// hypothetical box is inline.
- fn build_fragment_for_absolutely_positioned_inline(&mut self,
- node: &ConcreteThreadSafeLayoutNode)
- -> ConstructionResult {
+ fn build_fragment_for_absolutely_positioned_inline(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
let block_flow_result = self.build_flow_for_block(node, None);
let (block_flow, abs_descendants) = match block_flow_result {
ConstructionResult::Flow(block_flow, abs_descendants) => (block_flow, abs_descendants),
- _ => unreachable!()
+ _ => unreachable!(),
};
let fragment_info = SpecificFragmentInfo::InlineAbsoluteHypothetical(
- InlineAbsoluteHypotheticalFragmentInfo::new(block_flow));
+ InlineAbsoluteHypotheticalFragmentInfo::new(block_flow),
+ );
let style_context = self.style_context();
let style = node.style(style_context);
- let style = style_context.stylist.style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
- &style_context.guards,
- &PseudoElement::ServoInlineAbsolute,
- &style,
+ let style = style_context
+ .stylist
+ .style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
+ &style_context.guards,
+ &PseudoElement::ServoInlineAbsolute,
+ &style,
+ );
+ let fragment = Fragment::from_opaque_node_and_style(
+ node.opaque(),
+ PseudoElementType::Normal,
+ style,
+ node.selected_style(),
+ node.restyle_damage(),
+ fragment_info,
);
- let fragment = Fragment::from_opaque_node_and_style(node.opaque(),
- PseudoElementType::Normal,
- style,
- node.selected_style(),
- node.restyle_damage(),
- fragment_info);
-
- let mut fragment_accumulator = InlineFragmentsAccumulator::from_inline_node(node, self.style_context());
+
+ let mut fragment_accumulator =
+ InlineFragmentsAccumulator::from_inline_node(node, self.style_context());
fragment_accumulator.fragments.fragments.push_back(fragment);
- fragment_accumulator.fragments.absolute_descendants.push_descendants(abs_descendants);
+ fragment_accumulator
+ .fragments
+ .absolute_descendants
+ .push_descendants(abs_descendants);
let construction_item =
ConstructionItem::InlineFragments(InlineFragmentsConstructionResult {
splits: LinkedList::new(),
fragments: fragment_accumulator
- .to_intermediate_inline_fragments::<ConcreteThreadSafeLayoutNode>(style_context),
+ .to_intermediate_inline_fragments::<ConcreteThreadSafeLayoutNode>(
+ style_context,
+ ),
});
ConstructionResult::ConstructionItem(construction_item)
}
/// Builds one or more fragments for a node with `display: inline`. This yields an
/// `InlineFragmentsConstructionResult`.
- fn build_fragments_for_inline(&mut self, node: &ConcreteThreadSafeLayoutNode) -> ConstructionResult {
+ fn build_fragments_for_inline(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
// Is this node replaced content?
if !node.is_replaced_content() {
// Go to a path that concatenates our kids' fragments.
@@ -1083,39 +1230,50 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// Places any table captions found under the given table wrapper, if the value of their
/// `caption-side` property is equal to the given `side`.
- fn place_table_caption_under_table_wrapper_on_side(&mut self,
- table_wrapper_flow: &mut FlowRef,
- node: &ConcreteThreadSafeLayoutNode,
- side: CaptionSide) {
+ fn place_table_caption_under_table_wrapper_on_side(
+ &mut self,
+ table_wrapper_flow: &mut FlowRef,
+ node: &ConcreteThreadSafeLayoutNode,
+ side: CaptionSide,
+ ) {
// Only flows that are table captions are matched here.
for kid in node.children() {
match kid.get_construction_result() {
ConstructionResult::Flow(kid_flow, _) => {
if kid_flow.is_table_caption() &&
- kid_flow.as_block()
- .fragment
- .style()
- .get_inherited_table()
- .caption_side == side {
+ kid_flow
+ .as_block()
+ .fragment
+ .style()
+ .get_inherited_table()
+ .caption_side ==
+ side
+ {
table_wrapper_flow.add_new_child(kid_flow);
}
- }
- ConstructionResult::None | ConstructionResult::ConstructionItem(_) => {}
+ },
+ ConstructionResult::None | ConstructionResult::ConstructionItem(_) => {},
}
}
}
/// Builds a flow for a node with `column-count` or `column-width` non-`auto`.
/// This yields a `MulticolFlow` with a single `MulticolColumnFlow` underneath it.
- fn build_flow_for_multicol(&mut self,
- node: &ConcreteThreadSafeLayoutNode,
- float_kind: Option<FloatKind>)
- -> ConstructionResult {
+ fn build_flow_for_multicol(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ float_kind: Option<FloatKind>,
+ ) -> ConstructionResult {
let fragment = Fragment::new(node, SpecificFragmentInfo::Multicol, self.layout_context);
let mut flow = FlowRef::new(Arc::new(MulticolFlow::from_fragment(fragment, float_kind)));
- let column_fragment = Fragment::new(node, SpecificFragmentInfo::MulticolColumn, self.layout_context);
- let column_flow = FlowRef::new(Arc::new(MulticolColumnFlow::from_fragment(column_fragment)));
+ let column_fragment = Fragment::new(
+ node,
+ SpecificFragmentInfo::MulticolColumn,
+ self.layout_context,
+ );
+ let column_flow =
+ FlowRef::new(Arc::new(MulticolColumnFlow::from_fragment(column_fragment)));
// First populate the column flow with its children.
let construction_result = self.build_flow_for_block_like(column_flow, node);
@@ -1135,7 +1293,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
abs_descendants = AbsoluteDescendants::new();
- if flow.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if flow
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
// This is now the only absolute flow in the subtree which hasn't yet
// reached its containing block.
abs_descendants.push(flow.clone());
@@ -1147,8 +1309,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// Builds a flow for a node with `display: table`. This yields a `TableWrapperFlow` with
/// possibly other `TableCaptionFlow`s or `TableFlow`s underneath it.
- fn build_flow_for_table(&mut self, node: &ConcreteThreadSafeLayoutNode, float_value: Float)
- -> ConstructionResult {
+ fn build_flow_for_table(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ float_value: Float,
+ ) -> ConstructionResult {
let mut legalizer = Legalizer::new();
let table_style;
@@ -1156,23 +1321,26 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
{
let context = self.style_context();
table_style = node.style(context);
- wrapper_style = context.stylist.style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
- &context.guards,
- &PseudoElement::ServoTableWrapper,
- &table_style,
- );
+ wrapper_style = context
+ .stylist
+ .style_for_anonymous::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
+ &context.guards,
+ &PseudoElement::ServoTableWrapper,
+ &table_style,
+ );
}
- let wrapper_fragment =
- Fragment::from_opaque_node_and_style(node.opaque(),
- PseudoElementType::Normal,
- wrapper_style,
- node.selected_style(),
- node.restyle_damage(),
- SpecificFragmentInfo::TableWrapper);
+ let wrapper_fragment = Fragment::from_opaque_node_and_style(
+ node.opaque(),
+ PseudoElementType::Normal,
+ wrapper_style,
+ node.selected_style(),
+ node.restyle_damage(),
+ SpecificFragmentInfo::TableWrapper,
+ );
let wrapper_float_kind = FloatKind::from_property(float_value);
- let mut wrapper_flow =
- FlowRef::new(Arc::new(TableWrapperFlow::from_fragment_and_float_kind(wrapper_fragment,
- wrapper_float_kind)));
+ let mut wrapper_flow = FlowRef::new(Arc::new(
+ TableWrapperFlow::from_fragment_and_float_kind(wrapper_fragment, wrapper_float_kind),
+ ));
let table_fragment = Fragment::new(node, SpecificFragmentInfo::Table, self.layout_context);
let table_flow = FlowRef::new(Arc::new(TableFlow::from_fragment(table_fragment)));
@@ -1185,9 +1353,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
// The order of the caption and the table are not necessarily the same order as in the DOM
// tree. All caption blocks are placed before or after the table flow, depending on the
// value of `caption-side`.
- self.place_table_caption_under_table_wrapper_on_side(&mut wrapper_flow,
- node,
- CaptionSide::Top);
+ self.place_table_caption_under_table_wrapper_on_side(
+ &mut wrapper_flow,
+ node,
+ CaptionSide::Top,
+ );
if let ConstructionResult::Flow(table_flow, table_abs_descendants) = construction_result {
legalizer.add_child::<ConcreteThreadSafeLayoutNode::ConcreteElement>(
@@ -1199,9 +1369,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
}
// If the value of `caption-side` is `bottom`, place it now.
- self.place_table_caption_under_table_wrapper_on_side(&mut wrapper_flow,
- node,
- CaptionSide::Bottom);
+ self.place_table_caption_under_table_wrapper_on_side(
+ &mut wrapper_flow,
+ node,
+ CaptionSide::Bottom,
+ );
// The flow is done.
legalizer.finish(&mut wrapper_flow);
@@ -1213,7 +1385,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
abs_descendants = AbsoluteDescendants::new();
- if wrapper_flow.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if wrapper_flow
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
// This is now the only absolute flow in the subtree which hasn't yet
// reached its containing block.
abs_descendants.push(wrapper_flow.clone());
@@ -1225,7 +1401,10 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// Builds a flow for a node with `display: table-caption`. This yields a `TableCaptionFlow`
/// with possibly other `BlockFlow`s or `InlineFlow`s underneath it.
- fn build_flow_for_table_caption(&mut self, node: &ConcreteThreadSafeLayoutNode) -> ConstructionResult {
+ fn build_flow_for_table_caption(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
let fragment = self.build_fragment_for_block(node);
let flow = FlowRef::new(Arc::new(TableCaptionFlow::from_fragment(fragment)));
self.build_flow_for_block_like(flow, node)
@@ -1233,8 +1412,10 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// Builds a flow for a node with `display: table-row-group`. This yields a `TableRowGroupFlow`
/// with possibly other `TableRowFlow`s underneath it.
- fn build_flow_for_table_rowgroup(&mut self, node: &ConcreteThreadSafeLayoutNode)
- -> ConstructionResult {
+ fn build_flow_for_table_rowgroup(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
let fragment = Fragment::new(node, SpecificFragmentInfo::TableRow, self.layout_context);
let flow = FlowRef::new(Arc::new(TableRowGroupFlow::from_fragment(fragment)));
self.build_flow_for_block_like(flow, node)
@@ -1242,7 +1423,10 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// Builds a flow for a node with `display: table-row`. This yields a `TableRowFlow` with
/// possibly other `TableCellFlow`s underneath it.
- fn build_flow_for_table_row(&mut self, node: &ConcreteThreadSafeLayoutNode) -> ConstructionResult {
+ fn build_flow_for_table_row(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
let fragment = Fragment::new(node, SpecificFragmentInfo::TableRow, self.layout_context);
let flow = FlowRef::new(Arc::new(TableRowFlow::from_fragment(fragment)));
self.build_flow_for_block_like(flow, node)
@@ -1250,65 +1434,79 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
/// Builds a flow for a node with `display: table-cell`. This yields a `TableCellFlow` with
/// possibly other `BlockFlow`s or `InlineFlow`s underneath it.
- fn build_flow_for_table_cell(&mut self, node: &ConcreteThreadSafeLayoutNode) -> ConstructionResult {
+ fn build_flow_for_table_cell(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
let fragment = Fragment::new(node, SpecificFragmentInfo::TableCell, self.layout_context);
// Determine if the table cell should be hidden. Per CSS 2.1 § 17.6.1.1, this will be true
// if the cell has any in-flow elements (even empty ones!) and has `empty-cells` set to
// `hide`.
- let hide = node.style(self.style_context()).get_inherited_table().empty_cells == EmptyCells::Hide &&
+ let hide = node
+ .style(self.style_context())
+ .get_inherited_table()
+ .empty_cells ==
+ EmptyCells::Hide &&
node.children().all(|kid| {
let position = kid.style(self.style_context()).get_box().position;
- !kid.is_content() ||
- position == Position::Absolute ||
- position == Position::Fixed
+ !kid.is_content() || position == Position::Absolute || position == Position::Fixed
});
let flow = FlowRef::new(Arc::new(
- TableCellFlow::from_node_fragment_and_visibility_flag(node, fragment, !hide)));
+ TableCellFlow::from_node_fragment_and_visibility_flag(node, fragment, !hide),
+ ));
self.build_flow_for_block_like(flow, node)
}
/// Builds a flow for a node with `display: list-item`. This yields a `ListItemFlow` with
/// possibly other `BlockFlow`s or `InlineFlow`s underneath it.
- fn build_flow_for_list_item(&mut self,
- node: &ConcreteThreadSafeLayoutNode,
- flotation: Float)
- -> ConstructionResult {
+ fn build_flow_for_list_item(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ flotation: Float,
+ ) -> ConstructionResult {
let flotation = FloatKind::from_property(flotation);
let marker_fragments = match node.style(self.style_context()).get_list().list_style_image {
ImageUrlOrNone::Url(ref url_value) => {
let image_info = Box::new(ImageFragmentInfo::new(
- url_value.url().map(|u| u.clone()), node, &self.layout_context
+ url_value.url().map(|u| u.clone()),
+ node,
+ &self.layout_context,
));
- vec![Fragment::new(node, SpecificFragmentInfo::Image(image_info), self.layout_context)]
- }
- ImageUrlOrNone::None => {
- match ListStyleTypeContent::from_list_style_type(node.style(self.style_context())
- .get_list()
- .list_style_type) {
- ListStyleTypeContent::None => Vec::new(),
- ListStyleTypeContent::StaticText(ch) => {
- let text = format!("{}\u{a0}", ch);
- let mut unscanned_marker_fragments = LinkedList::new();
- unscanned_marker_fragments.push_back(Fragment::new(
- node,
- SpecificFragmentInfo::UnscannedText(
- Box::new(UnscannedTextFragmentInfo::new(Box::<str>::from(text), None))
- ),
- self.layout_context));
- let marker_fragments =
- with_thread_local_font_context(self.layout_context, |mut font_context| {
- TextRunScanner::new().scan_for_runs(&mut font_context,
- unscanned_marker_fragments)
- });
- marker_fragments.fragments
- }
- ListStyleTypeContent::GeneratedContent(info) => {
- vec![Fragment::new(node, SpecificFragmentInfo::GeneratedContent(info), self.layout_context)]
- }
- }
- }
+ vec![Fragment::new(
+ node,
+ SpecificFragmentInfo::Image(image_info),
+ self.layout_context,
+ )]
+ },
+ ImageUrlOrNone::None => match ListStyleTypeContent::from_list_style_type(
+ node.style(self.style_context()).get_list().list_style_type,
+ ) {
+ ListStyleTypeContent::None => Vec::new(),
+ ListStyleTypeContent::StaticText(ch) => {
+ let text = format!("{}\u{a0}", ch);
+ let mut unscanned_marker_fragments = LinkedList::new();
+ unscanned_marker_fragments.push_back(Fragment::new(
+ node,
+ SpecificFragmentInfo::UnscannedText(Box::new(
+ UnscannedTextFragmentInfo::new(Box::<str>::from(text), None),
+ )),
+ self.layout_context,
+ ));
+ let marker_fragments =
+ with_thread_local_font_context(self.layout_context, |mut font_context| {
+ TextRunScanner::new()
+ .scan_for_runs(&mut font_context, unscanned_marker_fragments)
+ });
+ marker_fragments.fragments
+ },
+ ListStyleTypeContent::GeneratedContent(info) => vec![Fragment::new(
+ node,
+ SpecificFragmentInfo::GeneratedContent(info),
+ self.layout_context,
+ )],
+ },
};
// If the list marker is outside, it becomes the special "outside fragment" that list item
@@ -1318,52 +1516,73 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
// there.
let mut initial_fragments = IntermediateInlineFragments::new();
let main_fragment = self.build_fragment_for_block(node);
- let flow = match node.style(self.style_context()).get_list().list_style_position {
- ListStylePosition::Outside => {
- Arc::new(ListItemFlow::from_fragments_and_flotation(
- main_fragment, marker_fragments, flotation))
- }
+ let flow = match node
+ .style(self.style_context())
+ .get_list()
+ .list_style_position
+ {
+ ListStylePosition::Outside => Arc::new(ListItemFlow::from_fragments_and_flotation(
+ main_fragment,
+ marker_fragments,
+ flotation,
+ )),
ListStylePosition::Inside => {
for marker_fragment in marker_fragments {
initial_fragments.fragments.push_back(marker_fragment)
}
Arc::new(ListItemFlow::from_fragments_and_flotation(
- main_fragment, vec![], flotation))
- }
+ main_fragment,
+ vec![],
+ flotation,
+ ))
+ },
};
- self.build_flow_for_block_starting_with_fragments(FlowRef::new(flow), node, initial_fragments)
+ self.build_flow_for_block_starting_with_fragments(
+ FlowRef::new(flow),
+ node,
+ initial_fragments,
+ )
}
/// Creates a fragment for a node with `display: table-column`.
- fn build_fragments_for_table_column(&mut self, node: &ConcreteThreadSafeLayoutNode)
- -> ConstructionResult {
+ fn build_fragments_for_table_column(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
// CSS 2.1 § 17.2.1. Treat all child fragments of a `table-column` as `display: none`.
for kid in node.children() {
self.set_flow_construction_result(&kid, ConstructionResult::None)
}
let specific = SpecificFragmentInfo::TableColumn(TableColumnFragmentInfo::new(node));
- let construction_item = ConstructionItem::TableColumnFragment(Fragment::new(node,
- specific,
- self.layout_context));
+ let construction_item = ConstructionItem::TableColumnFragment(Fragment::new(
+ node,
+ specific,
+ self.layout_context,
+ ));
ConstructionResult::ConstructionItem(construction_item)
}
/// Builds a flow for a node with `display: table-column-group`.
/// This yields a `TableColGroupFlow`.
- fn build_flow_for_table_colgroup(&mut self, node: &ConcreteThreadSafeLayoutNode)
- -> ConstructionResult {
- let fragment =
- Fragment::new(node,
- SpecificFragmentInfo::TableColumn(TableColumnFragmentInfo::new(node)),
- self.layout_context);
- let mut col_fragments = vec!();
+ fn build_flow_for_table_colgroup(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ ) -> ConstructionResult {
+ let fragment = Fragment::new(
+ node,
+ SpecificFragmentInfo::TableColumn(TableColumnFragmentInfo::new(node)),
+ self.layout_context,
+ );
+ let mut col_fragments = vec![];
for kid in node.children() {
// CSS 2.1 § 17.2.1. Treat all non-column child fragments of `table-column-group`
// as `display: none`.
- if let ConstructionResult::ConstructionItem(ConstructionItem::TableColumnFragment(fragment)) =
- kid.get_construction_result() {
+ if let ConstructionResult::ConstructionItem(ConstructionItem::TableColumnFragment(
+ fragment,
+ )) = kid.get_construction_result()
+ {
col_fragments.push(fragment)
}
}
@@ -1372,17 +1591,21 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let specific = SpecificFragmentInfo::TableColumn(TableColumnFragmentInfo::new(node));
col_fragments.push(Fragment::new(node, specific, self.layout_context));
}
- let mut flow = FlowRef::new(Arc::new(TableColGroupFlow::from_fragments(fragment, col_fragments)));
+ let mut flow = FlowRef::new(Arc::new(TableColGroupFlow::from_fragments(
+ fragment,
+ col_fragments,
+ )));
flow.finish();
ConstructionResult::Flow(flow, AbsoluteDescendants::new())
}
/// Builds a flow for a node with 'display: flex'.
- fn build_flow_for_flex(&mut self,
- node: &ConcreteThreadSafeLayoutNode,
- float_kind: Option<FloatKind>)
- -> ConstructionResult {
+ fn build_flow_for_flex(
+ &mut self,
+ node: &ConcreteThreadSafeLayoutNode,
+ float_kind: Option<FloatKind>,
+ ) -> ConstructionResult {
let fragment = self.build_fragment_for_block(node);
let flow = FlowRef::new(Arc::new(FlexFlow::from_fragment(fragment, float_kind)));
self.build_flow_for_block_like(flow, node)
@@ -1408,18 +1631,24 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
}
for kid in node.children() {
- if kid.flags().contains(LayoutDataFlags::HAS_NEWLY_CONSTRUCTED_FLOW) {
+ if kid
+ .flags()
+ .contains(LayoutDataFlags::HAS_NEWLY_CONSTRUCTED_FLOW)
+ {
kid.remove_flags(LayoutDataFlags::HAS_NEWLY_CONSTRUCTED_FLOW);
need_to_reconstruct = true
}
}
if need_to_reconstruct {
- return false
+ return false;
}
- if node.restyle_damage().contains(ServoRestyleDamage::RECONSTRUCT_FLOW) {
- return false
+ if node
+ .restyle_damage()
+ .contains(ServoRestyleDamage::RECONSTRUCT_FLOW)
+ {
+ return false;
}
let mut set_has_newly_constructed_flow_flag = false;
@@ -1427,7 +1656,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
let style = node.style(self.style_context());
if style.can_be_fragmented() || style.is_multicol() {
- return false
+ return false;
}
let damage = node.restyle_damage();
@@ -1439,77 +1668,83 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
// The node's flow is of the same type and has the same set of children and can
// therefore be repaired by simply propagating damage and style to the flow.
if !flow.is_block_flow() {
- return false
+ return false;
}
let flow = FlowRef::deref_mut(flow);
flow.mut_base().restyle_damage.insert(damage);
flow.repair_style_and_bubble_inline_sizes(&style);
true
- }
+ },
ConstructionResult::ConstructionItem(ConstructionItem::InlineFragments(
- ref mut inline_fragments_construction_result)) => {
+ ref mut inline_fragments_construction_result,
+ )) => {
if !inline_fragments_construction_result.splits.is_empty() {
- return false
+ return false;
}
- for fragment in inline_fragments_construction_result.fragments
- .fragments
- .iter_mut() {
+ for fragment in inline_fragments_construction_result
+ .fragments
+ .fragments
+ .iter_mut()
+ {
// Only mutate the styles of fragments that represent the dirty node (including
// pseudo-element).
if fragment.node != node.opaque() {
- continue
+ continue;
}
if fragment.pseudo != node.get_pseudo_element_type() {
- continue
+ continue;
}
match fragment.specific {
SpecificFragmentInfo::InlineBlock(ref mut inline_block_fragment) => {
- let flow_ref = FlowRef::deref_mut(&mut inline_block_fragment.flow_ref);
+ let flow_ref =
+ FlowRef::deref_mut(&mut inline_block_fragment.flow_ref);
flow_ref.mut_base().restyle_damage.insert(damage);
// FIXME(pcwalton): Fragment restyle damage too?
flow_ref.repair_style_and_bubble_inline_sizes(&style);
- }
+ },
SpecificFragmentInfo::InlineAbsoluteHypothetical(
- ref mut inline_absolute_hypothetical_fragment) => {
+ ref mut inline_absolute_hypothetical_fragment,
+ ) => {
let flow_ref = FlowRef::deref_mut(
- &mut inline_absolute_hypothetical_fragment.flow_ref);
+ &mut inline_absolute_hypothetical_fragment.flow_ref,
+ );
flow_ref.mut_base().restyle_damage.insert(damage);
// FIXME(pcwalton): Fragment restyle damage too?
flow_ref.repair_style_and_bubble_inline_sizes(&style);
- }
- SpecificFragmentInfo::InlineAbsolute(ref mut inline_absolute_fragment) => {
- let flow_ref = FlowRef::deref_mut(
- &mut inline_absolute_fragment.flow_ref);
+ },
+ SpecificFragmentInfo::InlineAbsolute(
+ ref mut inline_absolute_fragment,
+ ) => {
+ let flow_ref =
+ FlowRef::deref_mut(&mut inline_absolute_fragment.flow_ref);
flow_ref.mut_base().restyle_damage.insert(damage);
// FIXME(pcwalton): Fragment restyle damage too?
flow_ref.repair_style_and_bubble_inline_sizes(&style);
- }
+ },
SpecificFragmentInfo::ScannedText(_) => {
// Text fragments in ConstructionResult haven't been scanned yet
unreachable!()
- }
+ },
SpecificFragmentInfo::GeneratedContent(_) |
SpecificFragmentInfo::UnscannedText(_) => {
// We can't repair this unscanned text; we need to update the
// scanned text fragments.
//
// TODO: Add code to find and repair the ScannedText fragments?
- return false
- }
+ return false;
+ },
_ => {
fragment.repair_style(&style);
set_has_newly_constructed_flow_flag = true;
- }
+ },
}
}
true
- }
- ConstructionResult::ConstructionItem(_) => {
- false
- }
+ },
+ ConstructionResult::ConstructionItem(_) => false,
}
};
if set_has_newly_constructed_flow_flag {
@@ -1520,8 +1755,10 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
}
impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadSafeLayoutNode>
- for FlowConstructor<'a, ConcreteThreadSafeLayoutNode>
- where ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode {
+ for FlowConstructor<'a, ConcreteThreadSafeLayoutNode>
+where
+ ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode,
+{
// Construct Flow based on 'display', 'position', and 'float' values.
//
// CSS 2.1 Section 9.7
@@ -1544,8 +1781,12 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
let (display, float, positioning) = match node.type_id() {
None => {
// Pseudo-element.
- (style.get_box().display, style.get_box().float, style.get_box().position)
- }
+ (
+ style.get_box().display,
+ style.get_box().float,
+ style.get_box().position,
+ )
+ },
Some(LayoutNodeType::Element(_)) => {
let original_display = style.get_box().original_display;
// FIXME(emilio, #19771): This munged_display business is pretty
@@ -1555,26 +1796,35 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
Display::Inline | Display::InlineBlock => original_display,
_ => style.get_box().display,
};
- (munged_display, style.get_box().float, style.get_box().position)
- }
- Some(LayoutNodeType::Text) =>
- (Display::Inline, Float::None, Position::Static),
+ (
+ munged_display,
+ style.get_box().float,
+ style.get_box().position,
+ )
+ },
+ Some(LayoutNodeType::Text) => (Display::Inline, Float::None, Position::Static),
};
- debug!("building flow for node: {:?} {:?} {:?} {:?}", display, float, positioning, node.type_id());
+ debug!(
+ "building flow for node: {:?} {:?} {:?} {:?}",
+ display,
+ float,
+ positioning,
+ node.type_id()
+ );
// Switch on display and floatedness.
match (display, float, positioning) {
// `display: none` contributes no flow construction result.
(Display::None, _, _) => {
self.set_flow_construction_result(node, ConstructionResult::None);
- }
+ },
// Table items contribute table flow construction results.
(Display::Table, float_value, _) => {
let construction_result = self.build_flow_for_table(node, float_value);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Absolutely positioned elements will have computed value of
// `float` as 'none' and `display` as per the table.
@@ -1582,17 +1832,16 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
// positioned, but inline we shouldn't try to construct a block
// flow here - instead, let it match the inline case
// below.
- (Display::Block, _, Position::Absolute) |
- (Display::Block, _, Position::Fixed) => {
+ (Display::Block, _, Position::Absolute) | (Display::Block, _, Position::Fixed) => {
let construction_result = self.build_flow_for_block(node, None);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// List items contribute their own special flows.
(Display::ListItem, float_value, _) => {
let construction_result = self.build_flow_for_list_item(node, float_value);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Inline items that are absolutely-positioned contribute inline fragment construction
// results with a hypothetical fragment.
@@ -1601,7 +1850,7 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
let construction_result =
self.build_fragment_for_absolutely_positioned_inline(node);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Inline items contribute inline fragment construction results.
//
@@ -1609,32 +1858,32 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
(Display::Inline, Float::None, _) => {
let construction_result = self.build_fragments_for_inline(node);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Inline-block items contribute inline fragment construction results.
(Display::InlineBlock, Float::None, _) => {
- let construction_result = self.build_fragment_for_inline_block_or_inline_flex(node,
- Display::InlineBlock);
+ let construction_result =
+ self.build_fragment_for_inline_block_or_inline_flex(node, Display::InlineBlock);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Table items contribute table flow construction results.
(Display::TableCaption, _, _) => {
let construction_result = self.build_flow_for_table_caption(node);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Table items contribute table flow construction results.
(Display::TableColumnGroup, _, _) => {
let construction_result = self.build_flow_for_table_colgroup(node);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Table items contribute table flow construction results.
(Display::TableColumn, _, _) => {
let construction_result = self.build_fragments_for_table_column(node);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Table items contribute table flow construction results.
(Display::TableRowGroup, _, _) |
@@ -1642,43 +1891,42 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
(Display::TableFooterGroup, _, _) => {
let construction_result = self.build_flow_for_table_rowgroup(node);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Table items contribute table flow construction results.
(Display::TableRow, _, _) => {
let construction_result = self.build_flow_for_table_row(node);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Table items contribute table flow construction results.
(Display::TableCell, _, _) => {
let construction_result = self.build_flow_for_table_cell(node);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Flex items contribute flex flow construction results.
(Display::Flex, float_value, _) => {
let float_kind = FloatKind::from_property(float_value);
let construction_result = self.build_flow_for_flex(node, float_kind);
self.set_flow_construction_result(node, construction_result)
- }
+ },
(Display::InlineFlex, _, _) => {
- let construction_result = self.build_fragment_for_inline_block_or_inline_flex(node,
- Display::InlineFlex);
+ let construction_result =
+ self.build_fragment_for_inline_block_or_inline_flex(node, Display::InlineFlex);
self.set_flow_construction_result(node, construction_result)
- }
+ },
// Block flows that are not floated contribute block flow construction results.
//
// TODO(pcwalton): Make this only trigger for blocks and handle the other `display`
// properties separately.
-
(_, float_value, _) => {
let float_kind = FloatKind::from_property(float_value);
let construction_result = self.build_flow_for_block(node, float_kind);
self.set_flow_construction_result(node, construction_result)
- }
+ },
}
}
}
@@ -1698,7 +1946,9 @@ trait NodeUtils {
}
impl<ConcreteThreadSafeLayoutNode> NodeUtils for ConcreteThreadSafeLayoutNode
- where ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode {
+where
+ ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode,
+{
fn is_replaced_content(&self) -> bool {
match self.type_id() {
Some(LayoutNodeType::Text) |
@@ -1706,7 +1956,9 @@ impl<ConcreteThreadSafeLayoutNode> NodeUtils for ConcreteThreadSafeLayoutNode
Some(LayoutNodeType::Element(LayoutElementType::HTMLIFrameElement)) |
Some(LayoutNodeType::Element(LayoutElementType::HTMLCanvasElement)) |
Some(LayoutNodeType::Element(LayoutElementType::SVGSVGElement)) => true,
- Some(LayoutNodeType::Element(LayoutElementType::HTMLObjectElement)) => self.has_object_data(),
+ Some(LayoutNodeType::Element(LayoutElementType::HTMLObjectElement)) => {
+ self.has_object_data()
+ },
Some(LayoutNodeType::Element(_)) => false,
None => self.get_pseudo_element_type().is_replaced_content(),
}
@@ -1718,7 +1970,7 @@ impl<ConcreteThreadSafeLayoutNode> NodeUtils for ConcreteThreadSafeLayoutNode
PseudoElementType::After => &mut data.after_flow_construction_result,
PseudoElementType::DetailsSummary => &mut data.details_summary_flow_construction_result,
PseudoElementType::DetailsContent => &mut data.details_content_flow_construction_result,
- PseudoElementType::Normal => &mut data.flow_construction_result,
+ PseudoElementType::Normal => &mut data.flow_construction_result,
}
}
@@ -1745,7 +1997,10 @@ trait ObjectElement {
fn object_data(&self) -> Option<ServoUrl>;
}
-impl<N> ObjectElement for N where N: ThreadSafeLayoutNode {
+impl<N> ObjectElement for N
+where
+ N: ThreadSafeLayoutNode,
+{
fn has_object_data(&self) -> bool {
let elem = self.as_element().unwrap();
let type_and_data = (
@@ -1754,7 +2009,7 @@ impl<N> ObjectElement for N where N: ThreadSafeLayoutNode {
);
match type_and_data {
(None, Some(uri)) => is_image_data(uri),
- _ => false
+ _ => false,
}
}
@@ -1766,7 +2021,7 @@ impl<N> ObjectElement for N where N: ThreadSafeLayoutNode {
);
match type_and_data {
(None, Some(uri)) if is_image_data(uri) => ServoUrl::parse(uri).ok(),
- _ => None
+ _ => None,
}
}
}
@@ -1809,7 +2064,10 @@ impl FlowConstructionUtils for FlowRef {
fn finish(&mut self) {
if !opts::get().bubble_inline_sizes_separately {
FlowRef::deref_mut(self).bubble_inline_sizes();
- FlowRef::deref_mut(self).mut_base().restyle_damage.remove(ServoRestyleDamage::BUBBLE_ISIZES);
+ FlowRef::deref_mut(self)
+ .mut_base()
+ .restyle_damage
+ .remove(ServoRestyleDamage::BUBBLE_ISIZES);
}
}
}
@@ -1817,48 +2075,61 @@ impl FlowConstructionUtils for FlowRef {
/// Strips ignorable whitespace from the start of a list of fragments.
pub fn strip_ignorable_whitespace_from_start(this: &mut LinkedList<Fragment>) {
if this.is_empty() {
- return // Fast path.
+ return; // Fast path.
}
let mut leading_fragments_consisting_of_solely_bidi_control_characters = LinkedList::new();
while !this.is_empty() {
- match this.front_mut().as_mut().unwrap().strip_leading_whitespace_if_necessary() {
+ match this
+ .front_mut()
+ .as_mut()
+ .unwrap()
+ .strip_leading_whitespace_if_necessary()
+ {
WhitespaceStrippingResult::RetainFragment => break,
WhitespaceStrippingResult::FragmentContainedOnlyBidiControlCharacters => {
- leading_fragments_consisting_of_solely_bidi_control_characters.push_back(
- this.pop_front().unwrap())
- }
+ leading_fragments_consisting_of_solely_bidi_control_characters
+ .push_back(this.pop_front().unwrap())
+ },
WhitespaceStrippingResult::FragmentContainedOnlyWhitespace => {
let removed_fragment = this.pop_front().unwrap();
if let Some(ref mut remaining_fragment) = this.front_mut() {
remaining_fragment.meld_with_prev_inline_fragment(&removed_fragment);
}
- }
+ },
}
}
- prepend_from(this, &mut leading_fragments_consisting_of_solely_bidi_control_characters);
+ prepend_from(
+ this,
+ &mut leading_fragments_consisting_of_solely_bidi_control_characters,
+ );
}
/// Strips ignorable whitespace from the end of a list of fragments.
pub fn strip_ignorable_whitespace_from_end(this: &mut LinkedList<Fragment>) {
if this.is_empty() {
- return
+ return;
}
let mut trailing_fragments_consisting_of_solely_bidi_control_characters = LinkedList::new();
while !this.is_empty() {
- match this.back_mut().as_mut().unwrap().strip_trailing_whitespace_if_necessary() {
+ match this
+ .back_mut()
+ .as_mut()
+ .unwrap()
+ .strip_trailing_whitespace_if_necessary()
+ {
WhitespaceStrippingResult::RetainFragment => break,
WhitespaceStrippingResult::FragmentContainedOnlyBidiControlCharacters => {
- trailing_fragments_consisting_of_solely_bidi_control_characters.push_front(
- this.pop_back().unwrap())
- }
+ trailing_fragments_consisting_of_solely_bidi_control_characters
+ .push_front(this.pop_back().unwrap())
+ },
WhitespaceStrippingResult::FragmentContainedOnlyWhitespace => {
let removed_fragment = this.pop_back().unwrap();
if let Some(ref mut remaining_fragment) = this.back_mut() {
remaining_fragment.meld_with_next_inline_fragment(&removed_fragment);
}
- }
+ },
}
}
this.append(&mut trailing_fragments_consisting_of_solely_bidi_control_characters);
@@ -1875,16 +2146,16 @@ fn bidi_control_chars(style: &ServoArc<ComputedValues>) -> Option<(&'static str,
// See the table in http://dev.w3.org/csswg/css-writing-modes/#unicode-bidi
match (unicode_bidi, direction) {
- (Normal, _) => None,
- (Embed, Ltr) => Some(("\u{202A}", "\u{202C}")),
- (Embed, Rtl) => Some(("\u{202B}", "\u{202C}")),
- (Isolate, Ltr) => Some(("\u{2066}", "\u{2069}")),
- (Isolate, Rtl) => Some(("\u{2067}", "\u{2069}")),
- (BidiOverride, Ltr) => Some(("\u{202D}", "\u{202C}")),
- (BidiOverride, Rtl) => Some(("\u{202E}", "\u{202C}")),
- (IsolateOverride, Ltr) => Some(("\u{2068}\u{202D}", "\u{202C}\u{2069}")),
- (IsolateOverride, Rtl) => Some(("\u{2068}\u{202E}", "\u{202C}\u{2069}")),
- (Plaintext, _) => Some(("\u{2068}", "\u{2069}")),
+ (Normal, _) => None,
+ (Embed, Ltr) => Some(("\u{202A}", "\u{202C}")),
+ (Embed, Rtl) => Some(("\u{202B}", "\u{202C}")),
+ (Isolate, Ltr) => Some(("\u{2066}", "\u{2069}")),
+ (Isolate, Rtl) => Some(("\u{2067}", "\u{2069}")),
+ (BidiOverride, Ltr) => Some(("\u{202D}", "\u{202C}")),
+ (BidiOverride, Rtl) => Some(("\u{202E}", "\u{202C}")),
+ (IsolateOverride, Ltr) => Some(("\u{2068}\u{202D}", "\u{202C}\u{2069}")),
+ (IsolateOverride, Rtl) => Some(("\u{2068}\u{202E}", "\u{202C}\u{2069}")),
+ (Plaintext, _) => Some(("\u{2068}", "\u{2069}")),
}
}
@@ -1897,21 +2168,24 @@ fn control_chars_to_fragment<E>(
where
E: TElement,
{
- let info = SpecificFragmentInfo::UnscannedText(
- Box::new(UnscannedTextFragmentInfo::new(Box::<str>::from(text), None))
- );
+ let info = SpecificFragmentInfo::UnscannedText(Box::new(UnscannedTextFragmentInfo::new(
+ Box::<str>::from(text),
+ None,
+ )));
let text_style = context.stylist.style_for_anonymous::<E>(
&context.guards,
&PseudoElement::ServoText,
&node.style,
);
- Fragment::from_opaque_node_and_style(node.address,
- node.pseudo,
- text_style,
- node.selected_style.clone(),
- restyle_damage,
- info)
+ Fragment::from_opaque_node_and_style(
+ node.address,
+ node.pseudo,
+ text_style,
+ node.selected_style.clone(),
+ restyle_damage,
+ info,
+ )
}
/// Convenience methods for computed CSS values
@@ -1926,13 +2200,13 @@ impl ComputedValueUtils for ComputedValues {
let border = self.get_border();
!padding.padding_top.is_definitely_zero() ||
- !padding.padding_right.is_definitely_zero() ||
- !padding.padding_bottom.is_definitely_zero() ||
- !padding.padding_left.is_definitely_zero() ||
- border.border_top_width.px() != 0. ||
- border.border_right_width.px() != 0. ||
- border.border_bottom_width.px() != 0. ||
- border.border_left_width.px() != 0.
+ !padding.padding_right.is_definitely_zero() ||
+ !padding.padding_bottom.is_definitely_zero() ||
+ !padding.padding_left.is_definitely_zero() ||
+ border.border_top_width.px() != 0. ||
+ border.border_right_width.px() != 0. ||
+ border.border_bottom_width.px() != 0. ||
+ border.border_left_width.px() != 0.
}
}
@@ -1955,9 +2229,7 @@ struct Legalizer {
impl Legalizer {
/// Creates a new legalizer.
fn new() -> Legalizer {
- Legalizer {
- stack: vec![],
- }
+ Legalizer { stack: vec![] }
}
/// Makes the `child` flow a new child of `parent`. Anonymous flows are automatically inserted
@@ -1967,13 +2239,12 @@ impl Legalizer {
context: &SharedStyleContext,
parent: &mut FlowRef,
mut child: FlowRef,
- )
- where
+ ) where
E: TElement,
{
while !self.stack.is_empty() {
if self.try_to_add_child::<E>(context, parent, &mut child) {
- return
+ return;
}
self.flush_top_of_stack(parent)
}
@@ -2017,7 +2288,7 @@ impl Legalizer {
(FlowClass::TableRow, FlowClass::TableCell) => {
parent.add_new_child((*child).clone());
true
- }
+ },
(FlowClass::TableWrapper, _) |
(FlowClass::Table, _) |
@@ -2028,12 +2299,13 @@ impl Legalizer {
(_, FlowClass::TableRowGroup) |
(_, FlowClass::TableRow) |
(_, FlowClass::TableCaption) |
- (_, FlowClass::TableCell) => {
- false
- }
+ (_, FlowClass::TableCell) => false,
(FlowClass::Flex, FlowClass::Inline) => {
- FlowRef::deref_mut(child).mut_base().flags.insert(FlowFlags::MARGINS_CANNOT_COLLAPSE);
+ FlowRef::deref_mut(child)
+ .mut_base()
+ .flags
+ .insert(FlowFlags::MARGINS_CANNOT_COLLAPSE);
let mut block_wrapper = Legalizer::create_anonymous_flow::<E, _>(
context,
parent,
@@ -2056,7 +2328,7 @@ impl Legalizer {
block_wrapper.finish();
parent.add_new_child(block_wrapper);
true
- }
+ },
(FlowClass::Flex, _) => {
{
@@ -2071,12 +2343,12 @@ impl Legalizer {
}
parent.add_new_child((*child).clone());
true
- }
+ },
_ => {
parent.add_new_child((*child).clone());
true
- }
+ },
}
}
@@ -2089,53 +2361,43 @@ impl Legalizer {
/// Adds the anonymous flow that would be necessary to make an illegal child of `parent` legal
/// to the stack.
- fn push_next_anonymous_flow<E>(
- &mut self,
- context: &SharedStyleContext,
- parent: &FlowRef,
- )
+ fn push_next_anonymous_flow<E>(&mut self, context: &SharedStyleContext, parent: &FlowRef)
where
E: TElement,
{
let parent_class = self.stack.last().unwrap_or(parent).class();
match parent_class {
- FlowClass::TableRow => {
- self.push_new_anonymous_flow::<E, _>(
- context,
- parent,
- &[PseudoElement::ServoAnonymousTableCell],
- SpecificFragmentInfo::TableCell,
- TableCellFlow::from_fragment,
- )
- }
- FlowClass::Table | FlowClass::TableRowGroup => {
- self.push_new_anonymous_flow::<E, _>(
- context,
- parent,
- &[PseudoElement::ServoAnonymousTableRow],
- SpecificFragmentInfo::TableRow,
- TableRowFlow::from_fragment,
- )
- }
- FlowClass::TableWrapper => {
- self.push_new_anonymous_flow::<E, _>(
- context,
- parent,
- &[PseudoElement::ServoAnonymousTable],
- SpecificFragmentInfo::Table,
- TableFlow::from_fragment,
- )
- }
- _ => {
- self.push_new_anonymous_flow::<E, _>(
- context,
- parent,
- &[PseudoElement::ServoTableWrapper,
- PseudoElement::ServoAnonymousTableWrapper],
- SpecificFragmentInfo::TableWrapper,
- TableWrapperFlow::from_fragment,
- )
- }
+ FlowClass::TableRow => self.push_new_anonymous_flow::<E, _>(
+ context,
+ parent,
+ &[PseudoElement::ServoAnonymousTableCell],
+ SpecificFragmentInfo::TableCell,
+ TableCellFlow::from_fragment,
+ ),
+ FlowClass::Table | FlowClass::TableRowGroup => self.push_new_anonymous_flow::<E, _>(
+ context,
+ parent,
+ &[PseudoElement::ServoAnonymousTableRow],
+ SpecificFragmentInfo::TableRow,
+ TableRowFlow::from_fragment,
+ ),
+ FlowClass::TableWrapper => self.push_new_anonymous_flow::<E, _>(
+ context,
+ parent,
+ &[PseudoElement::ServoAnonymousTable],
+ SpecificFragmentInfo::Table,
+ TableFlow::from_fragment,
+ ),
+ _ => self.push_new_anonymous_flow::<E, _>(
+ context,
+ parent,
+ &[
+ PseudoElement::ServoTableWrapper,
+ PseudoElement::ServoAnonymousTableWrapper,
+ ],
+ SpecificFragmentInfo::TableWrapper,
+ TableWrapperFlow::from_fragment,
+ ),
}
}
@@ -2146,9 +2408,8 @@ impl Legalizer {
reference: &FlowRef,
pseudos: &[PseudoElement],
specific_fragment_info: SpecificFragmentInfo,
- constructor: extern "Rust" fn(Fragment) -> F,
- )
- where
+ constructor: fn(Fragment) -> F,
+ ) where
E: TElement,
F: Flow,
{
@@ -2172,7 +2433,7 @@ impl Legalizer {
reference: &FlowRef,
pseudos: &[PseudoElement],
specific_fragment_info: SpecificFragmentInfo,
- constructor: extern "Rust" fn(Fragment) -> F,
+ constructor: fn(Fragment) -> F,
) -> FlowRef
where
E: TElement,
@@ -2181,18 +2442,14 @@ impl Legalizer {
let reference_block = reference.as_block();
let mut new_style = reference_block.fragment.style.clone();
for pseudo in pseudos {
- new_style = context.stylist.style_for_anonymous::<E>(
- &context.guards,
- pseudo,
- &new_style,
- );
+ new_style =
+ context
+ .stylist
+ .style_for_anonymous::<E>(&context.guards, pseudo, &new_style);
}
- let fragment =
- reference_block.fragment.create_similar_anonymous_fragment(
- new_style,
- specific_fragment_info,
- );
+ let fragment = reference_block
+ .fragment
+ .create_similar_anonymous_fragment(new_style, specific_fragment_info);
FlowRef::new(Arc::new(constructor(fragment)))
}
}
-
diff --git a/components/layout/context.rs b/components/layout/context.rs
index f851d06799d..a87173d633e 100644
--- a/components/layout/context.rs
+++ b/components/layout/context.rs
@@ -32,7 +32,8 @@ pub type LayoutFontContext = FontContext<FontCacheThread>;
thread_local!(static FONT_CONTEXT_KEY: RefCell<Option<LayoutFontContext>> = RefCell::new(None));
pub fn with_thread_local_font_context<F, R>(layout_context: &LayoutContext, f: F) -> R
- where F: FnOnce(&mut LayoutFontContext) -> R
+where
+ F: FnOnce(&mut LayoutFontContext) -> R,
{
FONT_CONTEXT_KEY.with(|k| {
let mut font_context = k.borrow_mut();
@@ -69,9 +70,11 @@ pub struct LayoutContext<'a> {
pub font_cache_thread: Mutex<FontCacheThread>,
/// A cache of WebRender image info.
- pub webrender_image_cache: Arc<RwLock<HashMap<(ServoUrl, UsePlaceholder),
- WebRenderImageInfo,
- BuildHasherDefault<FnvHasher>>>>,
+ pub webrender_image_cache: Arc<
+ RwLock<
+ HashMap<(ServoUrl, UsePlaceholder), WebRenderImageInfo, BuildHasherDefault<FnvHasher>>,
+ >,
+ >,
/// Paint worklets
pub registered_painters: &'a RegisteredPainters,
@@ -101,11 +104,12 @@ impl<'a> LayoutContext<'a> {
&self.style_context
}
- pub fn get_or_request_image_or_meta(&self,
- node: OpaqueNode,
- url: ServoUrl,
- use_placeholder: UsePlaceholder)
- -> Option<ImageOrMetadataAvailable> {
+ pub fn get_or_request_image_or_meta(
+ &self,
+ node: OpaqueNode,
+ url: ServoUrl,
+ use_placeholder: UsePlaceholder,
+ ) -> Option<ImageOrMetadataAvailable> {
//XXXjdm For cases where we do not request an image, we still need to
// ensure the node gets another script-initiated reflow or it
// won't be requested at all.
@@ -116,9 +120,9 @@ impl<'a> LayoutContext<'a> {
};
// See if the image is already available
- let result = self.image_cache.find_image_or_metadata(url.clone(),
- use_placeholder,
- can_request);
+ let result =
+ self.image_cache
+ .find_image_or_metadata(url.clone(), use_placeholder, can_request);
match result {
Ok(image_or_metadata) => Some(image_or_metadata),
// Image failed to load, so just return nothing
@@ -130,9 +134,14 @@ impl<'a> LayoutContext<'a> {
node: node.to_untrusted_node_address(),
id: id,
};
- self.pending_images.as_ref().unwrap().lock().unwrap().push(image);
+ self.pending_images
+ .as_ref()
+ .unwrap()
+ .lock()
+ .unwrap()
+ .push(image);
None
- }
+ },
// Image has been requested, is still pending. Return no image for this paint loop.
// When the image loads it will trigger a reflow and/or repaint.
Err(ImageState::Pending(id)) => {
@@ -148,19 +157,22 @@ impl<'a> LayoutContext<'a> {
pending_images.lock().unwrap().push(image);
}
None
- }
+ },
}
}
- pub fn get_webrender_image_for_url(&self,
- node: OpaqueNode,
- url: ServoUrl,
- use_placeholder: UsePlaceholder)
- -> Option<WebRenderImageInfo> {
- if let Some(existing_webrender_image) = self.webrender_image_cache
- .read()
- .get(&(url.clone(), use_placeholder)) {
- return Some((*existing_webrender_image).clone())
+ pub fn get_webrender_image_for_url(
+ &self,
+ node: OpaqueNode,
+ url: ServoUrl,
+ use_placeholder: UsePlaceholder,
+ ) -> Option<WebRenderImageInfo> {
+ if let Some(existing_webrender_image) = self
+ .webrender_image_cache
+ .read()
+ .get(&(url.clone(), use_placeholder))
+ {
+ return Some((*existing_webrender_image).clone());
}
match self.get_or_request_image_or_meta(node, url.clone(), use_placeholder) {
@@ -170,11 +182,10 @@ impl<'a> LayoutContext<'a> {
Some(image_info)
} else {
let mut webrender_image_cache = self.webrender_image_cache.write();
- webrender_image_cache.insert((url, use_placeholder),
- image_info);
+ webrender_image_cache.insert((url, use_placeholder), image_info);
Some(image_info)
}
- }
+ },
None | Some(ImageOrMetadataAvailable::MetadataAvailable(_)) => None,
}
}
diff --git a/components/layout/data.rs b/components/layout/data.rs
index 20ff5ef2b71..2df8ea6432b 100644
--- a/components/layout/data.rs
+++ b/components/layout/data.rs
@@ -24,7 +24,6 @@ impl StyleAndLayoutData {
}
}
-
/// Data that layout associates with a node.
#[repr(C)]
pub struct LayoutData {
diff --git a/components/layout/display_list/background.rs b/components/layout/display_list/background.rs
index f66f70ee17a..6e4751f3012 100644
--- a/components/layout/display_list/background.rs
+++ b/components/layout/display_list/background.rs
@@ -444,8 +444,7 @@ fn convert_gradient_stops(
.filter_map(|item| match *item {
GenericGradientItem::ColorStop(ref stop) => Some(*stop),
_ => None,
- })
- .collect::<Vec<_>>();
+ }).collect::<Vec<_>>();
assert!(stop_items.len() >= 2);
diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs
index 2d481d2ceff..4a9a77a7fb1 100644
--- a/components/layout/display_list/builder.rs
+++ b/components/layout/display_list/builder.rs
@@ -1414,8 +1414,7 @@ impl FragmentDisplayListBuilding for Fragment {
url.clone(),
UsePlaceholder::No,
)
- })
- .and_then(|image| {
+ }).and_then(|image| {
build_image_border_details(image, border_style_struct, outset_layout)
}),
};
@@ -1957,8 +1956,7 @@ impl FragmentDisplayListBuilding for Fragment {
.send(CanvasMsg::FromLayout(
FromLayoutMsg::SendData(sender),
canvas_fragment_info.canvas_id.clone(),
- ))
- .unwrap();
+ )).unwrap();
receiver.recv().unwrap().image_key
},
None => return,
@@ -2070,10 +2068,12 @@ impl FragmentDisplayListBuilding for Fragment {
// FIXME(pcwalton): Get the real container size.
let container_size = Size2D::zero();
let metrics = &text_fragment.run.font_metrics;
- let baseline_origin = stacking_relative_content_box.origin +
- LogicalPoint::new(self.style.writing_mode, Au(0), metrics.ascent)
- .to_physical(self.style.writing_mode, container_size)
- .to_vector();
+ let baseline_origin = stacking_relative_content_box.origin + LogicalPoint::new(
+ self.style.writing_mode,
+ Au(0),
+ metrics.ascent,
+ ).to_physical(self.style.writing_mode, container_size)
+ .to_vector();
// Base item for all text/shadows
let base = state.create_base_display_item(
diff --git a/components/layout/display_list/items.rs b/components/layout/display_list/items.rs
index de5e324aee8..51e44e25cdb 100644
--- a/components/layout/display_list/items.rs
+++ b/components/layout/display_list/items.rs
@@ -513,27 +513,29 @@ impl ClippingRegion {
/// This is a quick, not a precise, test; it can yield false positives.
#[inline]
pub fn might_intersect_point(&self, point: &LayoutPoint) -> bool {
- self.main.contains(point) &&
- self.complex
- .iter()
- .all(|complex| complex.rect.contains(point))
+ self.main.contains(point) && self
+ .complex
+ .iter()
+ .all(|complex| complex.rect.contains(point))
}
/// Returns true if this clipping region might intersect the given rectangle and false
/// otherwise. This is a quick, not a precise, test; it can yield false positives.
#[inline]
pub fn might_intersect_rect(&self, rect: &LayoutRect) -> bool {
- self.main.intersects(rect) &&
- self.complex
- .iter()
- .all(|complex| complex.rect.intersects(rect))
+ self.main.intersects(rect) && self
+ .complex
+ .iter()
+ .all(|complex| complex.rect.intersects(rect))
}
/// Returns true if this clipping region completely surrounds the given rect.
#[inline]
pub fn does_not_clip_rect(&self, rect: &LayoutRect) -> bool {
- self.main.contains(&rect.origin) && self.main.contains(&rect.bottom_right()) &&
- self.complex.iter().all(|complex| {
+ self.main.contains(&rect.origin) && self.main.contains(&rect.bottom_right()) && self
+ .complex
+ .iter()
+ .all(|complex| {
complex.rect.contains(&rect.origin) && complex.rect.contains(&rect.bottom_right())
})
}
@@ -588,8 +590,7 @@ impl ClippingRegion {
rect: complex.rect.translate(delta),
radii: complex.radii,
mode: complex.mode,
- })
- .collect(),
+ }).collect(),
}
}
diff --git a/components/layout/flex.rs b/components/layout/flex.rs
index 2864c922874..e1baa390382 100644
--- a/components/layout/flex.rs
+++ b/components/layout/flex.rs
@@ -45,25 +45,25 @@ enum AxisSize {
impl AxisSize {
/// Generate a new available cross or main axis size from the specified size of the container,
/// containing block size, min constraint, and max constraint
- pub fn new(size: LengthOrPercentageOrAuto, content_size: Option<Au>, min: LengthOrPercentage,
- max: LengthOrPercentageOrNone) -> AxisSize {
+ pub fn new(
+ size: LengthOrPercentageOrAuto,
+ content_size: Option<Au>,
+ min: LengthOrPercentage,
+ max: LengthOrPercentageOrNone,
+ ) -> AxisSize {
match size {
LengthOrPercentageOrAuto::Length(length) => AxisSize::Definite(Au::from(length)),
- LengthOrPercentageOrAuto::Percentage(percent) => {
- match content_size {
- Some(size) => AxisSize::Definite(size.scale_by(percent.0)),
- None => AxisSize::Infinite
- }
- }
- LengthOrPercentageOrAuto::Calc(calc) => {
- match calc.to_used_value(content_size) {
- Some(length) => AxisSize::Definite(length),
- None => AxisSize::Infinite,
- }
- }
+ LengthOrPercentageOrAuto::Percentage(percent) => match content_size {
+ Some(size) => AxisSize::Definite(size.scale_by(percent.0)),
+ None => AxisSize::Infinite,
+ },
+ LengthOrPercentageOrAuto::Calc(calc) => match calc.to_used_value(content_size) {
+ Some(length) => AxisSize::Definite(length),
+ None => AxisSize::Infinite,
+ },
LengthOrPercentageOrAuto::Auto => {
AxisSize::MinMax(SizeConstraint::new(content_size, min, max, None))
- }
+ },
}
}
}
@@ -112,7 +112,7 @@ struct FlexItem {
/// Whether the main size has met its constraint.
pub is_frozen: bool,
/// True if this flow has property 'visibility::collapse'.
- pub is_strut: bool
+ pub is_strut: bool,
}
impl FlexItem {
@@ -133,7 +133,7 @@ impl FlexItem {
flex_shrink: flex_shrink.into(),
order: order,
is_frozen: false,
- is_strut: false
+ is_strut: false,
}
}
@@ -147,41 +147,61 @@ impl FlexItem {
// should change to LengthOrPercentageOrAuto for automatic implied minimal size.
// https://drafts.csswg.org/css-flexbox-1/#min-size-auto
Direction::Inline => {
- let basis = from_flex_basis(block.fragment.style.get_position().flex_basis,
- block.fragment.style.content_inline_size(),
- containing_length);
+ let basis = from_flex_basis(
+ block.fragment.style.get_position().flex_basis,
+ block.fragment.style.content_inline_size(),
+ containing_length,
+ );
// These methods compute auto margins to zero length, which is exactly what we want.
block.fragment.compute_border_and_padding(containing_length);
- block.fragment.compute_inline_direction_margins(containing_length);
- block.fragment.compute_block_direction_margins(containing_length);
+ block
+ .fragment
+ .compute_inline_direction_margins(containing_length);
+ block
+ .fragment
+ .compute_block_direction_margins(containing_length);
let (border_padding, margin) = block.fragment.surrounding_intrinsic_inline_size();
- let content_size = block.base.intrinsic_inline_sizes.preferred_inline_size
- - border_padding
- - margin
- + block.fragment.box_sizing_boundary(direction);
+ let content_size = block.base.intrinsic_inline_sizes.preferred_inline_size -
+ border_padding -
+ margin +
+ block.fragment.box_sizing_boundary(direction);
self.base_size = basis.specified_or_default(content_size);
- self.max_size =
- block.fragment.style.max_inline_size()
- .to_used_value(containing_length)
- .unwrap_or(MAX_AU);
- self.min_size = block.fragment.style.min_inline_size().to_used_value(containing_length);
- }
+ self.max_size = block
+ .fragment
+ .style
+ .max_inline_size()
+ .to_used_value(containing_length)
+ .unwrap_or(MAX_AU);
+ self.min_size = block
+ .fragment
+ .style
+ .min_inline_size()
+ .to_used_value(containing_length);
+ },
Direction::Block => {
- let basis = from_flex_basis(block.fragment.style.get_position().flex_basis,
- block.fragment.style.content_block_size(),
- containing_length);
- let content_size = block.fragment.border_box.size.block
- - block.fragment.border_padding.block_start_end()
- + block.fragment.box_sizing_boundary(direction);
+ let basis = from_flex_basis(
+ block.fragment.style.get_position().flex_basis,
+ block.fragment.style.content_block_size(),
+ containing_length,
+ );
+ let content_size = block.fragment.border_box.size.block -
+ block.fragment.border_padding.block_start_end() +
+ block.fragment.box_sizing_boundary(direction);
self.base_size = basis.specified_or_default(content_size);
- self.max_size =
- block.fragment.style.max_block_size()
- .to_used_value(containing_length)
- .unwrap_or(MAX_AU);
- self.min_size = block.fragment.style.min_block_size().to_used_value(containing_length);
- }
+ self.max_size = block
+ .fragment
+ .style
+ .max_block_size()
+ .to_used_value(containing_length)
+ .unwrap_or(MAX_AU);
+ self.min_size = block
+ .fragment
+ .style
+ .min_block_size()
+ .to_used_value(containing_length);
+ },
}
}
@@ -192,13 +212,14 @@ impl FlexItem {
let outer_width = match direction {
Direction::Inline => {
fragment.border_padding.inline_start_end() + fragment.margin.inline_start_end()
- }
+ },
Direction::Block => {
fragment.border_padding.block_start_end() + fragment.margin.block_start_end()
- }
+ },
};
- max(self.min_size, min(self.base_size, self.max_size))
- - fragment.box_sizing_boundary(direction) + outer_width
+ max(self.min_size, min(self.base_size, self.max_size)) -
+ fragment.box_sizing_boundary(direction) +
+ outer_width
}
/// Returns the number of auto margins in given direction.
@@ -213,7 +234,7 @@ impl FlexItem {
if margin.inline_end == LengthOrPercentageOrAuto::Auto {
margin_count += 1;
}
- }
+ },
Direction::Block => {
if margin.block_start == LengthOrPercentageOrAuto::Auto {
margin_count += 1;
@@ -221,7 +242,7 @@ impl FlexItem {
if margin.block_end == LengthOrPercentageOrAuto::Auto {
margin_count += 1;
}
- }
+ },
}
margin_count
}
@@ -247,7 +268,7 @@ impl FlexLine {
range: range,
auto_margin_count: auto_margin_count,
free_space: free_space,
- cross_size: Au(0)
+ cross_size: Au(0),
}
}
@@ -265,17 +286,20 @@ impl FlexLine {
// https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths
for item in items.iter_mut().filter(|i| !(i.is_strut && collapse)) {
item.main_size = max(item.min_size, min(item.base_size, item.max_size));
- if (self.free_space > Au(0) && (item.flex_grow == 0.0 || item.base_size >= item.max_size)) ||
- (self.free_space < Au(0) && (item.flex_shrink == 0.0 || item.base_size <= item.min_size)) {
- item.is_frozen = true;
- } else {
- item.is_frozen = false;
- total_grow += item.flex_grow;
- total_shrink += item.flex_shrink;
- // The scaled factor is used to calculate flex shrink
- total_scaled += item.flex_shrink * item.base_size.0 as f32;
- active_count += 1;
- }
+ if (self.free_space > Au(0) &&
+ (item.flex_grow == 0.0 || item.base_size >= item.max_size)) ||
+ (self.free_space < Au(0) &&
+ (item.flex_shrink == 0.0 || item.base_size <= item.min_size))
+ {
+ item.is_frozen = true;
+ } else {
+ item.is_frozen = false;
+ total_grow += item.flex_grow;
+ total_shrink += item.flex_shrink;
+ // The scaled factor is used to calculate flex shrink
+ total_scaled += item.flex_shrink * item.base_size.0 as f32;
+ active_count += 1;
+ }
}
let initial_free_space = self.free_space;
@@ -291,12 +315,19 @@ impl FlexLine {
};
total_variation = Au(0);
- for item in items.iter_mut().filter(|i| !i.is_frozen).filter(|i| !(i.is_strut && collapse)) {
+ for item in items
+ .iter_mut()
+ .filter(|i| !i.is_frozen)
+ .filter(|i| !(i.is_strut && collapse))
+ {
// Use this and the 'abs()' below to make the code work in both grow and shrink scenarios.
let (factor, end_size) = if self.free_space > Au(0) {
(item.flex_grow / total_grow, item.max_size)
} else {
- (item.flex_shrink * item.base_size.0 as f32 / total_scaled, item.min_size)
+ (
+ item.flex_shrink * item.base_size.0 as f32 / total_scaled,
+ item.min_size,
+ )
};
let variation = self.free_space.scale_by(factor);
if variation.0.abs() >= (end_size - item.main_size).0.abs() {
@@ -343,13 +374,11 @@ pub struct FlexFlow {
/// True if this flex container can be multiline.
is_wrappable: bool,
/// True if the cross direction is reversed.
- cross_reverse: bool
+ cross_reverse: bool,
}
impl FlexFlow {
- pub fn from_fragment(fragment: Fragment,
- flotation: Option<FloatKind>)
- -> FlexFlow {
+ pub fn from_fragment(fragment: Fragment, flotation: Option<FloatKind>) -> FlexFlow {
let main_mode;
let main_reverse;
let is_wrappable;
@@ -363,8 +392,7 @@ impl FlexFlow {
FlexDirection::ColumnReverse => (Direction::Block, true),
};
main_mode = mode;
- main_reverse =
- reverse == style.writing_mode.is_bidi_ltr();
+ main_reverse = reverse == style.writing_mode.is_bidi_ltr();
let (wrappable, reverse) = match fragment.style.get_position().flex_wrap {
FlexWrap::Nowrap => (false, false),
FlexWrap::Wrap => (true, false),
@@ -384,7 +412,7 @@ impl FlexFlow {
items: Vec::new(),
main_reverse: main_reverse,
is_wrappable: is_wrappable,
- cross_reverse: cross_reverse
+ cross_reverse: cross_reverse,
}
}
@@ -414,7 +442,10 @@ impl FlexFlow {
let kid = children.get(item.index);
item.init_sizes(kid, container_size, self.main_mode);
let outer_main_size = item.outer_main_size(kid, self.main_mode);
- if total_line_size + outer_main_size > container_size && end != start && self.is_wrappable {
+ if total_line_size + outer_main_size > container_size &&
+ end != start &&
+ self.is_wrappable
+ {
break;
}
margin_count += item.auto_margin_count(kid, self.main_mode);
@@ -439,7 +470,8 @@ impl FlexFlow {
if !fixed_width {
for kid in self.block_flow.base.children.iter_mut() {
let base = kid.mut_base();
- let is_absolutely_positioned = base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
+ let is_absolutely_positioned =
+ base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
if !is_absolutely_positioned {
let flex_item_inline_sizes = IntrinsicISizes {
minimum_inline_size: base.intrinsic_inline_sizes.minimum_inline_size,
@@ -465,15 +497,18 @@ impl FlexFlow {
if !fixed_width {
for kid in self.block_flow.base.children.iter_mut() {
let base = kid.mut_base();
- let is_absolutely_positioned = base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
+ let is_absolutely_positioned =
+ base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
if !is_absolutely_positioned {
- computation.content_intrinsic_sizes.minimum_inline_size =
- max(computation.content_intrinsic_sizes.minimum_inline_size,
- base.intrinsic_inline_sizes.minimum_inline_size);
-
- computation.content_intrinsic_sizes.preferred_inline_size =
- max(computation.content_intrinsic_sizes.preferred_inline_size,
- base.intrinsic_inline_sizes.preferred_inline_size);
+ computation.content_intrinsic_sizes.minimum_inline_size = max(
+ computation.content_intrinsic_sizes.minimum_inline_size,
+ base.intrinsic_inline_sizes.minimum_inline_size,
+ );
+
+ computation.content_intrinsic_sizes.preferred_inline_size = max(
+ computation.content_intrinsic_sizes.preferred_inline_size,
+ base.intrinsic_inline_sizes.preferred_inline_size,
+ );
}
}
}
@@ -483,11 +518,13 @@ impl FlexFlow {
// TODO(zentner): This function needs to be radically different for multi-line flexbox.
// Currently, this is the core of BlockFlow::propagate_assigned_inline_size_to_children() with
// all float and table logic stripped out.
- fn block_mode_assign_inline_sizes(&mut self,
- _layout_context: &LayoutContext,
- inline_start_content_edge: Au,
- inline_end_content_edge: Au,
- content_inline_size: Au) {
+ fn block_mode_assign_inline_sizes(
+ &mut self,
+ _layout_context: &LayoutContext,
+ inline_start_content_edge: Au,
+ inline_end_content_edge: Au,
+ content_inline_size: Au,
+ ) {
let _scope = layout_debug_scope!("flex::block_mode_assign_inline_sizes");
debug!("flex::block_mode_assign_inline_sizes");
@@ -496,19 +533,22 @@ impl FlexFlow {
let container_block_size = match self.available_main_size {
AxisSize::Definite(length) => Some(length),
- _ => None
+ _ => None,
};
let container_inline_size = match self.available_cross_size {
AxisSize::Definite(length) => length,
AxisSize::MinMax(ref constraint) => constraint.clamp(content_inline_size),
- AxisSize::Infinite => content_inline_size
+ AxisSize::Infinite => content_inline_size,
};
let mut children = self.block_flow.base.children.random_access_mut();
for kid in &mut self.items {
let kid_base = children.get(kid.index).mut_base();
kid_base.block_container_explicit_block_size = container_block_size;
- if kid_base.flags.contains(FlowFlags::INLINE_POSITION_IS_STATIC) {
+ if kid_base
+ .flags
+ .contains(FlowFlags::INLINE_POSITION_IS_STATIC)
+ {
// The inline-start margin edge of the child flow is at our inline-start content
// edge, and its inline-size is our content inline-size.
kid_base.position.start.i =
@@ -525,11 +565,13 @@ impl FlexFlow {
}
}
- fn inline_mode_assign_inline_sizes(&mut self,
- layout_context: &LayoutContext,
- inline_start_content_edge: Au,
- _inline_end_content_edge: Au,
- content_inline_size: Au) {
+ fn inline_mode_assign_inline_sizes(
+ &mut self,
+ layout_context: &LayoutContext,
+ inline_start_content_edge: Au,
+ _inline_end_content_edge: Au,
+ content_inline_size: Au,
+ ) {
let _scope = layout_debug_scope!("flex::inline_mode_assign_inline_sizes");
debug!("inline_mode_assign_inline_sizes");
@@ -551,17 +593,25 @@ impl FlexFlow {
self.block_flow.base.position.size.inline = inline_size;
// Calculate non-auto block size to pass to children.
- let box_border = self.block_flow.fragment.box_sizing_boundary(Direction::Block);
-
- let parent_container_size =
- self.block_flow.explicit_block_containing_size(layout_context.shared_context());
+ let box_border = self
+ .block_flow
+ .fragment
+ .box_sizing_boundary(Direction::Block);
+
+ let parent_container_size = self
+ .block_flow
+ .explicit_block_containing_size(layout_context.shared_context());
// https://drafts.csswg.org/css-ui-3/#box-sizing
let explicit_content_size = self
- .block_flow
- .explicit_block_size(parent_container_size)
- .map(|x| max(x - box_border, Au(0)));
- let containing_block_text_align =
- self.block_flow.fragment.style().get_inherited_text().text_align;
+ .block_flow
+ .explicit_block_size(parent_container_size)
+ .map(|x| max(x - box_border, Au(0)));
+ let containing_block_text_align = self
+ .block_flow
+ .fragment
+ .style()
+ .get_inherited_text()
+ .text_align;
while let Some(mut line) = self.get_flex_line(inline_size) {
let items = &mut self.items[line.range.clone()];
@@ -572,32 +622,42 @@ impl FlexFlow {
let item_count = items.len() as i32;
let mut cur_i = inline_start_content_edge;
let item_interval = if line.free_space >= Au(0) && line.auto_margin_count == 0 {
- match self.block_flow.fragment.style().get_position().justify_content {
+ match self
+ .block_flow
+ .fragment
+ .style()
+ .get_position()
+ .justify_content
+ {
JustifyContent::SpaceBetween => {
if item_count == 1 {
Au(0)
} else {
line.free_space / (item_count - 1)
}
- }
- JustifyContent::SpaceAround => {
- line.free_space / item_count
- }
+ },
+ JustifyContent::SpaceAround => line.free_space / item_count,
_ => Au(0),
}
} else {
Au(0)
};
- match self.block_flow.fragment.style().get_position().justify_content {
+ match self
+ .block_flow
+ .fragment
+ .style()
+ .get_position()
+ .justify_content
+ {
// Overflow equally in both ends of line.
JustifyContent::Center | JustifyContent::SpaceAround => {
cur_i += (line.free_space - item_interval * (item_count - 1)) / 2;
- }
+ },
JustifyContent::FlexEnd => {
cur_i += line.free_space;
- }
- _ => {}
+ },
+ _ => {},
}
let mut children = self.block_flow.base.children.random_access_mut();
@@ -613,19 +673,18 @@ impl FlexFlow {
block.base.flags.set_text_align(containing_block_text_align);
let margin = block.fragment.style().logical_margin();
- let auto_len =
- if line.auto_margin_count == 0 || line.free_space <= Au(0) {
- Au(0)
- } else {
- line.free_space / line.auto_margin_count
- };
+ let auto_len = if line.auto_margin_count == 0 || line.free_space <= Au(0) {
+ Au(0)
+ } else {
+ line.free_space / line.auto_margin_count
+ };
let margin_inline_start = MaybeAuto::from_style(margin.inline_start, inline_size)
.specified_or_default(auto_len);
let margin_inline_end = MaybeAuto::from_style(margin.inline_end, inline_size)
.specified_or_default(auto_len);
- let item_inline_size = item.main_size
- - block.fragment.box_sizing_boundary(self.main_mode)
- + block.fragment.border_padding.inline_start_end();
+ let item_inline_size = item.main_size -
+ block.fragment.box_sizing_boundary(self.main_mode) +
+ block.fragment.border_padding.inline_start_end();
let item_outer_size = item_inline_size + block.fragment.margin.inline_start_end();
block.fragment.margin.inline_start = margin_inline_start;
@@ -635,7 +694,7 @@ impl FlexFlow {
block.base.position.start.i = if !self.main_reverse {
cur_i
} else {
- inline_start_content_edge * 2 + content_inline_size - cur_i - item_outer_size
+ inline_start_content_edge * 2 + content_inline_size - cur_i - item_outer_size
};
block.base.position.size.inline = item_outer_size;
cur_i += item_outer_size + item_interval;
@@ -669,7 +728,12 @@ impl FlexFlow {
let _scope = layout_debug_scope!("flex::inline_mode_assign_block_size");
let line_count = self.lines.len() as i32;
- let line_align = self.block_flow.fragment.style().get_position().align_content;
+ let line_align = self
+ .block_flow
+ .fragment
+ .style()
+ .get_position()
+ .align_content;
let mut cur_b = self.block_flow.fragment.border_padding.block_start;
let mut total_cross_size = Au(0);
let mut line_interval = Au(0);
@@ -679,22 +743,27 @@ impl FlexFlow {
for line in self.lines.iter_mut() {
for item in &self.items[line.range.clone()] {
let fragment = &children.get(item.index).as_block().fragment;
- line.cross_size = max(line.cross_size,
- fragment.border_box.size.block +
- fragment.margin.block_start_end());
+ line.cross_size = max(
+ line.cross_size,
+ fragment.border_box.size.block + fragment.margin.block_start_end(),
+ );
}
total_cross_size += line.cross_size;
}
}
- let box_border = self.block_flow.fragment.box_sizing_boundary(Direction::Block);
- let parent_container_size =
- self.block_flow.explicit_block_containing_size(layout_context.shared_context());
+ let box_border = self
+ .block_flow
+ .fragment
+ .box_sizing_boundary(Direction::Block);
+ let parent_container_size = self
+ .block_flow
+ .explicit_block_containing_size(layout_context.shared_context());
// https://drafts.csswg.org/css-ui-3/#box-sizing
let explicit_content_size = self
- .block_flow
- .explicit_block_size(parent_container_size)
- .map(|x| max(x - box_border, Au(0)));
+ .block_flow
+ .explicit_block_size(parent_container_size)
+ .map(|x| max(x - box_border, Au(0)));
if let Some(container_block_size) = explicit_content_size {
let free_space = container_block_size - total_cross_size;
@@ -713,25 +782,25 @@ impl FlexFlow {
} else {
free_space / (line_count - 1)
}
- }
+ },
AlignContent::SpaceAround => {
if line_count == 0 {
Au(0)
} else {
free_space / line_count
}
- }
+ },
_ => Au(0),
};
match line_align {
AlignContent::Center | AlignContent::SpaceAround => {
cur_b += (free_space - line_interval * (line_count - 1)) / 2;
- }
+ },
AlignContent::FlexEnd => {
cur_b += free_space;
- }
- _ => {}
+ },
+ _ => {},
}
}
@@ -744,8 +813,9 @@ impl FlexFlow {
let mut margin_block_start = block.fragment.margin.block_start;
let mut margin_block_end = block.fragment.margin.block_end;
- let mut free_space = line.cross_size - block.base.position.size.block
- - block.fragment.margin.block_start_end();
+ let mut free_space = line.cross_size -
+ block.base.position.size.block -
+ block.fragment.margin.block_start_end();
// The spec is a little vague here, but if I understand it correctly, the outer
// cross size of item should equal to the line size if any auto margin exists.
@@ -758,29 +828,31 @@ impl FlexFlow {
free_space / auto_margin_count
};
}
- margin_block_end = line.cross_size - margin_block_start - block.base.position.size.block;
+ margin_block_end =
+ line.cross_size - margin_block_start - block.base.position.size.block;
free_space = Au(0);
}
let self_align = block.fragment.style().get_position().align_self;
if self_align == AlignSelf::Stretch &&
- block.fragment.style().content_block_size() == LengthOrPercentageOrAuto::Auto {
- free_space = Au(0);
- block.base.block_container_explicit_block_size = Some(line.cross_size);
- block.base.position.size.block =
- line.cross_size - margin_block_start - margin_block_end;
- block.fragment.border_box.size.block = block.base.position.size.block;
- // FIXME(stshine): item with 'align-self: stretch' and auto cross size should act
- // as if it has a fixed cross size, all child blocks should resolve against it.
- // block.assign_block_size(layout_context);
- }
- block.base.position.start.b = margin_block_start +
- if !self.cross_reverse {
- cur_b
- } else {
- self.block_flow.fragment.border_padding.block_start * 2
- + total_cross_size - cur_b - line.cross_size
- };
+ block.fragment.style().content_block_size() == LengthOrPercentageOrAuto::Auto
+ {
+ free_space = Au(0);
+ block.base.block_container_explicit_block_size = Some(line.cross_size);
+ block.base.position.size.block =
+ line.cross_size - margin_block_start - margin_block_end;
+ block.fragment.border_box.size.block = block.base.position.size.block;
+ // FIXME(stshine): item with 'align-self: stretch' and auto cross size should act
+ // as if it has a fixed cross size, all child blocks should resolve against it.
+ // block.assign_block_size(layout_context);
+ }
+ block.base.position.start.b = margin_block_start + if !self.cross_reverse {
+ cur_b
+ } else {
+ self.block_flow.fragment.border_padding.block_start * 2 + total_cross_size -
+ cur_b -
+ line.cross_size
+ };
// TODO(stshine): support baseline alignment.
if free_space != Au(0) {
let flex_cross = match self_align {
@@ -788,17 +860,17 @@ impl FlexFlow {
AlignSelf::Center => free_space / 2,
_ => Au(0),
};
- block.base.position.start.b +=
- if !self.cross_reverse {
- flex_cross
- } else {
- free_space - flex_cross
- };
+ block.base.position.start.b += if !self.cross_reverse {
+ flex_cross
+ } else {
+ free_space - flex_cross
+ };
}
}
cur_b += line_interval + line.cross_size;
}
- let total_block_size = total_cross_size + self.block_flow.fragment.border_padding.block_start_end();
+ let total_block_size =
+ total_cross_size + self.block_flow.fragment.border_padding.block_start_end();
self.block_flow.fragment.border_box.size.block = total_block_size;
self.block_flow.base.position.size.block = total_block_size;
}
@@ -830,72 +902,96 @@ impl Flow for FlexFlow {
}
fn bubble_inline_sizes(&mut self) {
- let _scope = layout_debug_scope!("flex::bubble_inline_sizes {:x}",
- self.block_flow.base.debug_id());
+ let _scope = layout_debug_scope!(
+ "flex::bubble_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
// Flexbox Section 9.0: Generate anonymous flex items:
// This part was handled in the flow constructor.
// Flexbox Section 9.1: Re-order flex items according to their order.
// FIXME(stshine): This should be done during flow construction.
- let mut items: Vec<FlexItem> =
- self.block_flow
- .base
- .children
- .iter()
- .enumerate()
- .filter(|&(_, flow)| {
- !flow.as_block().base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
- })
- .map(|(index, flow)| FlexItem::new(index, flow))
- .collect();
+ let mut items: Vec<FlexItem> = self
+ .block_flow
+ .base
+ .children
+ .iter()
+ .enumerate()
+ .filter(|&(_, flow)| {
+ !flow
+ .as_block()
+ .base
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ }).map(|(index, flow)| FlexItem::new(index, flow))
+ .collect();
items.sort_by_key(|item| item.order);
self.items = items;
match self.main_mode {
Direction::Inline => self.inline_mode_bubble_inline_sizes(),
- Direction::Block => self.block_mode_bubble_inline_sizes()
+ Direction::Block => self.block_mode_bubble_inline_sizes(),
}
}
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
- let _scope = layout_debug_scope!("flex::assign_inline_sizes {:x}", self.block_flow.base.debug_id());
+ let _scope = layout_debug_scope!(
+ "flex::assign_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
debug!("assign_inline_sizes");
- if !self.block_flow.base.restyle_damage.intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
- ServoRestyleDamage::REFLOW) {
- return
+ if !self
+ .block_flow
+ .base
+ .restyle_damage
+ .intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW)
+ {
+ return;
}
- self.block_flow.initialize_container_size_for_root(layout_context.shared_context());
+ self.block_flow
+ .initialize_container_size_for_root(layout_context.shared_context());
// Our inline-size was set to the inline-size of the containing block by the flow's parent.
// Now compute the real value.
let containing_block_inline_size = self.block_flow.base.block_container_inline_size;
- self.block_flow.compute_used_inline_size(layout_context.shared_context(),
- containing_block_inline_size);
+ self.block_flow.compute_used_inline_size(
+ layout_context.shared_context(),
+ containing_block_inline_size,
+ );
if self.block_flow.base.flags.is_float() {
- self.block_flow.float.as_mut().unwrap().containing_inline_size = containing_block_inline_size
+ self.block_flow
+ .float
+ .as_mut()
+ .unwrap()
+ .containing_inline_size = containing_block_inline_size
}
let (available_block_size, available_inline_size) = {
let style = &self.block_flow.fragment.style;
- let (specified_block_size, specified_inline_size) = if style.writing_mode.is_vertical() {
+ let (specified_block_size, specified_inline_size) = if style.writing_mode.is_vertical()
+ {
(style.get_position().width, style.get_position().height)
} else {
(style.get_position().height, style.get_position().width)
};
- let available_inline_size = AxisSize::new(specified_inline_size,
- Some(self.block_flow.base.block_container_inline_size),
- style.min_inline_size(),
- style.max_inline_size());
-
- let available_block_size = AxisSize::new(specified_block_size,
- self.block_flow.base.block_container_explicit_block_size,
- style.min_block_size(),
- style.max_block_size());
+ let available_inline_size = AxisSize::new(
+ specified_inline_size,
+ Some(self.block_flow.base.block_container_inline_size),
+ style.min_inline_size(),
+ style.max_inline_size(),
+ );
+
+ let available_block_size = AxisSize::new(
+ specified_block_size,
+ self.block_flow.base.block_container_explicit_block_size,
+ style.min_block_size(),
+ style.max_block_size(),
+ );
(available_block_size, available_inline_size)
};
@@ -903,37 +999,46 @@ impl Flow for FlexFlow {
let inline_start_content_edge = self.block_flow.fragment.border_box.start.i +
self.block_flow.fragment.border_padding.inline_start;
- debug!("inline_start_content_edge = {:?}", inline_start_content_edge);
+ debug!(
+ "inline_start_content_edge = {:?}",
+ inline_start_content_edge
+ );
let padding_and_borders = self.block_flow.fragment.border_padding.inline_start_end();
// Distance from the inline-end margin edge to the inline-end content edge.
- let inline_end_content_edge =
- self.block_flow.fragment.margin.inline_end +
+ let inline_end_content_edge = self.block_flow.fragment.margin.inline_end +
self.block_flow.fragment.border_padding.inline_end;
debug!("padding_and_borders = {:?}", padding_and_borders);
- debug!("self.block_flow.fragment.border_box.size.inline = {:?}",
- self.block_flow.fragment.border_box.size.inline);
- let content_inline_size = self.block_flow.fragment.border_box.size.inline - padding_and_borders;
+ debug!(
+ "self.block_flow.fragment.border_box.size.inline = {:?}",
+ self.block_flow.fragment.border_box.size.inline
+ );
+ let content_inline_size =
+ self.block_flow.fragment.border_box.size.inline - padding_and_borders;
match self.main_mode {
Direction::Inline => {
self.available_main_size = available_inline_size;
self.available_cross_size = available_block_size;
- self.inline_mode_assign_inline_sizes(layout_context,
- inline_start_content_edge,
- inline_end_content_edge,
- content_inline_size)
- }
- Direction::Block => {
+ self.inline_mode_assign_inline_sizes(
+ layout_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ content_inline_size,
+ )
+ },
+ Direction::Block => {
self.available_main_size = available_block_size;
self.available_cross_size = available_inline_size;
- self.block_mode_assign_inline_sizes(layout_context,
- inline_start_content_edge,
- inline_end_content_edge,
- content_inline_size)
- }
+ self.block_mode_assign_inline_sizes(
+ layout_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ content_inline_size,
+ )
+ },
}
}
@@ -941,31 +1046,37 @@ impl Flow for FlexFlow {
match self.main_mode {
Direction::Inline => {
self.inline_mode_assign_block_size(layout_context);
- let block_start = AdjoiningMargins::from_margin(self.block_flow.fragment.margin.block_start);
- let block_end = AdjoiningMargins::from_margin(self.block_flow.fragment.margin.block_end);
- self.block_flow.base.collapsible_margins = CollapsibleMargins::Collapse(block_start, block_end);
+ let block_start =
+ AdjoiningMargins::from_margin(self.block_flow.fragment.margin.block_start);
+ let block_end =
+ AdjoiningMargins::from_margin(self.block_flow.fragment.margin.block_end);
+ self.block_flow.base.collapsible_margins =
+ CollapsibleMargins::Collapse(block_start, block_end);
// TODO(stshine): assign proper static position for absolute descendants.
if (&*self as &Flow).contains_roots_of_absolute_flow_tree() {
// Assign block-sizes for all flows in this absolute flow tree.
// This is preorder because the block-size of an absolute flow may depend on
// the block-size of its containing block, which may also be an absolute flow.
- let assign_abs_b_sizes = AbsoluteAssignBSizesTraversal(layout_context.shared_context());
+ let assign_abs_b_sizes =
+ AbsoluteAssignBSizesTraversal(layout_context.shared_context());
assign_abs_b_sizes.traverse_absolute_flows(&mut *self);
}
- }
- Direction::Block =>{
- self.block_flow
- .assign_block_size_block_base(layout_context,
- None,
- MarginsMayCollapseFlag::MarginsMayNotCollapse);
+ },
+ Direction::Block => {
+ self.block_flow.assign_block_size_block_base(
+ layout_context,
+ None,
+ MarginsMayCollapseFlag::MarginsMayNotCollapse,
+ );
self.block_mode_assign_block_size();
- }
+ },
}
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context)
+ self.block_flow
+ .compute_stacking_relative_position(layout_context)
}
fn place_float_if_applicable<'a>(&mut self) {
@@ -973,11 +1084,13 @@ impl Flow for FlexFlow {
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
@@ -1008,11 +1121,17 @@ impl Flow for FlexFlow {
self.block_flow.generated_containing_block_size(flow)
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position);
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ );
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
diff --git a/components/layout/floats.rs b/components/layout/floats.rs
index 58fe1bc59b8..a0f44c22a04 100644
--- a/components/layout/floats.rs
+++ b/components/layout/floats.rs
@@ -16,7 +16,7 @@ use style::values::computed::LengthOrPercentageOrAuto;
#[derive(Clone, Copy, Debug, Serialize)]
pub enum FloatKind {
Left,
- Right
+ Right,
}
impl FloatKind {
@@ -78,7 +78,12 @@ impl FloatList {
impl fmt::Debug for FloatList {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "max_block_start={:?} floats={}", self.max_block_start, self.floats.len())?;
+ write!(
+ f,
+ "max_block_start={:?} floats={}",
+ self.max_block_start,
+ self.floats.len()
+ )?;
for float in self.floats.iter() {
write!(f, " {:?}", float)?;
}
@@ -95,22 +100,29 @@ pub struct PlacementInfo {
/// The maximum inline-end position of the float, generally determined by the containing block.
pub max_inline_size: Au,
/// The kind of float.
- pub kind: FloatKind
+ pub kind: FloatKind,
}
impl fmt::Debug for PlacementInfo {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f,
- "size={:?} ceiling={:?} max_inline_size={:?} kind={:?}",
- self.size,
- self.ceiling,
- self.max_inline_size,
- self.kind)
+ write!(
+ f,
+ "size={:?} ceiling={:?} max_inline_size={:?} kind={:?}",
+ self.size, self.ceiling, self.max_inline_size, self.kind
+ )
}
}
-fn range_intersect(block_start_1: Au, block_end_1: Au, block_start_2: Au, block_end_2: Au) -> (Au, Au) {
- (max(block_start_1, block_start_2), min(block_end_1, block_end_2))
+fn range_intersect(
+ block_start_1: Au,
+ block_end_1: Au,
+ block_start_2: Au,
+ block_end_2: Au,
+) -> (Au, Au) {
+ (
+ max(block_start_1, block_start_2),
+ min(block_end_1, block_end_2),
+ )
}
/// Encapsulates information about floats. This is optimized to avoid allocation if there are
@@ -162,8 +174,12 @@ impl Floats {
/// with inline-size small enough that it doesn't collide with any floats. max_x is the
/// inline-size beyond which floats have no effect. (Generally this is the containing block
/// inline-size.)
- pub fn available_rect(&self, block_start: Au, block_size: Au, max_x: Au)
- -> Option<LogicalRect<Au>> {
+ pub fn available_rect(
+ &self,
+ block_start: Au,
+ block_size: Au,
+ max_x: Au,
+ ) -> Option<LogicalRect<Au>> {
let list = &self.list;
let block_start = block_start - self.offset.block;
@@ -186,30 +202,38 @@ impl Floats {
debug!("float_pos: {:?}, float_size: {:?}", float_pos, float_size);
match float.kind {
- FloatKind::Left if float_pos.i + float_size.inline > max_inline_start &&
+ FloatKind::Left
+ if float_pos.i + float_size.inline > max_inline_start &&
float_pos.b + float_size.block > block_start &&
- float_pos.b < block_start + block_size => {
+ float_pos.b < block_start + block_size =>
+ {
max_inline_start = float_pos.i + float_size.inline;
l_block_start = Some(float_pos.b);
l_block_end = Some(float_pos.b + float_size.block);
- debug!("available_rect: collision with inline_start float: new \
- max_inline_start is {:?}",
- max_inline_start);
+ debug!(
+ "available_rect: collision with inline_start float: new \
+ max_inline_start is {:?}",
+ max_inline_start
+ );
}
- FloatKind::Right if float_pos.i < min_inline_end &&
- float_pos.b + float_size.block > block_start &&
- float_pos.b < block_start + block_size => {
+ FloatKind::Right
+ if float_pos.i < min_inline_end &&
+ float_pos.b + float_size.block > block_start &&
+ float_pos.b < block_start + block_size =>
+ {
min_inline_end = float_pos.i;
r_block_start = Some(float_pos.b);
r_block_end = Some(float_pos.b + float_size.block);
- debug!("available_rect: collision with inline_end float: new min_inline_end \
- is {:?}",
- min_inline_end);
+ debug!(
+ "available_rect: collision with inline_end float: new min_inline_end \
+ is {:?}",
+ min_inline_end
+ );
}
- FloatKind::Left | FloatKind::Right => {}
+ FloatKind::Left | FloatKind::Right => {},
}
}
@@ -217,25 +241,28 @@ impl Floats {
// If there are floats on both sides, take the intersection of the
// two areas. Also make sure we never return a block-start smaller than the
// given upper bound.
- let (block_start, block_end) = match (r_block_start,
- r_block_end,
- l_block_start,
- l_block_end) {
- (Some(r_block_start), Some(r_block_end), Some(l_block_start), Some(l_block_end)) => {
- range_intersect(max(block_start, r_block_start),
- r_block_end,
- max(block_start, l_block_start),
- l_block_end)
- }
- (None, None, Some(l_block_start), Some(l_block_end)) => {
- (max(block_start, l_block_start), l_block_end)
- }
- (Some(r_block_start), Some(r_block_end), None, None) => {
- (max(block_start, r_block_start), r_block_end)
- }
- (None, None, None, None) => return None,
- _ => panic!("Reached unreachable state when computing float area")
- };
+ let (block_start, block_end) =
+ match (r_block_start, r_block_end, l_block_start, l_block_end) {
+ (
+ Some(r_block_start),
+ Some(r_block_end),
+ Some(l_block_start),
+ Some(l_block_end),
+ ) => range_intersect(
+ max(block_start, r_block_start),
+ r_block_end,
+ max(block_start, l_block_start),
+ l_block_end,
+ ),
+ (None, None, Some(l_block_start), Some(l_block_end)) => {
+ (max(block_start, l_block_start), l_block_end)
+ },
+ (Some(r_block_start), Some(r_block_end), None, None) => {
+ (max(block_start, r_block_start), r_block_end)
+ },
+ (None, None, None, None) => return None,
+ _ => panic!("Reached unreachable state when computing float area"),
+ };
// FIXME(eatkinson): This assertion is too strong and fails in some cases. It is OK to
// return negative inline-sizes since we check against that inline-end away, but we should
@@ -244,11 +271,13 @@ impl Floats {
assert!(block_start <= block_end, "Float position error");
- Some(LogicalRect::new(self.writing_mode,
- max_inline_start + self.offset.inline,
- block_start + self.offset.block,
- min_inline_end - max_inline_start,
- block_end - block_start))
+ Some(LogicalRect::new(
+ self.writing_mode,
+ max_inline_start + self.offset.inline,
+ block_start + self.offset.block,
+ min_inline_end - max_inline_start,
+ block_end - block_start,
+ ))
}
/// Adds a new float to the list.
@@ -260,7 +289,7 @@ impl Floats {
Some(max_block_start) => max(info.ceiling, max_block_start + self.offset.block),
},
max_inline_size: info.max_inline_size,
- kind: info.kind
+ kind: info.kind,
};
debug!("add_float: added float with info {:?}", new_info);
@@ -271,7 +300,7 @@ impl Floats {
self.place_between_floats(&new_info).start - self.offset,
info.size,
),
- kind: info.kind
+ kind: info.kind,
};
self.list.floats = self.list.floats.prepend_elem(new_float);
@@ -284,8 +313,12 @@ impl Floats {
/// Given the three sides of the bounding rectangle in the block-start direction, finds the
/// largest block-size that will result in the rectangle not colliding with any floats. Returns
/// `None` if that block-size is infinite.
- fn max_block_size_for_bounds(&self, inline_start: Au, block_start: Au, inline_size: Au)
- -> Option<Au> {
+ fn max_block_size_for_bounds(
+ &self,
+ inline_start: Au,
+ block_start: Au,
+ inline_size: Au,
+ ) -> Option<Au> {
let list = &self.list;
let block_start = block_start - self.offset.block;
@@ -294,10 +327,11 @@ impl Floats {
for float in list.floats.iter() {
if float.bounds.start.b + float.bounds.size.block > block_start &&
- float.bounds.start.i + float.bounds.size.inline > inline_start &&
- float.bounds.start.i < inline_start + inline_size {
- let new_y = float.bounds.start.b;
- max_block_size = Some(min(max_block_size.unwrap_or(new_y), new_y));
+ float.bounds.start.i + float.bounds.size.inline > inline_start &&
+ float.bounds.start.i < inline_start + inline_size
+ {
+ let new_y = float.bounds.start.b;
+ max_block_size = Some(min(max_block_size.unwrap_or(new_y), new_y));
}
}
@@ -318,85 +352,88 @@ impl Floats {
Au(0),
info.ceiling,
info.max_inline_size,
- MAX_AU)
- }
+ MAX_AU,
+ )
+ },
FloatKind::Right => {
return LogicalRect::new(
self.writing_mode,
info.max_inline_size - info.size.inline,
info.ceiling,
info.max_inline_size,
- MAX_AU)
- }
+ MAX_AU,
+ )
+ },
}
}
// Can't go any higher than previous floats or previous elements in the document.
let mut float_b = info.ceiling;
loop {
- let maybe_location = self.available_rect(float_b,
- info.size.block,
- info.max_inline_size);
- debug!("place_float: got available rect: {:?} for block-pos: {:?}",
- maybe_location,
- float_b);
+ let maybe_location =
+ self.available_rect(float_b, info.size.block, info.max_inline_size);
+ debug!(
+ "place_float: got available rect: {:?} for block-pos: {:?}",
+ maybe_location, float_b
+ );
match maybe_location {
// If there are no floats blocking us, return the current location
// TODO(eatkinson): integrate with overflow
None => {
return match info.kind {
- FloatKind::Left => {
- LogicalRect::new(
- self.writing_mode,
- Au(0),
- float_b,
- info.max_inline_size,
- MAX_AU)
- }
- FloatKind::Right => {
- LogicalRect::new(
- self.writing_mode,
- info.max_inline_size - info.size.inline,
- float_b,
- info.max_inline_size,
- MAX_AU)
- }
+ FloatKind::Left => LogicalRect::new(
+ self.writing_mode,
+ Au(0),
+ float_b,
+ info.max_inline_size,
+ MAX_AU,
+ ),
+ FloatKind::Right => LogicalRect::new(
+ self.writing_mode,
+ info.max_inline_size - info.size.inline,
+ float_b,
+ info.max_inline_size,
+ MAX_AU,
+ ),
}
- }
+ },
Some(rect) => {
- assert_ne!(rect.start.b + rect.size.block, float_b,
- "Non-terminating float placement");
+ assert_ne!(
+ rect.start.b + rect.size.block,
+ float_b,
+ "Non-terminating float placement"
+ );
// Place here if there is enough room
if rect.size.inline >= info.size.inline {
- let block_size = self.max_block_size_for_bounds(rect.start.i,
- rect.start.b,
- rect.size.inline);
+ let block_size = self.max_block_size_for_bounds(
+ rect.start.i,
+ rect.start.b,
+ rect.size.inline,
+ );
let block_size = block_size.unwrap_or(MAX_AU);
return match info.kind {
- FloatKind::Left => {
- LogicalRect::new(
- self.writing_mode,
- rect.start.i,
- float_b,
- rect.size.inline,
- block_size)
- }
- FloatKind::Right => {
- LogicalRect::new(
- self.writing_mode,
- rect.start.i + rect.size.inline - info.size.inline,
- float_b,
- rect.size.inline,
- block_size)
- }
- }
+ FloatKind::Left => LogicalRect::new(
+ self.writing_mode,
+ rect.start.i,
+ float_b,
+ rect.size.inline,
+ block_size,
+ ),
+ FloatKind::Right => LogicalRect::new(
+ self.writing_mode,
+ rect.start.i + rect.size.inline - info.size.inline,
+ float_b,
+ rect.size.inline,
+ block_size,
+ ),
+ };
}
// Try to place at the next-lowest location.
// Need to be careful of fencepost errors.
float_b = rect.start.b + rect.size.block;
- }
+ },
}
}
}
@@ -411,8 +448,8 @@ impl Floats {
(ClearType::Both, _) => {
let b = self.offset.block + float.bounds.start.b + float.bounds.size.block;
clearance = max(clearance, b);
- }
- _ => {}
+ },
+ _ => {},
}
}
clearance
@@ -486,14 +523,20 @@ impl SpeculatedFloatPlacement {
}
}
- self.left = max(self.left, block_flow.base.speculated_float_placement_in.left);
- self.right = max(self.right, block_flow.base.speculated_float_placement_in.right);
+ self.left = max(
+ self.left,
+ block_flow.base.speculated_float_placement_in.left,
+ );
+ self.right = max(
+ self.right,
+ block_flow.base.speculated_float_placement_in.right,
+ );
}
}
let base_flow = flow.base();
if !base_flow.flags.is_float() {
- return
+ return;
}
let mut float_inline_size = base_flow.intrinsic_inline_sizes.preferred_inline_size;
@@ -504,7 +547,8 @@ impl SpeculatedFloatPlacement {
// that the layout traversal logic will know that objects later in the document
// might flow around this float.
if let LengthOrPercentageOrAuto::Percentage(percentage) =
- flow.as_block().fragment.style.content_inline_size() {
+ flow.as_block().fragment.style.content_inline_size()
+ {
if percentage.0 > 0.0 {
float_inline_size = Au::from_px(1)
}
@@ -513,7 +557,7 @@ impl SpeculatedFloatPlacement {
}
match base_flow.flags.float_kind() {
- StyleFloat::None => {}
+ StyleFloat::None => {},
StyleFloat::Left => self.left = self.left + float_inline_size,
StyleFloat::Right => self.right = self.right + float_inline_size,
}
@@ -522,17 +566,18 @@ impl SpeculatedFloatPlacement {
/// Given a flow, computes the speculated inline size of the floats in of its first child.
pub fn compute_floats_in_for_first_child(parent_flow: &mut Flow) -> SpeculatedFloatPlacement {
if !parent_flow.is_block_like() {
- return parent_flow.base().speculated_float_placement_in
+ return parent_flow.base().speculated_float_placement_in;
}
let parent_block_flow = parent_flow.as_block();
if parent_block_flow.formatting_context_type() != FormattingContextType::None {
- return SpeculatedFloatPlacement::zero()
+ return SpeculatedFloatPlacement::zero();
}
let mut placement = parent_block_flow.base.speculated_float_placement_in;
- let speculated_inline_content_edge_offsets =
- parent_block_flow.fragment.guess_inline_content_edge_offsets();
+ let speculated_inline_content_edge_offsets = parent_block_flow
+ .fragment
+ .guess_inline_content_edge_offsets();
if speculated_inline_content_edge_offsets.start > Au(0) {
placement.left = if placement.left > speculated_inline_content_edge_offsets.start {
@@ -552,4 +597,3 @@ impl SpeculatedFloatPlacement {
placement
}
}
-
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index 76ecf9db096..1b0781c527e 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -251,11 +251,15 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
/// and return a new flow similar to `self` with the rest of the content.
///
/// The default is to make a flow "atomic": it can not be fragmented.
- fn fragment(&mut self,
- layout_context: &LayoutContext,
- _fragmentation_context: Option<FragmentationContext>)
- -> Option<Arc<Flow>> {
- fn recursive_assign_block_size<F: ?Sized + Flow + GetBaseFlow>(flow: &mut F, ctx: &LayoutContext) {
+ fn fragment(
+ &mut self,
+ layout_context: &LayoutContext,
+ _fragmentation_context: Option<FragmentationContext>,
+ ) -> Option<Arc<Flow>> {
+ fn recursive_assign_block_size<F: ?Sized + Flow + GetBaseFlow>(
+ flow: &mut F,
+ ctx: &LayoutContext,
+ ) {
for child in flow.mut_base().child_iter_mut() {
recursive_assign_block_size(child, ctx)
}
@@ -277,17 +281,20 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
/// `parent_thread_id` is the thread ID of the parent. This is used for the layout tinting
/// debug mode; if the block size of this flow was determined by its parent, we should treat
/// it as laid out by its parent.
- fn assign_block_size_for_inorder_child_if_necessary(&mut self,
- layout_context: &LayoutContext,
- parent_thread_id: u8,
- _content_box: LogicalRect<Au>)
- -> bool {
- let might_have_floats_in_or_out = self.base().might_have_floats_in() ||
- self.base().might_have_floats_out();
+ fn assign_block_size_for_inorder_child_if_necessary(
+ &mut self,
+ layout_context: &LayoutContext,
+ parent_thread_id: u8,
+ _content_box: LogicalRect<Au>,
+ ) -> bool {
+ let might_have_floats_in_or_out =
+ self.base().might_have_floats_in() || self.base().might_have_floats_out();
if might_have_floats_in_or_out {
self.mut_base().thread_id = parent_thread_id;
self.assign_block_size(layout_context);
- self.mut_base().restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.mut_base()
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
}
might_have_floats_in_or_out
}
@@ -295,23 +302,32 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
fn get_overflow_in_parent_coordinates(&self) -> Overflow {
// FIXME(#2795): Get the real container size.
let container_size = Size2D::zero();
- let position = self.base().position.to_physical(self.base().writing_mode, container_size);
+ let position = self
+ .base()
+ .position
+ .to_physical(self.base().writing_mode, container_size);
let mut overflow = self.base().overflow;
match self.class() {
- FlowClass::Block | FlowClass::TableCaption | FlowClass::TableCell => {}
+ FlowClass::Block | FlowClass::TableCaption | FlowClass::TableCell => {},
_ => {
overflow.translate(&position.origin.to_vector());
return overflow;
- }
+ },
}
let border_box = self.as_block().fragment.stacking_relative_border_box(
&self.base().stacking_relative_position,
- &self.base().early_absolute_position_info.relative_containing_block_size,
- self.base().early_absolute_position_info.relative_containing_block_mode,
- CoordinateSystem::Own);
+ &self
+ .base()
+ .early_absolute_position_info
+ .relative_containing_block_size,
+ self.base()
+ .early_absolute_position_info
+ .relative_containing_block_mode,
+ CoordinateSystem::Own,
+ );
if StyleOverflow::Visible != self.as_block().fragment.style.get_box().overflow_x {
overflow.paint.origin.x = Au(0);
overflow.paint.size.width = border_box.size.width;
@@ -325,24 +341,35 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
overflow.scroll.size.height = border_box.size.height;
}
- if !self.as_block().fragment.establishes_stacking_context() ||
- self.as_block().fragment.style.get_box().transform.0.is_empty() {
+ if !self.as_block().fragment.establishes_stacking_context() || self
+ .as_block()
+ .fragment
+ .style
+ .get_box()
+ .transform
+ .0
+ .is_empty()
+ {
overflow.translate(&position.origin.to_vector());
return overflow;
}
// TODO: Take into account 3d transforms, even though it's a fairly
// uncommon case.
- let transform_2d = self.as_block()
- .fragment
- .transform_matrix(&position)
- .unwrap_or(LayoutTransform::identity())
- .to_2d().to_untyped();
+ let transform_2d = self
+ .as_block()
+ .fragment
+ .transform_matrix(&position)
+ .unwrap_or(LayoutTransform::identity())
+ .to_2d()
+ .to_untyped();
let transformed_overflow = Overflow {
- paint: f32_rect_to_au_rect(transform_2d.transform_rect(
- &au_rect_to_f32_rect(overflow.paint))),
- scroll: f32_rect_to_au_rect(transform_2d.transform_rect(
- &au_rect_to_f32_rect(overflow.scroll))),
+ paint: f32_rect_to_au_rect(
+ transform_2d.transform_rect(&au_rect_to_f32_rect(overflow.paint)),
+ ),
+ scroll: f32_rect_to_au_rect(
+ transform_2d.transform_rect(&au_rect_to_f32_rect(overflow.scroll)),
+ ),
};
// TODO: We are taking the union of the overflow and transformed overflow here, which
@@ -369,14 +396,12 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
// Calculate overflow on a per-fragment basis.
let mut overflow = self.compute_overflow();
match self.class() {
- FlowClass::Block |
- FlowClass::TableCaption |
- FlowClass::TableCell => {
+ FlowClass::Block | FlowClass::TableCaption | FlowClass::TableCell => {
for kid in self.mut_base().children.iter_mut() {
overflow.union(&kid.get_overflow_in_parent_coordinates());
}
- }
- _ => {}
+ },
+ _ => {},
}
self.mut_base().overflow = overflow
}
@@ -396,17 +421,21 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
/// Iterates through border boxes of all of this flow's fragments.
/// Level provides a zero based index indicating the current
/// depth of the flow tree during fragment iteration.
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>);
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ );
/// Mutably iterates through fragments in this flow.
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment));
- fn compute_collapsible_block_start_margin(&mut self,
- _layout_context: &mut LayoutContext,
- _margin_collapse_info: &mut MarginCollapseInfo) {
+ fn compute_collapsible_block_start_margin(
+ &mut self,
+ _layout_context: &mut LayoutContext,
+ _margin_collapse_info: &mut MarginCollapseInfo,
+ ) {
// The default implementation is a no-op.
}
@@ -436,8 +465,10 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
}
fn contains_positioned_fragments(&self) -> bool {
- self.contains_relatively_positioned_fragments() ||
- self.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ self.contains_relatively_positioned_fragments() || self
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
}
fn contains_relatively_positioned_fragments(&self) -> bool {
@@ -476,7 +507,7 @@ pub trait Flow: HasBaseFlow + fmt::Debug + Sync + Send + 'static {
/// Print any extra children (such as fragments) contained in this Flow
/// for debugging purposes. Any items inserted into the tree will become
/// children of this flow.
- fn print_extra_flow_children(&self, _: &mut PrintTree) { }
+ fn print_extra_flow_children(&self, _: &mut PrintTree) {}
fn clipping_and_scrolling(&self) -> ClippingAndScrolling {
match self.base().clipping_and_scrolling {
@@ -566,8 +597,10 @@ pub trait MutableOwnedFlowUtils {
/// </span>
/// </div>
/// ```
- fn take_applicable_absolute_descendants(&mut self,
- absolute_descendants: &mut AbsoluteDescendants);
+ fn take_applicable_absolute_descendants(
+ &mut self,
+ absolute_descendants: &mut AbsoluteDescendants,
+ );
}
#[derive(Clone, Copy, Debug, PartialEq, Serialize)]
@@ -590,9 +623,15 @@ pub enum FlowClass {
impl FlowClass {
fn is_block_like(self) -> bool {
match self {
- FlowClass::Block | FlowClass::ListItem | FlowClass::Table | FlowClass::TableRowGroup |
- FlowClass::TableRow | FlowClass::TableCaption | FlowClass::TableCell |
- FlowClass::TableWrapper | FlowClass::Flex => true,
+ FlowClass::Block |
+ FlowClass::ListItem |
+ FlowClass::Table |
+ FlowClass::TableRowGroup |
+ FlowClass::TableRow |
+ FlowClass::TableCaption |
+ FlowClass::TableCell |
+ FlowClass::TableWrapper |
+ FlowClass::Flex => true,
_ => false,
}
}
@@ -663,7 +702,7 @@ impl FlowFlags {
#[inline]
pub fn set_text_align(&mut self, value: TextAlign) {
*self = (*self & !FlowFlags::TEXT_ALIGN) |
- FlowFlags::from_bits((value as u32) << TEXT_ALIGN_SHIFT).unwrap();
+ FlowFlags::from_bits((value as u32) << TEXT_ALIGN_SHIFT).unwrap();
}
#[inline]
@@ -776,7 +815,9 @@ pub struct AbsoluteDescendantIter<'a> {
impl<'a> Iterator for AbsoluteDescendantIter<'a> {
type Item = &'a mut Flow;
fn next(&mut self) -> Option<&'a mut Flow> {
- self.iter.next().map(|info| FlowRef::deref_mut(&mut info.flow))
+ self.iter
+ .next()
+ .map(|info| FlowRef::deref_mut(&mut info.flow))
}
fn size_hint(&self) -> (usize, Option<usize>) {
@@ -953,22 +994,32 @@ impl fmt::Debug for BaseFlow {
"".to_owned()
};
- write!(f,
- "\nsc={:?}\
- \npos={:?}{}{}\
- \nfloatspec-in={:?}\
- \nfloatspec-out={:?}\
- \noverflow={:?}{}{}{}",
- self.stacking_context_id,
- self.position,
- if self.flags.contains(FlowFlags::FLOATS_LEFT) { "FL" } else { "" },
- if self.flags.contains(FlowFlags::FLOATS_RIGHT) { "FR" } else { "" },
- self.speculated_float_placement_in,
- self.speculated_float_placement_out,
- self.overflow,
- child_count_string,
- absolute_descendants_string,
- damage_string)
+ write!(
+ f,
+ "\nsc={:?}\
+ \npos={:?}{}{}\
+ \nfloatspec-in={:?}\
+ \nfloatspec-out={:?}\
+ \noverflow={:?}{}{}{}",
+ self.stacking_context_id,
+ self.position,
+ if self.flags.contains(FlowFlags::FLOATS_LEFT) {
+ "FL"
+ } else {
+ ""
+ },
+ if self.flags.contains(FlowFlags::FLOATS_RIGHT) {
+ "FR"
+ } else {
+ ""
+ },
+ self.speculated_float_placement_in,
+ self.speculated_float_placement_out,
+ self.overflow,
+ child_count_string,
+ absolute_descendants_string,
+ damage_string
+ )
}
}
@@ -976,7 +1027,10 @@ impl Serialize for BaseFlow {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut serializer = serializer.serialize_struct("base", 5)?;
serializer.serialize_field("id", &self.debug_id())?;
- serializer.serialize_field("stacking_relative_position", &self.stacking_relative_position)?;
+ serializer.serialize_field(
+ "stacking_relative_position",
+ &self.stacking_relative_position,
+ )?;
serializer.serialize_field("intrinsic_inline_sizes", &self.intrinsic_inline_sizes)?;
serializer.serialize_field("position", &self.position)?;
serializer.serialize_field("children", &self.children)?;
@@ -996,10 +1050,11 @@ pub enum ForceNonfloatedFlag {
impl BaseFlow {
#[inline]
- pub fn new(style: Option<&ComputedValues>,
- writing_mode: WritingMode,
- force_nonfloated: ForceNonfloatedFlag)
- -> BaseFlow {
+ pub fn new(
+ style: Option<&ComputedValues>,
+ writing_mode: WritingMode,
+ force_nonfloated: ForceNonfloatedFlag,
+ ) -> BaseFlow {
let mut flags = FlowFlags::empty();
match style {
Some(style) => {
@@ -1013,41 +1068,47 @@ impl BaseFlow {
let logical_position = style.logical_position();
if logical_position.inline_start == LengthOrPercentageOrAuto::Auto &&
- logical_position.inline_end == LengthOrPercentageOrAuto::Auto {
+ logical_position.inline_end == LengthOrPercentageOrAuto::Auto
+ {
flags.insert(FlowFlags::INLINE_POSITION_IS_STATIC);
}
if logical_position.block_start == LengthOrPercentageOrAuto::Auto &&
- logical_position.block_end == LengthOrPercentageOrAuto::Auto {
+ logical_position.block_end == LengthOrPercentageOrAuto::Auto
+ {
flags.insert(FlowFlags::BLOCK_POSITION_IS_STATIC);
}
- }
- _ => flags.insert(FlowFlags::BLOCK_POSITION_IS_STATIC | FlowFlags::INLINE_POSITION_IS_STATIC),
+ },
+ _ => flags.insert(
+ FlowFlags::BLOCK_POSITION_IS_STATIC | FlowFlags::INLINE_POSITION_IS_STATIC,
+ ),
}
if force_nonfloated == ForceNonfloatedFlag::FloatIfNecessary {
match style.get_box().float {
- Float::None => {}
+ Float::None => {},
Float::Left => flags.insert(FlowFlags::FLOATS_LEFT),
Float::Right => flags.insert(FlowFlags::FLOATS_RIGHT),
}
}
match style.get_box().clear {
- Clear::None => {}
+ Clear::None => {},
Clear::Left => flags.insert(FlowFlags::CLEARS_LEFT),
Clear::Right => flags.insert(FlowFlags::CLEARS_RIGHT),
Clear::Both => {
flags.insert(FlowFlags::CLEARS_LEFT);
flags.insert(FlowFlags::CLEARS_RIGHT);
- }
+ },
}
if !style.get_counters().counter_reset.is_empty() ||
- !style.get_counters().counter_increment.is_empty() {
+ !style.get_counters().counter_increment.is_empty()
+ {
flags.insert(FlowFlags::AFFECTS_COUNTERS)
}
- }
- None => flags.insert(FlowFlags::BLOCK_POSITION_IS_STATIC | FlowFlags::INLINE_POSITION_IS_STATIC),
+ },
+ None => flags
+ .insert(FlowFlags::BLOCK_POSITION_IS_STATIC | FlowFlags::INLINE_POSITION_IS_STATIC),
}
// New flows start out as fully damaged.
@@ -1089,17 +1150,24 @@ impl BaseFlow {
pub fn update_flags_if_needed(&mut self, style: &ComputedValues) {
// For absolutely-positioned flows, changes to top/bottom/left/right can cause these flags
// to get out of date:
- if self.restyle_damage.contains(ServoRestyleDamage::REFLOW_OUT_OF_FLOW) {
+ if self
+ .restyle_damage
+ .contains(ServoRestyleDamage::REFLOW_OUT_OF_FLOW)
+ {
// Note: We don't need to check whether IS_ABSOLUTELY_POSITIONED has changed, because
// changes to the 'position' property trigger flow reconstruction.
if self.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
let logical_position = style.logical_position();
- self.flags.set(FlowFlags::INLINE_POSITION_IS_STATIC,
+ self.flags.set(
+ FlowFlags::INLINE_POSITION_IS_STATIC,
logical_position.inline_start == LengthOrPercentageOrAuto::Auto &&
- logical_position.inline_end == LengthOrPercentageOrAuto::Auto);
- self.flags.set(FlowFlags::BLOCK_POSITION_IS_STATIC,
+ logical_position.inline_end == LengthOrPercentageOrAuto::Auto,
+ );
+ self.flags.set(
+ FlowFlags::BLOCK_POSITION_IS_STATIC,
logical_position.block_start == LengthOrPercentageOrAuto::Auto &&
- logical_position.block_end == LengthOrPercentageOrAuto::Auto);
+ logical_position.block_end == LengthOrPercentageOrAuto::Auto,
+ );
}
}
}
@@ -1108,8 +1176,10 @@ impl BaseFlow {
pub fn clone_with_children(&self, children: FlowList) -> BaseFlow {
BaseFlow {
children: children,
- restyle_damage: self.restyle_damage | ServoRestyleDamage::REPAINT |
- ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW,
+ restyle_damage: self.restyle_damage |
+ ServoRestyleDamage::REPAINT |
+ ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
+ ServoRestyleDamage::REFLOW,
parallel: FlowParallelInfo::new(),
floats: self.floats.clone(),
abs_descendants: self.abs_descendants.clone(),
@@ -1138,8 +1208,10 @@ impl BaseFlow {
return self as *const BaseFlow as usize;
}
- pub fn collect_stacking_contexts_for_children(&mut self,
- state: &mut StackingContextCollectionState) {
+ pub fn collect_stacking_contexts_for_children(
+ &mut self,
+ state: &mut StackingContextCollectionState,
+ ) {
for kid in self.children.iter_mut() {
kid.collect_stacking_contexts(state);
}
@@ -1157,15 +1229,17 @@ impl BaseFlow {
self.speculated_float_placement_out.right > Au(0)
}
-
/// Compute the fragment position relative to the parent stacking context. If the fragment
/// itself establishes a stacking context, then the origin of its position will be (0, 0)
/// for the purposes of this computation.
pub fn stacking_relative_border_box_for_display_list(&self, fragment: &Fragment) -> Rect<Au> {
fragment.stacking_relative_border_box(
&self.stacking_relative_position,
- &self.early_absolute_position_info.relative_containing_block_size,
- self.early_absolute_position_info.relative_containing_block_mode,
+ &self
+ .early_absolute_position_info
+ .relative_containing_block_size,
+ self.early_absolute_position_info
+ .relative_containing_block_mode,
CoordinateSystem::Own,
)
}
@@ -1182,8 +1256,10 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
/// table-column-group flow, or table-caption flow.
fn is_proper_table_child(self) -> bool {
match self.class() {
- FlowClass::TableRow | FlowClass::TableRowGroup |
- FlowClass::TableColGroup | FlowClass::TableCaption => true,
+ FlowClass::TableRow |
+ FlowClass::TableRowGroup |
+ FlowClass::TableColGroup |
+ FlowClass::TableCaption => true,
_ => false,
}
}
@@ -1239,9 +1315,13 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
/// Returns true if this flow is one of table-related flows.
fn is_table_kind(self) -> bool {
match self.class() {
- FlowClass::TableWrapper | FlowClass::Table |
- FlowClass::TableColGroup | FlowClass::TableRowGroup |
- FlowClass::TableRow | FlowClass::TableCaption | FlowClass::TableCell => true,
+ FlowClass::TableWrapper |
+ FlowClass::Table |
+ FlowClass::TableColGroup |
+ FlowClass::TableRowGroup |
+ FlowClass::TableRow |
+ FlowClass::TableCaption |
+ FlowClass::TableCell => true,
_ => false,
}
}
@@ -1268,7 +1348,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
FlowClass::Block | FlowClass::TableCaption | FlowClass::TableCell => {
// FIXME: Actually check the type of the node
self.child_count() != 0
- }
+ },
_ => false,
}
}
@@ -1307,13 +1387,13 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
fn floats_might_flow_through(self) -> bool {
if !self.base().might_have_floats_in() && !self.base().might_have_floats_out() {
- return false
+ return false;
}
if self.is_root() {
- return false
+ return false;
}
if !self.is_block_like() {
- return true
+ return true;
}
self.as_block().formatting_context_type() == FormattingContextType::None
}
@@ -1322,12 +1402,16 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
for kid in self.base().children.iter().rev() {
if kid.is_inline_flow() {
if let Some(baseline_offset) = kid.as_inline().baseline_offset_of_last_line() {
- return Some(kid.base().position.start.b + baseline_offset)
+ return Some(kid.base().position.start.b + baseline_offset);
}
}
- if kid.is_block_like() && !kid.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if kid.is_block_like() && !kid
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
if let Some(baseline_offset) = kid.baseline_offset_of_last_line_box_in_flow() {
- return Some(kid.base().position.start.b + baseline_offset)
+ return Some(kid.base().position.start.b + baseline_offset);
}
}
}
@@ -1374,17 +1458,19 @@ impl MutableOwnedFlowUtils for FlowRef {
/// </span>
/// </div>
/// ```
- fn take_applicable_absolute_descendants(&mut self,
- absolute_descendants: &mut AbsoluteDescendants) {
+ fn take_applicable_absolute_descendants(
+ &mut self,
+ absolute_descendants: &mut AbsoluteDescendants,
+ ) {
let mut applicable_absolute_descendants = AbsoluteDescendants::new();
for absolute_descendant in absolute_descendants.descendant_links.iter() {
if absolute_descendant.has_reached_containing_block {
applicable_absolute_descendants.push(absolute_descendant.flow.clone());
}
}
- absolute_descendants.descendant_links.retain(|descendant| {
- !descendant.has_reached_containing_block
- });
+ absolute_descendants
+ .descendant_links
+ .retain(|descendant| !descendant.has_reached_containing_block);
let this = self.clone();
let base = FlowRef::deref_mut(self).mut_base();
@@ -1412,9 +1498,7 @@ pub struct ContainingBlockLink {
impl ContainingBlockLink {
fn new() -> ContainingBlockLink {
- ContainingBlockLink {
- link: None,
- }
+ ContainingBlockLink { link: None }
}
fn set(&mut self, link: FlowRef) {
@@ -1424,34 +1508,38 @@ impl ContainingBlockLink {
#[inline]
pub fn generated_containing_block_size(&self, for_flow: OpaqueFlow) -> LogicalSize<Au> {
match self.link {
- None => {
- panic!("Link to containing block not established; perhaps you forgot to call \
- `set_absolute_descendants`?")
- }
+ None => panic!(
+ "Link to containing block not established; perhaps you forgot to call \
+ `set_absolute_descendants`?"
+ ),
Some(ref link) => {
let flow = link.upgrade().unwrap();
flow.generated_containing_block_size(for_flow)
- }
+ },
}
}
#[inline]
- pub fn explicit_block_containing_size(&self, shared_context: &SharedStyleContext) -> Option<Au> {
+ pub fn explicit_block_containing_size(
+ &self,
+ shared_context: &SharedStyleContext,
+ ) -> Option<Au> {
match self.link {
- None => {
- panic!("Link to containing block not established; perhaps you forgot to call \
- `set_absolute_descendants`?")
- }
+ None => panic!(
+ "Link to containing block not established; perhaps you forgot to call \
+ `set_absolute_descendants`?"
+ ),
Some(ref link) => {
let flow = link.upgrade().unwrap();
if flow.is_block_like() {
- flow.as_block().explicit_block_containing_size(shared_context)
+ flow.as_block()
+ .explicit_block_containing_size(shared_context)
} else if flow.is_inline_flow() {
Some(flow.as_inline().minimum_line_metrics.space_above_baseline)
} else {
None
}
- }
+ },
}
}
}
diff --git a/components/layout/flow_list.rs b/components/layout/flow_list.rs
index 2960579762e..53ec0d8912a 100644
--- a/components/layout/flow_list.rs
+++ b/components/layout/flow_list.rs
@@ -38,10 +38,13 @@ impl Serialize for FlowList {
FlowClass::TableRow => to_value(f.as_table_row()).unwrap(),
FlowClass::TableCell => to_value(f.as_table_cell()).unwrap(),
FlowClass::Flex => to_value(f.as_flex()).unwrap(),
- FlowClass::ListItem | FlowClass::TableColGroup | FlowClass::TableCaption |
- FlowClass::Multicol | FlowClass::MulticolColumn => {
+ FlowClass::ListItem |
+ FlowClass::TableColGroup |
+ FlowClass::TableCaption |
+ FlowClass::Multicol |
+ FlowClass::MulticolColumn => {
Value::Null // Not implemented yet
- }
+ },
};
flow_val.insert("data".to_owned(), data);
serializer.serialize_element(&flow_val)?;
@@ -152,7 +155,7 @@ impl FlowList {
#[inline]
pub fn split_off(&mut self, i: usize) -> Self {
FlowList {
- flows: self.flows.split_off(i)
+ flows: self.flows.split_off(i),
}
}
}
diff --git a/components/layout/flow_ref.rs b/components/layout/flow_ref.rs
index d1cd093a707..b2da85b74ac 100644
--- a/components/layout/flow_ref.rs
+++ b/components/layout/flow_ref.rs
@@ -8,7 +8,6 @@
//! be superfluous. This design is largely duplicating logic of Arc<T> and
//! Weak<T>; please see comments there for details.
-
use flow::Flow;
use std::ops::Deref;
use std::sync::{Arc, Weak};
@@ -63,4 +62,3 @@ impl WeakFlowRef {
self.0.upgrade().map(FlowRef)
}
}
-
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index 34ef214c275..2e952a501fb 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -214,28 +214,27 @@ pub enum SpecificFragmentInfo {
impl SpecificFragmentInfo {
fn restyle_damage(&self) -> RestyleDamage {
- let flow =
- match *self {
- SpecificFragmentInfo::Canvas(_) |
- SpecificFragmentInfo::GeneratedContent(_) |
- SpecificFragmentInfo::Iframe(_) |
- SpecificFragmentInfo::Image(_) |
- SpecificFragmentInfo::ScannedText(_) |
- SpecificFragmentInfo::Svg(_) |
- SpecificFragmentInfo::Table |
- SpecificFragmentInfo::TableCell |
- SpecificFragmentInfo::TableColumn(_) |
- SpecificFragmentInfo::TableRow |
- SpecificFragmentInfo::TableWrapper |
- SpecificFragmentInfo::Multicol |
- SpecificFragmentInfo::MulticolColumn |
- SpecificFragmentInfo::UnscannedText(_) |
- SpecificFragmentInfo::TruncatedFragment(_) |
- SpecificFragmentInfo::Generic => return RestyleDamage::empty(),
- SpecificFragmentInfo::InlineAbsoluteHypothetical(ref info) => &info.flow_ref,
- SpecificFragmentInfo::InlineAbsolute(ref info) => &info.flow_ref,
- SpecificFragmentInfo::InlineBlock(ref info) => &info.flow_ref,
- };
+ let flow = match *self {
+ SpecificFragmentInfo::Canvas(_) |
+ SpecificFragmentInfo::GeneratedContent(_) |
+ SpecificFragmentInfo::Iframe(_) |
+ SpecificFragmentInfo::Image(_) |
+ SpecificFragmentInfo::ScannedText(_) |
+ SpecificFragmentInfo::Svg(_) |
+ SpecificFragmentInfo::Table |
+ SpecificFragmentInfo::TableCell |
+ SpecificFragmentInfo::TableColumn(_) |
+ SpecificFragmentInfo::TableRow |
+ SpecificFragmentInfo::TableWrapper |
+ SpecificFragmentInfo::Multicol |
+ SpecificFragmentInfo::MulticolColumn |
+ SpecificFragmentInfo::UnscannedText(_) |
+ SpecificFragmentInfo::TruncatedFragment(_) |
+ SpecificFragmentInfo::Generic => return RestyleDamage::empty(),
+ SpecificFragmentInfo::InlineAbsoluteHypothetical(ref info) => &info.flow_ref,
+ SpecificFragmentInfo::InlineAbsolute(ref info) => &info.flow_ref,
+ SpecificFragmentInfo::InlineBlock(ref info) => &info.flow_ref,
+ };
flow.base().restyle_damage
}
@@ -250,7 +249,7 @@ impl SpecificFragmentInfo {
SpecificFragmentInfo::InlineAbsolute(_) => "SpecificFragmentInfo::InlineAbsolute",
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {
"SpecificFragmentInfo::InlineAbsoluteHypothetical"
- }
+ },
SpecificFragmentInfo::InlineBlock(_) => "SpecificFragmentInfo::InlineBlock",
SpecificFragmentInfo::ScannedText(_) => "SpecificFragmentInfo::ScannedText",
SpecificFragmentInfo::Svg(_) => "SpecificFragmentInfo::Svg",
@@ -262,7 +261,7 @@ impl SpecificFragmentInfo {
SpecificFragmentInfo::Multicol => "SpecificFragmentInfo::Multicol",
SpecificFragmentInfo::MulticolColumn => "SpecificFragmentInfo::MulticolColumn",
SpecificFragmentInfo::UnscannedText(_) => "SpecificFragmentInfo::UnscannedText",
- SpecificFragmentInfo::TruncatedFragment(_) => "SpecificFragmentInfo::TruncatedFragment"
+ SpecificFragmentInfo::TruncatedFragment(_) => "SpecificFragmentInfo::TruncatedFragment",
}
}
}
@@ -272,7 +271,7 @@ impl fmt::Debug for SpecificFragmentInfo {
match *self {
SpecificFragmentInfo::ScannedText(ref info) => write!(f, "{:?}", info.text()),
SpecificFragmentInfo::UnscannedText(ref info) => write!(f, "{:?}", info.text),
- _ => Ok(())
+ _ => Ok(()),
}
}
}
@@ -298,9 +297,7 @@ pub struct InlineAbsoluteHypotheticalFragmentInfo {
impl InlineAbsoluteHypotheticalFragmentInfo {
pub fn new(flow_ref: FlowRef) -> InlineAbsoluteHypotheticalFragmentInfo {
- InlineAbsoluteHypotheticalFragmentInfo {
- flow_ref: flow_ref,
- }
+ InlineAbsoluteHypotheticalFragmentInfo { flow_ref: flow_ref }
}
}
@@ -315,9 +312,7 @@ pub struct InlineBlockFragmentInfo {
impl InlineBlockFragmentInfo {
pub fn new(flow_ref: FlowRef) -> InlineBlockFragmentInfo {
- InlineBlockFragmentInfo {
- flow_ref: flow_ref,
- }
+ InlineBlockFragmentInfo { flow_ref: flow_ref }
}
}
@@ -333,16 +328,14 @@ pub struct InlineAbsoluteFragmentInfo {
impl InlineAbsoluteFragmentInfo {
pub fn new(flow_ref: FlowRef) -> InlineAbsoluteFragmentInfo {
- InlineAbsoluteFragmentInfo {
- flow_ref: flow_ref,
- }
+ InlineAbsoluteFragmentInfo { flow_ref: flow_ref }
}
}
#[derive(Clone)]
pub enum CanvasFragmentSource {
WebGL(webrender_api::ImageKey),
- Image(Option<Arc<Mutex<IpcSender<CanvasMsg>>>>)
+ Image(Option<Arc<Mutex<IpcSender<CanvasMsg>>>>),
}
#[derive(Clone)]
@@ -356,12 +349,10 @@ pub struct CanvasFragmentInfo {
impl CanvasFragmentInfo {
pub fn new(data: HTMLCanvasData) -> CanvasFragmentInfo {
let source = match data.source {
- HTMLCanvasDataSource::WebGL(texture_id) => {
- CanvasFragmentSource::WebGL(texture_id)
- },
- HTMLCanvasDataSource::Image(ipc_sender) => {
- CanvasFragmentSource::Image(ipc_sender.map(|renderer| Arc::new(Mutex::new(renderer))))
- }
+ HTMLCanvasDataSource::WebGL(texture_id) => CanvasFragmentSource::WebGL(texture_id),
+ HTMLCanvasDataSource::Image(ipc_sender) => CanvasFragmentSource::Image(
+ ipc_sender.map(|renderer| Arc::new(Mutex::new(renderer))),
+ ),
};
CanvasFragmentInfo {
@@ -388,7 +379,6 @@ impl SvgFragmentInfo {
}
}
-
/// A fragment that represents a replaced content image and its accompanying borders, shadows, etc.
#[derive(Clone)]
pub struct ImageFragmentInfo {
@@ -401,26 +391,25 @@ impl ImageFragmentInfo {
///
/// FIXME(pcwalton): The fact that image fragments store the cache in the fragment makes little
/// sense to me.
- pub fn new<N: ThreadSafeLayoutNode>(url: Option<ServoUrl>,
- node: &N,
- layout_context: &LayoutContext)
- -> ImageFragmentInfo {
+ pub fn new<N: ThreadSafeLayoutNode>(
+ url: Option<ServoUrl>,
+ node: &N,
+ layout_context: &LayoutContext,
+ ) -> ImageFragmentInfo {
let image_or_metadata = url.and_then(|url| {
- layout_context.get_or_request_image_or_meta(node.opaque(),
- url,
- UsePlaceholder::Yes)
+ layout_context.get_or_request_image_or_meta(node.opaque(), url, UsePlaceholder::Yes)
});
let (image, metadata) = match image_or_metadata {
- Some(ImageOrMetadataAvailable::ImageAvailable(i, _)) => {
- (Some(i.clone()), Some(ImageMetadata { height: i.height, width: i.width } ))
- }
- Some(ImageOrMetadataAvailable::MetadataAvailable(m)) => {
- (None, Some(m))
- }
- None => {
- (None, None)
- }
+ Some(ImageOrMetadataAvailable::ImageAvailable(i, _)) => (
+ Some(i.clone()),
+ Some(ImageMetadata {
+ height: i.height,
+ width: i.width,
+ }),
+ ),
+ Some(ImageOrMetadataAvailable::MetadataAvailable(m)) => (None, Some(m)),
+ None => (None, None),
};
ImageFragmentInfo {
@@ -496,12 +485,13 @@ bitflags! {
impl ScannedTextFragmentInfo {
/// Creates the information specific to a scanned text fragment from a range and a text run.
- pub fn new(run: Arc<TextRun>,
- range: Range<ByteIndex>,
- content_size: LogicalSize<Au>,
- insertion_point: Option<ByteIndex>,
- flags: ScannedTextFlags)
- -> ScannedTextFragmentInfo {
+ pub fn new(
+ run: Arc<TextRun>,
+ range: Range<ByteIndex>,
+ content_size: LogicalSize<Au>,
+ insertion_point: Option<ByteIndex>,
+ flags: ScannedTextFlags,
+ ) -> ScannedTextFragmentInfo {
ScannedTextFragmentInfo {
run: run,
range: range,
@@ -513,11 +503,12 @@ impl ScannedTextFragmentInfo {
}
pub fn text(&self) -> &str {
- &self.run.text[self.range.begin().to_usize() .. self.range.end().to_usize()]
+ &self.run.text[self.range.begin().to_usize()..self.range.end().to_usize()]
}
pub fn requires_line_break_afterward_if_wrapping_on_newlines(&self) -> bool {
- self.flags.contains(ScannedTextFlags::REQUIRES_LINE_BREAK_AFTERWARD_IF_WRAPPING_ON_NEWLINES)
+ self.flags
+ .contains(ScannedTextFlags::REQUIRES_LINE_BREAK_AFTERWARD_IF_WRAPPING_ON_NEWLINES)
}
pub fn selected(&self) -> bool {
@@ -596,12 +587,11 @@ impl TableColumnFragmentInfo {
/// Create the information specific to an table column fragment.
pub fn new<N: ThreadSafeLayoutNode>(node: &N) -> TableColumnFragmentInfo {
let element = node.as_element().unwrap();
- let span = element.get_attr(&ns!(), &local_name!("span"))
- .and_then(|string| string.parse().ok())
- .unwrap_or(0);
- TableColumnFragmentInfo {
- span: span,
- }
+ let span = element
+ .get_attr(&ns!(), &local_name!("span"))
+ .and_then(|string| string.parse().ok())
+ .unwrap_or(0);
+ TableColumnFragmentInfo { span: span }
}
}
@@ -616,7 +606,11 @@ pub struct TruncatedFragmentInfo {
impl Fragment {
/// Constructs a new `Fragment` instance.
- pub fn new<N: ThreadSafeLayoutNode>(node: &N, specific: SpecificFragmentInfo, ctx: &LayoutContext) -> Fragment {
+ pub fn new<N: ThreadSafeLayoutNode>(
+ node: &N,
+ specific: SpecificFragmentInfo,
+ ctx: &LayoutContext,
+ ) -> Fragment {
let shared_context = ctx.shared_context();
let style = node.style(shared_context);
let writing_mode = style.writing_mode;
@@ -643,13 +637,14 @@ impl Fragment {
}
/// Constructs a new `Fragment` instance from an opaque node.
- pub fn from_opaque_node_and_style(node: OpaqueNode,
- pseudo: PseudoElementType,
- style: ServoArc<ComputedValues>,
- selected_style: ServoArc<ComputedValues>,
- mut restyle_damage: RestyleDamage,
- specific: SpecificFragmentInfo)
- -> Fragment {
+ pub fn from_opaque_node_and_style(
+ node: OpaqueNode,
+ pseudo: PseudoElementType,
+ style: ServoArc<ComputedValues>,
+ selected_style: ServoArc<ComputedValues>,
+ mut restyle_damage: RestyleDamage,
+ specific: SpecificFragmentInfo,
+ ) -> Fragment {
let writing_mode = style.writing_mode;
restyle_damage.remove(ServoRestyleDamage::RECONSTRUCT_FLOW);
@@ -675,10 +670,11 @@ impl Fragment {
/// Creates an anonymous fragment just like this one but with the given style and fragment
/// type. For the new anonymous fragment, layout-related values (border box, etc.) are reset to
/// initial values.
- pub fn create_similar_anonymous_fragment(&self,
- style: ServoArc<ComputedValues>,
- specific: SpecificFragmentInfo)
- -> Fragment {
+ pub fn create_similar_anonymous_fragment(
+ &self,
+ style: ServoArc<ComputedValues>,
+ specific: SpecificFragmentInfo,
+ ) -> Fragment {
let writing_mode = style.writing_mode;
Fragment {
node: self.node,
@@ -700,11 +696,9 @@ impl Fragment {
/// Transforms this fragment into another fragment of the given type, with the given size,
/// preserving all the other data.
- pub fn transform(&self, size: LogicalSize<Au>, info: SpecificFragmentInfo)
- -> Fragment {
- let new_border_box = LogicalRect::from_point_size(self.style.writing_mode,
- self.border_box.start,
- size);
+ pub fn transform(&self, size: LogicalSize<Au>, info: SpecificFragmentInfo) -> Fragment {
+ let new_border_box =
+ LogicalRect::from_point_size(self.style.writing_mode, self.border_box.start, size);
let mut restyle_damage = RestyleDamage::rebuild_and_reflow();
restyle_damage.remove(ServoRestyleDamage::RECONSTRUCT_FLOW);
@@ -730,22 +724,30 @@ impl Fragment {
/// Transforms this fragment using the given `SplitInfo`, preserving all the other data.
///
/// If this is the first half of a split, `first` is true
- pub fn transform_with_split_info(&self, split: &SplitInfo, text_run: Arc<TextRun>,
- first: bool) -> Fragment {
- let size = LogicalSize::new(self.style.writing_mode,
- split.inline_size,
- self.border_box.size.block);
+ pub fn transform_with_split_info(
+ &self,
+ split: &SplitInfo,
+ text_run: Arc<TextRun>,
+ first: bool,
+ ) -> Fragment {
+ let size = LogicalSize::new(
+ self.style.writing_mode,
+ split.inline_size,
+ self.border_box.size.block,
+ );
// Preserve the insertion point if it is in this fragment's range or it is at line end.
let (mut flags, insertion_point) = match self.specific {
- SpecificFragmentInfo::ScannedText(ref info) => {
- match info.insertion_point {
- Some(index) if split.range.contains(index) => (info.flags, info.insertion_point),
- Some(index) if index == ByteIndex(text_run.text.chars().count() as isize - 1) &&
- index == split.range.end() => (info.flags, info.insertion_point),
- _ => (info.flags, None)
- }
+ SpecificFragmentInfo::ScannedText(ref info) => match info.insertion_point {
+ Some(index) if split.range.contains(index) => (info.flags, info.insertion_point),
+ Some(index)
+ if index == ByteIndex(text_run.text.chars().count() as isize - 1) &&
+ index == split.range.end() =>
+ {
+ (info.flags, info.insertion_point)
+ },
+ _ => (info.flags, None),
},
- _ => (ScannedTextFlags::empty(), None)
+ _ => (ScannedTextFlags::empty(), None),
};
if !first {
@@ -763,16 +765,18 @@ impl Fragment {
}
/// Transforms this fragment into an ellipsis fragment, preserving all the other data.
- pub fn transform_into_ellipsis(&self,
- layout_context: &LayoutContext,
- text_overflow_string: String)
- -> Fragment {
+ pub fn transform_into_ellipsis(
+ &self,
+ layout_context: &LayoutContext,
+ text_overflow_string: String,
+ ) -> Fragment {
let mut unscanned_ellipsis_fragments = LinkedList::new();
let mut ellipsis_fragment = self.transform(
self.border_box.size,
- SpecificFragmentInfo::UnscannedText(
- Box::new(UnscannedTextFragmentInfo::new(text_overflow_string.into_boxed_str(), None))
- )
+ SpecificFragmentInfo::UnscannedText(Box::new(UnscannedTextFragmentInfo::new(
+ text_overflow_string.into_boxed_str(),
+ None,
+ ))),
);
unscanned_ellipsis_fragments.push_back(ellipsis_fragment);
let ellipsis_fragments = with_thread_local_font_context(layout_context, |font_context| {
@@ -789,10 +793,10 @@ impl Fragment {
}
pub fn contains_node(&self, node_address: OpaqueNode) -> bool {
- node_address == self.node ||
- self.inline_context.as_ref().map_or(false, |ctx| {
- ctx.contains_node(node_address)
- })
+ node_address == self.node || self
+ .inline_context
+ .as_ref()
+ .map_or(false, |ctx| ctx.contains_node(node_address))
}
/// Adds a style to the inline context for this fragment. If the inline context doesn't exist
@@ -806,8 +810,9 @@ impl Fragment {
/// Determines which quantities (border/padding/margin/specified) should be included in the
/// intrinsic inline size of this fragment.
- fn quantities_included_in_intrinsic_inline_size(&self)
- -> QuantitiesIncludedInIntrinsicInlineSizes {
+ fn quantities_included_in_intrinsic_inline_size(
+ &self,
+ ) -> QuantitiesIncludedInIntrinsicInlineSizes {
match self.specific {
SpecificFragmentInfo::Canvas(_) |
SpecificFragmentInfo::Generic |
@@ -878,10 +883,11 @@ impl Fragment {
// This will likely need to be done by pushing down definite sizes during selector
// cascading.
let margin = if flags.contains(
- QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_MARGINS) {
+ QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_MARGINS,
+ ) {
let margin = style.logical_margin();
(MaybeAuto::from_style(margin.inline_start, Au(0)).specified_or_zero() +
- MaybeAuto::from_style(margin.inline_end, Au(0)).specified_or_zero())
+ MaybeAuto::from_style(margin.inline_end, Au(0)).specified_or_zero())
} else {
Au(0)
};
@@ -890,16 +896,17 @@ impl Fragment {
// This will likely need to be done by pushing down definite sizes during selector
// cascading.
let padding = if flags.contains(
- QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_PADDING) {
+ QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_PADDING,
+ ) {
let padding = style.logical_padding();
- (padding.inline_start.to_used_value(Au(0)) +
- padding.inline_end.to_used_value(Au(0)))
+ (padding.inline_start.to_used_value(Au(0)) + padding.inline_end.to_used_value(Au(0)))
} else {
Au(0)
};
let border = if flags.contains(
- QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_BORDER) {
+ QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_BORDER,
+ ) {
self.border_width().inline_start_end()
} else {
Au(0)
@@ -918,9 +925,11 @@ impl Fragment {
let (border_padding, margin) = self.surrounding_intrinsic_inline_size();
let mut specified = Au(0);
- if flags.contains(QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_SPECIFIED) {
- specified = MaybeAuto::from_style(style.content_inline_size(),
- Au(0)).specified_or_zero();
+ if flags.contains(
+ QuantitiesIncludedInIntrinsicInlineSizes::INTRINSIC_INLINE_SIZE_INCLUDES_SPECIFIED,
+ ) {
+ specified =
+ MaybeAuto::from_style(style.content_inline_size(), Au(0)).specified_or_zero();
specified = max(style.min_inline_size().to_used_value(Au(0)), specified);
if let Some(max) = style.max_inline_size().to_used_value(Au(0)) {
specified = min(specified, max)
@@ -950,7 +959,7 @@ impl Fragment {
} else {
Au(0)
}
- }
+ },
SpecificFragmentInfo::Canvas(ref info) => info.dom_width,
SpecificFragmentInfo::Svg(ref info) => info.dom_width,
// Note: Currently for replaced element with no intrinsic size,
@@ -959,7 +968,7 @@ impl Fragment {
// sufficient, but we may need to investigate if this is enough for
// use cases like SVG.
SpecificFragmentInfo::Iframe(_) => Au::from_px(DEFAULT_REPLACED_WIDTH),
- _ => panic!("Trying to get intrinsic width on non-replaced element!")
+ _ => panic!("Trying to get intrinsic width on non-replaced element!"),
}
}
@@ -973,11 +982,11 @@ impl Fragment {
} else {
Au(0)
}
- }
+ },
SpecificFragmentInfo::Canvas(ref info) => info.dom_height,
SpecificFragmentInfo::Svg(ref info) => info.dom_height,
SpecificFragmentInfo::Iframe(_) => Au::from_px(DEFAULT_REPLACED_HEIGHT),
- _ => panic!("Trying to get intrinsic height on non-replaced element!")
+ _ => panic!("Trying to get intrinsic height on non-replaced element!"),
}
}
@@ -1001,11 +1010,13 @@ impl Fragment {
/// When a parameter is `None` it means the specified size in certain direction
/// is unconstrained. The inline containing size can also be `None` since this
/// method is also used for calculating intrinsic inline size contribution.
- pub fn calculate_replaced_sizes(&self,
- containing_inline_size: Option<Au>,
- containing_block_size: Option<Au>)
- -> (Au, Au) {
- let (intrinsic_inline_size, intrinsic_block_size) = if self.style.writing_mode.is_vertical() {
+ pub fn calculate_replaced_sizes(
+ &self,
+ containing_inline_size: Option<Au>,
+ containing_block_size: Option<Au>,
+ ) -> (Au, Au) {
+ let (intrinsic_inline_size, intrinsic_block_size) = if self.style.writing_mode.is_vertical()
+ {
(self.intrinsic_height(), self.intrinsic_width())
} else {
(self.intrinsic_width(), self.intrinsic_height())
@@ -1014,9 +1025,9 @@ impl Fragment {
// Make sure the size we used here is for content box since they may be
// transferred by the intrinsic aspect ratio.
let inline_size = style_length(self.style.content_inline_size(), containing_inline_size)
- .map(|x| x - self.box_sizing_boundary(Direction::Inline));
+ .map(|x| x - self.box_sizing_boundary(Direction::Inline));
let block_size = style_length(self.style.content_block_size(), containing_block_size)
- .map(|x| x - self.box_sizing_boundary(Direction::Block));
+ .map(|x| x - self.box_sizing_boundary(Direction::Block));
let inline_constraint = self.size_constraint(containing_inline_size, Direction::Inline);
let block_constraint = self.size_constraint(containing_block_size, Direction::Block);
@@ -1024,8 +1035,10 @@ impl Fragment {
match (inline_size, block_size) {
// If the specified size is a definite width and height, the concrete
// object size is given that width and height.
- (MaybeAuto::Specified(inline_size), MaybeAuto::Specified(block_size)) =>
- (inline_constraint.clamp(inline_size), block_constraint.clamp(block_size)),
+ (MaybeAuto::Specified(inline_size), MaybeAuto::Specified(block_size)) => (
+ inline_constraint.clamp(inline_size),
+ block_constraint.clamp(block_size),
+ ),
// If the specified size is only a width or height (but not both)
// then the concrete object size is given that specified width or
@@ -1044,23 +1057,27 @@ impl Fragment {
// Note: We can not precompute the ratio and store it as a float, because
// doing so may result one pixel difference in calculation for certain
// images, thus make some tests fail.
- Au::new((inline_size.0 as i64 * intrinsic_block_size.0 as i64 /
- intrinsic_inline_size.0 as i64) as i32)
+ Au::new(
+ (inline_size.0 as i64 * intrinsic_block_size.0 as i64 /
+ intrinsic_inline_size.0 as i64) as i32,
+ )
} else {
intrinsic_block_size
};
(inline_size, block_constraint.clamp(block_size))
- }
+ },
(MaybeAuto::Auto, MaybeAuto::Specified(block_size)) => {
let block_size = block_constraint.clamp(block_size);
let inline_size = if self.has_intrinsic_ratio() {
- Au::new((block_size.0 as i64 * intrinsic_inline_size.0 as i64 /
- intrinsic_block_size.0 as i64) as i32)
+ Au::new(
+ (block_size.0 as i64 * intrinsic_inline_size.0 as i64 /
+ intrinsic_block_size.0 as i64) as i32,
+ )
} else {
intrinsic_inline_size
};
(inline_constraint.clamp(inline_size), block_size)
- }
+ },
// https://drafts.csswg.org/css2/visudet.html#min-max-widths
(MaybeAuto::Auto, MaybeAuto::Auto) => {
if self.has_intrinsic_ratio() {
@@ -1070,48 +1087,54 @@ impl Fragment {
// First, create two rectangles that keep aspect ratio while may be clamped
// by the contraints;
let first_isize = inline_constraint.clamp(intrinsic_inline_size);
- let first_bsize = Au::new((first_isize.0 as i64 * intrinsic_block_size.0 as i64 /
- intrinsic_inline_size.0 as i64) as i32);
+ let first_bsize = Au::new(
+ (first_isize.0 as i64 * intrinsic_block_size.0 as i64 /
+ intrinsic_inline_size.0 as i64) as i32,
+ );
let second_bsize = block_constraint.clamp(intrinsic_block_size);
- let second_isize = Au::new((second_bsize.0 as i64 * intrinsic_inline_size.0 as i64 /
- intrinsic_block_size.0 as i64) as i32);
- let (inline_size, block_size) = match (first_isize.cmp(&intrinsic_inline_size) ,
- second_isize.cmp(&intrinsic_inline_size)) {
- (Ordering::Equal, Ordering::Equal) =>
- (first_isize, first_bsize),
+ let second_isize = Au::new(
+ (second_bsize.0 as i64 * intrinsic_inline_size.0 as i64 /
+ intrinsic_block_size.0 as i64) as i32,
+ );
+ let (inline_size, block_size) = match (
+ first_isize.cmp(&intrinsic_inline_size),
+ second_isize.cmp(&intrinsic_inline_size),
+ ) {
+ (Ordering::Equal, Ordering::Equal) => (first_isize, first_bsize),
// When only one rectangle is clamped, use it;
- (Ordering::Equal, _) =>
- (second_isize, second_bsize),
- (_, Ordering::Equal) =>
- (first_isize, first_bsize),
+ (Ordering::Equal, _) => (second_isize, second_bsize),
+ (_, Ordering::Equal) => (first_isize, first_bsize),
// When both rectangles grow (smaller than min sizes),
// Choose the larger one;
- (Ordering::Greater, Ordering::Greater) =>
- if first_isize > second_isize {
- (first_isize, first_bsize)
- } else {
- (second_isize, second_bsize)
- },
+ (Ordering::Greater, Ordering::Greater) => if first_isize > second_isize {
+ (first_isize, first_bsize)
+ } else {
+ (second_isize, second_bsize)
+ },
// When both rectangles shrink (larger than max sizes),
// Choose the smaller one;
- (Ordering::Less, Ordering::Less) =>
- if first_isize > second_isize {
- (second_isize, second_bsize)
- } else {
- (first_isize, first_bsize)
- },
+ (Ordering::Less, Ordering::Less) => if first_isize > second_isize {
+ (second_isize, second_bsize)
+ } else {
+ (first_isize, first_bsize)
+ },
// It does not matter which we choose here, because both sizes
// will be clamped to constraint;
- (Ordering::Less, Ordering::Greater) | (Ordering::Greater, Ordering::Less) =>
- (first_isize, first_bsize)
+ (Ordering::Less, Ordering::Greater) |
+ (Ordering::Greater, Ordering::Less) => (first_isize, first_bsize),
};
// Clamp the result and we are done :-)
- (inline_constraint.clamp(inline_size), block_constraint.clamp(block_size))
+ (
+ inline_constraint.clamp(inline_size),
+ block_constraint.clamp(block_size),
+ )
} else {
- (inline_constraint.clamp(intrinsic_inline_size),
- block_constraint.clamp(intrinsic_block_size))
+ (
+ inline_constraint.clamp(intrinsic_inline_size),
+ block_constraint.clamp(intrinsic_block_size),
+ )
}
- }
+ },
}
}
@@ -1120,10 +1143,14 @@ impl Fragment {
/// must be initialized first.
///
/// TODO(stshine): Maybe there is a more convenient way.
- pub fn size_constraint(&self, containing_size: Option<Au>, direction: Direction) -> SizeConstraint {
+ pub fn size_constraint(
+ &self,
+ containing_size: Option<Au>,
+ direction: Direction,
+ ) -> SizeConstraint {
let (style_min_size, style_max_size) = match direction {
Direction::Inline => (self.style.min_inline_size(), self.style.max_inline_size()),
- Direction::Block => (self.style.min_block_size(), self.style.max_block_size())
+ Direction::Block => (self.style.min_block_size(), self.style.max_block_size()),
};
let border = if self.style().get_position().box_sizing == BoxSizing::BorderBox {
@@ -1165,19 +1192,26 @@ impl Fragment {
let writing_mode = self.style.writing_mode;
let context_border = match self.inline_context {
None => LogicalMargin::zero(writing_mode),
- Some(ref inline_fragment_context) => {
- inline_fragment_context.nodes.iter().fold(style_border_width, |accumulator, node| {
+ Some(ref inline_fragment_context) => inline_fragment_context.nodes.iter().fold(
+ style_border_width,
+ |accumulator, node| {
let mut this_border_width =
node.style.border_width_for_writing_mode(writing_mode);
- if !node.flags.contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT) {
+ if !node
+ .flags
+ .contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT)
+ {
this_border_width.inline_start = Au(0)
}
- if !node.flags.contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT) {
+ if !node
+ .flags
+ .contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT)
+ {
this_border_width.inline_end = Au(0)
}
accumulator + this_border_width
- })
- }
+ },
+ ),
};
style_border_width + context_border
}
@@ -1186,13 +1220,9 @@ impl Fragment {
/// 'box-sizing: border-box'. The `border_padding` field must have been initialized.
pub fn box_sizing_boundary(&self, direction: Direction) -> Au {
match (self.style().get_position().box_sizing, direction) {
- (BoxSizing::BorderBox, Direction::Inline) => {
- self.border_padding.inline_start_end()
- }
- (BoxSizing::BorderBox, Direction::Block) => {
- self.border_padding.block_start_end()
- }
- _ => Au(0)
+ (BoxSizing::BorderBox, Direction::Inline) => self.border_padding.inline_start_end(),
+ (BoxSizing::BorderBox, Direction::Block) => self.border_padding.block_start_end(),
+ _ => Au(0),
}
}
@@ -1210,35 +1240,39 @@ impl Fragment {
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {
self.margin.inline_start = Au(0);
self.margin.inline_end = Au(0);
- return
- }
+ return;
+ },
_ => {
let margin = self.style().logical_margin();
self.margin.inline_start =
- MaybeAuto::from_style(margin.inline_start,
- containing_block_inline_size).specified_or_zero();
+ MaybeAuto::from_style(margin.inline_start, containing_block_inline_size)
+ .specified_or_zero();
self.margin.inline_end =
- MaybeAuto::from_style(margin.inline_end,
- containing_block_inline_size).specified_or_zero();
- }
+ MaybeAuto::from_style(margin.inline_end, containing_block_inline_size)
+ .specified_or_zero();
+ },
}
if let Some(ref inline_context) = self.inline_context {
for node in &inline_context.nodes {
let margin = node.style.logical_margin();
- let this_inline_start_margin = if !node.flags.contains(
- InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT) {
+ let this_inline_start_margin = if !node
+ .flags
+ .contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT)
+ {
Au(0)
} else {
- MaybeAuto::from_style(margin.inline_start,
- containing_block_inline_size).specified_or_zero()
+ MaybeAuto::from_style(margin.inline_start, containing_block_inline_size)
+ .specified_or_zero()
};
- let this_inline_end_margin = if!node.flags.contains(
- InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT) {
+ let this_inline_end_margin = if !node
+ .flags
+ .contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT)
+ {
Au(0)
} else {
- MaybeAuto::from_style(margin.inline_end,
- containing_block_inline_size).specified_or_zero()
+ MaybeAuto::from_style(margin.inline_end, containing_block_inline_size)
+ .specified_or_zero()
};
self.margin.inline_start += this_inline_start_margin;
@@ -1260,26 +1294,25 @@ impl Fragment {
SpecificFragmentInfo::TableColumn(_) => {
self.margin.block_start = Au(0);
self.margin.block_end = Au(0)
- }
+ },
_ => {
// NB: Percentages are relative to containing block inline-size (not block-size)
// per CSS 2.1.
let margin = self.style().logical_margin();
self.margin.block_start =
MaybeAuto::from_style(margin.block_start, containing_block_inline_size)
- .specified_or_zero();
+ .specified_or_zero();
self.margin.block_end =
MaybeAuto::from_style(margin.block_end, containing_block_inline_size)
- .specified_or_zero();
- }
+ .specified_or_zero();
+ },
}
}
/// Computes the border and padding in both inline and block directions from the containing
/// block inline-size and the style. After this call, the `border_padding` field will be
/// correct.
- pub fn compute_border_and_padding(&mut self,
- containing_block_inline_size: Au) {
+ pub fn compute_border_and_padding(&mut self, containing_block_inline_size: Au) {
// Compute border.
let border = match self.style.get_inherited_table().border_collapse {
BorderCollapse::Separate => self.border_width(),
@@ -1291,7 +1324,11 @@ impl Fragment {
SpecificFragmentInfo::TableColumn(_) |
SpecificFragmentInfo::TableRow |
SpecificFragmentInfo::TableWrapper => LogicalMargin::zero(self.style.writing_mode),
- _ => model::padding_from_style(self.style(), containing_block_inline_size, self.style().writing_mode),
+ _ => model::padding_from_style(
+ self.style(),
+ containing_block_inline_size,
+ self.style().writing_mode,
+ ),
};
// Compute padding from the inline fragment context.
@@ -1301,21 +1338,31 @@ impl Fragment {
(&SpecificFragmentInfo::TableRow, _) |
(&SpecificFragmentInfo::TableWrapper, _) => {
LogicalMargin::zero(self.style.writing_mode)
- }
+ },
(_, &Some(ref inline_fragment_context)) => {
let writing_mode = self.style.writing_mode;
let zero_padding = LogicalMargin::zero(writing_mode);
- inline_fragment_context.nodes.iter().fold(zero_padding, |accumulator, node| {
- let mut padding = model::padding_from_style(&*node.style, Au(0), writing_mode);
- if !node.flags.contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT) {
- padding.inline_start = Au(0)
- }
- if !node.flags.contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT) {
- padding.inline_end = Au(0)
- }
- accumulator + padding
- })
- }
+ inline_fragment_context
+ .nodes
+ .iter()
+ .fold(zero_padding, |accumulator, node| {
+ let mut padding =
+ model::padding_from_style(&*node.style, Au(0), writing_mode);
+ if !node
+ .flags
+ .contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT)
+ {
+ padding.inline_start = Au(0)
+ }
+ if !node
+ .flags
+ .contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT)
+ {
+ padding.inline_end = Au(0)
+ }
+ accumulator + padding
+ })
+ },
};
self.border_padding = border + padding_from_style + padding_from_inline_fragment_context
@@ -1323,22 +1370,19 @@ impl Fragment {
// Return offset from original position because of `position: relative`.
pub fn relative_position(&self, containing_block_size: &LogicalSize<Au>) -> LogicalSize<Au> {
- fn from_style(style: &ComputedValues, container_size: &LogicalSize<Au>)
- -> LogicalSize<Au> {
+ fn from_style(style: &ComputedValues, container_size: &LogicalSize<Au>) -> LogicalSize<Au> {
let offsets = style.logical_position();
let offset_i = if offsets.inline_start != LengthOrPercentageOrAuto::Auto {
- MaybeAuto::from_style(offsets.inline_start,
- container_size.inline).specified_or_zero()
+ MaybeAuto::from_style(offsets.inline_start, container_size.inline)
+ .specified_or_zero()
} else {
- -MaybeAuto::from_style(offsets.inline_end,
- container_size.inline).specified_or_zero()
+ -MaybeAuto::from_style(offsets.inline_end, container_size.inline)
+ .specified_or_zero()
};
let offset_b = if offsets.block_start != LengthOrPercentageOrAuto::Auto {
- MaybeAuto::from_style(offsets.block_start,
- container_size.block).specified_or_zero()
+ MaybeAuto::from_style(offsets.block_start, container_size.block).specified_or_zero()
} else {
- -MaybeAuto::from_style(offsets.block_end,
- container_size.block).specified_or_zero()
+ -MaybeAuto::from_style(offsets.block_end, container_size.block).specified_or_zero()
};
LogicalSize::new(style.writing_mode, offset_i, offset_b)
}
@@ -1456,8 +1500,9 @@ impl Fragment {
pub fn suppress_line_break_before(&self) -> bool {
match self.specific {
- SpecificFragmentInfo::ScannedText(ref st) =>
- st.flags.contains(ScannedTextFlags::SUPPRESS_LINE_BREAK_BEFORE),
+ SpecificFragmentInfo::ScannedText(ref st) => st
+ .flags
+ .contains(ScannedTextFlags::SUPPRESS_LINE_BREAK_BEFORE),
_ => false,
}
}
@@ -1475,27 +1520,27 @@ impl Fragment {
SpecificFragmentInfo::TableWrapper |
SpecificFragmentInfo::Multicol |
SpecificFragmentInfo::MulticolColumn |
- SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {}
+ SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {},
SpecificFragmentInfo::InlineBlock(ref info) => {
let block_flow = info.flow_ref.as_block();
result.union_block(&block_flow.base.intrinsic_inline_sizes)
- }
+ },
SpecificFragmentInfo::InlineAbsolute(ref info) => {
let block_flow = info.flow_ref.as_block();
result.union_block(&block_flow.base.intrinsic_inline_sizes)
- }
+ },
SpecificFragmentInfo::Image(_) |
SpecificFragmentInfo::Canvas(_) |
SpecificFragmentInfo::Iframe(_) |
SpecificFragmentInfo::Svg(_) => {
let mut inline_size = match self.style.content_inline_size() {
- LengthOrPercentageOrAuto::Auto |
- LengthOrPercentageOrAuto::Percentage(_) => {
+ LengthOrPercentageOrAuto::Auto | LengthOrPercentageOrAuto::Percentage(_) => {
// We have to initialize the `border_padding` field first to make
// the size constraints work properly.
// TODO(stshine): Find a cleaner way to do this.
let padding = self.style.logical_padding();
- self.border_padding.inline_start = padding.inline_start.to_used_value(Au(0));
+ self.border_padding.inline_start =
+ padding.inline_start.to_used_value(Au(0));
self.border_padding.inline_end = padding.inline_end.to_used_value(Au(0));
self.border_padding.block_start = padding.block_start.to_used_value(Au(0));
self.border_padding.block_end = padding.block_end.to_used_value(Au(0));
@@ -1506,7 +1551,7 @@ impl Fragment {
self.border_padding.block_end += border.block_end;
let (result_inline, _) = self.calculate_replaced_sizes(None, None);
result_inline
- }
+ },
LengthOrPercentageOrAuto::Length(length) => Au::from(length),
LengthOrPercentageOrAuto::Calc(calc) => {
// TODO(nox): This is probably wrong, because it accounts neither for
@@ -1522,34 +1567,36 @@ impl Fragment {
minimum_inline_size: inline_size,
preferred_inline_size: inline_size,
});
- }
+ },
SpecificFragmentInfo::TruncatedFragment(ref t) if t.text_info.is_some() => {
let text_fragment_info = t.text_info.as_ref().unwrap();
handle_text(text_fragment_info, self, &mut result)
- }
+ },
SpecificFragmentInfo::ScannedText(ref text_fragment_info) => {
handle_text(text_fragment_info, self, &mut result)
- }
+ },
- SpecificFragmentInfo::TruncatedFragment(_) => {
- return IntrinsicISizesContribution::new()
- }
+ SpecificFragmentInfo::TruncatedFragment(_) => return IntrinsicISizesContribution::new(),
SpecificFragmentInfo::UnscannedText(..) => {
panic!("Unscanned text fragments should have been scanned by now!")
- }
+ },
};
- fn handle_text(text_fragment_info: &ScannedTextFragmentInfo, self_: &Fragment,
- result: &mut IntrinsicISizesContribution) {
+ fn handle_text(
+ text_fragment_info: &ScannedTextFragmentInfo,
+ self_: &Fragment,
+ result: &mut IntrinsicISizesContribution,
+ ) {
let range = &text_fragment_info.range;
// See http://dev.w3.org/csswg/css-sizing/#max-content-inline-size.
// TODO: Account for soft wrap opportunities.
- let max_line_inline_size = text_fragment_info.run
- .metrics_for_range(range)
- .advance_width;
+ let max_line_inline_size = text_fragment_info
+ .run
+ .metrics_for_range(range)
+ .advance_width;
let min_line_inline_size = if self_.white_space().allow_wrap() {
text_fragment_info.run.min_width_for_range(range)
@@ -1570,19 +1617,24 @@ impl Fragment {
let mut border_width = node.style.logical_border_width();
let mut padding = model::padding_from_style(&*node.style, Au(0), writing_mode);
let mut margin = model::specified_margin_from_style(&*node.style, writing_mode);
- if !node.flags.contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT) {
+ if !node
+ .flags
+ .contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT)
+ {
border_width.inline_start = Au(0);
padding.inline_start = Au(0);
margin.inline_start = Au(0);
}
- if !node.flags.contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT) {
+ if !node
+ .flags
+ .contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT)
+ {
border_width.inline_end = Au(0);
padding.inline_end = Au(0);
margin.inline_end = Au(0);
}
- result.surrounding_size =
- result.surrounding_size +
+ result.surrounding_size = result.surrounding_size +
border_width.inline_start_end() +
padding.inline_start_end() +
margin.inline_start_end();
@@ -1600,10 +1652,10 @@ impl Fragment {
SpecificFragmentInfo::TruncatedFragment(ref t) if t.text_info.is_some() => {
let text = t.text_info.as_ref().unwrap();
text.run.minimum_splittable_inline_size(&text.range)
- }
+ },
SpecificFragmentInfo::ScannedText(ref text) => {
text.run.minimum_splittable_inline_size(&text.range)
- }
+ },
_ => Au(0),
}
}
@@ -1623,12 +1675,14 @@ impl Fragment {
/// A return value of `None` indicates that the fragment could not be split. Otherwise the
/// information pertaining to the split is returned. The inline-start and inline-end split
/// information are both optional due to the possibility of them being whitespace.
- pub fn calculate_split_position(&self, max_inline_size: Au, starts_line: bool)
- -> Option<SplitResult> {
+ pub fn calculate_split_position(
+ &self,
+ max_inline_size: Au,
+ starts_line: bool,
+ ) -> Option<SplitResult> {
let text_fragment_info = match self.specific {
- SpecificFragmentInfo::ScannedText(ref text_fragment_info)
- => text_fragment_info,
- _ => return None,
+ SpecificFragmentInfo::ScannedText(ref text_fragment_info) => text_fragment_info,
+ _ => return None,
};
let mut flags = SplitOptions::empty();
@@ -1642,34 +1696,39 @@ impl Fragment {
match self.style().get_inherited_text().word_break {
WordBreak::Normal | WordBreak::KeepAll => {
// Break at normal word boundaries. keep-all forbids soft wrap opportunities.
- let natural_word_breaking_strategy =
- text_fragment_info.run.natural_word_slices_in_range(&text_fragment_info.range);
+ let natural_word_breaking_strategy = text_fragment_info
+ .run
+ .natural_word_slices_in_range(&text_fragment_info.range);
self.calculate_split_position_using_breaking_strategy(
natural_word_breaking_strategy,
max_inline_size,
- flags)
- }
+ flags,
+ )
+ },
WordBreak::BreakAll => {
// Break at character boundaries.
- let character_breaking_strategy =
- text_fragment_info.run.character_slices_in_range(&text_fragment_info.range);
+ let character_breaking_strategy = text_fragment_info
+ .run
+ .character_slices_in_range(&text_fragment_info.range);
flags.remove(SplitOptions::RETRY_AT_CHARACTER_BOUNDARIES);
self.calculate_split_position_using_breaking_strategy(
character_breaking_strategy,
max_inline_size,
- flags)
- }
+ flags,
+ )
+ },
}
}
/// Does this fragment start on a glyph run boundary?
pub fn is_on_glyph_run_boundary(&self) -> bool {
let text_fragment_info = match self.specific {
- SpecificFragmentInfo::ScannedText(ref text_fragment_info)
- => text_fragment_info,
- _ => return true,
+ SpecificFragmentInfo::ScannedText(ref text_fragment_info) => text_fragment_info,
+ _ => return true,
};
- text_fragment_info.run.on_glyph_run_boundary(text_fragment_info.range.begin())
+ text_fragment_info
+ .run
+ .on_glyph_run_boundary(text_fragment_info.range.begin())
}
/// Truncates this fragment to the given `max_inline_size`, using a character-based breaking
@@ -1683,38 +1742,41 @@ impl Fragment {
}
let info = self.calculate_truncate_to_inline_size(max_inline_size);
let (size, text_info) = match info {
- Some(TruncationResult { split: SplitInfo { inline_size, range }, text_run } ) => {
- let size = LogicalSize::new(self.style.writing_mode,
- inline_size,
- self.border_box.size.block);
+ Some(TruncationResult {
+ split: SplitInfo { inline_size, range },
+ text_run,
+ }) => {
+ let size = LogicalSize::new(
+ self.style.writing_mode,
+ inline_size,
+ self.border_box.size.block,
+ );
// Preserve the insertion point if it is in this fragment's range or it is at line end.
let (flags, insertion_point) = match self.specific {
- SpecificFragmentInfo::ScannedText(ref info) => {
- match info.insertion_point {
- Some(index) if range.contains(index) => (info.flags, info.insertion_point),
- Some(index) if index == ByteIndex(text_run.text.chars().count() as isize - 1) &&
- index == range.end() => (info.flags, info.insertion_point),
- _ => (info.flags, None)
- }
+ SpecificFragmentInfo::ScannedText(ref info) => match info.insertion_point {
+ Some(index) if range.contains(index) => (info.flags, info.insertion_point),
+ Some(index)
+ if index == ByteIndex(text_run.text.chars().count() as isize - 1) &&
+ index == range.end() =>
+ {
+ (info.flags, info.insertion_point)
+ },
+ _ => (info.flags, None),
},
- _ => (ScannedTextFlags::empty(), None)
+ _ => (ScannedTextFlags::empty(), None),
};
- let text_info = ScannedTextFragmentInfo::new(
- text_run,
- range,
- size,
- insertion_point,
- flags);
+ let text_info =
+ ScannedTextFragmentInfo::new(text_run, range, size, insertion_point, flags);
(size, Some(text_info))
- }
- None =>
- (LogicalSize::zero(self.style.writing_mode), None)
+ },
+ None => (LogicalSize::zero(self.style.writing_mode), None),
};
let mut result = self.transform(size, SpecificFragmentInfo::Generic);
- result.specific = SpecificFragmentInfo::TruncatedFragment(Box::new(TruncatedFragmentInfo {
- text_info: text_info,
- full: self,
- }));
+ result.specific =
+ SpecificFragmentInfo::TruncatedFragment(Box::new(TruncatedFragmentInfo {
+ text_info: text_info,
+ full: self,
+ }));
result
}
@@ -1725,16 +1787,18 @@ impl Fragment {
if let SpecificFragmentInfo::ScannedText(ref text_fragment_info) = self.specific {
text_fragment_info
} else {
- return None
+ return None;
};
- let character_breaking_strategy =
- text_fragment_info.run.character_slices_in_range(&text_fragment_info.range);
+ let character_breaking_strategy = text_fragment_info
+ .run
+ .character_slices_in_range(&text_fragment_info.range);
let split_info = self.calculate_split_position_using_breaking_strategy(
- character_breaking_strategy,
- max_inline_size,
- SplitOptions::empty())?;
+ character_breaking_strategy,
+ max_inline_size,
+ SplitOptions::empty(),
+ )?;
let split = split_info.inline_start?;
Some(TruncationResult {
@@ -1746,16 +1810,17 @@ impl Fragment {
/// A helper method that uses the breaking strategy described by `slice_iterator` (at present,
/// either natural word breaking or character breaking) to split this fragment.
fn calculate_split_position_using_breaking_strategy<'a, I>(
- &self,
- slice_iterator: I,
- max_inline_size: Au,
- flags: SplitOptions)
- -> Option<SplitResult>
- where I: Iterator<Item=TextRunSlice<'a>> {
+ &self,
+ slice_iterator: I,
+ max_inline_size: Au,
+ flags: SplitOptions,
+ ) -> Option<SplitResult>
+ where
+ I: Iterator<Item = TextRunSlice<'a>>,
+ {
let text_fragment_info = match self.specific {
- SpecificFragmentInfo::ScannedText(ref text_fragment_info)
- => text_fragment_info,
- _ => return None,
+ SpecificFragmentInfo::ScannedText(ref text_fragment_info) => text_fragment_info,
+ _ => return None,
};
let mut remaining_inline_size = max_inline_size - self.border_padding.inline_start_end();
@@ -1763,22 +1828,26 @@ impl Fragment {
let mut inline_end_range = None;
let mut overflowing = false;
- debug!("calculate_split_position_using_breaking_strategy: splitting text fragment \
- (strlen={}, range={:?}, max_inline_size={:?})",
- text_fragment_info.run.text.len(),
- text_fragment_info.range,
- max_inline_size);
+ debug!(
+ "calculate_split_position_using_breaking_strategy: splitting text fragment \
+ (strlen={}, range={:?}, max_inline_size={:?})",
+ text_fragment_info.run.text.len(),
+ text_fragment_info.range,
+ max_inline_size
+ );
for slice in slice_iterator {
- debug!("calculate_split_position_using_breaking_strategy: considering slice \
- (offset={:?}, slice range={:?}, remaining_inline_size={:?})",
- slice.offset,
- slice.range,
- remaining_inline_size);
+ debug!(
+ "calculate_split_position_using_breaking_strategy: considering slice \
+ (offset={:?}, slice range={:?}, remaining_inline_size={:?})",
+ slice.offset, slice.range, remaining_inline_size
+ );
// Use the `remaining_inline_size` to find a split point if possible. If not, go around
// the loop again with the next slice.
- let metrics = text_fragment_info.run.metrics_for_slice(slice.glyphs, &slice.range);
+ let metrics = text_fragment_info
+ .run
+ .metrics_for_slice(slice.glyphs, &slice.range);
let advance = metrics.advance_width;
// Have we found the split point?
@@ -1787,15 +1856,15 @@ impl Fragment {
debug!("calculate_split_position_using_breaking_strategy: enlarging span");
remaining_inline_size = remaining_inline_size - advance;
inline_start_range.extend_by(slice.range.length());
- continue
+ continue;
}
// The advance is more than the remaining inline-size, so split here. First, check to
// see if we're going to overflow the line. If so, perform a best-effort split.
let mut remaining_range = slice.text_run_range();
- let split_is_empty = inline_start_range.is_empty() &&
- !(self.requires_line_break_afterward_if_wrapping_on_newlines() &&
- !self.white_space().allow_wrap());
+ let split_is_empty = inline_start_range.is_empty() && !(self
+ .requires_line_break_afterward_if_wrapping_on_newlines() &&
+ !self.white_space().allow_wrap());
if split_is_empty {
// We're going to overflow the line.
overflowing = true;
@@ -1812,8 +1881,10 @@ impl Fragment {
let mut inline_end = remaining_range;
inline_end.extend_to(text_fragment_info.range.end());
inline_end_range = Some(inline_end);
- debug!("calculate_split_position: splitting remainder with inline-end range={:?}",
- inline_end);
+ debug!(
+ "calculate_split_position: splitting remainder with inline-end range={:?}",
+ inline_end
+ );
}
// If we failed to find a suitable split point, we're on the verge of overflowing the
@@ -1822,37 +1893,37 @@ impl Fragment {
// If we've been instructed to retry at character boundaries (probably via
// `overflow-wrap: break-word`), do so.
if flags.contains(SplitOptions::RETRY_AT_CHARACTER_BOUNDARIES) {
- let character_breaking_strategy =
- text_fragment_info.run
- .character_slices_in_range(&text_fragment_info.range);
+ let character_breaking_strategy = text_fragment_info
+ .run
+ .character_slices_in_range(&text_fragment_info.range);
let mut flags = flags;
flags.remove(SplitOptions::RETRY_AT_CHARACTER_BOUNDARIES);
return self.calculate_split_position_using_breaking_strategy(
character_breaking_strategy,
max_inline_size,
- flags)
+ flags,
+ );
}
// We aren't at the start of the line, so don't overflow. Let inline layout wrap to
// the next line instead.
if !flags.contains(SplitOptions::STARTS_LINE) {
- return None
+ return None;
}
}
- break
+ break;
}
let split_is_empty = inline_start_range.is_empty() &&
- !self.requires_line_break_afterward_if_wrapping_on_newlines();
+ !self.requires_line_break_afterward_if_wrapping_on_newlines();
let inline_start = if !split_is_empty {
Some(SplitInfo::new(inline_start_range, &**text_fragment_info))
} else {
None
};
- let inline_end = inline_end_range.map(|inline_end_range| {
- SplitInfo::new(inline_end_range, &**text_fragment_info)
- });
+ let inline_end = inline_end_range
+ .map(|inline_end_range| SplitInfo::new(inline_end_range, &**text_fragment_info));
Some(SplitResult {
inline_start: inline_start,
@@ -1865,20 +1936,24 @@ impl Fragment {
/// with the next one.
pub fn merge_with(&mut self, next_fragment: Fragment) {
match (&mut self.specific, &next_fragment.specific) {
- (&mut SpecificFragmentInfo::ScannedText(ref mut this_info),
- &SpecificFragmentInfo::ScannedText(ref other_info)) => {
+ (
+ &mut SpecificFragmentInfo::ScannedText(ref mut this_info),
+ &SpecificFragmentInfo::ScannedText(ref other_info),
+ ) => {
debug_assert!(Arc::ptr_eq(&this_info.run, &other_info.run));
this_info.range_end_including_stripped_whitespace =
other_info.range_end_including_stripped_whitespace;
if other_info.requires_line_break_afterward_if_wrapping_on_newlines() {
- this_info.flags.insert(ScannedTextFlags::REQUIRES_LINE_BREAK_AFTERWARD_IF_WRAPPING_ON_NEWLINES);
+ this_info.flags.insert(
+ ScannedTextFlags::REQUIRES_LINE_BREAK_AFTERWARD_IF_WRAPPING_ON_NEWLINES,
+ );
}
if other_info.insertion_point.is_some() {
this_info.insertion_point = other_info.insertion_point;
}
self.border_padding.inline_end = next_fragment.border_padding.inline_end;
self.margin.inline_end = next_fragment.margin.inline_end;
- }
+ },
_ => panic!("Can only merge two scanned-text fragments!"),
}
self.reset_text_range_and_inline_size();
@@ -1896,20 +1971,22 @@ impl Fragment {
// FIXME (mbrubeck): Do we need to restore leading too?
let range_end = info.range_end_including_stripped_whitespace;
if info.range.end() == range_end {
- return
+ return;
}
info.range.extend_to(range_end);
info.content_size.inline = info.run.metrics_for_range(&info.range).advance_width;
- self.border_box.size.inline = info.content_size.inline +
- self.border_padding.inline_start_end();
+ self.border_box.size.inline =
+ info.content_size.inline + self.border_padding.inline_start_end();
}
}
/// Assigns replaced inline-size, padding, and margins for this fragment only if it is replaced
/// content per CSS 2.1 § 10.3.2.
- pub fn assign_replaced_inline_size_if_necessary(&mut self,
- container_inline_size: Au,
- container_block_size: Option<Au>) {
+ pub fn assign_replaced_inline_size_if_necessary(
+ &mut self,
+ container_inline_size: Au,
+ container_block_size: Option<Au>,
+ ) {
match self.specific {
SpecificFragmentInfo::TruncatedFragment(ref t) if t.text_info.is_none() => return,
SpecificFragmentInfo::Generic |
@@ -1922,10 +1999,10 @@ impl Fragment {
SpecificFragmentInfo::MulticolColumn => return,
SpecificFragmentInfo::TableColumn(_) => {
panic!("Table column fragments do not have inline size")
- }
+ },
SpecificFragmentInfo::UnscannedText(_) => {
panic!("Unscanned text fragments should have been scanned by now!")
- }
+ },
SpecificFragmentInfo::Canvas(_) |
SpecificFragmentInfo::Image(_) |
SpecificFragmentInfo::Iframe(_) |
@@ -1934,7 +2011,7 @@ impl Fragment {
SpecificFragmentInfo::InlineAbsolute(_) |
SpecificFragmentInfo::ScannedText(_) |
SpecificFragmentInfo::TruncatedFragment(_) |
- SpecificFragmentInfo::Svg(_) => {}
+ SpecificFragmentInfo::Svg(_) => {},
};
match self.specific {
@@ -1946,48 +2023,52 @@ impl Fragment {
// This is a hypothetical box, so it takes up no space.
self.border_box.size.inline = Au(0);
- }
+ },
SpecificFragmentInfo::InlineBlock(ref mut info) => {
let block_flow = FlowRef::deref_mut(&mut info.flow_ref).as_mut_block();
- self.border_box.size.inline =
- max(block_flow.base.intrinsic_inline_sizes.minimum_inline_size,
- block_flow.base.intrinsic_inline_sizes.preferred_inline_size);
+ self.border_box.size.inline = max(
+ block_flow.base.intrinsic_inline_sizes.minimum_inline_size,
+ block_flow.base.intrinsic_inline_sizes.preferred_inline_size,
+ );
block_flow.base.block_container_inline_size = self.border_box.size.inline;
block_flow.base.block_container_writing_mode = self.style.writing_mode;
- }
+ },
SpecificFragmentInfo::InlineAbsolute(ref mut info) => {
let block_flow = FlowRef::deref_mut(&mut info.flow_ref).as_mut_block();
- self.border_box.size.inline =
- max(block_flow.base.intrinsic_inline_sizes.minimum_inline_size,
- block_flow.base.intrinsic_inline_sizes.preferred_inline_size);
+ self.border_box.size.inline = max(
+ block_flow.base.intrinsic_inline_sizes.minimum_inline_size,
+ block_flow.base.intrinsic_inline_sizes.preferred_inline_size,
+ );
block_flow.base.block_container_inline_size = self.border_box.size.inline;
block_flow.base.block_container_writing_mode = self.style.writing_mode;
- }
+ },
// Text
SpecificFragmentInfo::TruncatedFragment(ref t) if t.text_info.is_some() => {
let info = t.text_info.as_ref().unwrap();
// Scanned text fragments will have already had their content inline-sizes assigned
// by this point.
- self.border_box.size.inline = info.content_size.inline +
- self.border_padding.inline_start_end();
- }
+ self.border_box.size.inline =
+ info.content_size.inline + self.border_padding.inline_start_end();
+ },
SpecificFragmentInfo::ScannedText(ref info) => {
// Scanned text fragments will have already had their content inline-sizes assigned
// by this point.
- self.border_box.size.inline = info.content_size.inline +
- self.border_padding.inline_start_end();
- }
+ self.border_box.size.inline =
+ info.content_size.inline + self.border_padding.inline_start_end();
+ },
// Replaced elements
_ if self.is_replaced() => {
- let (inline_size, block_size) =
- self.calculate_replaced_sizes(Some(container_inline_size), container_block_size);
+ let (inline_size, block_size) = self
+ .calculate_replaced_sizes(Some(container_inline_size), container_block_size);
self.border_box.size.inline = inline_size + self.border_padding.inline_start_end();
self.border_box.size.block = block_size + self.border_padding.block_start_end();
- }
+ },
- ref unhandled @ _ => panic!("this case should have been handled above: {:?}", unhandled),
+ ref unhandled @ _ => {
+ panic!("this case should have been handled above: {:?}", unhandled)
+ },
}
}
@@ -2008,10 +2089,10 @@ impl Fragment {
SpecificFragmentInfo::MulticolColumn => return,
SpecificFragmentInfo::TableColumn(_) => {
panic!("Table column fragments do not have block size")
- }
+ },
SpecificFragmentInfo::UnscannedText(_) => {
panic!("Unscanned text fragments should have been scanned by now!")
- }
+ },
SpecificFragmentInfo::Canvas(_) |
SpecificFragmentInfo::Iframe(_) |
SpecificFragmentInfo::Image(_) |
@@ -2020,7 +2101,7 @@ impl Fragment {
SpecificFragmentInfo::InlineAbsolute(_) |
SpecificFragmentInfo::ScannedText(_) |
SpecificFragmentInfo::TruncatedFragment(_) |
- SpecificFragmentInfo::Svg(_) => {}
+ SpecificFragmentInfo::Svg(_) => {},
}
match self.specific {
@@ -2029,15 +2110,15 @@ impl Fragment {
let info = t.text_info.as_ref().unwrap();
// Scanned text fragments' content block-sizes are calculated by the text run
// scanner during flow construction.
- self.border_box.size.block = info.content_size.block +
- self.border_padding.block_start_end();
- }
+ self.border_box.size.block =
+ info.content_size.block + self.border_padding.block_start_end();
+ },
SpecificFragmentInfo::ScannedText(ref info) => {
// Scanned text fragments' content block-sizes are calculated by the text run
// scanner during flow construction.
- self.border_box.size.block = info.content_size.block +
- self.border_padding.block_start_end();
- }
+ self.border_box.size.block =
+ info.content_size.block + self.border_padding.block_start_end();
+ },
// Inline blocks
SpecificFragmentInfo::InlineBlock(ref mut info) => {
@@ -2045,18 +2126,18 @@ impl Fragment {
let block_flow = FlowRef::deref_mut(&mut info.flow_ref).as_block();
self.border_box.size.block = block_flow.base.position.size.block +
block_flow.fragment.margin.block_start_end()
- }
+ },
SpecificFragmentInfo::InlineAbsoluteHypothetical(ref mut info) => {
// Not the primary fragment, so we do not take the noncontent size into account.
let block_flow = FlowRef::deref_mut(&mut info.flow_ref).as_block();
self.border_box.size.block = block_flow.base.position.size.block;
- }
+ },
SpecificFragmentInfo::InlineAbsolute(ref mut info) => {
// Not the primary fragment, so we do not take the noncontent size into account.
let block_flow = FlowRef::deref_mut(&mut info.flow_ref).as_block();
self.border_box.size.block = block_flow.base.position.size.block +
block_flow.fragment.margin.block_start_end()
- }
+ },
// Replaced elements
_ if self.is_replaced() => {},
@@ -2072,7 +2153,7 @@ impl Fragment {
SpecificFragmentInfo::Canvas(_) |
SpecificFragmentInfo::Image(_) |
SpecificFragmentInfo::Svg(_) => true,
- _ => false
+ _ => false,
}
}
@@ -2099,33 +2180,34 @@ impl Fragment {
// fragment types should end up inside inlines. (In the case of `GeneratedContent`, those
// fragment types should have been resolved by now…)
let inline_metrics = match self.specific {
- SpecificFragmentInfo::Canvas(_) | SpecificFragmentInfo::Iframe(_) |
- SpecificFragmentInfo::Image(_) | SpecificFragmentInfo::Svg(_) |
- SpecificFragmentInfo::Generic | SpecificFragmentInfo::GeneratedContent(_) => {
+ SpecificFragmentInfo::Canvas(_) |
+ SpecificFragmentInfo::Iframe(_) |
+ SpecificFragmentInfo::Image(_) |
+ SpecificFragmentInfo::Svg(_) |
+ SpecificFragmentInfo::Generic |
+ SpecificFragmentInfo::GeneratedContent(_) => {
let ascent = self.border_box.size.block + self.margin.block_end;
InlineMetrics {
space_above_baseline: ascent + self.margin.block_start,
space_below_baseline: Au(0),
ascent: ascent,
}
- }
+ },
SpecificFragmentInfo::TruncatedFragment(ref t) if t.text_info.is_some() => {
let info = t.text_info.as_ref().unwrap();
inline_metrics_of_text(info, self, layout_context)
- }
+ },
SpecificFragmentInfo::ScannedText(ref info) => {
inline_metrics_of_text(info, self, layout_context)
- }
+ },
SpecificFragmentInfo::InlineBlock(ref info) => {
inline_metrics_of_block(&info.flow_ref, &*self.style)
- }
+ },
SpecificFragmentInfo::InlineAbsoluteHypothetical(ref info) => {
inline_metrics_of_block(&info.flow_ref, &*self.style)
- }
+ },
SpecificFragmentInfo::TruncatedFragment(..) |
- SpecificFragmentInfo::InlineAbsolute(_) => {
- InlineMetrics::new(Au(0), Au(0), Au(0))
- }
+ SpecificFragmentInfo::InlineAbsolute(_) => InlineMetrics::new(Au(0), Au(0), Au(0)),
SpecificFragmentInfo::Table |
SpecificFragmentInfo::TableCell |
SpecificFragmentInfo::TableColumn(_) |
@@ -2135,12 +2217,15 @@ impl Fragment {
SpecificFragmentInfo::MulticolColumn |
SpecificFragmentInfo::UnscannedText(_) => {
unreachable!("Shouldn't see fragments of this type here!")
- }
+ },
};
return inline_metrics;
- fn inline_metrics_of_text(info: &ScannedTextFragmentInfo, self_: &Fragment,
- layout_context: &LayoutContext) -> InlineMetrics {
+ fn inline_metrics_of_text(
+ info: &ScannedTextFragmentInfo,
+ self_: &Fragment,
+ layout_context: &LayoutContext,
+ ) -> InlineMetrics {
// Fragments with no glyphs don't contribute any inline metrics.
// TODO: Filter out these fragments during flow construction?
if info.insertion_point.is_none() && info.content_size.inline == Au(0) {
@@ -2186,9 +2271,10 @@ impl Fragment {
// § 10.8.1 says that the baseline (and thus ascent, which is the
// distance from the baseline to the top) should be A if it has an
// in-flow line box and if overflow: visible, and B otherwise.
- let ascent =
- match (flow.baseline_offset_of_last_line_box_in_flow(),
- style.get_box().overflow_y) {
+ let ascent = match (
+ flow.baseline_offset_of_last_line_box_in_flow(),
+ style.get_box().overflow_y,
+ ) {
// Case A
(Some(baseline_offset), StyleOverflow::Visible) => baseline_offset,
// Case B
@@ -2208,12 +2294,13 @@ impl Fragment {
/// If `actual_line_metrics` is supplied, then these metrics are used to determine the
/// displacement of the fragment when `top` or `bottom` `vertical-align` values are
/// encountered. If this is not supplied, then `top` and `bottom` values are ignored.
- fn vertical_alignment_offset(&self,
- layout_context: &LayoutContext,
- content_inline_metrics: &InlineMetrics,
- minimum_line_metrics: &LineMetrics,
- actual_line_metrics: Option<&LineMetrics>)
- -> Au {
+ fn vertical_alignment_offset(
+ &self,
+ layout_context: &LayoutContext,
+ content_inline_metrics: &InlineMetrics,
+ minimum_line_metrics: &LineMetrics,
+ actual_line_metrics: Option<&LineMetrics>,
+ ) -> Au {
let mut offset = Au(0);
for style in self.inline_styles() {
// If any of the inline styles say `top` or `bottom`, adjust the vertical align
@@ -2222,52 +2309,59 @@ impl Fragment {
// FIXME(#5624, pcwalton): This passes our current reftests but isn't the right thing
// to do.
match style.get_box().vertical_align {
- VerticalAlign::Baseline => {}
+ VerticalAlign::Baseline => {},
VerticalAlign::Middle => {
- let font_metrics = with_thread_local_font_context(layout_context, |font_context| {
- text::font_metrics_for_style(font_context, self.style.clone_font())
- });
+ let font_metrics =
+ with_thread_local_font_context(layout_context, |font_context| {
+ text::font_metrics_for_style(font_context, self.style.clone_font())
+ });
offset += (content_inline_metrics.ascent -
- content_inline_metrics.space_below_baseline -
- font_metrics.x_height).scale_by(0.5)
- }
+ content_inline_metrics.space_below_baseline -
+ font_metrics.x_height)
+ .scale_by(0.5)
+ },
VerticalAlign::Sub => {
- offset += minimum_line_metrics.space_needed()
- .scale_by(FONT_SUBSCRIPT_OFFSET_RATIO)
- }
+ offset += minimum_line_metrics
+ .space_needed()
+ .scale_by(FONT_SUBSCRIPT_OFFSET_RATIO)
+ },
VerticalAlign::Super => {
- offset -= minimum_line_metrics.space_needed()
- .scale_by(FONT_SUPERSCRIPT_OFFSET_RATIO)
- }
+ offset -= minimum_line_metrics
+ .space_needed()
+ .scale_by(FONT_SUPERSCRIPT_OFFSET_RATIO)
+ },
VerticalAlign::TextTop => {
offset = self.content_inline_metrics(layout_context).ascent -
minimum_line_metrics.space_above_baseline
- }
+ },
VerticalAlign::TextBottom => {
- offset = minimum_line_metrics.space_below_baseline -
- self.content_inline_metrics(layout_context).space_below_baseline
- }
+ offset = minimum_line_metrics.space_below_baseline - self
+ .content_inline_metrics(layout_context)
+ .space_below_baseline
+ },
VerticalAlign::Top => {
if let Some(actual_line_metrics) = actual_line_metrics {
- offset = content_inline_metrics.ascent -
- actual_line_metrics.space_above_baseline
+ offset =
+ content_inline_metrics.ascent - actual_line_metrics.space_above_baseline
}
- }
+ },
VerticalAlign::Bottom => {
if let Some(actual_line_metrics) = actual_line_metrics {
offset = actual_line_metrics.space_below_baseline -
content_inline_metrics.space_below_baseline
}
- }
+ },
VerticalAlign::Length(LengthOrPercentage::Length(length)) => {
offset -= Au::from(length)
- }
+ },
VerticalAlign::Length(LengthOrPercentage::Percentage(percentage)) => {
offset -= minimum_line_metrics.space_needed().scale_by(percentage.0)
- }
+ },
VerticalAlign::Length(LengthOrPercentage::Calc(formula)) => {
- offset -= formula.to_used_value(Some(minimum_line_metrics.space_needed())).unwrap()
- }
+ offset -= formula
+ .to_used_value(Some(minimum_line_metrics.space_needed()))
+ .unwrap()
+ },
}
}
offset
@@ -2280,23 +2374,26 @@ impl Fragment {
/// If `actual_line_metrics` is supplied, then these metrics are used to determine the
/// displacement of the fragment when `top` or `bottom` `vertical-align` values are
/// encountered. If this is not supplied, then `top` and `bottom` values are ignored.
- pub fn aligned_inline_metrics(&self,
- layout_context: &LayoutContext,
- minimum_line_metrics: &LineMetrics,
- actual_line_metrics: Option<&LineMetrics>)
- -> InlineMetrics {
+ pub fn aligned_inline_metrics(
+ &self,
+ layout_context: &LayoutContext,
+ minimum_line_metrics: &LineMetrics,
+ actual_line_metrics: Option<&LineMetrics>,
+ ) -> InlineMetrics {
let content_inline_metrics = self.content_inline_metrics(layout_context);
- let vertical_alignment_offset = self.vertical_alignment_offset(layout_context,
- &content_inline_metrics,
- minimum_line_metrics,
- actual_line_metrics);
+ let vertical_alignment_offset = self.vertical_alignment_offset(
+ layout_context,
+ &content_inline_metrics,
+ minimum_line_metrics,
+ actual_line_metrics,
+ );
let mut space_above_baseline = match actual_line_metrics {
None => content_inline_metrics.space_above_baseline,
Some(actual_line_metrics) => actual_line_metrics.space_above_baseline,
};
space_above_baseline = space_above_baseline - vertical_alignment_offset;
- let space_below_baseline = content_inline_metrics.space_below_baseline +
- vertical_alignment_offset;
+ let space_below_baseline =
+ content_inline_metrics.space_below_baseline + vertical_alignment_offset;
let ascent = content_inline_metrics.ascent - vertical_alignment_offset;
InlineMetrics::new(space_above_baseline, space_below_baseline, ascent)
}
@@ -2313,37 +2410,45 @@ impl Fragment {
/// false otherwise.
pub fn can_merge_with_fragment(&self, other: &Fragment) -> bool {
match (&self.specific, &other.specific) {
- (&SpecificFragmentInfo::UnscannedText(ref first_unscanned_text),
- &SpecificFragmentInfo::UnscannedText(_)) => {
+ (
+ &SpecificFragmentInfo::UnscannedText(ref first_unscanned_text),
+ &SpecificFragmentInfo::UnscannedText(_),
+ ) => {
// FIXME: Should probably use a whitelist of styles that can safely differ (#3165)
if self.style().get_font() != other.style().get_font() ||
- self.text_decoration_line() != other.text_decoration_line() ||
- self.white_space() != other.white_space() ||
- self.color() != other.color() {
- return false
+ self.text_decoration_line() != other.text_decoration_line() ||
+ self.white_space() != other.white_space() ||
+ self.color() != other.color()
+ {
+ return false;
}
if first_unscanned_text.text.ends_with('\n') {
- return false
+ return false;
}
// If this node has any styles that have border/padding/margins on the following
// side, then we can't merge with the next fragment.
if let Some(ref inline_context) = self.inline_context {
for inline_context_node in inline_context.nodes.iter() {
- if !inline_context_node.flags.contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT) {
- continue
+ if !inline_context_node
+ .flags
+ .contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT)
+ {
+ continue;
}
if inline_context_node.style.logical_margin().inline_end !=
- LengthOrPercentageOrAuto::Length(Length::new(0.)) {
- return false
+ LengthOrPercentageOrAuto::Length(Length::new(0.))
+ {
+ return false;
}
if inline_context_node.style.logical_padding().inline_end !=
- LengthOrPercentage::Length(Length::new(0.)) {
- return false
+ LengthOrPercentage::Length(Length::new(0.))
+ {
+ return false;
}
if inline_context_node.style.logical_border_width().inline_end != Au(0) {
- return false
+ return false;
}
}
}
@@ -2352,25 +2457,35 @@ impl Fragment {
// preceding side, then it can't merge with us.
if let Some(ref inline_context) = other.inline_context {
for inline_context_node in inline_context.nodes.iter() {
- if !inline_context_node.flags.contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT) {
- continue
+ if !inline_context_node
+ .flags
+ .contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT)
+ {
+ continue;
}
if inline_context_node.style.logical_margin().inline_start !=
- LengthOrPercentageOrAuto::Length(Length::new(0.)) {
- return false
+ LengthOrPercentageOrAuto::Length(Length::new(0.))
+ {
+ return false;
}
if inline_context_node.style.logical_padding().inline_start !=
- LengthOrPercentage::Length(Length::new(0.)) {
- return false
+ LengthOrPercentage::Length(Length::new(0.))
+ {
+ return false;
}
- if inline_context_node.style.logical_border_width().inline_start != Au(0) {
- return false
+ if inline_context_node
+ .style
+ .logical_border_width()
+ .inline_start !=
+ Au(0)
+ {
+ return false;
}
}
}
true
- }
+ },
_ => false,
}
}
@@ -2450,17 +2565,20 @@ impl Fragment {
///
/// This is the method you should use for display list construction as well as
/// `getBoundingClientRect()` and so forth.
- pub fn stacking_relative_border_box(&self,
- stacking_relative_flow_origin: &Vector2D<Au>,
- relative_containing_block_size: &LogicalSize<Au>,
- relative_containing_block_mode: WritingMode,
- coordinate_system: CoordinateSystem)
- -> Rect<Au> {
+ pub fn stacking_relative_border_box(
+ &self,
+ stacking_relative_flow_origin: &Vector2D<Au>,
+ relative_containing_block_size: &LogicalSize<Au>,
+ relative_containing_block_mode: WritingMode,
+ coordinate_system: CoordinateSystem,
+ ) -> Rect<Au> {
let container_size =
relative_containing_block_size.to_physical(relative_containing_block_mode);
- let border_box = self.border_box.to_physical(self.style.writing_mode, container_size);
+ let border_box = self
+ .border_box
+ .to_physical(self.style.writing_mode, container_size);
if coordinate_system == CoordinateSystem::Own && self.establishes_stacking_context() {
- return Rect::new(Point2D::zero(), border_box.size)
+ return Rect::new(Point2D::zero(), border_box.size);
}
// FIXME(pcwalton): This can double-count relative position sometimes for inlines (e.g.
@@ -2468,32 +2586,41 @@ impl Fragment {
// to the inline flow. Possibly we should extend the notion of "primary fragment" to fix
// this.
let relative_position = self.relative_position(relative_containing_block_size);
- border_box.translate_by_size(&relative_position.to_physical(self.style.writing_mode))
- .translate(&stacking_relative_flow_origin)
+ border_box
+ .translate_by_size(&relative_position.to_physical(self.style.writing_mode))
+ .translate(&stacking_relative_flow_origin)
}
/// Given the stacking-context-relative border box, returns the stacking-context-relative
/// content box.
- pub fn stacking_relative_content_box(&self, stacking_relative_border_box: Rect<Au>)
- -> Rect<Au> {
+ pub fn stacking_relative_content_box(
+ &self,
+ stacking_relative_border_box: Rect<Au>,
+ ) -> Rect<Au> {
let border_padding = self.border_padding.to_physical(self.style.writing_mode);
- Rect::new(Point2D::new(stacking_relative_border_box.origin.x + border_padding.left,
- stacking_relative_border_box.origin.y + border_padding.top),
- Size2D::new(stacking_relative_border_box.size.width - border_padding.horizontal(),
- stacking_relative_border_box.size.height - border_padding.vertical()))
+ Rect::new(
+ Point2D::new(
+ stacking_relative_border_box.origin.x + border_padding.left,
+ stacking_relative_border_box.origin.y + border_padding.top,
+ ),
+ Size2D::new(
+ stacking_relative_border_box.size.width - border_padding.horizontal(),
+ stacking_relative_border_box.size.height - border_padding.vertical(),
+ ),
+ )
}
/// Returns true if this fragment may establish a reference frame.
pub fn can_establish_reference_frame(&self) -> bool {
- !self.style().get_box().transform.0.is_empty() ||
- self.style().get_box().perspective != Perspective::None
+ !self.style().get_box().transform.0.is_empty() ||
+ self.style().get_box().perspective != Perspective::None
}
/// Returns true if this fragment has a filter, transform, or perspective property set.
pub fn has_filter_transform_or_perspective(&self) -> bool {
- !self.style().get_box().transform.0.is_empty() ||
- !self.style().get_effects().filter.0.is_empty() ||
- self.style().get_box().perspective != Perspective::None
+ !self.style().get_box().transform.0.is_empty() ||
+ !self.style().get_effects().filter.0.is_empty() ||
+ self.style().get_box().perspective != Perspective::None
}
/// Returns true if this fragment establishes a new stacking context and false otherwise.
@@ -2503,15 +2630,15 @@ impl Fragment {
SpecificFragmentInfo::TruncatedFragment(_) |
SpecificFragmentInfo::ScannedText(_) |
SpecificFragmentInfo::UnscannedText(_) => return false,
- _ => {}
+ _ => {},
}
if self.style().get_effects().opacity != 1.0 {
- return true
+ return true;
}
if self.style().get_effects().mix_blend_mode != MixBlendMode::Normal {
- return true
+ return true;
}
if self.has_filter_transform_or_perspective() {
@@ -2519,14 +2646,16 @@ impl Fragment {
}
if self.style().get_box().transform_style == TransformStyle::Preserve3d ||
- self.style().overrides_transform_style() {
- return true
+ self.style().overrides_transform_style()
+ {
+ return true;
}
// Fixed position and sticky position always create stacking contexts.
if self.style().get_box().position == Position::Fixed ||
- self.style().get_box().position == Position::Sticky {
- return true
+ self.style().get_box().position == Position::Sticky
+ {
+ return true;
}
// Statically positioned fragments don't establish stacking contexts if the previous
@@ -2562,11 +2691,14 @@ impl Fragment {
}
/// Computes the overflow rect of this fragment relative to the start of the flow.
- pub fn compute_overflow(&self,
- flow_size: &Size2D<Au>,
- relative_containing_block_size: &LogicalSize<Au>)
- -> Overflow {
- let mut border_box = self.border_box.to_physical(self.style.writing_mode, *flow_size);
+ pub fn compute_overflow(
+ &self,
+ flow_size: &Size2D<Au>,
+ relative_containing_block_size: &LogicalSize<Au>,
+ ) -> Overflow {
+ let mut border_box = self
+ .border_box
+ .to_physical(self.style.writing_mode, *flow_size);
// Relative position can cause us to draw outside our border box.
//
@@ -2579,19 +2711,23 @@ impl Fragment {
// Box shadows cause us to draw outside our border box.
for box_shadow in &self.style().get_effects().box_shadow.0 {
- let offset = Vector2D::new(Au::from(box_shadow.base.horizontal),
- Au::from(box_shadow.base.vertical));
+ let offset = Vector2D::new(
+ Au::from(box_shadow.base.horizontal),
+ Au::from(box_shadow.base.vertical),
+ );
let inflation = Au::from(box_shadow.spread) +
- Au::from(box_shadow.base.blur) * BLUR_INFLATION_FACTOR;
- overflow.paint = overflow.paint.union(&border_box.translate(&offset)
- .inflate(inflation, inflation))
+ Au::from(box_shadow.base.blur) * BLUR_INFLATION_FACTOR;
+ overflow.paint = overflow
+ .paint
+ .union(&border_box.translate(&offset).inflate(inflation, inflation))
}
// Outlines cause us to draw outside our border box.
let outline_width = Au::from(self.style.get_outline().outline_width);
if outline_width != Au(0) {
- overflow.paint = overflow.paint.union(&border_box.inflate(outline_width,
- outline_width))
+ overflow.paint = overflow
+ .paint
+ .union(&border_box.inflate(outline_width, outline_width))
}
// Include the overflow of the block flow, if any.
@@ -2599,11 +2735,11 @@ impl Fragment {
SpecificFragmentInfo::InlineBlock(ref info) => {
let block_flow = info.flow_ref.as_block();
overflow.union(&block_flow.base().overflow);
- }
+ },
SpecificFragmentInfo::InlineAbsolute(ref info) => {
let block_flow = info.flow_ref.as_block();
overflow.union(&block_flow.base().overflow);
- }
+ },
_ => (),
}
@@ -2617,72 +2753,79 @@ impl Fragment {
SpecificFragmentInfo::TruncatedFragment(ref t) if t.text_info.is_some() => {
let text = t.text_info.as_ref().unwrap();
text.requires_line_break_afterward_if_wrapping_on_newlines()
- }
+ },
SpecificFragmentInfo::ScannedText(ref text) => {
text.requires_line_break_afterward_if_wrapping_on_newlines()
- }
+ },
_ => false,
}
}
pub fn strip_leading_whitespace_if_necessary(&mut self) -> WhitespaceStrippingResult {
if self.white_space().preserve_spaces() {
- return WhitespaceStrippingResult::RetainFragment
+ return WhitespaceStrippingResult::RetainFragment;
}
return match self.specific {
SpecificFragmentInfo::TruncatedFragment(ref mut t) if t.text_info.is_some() => {
let scanned_text_fragment_info = t.text_info.as_mut().unwrap();
scanned_text(scanned_text_fragment_info, &mut self.border_box)
- }
+ },
SpecificFragmentInfo::ScannedText(ref mut scanned_text_fragment_info) => {
scanned_text(scanned_text_fragment_info, &mut self.border_box)
- }
+ },
SpecificFragmentInfo::UnscannedText(ref mut unscanned_text_fragment_info) => {
let mut new_text_string = String::new();
let mut modified = false;
for (i, character) in unscanned_text_fragment_info.text.char_indices() {
if gfx::text::util::is_bidi_control(character) {
new_text_string.push(character);
- continue
+ continue;
}
if char_is_whitespace(character) {
modified = true;
- continue
+ continue;
}
// Finished processing leading control chars and whitespace.
if modified {
new_text_string.push_str(&unscanned_text_fragment_info.text[i..]);
}
- break
+ break;
}
if modified {
unscanned_text_fragment_info.text = new_text_string.into_boxed_str();
}
WhitespaceStrippingResult::from_unscanned_text_fragment_info(
- &unscanned_text_fragment_info)
- }
+ &unscanned_text_fragment_info,
+ )
+ },
_ => WhitespaceStrippingResult::RetainFragment,
};
- fn scanned_text(scanned_text_fragment_info: &mut ScannedTextFragmentInfo,
- border_box: &mut LogicalRect<Au>)
- -> WhitespaceStrippingResult {
- let leading_whitespace_byte_count = scanned_text_fragment_info.text()
+ fn scanned_text(
+ scanned_text_fragment_info: &mut ScannedTextFragmentInfo,
+ border_box: &mut LogicalRect<Au>,
+ ) -> WhitespaceStrippingResult {
+ let leading_whitespace_byte_count = scanned_text_fragment_info
+ .text()
.find(|c| !char_is_whitespace(c))
.unwrap_or(scanned_text_fragment_info.text().len());
let whitespace_len = ByteIndex(leading_whitespace_byte_count as isize);
- let whitespace_range = Range::new(scanned_text_fragment_info.range.begin(),
- whitespace_len);
- let text_bounds =
- scanned_text_fragment_info.run.metrics_for_range(&whitespace_range).bounding_box;
+ let whitespace_range =
+ Range::new(scanned_text_fragment_info.range.begin(), whitespace_len);
+ let text_bounds = scanned_text_fragment_info
+ .run
+ .metrics_for_range(&whitespace_range)
+ .bounding_box;
border_box.size.inline = border_box.size.inline - text_bounds.size.width;
scanned_text_fragment_info.content_size.inline =
scanned_text_fragment_info.content_size.inline - text_bounds.size.width;
- scanned_text_fragment_info.range.adjust_by(whitespace_len, -whitespace_len);
+ scanned_text_fragment_info
+ .range
+ .adjust_by(whitespace_len, -whitespace_len);
WhitespaceStrippingResult::RetainFragment
}
@@ -2691,31 +2834,31 @@ impl Fragment {
/// Returns true if the entire fragment was stripped.
pub fn strip_trailing_whitespace_if_necessary(&mut self) -> WhitespaceStrippingResult {
if self.white_space().preserve_spaces() {
- return WhitespaceStrippingResult::RetainFragment
+ return WhitespaceStrippingResult::RetainFragment;
}
return match self.specific {
SpecificFragmentInfo::TruncatedFragment(ref mut t) if t.text_info.is_some() => {
let scanned_text_fragment_info = t.text_info.as_mut().unwrap();
scanned_text(scanned_text_fragment_info, &mut self.border_box)
- }
+ },
SpecificFragmentInfo::ScannedText(ref mut scanned_text_fragment_info) => {
scanned_text(scanned_text_fragment_info, &mut self.border_box)
- }
+ },
SpecificFragmentInfo::UnscannedText(ref mut unscanned_text_fragment_info) => {
let mut trailing_bidi_control_characters_to_retain = Vec::new();
let (mut modified, mut last_character_index) = (true, 0);
for (i, character) in unscanned_text_fragment_info.text.char_indices().rev() {
if gfx::text::util::is_bidi_control(character) {
trailing_bidi_control_characters_to_retain.push(character);
- continue
+ continue;
}
if char_is_whitespace(character) {
modified = true;
- continue
+ continue;
}
last_character_index = i + character.len_utf8();
- break
+ break;
}
if modified {
let mut text = unscanned_text_fragment_info.text.to_string();
@@ -2727,34 +2870,37 @@ impl Fragment {
}
WhitespaceStrippingResult::from_unscanned_text_fragment_info(
- &unscanned_text_fragment_info)
- }
+ &unscanned_text_fragment_info,
+ )
+ },
_ => WhitespaceStrippingResult::RetainFragment,
};
- fn scanned_text(scanned_text_fragment_info: &mut ScannedTextFragmentInfo,
- border_box: &mut LogicalRect<Au>)
- -> WhitespaceStrippingResult {
- let mut trailing_whitespace_start_byte = 0;
- for (i, c) in scanned_text_fragment_info.text().char_indices().rev() {
- if !char_is_whitespace(c) {
- trailing_whitespace_start_byte = i + c.len_utf8();
- break;
- }
+ fn scanned_text(
+ scanned_text_fragment_info: &mut ScannedTextFragmentInfo,
+ border_box: &mut LogicalRect<Au>,
+ ) -> WhitespaceStrippingResult {
+ let mut trailing_whitespace_start_byte = 0;
+ for (i, c) in scanned_text_fragment_info.text().char_indices().rev() {
+ if !char_is_whitespace(c) {
+ trailing_whitespace_start_byte = i + c.len_utf8();
+ break;
}
- let whitespace_start = ByteIndex(trailing_whitespace_start_byte as isize);
- let whitespace_len = scanned_text_fragment_info.range.length() - whitespace_start;
- let mut whitespace_range = Range::new(whitespace_start, whitespace_len);
- whitespace_range.shift_by(scanned_text_fragment_info.range.begin());
+ }
+ let whitespace_start = ByteIndex(trailing_whitespace_start_byte as isize);
+ let whitespace_len = scanned_text_fragment_info.range.length() - whitespace_start;
+ let mut whitespace_range = Range::new(whitespace_start, whitespace_len);
+ whitespace_range.shift_by(scanned_text_fragment_info.range.begin());
- let text_bounds = scanned_text_fragment_info.run
- .metrics_for_range(&whitespace_range)
- .bounding_box;
- border_box.size.inline -= text_bounds.size.width;
- scanned_text_fragment_info.content_size.inline -= text_bounds.size.width;
+ let text_bounds = scanned_text_fragment_info
+ .run
+ .metrics_for_range(&whitespace_range)
+ .bounding_box;
+ border_box.size.inline -= text_bounds.size.width;
+ scanned_text_fragment_info.content_size.inline -= text_bounds.size.width;
- scanned_text_fragment_info.range.extend_by(-whitespace_len);
- WhitespaceStrippingResult::RetainFragment
+ scanned_text_fragment_info.range.extend_by(-whitespace_len);
+ WhitespaceStrippingResult::RetainFragment
}
}
@@ -2771,12 +2917,12 @@ impl Fragment {
/// non-`static` `position`.
pub fn is_positioned(&self) -> bool {
if self.style.get_box().position != Position::Static {
- return true
+ return true;
}
if let Some(ref inline_context) = self.inline_context {
for node in inline_context.nodes.iter() {
if node.style.get_box().position != Position::Static {
- return true
+ return true;
}
}
}
@@ -2798,21 +2944,29 @@ impl Fragment {
pub fn meld_with_next_inline_fragment(&mut self, next_fragment: &Fragment) {
if let Some(ref mut inline_context_of_this_fragment) = self.inline_context {
if let Some(ref inline_context_of_next_fragment) = next_fragment.inline_context {
- for (inline_context_node_from_this_fragment,
- inline_context_node_from_next_fragment)
- in inline_context_of_this_fragment.nodes.iter_mut().rev()
- .zip(inline_context_of_next_fragment.nodes.iter().rev())
+ for (
+ inline_context_node_from_this_fragment,
+ inline_context_node_from_next_fragment,
+ ) in inline_context_of_this_fragment
+ .nodes
+ .iter_mut()
+ .rev()
+ .zip(inline_context_of_next_fragment.nodes.iter().rev())
{
- if !inline_context_node_from_next_fragment.flags.contains(
- InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT) {
- continue
+ if !inline_context_node_from_next_fragment
+ .flags
+ .contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT)
+ {
+ continue;
}
if inline_context_node_from_next_fragment.address !=
- inline_context_node_from_this_fragment.address {
- continue
+ inline_context_node_from_this_fragment.address
+ {
+ continue;
}
- inline_context_node_from_this_fragment.flags.insert(
- InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT);
+ inline_context_node_from_this_fragment
+ .flags
+ .insert(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT);
}
}
}
@@ -2821,21 +2975,29 @@ impl Fragment {
pub fn meld_with_prev_inline_fragment(&mut self, prev_fragment: &Fragment) {
if let Some(ref mut inline_context_of_this_fragment) = self.inline_context {
if let Some(ref inline_context_of_prev_fragment) = prev_fragment.inline_context {
- for (inline_context_node_from_prev_fragment,
- inline_context_node_from_this_fragment)
- in inline_context_of_prev_fragment.nodes.iter().rev().zip(
- inline_context_of_this_fragment.nodes.iter_mut().rev())
+ for (
+ inline_context_node_from_prev_fragment,
+ inline_context_node_from_this_fragment,
+ ) in inline_context_of_prev_fragment
+ .nodes
+ .iter()
+ .rev()
+ .zip(inline_context_of_this_fragment.nodes.iter_mut().rev())
{
- if !inline_context_node_from_prev_fragment.flags.contains(
- InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT) {
- continue
+ if !inline_context_node_from_prev_fragment
+ .flags
+ .contains(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT)
+ {
+ continue;
}
if inline_context_node_from_prev_fragment.address !=
- inline_context_node_from_this_fragment.address {
- continue
+ inline_context_node_from_this_fragment.address
+ {
+ continue;
}
- inline_context_node_from_this_fragment.flags.insert(
- InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT);
+ inline_context_node_from_this_fragment
+ .flags
+ .insert(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT);
}
}
}
@@ -2846,13 +3008,13 @@ impl Fragment {
pub fn is_vertically_aligned_to_top_or_bottom(&self) -> bool {
match self.style.get_box().vertical_align {
VerticalAlign::Top | VerticalAlign::Bottom => return true,
- _ => {}
+ _ => {},
}
if let Some(ref inline_context) = self.inline_context {
for node in &inline_context.nodes {
match node.style.get_box().vertical_align {
VerticalAlign::Top | VerticalAlign::Bottom => return true,
- _ => {}
+ _ => {},
}
}
}
@@ -2879,69 +3041,87 @@ impl Fragment {
SpecificFragmentInfo::ScannedText(_) |
SpecificFragmentInfo::TruncatedFragment(_) |
SpecificFragmentInfo::Svg(_) |
- SpecificFragmentInfo::UnscannedText(_) => true
+ SpecificFragmentInfo::UnscannedText(_) => true,
}
}
/// Returns the 4D matrix representing this fragment's transform.
- pub fn transform_matrix(&self, stacking_relative_border_box: &Rect<Au>) -> Option<LayoutTransform> {
+ pub fn transform_matrix(
+ &self,
+ stacking_relative_border_box: &Rect<Au>,
+ ) -> Option<LayoutTransform> {
let list = &self.style.get_box().transform;
let transform = LayoutTransform::from_untyped(
- &list.to_transform_3d_matrix(Some(stacking_relative_border_box)).ok()?.0);
+ &list
+ .to_transform_3d_matrix(Some(stacking_relative_border_box))
+ .ok()?
+ .0,
+ );
let transform_origin = &self.style.get_box().transform_origin;
- let transform_origin_x =
- transform_origin.horizontal
- .to_used_value(stacking_relative_border_box.size.width)
- .to_f32_px();
- let transform_origin_y =
- transform_origin.vertical
- .to_used_value(stacking_relative_border_box.size.height)
- .to_f32_px();
+ let transform_origin_x = transform_origin
+ .horizontal
+ .to_used_value(stacking_relative_border_box.size.width)
+ .to_f32_px();
+ let transform_origin_y = transform_origin
+ .vertical
+ .to_used_value(stacking_relative_border_box.size.height)
+ .to_f32_px();
let transform_origin_z = transform_origin.depth.px();
let pre_transform = LayoutTransform::create_translation(
transform_origin_x,
transform_origin_y,
- transform_origin_z);
+ transform_origin_z,
+ );
let post_transform = LayoutTransform::create_translation(
-transform_origin_x,
-transform_origin_y,
- -transform_origin_z);
+ -transform_origin_z,
+ );
Some(pre_transform.pre_mul(&transform).pre_mul(&post_transform))
}
/// Returns the 4D matrix representing this fragment's perspective.
- pub fn perspective_matrix(&self, stacking_relative_border_box: &Rect<Au>) -> Option<LayoutTransform> {
+ pub fn perspective_matrix(
+ &self,
+ stacking_relative_border_box: &Rect<Au>,
+ ) -> Option<LayoutTransform> {
match self.style().get_box().perspective {
Perspective::Length(length) => {
let perspective_origin = self.style().get_box().perspective_origin;
- let perspective_origin =
- Point2D::new(
- perspective_origin.horizontal
- .to_used_value(stacking_relative_border_box.size.width),
- perspective_origin.vertical
- .to_used_value(stacking_relative_border_box.size.height)
- ).to_layout();
+ let perspective_origin = Point2D::new(
+ perspective_origin
+ .horizontal
+ .to_used_value(stacking_relative_border_box.size.width),
+ perspective_origin
+ .vertical
+ .to_used_value(stacking_relative_border_box.size.height),
+ ).to_layout();
let pre_transform = LayoutTransform::create_translation(
perspective_origin.x,
perspective_origin.y,
- 0.0);
+ 0.0,
+ );
let post_transform = LayoutTransform::create_translation(
-perspective_origin.x,
-perspective_origin.y,
- 0.0);
+ 0.0,
+ );
let perspective_matrix = LayoutTransform::from_untyped(
- &transform::create_perspective_matrix(length.px()));
-
- Some(pre_transform.pre_mul(&perspective_matrix).pre_mul(&post_transform))
- }
- Perspective::None => {
- None
- }
+ &transform::create_perspective_matrix(length.px()),
+ );
+
+ Some(
+ pre_transform
+ .pre_mul(&perspective_matrix)
+ .pre_mul(&post_transform),
+ )
+ },
+ Perspective::None => None,
}
}
}
@@ -2966,14 +3146,17 @@ impl fmt::Debug for Fragment {
"".to_owned()
};
- write!(f, "\n{}({}) [{:?}]\nborder_box={:?}{}{}{}",
+ write!(
+ f,
+ "\n{}({}) [{:?}]\nborder_box={:?}{}{}{}",
self.specific.get_type(),
self.debug_id,
self.specific,
self.border_box,
border_padding_string,
margin_string,
- damage_string)
+ damage_string
+ )
}
}
@@ -3030,12 +3213,12 @@ impl<'a> Iterator for InlineStyleIterator<'a> {
fn next(&mut self) -> Option<&'a ComputedValues> {
if !self.primary_style_yielded {
self.primary_style_yielded = true;
- return Some(&*self.fragment.style)
+ return Some(&*self.fragment.style);
}
let inline_context = self.fragment.inline_context.as_ref()?;
let inline_style_index = self.inline_style_index;
if inline_style_index == inline_context.nodes.len() {
- return None
+ return None;
}
self.inline_style_index += 1;
Some(&*inline_context.nodes[inline_style_index].style)
@@ -3060,8 +3243,9 @@ pub enum WhitespaceStrippingResult {
}
impl WhitespaceStrippingResult {
- fn from_unscanned_text_fragment_info(info: &UnscannedTextFragmentInfo)
- -> WhitespaceStrippingResult {
+ fn from_unscanned_text_fragment_info(
+ info: &UnscannedTextFragmentInfo,
+ ) -> WhitespaceStrippingResult {
if info.text.is_empty() {
WhitespaceStrippingResult::FragmentContainedOnlyWhitespace
} else if info.text.chars().all(gfx::text::util::is_bidi_control) {
diff --git a/components/layout/generated_content.rs b/components/layout/generated_content.rs
index a006fdfa4b4..90341abe3d9 100644
--- a/components/layout/generated_content.rs
+++ b/components/layout/generated_content.rs
@@ -25,73 +25,103 @@ use text::TextRunScanner;
use traversal::InorderFlowTraversal;
// Decimal styles per CSS-COUNTER-STYLES § 6.1:
-static DECIMAL: [char; 10] = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ];
+static DECIMAL: [char; 10] = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
// TODO(pcwalton): `decimal-leading-zero`
-static ARABIC_INDIC: [char; 10] = [ '٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩' ];
+static ARABIC_INDIC: [char; 10] = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'];
// TODO(pcwalton): `armenian`, `upper-armenian`, `lower-armenian`
-static BENGALI: [char; 10] = [ '০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯' ];
-static CAMBODIAN: [char; 10] = [ '០', '១', '២', '៣', '៤', '៥', '៦', '៧', '៨', '៩' ];
+static BENGALI: [char; 10] = [
+ '০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯',
+];
+static CAMBODIAN: [char; 10] = [
+ '០', '១', '២', '៣', '៤', '៥', '៦', '៧', '៨', '៩',
+];
// TODO(pcwalton): Suffix for CJK decimal.
-static CJK_DECIMAL: [char; 10] = [ '〇', '一', '二', '三', '四', '五', '六', '七', '八', '九' ];
-static DEVANAGARI: [char; 10] = [ '०', '१', '२', '३', '४', '५', '६', '७', '८', '९' ];
+static CJK_DECIMAL: [char; 10] = [
+ '〇', '一', '二', '三', '四', '五', '六', '七', '八', '九',
+];
+static DEVANAGARI: [char; 10] = [
+ '०', '१', '२', '३', '४', '५', '६', '७', '८', '९',
+];
// TODO(pcwalton): `georgian`
-static GUJARATI: [char; 10] = ['૦', '૧', '૨', '૩', '૪', '૫', '૬', '૭', '૮', '૯'];
-static GURMUKHI: [char; 10] = ['੦', '੧', '੨', '੩', '੪', '੫', '੬', '੭', '੮', '੯'];
+static GUJARATI: [char; 10] = [
+ '૦', '૧', '૨', '૩', '૪', '૫', '૬', '૭', '૮', '૯',
+];
+static GURMUKHI: [char; 10] = [
+ '੦', '੧', '੨', '੩', '੪', '੫', '੬', '੭', '੮', '੯',
+];
// TODO(pcwalton): `hebrew`
-static KANNADA: [char; 10] = ['೦', '೧', '೨', '೩', '೪', '೫', '೬', '೭', '೮', '೯'];
-static LAO: [char; 10] = ['໐', '໑', '໒', '໓', '໔', '໕', '໖', '໗', '໘', '໙'];
-static MALAYALAM: [char; 10] = ['൦', '൧', '൨', '൩', '൪', '൫', '൬', '൭', '൮', '൯'];
-static MONGOLIAN: [char; 10] = ['᠐', '᠑', '᠒', '᠓', '᠔', '᠕', '᠖', '᠗', '᠘', '᠙'];
-static MYANMAR: [char; 10] = ['၀', '၁', '၂', '၃', '၄', '၅', '၆', '၇', '၈', '၉'];
-static ORIYA: [char; 10] = ['୦', '୧', '୨', '୩', '୪', '୫', '୬', '୭', '୮', '୯'];
+static KANNADA: [char; 10] = [
+ '೦', '೧', '೨', '೩', '೪', '೫', '೬', '೭', '೮', '೯',
+];
+static LAO: [char; 10] = [
+ '໐', '໑', '໒', '໓', '໔', '໕', '໖', '໗', '໘', '໙',
+];
+static MALAYALAM: [char; 10] = [
+ '൦', '൧', '൨', '൩', '൪', '൫', '൬', '൭', '൮', '൯',
+];
+static MONGOLIAN: [char; 10] = [
+ '᠐', '᠑', '᠒', '᠓', '᠔', '᠕', '᠖', '᠗', '᠘', '᠙',
+];
+static MYANMAR: [char; 10] = [
+ '၀', '၁', '၂', '၃', '၄', '၅', '၆', '၇', '၈', '၉',
+];
+static ORIYA: [char; 10] = [
+ '୦', '୧', '୨', '୩', '୪', '୫', '୬', '୭', '୮', '୯',
+];
static PERSIAN: [char; 10] = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
// TODO(pcwalton): `lower-roman`, `upper-roman`
-static TELUGU: [char; 10] = ['౦', '౧', '౨', '౩', '౪', '౫', '౬', '౭', '౮', '౯'];
-static THAI: [char; 10] = ['๐', '๑', '๒', '๓', '๔', '๕', '๖', '๗', '๘', '๙'];
-static TIBETAN: [char; 10] = ['༠', '༡', '༢', '༣', '༤', '༥', '༦', '༧', '༨', '༩'];
+static TELUGU: [char; 10] = [
+ '౦', '౧', '౨', '౩', '౪', '౫', '౬', '౭', '౮', '౯',
+];
+static THAI: [char; 10] = [
+ '๐', '๑', '๒', '๓', '๔', '๕', '๖', '๗', '๘', '๙',
+];
+static TIBETAN: [char; 10] = [
+ '༠', '༡', '༢', '༣', '༤', '༥', '༦', '༧', '༨', '༩',
+];
// Alphabetic styles per CSS-COUNTER-STYLES § 6.2:
static LOWER_ALPHA: [char; 26] = [
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
- 't', 'u', 'v', 'w', 'x', 'y', 'z'
+ 't', 'u', 'v', 'w', 'x', 'y', 'z',
];
static UPPER_ALPHA: [char; 26] = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
- 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
+ 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
];
static CJK_EARTHLY_BRANCH: [char; 12] = [
- '子', '丑', '寅', '卯', '辰', '巳', '午', '未', '申', '酉', '戌', '亥'
+ '子', '丑', '寅', '卯', '辰', '巳', '午', '未', '申', '酉', '戌', '亥',
];
static CJK_HEAVENLY_STEM: [char; 10] = [
- '甲', '乙', '丙', '丁', '戊', '己', '庚', '辛', '壬', '癸'
+ '甲', '乙', '丙', '丁', '戊', '己', '庚', '辛', '壬', '癸',
];
static LOWER_GREEK: [char; 24] = [
- 'α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ',
- 'υ', 'φ', 'χ', 'ψ', 'ω'
+ 'α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π',
+ 'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω',
];
static HIRAGANA: [char; 48] = [
- 'あ', 'い', 'う', 'え', 'お', 'か', 'き', 'く', 'け', 'こ', 'さ', 'し', 'す', 'せ', 'そ',
- 'た', 'ち', 'つ', 'て', 'と', 'な', 'に', 'ぬ', 'ね', 'の', 'は', 'ひ', 'ふ', 'へ', 'ほ',
- 'ま', 'み', 'む', 'め', 'も', 'や', 'ゆ', 'よ', 'ら', 'り', 'る', 'れ', 'ろ',
- 'わ', 'ゐ', 'ゑ', 'を', 'ん'
+ 'あ', 'い', 'う', 'え', 'お', 'か', 'き', 'く', 'け', 'こ', 'さ', 'し', 'す',
+ 'せ', 'そ', 'た', 'ち', 'つ', 'て', 'と', 'な', 'に', 'ぬ', 'ね', 'の', 'は',
+ 'ひ', 'ふ', 'へ', 'ほ', 'ま', 'み', 'む', 'め', 'も', 'や', 'ゆ', 'よ', 'ら',
+ 'り', 'る', 'れ', 'ろ', 'わ', 'ゐ', 'ゑ', 'を', 'ん',
];
static HIRAGANA_IROHA: [char; 47] = [
- 'い', 'ろ', 'は', 'に', 'ほ', 'へ', 'と', 'ち', 'り', 'ぬ', 'る', 'を', 'わ', 'か', 'よ',
- 'た', 'れ', 'そ', 'つ', 'ね', 'な', 'ら', 'む', 'う', 'ゐ', 'の', 'お', 'く', 'や', 'ま',
- 'け', 'ふ', 'こ', 'え', 'て', 'あ', 'さ', 'き', 'ゆ', 'め', 'み', 'し', 'ゑ',
- 'ひ', 'も', 'せ', 'す'
+ 'い', 'ろ', 'は', 'に', 'ほ', 'へ', 'と', 'ち', 'り', 'ぬ', 'る', 'を', 'わ',
+ 'か', 'よ', 'た', 'れ', 'そ', 'つ', 'ね', 'な', 'ら', 'む', 'う', 'ゐ', 'の',
+ 'お', 'く', 'や', 'ま', 'け', 'ふ', 'こ', 'え', 'て', 'あ', 'さ', 'き', 'ゆ',
+ 'め', 'み', 'し', 'ゑ', 'ひ', 'も', 'せ', 'す',
];
static KATAKANA: [char; 48] = [
- 'ア', 'イ', 'ウ', 'エ', 'オ', 'カ', 'キ', 'ク', 'ケ', 'コ', 'サ', 'シ', 'ス', 'セ', 'ソ',
- 'タ', 'チ', 'ツ', 'テ', 'ト', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ', 'ヒ', 'フ', 'ヘ', 'ホ',
- 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', 'ラ', 'リ', 'ル', 'レ', 'ロ',
- 'ワ', 'ヰ', 'ヱ', 'ヲ', 'ン'
+ 'ア', 'イ', 'ウ', 'エ', 'オ', 'カ', 'キ', 'ク', 'ケ', 'コ', 'サ', 'シ', 'ス',
+ 'セ', 'ソ', 'タ', 'チ', 'ツ', 'テ', 'ト', 'ナ', 'ニ', 'ヌ', 'ネ', 'ノ', 'ハ',
+ 'ヒ', 'フ', 'ヘ', 'ホ', 'マ', 'ミ', 'ム', 'メ', 'モ', 'ヤ', 'ユ', 'ヨ', 'ラ',
+ 'リ', 'ル', 'レ', 'ロ', 'ワ', 'ヰ', 'ヱ', 'ヲ', 'ン',
];
static KATAKANA_IROHA: [char; 47] = [
- 'イ', 'ロ', 'ハ', 'ニ', 'ホ', 'ヘ', 'ト', 'チ', 'リ', 'ヌ', 'ル', 'ヲ', 'ワ', 'カ', 'ヨ',
- 'タ', 'レ', 'ソ', 'ツ', 'ネ', 'ナ', 'ラ', 'ム', 'ウ', 'ヰ', 'ノ', 'オ', 'ク', 'ヤ', 'マ',
- 'ケ', 'フ', 'コ', 'エ', 'テ', 'ア', 'サ', 'キ', 'ユ', 'メ', 'ミ', 'シ', 'ヱ',
- 'ヒ', 'モ', 'セ', 'ス'
+ 'イ', 'ロ', 'ハ', 'ニ', 'ホ', 'ヘ', 'ト', 'チ', 'リ', 'ヌ', 'ル', 'ヲ', 'ワ',
+ 'カ', 'ヨ', 'タ', 'レ', 'ソ', 'ツ', 'ネ', 'ナ', 'ラ', 'ム', 'ウ', 'ヰ', 'ノ',
+ 'オ', 'ク', 'ヤ', 'マ', 'ケ', 'フ', 'コ', 'エ', 'テ', 'ア', 'サ', 'キ', 'ユ',
+ 'メ', 'ミ', 'シ', 'ヱ', 'ヒ', 'モ', 'セ', 'ス',
];
/// The generated content resolution traversal.
@@ -132,8 +162,12 @@ impl<'a> InorderFlowTraversal for ResolveGeneratedContent<'a> {
#[inline]
fn should_process_subtree(&mut self, flow: &mut Flow) -> bool {
- flow.base().restyle_damage.intersects(ServoRestyleDamage::RESOLVE_GENERATED_CONTENT) ||
- flow.base().flags.intersects(FlowFlags::AFFECTS_COUNTERS | FlowFlags::HAS_COUNTER_AFFECTING_CHILDREN)
+ flow.base()
+ .restyle_damage
+ .intersects(ServoRestyleDamage::RESOLVE_GENERATED_CONTENT) ||
+ flow.base().flags.intersects(
+ FlowFlags::AFFECTS_COUNTERS | FlowFlags::HAS_COUNTER_AFFECTING_CHILDREN,
+ )
}
}
@@ -168,81 +202,97 @@ impl<'a, 'b> ResolveGeneratedContentFragmentMutator<'a, 'b> {
if let SpecificFragmentInfo::GeneratedContent(ref mut info) = fragment.specific {
info
} else {
- return
+ return;
};
match **info {
GeneratedContentInfo::ListItem => {
- new_info = self.traversal.list_item.render(self.traversal.layout_context,
- fragment.node,
- fragment.pseudo.clone(),
- fragment.style.clone(),
- list_style_type,
- RenderingMode::Suffix(".\u{00a0}"))
- }
+ new_info = self.traversal.list_item.render(
+ self.traversal.layout_context,
+ fragment.node,
+ fragment.pseudo.clone(),
+ fragment.style.clone(),
+ list_style_type,
+ RenderingMode::Suffix(".\u{00a0}"),
+ )
+ },
GeneratedContentInfo::Empty |
GeneratedContentInfo::ContentItem(ContentItem::String(_)) => {
// Nothing to do here.
- }
- GeneratedContentInfo::ContentItem(ContentItem::Counter(ref counter_name,
- counter_style)) => {
+ },
+ GeneratedContentInfo::ContentItem(ContentItem::Counter(
+ ref counter_name,
+ counter_style,
+ )) => {
let temporary_counter = Counter::new();
- let counter = self.traversal
+ let counter = self
+ .traversal
.counters
.get(&*counter_name.0)
.unwrap_or(&temporary_counter);
- new_info = counter.render(self.traversal.layout_context,
- fragment.node,
- fragment.pseudo.clone(),
- fragment.style.clone(),
- counter_style,
- RenderingMode::Plain)
- }
- GeneratedContentInfo::ContentItem(ContentItem::Counters(ref counter_name,
- ref separator,
- counter_style)) => {
+ new_info = counter.render(
+ self.traversal.layout_context,
+ fragment.node,
+ fragment.pseudo.clone(),
+ fragment.style.clone(),
+ counter_style,
+ RenderingMode::Plain,
+ )
+ },
+ GeneratedContentInfo::ContentItem(ContentItem::Counters(
+ ref counter_name,
+ ref separator,
+ counter_style,
+ )) => {
let temporary_counter = Counter::new();
- let counter = self.traversal
+ let counter = self
+ .traversal
.counters
.get(&*counter_name.0)
.unwrap_or(&temporary_counter);
- new_info = counter.render(self.traversal.layout_context,
- fragment.node,
- fragment.pseudo,
- fragment.style.clone(),
- counter_style,
- RenderingMode::All(&separator));
- }
+ new_info = counter.render(
+ self.traversal.layout_context,
+ fragment.node,
+ fragment.pseudo,
+ fragment.style.clone(),
+ counter_style,
+ RenderingMode::All(&separator),
+ );
+ },
GeneratedContentInfo::ContentItem(ContentItem::OpenQuote) => {
- new_info = render_text(self.traversal.layout_context,
- fragment.node,
- fragment.pseudo,
- fragment.style.clone(),
- self.quote(&*fragment.style, false));
+ new_info = render_text(
+ self.traversal.layout_context,
+ fragment.node,
+ fragment.pseudo,
+ fragment.style.clone(),
+ self.quote(&*fragment.style, false),
+ );
self.traversal.quote += 1
- }
+ },
GeneratedContentInfo::ContentItem(ContentItem::CloseQuote) => {
if self.traversal.quote >= 1 {
self.traversal.quote -= 1
}
- new_info = render_text(self.traversal.layout_context,
- fragment.node,
- fragment.pseudo,
- fragment.style.clone(),
- self.quote(&*fragment.style, true));
- }
+ new_info = render_text(
+ self.traversal.layout_context,
+ fragment.node,
+ fragment.pseudo,
+ fragment.style.clone(),
+ self.quote(&*fragment.style, true),
+ );
+ },
GeneratedContentInfo::ContentItem(ContentItem::NoOpenQuote) => {
self.traversal.quote += 1
- }
+ },
GeneratedContentInfo::ContentItem(ContentItem::NoCloseQuote) => {
if self.traversal.quote >= 1 {
self.traversal.quote -= 1
}
- }
+ },
GeneratedContentInfo::ContentItem(ContentItem::Url(..)) => {
unreachable!("Servo doesn't parse content: url(..) yet")
- }
+ },
}
};
@@ -252,7 +302,7 @@ impl<'a, 'b> ResolveGeneratedContentFragmentMutator<'a, 'b> {
// so that it isn't processed again on the next layout. FIXME (mbrubeck): When
// processing an inline flow, this traversal should be allowed to insert or remove
// fragments. Then we can just remove these fragments rather than adding placeholders.
- None => SpecificFragmentInfo::GeneratedContent(Box::new(GeneratedContentInfo::Empty))
+ None => SpecificFragmentInfo::GeneratedContent(Box::new(GeneratedContentInfo::Empty)),
};
}
@@ -263,9 +313,12 @@ impl<'a, 'b> ResolveGeneratedContentFragmentMutator<'a, 'b> {
}
match list_style_type {
- ListStyleType::Disc | ListStyleType::None | ListStyleType::Circle |
- ListStyleType::Square | ListStyleType::DisclosureOpen |
- ListStyleType::DisclosureClosed => {}
+ ListStyleType::Disc |
+ ListStyleType::None |
+ ListStyleType::Circle |
+ ListStyleType::Square |
+ ListStyleType::DisclosureOpen |
+ ListStyleType::DisclosureClosed => {},
_ => self.traversal.list_item.increment(self.level, 1),
}
@@ -278,25 +331,29 @@ impl<'a, 'b> ResolveGeneratedContentFragmentMutator<'a, 'b> {
for pair in &*fragment.style().get_counters().counter_reset {
let counter_name = &*pair.name.0;
if let Some(ref mut counter) = self.traversal.counters.get_mut(counter_name) {
- counter.reset(self.level, pair.value);
- continue
+ counter.reset(self.level, pair.value);
+ continue;
}
let mut counter = Counter::new();
counter.reset(self.level, pair.value);
- self.traversal.counters.insert(counter_name.to_owned(), counter);
+ self.traversal
+ .counters
+ .insert(counter_name.to_owned(), counter);
}
for pair in &*fragment.style().get_counters().counter_increment {
let counter_name = &*pair.name.0;
if let Some(ref mut counter) = self.traversal.counters.get_mut(counter_name) {
counter.increment(self.level, pair.value);
- continue
+ continue;
}
let mut counter = Counter::new();
counter.increment(self.level, pair.value);
- self.traversal.counters.insert(counter_name.to_owned(), counter);
+ self.traversal
+ .counters
+ .insert(counter_name.to_owned(), counter);
}
self.incremented = true
@@ -305,14 +362,14 @@ impl<'a, 'b> ResolveGeneratedContentFragmentMutator<'a, 'b> {
fn quote(&self, style: &ComputedValues, close: bool) -> String {
let quotes = &style.get_list().quotes;
if quotes.0.is_empty() {
- return String::new()
+ return String::new();
}
- let &(ref open_quote, ref close_quote) =
- if self.traversal.quote as usize >= quotes.0.len() {
- quotes.0.last().unwrap()
- } else {
- &quotes.0[self.traversal.quote as usize]
- };
+ let &(ref open_quote, ref close_quote) = if self.traversal.quote as usize >= quotes.0.len()
+ {
+ quotes.0.last().unwrap()
+ } else {
+ &quotes.0[self.traversal.quote as usize]
+ };
if close {
close_quote.to_string()
} else {
@@ -329,9 +386,7 @@ struct Counter {
impl Counter {
fn new() -> Counter {
- Counter {
- values: Vec::new(),
- }
+ Counter { values: Vec::new() }
}
fn reset(&mut self, level: u32, value: i32) {
@@ -339,7 +394,7 @@ impl Counter {
if let Some(ref mut existing_value) = self.values.last_mut() {
if level == existing_value.level {
existing_value.value = value;
- return
+ return;
}
}
@@ -359,7 +414,7 @@ impl Counter {
fn increment(&mut self, level: u32, amount: i32) {
if let Some(ref mut value) = self.values.last_mut() {
value.value += amount;
- return
+ return;
}
self.values.push(CounterValue {
@@ -368,14 +423,15 @@ impl Counter {
})
}
- fn render(&self,
- layout_context: &LayoutContext,
- node: OpaqueNode,
- pseudo: PseudoElementType,
- style: ::ServoArc<ComputedValues>,
- list_style_type: ListStyleType,
- mode: RenderingMode)
- -> Option<SpecificFragmentInfo> {
+ fn render(
+ &self,
+ layout_context: &LayoutContext,
+ node: OpaqueNode,
+ pseudo: PseudoElementType,
+ style: ::ServoArc<ComputedValues>,
+ list_style_type: ListStyleType,
+ mode: RenderingMode,
+ ) -> Option<SpecificFragmentInfo> {
let mut string = String::new();
match mode {
RenderingMode::Plain => {
@@ -384,7 +440,7 @@ impl Counter {
None => 0,
};
push_representation(value, list_style_type, &mut string)
- }
+ },
RenderingMode::Suffix(suffix) => {
let value = match self.values.last() {
Some(ref value) => value.value,
@@ -392,7 +448,7 @@ impl Counter {
};
push_representation(value, list_style_type, &mut string);
string.push_str(suffix)
- }
+ },
RenderingMode::All(separator) => {
let mut first = true;
for value in &self.values {
@@ -402,7 +458,7 @@ impl Counter {
first = false;
push_representation(value.value, list_style_type, &mut string)
}
- }
+ },
}
if string.is_empty() {
@@ -432,22 +488,26 @@ struct CounterValue {
}
/// Creates fragment info for a literal string.
-fn render_text(layout_context: &LayoutContext,
- node: OpaqueNode,
- pseudo: PseudoElementType,
- style: ::ServoArc<ComputedValues>,
- string: String)
- -> Option<SpecificFragmentInfo> {
+fn render_text(
+ layout_context: &LayoutContext,
+ node: OpaqueNode,
+ pseudo: PseudoElementType,
+ style: ::ServoArc<ComputedValues>,
+ string: String,
+) -> Option<SpecificFragmentInfo> {
let mut fragments = LinkedList::new();
- let info = SpecificFragmentInfo::UnscannedText(
- Box::new(UnscannedTextFragmentInfo::new(string.into_boxed_str(), None))
- );
- fragments.push_back(Fragment::from_opaque_node_and_style(node,
- pseudo,
- style.clone(),
- style,
- RestyleDamage::rebuild_and_reflow(),
- info));
+ let info = SpecificFragmentInfo::UnscannedText(Box::new(UnscannedTextFragmentInfo::new(
+ string.into_boxed_str(),
+ None,
+ )));
+ fragments.push_back(Fragment::from_opaque_node_and_style(
+ node,
+ pseudo,
+ style.clone(),
+ style,
+ RestyleDamage::rebuild_and_reflow(),
+ info,
+ ));
// FIXME(pcwalton): This should properly handle multiple marker fragments. This could happen
// due to text run splitting.
let fragments = with_thread_local_font_context(layout_context, |font_context| {
@@ -464,39 +524,28 @@ fn render_text(layout_context: &LayoutContext,
/// `list-style-type` onto the given string.
fn push_representation(value: i32, list_style_type: ListStyleType, accumulator: &mut String) {
match list_style_type {
- ListStyleType::None => {}
+ ListStyleType::None => {},
ListStyleType::Disc |
ListStyleType::Circle |
ListStyleType::Square |
ListStyleType::DisclosureOpen |
- ListStyleType::DisclosureClosed => {
- accumulator.push(static_representation(list_style_type))
- }
+ ListStyleType::DisclosureClosed => accumulator.push(static_representation(list_style_type)),
ListStyleType::Decimal => push_numeric_representation(value, &DECIMAL, accumulator),
ListStyleType::ArabicIndic => {
push_numeric_representation(value, &ARABIC_INDIC, accumulator)
- }
+ },
ListStyleType::Bengali => push_numeric_representation(value, &BENGALI, accumulator),
- ListStyleType::Cambodian |
- ListStyleType::Khmer => {
+ ListStyleType::Cambodian | ListStyleType::Khmer => {
push_numeric_representation(value, &CAMBODIAN, accumulator)
- }
- ListStyleType::CjkDecimal => {
- push_numeric_representation(value, &CJK_DECIMAL, accumulator)
- }
- ListStyleType::Devanagari => {
- push_numeric_representation(value, &DEVANAGARI, accumulator)
- }
+ },
+ ListStyleType::CjkDecimal => push_numeric_representation(value, &CJK_DECIMAL, accumulator),
+ ListStyleType::Devanagari => push_numeric_representation(value, &DEVANAGARI, accumulator),
ListStyleType::Gujarati => push_numeric_representation(value, &GUJARATI, accumulator),
ListStyleType::Gurmukhi => push_numeric_representation(value, &GURMUKHI, accumulator),
ListStyleType::Kannada => push_numeric_representation(value, &KANNADA, accumulator),
ListStyleType::Lao => push_numeric_representation(value, &LAO, accumulator),
- ListStyleType::Malayalam => {
- push_numeric_representation(value, &MALAYALAM, accumulator)
- }
- ListStyleType::Mongolian => {
- push_numeric_representation(value, &MONGOLIAN, accumulator)
- }
+ ListStyleType::Malayalam => push_numeric_representation(value, &MALAYALAM, accumulator),
+ ListStyleType::Mongolian => push_numeric_representation(value, &MONGOLIAN, accumulator),
ListStyleType::Myanmar => push_numeric_representation(value, &MYANMAR, accumulator),
ListStyleType::Oriya => push_numeric_representation(value, &ORIYA, accumulator),
ListStyleType::Persian => push_numeric_representation(value, &PERSIAN, accumulator),
@@ -505,31 +554,27 @@ fn push_representation(value: i32, list_style_type: ListStyleType, accumulator:
ListStyleType::Tibetan => push_numeric_representation(value, &TIBETAN, accumulator),
ListStyleType::LowerAlpha => {
push_alphabetic_representation(value, &LOWER_ALPHA, accumulator)
- }
+ },
ListStyleType::UpperAlpha => {
push_alphabetic_representation(value, &UPPER_ALPHA, accumulator)
- }
+ },
ListStyleType::CjkEarthlyBranch => {
push_alphabetic_representation(value, &CJK_EARTHLY_BRANCH, accumulator)
- }
+ },
ListStyleType::CjkHeavenlyStem => {
push_alphabetic_representation(value, &CJK_HEAVENLY_STEM, accumulator)
- }
+ },
ListStyleType::LowerGreek => {
push_alphabetic_representation(value, &LOWER_GREEK, accumulator)
- }
- ListStyleType::Hiragana => {
- push_alphabetic_representation(value, &HIRAGANA, accumulator)
- }
+ },
+ ListStyleType::Hiragana => push_alphabetic_representation(value, &HIRAGANA, accumulator),
ListStyleType::HiraganaIroha => {
push_alphabetic_representation(value, &HIRAGANA_IROHA, accumulator)
- }
- ListStyleType::Katakana => {
- push_alphabetic_representation(value, &KATAKANA, accumulator)
- }
+ },
+ ListStyleType::Katakana => push_alphabetic_representation(value, &KATAKANA, accumulator),
ListStyleType::KatakanaIroha => {
push_alphabetic_representation(value, &KATAKANA_IROHA, accumulator)
- }
+ },
}
}
@@ -572,7 +617,7 @@ fn push_numeric_representation(value: i32, system: &[char], accumulator: &mut St
// Step 1.
if abs_value == 0 {
accumulator.push(system[0]);
- return
+ return;
}
// Step 2.
diff --git a/components/layout/incremental.rs b/components/layout/incremental.rs
index ff1e0813ccd..f0f76453919 100644
--- a/components/layout/incremental.rs
+++ b/components/layout/incremental.rs
@@ -11,7 +11,7 @@ use style::servo::restyle_damage::ServoRestyleDamage;
#[derive(Clone, Copy, PartialEq)]
pub enum RelayoutMode {
Incremental,
- Force
+ Force,
}
bitflags! {
@@ -30,7 +30,10 @@ pub trait LayoutDamageComputation {
impl<'a> LayoutDamageComputation for &'a mut Flow {
fn compute_layout_damage(self) -> SpecialRestyleDamage {
let mut special_damage = SpecialRestyleDamage::empty();
- let is_absolutely_positioned = self.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
+ let is_absolutely_positioned = self
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
// In addition to damage, we use this phase to compute whether nodes affect CSS counters.
let mut has_counter_affecting_children = false;
@@ -41,35 +44,47 @@ impl<'a> LayoutDamageComputation for &'a mut Flow {
let parent_damage = self_base.restyle_damage;
for kid in self_base.children.iter_mut() {
- let child_is_absolutely_positioned =
- kid.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
+ let child_is_absolutely_positioned = kid
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED);
kid.mut_base().restyle_damage.insert(
- parent_damage.damage_for_child(is_absolutely_positioned,
- child_is_absolutely_positioned));
+ parent_damage
+ .damage_for_child(is_absolutely_positioned, child_is_absolutely_positioned),
+ );
{
let kid: &mut Flow = kid;
special_damage.insert(kid.compute_layout_damage());
}
- self_base.restyle_damage
- .insert(kid.base().restyle_damage.damage_for_parent(
- child_is_absolutely_positioned));
+ self_base.restyle_damage.insert(
+ kid.base()
+ .restyle_damage
+ .damage_for_parent(child_is_absolutely_positioned),
+ );
- has_counter_affecting_children = has_counter_affecting_children ||
- kid.base().flags.intersects(FlowFlags::AFFECTS_COUNTERS |
- FlowFlags::HAS_COUNTER_AFFECTING_CHILDREN);
+ has_counter_affecting_children =
+ has_counter_affecting_children || kid.base().flags.intersects(
+ FlowFlags::AFFECTS_COUNTERS | FlowFlags::HAS_COUNTER_AFFECTING_CHILDREN,
+ );
}
}
let self_base = self.mut_base();
- if self_base.flags.float_kind() != Float::None &&
- self_base.restyle_damage.intersects(ServoRestyleDamage::REFLOW) {
+ if self_base.flags.float_kind() != Float::None && self_base
+ .restyle_damage
+ .intersects(ServoRestyleDamage::REFLOW)
+ {
special_damage.insert(SpecialRestyleDamage::REFLOW_ENTIRE_DOCUMENT);
}
if has_counter_affecting_children {
- self_base.flags.insert(FlowFlags::HAS_COUNTER_AFFECTING_CHILDREN)
+ self_base
+ .flags
+ .insert(FlowFlags::HAS_COUNTER_AFFECTING_CHILDREN)
} else {
- self_base.flags.remove(FlowFlags::HAS_COUNTER_AFFECTING_CHILDREN)
+ self_base
+ .flags
+ .remove(FlowFlags::HAS_COUNTER_AFFECTING_CHILDREN)
}
special_damage
@@ -77,8 +92,12 @@ impl<'a> LayoutDamageComputation for &'a mut Flow {
fn reflow_entire_document(self) {
let self_base = self.mut_base();
- self_base.restyle_damage.insert(RestyleDamage::rebuild_and_reflow());
- self_base.restyle_damage.remove(ServoRestyleDamage::RECONSTRUCT_FLOW);
+ self_base
+ .restyle_damage
+ .insert(RestyleDamage::rebuild_and_reflow());
+ self_base
+ .restyle_damage
+ .remove(ServoRestyleDamage::RECONSTRUCT_FLOW);
for kid in self_base.children.iter_mut() {
kid.reflow_entire_document();
}
diff --git a/components/layout/inline.rs b/components/layout/inline.rs
index 58d6a498457..7a66ad84bac 100644
--- a/components/layout/inline.rs
+++ b/components/layout/inline.rs
@@ -181,12 +181,16 @@ impl Line {
///
/// FIXME(pcwalton): this assumes that the tallest fragment in the line determines the line
/// block-size. This might not be the case with some weird text fonts.
- fn new_metrics_for_fragment(&self, new_fragment: &Fragment, layout_context: &LayoutContext)
- -> LineMetrics {
+ fn new_metrics_for_fragment(
+ &self,
+ new_fragment: &Fragment,
+ layout_context: &LayoutContext,
+ ) -> LineMetrics {
if !new_fragment.is_vertically_aligned_to_top_or_bottom() {
let fragment_inline_metrics =
new_fragment.aligned_inline_metrics(layout_context, &self.minimum_metrics, None);
- self.metrics.new_metrics_for_fragment(&fragment_inline_metrics)
+ self.metrics
+ .new_metrics_for_fragment(&fragment_inline_metrics)
} else {
self.metrics
}
@@ -195,15 +199,19 @@ impl Line {
/// Returns the new block size that this line would have if `new_fragment` were added to it.
/// `new_inline_metrics` represents the new inline metrics that this line would have; it can
/// be computed with `new_inline_metrics()`.
- fn new_block_size_for_fragment(&self,
- new_fragment: &Fragment,
- new_line_metrics: &LineMetrics,
- layout_context: &LayoutContext)
- -> Au {
+ fn new_block_size_for_fragment(
+ &self,
+ new_fragment: &Fragment,
+ new_line_metrics: &LineMetrics,
+ layout_context: &LayoutContext,
+ ) -> Au {
let new_block_size = if new_fragment.is_vertically_aligned_to_top_or_bottom() {
- max(new_fragment.aligned_inline_metrics(layout_context, &self.minimum_metrics, None)
- .space_needed(),
- self.minimum_metrics.space_needed())
+ max(
+ new_fragment
+ .aligned_inline_metrics(layout_context, &self.minimum_metrics, None)
+ .space_needed(),
+ self.minimum_metrics.space_needed(),
+ )
} else {
new_line_metrics.space_needed()
};
@@ -242,8 +250,11 @@ struct LineBreaker {
impl LineBreaker {
/// Creates a new `LineBreaker` with a set of floats and the indentation of the first line.
- fn new(float_context: Floats, first_line_indentation: Au, minimum_line_metrics: &LineMetrics)
- -> LineBreaker {
+ fn new(
+ float_context: Floats,
+ first_line_indentation: Au,
+ minimum_line_metrics: &LineMetrics,
+ ) -> LineBreaker {
LineBreaker {
new_fragments: Vec::new(),
work_list: VecDeque::new(),
@@ -273,13 +284,14 @@ impl LineBreaker {
}
/// Reflows fragments for the given inline flow.
- fn scan_for_lines(&mut self,
- flow: &mut InlineFlow,
- layout_context: &LayoutContext) {
+ fn scan_for_lines(&mut self, flow: &mut InlineFlow, layout_context: &LayoutContext) {
self.reset_scanner();
// Create our fragment iterator.
- debug!("LineBreaker: scanning for lines, {} fragments", flow.fragments.len());
+ debug!(
+ "LineBreaker: scanning for lines, {} fragments",
+ flow.fragments.len()
+ );
let mut old_fragments = mem::replace(&mut flow.fragments, InlineFragments::new());
let old_fragment_iter = old_fragments.fragments.into_iter();
@@ -300,12 +312,13 @@ impl LineBreaker {
// (because we split fragments on level run boundaries during flow
// construction), so we can build a level array with just one entry per
// fragment.
- let levels: Vec<bidi::Level> = self.new_fragments.iter().map(
- |fragment| match fragment.specific {
+ let levels: Vec<bidi::Level> = self
+ .new_fragments
+ .iter()
+ .map(|fragment| match fragment.specific {
SpecificFragmentInfo::ScannedText(ref info) => info.run.bidi_level,
- _ => para_level
- }
- ).collect();
+ _ => para_level,
+ }).collect();
let mut lines = mem::replace(&mut self.lines, Vec::new());
@@ -319,11 +332,14 @@ impl LineBreaker {
// the original text and original BidiClass of its characters.
#[allow(deprecated)]
let runs = bidi::deprecated::visual_runs(range, &levels);
- line.visual_runs = Some(runs.iter().map(|run| {
- let start = FragmentIndex(run.start as isize);
- let len = FragmentIndex(run.len() as isize);
- (Range::new(start, len), levels[run.start])
- }).collect());
+ line.visual_runs = Some(
+ runs.iter()
+ .map(|run| {
+ let start = FragmentIndex(run.start as isize);
+ let len = FragmentIndex(run.len() as isize);
+ (Range::new(start, len), levels[run.start])
+ }).collect(),
+ );
}
}
@@ -334,11 +350,13 @@ impl LineBreaker {
}
/// Reflows the given fragments, which have been plucked out of the inline flow.
- fn reflow_fragments<'a, I>(&mut self,
- mut old_fragment_iter: I,
- flow: &'a InlineFlow,
- layout_context: &LayoutContext)
- where I: Iterator<Item=Fragment>,
+ fn reflow_fragments<'a, I>(
+ &mut self,
+ mut old_fragment_iter: I,
+ flow: &'a InlineFlow,
+ layout_context: &LayoutContext,
+ ) where
+ I: Iterator<Item = Fragment>,
{
loop {
// Acquire the next fragment to lay out from the work list or fragment list, as
@@ -350,7 +368,7 @@ impl LineBreaker {
// Do not reflow truncated fragments. Reflow the original fragment only.
let fragment = if fragment.flags.contains(FragmentFlags::IS_ELLIPSIS) {
- continue
+ continue;
} else if let SpecificFragmentInfo::TruncatedFragment(info) = fragment.specific {
info.full
} else {
@@ -362,8 +380,10 @@ impl LineBreaker {
}
if !self.pending_line_is_empty() {
- debug!("LineBreaker: partially full line {} at end of scanning; committing it",
- self.lines.len());
+ debug!(
+ "LineBreaker: partially full line {} at end of scanning; committing it",
+ self.lines.len()
+ );
self.flush_current_line()
}
}
@@ -371,12 +391,13 @@ impl LineBreaker {
/// Acquires a new fragment to lay out from the work list or fragment list as appropriate.
/// Note that you probably don't want to call this method directly in order to be incremental-
/// reflow-safe; try `next_unbroken_fragment` instead.
- fn next_fragment<I>(&mut self,
- old_fragment_iter: &mut I)
- -> Option<Fragment>
- where I: Iterator<Item=Fragment>,
+ fn next_fragment<I>(&mut self, old_fragment_iter: &mut I) -> Option<Fragment>
+ where
+ I: Iterator<Item = Fragment>,
{
- self.work_list.pop_front().or_else(|| old_fragment_iter.next())
+ self.work_list
+ .pop_front()
+ .or_else(|| old_fragment_iter.next())
}
/// Acquires a new fragment to lay out from the work list or fragment list,
@@ -384,10 +405,9 @@ impl LineBreaker {
/// this method does is to return the next fragment to lay out, undoing line
/// break operations that any previous reflows may have performed. You
/// probably want to be using this method instead of `next_fragment`.
- fn next_unbroken_fragment<I>(&mut self,
- old_fragment_iter: &mut I)
- -> Option<Fragment>
- where I: Iterator<Item=Fragment>,
+ fn next_unbroken_fragment<I>(&mut self, old_fragment_iter: &mut I) -> Option<Fragment>
+ where
+ I: Iterator<Item = Fragment>,
{
let mut result = self.next_fragment(old_fragment_iter)?;
@@ -398,34 +418,41 @@ impl LineBreaker {
};
let need_to_merge = match (&mut result.specific, &candidate.specific) {
- (&mut SpecificFragmentInfo::ScannedText(ref mut result_info),
- &SpecificFragmentInfo::ScannedText(ref candidate_info)) => {
+ (
+ &mut SpecificFragmentInfo::ScannedText(ref mut result_info),
+ &SpecificFragmentInfo::ScannedText(ref candidate_info),
+ ) => {
result.margin.inline_end == Au(0) &&
- candidate.margin.inline_start == Au(0) &&
- result.border_padding.inline_end == Au(0) &&
- candidate.border_padding.inline_start == Au(0) &&
- result_info.selected() == candidate_info.selected() &&
- Arc::ptr_eq(&result_info.run, &candidate_info.run) &&
- inline_contexts_are_equal(&result.inline_context,
- &candidate.inline_context)
- }
+ candidate.margin.inline_start == Au(0) &&
+ result.border_padding.inline_end == Au(0) &&
+ candidate.border_padding.inline_start == Au(0) &&
+ result_info.selected() == candidate_info.selected() &&
+ Arc::ptr_eq(&result_info.run, &candidate_info.run) &&
+ inline_contexts_are_equal(
+ &result.inline_context,
+ &candidate.inline_context,
+ )
+ },
_ => false,
};
-
if need_to_merge {
result.merge_with(candidate);
- continue
+ continue;
}
self.work_list.push_front(candidate);
- return Some(result)
+ return Some(result);
}
}
/// Commits a line to the list.
fn flush_current_line(&mut self) {
- debug!("LineBreaker: flushing line {}: {:?}", self.lines.len(), self.pending_line);
+ debug!(
+ "LineBreaker: flushing line {}: {:?}",
+ self.lines.len(),
+ self.pending_line
+ );
self.strip_trailing_whitespace_from_pending_line_if_necessary();
self.lines.push(self.pending_line.clone());
self.cur_b = self.pending_line.bounds.start.b + self.pending_line.bounds.size.block;
@@ -436,7 +463,7 @@ impl LineBreaker {
/// flushing it.
fn strip_trailing_whitespace_from_pending_line_if_necessary(&mut self) {
if self.pending_line.range.is_empty() {
- return
+ return;
}
let last_fragment_index = self.pending_line.range.end() - FragmentIndex(1);
let fragment = &mut self.new_fragments[last_fragment_index.get() as usize];
@@ -452,16 +479,19 @@ impl LineBreaker {
/// Computes the position of a line that has only the provided fragment. Returns the bounding
/// rect of the line's green zone (whose origin coincides with the line's origin) and the
/// actual inline-size of the first fragment after splitting.
- fn initial_line_placement(&self,
- flow: &InlineFlow,
- first_fragment: &Fragment,
- ceiling: Au)
- -> (LogicalRect<Au>, Au) {
- debug!("LineBreaker: trying to place first fragment of line {}; fragment size: {:?}, \
- splittable: {}",
- self.lines.len(),
- first_fragment.border_box.size,
- first_fragment.can_split());
+ fn initial_line_placement(
+ &self,
+ flow: &InlineFlow,
+ first_fragment: &Fragment,
+ ceiling: Au,
+ ) -> (LogicalRect<Au>, Au) {
+ debug!(
+ "LineBreaker: trying to place first fragment of line {}; fragment size: {:?}, \
+ splittable: {}",
+ self.lines.len(),
+ first_fragment.border_box.size,
+ first_fragment.can_split()
+ );
// Initially, pretend a splittable fragment has zero inline-size. We will move it later if
// it has nonzero inline-size and that causes problems.
@@ -473,9 +503,11 @@ impl LineBreaker {
// Try to place the fragment between floats.
let line_bounds = self.floats.place_between_floats(&PlacementInfo {
- size: LogicalSize::new(self.floats.writing_mode,
- placement_inline_size,
- first_fragment.border_box.size.block),
+ size: LogicalSize::new(
+ self.floats.writing_mode,
+ placement_inline_size,
+ first_fragment.border_box.size.block,
+ ),
ceiling: ceiling,
max_inline_size: flow.base.position.size.inline,
kind: FloatKind::Left,
@@ -511,33 +543,37 @@ impl LineBreaker {
/// So we'll try to move the line whenever we can, but break if we have to.
///
/// Returns false if and only if we should break the line.
- fn avoid_floats(&mut self,
- flow: &InlineFlow,
- in_fragment: Fragment,
- new_block_size: Au)
- -> bool {
+ fn avoid_floats(
+ &mut self,
+ flow: &InlineFlow,
+ in_fragment: Fragment,
+ new_block_size: Au,
+ ) -> bool {
debug!("LineBreaker: entering float collision avoider!");
// First predict where the next line is going to be.
let (next_line, first_fragment_inline_size) =
- self.initial_line_placement(flow,
- &in_fragment,
- self.pending_line.bounds.start.b);
+ self.initial_line_placement(flow, &in_fragment, self.pending_line.bounds.start.b);
let next_green_zone = next_line.size;
let new_inline_size = self.pending_line.bounds.size.inline + first_fragment_inline_size;
// Now, see if everything can fit at the new location.
if next_green_zone.inline >= new_inline_size && next_green_zone.block >= new_block_size {
- debug!("LineBreaker: case=adding fragment collides vertically with floats: moving \
- line");
+ debug!(
+ "LineBreaker: case=adding fragment collides vertically with floats: moving \
+ line"
+ );
self.pending_line.bounds.start = next_line.start;
self.pending_line.green_zone = next_green_zone;
- debug_assert!(!self.pending_line_is_empty(), "Non-terminating line breaking");
+ debug_assert!(
+ !self.pending_line_is_empty(),
+ "Non-terminating line breaking"
+ );
self.work_list.push_front(in_fragment);
- return true
+ return true;
}
debug!("LineBreaker: case=adding fragment collides vertically with floats: breaking line");
@@ -547,10 +583,12 @@ impl LineBreaker {
/// Tries to append the given fragment to the line, splitting it if necessary. Commits the
/// current line if needed.
- fn reflow_fragment(&mut self,
- mut fragment: Fragment,
- flow: &InlineFlow,
- layout_context: &LayoutContext) {
+ fn reflow_fragment(
+ &mut self,
+ mut fragment: Fragment,
+ flow: &InlineFlow,
+ layout_context: &LayoutContext,
+ ) {
// Undo any whitespace stripping from previous reflows.
fragment.reset_text_range_and_inline_size();
// Determine initial placement for the fragment if we need to.
@@ -573,37 +611,41 @@ impl LineBreaker {
// is_on_glyph_run_boundary does a binary search, but this is ok
// because the result will be cached and reused in
// `calculate_split_position` later
- if fragment.suppress_line_break_before() ||
- !fragment.is_on_glyph_run_boundary() {
+ if fragment.suppress_line_break_before() || !fragment.is_on_glyph_run_boundary() {
false
} else {
fragment.white_space().allow_wrap()
}
};
- debug!("LineBreaker: trying to append to line {} \
- (fragment size: {:?}, green zone: {:?}): {:?}",
- self.lines.len(),
- fragment.border_box.size,
- self.pending_line.green_zone,
- fragment);
+ debug!(
+ "LineBreaker: trying to append to line {} \
+ (fragment size: {:?}, green zone: {:?}): {:?}",
+ self.lines.len(),
+ fragment.border_box.size,
+ self.pending_line.green_zone,
+ fragment
+ );
// NB: At this point, if `green_zone.inline <
// self.pending_line.bounds.size.inline` or `green_zone.block <
// self.pending_line.bounds.size.block`, then we committed a line that
// overlaps with floats.
let green_zone = self.pending_line.green_zone;
- let new_line_metrics = self.pending_line.new_metrics_for_fragment(&fragment,
- layout_context);
- let new_block_size = self.pending_line.new_block_size_for_fragment(&fragment,
- &new_line_metrics,
- layout_context);
+ let new_line_metrics = self
+ .pending_line
+ .new_metrics_for_fragment(&fragment, layout_context);
+ let new_block_size = self.pending_line.new_block_size_for_fragment(
+ &fragment,
+ &new_line_metrics,
+ layout_context,
+ );
if new_block_size > green_zone.block {
// Uh-oh. Float collision imminent. Enter the float collision avoider!
if !self.avoid_floats(flow, fragment, new_block_size) {
self.flush_current_line();
}
- return
+ return;
}
// Record the last known good line break opportunity if this is one.
@@ -627,30 +669,32 @@ impl LineBreaker {
// horizontally. We'll try to place the whole fragment on this line and break somewhere if
// it doesn't fit.
let indentation = self.indentation_for_pending_fragment();
- let new_inline_size = self.pending_line.bounds.size.inline +
- fragment.margin_box_inline_size() + indentation;
+ let new_inline_size =
+ self.pending_line.bounds.size.inline + fragment.margin_box_inline_size() + indentation;
if new_inline_size <= green_zone.inline {
debug!("LineBreaker: fragment fits without splitting");
self.push_fragment_to_line(layout_context, fragment, line_flush_mode);
- return
+ return;
}
// If the wrapping mode prevents us from splitting, then back up and split at the last
// known good split point.
if !fragment.white_space().allow_wrap() {
- debug!("LineBreaker: fragment can't split; falling back to last known good split point");
+ debug!(
+ "LineBreaker: fragment can't split; falling back to last known good split point"
+ );
self.split_line_at_last_known_good_position(layout_context, fragment, line_flush_mode);
return;
}
// Split it up!
- let available_inline_size = green_zone.inline -
- self.pending_line.bounds.size.inline -
- indentation;
+ let available_inline_size =
+ green_zone.inline - self.pending_line.bounds.size.inline - indentation;
let inline_start_fragment;
let inline_end_fragment;
- let split_result = match fragment.calculate_split_position(available_inline_size,
- self.pending_line_is_empty()) {
+ let split_result = match fragment
+ .calculate_split_position(available_inline_size, self.pending_line_is_empty())
+ {
None => {
// We failed to split. Defer to the next line if we're allowed to; otherwise,
// rewind to the last line breaking opportunity.
@@ -659,21 +703,25 @@ impl LineBreaker {
self.work_list.push_front(fragment);
self.flush_current_line();
} else {
- self.split_line_at_last_known_good_position(layout_context,
- fragment,
- LineFlushMode::No);
+ self.split_line_at_last_known_good_position(
+ layout_context,
+ fragment,
+ LineFlushMode::No,
+ );
}
- return
- }
+ return;
+ },
Some(split_result) => split_result,
};
- inline_start_fragment = split_result.inline_start.as_ref().map(|x| {
- fragment.transform_with_split_info(x, split_result.text_run.clone(), true)
- });
- inline_end_fragment = split_result.inline_end.as_ref().map(|x| {
- fragment.transform_with_split_info(x, split_result.text_run.clone(), false)
- });
+ inline_start_fragment = split_result
+ .inline_start
+ .as_ref()
+ .map(|x| fragment.transform_with_split_info(x, split_result.text_run.clone(), true));
+ inline_end_fragment = split_result
+ .inline_end
+ .as_ref()
+ .map(|x| fragment.transform_with_split_info(x, split_result.text_run.clone(), false));
// Push the first fragment onto the line we're working on and start off the next line with
// the second fragment. If there's no second fragment, the next line will start off empty.
@@ -682,56 +730,69 @@ impl LineBreaker {
inline_start_fragment.border_padding.inline_end = Au(0);
if let Some(ref mut inline_context) = inline_start_fragment.inline_context {
for node in &mut inline_context.nodes {
- node.flags.remove(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT);
+ node.flags
+ .remove(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT);
}
}
- inline_start_fragment.border_box.size.inline += inline_start_fragment.border_padding.inline_start;
+ inline_start_fragment.border_box.size.inline +=
+ inline_start_fragment.border_padding.inline_start;
inline_end_fragment.border_padding.inline_start = Au(0);
if let Some(ref mut inline_context) = inline_end_fragment.inline_context {
for node in &mut inline_context.nodes {
- node.flags.remove(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT);
+ node.flags
+ .remove(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT);
}
}
- inline_end_fragment.border_box.size.inline += inline_end_fragment.border_padding.inline_end;
-
- self.push_fragment_to_line(layout_context,
- inline_start_fragment,
- LineFlushMode::Flush);
+ inline_end_fragment.border_box.size.inline +=
+ inline_end_fragment.border_padding.inline_end;
+
+ self.push_fragment_to_line(
+ layout_context,
+ inline_start_fragment,
+ LineFlushMode::Flush,
+ );
self.work_list.push_front(inline_end_fragment)
},
(Some(fragment), None) => {
self.push_fragment_to_line(layout_context, fragment, line_flush_mode);
- }
+ },
(None, Some(fragment)) => {
// Yes, this can happen!
self.flush_current_line();
self.work_list.push_front(fragment)
- }
- (None, None) => {}
+ },
+ (None, None) => {},
}
}
/// Pushes a fragment to the current line unconditionally, possibly truncating it and placing
/// an ellipsis based on the value of `text-overflow`. If `flush_line` is `Flush`, then flushes
/// the line afterward;
- fn push_fragment_to_line(&mut self,
- layout_context: &LayoutContext,
- fragment: Fragment,
- line_flush_mode: LineFlushMode) {
+ fn push_fragment_to_line(
+ &mut self,
+ layout_context: &LayoutContext,
+ fragment: Fragment,
+ line_flush_mode: LineFlushMode,
+ ) {
let indentation = self.indentation_for_pending_fragment();
if self.pending_line_is_empty() {
debug_assert!(self.new_fragments.len() <= (isize::MAX as usize));
- self.pending_line.range.reset(FragmentIndex(self.new_fragments.len() as isize),
- FragmentIndex(0));
+ self.pending_line.range.reset(
+ FragmentIndex(self.new_fragments.len() as isize),
+ FragmentIndex(0),
+ );
}
// Determine if an ellipsis will be necessary to account for `text-overflow`.
let available_inline_size = self.pending_line.green_zone.inline -
- self.pending_line.bounds.size.inline - indentation;
+ self.pending_line.bounds.size.inline -
+ indentation;
- let ellipsis = match (&fragment.style().get_text().text_overflow.second,
- fragment.style().get_box().overflow_x) {
+ let ellipsis = match (
+ &fragment.style().get_text().text_overflow.second,
+ fragment.style().get_box().overflow_x,
+ ) {
(&TextOverflowSide::Clip, _) | (_, StyleOverflow::Visible) => None,
(&TextOverflowSide::Ellipsis, _) => {
if fragment.margin_box_inline_size() > available_inline_size {
@@ -746,13 +807,13 @@ impl LineBreaker {
} else {
None
}
- }
+ },
};
if let Some(string) = ellipsis {
let ellipsis = fragment.transform_into_ellipsis(layout_context, string);
- let truncated = fragment.truncate_to_inline_size(available_inline_size -
- ellipsis.margin_box_inline_size());
+ let truncated = fragment
+ .truncate_to_inline_size(available_inline_size - ellipsis.margin_box_inline_size());
self.push_fragment_to_line_ignoring_text_overflow(truncated, layout_context);
self.push_fragment_to_line_ignoring_text_overflow(ellipsis, layout_context);
} else {
@@ -766,43 +827,50 @@ impl LineBreaker {
/// Pushes a fragment to the current line unconditionally, without placing an ellipsis in the
/// case of `text-overflow: ellipsis`.
- fn push_fragment_to_line_ignoring_text_overflow(&mut self,
- fragment: Fragment,
- layout_context: &LayoutContext) {
+ fn push_fragment_to_line_ignoring_text_overflow(
+ &mut self,
+ fragment: Fragment,
+ layout_context: &LayoutContext,
+ ) {
let indentation = self.indentation_for_pending_fragment();
self.pending_line.range.extend_by(FragmentIndex(1));
if !fragment.is_inline_absolute() && !fragment.is_hypothetical() {
self.pending_line.bounds.size.inline = self.pending_line.bounds.size.inline +
- fragment.margin_box_inline_size() + indentation;
- self.pending_line.metrics = self.pending_line.new_metrics_for_fragment(&fragment,
- layout_context);
- self.pending_line.bounds.size.block =
- self.pending_line.new_block_size_for_fragment(&fragment,
- &self.pending_line.metrics,
- layout_context);
+ fragment.margin_box_inline_size() +
+ indentation;
+ self.pending_line.metrics = self
+ .pending_line
+ .new_metrics_for_fragment(&fragment, layout_context);
+ self.pending_line.bounds.size.block = self.pending_line.new_block_size_for_fragment(
+ &fragment,
+ &self.pending_line.metrics,
+ layout_context,
+ );
}
self.new_fragments.push(fragment);
}
- fn split_line_at_last_known_good_position(&mut self,
- layout_context: &LayoutContext,
- cur_fragment: Fragment,
- line_flush_mode: LineFlushMode) {
- let last_known_line_breaking_opportunity =
- match self.last_known_line_breaking_opportunity {
- None => {
- // No line breaking opportunity exists at all for this line. Overflow.
- self.push_fragment_to_line(layout_context, cur_fragment, line_flush_mode);
- return;
- }
- Some(last_known_line_breaking_opportunity) => last_known_line_breaking_opportunity,
- };
+ fn split_line_at_last_known_good_position(
+ &mut self,
+ layout_context: &LayoutContext,
+ cur_fragment: Fragment,
+ line_flush_mode: LineFlushMode,
+ ) {
+ let last_known_line_breaking_opportunity = match self.last_known_line_breaking_opportunity {
+ None => {
+ // No line breaking opportunity exists at all for this line. Overflow.
+ self.push_fragment_to_line(layout_context, cur_fragment, line_flush_mode);
+ return;
+ },
+ Some(last_known_line_breaking_opportunity) => last_known_line_breaking_opportunity,
+ };
self.work_list.push_front(cur_fragment);
- for fragment_index in (last_known_line_breaking_opportunity.get()..
- self.pending_line.range.end().get()).rev() {
+ for fragment_index in
+ (last_known_line_breaking_opportunity.get()..self.pending_line.range.end().get()).rev()
+ {
debug_assert_eq!(fragment_index, (self.new_fragments.len() as isize) - 1);
self.work_list.push_front(self.new_fragments.pop().unwrap());
}
@@ -820,7 +888,9 @@ impl LineBreaker {
// point. Unfortunately, the existing splitting API (`calculate_split_position`)
// has no concept of "split right before the last non-whitespace position". We'll
// need to add that feature to the API to handle this case correctly.
- self.pending_line.range.extend_to(last_known_line_breaking_opportunity);
+ self.pending_line
+ .range
+ .extend_to(last_known_line_breaking_opportunity);
self.flush_current_line();
}
@@ -849,9 +919,7 @@ pub struct InlineFragments {
impl InlineFragments {
/// Creates an empty set of inline fragments.
pub fn new() -> InlineFragments {
- InlineFragments {
- fragments: vec![],
- }
+ InlineFragments { fragments: vec![] }
}
/// Returns the number of inline fragments.
@@ -913,8 +981,15 @@ impl InlineFlow {
first_line_indentation: Au(0),
};
- if flow.fragments.fragments.iter().any(Fragment::is_unscanned_generated_content) {
- flow.base.restyle_damage.insert(ServoRestyleDamage::RESOLVE_GENERATED_CONTENT);
+ if flow
+ .fragments
+ .fragments
+ .iter()
+ .any(Fragment::is_unscanned_generated_content)
+ {
+ flow.base
+ .restyle_damage
+ .insert(ServoRestyleDamage::RESOLVE_GENERATED_CONTENT);
}
flow
@@ -922,19 +997,24 @@ impl InlineFlow {
/// Sets fragment positions in the inline direction based on alignment for one line. This
/// performs text justification if mandated by the style.
- fn set_inline_fragment_positions(fragments: &mut InlineFragments,
- line: &Line,
- line_align: TextAlign,
- indentation: Au,
- is_last_line: bool) {
+ fn set_inline_fragment_positions(
+ fragments: &mut InlineFragments,
+ line: &Line,
+ line_align: TextAlign,
+ indentation: Au,
+ is_last_line: bool,
+ ) {
// Figure out how much inline-size we have.
let slack_inline_size = max(Au(0), line.green_zone.inline - line.bounds.size.inline);
// Compute the value we're going to use for `text-justify`.
if fragments.fragments.is_empty() {
- return
+ return;
}
- let text_justify = fragments.fragments[0].style().get_inherited_text().text_justify;
+ let text_justify = fragments.fragments[0]
+ .style()
+ .get_inherited_text()
+ .text_justify;
// Translate `left` and `right` to logical directions.
let is_ltr = fragments.fragments[0].style().writing_mode.is_bidi_ltr();
@@ -947,7 +1027,7 @@ impl InlineFlow {
(TextAlign::ServoLeft, false) |
(TextAlign::Right, true) |
(TextAlign::ServoRight, true) => TextAlign::End,
- _ => line_align
+ _ => line_align,
};
// Set the fragment inline positions based on that alignment, and justify the text if
@@ -956,32 +1036,31 @@ impl InlineFlow {
match line_align {
TextAlign::Justify if !is_last_line && text_justify != TextJustify::None => {
InlineFlow::justify_inline_fragments(fragments, line, slack_inline_size)
- }
- TextAlign::Justify | TextAlign::Start => {}
+ },
+ TextAlign::Justify | TextAlign::Start => {},
TextAlign::Center | TextAlign::ServoCenter => {
- inline_start_position_for_fragment = inline_start_position_for_fragment +
- slack_inline_size.scale_by(0.5)
- }
+ inline_start_position_for_fragment =
+ inline_start_position_for_fragment + slack_inline_size.scale_by(0.5)
+ },
TextAlign::End => {
- inline_start_position_for_fragment = inline_start_position_for_fragment +
- slack_inline_size
- }
- TextAlign::Left |
- TextAlign::ServoLeft |
- TextAlign::Right |
- TextAlign::ServoRight => unreachable!()
+ inline_start_position_for_fragment =
+ inline_start_position_for_fragment + slack_inline_size
+ },
+ TextAlign::Left | TextAlign::ServoLeft | TextAlign::Right | TextAlign::ServoRight => {
+ unreachable!()
+ },
}
// Lay out the fragments in visual order.
let run_count = match line.visual_runs {
Some(ref runs) => runs.len(),
- None => 1
+ None => 1,
};
for run_idx in 0..run_count {
let (range, level) = match line.visual_runs {
Some(ref runs) if is_ltr => runs[run_idx],
Some(ref runs) => runs[run_count - run_idx - 1], // reverse order for RTL runs
- None => (line.range, bidi::Level::ltr())
+ None => (line.range, bidi::Level::ltr()),
};
struct MaybeReverse<I> {
@@ -1014,26 +1093,30 @@ impl InlineFlow {
for fragment_index in fragment_indices {
let fragment = fragments.get_mut(fragment_index as usize);
- inline_start_position_for_fragment = inline_start_position_for_fragment +
- fragment.margin.inline_start;
+ inline_start_position_for_fragment =
+ inline_start_position_for_fragment + fragment.margin.inline_start;
let border_start = if fragment.style.writing_mode.is_bidi_ltr() == is_ltr {
inline_start_position_for_fragment
} else {
- line.green_zone.inline - inline_start_position_for_fragment
- - fragment.margin.inline_end
- - fragment.border_box.size.inline
+ line.green_zone.inline -
+ inline_start_position_for_fragment -
+ fragment.margin.inline_end -
+ fragment.border_box.size.inline
};
- fragment.border_box = LogicalRect::new(fragment.style.writing_mode,
- border_start,
- fragment.border_box.start.b,
- fragment.border_box.size.inline,
- fragment.border_box.size.block);
+ fragment.border_box = LogicalRect::new(
+ fragment.style.writing_mode,
+ border_start,
+ fragment.border_box.start.b,
+ fragment.border_box.size.inline,
+ fragment.border_box.size.block,
+ );
fragment.update_late_computed_inline_position_if_necessary();
if !fragment.is_inline_absolute() {
inline_start_position_for_fragment = inline_start_position_for_fragment +
- fragment.border_box.size.inline + fragment.margin.inline_end;
+ fragment.border_box.size.inline +
+ fragment.margin.inline_end;
}
}
}
@@ -1041,12 +1124,14 @@ impl InlineFlow {
/// Justifies the given set of inline fragments, distributing the `slack_inline_size` among all
/// of them according to the value of `text-justify`.
- fn justify_inline_fragments(fragments: &mut InlineFragments,
- line: &Line,
- slack_inline_size: Au) {
+ fn justify_inline_fragments(
+ fragments: &mut InlineFragments,
+ line: &Line,
+ slack_inline_size: Au,
+ ) {
// Fast path.
if slack_inline_size == Au(0) {
- return
+ return;
}
// First, calculate the number of expansion opportunities (spaces, normally).
@@ -1055,17 +1140,20 @@ impl InlineFlow {
let fragment = fragments.get(fragment_index.to_usize());
let scanned_text_fragment_info = match fragment.specific {
SpecificFragmentInfo::ScannedText(ref info) if !info.range.is_empty() => info,
- _ => continue
+ _ => continue,
};
let fragment_range = scanned_text_fragment_info.range;
- for slice in scanned_text_fragment_info.run.character_slices_in_range(&fragment_range) {
+ for slice in scanned_text_fragment_info
+ .run
+ .character_slices_in_range(&fragment_range)
+ {
expansion_opportunities += slice.glyphs.space_count_in_range(&slice.range)
}
}
if expansion_opportunities == 0 {
- return
+ return;
}
// Then distribute all the space across the expansion opportunities.
@@ -1074,7 +1162,7 @@ impl InlineFlow {
let fragment = fragments.get_mut(fragment_index.to_usize());
let scanned_text_fragment_info = match fragment.specific {
SpecificFragmentInfo::ScannedText(ref mut info) if !info.range.is_empty() => info,
- _ => continue
+ _ => continue,
};
let fragment_range = scanned_text_fragment_info.range;
let run = Arc::make_mut(&mut scanned_text_fragment_info.run);
@@ -1082,30 +1170,38 @@ impl InlineFlow {
// Recompute the fragment's border box size.
let new_inline_size = run.advance_for_range(&fragment_range);
- let new_size = LogicalSize::new(fragment.style.writing_mode,
- new_inline_size,
- fragment.border_box.size.block);
- fragment.border_box = LogicalRect::from_point_size(fragment.style.writing_mode,
- fragment.border_box.start,
- new_size);
+ let new_size = LogicalSize::new(
+ fragment.style.writing_mode,
+ new_inline_size,
+ fragment.border_box.size.block,
+ );
+ fragment.border_box = LogicalRect::from_point_size(
+ fragment.style.writing_mode,
+ fragment.border_box.start,
+ new_size,
+ );
}
}
/// Sets final fragment positions in the block direction for one line.
- fn set_block_fragment_positions(fragments: &mut InlineFragments,
- line: &Line,
- minimum_line_metrics: &LineMetrics,
- layout_context: &LayoutContext) {
+ fn set_block_fragment_positions(
+ fragments: &mut InlineFragments,
+ line: &Line,
+ minimum_line_metrics: &LineMetrics,
+ layout_context: &LayoutContext,
+ ) {
for fragment_index in line.range.each_index() {
let fragment = fragments.get_mut(fragment_index.to_usize());
let line_metrics = LineMetrics::for_line_and_fragment(line, fragment, layout_context);
- let inline_metrics = fragment.aligned_inline_metrics(layout_context,
- minimum_line_metrics,
- Some(&line_metrics));
+ let inline_metrics = fragment.aligned_inline_metrics(
+ layout_context,
+ minimum_line_metrics,
+ Some(&line_metrics),
+ );
// Align the top of the fragment's border box with its ascent above the baseline.
- fragment.border_box.start.b = line.bounds.start.b + line_metrics.space_above_baseline -
- inline_metrics.ascent;
+ fragment.border_box.start.b =
+ line.bounds.start.b + line_metrics.space_above_baseline - inline_metrics.ascent;
// CSS 2.1 § 10.8: "The height of each inline-level box in the line box is
// calculated. For replaced elements, inline-block elements, and inline-table
@@ -1131,25 +1227,31 @@ impl InlineFlow {
/// Computes the minimum metrics for each line. This is done during flow construction.
///
/// `style` is the style of the block.
- pub fn minimum_line_metrics(&self, font_context: &mut LayoutFontContext, style: &ComputedValues)
- -> LineMetrics {
- InlineFlow::minimum_line_metrics_for_fragments(&self.fragments.fragments,
- font_context,
- style)
+ pub fn minimum_line_metrics(
+ &self,
+ font_context: &mut LayoutFontContext,
+ style: &ComputedValues,
+ ) -> LineMetrics {
+ InlineFlow::minimum_line_metrics_for_fragments(
+ &self.fragments.fragments,
+ font_context,
+ style,
+ )
}
/// Computes the minimum line metrics for the given fragments. This is typically done during
/// flow construction.
///
/// `style` is the style of the block that these fragments belong to.
- pub fn minimum_line_metrics_for_fragments(fragments: &[Fragment],
- font_context: &mut LayoutFontContext,
- style: &ComputedValues)
- -> LineMetrics {
+ pub fn minimum_line_metrics_for_fragments(
+ fragments: &[Fragment],
+ font_context: &mut LayoutFontContext,
+ style: &ComputedValues,
+ ) -> LineMetrics {
// As a special case, if this flow contains only hypothetical fragments, then the entire
// flow is hypothetical and takes up no space. See CSS 2.1 § 10.3.7.
if fragments.iter().all(Fragment::is_hypothetical) {
- return LineMetrics::new(Au(0), Au(0))
+ return LineMetrics::new(Au(0), Au(0));
}
let font_style = style.clone_font();
@@ -1167,68 +1269,80 @@ impl InlineFlow {
// We use `VerticalAlign::Baseline` here because `vertical-align` must
// not apply to the inside of inline blocks.
- update_line_metrics_for_fragment(&mut line_metrics,
- &inline_metrics,
- style.get_box().display,
- GenericVerticalAlign::Baseline,
- &mut largest_block_size_for_top_fragments,
- &mut largest_block_size_for_bottom_fragments);
+ update_line_metrics_for_fragment(
+ &mut line_metrics,
+ &inline_metrics,
+ style.get_box().display,
+ GenericVerticalAlign::Baseline,
+ &mut largest_block_size_for_top_fragments,
+ &mut largest_block_size_for_bottom_fragments,
+ );
// According to CSS 2.1 § 10.8, `line-height` of any inline element specifies the minimal
// height of line boxes within the element.
- for inline_context in fragments.iter()
- .filter_map(|fragment| fragment.inline_context.as_ref()) {
+ for inline_context in fragments
+ .iter()
+ .filter_map(|fragment| fragment.inline_context.as_ref())
+ {
for node in &inline_context.nodes {
let font_style = node.style.clone_font();
let font_metrics = text::font_metrics_for_style(font_context, font_style);
let line_height = text::line_height_from_style(&*node.style, &font_metrics);
let inline_metrics = InlineMetrics::from_font_metrics(&font_metrics, line_height);
- update_line_metrics_for_fragment(&mut line_metrics,
- &inline_metrics,
- node.style.get_box().display,
- node.style.get_box().vertical_align,
- &mut largest_block_size_for_top_fragments,
- &mut largest_block_size_for_bottom_fragments);
-
+ update_line_metrics_for_fragment(
+ &mut line_metrics,
+ &inline_metrics,
+ node.style.get_box().display,
+ node.style.get_box().vertical_align,
+ &mut largest_block_size_for_top_fragments,
+ &mut largest_block_size_for_bottom_fragments,
+ );
}
}
- line_metrics.space_above_baseline =
- max(line_metrics.space_above_baseline,
- largest_block_size_for_bottom_fragments - max(line_metrics.space_below_baseline,
- Au(0)));
- line_metrics.space_below_baseline =
- max(line_metrics.space_below_baseline,
- largest_block_size_for_top_fragments - line_metrics.space_above_baseline);
+ line_metrics.space_above_baseline = max(
+ line_metrics.space_above_baseline,
+ largest_block_size_for_bottom_fragments - max(line_metrics.space_below_baseline, Au(0)),
+ );
+ line_metrics.space_below_baseline = max(
+ line_metrics.space_below_baseline,
+ largest_block_size_for_top_fragments - line_metrics.space_above_baseline,
+ );
return line_metrics;
- fn update_line_metrics_for_fragment(line_metrics: &mut LineMetrics,
- inline_metrics: &InlineMetrics,
- display_value: Display,
- vertical_align_value: VerticalAlign,
- largest_block_size_for_top_fragments: &mut Au,
- largest_block_size_for_bottom_fragments: &mut Au) {
+ fn update_line_metrics_for_fragment(
+ line_metrics: &mut LineMetrics,
+ inline_metrics: &InlineMetrics,
+ display_value: Display,
+ vertical_align_value: VerticalAlign,
+ largest_block_size_for_top_fragments: &mut Au,
+ largest_block_size_for_bottom_fragments: &mut Au,
+ ) {
match (display_value, vertical_align_value) {
(Display::Inline, GenericVerticalAlign::Top) |
(Display::Block, GenericVerticalAlign::Top) |
(Display::InlineFlex, GenericVerticalAlign::Top) |
- (Display::InlineBlock, GenericVerticalAlign::Top) if
- inline_metrics.space_above_baseline >= Au(0) => {
+ (Display::InlineBlock, GenericVerticalAlign::Top)
+ if inline_metrics.space_above_baseline >= Au(0) =>
+ {
*largest_block_size_for_top_fragments = max(
*largest_block_size_for_top_fragments,
- inline_metrics.space_above_baseline + inline_metrics.space_below_baseline)
- }
+ inline_metrics.space_above_baseline + inline_metrics.space_below_baseline,
+ )
+ },
(Display::Inline, GenericVerticalAlign::Bottom) |
(Display::Block, GenericVerticalAlign::Bottom) |
(Display::InlineFlex, GenericVerticalAlign::Bottom) |
- (Display::InlineBlock, GenericVerticalAlign::Bottom) if
- inline_metrics.space_below_baseline >= Au(0) => {
+ (Display::InlineBlock, GenericVerticalAlign::Bottom)
+ if inline_metrics.space_below_baseline >= Au(0) =>
+ {
*largest_block_size_for_bottom_fragments = max(
*largest_block_size_for_bottom_fragments,
- inline_metrics.space_above_baseline + inline_metrics.space_below_baseline)
- }
+ inline_metrics.space_above_baseline + inline_metrics.space_below_baseline,
+ )
+ },
_ => *line_metrics = line_metrics.new_metrics_for_fragment(inline_metrics),
}
}
@@ -1244,20 +1358,22 @@ impl InlineFlow {
self.base.restyle_damage = damage;
}
- fn containing_block_range_for_flow_surrounding_fragment_at_index(&self,
- fragment_index: FragmentIndex)
- -> Range<FragmentIndex> {
+ fn containing_block_range_for_flow_surrounding_fragment_at_index(
+ &self,
+ fragment_index: FragmentIndex,
+ ) -> Range<FragmentIndex> {
let mut start_index = fragment_index;
- while start_index > FragmentIndex(0) &&
- self.fragments
- .fragments[(start_index - FragmentIndex(1)).get() as usize]
- .is_positioned() {
+ while start_index > FragmentIndex(0) && self.fragments.fragments
+ [(start_index - FragmentIndex(1)).get() as usize]
+ .is_positioned()
+ {
start_index = start_index - FragmentIndex(1)
}
let mut end_index = fragment_index + FragmentIndex(1);
while end_index < FragmentIndex(self.fragments.fragments.len() as isize) &&
- self.fragments.fragments[end_index.get() as usize].is_positioned() {
+ self.fragments.fragments[end_index.get() as usize].is_positioned()
+ {
end_index = end_index + FragmentIndex(1)
}
@@ -1265,29 +1381,32 @@ impl InlineFlow {
}
fn containing_block_range_for_flow(&self, opaque_flow: OpaqueFlow) -> Range<FragmentIndex> {
- match self.fragments.fragments.iter().position(|fragment| {
- match fragment.specific {
+ match self
+ .fragments
+ .fragments
+ .iter()
+ .position(|fragment| match fragment.specific {
SpecificFragmentInfo::InlineAbsolute(ref inline_absolute) => {
OpaqueFlow::from_flow(&*inline_absolute.flow_ref) == opaque_flow
- }
+ },
SpecificFragmentInfo::InlineAbsoluteHypothetical(
- ref inline_absolute_hypothetical) => {
- OpaqueFlow::from_flow(&*inline_absolute_hypothetical.flow_ref) == opaque_flow
- }
+ ref inline_absolute_hypothetical,
+ ) => OpaqueFlow::from_flow(&*inline_absolute_hypothetical.flow_ref) == opaque_flow,
_ => false,
- }
- }) {
+ }) {
Some(index) => {
let index = FragmentIndex(index as isize);
self.containing_block_range_for_flow_surrounding_fragment_at_index(index)
- }
+ },
None => {
// FIXME(pcwalton): This is quite wrong. We should only return the range
// surrounding the inline fragments that constitute the containing block. But this
// suffices to get Google looking right.
- Range::new(FragmentIndex(0),
- FragmentIndex(self.fragments.fragments.len() as isize))
- }
+ Range::new(
+ FragmentIndex(0),
+ FragmentIndex(self.fragments.fragments.len() as isize),
+ )
+ },
}
}
@@ -1300,10 +1419,10 @@ impl InlineFlow {
// Returns the last line that doesn't consist entirely of hypothetical boxes.
fn last_line_containing_real_fragments(&self) -> Option<&Line> {
for line in self.lines.iter().rev() {
- if (line.range.begin().get()..line.range.end().get()).any(|index| {
- !self.fragments.fragments[index as usize].is_hypothetical()
- }) {
- return Some(line)
+ if (line.range.begin().get()..line.range.end().get())
+ .any(|index| !self.fragments.fragments[index as usize].is_hypothetical())
+ {
+ return Some(line);
}
}
None
@@ -1326,15 +1445,16 @@ impl Flow for InlineFlow {
fn bubble_inline_sizes(&mut self) {
self.update_restyle_damage();
- let _scope = layout_debug_scope!("inline::bubble_inline_sizes {:x}",
- self.base.debug_id());
+ let _scope = layout_debug_scope!("inline::bubble_inline_sizes {:x}", self.base.debug_id());
let writing_mode = self.base.writing_mode;
for kid in self.base.child_iter_mut() {
kid.mut_base().floats = Floats::new(writing_mode);
}
- self.base.flags.remove(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS);
+ self.base
+ .flags
+ .remove(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS);
let mut intrinsic_sizes_for_flow = IntrinsicISizesContribution::new();
let mut intrinsic_sizes_for_inline_run = IntrinsicISizesContribution::new();
@@ -1342,31 +1462,28 @@ impl Flow for InlineFlow {
for fragment in &mut self.fragments.fragments {
let intrinsic_sizes_for_fragment = fragment.compute_intrinsic_inline_sizes().finish();
match fragment.style.get_inherited_text().white_space {
- WhiteSpace::Nowrap => {
- intrinsic_sizes_for_nonbroken_run.union_nonbreaking_inline(
- &intrinsic_sizes_for_fragment)
- }
+ WhiteSpace::Nowrap => intrinsic_sizes_for_nonbroken_run
+ .union_nonbreaking_inline(&intrinsic_sizes_for_fragment),
WhiteSpace::Pre => {
- intrinsic_sizes_for_nonbroken_run.union_nonbreaking_inline(
- &intrinsic_sizes_for_fragment);
+ intrinsic_sizes_for_nonbroken_run
+ .union_nonbreaking_inline(&intrinsic_sizes_for_fragment);
// Flush the intrinsic sizes we've been gathering up in order to handle the
// line break, if necessary.
if fragment.requires_line_break_afterward_if_wrapping_on_newlines() {
- intrinsic_sizes_for_inline_run.union_inline(
- &intrinsic_sizes_for_nonbroken_run.finish());
+ intrinsic_sizes_for_inline_run
+ .union_inline(&intrinsic_sizes_for_nonbroken_run.finish());
intrinsic_sizes_for_nonbroken_run = IntrinsicISizesContribution::new();
- intrinsic_sizes_for_flow.union_block(
- &intrinsic_sizes_for_inline_run.finish());
+ intrinsic_sizes_for_flow
+ .union_block(&intrinsic_sizes_for_inline_run.finish());
intrinsic_sizes_for_inline_run = IntrinsicISizesContribution::new();
}
- }
- WhiteSpace::PreWrap |
- WhiteSpace::PreLine => {
+ },
+ WhiteSpace::PreWrap | WhiteSpace::PreLine => {
// Flush the intrinsic sizes we were gathering up for the nonbroken run, if
// necessary.
- intrinsic_sizes_for_inline_run.union_inline(
- &intrinsic_sizes_for_nonbroken_run.finish());
+ intrinsic_sizes_for_inline_run
+ .union_inline(&intrinsic_sizes_for_nonbroken_run.finish());
intrinsic_sizes_for_nonbroken_run = IntrinsicISizesContribution::new();
intrinsic_sizes_for_nonbroken_run.union_inline(&intrinsic_sizes_for_fragment);
@@ -1374,29 +1491,33 @@ impl Flow for InlineFlow {
// Flush the intrinsic sizes we've been gathering up in order to handle the
// line break, if necessary.
if fragment.requires_line_break_afterward_if_wrapping_on_newlines() {
- intrinsic_sizes_for_inline_run.union_inline(
- &intrinsic_sizes_for_nonbroken_run.finish());
+ intrinsic_sizes_for_inline_run
+ .union_inline(&intrinsic_sizes_for_nonbroken_run.finish());
intrinsic_sizes_for_nonbroken_run = IntrinsicISizesContribution::new();
- intrinsic_sizes_for_flow.union_block(
- &intrinsic_sizes_for_inline_run.finish());
+ intrinsic_sizes_for_flow
+ .union_block(&intrinsic_sizes_for_inline_run.finish());
intrinsic_sizes_for_inline_run = IntrinsicISizesContribution::new();
}
- }
+ },
WhiteSpace::Normal => {
// Flush the intrinsic sizes we were gathering up for the nonbroken run, if
// necessary.
- intrinsic_sizes_for_inline_run.union_inline(
- &intrinsic_sizes_for_nonbroken_run.finish());
+ intrinsic_sizes_for_inline_run
+ .union_inline(&intrinsic_sizes_for_nonbroken_run.finish());
intrinsic_sizes_for_nonbroken_run = IntrinsicISizesContribution::new();
intrinsic_sizes_for_nonbroken_run.union_inline(&intrinsic_sizes_for_fragment);
- }
+ },
}
- fragment.restyle_damage.remove(ServoRestyleDamage::BUBBLE_ISIZES);
+ fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::BUBBLE_ISIZES);
if fragment.is_text_or_replaced() {
- self.base.flags.insert(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS);
+ self.base
+ .flags
+ .insert(FlowFlags::CONTAINS_TEXT_OR_REPLACED_FRAGMENTS);
}
}
@@ -1418,7 +1539,10 @@ impl Flow for InlineFlow {
// TODO: Combine this with `LineBreaker`'s walk in the fragment list, or put this into
// `Fragment`.
- debug!("InlineFlow::assign_inline_sizes: floats in: {:?}", self.base.floats);
+ debug!(
+ "InlineFlow::assign_inline_sizes: floats in: {:?}",
+ self.base.floats
+ );
let inline_size = self.base.block_container_inline_size;
let container_mode = self.base.block_container_writing_mode;
@@ -1431,7 +1555,8 @@ impl Flow for InlineFlow {
fragment.compute_border_and_padding(inline_size);
fragment.compute_block_direction_margins(inline_size);
fragment.compute_inline_direction_margins(inline_size);
- fragment.assign_replaced_inline_size_if_necessary(inline_size, container_block_size);
+ fragment
+ .assign_replaced_inline_size_if_necessary(inline_size, container_block_size);
}
}
@@ -1451,8 +1576,7 @@ impl Flow for InlineFlow {
/// Note that we do not need to do in-order traversal because the children
/// are always block formatting context.
fn assign_block_size(&mut self, layout_context: &LayoutContext) {
- let _scope = layout_debug_scope!("inline::assign_block_size {:x}",
- self.base.debug_id());
+ let _scope = layout_debug_scope!("inline::assign_block_size {:x}", self.base.debug_id());
// Divide the fragments into lines.
//
@@ -1465,7 +1589,10 @@ impl Flow for InlineFlow {
// the line's own block-size.
//
// TODO(pcwalton): Cache the line scanner?
- debug!("assign_block_size_inline: floats in: {:?}", self.base.floats);
+ debug!(
+ "assign_block_size_inline: floats in: {:?}",
+ self.base.floats
+ );
// Assign the block-size and late-computed inline-sizes for the inline fragments.
for fragment in &mut self.fragments.fragments {
@@ -1486,9 +1613,11 @@ impl Flow for InlineFlow {
};
// Perform line breaking.
- let mut scanner = LineBreaker::new(self.base.floats.clone(),
- indentation,
- &self.minimum_line_metrics);
+ let mut scanner = LineBreaker::new(
+ self.base.floats.clone(),
+ indentation,
+ &self.minimum_line_metrics,
+ );
scanner.scan_for_lines(self, layout_context);
// Now, go through each line and lay out the fragments inside.
@@ -1496,17 +1625,21 @@ impl Flow for InlineFlow {
for (line_index, line) in self.lines.iter_mut().enumerate() {
// Lay out fragments in the inline direction, and justify them if
// necessary.
- InlineFlow::set_inline_fragment_positions(&mut self.fragments,
- line,
- self.base.flags.text_align(),
- indentation,
- line_index + 1 == line_count);
+ InlineFlow::set_inline_fragment_positions(
+ &mut self.fragments,
+ line,
+ self.base.flags.text_align(),
+ indentation,
+ line_index + 1 == line_count,
+ );
// Compute the final positions in the block direction of each fragment.
- InlineFlow::set_block_fragment_positions(&mut self.fragments,
- line,
- &self.minimum_line_metrics,
- layout_context);
+ InlineFlow::set_block_fragment_positions(
+ &mut self.fragments,
+ line,
+ &self.minimum_line_metrics,
+ layout_context,
+ );
// This is used to set the block-start position of the next line in
// the next iteration of the loop. We're no longer on the first
@@ -1529,36 +1662,39 @@ impl Flow for InlineFlow {
self.base.floats = scanner.floats.clone();
let writing_mode = self.base.floats.writing_mode;
- self.base.floats.translate(LogicalSize::new(writing_mode,
- Au(0),
- -self.base.position.size.block));
-
- let containing_block_size = LogicalSize::new(writing_mode,
- Au(0),
- self.base.position.size.block);
- self.mutate_fragments(&mut |f: &mut Fragment| {
- match f.specific {
- SpecificFragmentInfo::InlineBlock(ref mut info) => {
- let block = FlowRef::deref_mut(&mut info.flow_ref);
- block.mut_base().early_absolute_position_info = EarlyAbsolutePositionInfo {
- relative_containing_block_size: containing_block_size,
- relative_containing_block_mode: writing_mode,
- };
- }
- SpecificFragmentInfo::InlineAbsolute(ref mut info) => {
- let block = FlowRef::deref_mut(&mut info.flow_ref);
- block.mut_base().early_absolute_position_info = EarlyAbsolutePositionInfo {
- relative_containing_block_size: containing_block_size,
- relative_containing_block_mode: writing_mode,
- };
- }
- _ => (),
- }
+ self.base.floats.translate(LogicalSize::new(
+ writing_mode,
+ Au(0),
+ -self.base.position.size.block,
+ ));
+
+ let containing_block_size =
+ LogicalSize::new(writing_mode, Au(0), self.base.position.size.block);
+ self.mutate_fragments(&mut |f: &mut Fragment| match f.specific {
+ SpecificFragmentInfo::InlineBlock(ref mut info) => {
+ let block = FlowRef::deref_mut(&mut info.flow_ref);
+ block.mut_base().early_absolute_position_info = EarlyAbsolutePositionInfo {
+ relative_containing_block_size: containing_block_size,
+ relative_containing_block_mode: writing_mode,
+ };
+ },
+ SpecificFragmentInfo::InlineAbsolute(ref mut info) => {
+ let block = FlowRef::deref_mut(&mut info.flow_ref);
+ block.mut_base().early_absolute_position_info = EarlyAbsolutePositionInfo {
+ relative_containing_block_size: containing_block_size,
+ relative_containing_block_mode: writing_mode,
+ };
+ },
+ _ => (),
});
- self.base.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.base
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
for fragment in &mut self.fragments.fragments {
- fragment.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
}
}
@@ -1577,45 +1713,51 @@ impl Flow for InlineFlow {
for (fragment_index, fragment) in self.fragments.fragments.iter().enumerate() {
match fragment.specific {
SpecificFragmentInfo::InlineAbsolute(_) => {
- let containing_block_range =
- self.containing_block_range_for_flow_surrounding_fragment_at_index(
- FragmentIndex(fragment_index as isize));
+ let containing_block_range = self
+ .containing_block_range_for_flow_surrounding_fragment_at_index(
+ FragmentIndex(fragment_index as isize),
+ );
let first_fragment_index = containing_block_range.begin().get() as usize;
debug_assert!(first_fragment_index < self.fragments.fragments.len());
let first_fragment = &self.fragments.fragments[first_fragment_index];
let padding_box_origin = (first_fragment.border_box -
- first_fragment.style.logical_border_width()).start;
+ first_fragment.style.logical_border_width()).start;
containing_block_positions.push(
- padding_box_origin.to_physical(self.base.writing_mode, container_size));
- }
+ padding_box_origin.to_physical(self.base.writing_mode, container_size),
+ );
+ },
SpecificFragmentInfo::InlineBlock(_) if fragment.is_positioned() => {
- let containing_block_range =
- self.containing_block_range_for_flow_surrounding_fragment_at_index(
- FragmentIndex(fragment_index as isize));
+ let containing_block_range = self
+ .containing_block_range_for_flow_surrounding_fragment_at_index(
+ FragmentIndex(fragment_index as isize),
+ );
let first_fragment_index = containing_block_range.begin().get() as usize;
debug_assert!(first_fragment_index < self.fragments.fragments.len());
let first_fragment = &self.fragments.fragments[first_fragment_index];
let padding_box_origin = (first_fragment.border_box -
- first_fragment.style.logical_border_width()).start;
+ first_fragment.style.logical_border_width()).start;
containing_block_positions.push(
- padding_box_origin.to_physical(self.base.writing_mode, container_size));
- }
- _ => {}
+ padding_box_origin.to_physical(self.base.writing_mode, container_size),
+ );
+ },
+ _ => {},
}
}
// Then compute the positions of all of our fragments.
let mut containing_block_positions = containing_block_positions.iter();
for fragment in &mut self.fragments.fragments {
- let stacking_relative_border_box =
- fragment.stacking_relative_border_box(&self.base.stacking_relative_position,
- &self.base
- .early_absolute_position_info
- .relative_containing_block_size,
- self.base
- .early_absolute_position_info
- .relative_containing_block_mode,
- CoordinateSystem::Parent);
+ let stacking_relative_border_box = fragment.stacking_relative_border_box(
+ &self.base.stacking_relative_position,
+ &self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size,
+ self.base
+ .early_absolute_position_info
+ .relative_containing_block_mode,
+ CoordinateSystem::Parent,
+ );
let stacking_relative_content_box =
fragment.stacking_relative_content_box(stacking_relative_border_box);
@@ -1630,9 +1772,10 @@ impl Flow for InlineFlow {
let stacking_relative_position = self.base.stacking_relative_position;
if is_positioned {
let padding_box_origin = containing_block_positions.next().unwrap();
- block_flow.base
- .late_absolute_position_info
- .stacking_relative_position_of_absolute_containing_block =
+ block_flow
+ .base
+ .late_absolute_position_info
+ .stacking_relative_position_of_absolute_containing_block =
*padding_box_origin + stacking_relative_position;
}
@@ -1642,7 +1785,7 @@ impl Flow for InlineFlow {
// Write the clip in our coordinate system into the child flow. (The kid will
// fix it up to be in its own coordinate system if necessary.)
block_flow.base.clip = self.base.clip.clone()
- }
+ },
SpecificFragmentInfo::InlineAbsoluteHypothetical(ref mut info) => {
let flow = FlowRef::deref_mut(&mut info.flow_ref);
let block_flow = flow.as_mut_block();
@@ -1654,7 +1797,7 @@ impl Flow for InlineFlow {
// As above, this is in our coordinate system for now.
block_flow.base.clip = self.base.clip.clone()
- }
+ },
SpecificFragmentInfo::InlineAbsolute(ref mut info) => {
let flow = FlowRef::deref_mut(&mut info.flow_ref);
let block_flow = flow.as_mut_block();
@@ -1663,9 +1806,10 @@ impl Flow for InlineFlow {
let stacking_relative_position = self.base.stacking_relative_position;
let padding_box_origin = containing_block_positions.next().unwrap();
- block_flow.base
- .late_absolute_position_info
- .stacking_relative_position_of_absolute_containing_block =
+ block_flow
+ .base
+ .late_absolute_position_info
+ .stacking_relative_position_of_absolute_containing_block =
*padding_box_origin + stacking_relative_position;
block_flow.base.stacking_relative_position =
@@ -1673,8 +1817,8 @@ impl Flow for InlineFlow {
// As above, this is in our coordinate system for now.
block_flow.base.clip = self.base.clip.clone()
- }
- _ => {}
+ },
+ _ => {},
}
}
}
@@ -1696,36 +1840,48 @@ impl Flow for InlineFlow {
fn compute_overflow(&self) -> Overflow {
let mut overflow = Overflow::new();
let flow_size = self.base.position.size.to_physical(self.base.writing_mode);
- let relative_containing_block_size =
- &self.base.early_absolute_position_info.relative_containing_block_size;
+ let relative_containing_block_size = &self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size;
for fragment in &self.fragments.fragments {
overflow.union(&fragment.compute_overflow(&flow_size, &relative_containing_block_size))
}
overflow
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
// FIXME(#2795): Get the real container size.
for fragment in &self.fragments.fragments {
if !iterator.should_process(fragment) {
- continue
+ continue;
}
let stacking_relative_position = &self.base.stacking_relative_position;
- let relative_containing_block_size =
- &self.base.early_absolute_position_info.relative_containing_block_size;
- let relative_containing_block_mode =
- self.base.early_absolute_position_info.relative_containing_block_mode;
- iterator.process(fragment,
- level,
- &fragment.stacking_relative_border_box(stacking_relative_position,
- relative_containing_block_size,
- relative_containing_block_mode,
- CoordinateSystem::Own)
- .translate(&stacking_context_position.to_vector()))
+ let relative_containing_block_size = &self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size;
+ let relative_containing_block_mode = self
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_mode;
+ iterator.process(
+ fragment,
+ level,
+ &fragment
+ .stacking_relative_border_box(
+ stacking_relative_position,
+ relative_containing_block_size,
+ relative_containing_block_mode,
+ CoordinateSystem::Own,
+ ).translate(&stacking_context_position.to_vector()),
+ )
}
}
@@ -1736,13 +1892,17 @@ impl Flow for InlineFlow {
}
fn contains_positioned_fragments(&self) -> bool {
- self.fragments.fragments.iter().any(|fragment| fragment.is_positioned())
+ self.fragments
+ .fragments
+ .iter()
+ .any(|fragment| fragment.is_positioned())
}
fn contains_relatively_positioned_fragments(&self) -> bool {
- self.fragments.fragments.iter().any(|fragment| {
- fragment.style.get_box().position == Position::Relative
- })
+ self.fragments
+ .fragments
+ .iter()
+ .any(|fragment| fragment.style.get_box().position == Position::Relative)
}
fn generated_containing_block_size(&self, for_flow: OpaqueFlow) -> LogicalSize<Au> {
@@ -1750,12 +1910,12 @@ impl Flow for InlineFlow {
for index in self.containing_block_range_for_flow(for_flow).each_index() {
let fragment = &self.fragments.fragments[index.get() as usize];
if fragment.is_absolutely_positioned() {
- continue
+ continue;
}
- containing_block_size.inline = containing_block_size.inline +
- fragment.border_box.size.inline;
- containing_block_size.block = max(containing_block_size.block,
- fragment.border_box.size.block);
+ containing_block_size.inline =
+ containing_block_size.inline + fragment.border_box.size.inline;
+ containing_block_size.block =
+ max(containing_block_size.block, fragment.border_box.size.block);
}
containing_block_size
}
@@ -1769,11 +1929,13 @@ impl Flow for InlineFlow {
impl fmt::Debug for InlineFlow {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f,
- "{:?}({:x}) {:?}",
- self.class(),
- self.base.debug_id(),
- self.base())
+ write!(
+ f,
+ "{:?}({:x}) {:?}",
+ self.class(),
+ self.base.debug_id(),
+ self.base()
+ )
}
}
@@ -1808,36 +1970,38 @@ pub struct InlineFragmentContext {
impl InlineFragmentContext {
pub fn new() -> InlineFragmentContext {
- InlineFragmentContext {
- nodes: vec!(),
- }
+ InlineFragmentContext { nodes: vec![] }
}
#[inline]
pub fn contains_node(&self, node_address: OpaqueNode) -> bool {
- self.nodes.iter().position(|node| node.address == node_address).is_some()
+ self.nodes
+ .iter()
+ .position(|node| node.address == node_address)
+ .is_some()
}
fn ptr_eq(&self, other: &InlineFragmentContext) -> bool {
if self.nodes.len() != other.nodes.len() {
- return false
+ return false;
}
for (this_node, other_node) in self.nodes.iter().zip(&other.nodes) {
if this_node.address != other_node.address {
- return false
+ return false;
}
}
true
}
}
-fn inline_contexts_are_equal(inline_context_a: &Option<InlineFragmentContext>,
- inline_context_b: &Option<InlineFragmentContext>)
- -> bool {
+fn inline_contexts_are_equal(
+ inline_context_a: &Option<InlineFragmentContext>,
+ inline_context_b: &Option<InlineFragmentContext>,
+) -> bool {
match (inline_context_a, inline_context_b) {
(&Some(ref inline_context_a), &Some(ref inline_context_b)) => {
inline_context_a.ptr_eq(inline_context_b)
- }
+ },
(&None, &None) => true,
(&Some(_), &None) | (&None, &Some(_)) => false,
}
@@ -1916,27 +2080,33 @@ impl LineMetrics {
/// with a fragment with the given metrics.
fn new_metrics_for_fragment(&self, fragment_inline_metrics: &InlineMetrics) -> LineMetrics {
LineMetrics {
- space_above_baseline: max(self.space_above_baseline,
- fragment_inline_metrics.space_above_baseline),
- space_below_baseline: max(self.space_below_baseline,
- fragment_inline_metrics.space_below_baseline),
- }
- }
-
- fn for_line_and_fragment(line: &Line, fragment: &Fragment, layout_context: &LayoutContext)
- -> LineMetrics {
+ space_above_baseline: max(
+ self.space_above_baseline,
+ fragment_inline_metrics.space_above_baseline,
+ ),
+ space_below_baseline: max(
+ self.space_below_baseline,
+ fragment_inline_metrics.space_below_baseline,
+ ),
+ }
+ }
+
+ fn for_line_and_fragment(
+ line: &Line,
+ fragment: &Fragment,
+ layout_context: &LayoutContext,
+ ) -> LineMetrics {
if !fragment.is_hypothetical() {
let space_above_baseline = line.metrics.space_above_baseline;
return LineMetrics {
space_above_baseline: space_above_baseline,
space_below_baseline: line.bounds.size.block - space_above_baseline,
- }
+ };
}
let hypothetical_line_metrics = line.new_metrics_for_fragment(fragment, layout_context);
- let hypothetical_block_size = line.new_block_size_for_fragment(fragment,
- &hypothetical_line_metrics,
- layout_context);
+ let hypothetical_block_size =
+ line.new_block_size_for_fragment(fragment, &hypothetical_line_metrics, layout_context);
let hypothetical_space_above_baseline = hypothetical_line_metrics.space_above_baseline;
LineMetrics {
space_above_baseline: hypothetical_space_above_baseline,
@@ -1949,4 +2119,3 @@ impl LineMetrics {
self.space_above_baseline + self.space_below_baseline
}
}
-
diff --git a/components/layout/layout_debug.rs b/components/layout/layout_debug.rs
index 26fd4fb3e3f..70b73d9b6fd 100644
--- a/components/layout/layout_debug.rs
+++ b/components/layout/layout_debug.rs
@@ -47,7 +47,7 @@ impl ScopeData {
name: name,
pre: pre,
post: Value::Null,
- children: vec!(),
+ children: vec![],
}
}
}
diff --git a/components/layout/lib.rs b/components/layout/lib.rs
index c0c5633ca24..ce47eb72620 100644
--- a/components/layout/lib.rs
+++ b/components/layout/lib.rs
@@ -14,7 +14,8 @@ extern crate fnv;
extern crate fxhash;
extern crate gfx;
extern crate gfx_traits;
-#[macro_use] extern crate html5ever;
+#[macro_use]
+extern crate html5ever;
extern crate ipc_channel;
extern crate libc;
#[macro_use]
@@ -30,7 +31,8 @@ extern crate range;
extern crate rayon;
extern crate script_layout_interface;
extern crate script_traits;
-#[macro_use] extern crate serde;
+#[macro_use]
+extern crate serde;
extern crate serde_json;
extern crate servo_arc;
extern crate servo_atoms;
diff --git a/components/layout/list_item.rs b/components/layout/list_item.rs
index a658aebb3e9..72e87578635 100644
--- a/components/layout/list_item.rs
+++ b/components/layout/list_item.rs
@@ -40,10 +40,11 @@ pub struct ListItemFlow {
}
impl ListItemFlow {
- pub fn from_fragments_and_flotation(main_fragment: Fragment,
- marker_fragments: Vec<Fragment>,
- flotation: Option<FloatKind>)
- -> ListItemFlow {
+ pub fn from_fragments_and_flotation(
+ main_fragment: Fragment,
+ marker_fragments: Vec<Fragment>,
+ flotation: Option<FloatKind>,
+ ) -> ListItemFlow {
let mut this = ListItemFlow {
block_flow: BlockFlow::from_fragment_and_float_kind(main_fragment, flotation),
marker_fragments: marker_fragments,
@@ -56,8 +57,12 @@ impl ListItemFlow {
ListStyleType::Circle |
ListStyleType::Square |
ListStyleType::DisclosureOpen |
- ListStyleType::DisclosureClosed => {}
- _ => this.block_flow.base.restyle_damage.insert(ServoRestyleDamage::RESOLVE_GENERATED_CONTENT),
+ ListStyleType::DisclosureClosed => {},
+ _ => this
+ .block_flow
+ .base
+ .restyle_damage
+ .insert(ServoRestyleDamage::RESOLVE_GENERATED_CONTENT),
}
}
@@ -77,20 +82,29 @@ impl ListItemFlow {
let available_rect = base.floats.available_rect(
-base.position.size.block,
base.position.size.block,
- base.block_container_inline_size);
- let mut marker_inline_start = available_rect.unwrap_or(self.block_flow.fragment.border_box).start.i;
+ base.block_container_inline_size,
+ );
+ let mut marker_inline_start = available_rect
+ .unwrap_or(self.block_flow.fragment.border_box)
+ .start
+ .i;
for marker in self.marker_fragments.iter_mut().rev() {
- let container_block_size =
- self.block_flow.explicit_block_containing_size(layout_context.shared_context());
- marker.assign_replaced_inline_size_if_necessary(base.block_container_inline_size, container_block_size);
+ let container_block_size = self
+ .block_flow
+ .explicit_block_containing_size(layout_context.shared_context());
+ marker.assign_replaced_inline_size_if_necessary(
+ base.block_container_inline_size,
+ container_block_size,
+ );
// Do this now. There's no need to do this in bubble-widths, since markers do not
// contribute to the inline size of this flow.
let intrinsic_inline_sizes = marker.compute_intrinsic_inline_sizes();
- marker.border_box.size.inline =
- intrinsic_inline_sizes.content_intrinsic_sizes.preferred_inline_size;
+ marker.border_box.size.inline = intrinsic_inline_sizes
+ .content_intrinsic_sizes
+ .preferred_inline_size;
marker_inline_start = marker_inline_start - marker.border_box.size.inline;
marker.border_box.start.i = marker_inline_start;
}
@@ -99,18 +113,22 @@ impl ListItemFlow {
fn assign_marker_block_sizes(&mut self, layout_context: &LayoutContext) {
// FIXME(pcwalton): Do this during flow construction, like `InlineFlow` does?
let marker_line_metrics = with_thread_local_font_context(layout_context, |font_context| {
- InlineFlow::minimum_line_metrics_for_fragments(&self.marker_fragments,
- font_context,
- &*self.block_flow.fragment.style)
+ InlineFlow::minimum_line_metrics_for_fragments(
+ &self.marker_fragments,
+ font_context,
+ &*self.block_flow.fragment.style,
+ )
});
for marker in &mut self.marker_fragments {
marker.assign_replaced_block_size_if_necessary();
- let marker_inline_metrics = marker.aligned_inline_metrics(layout_context,
- &marker_line_metrics,
- Some(&marker_line_metrics));
- marker.border_box.start.b = marker_line_metrics.space_above_baseline -
- marker_inline_metrics.ascent;
+ let marker_inline_metrics = marker.aligned_inline_metrics(
+ layout_context,
+ &marker_line_metrics,
+ Some(&marker_line_metrics),
+ );
+ marker.border_box.start.b =
+ marker_line_metrics.space_above_baseline - marker_inline_metrics.ascent;
}
}
}
@@ -144,7 +162,8 @@ impl Flow for ListItemFlow {
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context)
+ self.block_flow
+ .compute_stacking_relative_position(layout_context)
}
fn place_float_if_applicable<'a>(&mut self) {
@@ -160,11 +179,13 @@ impl Flow for ListItemFlow {
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
@@ -181,9 +202,17 @@ impl Flow for ListItemFlow {
fn compute_overflow(&self) -> Overflow {
let mut overflow = self.block_flow.compute_overflow();
- let flow_size = self.block_flow.base.position.size.to_physical(self.block_flow.base.writing_mode);
- let relative_containing_block_size =
- &self.block_flow.base.early_absolute_position_info.relative_containing_block_size;
+ let flow_size = self
+ .block_flow
+ .base
+ .position
+ .size
+ .to_physical(self.block_flow.base.writing_mode);
+ let relative_containing_block_size = &self
+ .block_flow
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size;
for fragment in &self.marker_fragments {
overflow.union(&fragment.compute_overflow(&flow_size, &relative_containing_block_size))
@@ -200,32 +229,38 @@ impl Flow for ListItemFlow {
self.block_flow.positioning()
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator,
- level,
- stacking_context_position);
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ );
for marker in &self.marker_fragments {
if iterator.should_process(marker) {
iterator.process(
marker,
level,
- &marker.stacking_relative_border_box(&self.block_flow
- .base
- .stacking_relative_position,
- &self.block_flow
- .base
- .early_absolute_position_info
- .relative_containing_block_size,
- self.block_flow
- .base
- .early_absolute_position_info
- .relative_containing_block_mode,
- CoordinateSystem::Own)
- .translate(&stacking_context_position.to_vector()));
+ &marker
+ .stacking_relative_border_box(
+ &self.block_flow.base.stacking_relative_position,
+ &self
+ .block_flow
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_size,
+ self.block_flow
+ .base
+ .early_absolute_position_info
+ .relative_containing_block_mode,
+ CoordinateSystem::Own,
+ ).translate(&stacking_context_position.to_vector()),
+ );
}
}
}
@@ -260,7 +295,7 @@ impl ListStyleTypeContent {
ListStyleType::DisclosureClosed => {
let text = generated_content::static_representation(list_style_type);
ListStyleTypeContent::StaticText(text)
- }
+ },
_ => ListStyleTypeContent::GeneratedContent(Box::new(GeneratedContentInfo::ListItem)),
}
}
diff --git a/components/layout/model.rs b/components/layout/model.rs
index 5d5238ece77..50959398f27 100644
--- a/components/layout/model.rs
+++ b/components/layout/model.rs
@@ -126,21 +126,22 @@ impl MarginCollapseInfo {
}
}
- pub fn finish_and_compute_collapsible_margins(mut self,
- fragment: &Fragment,
- containing_block_size: Option<Au>,
- can_collapse_block_end_margin_with_kids: bool,
- mut may_collapse_through: bool)
- -> (CollapsibleMargins, Au) {
+ pub fn finish_and_compute_collapsible_margins(
+ mut self,
+ fragment: &Fragment,
+ containing_block_size: Option<Au>,
+ can_collapse_block_end_margin_with_kids: bool,
+ mut may_collapse_through: bool,
+ ) -> (CollapsibleMargins, Au) {
let state = match self.state {
MarginCollapseState::AccumulatingCollapsibleTopMargin => {
- may_collapse_through = may_collapse_through &&
- match fragment.style().content_block_size() {
+ may_collapse_through =
+ may_collapse_through && match fragment.style().content_block_size() {
LengthOrPercentageOrAuto::Auto => true,
LengthOrPercentageOrAuto::Length(l) => l.px() == 0.,
LengthOrPercentageOrAuto::Percentage(v) => {
v.0 == 0. || containing_block_size.is_none()
- }
+ },
LengthOrPercentageOrAuto::Calc(_) => false,
};
@@ -156,14 +157,14 @@ impl MarginCollapseInfo {
// If the fragment has non-zero min-block-size, margins may not
// collapse through it.
FinalMarginState::BottomMarginCollapses
- }
+ },
}
} else {
// If the fragment has an explicitly specified block-size, margins may not
// collapse through it.
FinalMarginState::BottomMarginCollapses
}
- }
+ },
MarginCollapseState::AccumulatingMarginIn => FinalMarginState::BottomMarginCollapses,
};
@@ -174,27 +175,41 @@ impl MarginCollapseInfo {
match state {
FinalMarginState::MarginsCollapseThrough => {
let advance = self.block_start_margin.collapse();
- self.margin_in.union(AdjoiningMargins::from_margin(block_end_margin));
- (CollapsibleMargins::Collapse(self.block_start_margin, self.margin_in),
- advance)
- }
+ self.margin_in
+ .union(AdjoiningMargins::from_margin(block_end_margin));
+ (
+ CollapsibleMargins::Collapse(self.block_start_margin, self.margin_in),
+ advance,
+ )
+ },
FinalMarginState::BottomMarginCollapses => {
let advance = self.margin_in.collapse();
- self.margin_in.union(AdjoiningMargins::from_margin(block_end_margin));
- (CollapsibleMargins::Collapse(self.block_start_margin, self.margin_in),
- advance)
- }
+ self.margin_in
+ .union(AdjoiningMargins::from_margin(block_end_margin));
+ (
+ CollapsibleMargins::Collapse(self.block_start_margin, self.margin_in),
+ advance,
+ )
+ },
}
} else {
match state {
FinalMarginState::MarginsCollapseThrough => {
- self.block_start_margin.union(AdjoiningMargins::from_margin(block_end_margin));
- (CollapsibleMargins::CollapseThrough(self.block_start_margin), Au(0))
- }
+ self.block_start_margin
+ .union(AdjoiningMargins::from_margin(block_end_margin));
+ (
+ CollapsibleMargins::CollapseThrough(self.block_start_margin),
+ Au(0),
+ )
+ },
FinalMarginState::BottomMarginCollapses => {
- self.margin_in.union(AdjoiningMargins::from_margin(block_end_margin));
- (CollapsibleMargins::Collapse(self.block_start_margin, self.margin_in), Au(0))
- }
+ self.margin_in
+ .union(AdjoiningMargins::from_margin(block_end_margin));
+ (
+ CollapsibleMargins::Collapse(self.block_start_margin, self.margin_in),
+ Au(0),
+ )
+ },
}
}
}
@@ -206,7 +221,7 @@ impl MarginCollapseInfo {
// needs to be positioned relative to our *border box*, not our margin box. See
// `tests/ref/float_under_top_margin_a.html`.
Au(0)
- }
+ },
MarginCollapseState::AccumulatingMarginIn => self.margin_in.collapse(),
}
}
@@ -214,78 +229,99 @@ impl MarginCollapseInfo {
/// Adds the child's potentially collapsible block-start margin to the current margin state and
/// advances the Y offset by the appropriate amount to handle that margin. Returns the amount
/// that should be added to the Y offset during block layout.
- pub fn advance_block_start_margin(&mut self,
- child_collapsible_margins: &CollapsibleMargins,
- can_collapse_block_start_margin: bool)
- -> Au {
+ pub fn advance_block_start_margin(
+ &mut self,
+ child_collapsible_margins: &CollapsibleMargins,
+ can_collapse_block_start_margin: bool,
+ ) -> Au {
if !can_collapse_block_start_margin {
self.state = MarginCollapseState::AccumulatingMarginIn
}
match (self.state, *child_collapsible_margins) {
- (MarginCollapseState::AccumulatingCollapsibleTopMargin,
- CollapsibleMargins::None(block_start, _)) => {
+ (
+ MarginCollapseState::AccumulatingCollapsibleTopMargin,
+ CollapsibleMargins::None(block_start, _),
+ ) => {
self.state = MarginCollapseState::AccumulatingMarginIn;
block_start
- }
- (MarginCollapseState::AccumulatingCollapsibleTopMargin,
- CollapsibleMargins::Collapse(block_start, _)) => {
+ },
+ (
+ MarginCollapseState::AccumulatingCollapsibleTopMargin,
+ CollapsibleMargins::Collapse(block_start, _),
+ ) => {
self.block_start_margin.union(block_start);
self.state = MarginCollapseState::AccumulatingMarginIn;
Au(0)
- }
- (MarginCollapseState::AccumulatingMarginIn,
- CollapsibleMargins::None(block_start, _)) => {
+ },
+ (
+ MarginCollapseState::AccumulatingMarginIn,
+ CollapsibleMargins::None(block_start, _),
+ ) => {
let previous_margin_value = self.margin_in.collapse();
self.margin_in = AdjoiningMargins::new();
previous_margin_value + block_start
- }
- (MarginCollapseState::AccumulatingMarginIn,
- CollapsibleMargins::Collapse(block_start, _)) => {
+ },
+ (
+ MarginCollapseState::AccumulatingMarginIn,
+ CollapsibleMargins::Collapse(block_start, _),
+ ) => {
self.margin_in.union(block_start);
let margin_value = self.margin_in.collapse();
self.margin_in = AdjoiningMargins::new();
margin_value
- }
+ },
(_, CollapsibleMargins::CollapseThrough(_)) => {
// For now, we ignore this; this will be handled by `advance_block_end_margin`
// below.
Au(0)
- }
+ },
}
}
/// Adds the child's potentially collapsible block-end margin to the current margin state and
/// advances the Y offset by the appropriate amount to handle that margin. Returns the amount
/// that should be added to the Y offset during block layout.
- pub fn advance_block_end_margin(&mut self, child_collapsible_margins: &CollapsibleMargins)
- -> Au {
+ pub fn advance_block_end_margin(
+ &mut self,
+ child_collapsible_margins: &CollapsibleMargins,
+ ) -> Au {
match (self.state, *child_collapsible_margins) {
- (MarginCollapseState::AccumulatingCollapsibleTopMargin, CollapsibleMargins::None(..)) |
- (MarginCollapseState::AccumulatingCollapsibleTopMargin,
- CollapsibleMargins::Collapse(..)) => {
+ (
+ MarginCollapseState::AccumulatingCollapsibleTopMargin,
+ CollapsibleMargins::None(..),
+ ) |
+ (
+ MarginCollapseState::AccumulatingCollapsibleTopMargin,
+ CollapsibleMargins::Collapse(..),
+ ) => {
// Can't happen because the state will have been replaced with
// `MarginCollapseState::AccumulatingMarginIn` above.
panic!("should not be accumulating collapsible block_start margins anymore!")
- }
- (MarginCollapseState::AccumulatingCollapsibleTopMargin,
- CollapsibleMargins::CollapseThrough(margin)) => {
+ },
+ (
+ MarginCollapseState::AccumulatingCollapsibleTopMargin,
+ CollapsibleMargins::CollapseThrough(margin),
+ ) => {
self.block_start_margin.union(margin);
Au(0)
- }
- (MarginCollapseState::AccumulatingMarginIn,
- CollapsibleMargins::None(_, block_end)) => {
+ },
+ (MarginCollapseState::AccumulatingMarginIn, CollapsibleMargins::None(_, block_end)) => {
assert_eq!(self.margin_in.most_positive, Au(0));
assert_eq!(self.margin_in.most_negative, Au(0));
block_end
- }
- (MarginCollapseState::AccumulatingMarginIn,
- CollapsibleMargins::Collapse(_, block_end)) |
- (MarginCollapseState::AccumulatingMarginIn,
- CollapsibleMargins::CollapseThrough(block_end)) => {
+ },
+ (
+ MarginCollapseState::AccumulatingMarginIn,
+ CollapsibleMargins::Collapse(_, block_end),
+ ) |
+ (
+ MarginCollapseState::AccumulatingMarginIn,
+ CollapsibleMargins::CollapseThrough(block_end),
+ ) => {
self.margin_in.union(block_end);
Au(0)
- }
+ },
}
}
}
@@ -309,7 +345,11 @@ pub struct IntrinsicISizes {
impl fmt::Debug for IntrinsicISizes {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "min={:?}, pref={:?}", self.minimum_inline_size, self.preferred_inline_size)
+ write!(
+ f,
+ "min={:?}, pref={:?}",
+ self.minimum_inline_size, self.preferred_inline_size
+ )
}
}
@@ -345,9 +385,9 @@ impl IntrinsicISizesContribution {
pub fn finish(self) -> IntrinsicISizes {
IntrinsicISizes {
minimum_inline_size: self.content_intrinsic_sizes.minimum_inline_size +
- self.surrounding_size,
+ self.surrounding_size,
preferred_inline_size: self.content_intrinsic_sizes.preferred_inline_size +
- self.surrounding_size,
+ self.surrounding_size,
}
}
@@ -358,8 +398,10 @@ impl IntrinsicISizesContribution {
/// FIXME(pcwalton): This is incorrect when the inline fragment contains forced line breaks
/// (e.g. `<br>` or `white-space: pre`).
pub fn union_inline(&mut self, sizes: &IntrinsicISizes) {
- self.content_intrinsic_sizes.minimum_inline_size =
- max(self.content_intrinsic_sizes.minimum_inline_size, sizes.minimum_inline_size);
+ self.content_intrinsic_sizes.minimum_inline_size = max(
+ self.content_intrinsic_sizes.minimum_inline_size,
+ sizes.minimum_inline_size,
+ );
self.content_intrinsic_sizes.preferred_inline_size =
self.content_intrinsic_sizes.preferred_inline_size + sizes.preferred_inline_size
}
@@ -382,10 +424,14 @@ impl IntrinsicISizesContribution {
///
/// This is used when contributing the intrinsic sizes for individual fragments.
pub fn union_block(&mut self, sizes: &IntrinsicISizes) {
- self.content_intrinsic_sizes.minimum_inline_size =
- max(self.content_intrinsic_sizes.minimum_inline_size, sizes.minimum_inline_size);
- self.content_intrinsic_sizes.preferred_inline_size =
- max(self.content_intrinsic_sizes.preferred_inline_size, sizes.preferred_inline_size)
+ self.content_intrinsic_sizes.minimum_inline_size = max(
+ self.content_intrinsic_sizes.minimum_inline_size,
+ sizes.minimum_inline_size,
+ );
+ self.content_intrinsic_sizes.preferred_inline_size = max(
+ self.content_intrinsic_sizes.preferred_inline_size,
+ sizes.preferred_inline_size,
+ )
}
}
@@ -398,17 +444,16 @@ pub enum MaybeAuto {
impl MaybeAuto {
#[inline]
- pub fn from_style(length: LengthOrPercentageOrAuto, containing_length: Au)
- -> MaybeAuto {
+ pub fn from_style(length: LengthOrPercentageOrAuto, containing_length: Au) -> MaybeAuto {
match length {
LengthOrPercentageOrAuto::Auto => MaybeAuto::Auto,
LengthOrPercentageOrAuto::Percentage(percent) => {
MaybeAuto::Specified(containing_length.scale_by(percent.0))
- }
+ },
LengthOrPercentageOrAuto::Calc(calc) => {
MaybeAuto::from_option(calc.to_used_value(Some(containing_length)))
- }
- LengthOrPercentageOrAuto::Length(length) => MaybeAuto::Specified(Au::from(length))
+ },
+ LengthOrPercentageOrAuto::Length(length) => MaybeAuto::Specified(Au::from(length)),
}
}
@@ -442,7 +487,10 @@ impl MaybeAuto {
}
#[inline]
- pub fn map<F>(&self, mapper: F) -> MaybeAuto where F: FnOnce(Au) -> Au {
+ pub fn map<F>(&self, mapper: F) -> MaybeAuto
+ where
+ F: FnOnce(Au) -> Au,
+ {
match *self {
MaybeAuto::Auto => MaybeAuto::Auto,
MaybeAuto::Specified(value) => MaybeAuto::Specified(mapper(value)),
@@ -453,15 +501,17 @@ impl MaybeAuto {
/// Receive an optional container size and return used value for width or height.
///
/// `style_length`: content size as given in the CSS.
-pub fn style_length(style_length: LengthOrPercentageOrAuto,
- container_size: Option<Au>) -> MaybeAuto {
+pub fn style_length(
+ style_length: LengthOrPercentageOrAuto,
+ container_size: Option<Au>,
+) -> MaybeAuto {
match container_size {
Some(length) => MaybeAuto::from_style(style_length, length),
None => if let LengthOrPercentageOrAuto::Length(length) = style_length {
MaybeAuto::Specified(Au::from(length))
} else {
MaybeAuto::Auto
- }
+ },
}
}
@@ -475,25 +525,37 @@ pub fn style_length(style_length: LengthOrPercentageOrAuto,
/// [1]: https://drafts.csswg.org/css-backgrounds-3/#border-radius
pub fn specified_border_radius(
radius: BorderCornerRadius,
- containing_size: Size2D<Au>)
- -> Size2D<Au>
-{
+ containing_size: Size2D<Au>,
+) -> Size2D<Au> {
let w = radius.0.width().to_used_value(containing_size.width);
let h = radius.0.height().to_used_value(containing_size.height);
Size2D::new(w, h)
}
#[inline]
-pub fn padding_from_style(style: &ComputedValues,
- containing_block_inline_size: Au,
- writing_mode: WritingMode)
- -> LogicalMargin<Au> {
+pub fn padding_from_style(
+ style: &ComputedValues,
+ containing_block_inline_size: Au,
+ writing_mode: WritingMode,
+) -> LogicalMargin<Au> {
let padding_style = style.get_padding();
- LogicalMargin::from_physical(writing_mode, SideOffsets2D::new(
- padding_style.padding_top.to_used_value(containing_block_inline_size),
- padding_style.padding_right.to_used_value(containing_block_inline_size),
- padding_style.padding_bottom.to_used_value(containing_block_inline_size),
- padding_style.padding_left.to_used_value(containing_block_inline_size)))
+ LogicalMargin::from_physical(
+ writing_mode,
+ SideOffsets2D::new(
+ padding_style
+ .padding_top
+ .to_used_value(containing_block_inline_size),
+ padding_style
+ .padding_right
+ .to_used_value(containing_block_inline_size),
+ padding_style
+ .padding_bottom
+ .to_used_value(containing_block_inline_size),
+ padding_style
+ .padding_left
+ .to_used_value(containing_block_inline_size),
+ ),
+ )
}
/// Returns the explicitly-specified margin lengths from the given style. Percentage and auto
@@ -501,14 +563,20 @@ pub fn padding_from_style(style: &ComputedValues,
///
/// This is used when calculating intrinsic inline sizes.
#[inline]
-pub fn specified_margin_from_style(style: &ComputedValues,
- writing_mode: WritingMode) -> LogicalMargin<Au> {
+pub fn specified_margin_from_style(
+ style: &ComputedValues,
+ writing_mode: WritingMode,
+) -> LogicalMargin<Au> {
let margin_style = style.get_margin();
- LogicalMargin::from_physical(writing_mode, SideOffsets2D::new(
- MaybeAuto::from_style(margin_style.margin_top, Au(0)).specified_or_zero(),
- MaybeAuto::from_style(margin_style.margin_right, Au(0)).specified_or_zero(),
- MaybeAuto::from_style(margin_style.margin_bottom, Au(0)).specified_or_zero(),
- MaybeAuto::from_style(margin_style.margin_left, Au(0)).specified_or_zero()))
+ LogicalMargin::from_physical(
+ writing_mode,
+ SideOffsets2D::new(
+ MaybeAuto::from_style(margin_style.margin_top, Au(0)).specified_or_zero(),
+ MaybeAuto::from_style(margin_style.margin_right, Au(0)).specified_or_zero(),
+ MaybeAuto::from_style(margin_style.margin_bottom, Au(0)).specified_or_zero(),
+ MaybeAuto::from_style(margin_style.margin_left, Au(0)).specified_or_zero(),
+ ),
+ )
}
/// A min-size and max-size constraint. The constructor has a optional `border`
@@ -523,17 +591,19 @@ pub struct SizeConstraint {
impl SizeConstraint {
/// Create a `SizeConstraint` for an axis.
- pub fn new(container_size: Option<Au>,
- min_size: LengthOrPercentage,
- max_size: LengthOrPercentageOrNone,
- border: Option<Au>) -> SizeConstraint {
+ pub fn new(
+ container_size: Option<Au>,
+ min_size: LengthOrPercentage,
+ max_size: LengthOrPercentageOrNone,
+ border: Option<Au>,
+ ) -> SizeConstraint {
let mut min_size = match container_size {
Some(container_size) => min_size.to_used_value(container_size),
None => if let LengthOrPercentage::Length(length) = min_size {
Au::from(length)
} else {
Au(0)
- }
+ },
};
let mut max_size = match container_size {
@@ -542,7 +612,7 @@ impl SizeConstraint {
Some(Au::from(length))
} else {
None
- }
+ },
};
// Make sure max size is not smaller than min size.
max_size = max_size.map(|x| max(x, min_size));
@@ -554,7 +624,7 @@ impl SizeConstraint {
SizeConstraint {
min_size: min_size,
- max_size: max_size
+ max_size: max_size,
}
}
@@ -565,7 +635,7 @@ impl SizeConstraint {
} else {
match self.max_size {
Some(max_size) if max_size < other => max_size,
- _ => other
+ _ => other,
}
}
}
diff --git a/components/layout/multicol.rs b/components/layout/multicol.rs
index 487a878c08b..082fa1a1367 100644
--- a/components/layout/multicol.rs
+++ b/components/layout/multicol.rs
@@ -85,7 +85,10 @@ impl Flow for MulticolFlow {
}
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
- debug!("assign_inline_sizes({}): assigning inline_size for flow", "multicol");
+ debug!(
+ "assign_inline_sizes({}): assigning inline_size for flow",
+ "multicol"
+ );
let shared_context = layout_context.shared_context();
self.block_flow.compute_inline_sizes(shared_context);
@@ -94,8 +97,7 @@ impl Flow for MulticolFlow {
self.block_flow.fragment.border_padding.inline_start;
// Distance from the inline-end margin edge to the inline-end content edge.
- let inline_end_content_edge =
- self.block_flow.fragment.margin.inline_end +
+ let inline_end_content_edge = self.block_flow.fragment.margin.inline_end +
self.block_flow.fragment.border_padding.inline_end;
self.block_flow.assign_inline_sizes(layout_context);
@@ -107,15 +109,19 @@ impl Flow for MulticolFlow {
let style = &self.block_flow.fragment.style;
let column_gap = match style.get_position().column_gap {
Either::First(len) => len.0.to_pixel_length(content_inline_size).into(),
- Either::Second(_normal) => self.block_flow.fragment.style.get_font().font_size.size(),
+ Either::Second(_normal) => {
+ self.block_flow.fragment.style.get_font().font_size.size()
+ },
};
let column_style = style.get_column();
let mut column_count;
if let Either::First(column_width) = column_style.column_width {
let column_width = Au::from(column_width);
- column_count =
- max(1, (content_inline_size + column_gap).0 / (column_width + column_gap).0);
+ column_count = max(
+ 1,
+ (content_inline_size + column_gap).0 / (column_width + column_gap).0,
+ );
if let ColumnCount::Integer(specified_column_count) = column_style.column_count {
column_count = min(column_count, specified_column_count.0 as i32);
}
@@ -125,16 +131,22 @@ impl Flow for MulticolFlow {
_ => unreachable!(),
}
}
- column_width =
- max(Au(0), (content_inline_size + column_gap) / column_count - column_gap);
+ column_width = max(
+ Au(0),
+ (content_inline_size + column_gap) / column_count - column_gap,
+ );
self.column_pitch = column_width + column_gap;
}
self.block_flow.fragment.border_box.size.inline = content_inline_size + padding_and_borders;
self.block_flow.propagate_assigned_inline_size_to_children(
- shared_context, inline_start_content_edge, inline_end_content_edge, column_width,
- |_, _, _, _, _, _| {});
+ shared_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ column_width,
+ |_, _, _, _, _, _| {},
+ );
}
fn assign_block_size(&mut self, ctx: &LayoutContext) {
@@ -156,7 +168,7 @@ impl Flow for MulticolFlow {
ctx.shared_context().viewport_size(),
).block
}
- }
+ },
});
// Before layout, everything is in a single "column"
@@ -167,17 +179,20 @@ impl Flow for MulticolFlow {
self.block_flow.assign_block_size(ctx);
loop {
- let remaining = Arc::get_mut(&mut column).unwrap().fragment(ctx, fragmentation_context);
+ let remaining = Arc::get_mut(&mut column)
+ .unwrap()
+ .fragment(ctx, fragmentation_context);
self.block_flow.base.children.push_back_arc(column);
column = match remaining {
Some(remaining) => remaining,
- None => break
+ None => break,
};
}
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context);
+ self.block_flow
+ .compute_stacking_relative_position(layout_context);
let pitch = LogicalSize::new(self.block_flow.base.writing_mode, self.column_pitch, Au(0));
let pitch = pitch.to_physical(self.block_flow.base.writing_mode);
for (i, child) in self.block_flow.base.children.iter_mut().enumerate() {
@@ -187,11 +202,13 @@ impl Flow for MulticolFlow {
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
@@ -223,11 +240,17 @@ impl Flow for MulticolFlow {
self.block_flow.generated_containing_block_size(flow)
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position);
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ );
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
@@ -257,7 +280,10 @@ impl Flow for MulticolColumnFlow {
}
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
- debug!("assign_inline_sizes({}): assigning inline_size for flow", "multicol column");
+ debug!(
+ "assign_inline_sizes({}): assigning inline_size for flow",
+ "multicol column"
+ );
self.block_flow.assign_inline_sizes(layout_context);
}
@@ -266,22 +292,27 @@ impl Flow for MulticolColumnFlow {
self.block_flow.assign_block_size(ctx);
}
- fn fragment(&mut self, layout_context: &LayoutContext,
- fragmentation_context: Option<FragmentationContext>)
- -> Option<Arc<Flow>> {
+ fn fragment(
+ &mut self,
+ layout_context: &LayoutContext,
+ fragmentation_context: Option<FragmentationContext>,
+ ) -> Option<Arc<Flow>> {
Flow::fragment(&mut self.block_flow, layout_context, fragmentation_context)
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context)
+ self.block_flow
+ .compute_stacking_relative_position(layout_context)
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
@@ -313,11 +344,17 @@ impl Flow for MulticolColumnFlow {
self.block_flow.generated_containing_block_size(flow)
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position);
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ );
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs
index b555a9f51dc..d8f46a0f83c 100644
--- a/components/layout/parallel.rs
+++ b/components/layout/parallel.rs
@@ -70,56 +70,57 @@ impl FlowParallelInfo {
///
/// The only communication between siblings is that they both
/// fetch-and-subtract the parent's children count.
-fn bottom_up_flow(mut unsafe_flow: UnsafeFlow,
- assign_bsize_traversal: &AssignBSizes) {
+fn bottom_up_flow(mut unsafe_flow: UnsafeFlow, assign_bsize_traversal: &AssignBSizes) {
loop {
// Get a real flow.
- let flow: &mut Flow = unsafe {
- mem::transmute(unsafe_flow)
- };
+ let flow: &mut Flow = unsafe { mem::transmute(unsafe_flow) };
// Perform the appropriate traversal.
if assign_bsize_traversal.should_process(flow) {
assign_bsize_traversal.process(flow);
}
-
let base = flow.mut_base();
// Reset the count of children for the next layout traversal.
- base.parallel.children_count.store(base.children.len() as isize,
- Ordering::Relaxed);
+ base.parallel
+ .children_count
+ .store(base.children.len() as isize, Ordering::Relaxed);
// Possibly enqueue the parent.
let unsafe_parent = base.parallel.parent;
if unsafe_parent == null_unsafe_flow() {
// We're done!
- break
+ break;
}
// No, we're not at the root yet. Then are we the last child
// of our parent to finish processing? If so, we can continue
// on with our parent; otherwise, we've gotta wait.
- let parent: &mut Flow = unsafe {
- &mut *(unsafe_parent.0 as *mut Flow)
- };
+ let parent: &mut Flow = unsafe { &mut *(unsafe_parent.0 as *mut Flow) };
let parent_base = parent.mut_base();
- if parent_base.parallel.children_count.fetch_sub(1, Ordering::Relaxed) == 1 {
+ if parent_base
+ .parallel
+ .children_count
+ .fetch_sub(1, Ordering::Relaxed) ==
+ 1
+ {
// We were the last child of our parent. Reflow our parent.
unsafe_flow = unsafe_parent
} else {
// Stop.
- break
+ break;
}
}
}
-fn top_down_flow<'scope>(unsafe_flows: &[UnsafeFlow],
- pool: &'scope rayon::ThreadPool,
- scope: &rayon::Scope<'scope>,
- assign_isize_traversal: &'scope AssignISizes,
- assign_bsize_traversal: &'scope AssignBSizes)
-{
+fn top_down_flow<'scope>(
+ unsafe_flows: &[UnsafeFlow],
+ pool: &'scope rayon::ThreadPool,
+ scope: &rayon::Scope<'scope>,
+ assign_isize_traversal: &'scope AssignISizes,
+ assign_bsize_traversal: &'scope AssignBSizes,
+) {
let mut discovered_child_flows = FlowList::new();
for unsafe_flow in unsafe_flows {
@@ -127,8 +128,7 @@ fn top_down_flow<'scope>(unsafe_flows: &[UnsafeFlow],
unsafe {
// Get a real flow.
let flow: &mut Flow = mem::transmute(*unsafe_flow);
- flow.mut_base().thread_id =
- pool.current_thread_index().unwrap() as u8;
+ flow.mut_base().thread_id = pool.current_thread_index().unwrap() as u8;
if assign_isize_traversal.should_process(flow) {
// Perform the appropriate traversal.
@@ -149,16 +149,18 @@ fn top_down_flow<'scope>(unsafe_flows: &[UnsafeFlow],
}
if discovered_child_flows.is_empty() {
- return
+ return;
}
if discovered_child_flows.len() <= CHUNK_SIZE {
// We can handle all the children in this work unit.
- top_down_flow(&discovered_child_flows,
- pool,
- scope,
- &assign_isize_traversal,
- &assign_bsize_traversal);
+ top_down_flow(
+ &discovered_child_flows,
+ pool,
+ scope,
+ &assign_isize_traversal,
+ &assign_bsize_traversal,
+ );
} else {
// Spawn a new work unit for each chunk after the first.
let mut chunks = discovered_child_flows.chunks(CHUNK_SIZE);
@@ -166,37 +168,66 @@ fn top_down_flow<'scope>(unsafe_flows: &[UnsafeFlow],
for chunk in chunks {
let nodes = chunk.iter().cloned().collect::<FlowList>();
scope.spawn(move |scope| {
- top_down_flow(&nodes, pool, scope, &assign_isize_traversal, &assign_bsize_traversal);
+ top_down_flow(
+ &nodes,
+ pool,
+ scope,
+ &assign_isize_traversal,
+ &assign_bsize_traversal,
+ );
});
}
if let Some(chunk) = first_chunk {
- top_down_flow(chunk, pool, scope, &assign_isize_traversal, &assign_bsize_traversal);
+ top_down_flow(
+ chunk,
+ pool,
+ scope,
+ &assign_isize_traversal,
+ &assign_bsize_traversal,
+ );
}
}
}
/// Run the main layout passes in parallel.
pub fn reflow(
- root: &mut Flow,
- profiler_metadata: Option<TimerMetadata>,
- time_profiler_chan: time::ProfilerChan,
- context: &LayoutContext,
- queue: &rayon::ThreadPool) {
+ root: &mut Flow,
+ profiler_metadata: Option<TimerMetadata>,
+ time_profiler_chan: time::ProfilerChan,
+ context: &LayoutContext,
+ queue: &rayon::ThreadPool,
+) {
if opts::get().bubble_inline_sizes_separately {
- let bubble_inline_sizes = BubbleISizes { layout_context: &context };
+ let bubble_inline_sizes = BubbleISizes {
+ layout_context: &context,
+ };
bubble_inline_sizes.traverse(root);
}
- let assign_isize_traversal = &AssignISizes { layout_context: &context };
- let assign_bsize_traversal = &AssignBSizes { layout_context: &context };
+ let assign_isize_traversal = &AssignISizes {
+ layout_context: &context,
+ };
+ let assign_bsize_traversal = &AssignBSizes {
+ layout_context: &context,
+ };
let nodes = [UnsafeFlow(root)];
queue.install(move || {
rayon::scope(move |scope| {
- profile(time::ProfilerCategory::LayoutParallelWarmup,
- profiler_metadata, time_profiler_chan, move || {
- top_down_flow(&nodes, queue, scope, assign_isize_traversal, assign_bsize_traversal);
- });
+ profile(
+ time::ProfilerCategory::LayoutParallelWarmup,
+ profiler_metadata,
+ time_profiler_chan,
+ move || {
+ top_down_flow(
+ &nodes,
+ queue,
+ scope,
+ assign_isize_traversal,
+ assign_bsize_traversal,
+ );
+ },
+ );
});
});
}
diff --git a/components/layout/persistent_list.rs b/components/layout/persistent_list.rs
index 8de9daa2ed4..0a8337bfaa7 100644
--- a/components/layout/persistent_list.rs
+++ b/components/layout/persistent_list.rs
@@ -18,7 +18,10 @@ struct PersistentListEntry<T> {
type PersistentListLink<T> = Option<Arc<PersistentListEntry<T>>>;
-impl<T> PersistentList<T> where T: Send + Sync {
+impl<T> PersistentList<T>
+where
+ T: Send + Sync,
+{
#[inline]
pub fn new() -> PersistentList<T> {
PersistentList {
@@ -58,7 +61,10 @@ impl<T> PersistentList<T> where T: Send + Sync {
}
}
-impl<T> Clone for PersistentList<T> where T: Send + Sync {
+impl<T> Clone for PersistentList<T>
+where
+ T: Send + Sync,
+{
fn clone(&self) -> PersistentList<T> {
// This establishes the persistent nature of this list: we can clone a list by just cloning
// its head.
@@ -69,11 +75,17 @@ impl<T> Clone for PersistentList<T> where T: Send + Sync {
}
}
-pub struct PersistentListIterator<'a, T> where T: 'a + Send + Sync {
+pub struct PersistentListIterator<'a, T>
+where
+ T: 'a + Send + Sync,
+{
entry: Option<&'a PersistentListEntry<T>>,
}
-impl<'a, T> Iterator for PersistentListIterator<'a, T> where T: Send + Sync + 'static {
+impl<'a, T> Iterator for PersistentListIterator<'a, T>
+where
+ T: Send + Sync + 'static,
+{
type Item = &'a T;
#[inline]
diff --git a/components/layout/query.rs b/components/layout/query.rs
index 408e220dfe4..f43ff0d6166 100644
--- a/components/layout/query.rs
+++ b/components/layout/query.rs
@@ -94,13 +94,24 @@ pub struct LayoutRPCImpl(pub Arc<Mutex<LayoutThreadData>>);
// https://drafts.csswg.org/cssom-view/#overflow-directions
fn overflow_direction(writing_mode: &WritingMode) -> OverflowDirection {
- match (writing_mode.block_flow_direction(), writing_mode.inline_base_direction()) {
+ match (
+ writing_mode.block_flow_direction(),
+ writing_mode.inline_base_direction(),
+ ) {
(BlockFlowDirection::TopToBottom, InlineBaseDirection::LeftToRight) |
- (BlockFlowDirection::LeftToRight, InlineBaseDirection::LeftToRight) => OverflowDirection::RightAndDown,
+ (BlockFlowDirection::LeftToRight, InlineBaseDirection::LeftToRight) => {
+ OverflowDirection::RightAndDown
+ },
(BlockFlowDirection::TopToBottom, InlineBaseDirection::RightToLeft) |
- (BlockFlowDirection::RightToLeft, InlineBaseDirection::LeftToRight) => OverflowDirection::LeftAndDown,
- (BlockFlowDirection::RightToLeft, InlineBaseDirection::RightToLeft) => OverflowDirection::LeftAndUp,
- (BlockFlowDirection::LeftToRight, InlineBaseDirection::RightToLeft) => OverflowDirection::RightAndUp
+ (BlockFlowDirection::RightToLeft, InlineBaseDirection::LeftToRight) => {
+ OverflowDirection::LeftAndDown
+ },
+ (BlockFlowDirection::RightToLeft, InlineBaseDirection::RightToLeft) => {
+ OverflowDirection::LeftAndUp
+ },
+ (BlockFlowDirection::LeftToRight, InlineBaseDirection::RightToLeft) => {
+ OverflowDirection::RightAndUp
+ },
}
}
@@ -130,20 +141,24 @@ impl LayoutRPC for LayoutRPCImpl {
let &LayoutRPCImpl(ref rw_data) = self;
let rw_data = rw_data.lock().unwrap();
NodeGeometryResponse {
- client_rect: rw_data.client_rect_response
+ client_rect: rw_data.client_rect_response,
}
}
fn node_scroll_area(&self) -> NodeGeometryResponse {
NodeGeometryResponse {
- client_rect: self.0.lock().unwrap().scroll_area_response
+ client_rect: self.0.lock().unwrap().scroll_area_response,
}
}
fn node_scroll_id(&self) -> NodeScrollIdResponse {
- NodeScrollIdResponse(self.0.lock()
- .unwrap().scroll_id_response
- .expect("scroll id is not correctly fetched"))
+ NodeScrollIdResponse(
+ self.0
+ .lock()
+ .unwrap()
+ .scroll_id_response
+ .expect("scroll id is not correctly fetched"),
+ )
}
/// Retrieves the resolved value for a CSS style property.
@@ -187,7 +202,7 @@ impl UnioningFragmentBorderBoxIterator {
fn new(node_address: OpaqueNode) -> UnioningFragmentBorderBoxIterator {
UnioningFragmentBorderBoxIterator {
node_address: node_address,
- rect: None
+ rect: None,
}
}
}
@@ -195,12 +210,8 @@ impl UnioningFragmentBorderBoxIterator {
impl FragmentBorderBoxIterator for UnioningFragmentBorderBoxIterator {
fn process(&mut self, _: &Fragment, _: i32, border_box: &Rect<Au>) {
self.rect = match self.rect {
- Some(rect) => {
- Some(rect.union(border_box))
- }
- None => {
- Some(*border_box)
- }
+ Some(rect) => Some(rect.union(border_box)),
+ None => Some(*border_box),
};
}
@@ -237,12 +248,12 @@ enum Side {
Left,
Right,
Bottom,
- Top
+ Top,
}
enum MarginPadding {
Margin,
- Padding
+ Padding,
}
enum PositionProperty {
@@ -270,9 +281,11 @@ struct PositionRetrievingFragmentBorderBoxIterator {
}
impl PositionRetrievingFragmentBorderBoxIterator {
- fn new(node_address: OpaqueNode,
- property: PositionProperty,
- position: Point2D<Au>) -> PositionRetrievingFragmentBorderBoxIterator {
+ fn new(
+ node_address: OpaqueNode,
+ property: PositionProperty,
+ position: Point2D<Au>,
+ ) -> PositionRetrievingFragmentBorderBoxIterator {
PositionRetrievingFragmentBorderBoxIterator {
node_address: node_address,
position: position,
@@ -284,18 +297,19 @@ impl PositionRetrievingFragmentBorderBoxIterator {
impl FragmentBorderBoxIterator for PositionRetrievingFragmentBorderBoxIterator {
fn process(&mut self, fragment: &Fragment, _: i32, border_box: &Rect<Au>) {
- let border_padding = fragment.border_padding.to_physical(fragment.style.writing_mode);
- self.result =
- Some(match self.property {
- PositionProperty::Left => self.position.x,
- PositionProperty::Top => self.position.y,
- PositionProperty::Width => border_box.size.width - border_padding.horizontal(),
- PositionProperty::Height => border_box.size.height - border_padding.vertical(),
- // TODO: the following 2 calculations are completely wrong.
- // They should return the difference between the parent's and this
- // fragment's border boxes.
- PositionProperty::Right => border_box.max_x() + self.position.x,
- PositionProperty::Bottom => border_box.max_y() + self.position.y,
+ let border_padding = fragment
+ .border_padding
+ .to_physical(fragment.style.writing_mode);
+ self.result = Some(match self.property {
+ PositionProperty::Left => self.position.x,
+ PositionProperty::Top => self.position.y,
+ PositionProperty::Width => border_box.size.width - border_padding.horizontal(),
+ PositionProperty::Height => border_box.size.height - border_padding.vertical(),
+ // TODO: the following 2 calculations are completely wrong.
+ // They should return the difference between the parent's and this
+ // fragment's border boxes.
+ PositionProperty::Right => border_box.max_x() + self.position.x,
+ PositionProperty::Bottom => border_box.max_y() + self.position.y,
});
}
@@ -313,8 +327,12 @@ struct MarginRetrievingFragmentBorderBoxIterator {
}
impl MarginRetrievingFragmentBorderBoxIterator {
- fn new(node_address: OpaqueNode, side: Side, margin_padding:
- MarginPadding, writing_mode: WritingMode) -> MarginRetrievingFragmentBorderBoxIterator {
+ fn new(
+ node_address: OpaqueNode,
+ side: Side,
+ margin_padding: MarginPadding,
+ writing_mode: WritingMode,
+ ) -> MarginRetrievingFragmentBorderBoxIterator {
MarginRetrievingFragmentBorderBoxIterator {
node_address: node_address,
side: side,
@@ -329,13 +347,13 @@ impl FragmentBorderBoxIterator for MarginRetrievingFragmentBorderBoxIterator {
fn process(&mut self, fragment: &Fragment, _: i32, _: &Rect<Au>) {
let rect = match self.margin_padding {
MarginPadding::Margin => &fragment.margin,
- MarginPadding::Padding => &fragment.border_padding
+ MarginPadding::Padding => &fragment.border_padding,
};
self.result = Some(match self.side {
- Side::Left => rect.left(self.writing_mode),
- Side::Right => rect.right(self.writing_mode),
- Side::Bottom => rect.bottom(self.writing_mode),
- Side::Top => rect.top(self.writing_mode)
+ Side::Left => rect.left(self.writing_mode),
+ Side::Right => rect.right(self.writing_mode),
+ Side::Bottom => rect.bottom(self.writing_mode),
+ Side::Top => rect.top(self.writing_mode),
});
}
@@ -345,7 +363,9 @@ impl FragmentBorderBoxIterator for MarginRetrievingFragmentBorderBoxIterator {
}
pub fn process_content_box_request<N: LayoutNode>(
- requested_node: N, layout_root: &mut Flow) -> Option<Rect<Au>> {
+ requested_node: N,
+ layout_root: &mut Flow,
+) -> Option<Rect<Au>> {
// FIXME(pcwalton): This has not been updated to handle the stacking context relative
// stuff. So the position is wrong in most cases.
let mut iterator = UnioningFragmentBorderBoxIterator::new(requested_node.opaque());
@@ -353,8 +373,10 @@ pub fn process_content_box_request<N: LayoutNode>(
iterator.rect
}
-pub fn process_content_boxes_request<N: LayoutNode>(requested_node: N, layout_root: &mut Flow)
- -> Vec<Rect<Au>> {
+pub fn process_content_boxes_request<N: LayoutNode>(
+ requested_node: N,
+ layout_root: &mut Flow,
+) -> Vec<Rect<Au>> {
// FIXME(pcwalton): This has not been updated to handle the stacking context relative
// stuff. So the position is wrong in most cases.
let mut iterator = CollectingFragmentBorderBoxIterator::new(requested_node.opaque());
@@ -371,7 +393,7 @@ impl FragmentLocatingFragmentIterator {
fn new(node_address: OpaqueNode) -> FragmentLocatingFragmentIterator {
FragmentLocatingFragmentIterator {
node_address: node_address,
- client_rect: Rect::zero()
+ client_rect: Rect::zero(),
}
}
}
@@ -382,7 +404,7 @@ struct UnioningFragmentScrollAreaIterator {
origin_rect: Rect<i32>,
level: Option<i32>,
is_child: bool,
- overflow_direction: OverflowDirection
+ overflow_direction: OverflowDirection,
}
impl UnioningFragmentScrollAreaIterator {
@@ -394,7 +416,7 @@ impl UnioningFragmentScrollAreaIterator {
level: None,
is_child: false,
// FIXME(#20867)
- overflow_direction: OverflowDirection::RightAndDown
+ overflow_direction: OverflowDirection::RightAndDown,
}
}
}
@@ -469,29 +491,38 @@ impl FragmentBorderBoxIterator for UnioningFragmentScrollAreaIterator {
let (left_border, right_border) = (left_border.px(), right_border.px());
let (top_border, bottom_border) = (top_border.px(), bottom_border.px());
let right_padding = (border_box.size.width.to_f32_px() - right_border - left_border) as i32;
- let bottom_padding = (border_box.size.height.to_f32_px() - bottom_border - top_border) as i32;
+ let bottom_padding =
+ (border_box.size.height.to_f32_px() - bottom_border - top_border) as i32;
let top_padding = top_border as i32;
let left_padding = left_border as i32;
match self.level {
- Some(start_level) if level <= start_level => { self.is_child = false; }
+ Some(start_level) if level <= start_level => {
+ self.is_child = false;
+ },
Some(_) => {
- let padding = Rect::new(Point2D::new(left_padding, top_padding),
- Size2D::new(right_padding, bottom_padding));
+ let padding = Rect::new(
+ Point2D::new(left_padding, top_padding),
+ Size2D::new(right_padding, bottom_padding),
+ );
let top_margin = fragment.margin.top(fragment.style.writing_mode).to_px();
let left_margin = fragment.margin.left(fragment.style.writing_mode).to_px();
let bottom_margin = fragment.margin.bottom(fragment.style.writing_mode).to_px();
let right_margin = fragment.margin.right(fragment.style.writing_mode).to_px();
- let margin = Rect::new(Point2D::new(left_margin, top_margin),
- Size2D::new(right_margin, bottom_margin));
+ let margin = Rect::new(
+ Point2D::new(left_margin, top_margin),
+ Size2D::new(right_margin, bottom_margin),
+ );
self.union_rect = self.union_rect.union(&margin).union(&padding);
- }
+ },
None => {
self.level = Some(level);
self.is_child = true;
self.overflow_direction = overflow_direction(&fragment.style.writing_mode);
- self.origin_rect = Rect::new(Point2D::new(left_padding, top_padding),
- Size2D::new(right_padding, bottom_padding));
+ self.origin_rect = Rect::new(
+ Point2D::new(left_padding, top_padding),
+ Size2D::new(right_padding, bottom_padding),
+ );
},
};
}
@@ -509,8 +540,11 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
// for its parent. Remove all nodes at this level or
// higher, as they can't be parents of this node.
self.parent_nodes.truncate(level as usize);
- assert_eq!(self.parent_nodes.len(), level as usize,
- "Skipped at least one level in the flow tree!");
+ assert_eq!(
+ self.parent_nodes.len(),
+ level as usize,
+ "Skipped at least one level in the flow tree!"
+ );
}
if !fragment.is_primary_fragment() {
@@ -530,8 +564,10 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
// Found the fragment in the flow tree that matches the
// DOM node being looked for.
- assert!(self.node_offset_box.is_none(),
- "Node was being treated as inline, but it has an associated fragment!");
+ assert!(
+ self.node_offset_box.is_none(),
+ "Node was being treated as inline, but it has an associated fragment!"
+ );
self.has_processed_node = true;
self.node_offset_box = Some(NodeOffsetBoxInfo {
@@ -544,7 +580,10 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
self.parent_nodes.clear();
}
} else if let Some(node) = fragment.inline_context.as_ref().and_then(|inline_context| {
- inline_context.nodes.iter().find(|node| node.address == self.node_address)
+ inline_context
+ .nodes
+ .iter()
+ .find(|node| node.address == self.node_address)
}) {
// TODO: Handle cases where the `offsetParent` is an inline
// element. This will likely be impossible until
@@ -554,7 +593,9 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
// contains the DOM node we're looking for, i.e. the node
// is inline and contains this fragment.
match self.node_offset_box {
- Some(NodeOffsetBoxInfo { ref mut rectangle, .. }) => {
+ Some(NodeOffsetBoxInfo {
+ ref mut rectangle, ..
+ }) => {
*rectangle = rectangle.union(border_box);
},
None => {
@@ -571,7 +612,10 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
},
}
- if node.flags.contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT) {
+ if node
+ .flags
+ .contains(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT)
+ {
self.has_processed_node = true;
}
} else if self.node_offset_box.is_none() {
@@ -580,9 +624,11 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
// it's at level 1 (below the root node)?
let is_body_element = level == 1;
- let is_valid_parent = match (is_body_element,
- fragment.style.get_box().position,
- &fragment.specific) {
+ let is_valid_parent = match (
+ is_body_element,
+ fragment.style.get_box().position,
+ &fragment.specific,
+ ) {
// Spec says it's valid if any of these are true:
// 1) Is the body element
// 2) Is static position *and* is a table or table cell
@@ -600,7 +646,9 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
};
let parent_info = if is_valid_parent {
- let border_width = fragment.border_width().to_physical(fragment.style.writing_mode);
+ let border_width = fragment
+ .border_width()
+ .to_physical(fragment.style.writing_mode);
Some(ParentBorderBoxInfo {
node_address: fragment.node,
@@ -619,9 +667,10 @@ impl FragmentBorderBoxIterator for ParentOffsetBorderBoxIterator {
}
}
-
-pub fn process_node_geometry_request<N: LayoutNode>(requested_node: N, layout_root: &mut Flow)
- -> Rect<i32> {
+pub fn process_node_geometry_request<N: LayoutNode>(
+ requested_node: N,
+ layout_root: &mut Flow,
+) -> Rect<i32> {
let mut iterator = FragmentLocatingFragmentIterator::new(requested_node.opaque());
sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root, &mut iterator);
iterator.client_rect
@@ -629,28 +678,41 @@ pub fn process_node_geometry_request<N: LayoutNode>(requested_node: N, layout_ro
pub fn process_node_scroll_id_request<N: LayoutNode>(
id: PipelineId,
- requested_node: N
+ requested_node: N,
) -> ExternalScrollId {
let layout_node = requested_node.to_threadsafe();
layout_node.generate_scroll_id(id)
}
/// https://drafts.csswg.org/cssom-view/#scrolling-area
-pub fn process_node_scroll_area_request< N: LayoutNode>(requested_node: N, layout_root: &mut Flow)
- -> Rect<i32> {
+pub fn process_node_scroll_area_request<N: LayoutNode>(
+ requested_node: N,
+ layout_root: &mut Flow,
+) -> Rect<i32> {
let mut iterator = UnioningFragmentScrollAreaIterator::new(requested_node.opaque());
sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root, &mut iterator);
match iterator.overflow_direction {
OverflowDirection::RightAndDown => {
- let right = max(iterator.union_rect.size.width, iterator.origin_rect.size.width);
- let bottom = max(iterator.union_rect.size.height, iterator.origin_rect.size.height);
+ let right = max(
+ iterator.union_rect.size.width,
+ iterator.origin_rect.size.width,
+ );
+ let bottom = max(
+ iterator.union_rect.size.height,
+ iterator.origin_rect.size.height,
+ );
Rect::new(iterator.origin_rect.origin, Size2D::new(right, bottom))
},
OverflowDirection::LeftAndDown => {
- let bottom = max(iterator.union_rect.size.height, iterator.origin_rect.size.height);
+ let bottom = max(
+ iterator.union_rect.size.height,
+ iterator.origin_rect.size.height,
+ );
let left = min(iterator.union_rect.origin.x, iterator.origin_rect.origin.x);
- Rect::new(Point2D::new(left, iterator.origin_rect.origin.y),
- Size2D::new(iterator.origin_rect.size.width, bottom))
+ Rect::new(
+ Point2D::new(left, iterator.origin_rect.origin.y),
+ Size2D::new(iterator.origin_rect.size.width, bottom),
+ )
},
OverflowDirection::LeftAndUp => {
let top = min(iterator.union_rect.origin.y, iterator.origin_rect.origin.y);
@@ -659,21 +721,29 @@ pub fn process_node_scroll_area_request< N: LayoutNode>(requested_node: N, layou
},
OverflowDirection::RightAndUp => {
let top = min(iterator.union_rect.origin.y, iterator.origin_rect.origin.y);
- let right = max(iterator.union_rect.size.width, iterator.origin_rect.size.width);
- Rect::new(Point2D::new(iterator.origin_rect.origin.x, top),
- Size2D::new(right, iterator.origin_rect.size.height))
- }
+ let right = max(
+ iterator.union_rect.size.width,
+ iterator.origin_rect.size.width,
+ );
+ Rect::new(
+ Point2D::new(iterator.origin_rect.origin.x, top),
+ Size2D::new(right, iterator.origin_rect.size.height),
+ )
+ },
}
}
/// Return the resolved value of property for a given (pseudo)element.
/// <https://drafts.csswg.org/cssom/#resolved-value>
-pub fn process_resolved_style_request<'a, N>(context: &LayoutContext,
- node: N,
- pseudo: &Option<PseudoElement>,
- property: &PropertyId,
- layout_root: &mut Flow) -> String
- where N: LayoutNode,
+pub fn process_resolved_style_request<'a, N>(
+ context: &LayoutContext,
+ node: N,
+ pseudo: &Option<PseudoElement>,
+ property: &PropertyId,
+ layout_root: &mut Flow,
+) -> String
+where
+ N: LayoutNode,
{
use style::stylist::RuleInclusion;
use style::traversal::resolve_style;
@@ -700,15 +770,13 @@ pub fn process_resolved_style_request<'a, N>(context: &LayoutContext,
let styles = resolve_style(&mut context, element, RuleInclusion::All, pseudo.as_ref());
let style = styles.primary();
let longhand_id = match *property {
- PropertyId::LonghandAlias(id, _) |
- PropertyId::Longhand(id) => id,
+ PropertyId::LonghandAlias(id, _) | PropertyId::Longhand(id) => id,
// Firefox returns blank strings for the computed value of shorthands,
// so this should be web-compatible.
- PropertyId::ShorthandAlias(..) |
- PropertyId::Shorthand(_) => return String::new(),
+ PropertyId::ShorthandAlias(..) | PropertyId::Shorthand(_) => return String::new(),
PropertyId::Custom(ref name) => {
return style.computed_value_to_string(PropertyDeclarationId::Custom(name))
- }
+ },
};
// No need to care about used values here, since we're on a display: none
@@ -735,7 +803,7 @@ where
Some(PseudoElement::Selection) => None,
// FIXME(emilio): What about the other pseudos? Probably they shouldn't
// just return the element's style!
- _ => Some(layout_el)
+ _ => Some(layout_el),
};
let layout_el = match layout_el {
@@ -744,29 +812,24 @@ where
// the element itself in this case, Firefox uses the resolved value.
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=29006
return String::new();
- }
- Some(layout_el) => layout_el
+ },
+ Some(layout_el) => layout_el,
};
let style = &*layout_el.resolved_style();
let longhand_id = match *property {
- PropertyId::LonghandAlias(id, _) |
- PropertyId::Longhand(id) => id,
+ PropertyId::LonghandAlias(id, _) | PropertyId::Longhand(id) => id,
// Firefox returns blank strings for the computed value of shorthands,
// so this should be web-compatible.
- PropertyId::ShorthandAlias(..) |
- PropertyId::Shorthand(_) => return String::new(),
+ PropertyId::ShorthandAlias(..) | PropertyId::Shorthand(_) => return String::new(),
PropertyId::Custom(ref name) => {
return style.computed_value_to_string(PropertyDeclarationId::Custom(name))
- }
+ },
};
let positioned = match style.get_box().position {
- Position::Relative |
- Position::Sticky |
- Position::Fixed |
- Position::Absolute => true,
- _ => false
+ Position::Relative | Position::Sticky | Position::Fixed | Position::Absolute => true,
+ _ => false,
};
//TODO: determine whether requested property applies to the element.
@@ -780,15 +843,20 @@ where
layout_el: <N::ConcreteThreadSafeLayoutNode as ThreadSafeLayoutNode>::ConcreteThreadSafeLayoutElement,
layout_root: &mut Flow,
requested_node: N,
- longhand_id: LonghandId) -> String {
+ longhand_id: LonghandId,
+ ) -> String
+ {
let maybe_data = layout_el.borrow_layout_data();
let position = maybe_data.map_or(Point2D::zero(), |data| {
match (*data).flow_construction_result {
- ConstructionResult::Flow(ref flow_ref, _) =>
- flow_ref.deref().base().stacking_relative_position.to_point(),
+ ConstructionResult::Flow(ref flow_ref, _) => flow_ref
+ .deref()
+ .base()
+ .stacking_relative_position
+ .to_point(),
// TODO(dzbarsky) search parents until we find node with a flow ref.
// https://github.com/servo/servo/issues/8307
- _ => Point2D::zero()
+ _ => Point2D::zero(),
}
});
let property = match longhand_id {
@@ -798,24 +866,32 @@ where
LonghandId::Right => PositionProperty::Right,
LonghandId::Width => PositionProperty::Width,
LonghandId::Height => PositionProperty::Height,
- _ => unreachable!()
+ _ => unreachable!(),
};
- let mut iterator =
- PositionRetrievingFragmentBorderBoxIterator::new(requested_node.opaque(),
- property,
- position);
- sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root,
- &mut iterator);
- iterator.result.map(|r| r.to_css_string()).unwrap_or(String::new())
+ let mut iterator = PositionRetrievingFragmentBorderBoxIterator::new(
+ requested_node.opaque(),
+ property,
+ position,
+ );
+ sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root, &mut iterator);
+ iterator
+ .result
+ .map(|r| r.to_css_string())
+ .unwrap_or(String::new())
}
// TODO: we will return neither the computed nor used value for margin and padding.
match longhand_id {
- LonghandId::MarginBottom | LonghandId::MarginTop |
- LonghandId::MarginLeft | LonghandId::MarginRight |
- LonghandId::PaddingBottom | LonghandId::PaddingTop |
- LonghandId::PaddingLeft | LonghandId::PaddingRight
- if applies && style.get_box().display != Display::None => {
+ LonghandId::MarginBottom |
+ LonghandId::MarginTop |
+ LonghandId::MarginLeft |
+ LonghandId::MarginRight |
+ LonghandId::PaddingBottom |
+ LonghandId::PaddingTop |
+ LonghandId::PaddingLeft |
+ LonghandId::PaddingRight
+ if applies && style.get_box().display != Display::None =>
+ {
let (margin_padding, side) = match longhand_id {
LonghandId::MarginBottom => (MarginPadding::Margin, Side::Bottom),
LonghandId::MarginTop => (MarginPadding::Margin, Side::Top),
@@ -825,40 +901,50 @@ where
LonghandId::PaddingTop => (MarginPadding::Padding, Side::Top),
LonghandId::PaddingLeft => (MarginPadding::Padding, Side::Left),
LonghandId::PaddingRight => (MarginPadding::Padding, Side::Right),
- _ => unreachable!()
+ _ => unreachable!(),
};
- let mut iterator =
- MarginRetrievingFragmentBorderBoxIterator::new(requested_node.opaque(),
- side,
- margin_padding,
- style.writing_mode);
- sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root,
- &mut iterator);
- iterator.result.map(|r| r.to_css_string()).unwrap_or(String::new())
- },
+ let mut iterator = MarginRetrievingFragmentBorderBoxIterator::new(
+ requested_node.opaque(),
+ side,
+ margin_padding,
+ style.writing_mode,
+ );
+ sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root, &mut iterator);
+ iterator
+ .result
+ .map(|r| r.to_css_string())
+ .unwrap_or(String::new())
+ }
LonghandId::Bottom | LonghandId::Top | LonghandId::Right | LonghandId::Left
- if applies && positioned && style.get_box().display != Display::None => {
+ if applies && positioned && style.get_box().display != Display::None =>
+ {
used_value_for_position_property(layout_el, layout_root, requested_node, longhand_id)
- }
+ },
LonghandId::Width | LonghandId::Height
- if applies && style.get_box().display != Display::None => {
+ if applies && style.get_box().display != Display::None =>
+ {
used_value_for_position_property(layout_el, layout_root, requested_node, longhand_id)
- }
+ },
// FIXME: implement used value computation for line-height
- _ => {
- style.computed_value_to_string(PropertyDeclarationId::Longhand(longhand_id))
- }
+ _ => style.computed_value_to_string(PropertyDeclarationId::Longhand(longhand_id)),
}
}
-pub fn process_offset_parent_query<N: LayoutNode>(requested_node: N, layout_root: &mut Flow)
- -> OffsetParentResponse {
+pub fn process_offset_parent_query<N: LayoutNode>(
+ requested_node: N,
+ layout_root: &mut Flow,
+) -> OffsetParentResponse {
let mut iterator = ParentOffsetBorderBoxIterator::new(requested_node.opaque());
sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root, &mut iterator);
let node_offset_box = iterator.node_offset_box;
- let parent_info = iterator.parent_nodes.into_iter().rev().filter_map(|info| info).next();
+ let parent_info = iterator
+ .parent_nodes
+ .into_iter()
+ .rev()
+ .filter_map(|info| info)
+ .next();
match (node_offset_box, parent_info) {
(Some(node_offset_box), Some(parent_info)) => {
let origin = node_offset_box.offset - parent_info.origin.to_vector();
@@ -867,15 +953,12 @@ pub fn process_offset_parent_query<N: LayoutNode>(requested_node: N, layout_root
node_address: Some(parent_info.node_address.to_untrusted_node_address()),
rect: Rect::new(origin, size),
}
- }
- _ => {
- OffsetParentResponse::empty()
- }
+ },
+ _ => OffsetParentResponse::empty(),
}
}
-pub fn process_style_query<N: LayoutNode>(requested_node: N)
- -> StyleResponse {
+pub fn process_style_query<N: LayoutNode>(requested_node: N) -> StyleResponse {
let element = requested_node.as_element().unwrap();
let data = element.borrow_data();
@@ -888,8 +971,10 @@ enum InnerTextItem {
}
// https://html.spec.whatwg.org/multipage/#the-innertext-idl-attribute
-pub fn process_element_inner_text_query<N: LayoutNode>(node: N,
- indexable_text: &IndexableText) -> String {
+pub fn process_element_inner_text_query<N: LayoutNode>(
+ node: N,
+ indexable_text: &IndexableText,
+) -> String {
// Step 1.
let mut results = Vec::new();
// Step 2.
@@ -923,7 +1008,7 @@ pub fn process_element_inner_text_query<N: LayoutNode>(node: N,
if count > max_req_line_break_count {
max_req_line_break_count = count;
}
- }
+ },
}
}
inner_text.into_iter().collect()
@@ -931,22 +1016,21 @@ pub fn process_element_inner_text_query<N: LayoutNode>(node: N,
// https://html.spec.whatwg.org/multipage/#inner-text-collection-steps
#[allow(unsafe_code)]
-fn inner_text_collection_steps<N: LayoutNode>(node: N,
- indexable_text: &IndexableText,
- results: &mut Vec<InnerTextItem>) {
+fn inner_text_collection_steps<N: LayoutNode>(
+ node: N,
+ indexable_text: &IndexableText,
+ results: &mut Vec<InnerTextItem>,
+) {
let mut items = Vec::new();
for child in node.traverse_preorder() {
let node = match child.type_id() {
- LayoutNodeType::Text => {
- child.parent_node().unwrap()
- },
+ LayoutNodeType::Text => child.parent_node().unwrap(),
_ => child,
};
let element_data = unsafe {
- node.get_style_and_layout_data().map(|d| {
- &(*(d.ptr.as_ptr() as *mut StyleData)).element_data
- })
+ node.get_style_and_layout_data()
+ .map(|d| &(*(d.ptr.as_ptr() as *mut StyleData)).element_data)
};
if element_data.is_none() {
@@ -980,15 +1064,16 @@ fn inner_text_collection_steps<N: LayoutNode>(node: N,
},
LayoutNodeType::Element(LayoutElementType::HTMLBRElement) => {
// Step 5.
- items.push(InnerTextItem::Text(String::from("\u{000A}" /* line feed */)));
+ items.push(InnerTextItem::Text(String::from(
+ "\u{000A}", /* line feed */
+ )));
},
LayoutNodeType::Element(LayoutElementType::HTMLParagraphElement) => {
// Step 8.
items.insert(0, InnerTextItem::RequiredLineBreakCount(2));
items.push(InnerTextItem::RequiredLineBreakCount(2));
- }
+ },
_ => {},
-
}
match display {
diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs
index e3984867a11..5da3f842656 100644
--- a/components/layout/sequential.rs
+++ b/components/layout/sequential.rs
@@ -25,10 +25,12 @@ pub fn resolve_generated_content(root: &mut Flow, layout_context: &LayoutContext
/// Run the main layout passes sequentially.
pub fn reflow(root: &mut Flow, layout_context: &LayoutContext, relayout_mode: RelayoutMode) {
- fn doit(flow: &mut Flow,
- assign_inline_sizes: AssignISizes,
- assign_block_sizes: AssignBSizes,
- relayout_mode: RelayoutMode) {
+ fn doit(
+ flow: &mut Flow,
+ assign_inline_sizes: AssignISizes,
+ assign_block_sizes: AssignBSizes,
+ relayout_mode: RelayoutMode,
+ ) {
// Force reflow children during this traversal. This is needed when we failed
// the float speculation of a block formatting context and need to fix it.
if relayout_mode == RelayoutMode::Force {
@@ -67,42 +69,47 @@ pub fn reflow(root: &mut Flow, layout_context: &LayoutContext, relayout_mode: Re
doit(root, assign_inline_sizes, assign_block_sizes, relayout_mode);
}
-pub fn build_display_list_for_subtree<'a>(flow_root: &mut Flow,
- layout_context: &'a LayoutContext)
- -> DisplayListBuildState<'a> {
+pub fn build_display_list_for_subtree<'a>(
+ flow_root: &mut Flow,
+ layout_context: &'a LayoutContext,
+) -> DisplayListBuildState<'a> {
let mut state = StackingContextCollectionState::new(layout_context.id);
flow_root.collect_stacking_contexts(&mut state);
let state = DisplayListBuildState::new(layout_context, state);
- let mut build_display_list = BuildDisplayList {
- state: state,
- };
+ let mut build_display_list = BuildDisplayList { state: state };
build_display_list.traverse(flow_root);
build_display_list.state
}
-pub fn iterate_through_flow_tree_fragment_border_boxes(root: &mut Flow, iterator: &mut FragmentBorderBoxIterator) {
- fn doit(flow: &mut Flow,
- level: i32,
- iterator: &mut FragmentBorderBoxIterator,
- stacking_context_position: &Point2D<Au>) {
+pub fn iterate_through_flow_tree_fragment_border_boxes(
+ root: &mut Flow,
+ iterator: &mut FragmentBorderBoxIterator,
+) {
+ fn doit(
+ flow: &mut Flow,
+ level: i32,
+ iterator: &mut FragmentBorderBoxIterator,
+ stacking_context_position: &Point2D<Au>,
+ ) {
flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position);
for kid in flow.mut_base().child_iter_mut() {
let mut stacking_context_position = *stacking_context_position;
if kid.is_block_flow() && kid.as_block().fragment.establishes_stacking_context() {
- stacking_context_position = Point2D::new(kid.as_block().fragment.margin.inline_start, Au(0)) +
- kid.base().stacking_relative_position +
- stacking_context_position.to_vector();
- let relative_position = kid.as_block()
+ stacking_context_position =
+ Point2D::new(kid.as_block().fragment.margin.inline_start, Au(0)) +
+ kid.base().stacking_relative_position +
+ stacking_context_position.to_vector();
+ let relative_position = kid
+ .as_block()
.stacking_relative_border_box(CoordinateSystem::Own);
- if let Some(matrix) = kid.as_block()
- .fragment
- .transform_matrix(&relative_position) {
+ if let Some(matrix) = kid.as_block().fragment.transform_matrix(&relative_position) {
let transform_matrix = matrix.transform_point2d(&LayoutPoint::zero()).unwrap();
- stacking_context_position = stacking_context_position +
- Vector2D::new(Au::from_f32_px(transform_matrix.x),
- Au::from_f32_px(transform_matrix.y))
+ stacking_context_position = stacking_context_position + Vector2D::new(
+ Au::from_f32_px(transform_matrix.x),
+ Au::from_f32_px(transform_matrix.y),
+ )
}
}
doit(kid, level + 1, iterator, &stacking_context_position);
@@ -113,7 +120,11 @@ pub fn iterate_through_flow_tree_fragment_border_boxes(root: &mut Flow, iterator
}
pub fn store_overflow(layout_context: &LayoutContext, flow: &mut Flow) {
- if !flow.base().restyle_damage.contains(ServoRestyleDamage::STORE_OVERFLOW) {
+ if !flow
+ .base()
+ .restyle_damage
+ .contains(ServoRestyleDamage::STORE_OVERFLOW)
+ {
return;
}
@@ -132,13 +143,21 @@ pub fn store_overflow(layout_context: &LayoutContext, flow: &mut Flow) {
/// given flow. This is needed to speculatively calculate the inline sizes of block formatting
/// contexts. The speculation typically succeeds, but if it doesn't we have to lay it out again.
pub fn guess_float_placement(flow: &mut Flow) {
- if !flow.base().restyle_damage.intersects(ServoRestyleDamage::REFLOW) {
+ if !flow
+ .base()
+ .restyle_damage
+ .intersects(ServoRestyleDamage::REFLOW)
+ {
return;
}
let mut floats_in = SpeculatedFloatPlacement::compute_floats_in_for_first_child(flow);
for kid in flow.mut_base().child_iter_mut() {
- if kid.base().flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
+ if kid
+ .base()
+ .flags
+ .contains(FlowFlags::IS_ABSOLUTELY_POSITIONED)
+ {
// Do not propagate floats in or out, but do propogate between kids.
guess_float_placement(kid);
} else {
diff --git a/components/layout/table.rs b/components/layout/table.rs
index e36fd4b4e5a..cb80850e91e 100644
--- a/components/layout/table.rs
+++ b/components/layout/table.rs
@@ -79,7 +79,7 @@ impl TableFlow {
column_computed_inline_sizes: Vec::new(),
collapsed_inline_direction_border_widths_for_table: Vec::new(),
collapsed_block_direction_border_widths_for_table: Vec::new(),
- table_layout: table_layout
+ table_layout: table_layout,
}
}
@@ -87,10 +87,10 @@ impl TableFlow {
/// a larger value than one of `self_inline_sizes`. Returns the minimum and preferred inline
/// sizes.
fn update_automatic_column_inline_sizes(
- parent_inline_sizes: &mut Vec<ColumnIntrinsicInlineSize>,
- child_cell_inline_sizes: &[CellIntrinsicInlineSize],
- surrounding_size: Au)
- -> IntrinsicISizes {
+ parent_inline_sizes: &mut Vec<ColumnIntrinsicInlineSize>,
+ child_cell_inline_sizes: &[CellIntrinsicInlineSize],
+ surrounding_size: Au,
+ ) -> IntrinsicISizes {
let mut total_inline_sizes = IntrinsicISizes {
minimum_inline_size: surrounding_size,
preferred_inline_size: surrounding_size,
@@ -117,8 +117,10 @@ impl TableFlow {
} else {
let column_size = &child_cell_inline_size.column_size;
*parent_sizes = ColumnIntrinsicInlineSize {
- minimum_length: cmp::max(parent_sizes.minimum_length,
- column_size.minimum_length),
+ minimum_length: cmp::max(
+ parent_sizes.minimum_length,
+ column_size.minimum_length,
+ ),
percentage: parent_sizes.greatest_percentage(column_size),
preferred: cmp::max(parent_sizes.preferred, column_size.preferred),
constrained: parent_sizes.constrained || column_size.constrained,
@@ -158,12 +160,14 @@ impl TableFlow {
/// Updates the minimum and preferred inline-size calculation for a single row. This is
/// factored out into a separate function because we process children of rowgroups too.
- fn update_column_inline_sizes_for_row(row: &TableRowFlow,
- column_inline_sizes: &mut Vec<ColumnIntrinsicInlineSize>,
- computation: &mut IntrinsicISizesContribution,
- first_row: bool,
- table_layout: TableLayout,
- surrounding_inline_size: Au) {
+ fn update_column_inline_sizes_for_row(
+ row: &TableRowFlow,
+ column_inline_sizes: &mut Vec<ColumnIntrinsicInlineSize>,
+ computation: &mut IntrinsicISizesContribution,
+ first_row: bool,
+ table_layout: TableLayout,
+ surrounding_inline_size: Au,
+ ) {
// Read column inline-sizes from the table-row, and assign inline-size=0 for the columns
// not defined in the column group.
//
@@ -178,13 +182,14 @@ impl TableFlow {
column_inline_sizes.push(cell_inline_size.column_size);
}
}
- }
+ },
TableLayout::Auto => {
computation.union_block(&TableFlow::update_automatic_column_inline_sizes(
column_inline_sizes,
&row.cell_intrinsic_inline_sizes,
- surrounding_inline_size))
- }
+ surrounding_inline_size,
+ ))
+ },
}
}
@@ -207,21 +212,31 @@ impl TableFlow {
fn column_styles(&self) -> Vec<ColumnStyle> {
let mut styles = vec![];
- for group in self.block_flow.base.child_iter()
- .filter(|kid| kid.is_table_colgroup()) {
+ for group in self
+ .block_flow
+ .base
+ .child_iter()
+ .filter(|kid| kid.is_table_colgroup())
+ {
// XXXManishearth these as_foo methods should return options
// so that we can filter_map
let group = group.as_table_colgroup();
- let colgroup_style = group.fragment.as_ref()
- .map(|f| f.style());
+ let colgroup_style = group.fragment.as_ref().map(|f| f.style());
// The colgroup's span attribute is only relevant when
// it has no children
// https://html.spec.whatwg.org/multipage/#forming-a-table
if group.cols.is_empty() {
- let span = group.fragment.as_ref()
- .map(|f| f.column_span()).unwrap_or(1);
- styles.push(ColumnStyle { span, colgroup_style, col_style: None });
+ let span = group
+ .fragment
+ .as_ref()
+ .map(|f| f.column_span())
+ .unwrap_or(1);
+ styles.push(ColumnStyle {
+ span,
+ colgroup_style,
+ col_style: None,
+ });
} else {
for col in &group.cols {
// XXXManishearth Arc-cloning colgroup_style is suboptimal
@@ -267,45 +282,59 @@ impl Flow for TableFlow {
/// The maximum min/pref inline-sizes of each column are set from the rows for the automatic
/// table layout calculation.
fn bubble_inline_sizes(&mut self) {
- let _scope = layout_debug_scope!("table::bubble_inline_sizes {:x}",
- self.block_flow.base.debug_id());
+ let _scope = layout_debug_scope!(
+ "table::bubble_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
// Get column inline sizes from colgroups
- for kid in self.block_flow.base.child_iter_mut().filter(|kid| kid.is_table_colgroup()) {
+ for kid in self
+ .block_flow
+ .base
+ .child_iter_mut()
+ .filter(|kid| kid.is_table_colgroup())
+ {
for specified_inline_size in &kid.as_mut_table_colgroup().inline_sizes {
- self.column_intrinsic_inline_sizes.push(ColumnIntrinsicInlineSize {
- minimum_length: match *specified_inline_size {
- LengthOrPercentageOrAuto::Auto |
- LengthOrPercentageOrAuto::Calc(_) |
- LengthOrPercentageOrAuto::Percentage(_) => Au(0),
- LengthOrPercentageOrAuto::Length(length) => Au::from(length),
- },
- percentage: match *specified_inline_size {
- LengthOrPercentageOrAuto::Auto |
- LengthOrPercentageOrAuto::Calc(_) |
- LengthOrPercentageOrAuto::Length(_) => 0.0,
- LengthOrPercentageOrAuto::Percentage(percentage) => percentage.0,
- },
- preferred: Au(0),
- constrained: false,
- })
+ self.column_intrinsic_inline_sizes
+ .push(ColumnIntrinsicInlineSize {
+ minimum_length: match *specified_inline_size {
+ LengthOrPercentageOrAuto::Auto |
+ LengthOrPercentageOrAuto::Calc(_) |
+ LengthOrPercentageOrAuto::Percentage(_) => Au(0),
+ LengthOrPercentageOrAuto::Length(length) => Au::from(length),
+ },
+ percentage: match *specified_inline_size {
+ LengthOrPercentageOrAuto::Auto |
+ LengthOrPercentageOrAuto::Calc(_) |
+ LengthOrPercentageOrAuto::Length(_) => 0.0,
+ LengthOrPercentageOrAuto::Percentage(percentage) => percentage.0,
+ },
+ preferred: Au(0),
+ constrained: false,
+ })
}
}
self.collapsed_inline_direction_border_widths_for_table = Vec::new();
self.collapsed_block_direction_border_widths_for_table = vec![Au(0)];
- let collapsing_borders = self.block_flow
- .fragment
- .style
- .get_inherited_table()
- .border_collapse == border_collapse::T::Collapse;
+ let collapsing_borders = self
+ .block_flow
+ .fragment
+ .style
+ .get_inherited_table()
+ .border_collapse ==
+ border_collapse::T::Collapse;
let table_inline_collapsed_borders = if collapsing_borders {
Some(TableInlineCollapsedBorders {
- start: CollapsedBorder::inline_start(&*self.block_flow.fragment.style,
- CollapsedBorderProvenance::FromTable),
- end: CollapsedBorder::inline_end(&*self.block_flow.fragment.style,
- CollapsedBorderProvenance::FromTable),
+ start: CollapsedBorder::inline_start(
+ &*self.block_flow.fragment.style,
+ CollapsedBorderProvenance::FromTable,
+ ),
+ end: CollapsedBorder::inline_end(
+ &*self.block_flow.fragment.style,
+ CollapsedBorderProvenance::FromTable,
+ ),
})
} else {
None
@@ -314,8 +343,9 @@ impl Flow for TableFlow {
let mut computation = IntrinsicISizesContribution::new();
let mut previous_collapsed_block_end_borders =
PreviousBlockCollapsedBorders::FromTable(CollapsedBorder::block_start(
- &*self.block_flow.fragment.style,
- CollapsedBorderProvenance::FromTable));
+ &*self.block_flow.fragment.style,
+ CollapsedBorderProvenance::FromTable,
+ ));
let mut first_row = true;
let (border_padding, _) = self.block_flow.fragment.surrounding_intrinsic_inline_size();
@@ -323,48 +353,50 @@ impl Flow for TableFlow {
let mut iterator = TableRowIterator::new(&mut self.block_flow.base).peekable();
while let Some(row) = iterator.next() {
TableFlow::update_column_inline_sizes_for_row(
- row,
- &mut self.column_intrinsic_inline_sizes,
- &mut computation,
- first_row,
- self.table_layout,
- border_padding);
+ row,
+ &mut self.column_intrinsic_inline_sizes,
+ &mut computation,
+ first_row,
+ self.table_layout,
+ border_padding,
+ );
if collapsing_borders {
let next_index_and_sibling = iterator.peek();
- let next_collapsed_borders_in_block_direction =
- match next_index_and_sibling {
- Some(next_sibling) => {
- NextBlockCollapsedBorders::FromNextRow(
- &next_sibling.as_table_row()
- .preliminary_collapsed_borders
- .block_start)
- }
- None => {
- NextBlockCollapsedBorders::FromTable(
- CollapsedBorder::block_end(&*self.block_flow.fragment.style,
- CollapsedBorderProvenance::FromTable))
- }
- };
- perform_border_collapse_for_row(row,
+ let next_collapsed_borders_in_block_direction = match next_index_and_sibling {
+ Some(next_sibling) => NextBlockCollapsedBorders::FromNextRow(
+ &next_sibling
+ .as_table_row()
+ .preliminary_collapsed_borders
+ .block_start,
+ ),
+ None => NextBlockCollapsedBorders::FromTable(CollapsedBorder::block_end(
+ &*self.block_flow.fragment.style,
+ CollapsedBorderProvenance::FromTable,
+ )),
+ };
+ perform_border_collapse_for_row(
+ row,
table_inline_collapsed_borders.as_ref().unwrap(),
previous_collapsed_block_end_borders,
next_collapsed_borders_in_block_direction,
&mut self.collapsed_inline_direction_border_widths_for_table,
- &mut self.collapsed_block_direction_border_widths_for_table);
+ &mut self.collapsed_block_direction_border_widths_for_table,
+ );
previous_collapsed_block_end_borders =
PreviousBlockCollapsedBorders::FromPreviousRow(
- row.final_collapsed_borders.block_end.clone());
+ row.final_collapsed_borders.block_end.clone(),
+ );
}
first_row = false
- };
+ }
}
let total_horizontal_spacing = self.total_horizontal_spacing();
- let mut style_specified_intrinsic_inline_size =
- self.block_flow
- .fragment
- .style_specified_intrinsic_inline_size()
- .finish();
+ let mut style_specified_intrinsic_inline_size = self
+ .block_flow
+ .fragment
+ .style_specified_intrinsic_inline_size()
+ .finish();
style_specified_intrinsic_inline_size.minimum_inline_size -= total_horizontal_spacing;
style_specified_intrinsic_inline_size.preferred_inline_size -= total_horizontal_spacing;
computation.union_block(&style_specified_intrinsic_inline_size);
@@ -376,9 +408,14 @@ impl Flow for TableFlow {
/// Recursively (top-down) determines the actual inline-size of child contexts and fragments.
/// When called on this context, the context has had its inline-size set by the parent context.
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
- let _scope = layout_debug_scope!("table::assign_inline_sizes {:x}",
- self.block_flow.base.debug_id());
- debug!("assign_inline_sizes({}): assigning inline_size for flow", "table");
+ let _scope = layout_debug_scope!(
+ "table::assign_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
+ debug!(
+ "assign_inline_sizes({}): assigning inline_size for flow",
+ "table"
+ );
let shared_context = layout_context.shared_context();
// The position was set to the containing block by the flow's parent.
@@ -396,9 +433,11 @@ impl Flow for TableFlow {
}
let inline_size_computer = InternalTable;
- inline_size_computer.compute_used_inline_size(&mut self.block_flow,
- shared_context,
- containing_block_inline_size);
+ inline_size_computer.compute_used_inline_size(
+ &mut self.block_flow,
+ shared_context,
+ containing_block_inline_size,
+ );
let inline_start_content_edge = self.block_flow.fragment.border_padding.inline_start;
let inline_end_content_edge = self.block_flow.fragment.border_padding.inline_end;
@@ -406,7 +445,8 @@ impl Flow for TableFlow {
let spacing_per_cell = self.spacing();
let total_horizontal_spacing = self.total_horizontal_spacing();
let content_inline_size = self.block_flow.fragment.border_box.size.inline -
- padding_and_borders - total_horizontal_spacing;
+ padding_and_borders -
+ total_horizontal_spacing;
let mut remaining_inline_size = content_inline_size;
match self.table_layout {
@@ -416,32 +456,32 @@ impl Flow for TableFlow {
// https://drafts.csswg.org/css2/tables.html#fixed-table-layout
for column_inline_size in &self.column_intrinsic_inline_sizes {
if column_inline_size.constrained {
- self.column_computed_inline_sizes.push(ColumnComputedInlineSize {
- size: column_inline_size.minimum_length,
- });
+ self.column_computed_inline_sizes
+ .push(ColumnComputedInlineSize {
+ size: column_inline_size.minimum_length,
+ });
remaining_inline_size -= column_inline_size.minimum_length;
} else if column_inline_size.percentage != 0.0 {
let size = remaining_inline_size.scale_by(column_inline_size.percentage);
- self.column_computed_inline_sizes.push(ColumnComputedInlineSize {
- size: size,
- });
+ self.column_computed_inline_sizes
+ .push(ColumnComputedInlineSize { size: size });
remaining_inline_size -= size;
} else {
// Set the size to 0 now, distribute the remaining widths later
- self.column_computed_inline_sizes.push(ColumnComputedInlineSize {
- size: Au(0),
- });
+ self.column_computed_inline_sizes
+ .push(ColumnComputedInlineSize { size: Au(0) });
}
}
// Distribute remaining content inline size
if unspecified_inline_sizes_indices.len() > 0 {
for &index in &unspecified_inline_sizes_indices {
- self.column_computed_inline_sizes[index].size =
- remaining_inline_size.scale_by(1.0 / unspecified_inline_sizes_indices.len() as f32);
+ self.column_computed_inline_sizes[index].size = remaining_inline_size
+ .scale_by(1.0 / unspecified_inline_sizes_indices.len() as f32);
}
} else {
- let total_minimum_size = self.column_intrinsic_inline_sizes
+ let total_minimum_size = self
+ .column_intrinsic_inline_sizes
.iter()
.filter(|size| size.constrained)
.map(|size| size.minimum_length.0 as f32)
@@ -453,57 +493,66 @@ impl Flow for TableFlow {
remaining_inline_size.scale_by(inline_size as f32 / total_minimum_size);
}
}
- }
+ },
_ => {
// The table wrapper already computed the inline-sizes and propagated them down
// to us.
- }
+ },
}
let column_computed_inline_sizes = &self.column_computed_inline_sizes;
let collapsed_inline_direction_border_widths_for_table =
&self.collapsed_inline_direction_border_widths_for_table;
- let mut collapsed_block_direction_border_widths_for_table =
- self.collapsed_block_direction_border_widths_for_table.iter().peekable();
+ let mut collapsed_block_direction_border_widths_for_table = self
+ .collapsed_block_direction_border_widths_for_table
+ .iter()
+ .peekable();
let mut incoming_rowspan = vec![];
- self.block_flow.propagate_assigned_inline_size_to_children(shared_context,
- inline_start_content_edge,
- inline_end_content_edge,
- content_inline_size,
- |child_flow,
- _child_index,
- _content_inline_size,
- writing_mode,
- _inline_start_margin_edge,
- _inline_end_margin_edge| {
- table_row::propagate_column_inline_sizes_to_child(
- child_flow,
- writing_mode,
- column_computed_inline_sizes,
- &spacing_per_cell,
- &mut incoming_rowspan);
- if child_flow.is_table_row() {
- let child_table_row = child_flow.as_mut_table_row();
- child_table_row.populate_collapsed_border_spacing(
- collapsed_inline_direction_border_widths_for_table,
- &mut collapsed_block_direction_border_widths_for_table);
- } else if child_flow.is_table_rowgroup() {
- let child_table_rowgroup = child_flow.as_mut_table_rowgroup();
- child_table_rowgroup.populate_collapsed_border_spacing(
- collapsed_inline_direction_border_widths_for_table,
- &mut collapsed_block_direction_border_widths_for_table);
- }
- });
+ self.block_flow.propagate_assigned_inline_size_to_children(
+ shared_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ content_inline_size,
+ |child_flow,
+ _child_index,
+ _content_inline_size,
+ writing_mode,
+ _inline_start_margin_edge,
+ _inline_end_margin_edge| {
+ table_row::propagate_column_inline_sizes_to_child(
+ child_flow,
+ writing_mode,
+ column_computed_inline_sizes,
+ &spacing_per_cell,
+ &mut incoming_rowspan,
+ );
+ if child_flow.is_table_row() {
+ let child_table_row = child_flow.as_mut_table_row();
+ child_table_row.populate_collapsed_border_spacing(
+ collapsed_inline_direction_border_widths_for_table,
+ &mut collapsed_block_direction_border_widths_for_table,
+ );
+ } else if child_flow.is_table_rowgroup() {
+ let child_table_rowgroup = child_flow.as_mut_table_rowgroup();
+ child_table_rowgroup.populate_collapsed_border_spacing(
+ collapsed_inline_direction_border_widths_for_table,
+ &mut collapsed_block_direction_border_widths_for_table,
+ );
+ }
+ },
+ );
}
fn assign_block_size(&mut self, lc: &LayoutContext) {
debug!("assign_block_size: assigning block_size for table");
let vertical_spacing = self.spacing().vertical();
- self.block_flow.assign_block_size_for_table_like_flow(vertical_spacing, lc)
+ self.block_flow
+ .assign_block_size_for_table_like_flow(vertical_spacing, lc)
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context)
+ self.block_flow
+ .compute_stacking_relative_position(layout_context)
}
fn generated_containing_block_size(&self, flow: OpaqueFlow) -> LogicalSize<Au> {
@@ -511,24 +560,29 @@ impl Flow for TableFlow {
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
- let border_painting_mode = match self.block_flow
- .fragment
- .style
- .get_inherited_table()
- .border_collapse {
+ let border_painting_mode = match self
+ .block_flow
+ .fragment
+ .style
+ .get_inherited_table()
+ .border_collapse
+ {
border_collapse::T::Separate => BorderPaintingMode::Separate,
border_collapse::T::Collapse => BorderPaintingMode::Hidden,
};
- self.block_flow.build_display_list_for_block(state, border_painting_mode);
+ self.block_flow
+ .build_display_list_for_block(state, border_painting_mode);
let iter = TableCellStyleIterator::new(&self);
for style in iter {
@@ -538,8 +592,10 @@ impl Flow for TableFlow {
fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {
// Stacking contexts are collected by the table wrapper.
- self.block_flow.collect_stacking_contexts_for_block(state,
- StackingContextCollectionFlags::NEVER_CREATES_STACKING_CONTEXT);
+ self.block_flow.collect_stacking_contexts_for_block(
+ state,
+ StackingContextCollectionFlags::NEVER_CREATES_STACKING_CONTEXT,
+ );
}
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
@@ -550,11 +606,17 @@ impl Flow for TableFlow {
self.block_flow.compute_overflow()
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position)
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ )
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
@@ -592,15 +654,16 @@ impl ISizeAndMarginsComputer for InternalTable {
&self,
block: &mut BlockFlow,
shared_context: &SharedStyleContext,
- parent_flow_inline_size: Au
+ parent_flow_inline_size: Au,
) {
- let mut input = self.compute_inline_size_constraint_inputs(block,
- parent_flow_inline_size,
- shared_context);
+ let mut input = self.compute_inline_size_constraint_inputs(
+ block,
+ parent_flow_inline_size,
+ shared_context,
+ );
// Tables are always at least as wide as their minimum inline size.
- let minimum_inline_size =
- block.base.intrinsic_inline_sizes.minimum_inline_size -
+ let minimum_inline_size = block.base.intrinsic_inline_sizes.minimum_inline_size -
block.fragment.border_padding.inline_start_end();
input.available_inline_size = cmp::max(input.available_inline_size, minimum_inline_size);
@@ -609,8 +672,11 @@ impl ISizeAndMarginsComputer for InternalTable {
}
/// Solve the inline-size and margins constraints for this block flow.
- fn solve_inline_size_constraints(&self, _: &mut BlockFlow, input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ fn solve_inline_size_constraints(
+ &self,
+ _: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
ISizeConstraintSolution::new(input.available_inline_size, Au(0), Au(0))
}
}
@@ -697,20 +763,28 @@ impl<T> VecExt<T> for Vec<T> {
/// Updates the border styles in the block direction for a single row. This function should
/// only be called if border collapsing is on. It is factored out into a separate function
/// because we process children of rowgroups too.
-fn perform_border_collapse_for_row(child_table_row: &mut TableRowFlow,
- table_inline_borders: &TableInlineCollapsedBorders,
- previous_block_borders: PreviousBlockCollapsedBorders,
- next_block_borders: NextBlockCollapsedBorders,
- inline_spacing: &mut Vec<Au>,
- block_spacing: &mut Vec<Au>) {
+fn perform_border_collapse_for_row(
+ child_table_row: &mut TableRowFlow,
+ table_inline_borders: &TableInlineCollapsedBorders,
+ previous_block_borders: PreviousBlockCollapsedBorders,
+ next_block_borders: NextBlockCollapsedBorders,
+ inline_spacing: &mut Vec<Au>,
+ block_spacing: &mut Vec<Au>,
+) {
// TODO mbrubeck: Take rowspan and colspan into account.
- let number_of_borders_inline_direction = child_table_row.preliminary_collapsed_borders.inline.len();
+ let number_of_borders_inline_direction =
+ child_table_row.preliminary_collapsed_borders.inline.len();
// Compute interior inline borders.
- for (i, this_inline_border) in child_table_row.preliminary_collapsed_borders
- .inline
- .iter_mut()
- .enumerate() {
- child_table_row.final_collapsed_borders.inline.push_or_set(i, *this_inline_border);
+ for (i, this_inline_border) in child_table_row
+ .preliminary_collapsed_borders
+ .inline
+ .iter_mut()
+ .enumerate()
+ {
+ child_table_row
+ .final_collapsed_borders
+ .inline
+ .push_or_set(i, *this_inline_border);
if i == 0 {
child_table_row.final_collapsed_borders.inline[i].combine(&table_inline_borders.start);
} else if i + 1 == number_of_borders_inline_direction {
@@ -718,22 +792,28 @@ fn perform_border_collapse_for_row(child_table_row: &mut TableRowFlow,
}
let inline_spacing = inline_spacing.get_mut_or_push(i, Au(0));
- *inline_spacing = cmp::max(*inline_spacing, child_table_row.final_collapsed_borders.inline[i].width)
+ *inline_spacing = cmp::max(
+ *inline_spacing,
+ child_table_row.final_collapsed_borders.inline[i].width,
+ )
}
// Compute block-start borders.
let block_start_borders = &mut child_table_row.final_collapsed_borders.block_start;
- *block_start_borders = child_table_row.preliminary_collapsed_borders.block_start.clone();
+ *block_start_borders = child_table_row
+ .preliminary_collapsed_borders
+ .block_start
+ .clone();
for (i, this_border) in block_start_borders.iter_mut().enumerate() {
match previous_block_borders {
PreviousBlockCollapsedBorders::FromPreviousRow(ref previous_block_borders) => {
if previous_block_borders.len() > i {
this_border.combine(&previous_block_borders[i]);
}
- }
+ },
PreviousBlockCollapsedBorders::FromTable(table_border) => {
this_border.combine(&table_border);
- }
+ },
}
}
@@ -741,20 +821,22 @@ fn perform_border_collapse_for_row(child_table_row: &mut TableRowFlow,
let next_block = &mut child_table_row.final_collapsed_borders.block_end;
block_spacing.push(Au(0));
let block_spacing = block_spacing.last_mut().unwrap();
- for (i, this_block_border) in child_table_row.preliminary_collapsed_borders
- .block_end
- .iter()
- .enumerate() {
+ for (i, this_block_border) in child_table_row
+ .preliminary_collapsed_borders
+ .block_end
+ .iter()
+ .enumerate()
+ {
let next_block = next_block.push_or_set(i, *this_block_border);
match next_block_borders {
NextBlockCollapsedBorders::FromNextRow(next_block_borders) => {
if next_block_borders.len() > i {
next_block.combine(&next_block_borders[i])
}
- }
+ },
NextBlockCollapsedBorders::FromTable(ref next_block_borders) => {
next_block.combine(next_block_borders);
- }
+ },
}
*block_spacing = cmp::max(*block_spacing, next_block.width)
}
@@ -764,27 +846,41 @@ fn perform_border_collapse_for_row(child_table_row: &mut TableRowFlow,
/// rowgroups.
pub trait TableLikeFlow {
/// Lays out the rows of a table.
- fn assign_block_size_for_table_like_flow(&mut self, block_direction_spacing: Au,
- layout_context: &LayoutContext);
+ fn assign_block_size_for_table_like_flow(
+ &mut self,
+ block_direction_spacing: Au,
+ layout_context: &LayoutContext,
+ );
}
impl TableLikeFlow for BlockFlow {
- fn assign_block_size_for_table_like_flow(&mut self, block_direction_spacing: Au,
- layout_context: &LayoutContext) {
- debug_assert!(self.fragment.style.get_inherited_table().border_collapse ==
- border_collapse::T::Separate || block_direction_spacing == Au(0));
-
- fn border_spacing_for_row(fragment: &Fragment, row: &TableRowFlow,
- block_direction_spacing: Au) -> Au {
+ fn assign_block_size_for_table_like_flow(
+ &mut self,
+ block_direction_spacing: Au,
+ layout_context: &LayoutContext,
+ ) {
+ debug_assert!(
+ self.fragment.style.get_inherited_table().border_collapse ==
+ border_collapse::T::Separate ||
+ block_direction_spacing == Au(0)
+ );
+
+ fn border_spacing_for_row(
+ fragment: &Fragment,
+ row: &TableRowFlow,
+ block_direction_spacing: Au,
+ ) -> Au {
match fragment.style.get_inherited_table().border_collapse {
border_collapse::T::Separate => block_direction_spacing,
- border_collapse::T::Collapse => {
- row.collapsed_border_spacing.block_start
- }
+ border_collapse::T::Collapse => row.collapsed_border_spacing.block_start,
}
}
- if self.base.restyle_damage.contains(ServoRestyleDamage::REFLOW) {
+ if self
+ .base
+ .restyle_damage
+ .contains(ServoRestyleDamage::REFLOW)
+ {
let mut sizes = vec![Default::default()];
// The amount of border spacing up to and including this row,
// but not including the spacing beneath it
@@ -803,14 +899,16 @@ impl TableLikeFlow for BlockFlow {
first = false;
continue;
}
- cumulative_border_spacing +=
- border_spacing_for_row(&self.fragment, kid.as_table_row(),
- block_direction_spacing);
+ cumulative_border_spacing += border_spacing_for_row(
+ &self.fragment,
+ kid.as_table_row(),
+ block_direction_spacing,
+ );
sizes.push(TableRowSizeData {
// we haven't calculated sizes yet
size: Au(0),
cumulative_border_spacing,
- rowgroup_id
+ rowgroup_id,
});
} else if kid.is_table_rowgroup() && !first {
rowgroup_id += 1;
@@ -822,17 +920,17 @@ impl TableLikeFlow for BlockFlow {
let mut i = 0;
for kid in self.base.child_iter_mut() {
if kid.is_table_row() {
- let size = kid.as_mut_table_row()
- .compute_block_size_table_row_base(layout_context,
- &mut incoming_rowspan_data,
- &sizes,
- i);
+ let size = kid.as_mut_table_row().compute_block_size_table_row_base(
+ layout_context,
+ &mut incoming_rowspan_data,
+ &sizes,
+ i,
+ );
sizes[i].size = size;
i += 1;
}
}
-
// Our current border-box position.
let block_start_border_padding = self.fragment.border_padding.block_start;
let mut current_block_offset = block_start_border_padding;
@@ -848,12 +946,12 @@ impl TableLikeFlow for BlockFlow {
has_rows = true;
let row = kid.as_mut_table_row();
row.assign_block_size_to_self_and_children(&sizes, i);
- row.mut_base().restyle_damage
- .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
- ServoRestyleDamage::REFLOW);
- current_block_offset = current_block_offset +
- border_spacing_for_row(&self.fragment, row,
- block_direction_spacing);
+ row.mut_base().restyle_damage.remove(
+ ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW,
+ );
+ current_block_offset =
+ current_block_offset +
+ border_spacing_for_row(&self.fragment, row, block_direction_spacing);
i += 1;
}
@@ -873,13 +971,13 @@ impl TableLikeFlow for BlockFlow {
let mut block_size = current_block_offset - block_start_border_padding;
let mut candidate_block_size_iterator = CandidateBSizeIterator::new(
&self.fragment,
- self.base.block_container_explicit_block_size);
+ self.base.block_container_explicit_block_size,
+ );
while let Some(candidate_block_size) = candidate_block_size_iterator.next() {
- candidate_block_size_iterator.candidate_value =
- match candidate_block_size {
- MaybeAuto::Auto => block_size,
- MaybeAuto::Specified(value) => value
- };
+ candidate_block_size_iterator.candidate_value = match candidate_block_size {
+ MaybeAuto::Auto => block_size,
+ MaybeAuto::Specified(value) => value,
+ };
}
// Adjust `current_block_offset` as necessary to account for the explicitly-specified
@@ -889,8 +987,11 @@ impl TableLikeFlow for BlockFlow {
current_block_offset = current_block_offset + delta;
// Take border, padding, and spacing into account.
- let block_end_offset = self.fragment.border_padding.block_end +
- if has_rows { block_direction_spacing } else { Au(0) };
+ let block_end_offset = self.fragment.border_padding.block_end + if has_rows {
+ block_direction_spacing
+ } else {
+ Au(0)
+ };
current_block_offset = current_block_offset + block_end_offset;
// Now that `current_block_offset` is at the block-end of the border box, compute the
@@ -910,7 +1011,9 @@ impl TableLikeFlow for BlockFlow {
}
}
- self.base.restyle_damage.remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
+ self.base
+ .restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW);
}
}
@@ -937,7 +1040,7 @@ enum NextBlockCollapsedBorders<'a> {
/// provides the Fragment for rowgroups if any
struct TableRowAndGroupIterator<'a> {
kids: FlowListIterator<'a>,
- group: Option<(&'a Fragment, FlowListIterator<'a>)>
+ group: Option<(&'a Fragment, FlowListIterator<'a>)>,
}
impl<'a> TableRowAndGroupIterator<'a> {
@@ -956,7 +1059,7 @@ impl<'a> Iterator for TableRowAndGroupIterator<'a> {
// If we're inside a rowgroup, iterate through the rowgroup's children.
if let Some(ref mut group) = self.group {
if let Some(grandkid) = group.1.next() {
- return Some((Some(group.0), grandkid.as_table_row()))
+ return Some((Some(group.0), grandkid.as_table_row()));
}
}
// Otherwise, iterate through the table's children.
@@ -973,8 +1076,8 @@ impl<'a> Iterator for TableRowAndGroupIterator<'a> {
} else {
self.next() // Skip children that are not rows or rowgroups
}
- }
- None => None
+ },
+ None => None,
}
}
}
@@ -983,7 +1086,7 @@ impl<'a> Iterator for TableRowAndGroupIterator<'a> {
/// provides the Fragment for rowgroups if any
struct MutTableRowAndGroupIterator<'a> {
kids: MutFlowListIterator<'a>,
- group: Option<(&'a Fragment, MutFlowListIterator<'a>)>
+ group: Option<(&'a Fragment, MutFlowListIterator<'a>)>,
}
impl<'a> MutTableRowAndGroupIterator<'a> {
@@ -1002,7 +1105,7 @@ impl<'a> Iterator for MutTableRowAndGroupIterator<'a> {
// If we're inside a rowgroup, iterate through the rowgroup's children.
if let Some(ref mut group) = self.group {
if let Some(grandkid) = group.1.next() {
- return Some((Some(group.0), grandkid.as_mut_table_row()))
+ return Some((Some(group.0), grandkid.as_mut_table_row()));
}
}
// Otherwise, iterate through the table's children.
@@ -1019,8 +1122,8 @@ impl<'a> Iterator for MutTableRowAndGroupIterator<'a> {
} else {
self.next() // Skip children that are not rows or rowgroups
}
- }
- None => None
+ },
+ None => None,
}
}
}
@@ -1052,7 +1155,6 @@ struct TableCellStyleIterator<'table> {
row_iterator: TableRowAndGroupIterator<'table>,
row_info: Option<TableCellStyleIteratorRowInfo<'table>>,
column_index: TableCellColumnIndexData,
-
}
struct TableCellStyleIteratorRowInfo<'table> {
@@ -1069,13 +1171,15 @@ impl<'table> TableCellStyleIterator<'table> {
Some(TableCellStyleIteratorRowInfo {
row: &row,
rowgroup: group,
- cell_iterator: row.block_flow.base.child_iter()
+ cell_iterator: row.block_flow.base.child_iter(),
})
} else {
None
};
TableCellStyleIterator {
- column_styles, row_iterator, row_info,
+ column_styles,
+ row_iterator,
+ row_info,
column_index: Default::default(),
}
}
@@ -1118,14 +1222,12 @@ impl TableCellColumnIndexData {
fn advance(&mut self, amount: u32, column_styles: &[ColumnStyle]) {
self.absolute += amount;
self.relative_offset += amount;
- if let Some(mut current_col) =
- column_styles.get(self.relative as usize) {
+ if let Some(mut current_col) = column_styles.get(self.relative as usize) {
while self.relative_offset >= current_col.span {
// move to the next column
self.relative += 1;
self.relative_offset -= current_col.span;
- if let Some(column_style) =
- column_styles.get(self.relative as usize) {
+ if let Some(column_style) = column_styles.get(self.relative as usize) {
current_col = column_style;
} else {
// we ran out of column_styles,
@@ -1144,7 +1246,11 @@ impl<'table> Iterator for TableCellStyleIterator<'table> {
// FIXME We do this awkward .take() followed by shoving it back in
// because without NLL the row_info borrow lasts too long
if let Some(mut row_info) = self.row_info.take() {
- if let Some(rowspan) = row_info.row.incoming_rowspan.get(self.column_index.absolute as usize) {
+ if let Some(rowspan) = row_info
+ .row
+ .incoming_rowspan
+ .get(self.column_index.absolute as usize)
+ {
// we are not allowed to use this column as a starting point. Try the next one.
if *rowspan > 1 {
self.column_index.advance(1, &self.column_styles);
@@ -1159,9 +1265,14 @@ impl<'table> Iterator for TableCellStyleIterator<'table> {
let row_style = row_info.row.block_flow.fragment.style();
let cell = cell.as_table_cell();
let (col_style, colgroup_style) = if let Some(column_style) =
- self.column_styles.get(self.column_index.relative as usize) {
- let styles = (column_style.col_style.clone(), column_style.colgroup_style.clone());
- self.column_index.advance(cell.column_span, &self.column_styles);
+ self.column_styles.get(self.column_index.relative as usize)
+ {
+ let styles = (
+ column_style.col_style.clone(),
+ column_style.colgroup_style.clone(),
+ );
+ self.column_index
+ .advance(cell.column_span, &self.column_styles);
styles
} else {
@@ -1175,14 +1286,14 @@ impl<'table> Iterator for TableCellStyleIterator<'table> {
col_style,
rowgroup_style,
row_style,
- })
+ });
} else {
// next row
if let Some((group, row)) = self.row_iterator.next() {
self.row_info = Some(TableCellStyleIteratorRowInfo {
row: &row,
rowgroup: group,
- cell_iterator: row.block_flow.base.child_iter()
+ cell_iterator: row.block_flow.base.child_iter(),
});
self.column_index = Default::default();
self.next()
@@ -1203,17 +1314,29 @@ impl<'table> TableCellStyleInfo<'table> {
fn build_display_list(&self, mut state: &mut DisplayListBuildState) {
use style::computed_values::visibility::T as Visibility;
- if !self.cell.visible || self.cell.block_flow.fragment.style()
- .get_inherited_box().visibility != Visibility::Visible {
- return
+ if !self.cell.visible ||
+ self.cell
+ .block_flow
+ .fragment
+ .style()
+ .get_inherited_box()
+ .visibility !=
+ Visibility::Visible
+ {
+ return;
}
- let border_painting_mode = match self.cell.block_flow
- .fragment
- .style
- .get_inherited_table()
- .border_collapse {
+ let border_painting_mode = match self
+ .cell
+ .block_flow
+ .fragment
+ .style
+ .get_inherited_table()
+ .border_collapse
+ {
border_collapse::T::Separate => BorderPaintingMode::Separate,
- border_collapse::T::Collapse => BorderPaintingMode::Collapse(&self.cell.collapsed_borders),
+ border_collapse::T::Collapse => {
+ BorderPaintingMode::Collapse(&self.cell.collapsed_borders)
+ },
};
{
let cell_flow = &self.cell.block_flow;
@@ -1227,7 +1350,9 @@ impl<'table> TableCellStyleInfo<'table> {
}
let background_color = sty.resolve_color(background.background_color);
cell_flow.build_display_list_for_background_if_applicable_with_background(
- state, background, background_color
+ state,
+ background,
+ background_color,
);
};
@@ -1243,6 +1368,8 @@ impl<'table> TableCellStyleInfo<'table> {
build_dl(self.row_style, &mut state);
}
// the restyle damage will be set in TableCellFlow::build_display_list()
- self.cell.block_flow.build_display_list_for_block_no_damage(state, border_painting_mode)
+ self.cell
+ .block_flow
+ .build_display_list_for_block_no_damage(state, border_painting_mode)
}
}
diff --git a/components/layout/table_caption.rs b/components/layout/table_caption.rs
index 63292cfbb55..51a6078ec31 100644
--- a/components/layout/table_caption.rs
+++ b/components/layout/table_caption.rs
@@ -58,7 +58,10 @@ impl Flow for TableCaptionFlow {
}
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
- debug!("assign_inline_sizes({}): assigning inline_size for flow", "table_caption");
+ debug!(
+ "assign_inline_sizes({}): assigning inline_size for flow",
+ "table_caption"
+ );
self.block_flow.assign_inline_sizes(layout_context);
}
@@ -68,15 +71,18 @@ impl Flow for TableCaptionFlow {
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context)
+ self.block_flow
+ .compute_stacking_relative_position(layout_context)
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
@@ -85,8 +91,8 @@ impl Flow for TableCaptionFlow {
}
fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {
- self.block_flow.collect_stacking_contexts_for_block(state,
- StackingContextCollectionFlags::empty());
+ self.block_flow
+ .collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty());
}
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
@@ -109,11 +115,17 @@ impl Flow for TableCaptionFlow {
self.block_flow.generated_containing_block_size(flow)
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position)
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ )
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
diff --git a/components/layout/table_cell.rs b/components/layout/table_cell.rs
index fe8d453cb0b..1af32166a5f 100644
--- a/components/layout/table_cell.rs
+++ b/components/layout/table_cell.rs
@@ -63,7 +63,10 @@ impl TableCellFlow {
}
pub fn from_node_fragment_and_visibility_flag<N: ThreadSafeLayoutNode>(
- node: &N, fragment: Fragment, visible: bool) -> TableCellFlow {
+ node: &N,
+ fragment: Fragment,
+ visible: bool,
+ ) -> TableCellFlow {
TableCellFlow {
block_flow: BlockFlow::from_fragment(fragment),
collapsed_borders: CollapsedBordersForCell::new(),
@@ -90,7 +93,8 @@ impl TableCellFlow {
let remaining = self.block_flow.assign_block_size_block_base(
layout_context,
None,
- MarginsMayCollapseFlag::MarginsMayNotCollapse);
+ MarginsMayCollapseFlag::MarginsMayNotCollapse,
+ );
debug_assert!(remaining.is_none());
}
@@ -102,12 +106,14 @@ impl TableCellFlow {
for kid in self.base().children.iter() {
let kid_base = kid.base();
if kid_base.flags.contains(FlowFlags::IS_ABSOLUTELY_POSITIONED) {
- continue
+ continue;
}
- let start = kid_base.position.start.b -
- kid_base.collapsible_margins.block_start_margin_for_noncollapsible_context();
- let end = kid_base.position.start.b + kid_base.position.size.block +
- kid_base.collapsible_margins.block_end_margin_for_noncollapsible_context();
+ let start = kid_base.position.start.b - kid_base
+ .collapsible_margins
+ .block_start_margin_for_noncollapsible_context();
+ let end = kid_base.position.start.b + kid_base.position.size.block + kid_base
+ .collapsible_margins
+ .block_end_margin_for_noncollapsible_context();
match extents {
Some((ref mut first_start, ref mut last_end)) => {
if start < *first_start {
@@ -116,7 +122,7 @@ impl TableCellFlow {
if end > *last_end {
*last_end = end
}
- }
+ },
None => extents = Some((start, end)),
}
}
@@ -138,7 +144,7 @@ impl TableCellFlow {
_ => Au(0),
};
if offset == Au(0) {
- return
+ return;
}
for kid in self.mut_base().children.iter_mut() {
@@ -154,9 +160,8 @@ impl TableCellFlow {
// Call after block size calculation
pub fn total_block_size(&mut self) -> Au {
// TODO: Percentage block-size
- let specified = MaybeAuto::from_style(self.fragment().style()
- .content_block_size(),
- Au(0)).specified_or_zero();
+ let specified = MaybeAuto::from_style(self.fragment().style().content_block_size(), Au(0))
+ .specified_or_zero();
specified + self.fragment().border_padding.block_start_end()
}
}
@@ -185,23 +190,46 @@ impl Flow for TableCellFlow {
/// Minimum/preferred inline-sizes set by this function are used in automatic table layout
/// calculation.
fn bubble_inline_sizes(&mut self) {
- let _scope = layout_debug_scope!("table_cell::bubble_inline_sizes {:x}",
- self.block_flow.base.debug_id());
+ let _scope = layout_debug_scope!(
+ "table_cell::bubble_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
self.block_flow.bubble_inline_sizes_for_block(true);
- let specified_inline_size = MaybeAuto::from_style(self.block_flow
- .fragment
- .style()
- .content_inline_size(),
- Au(0)).specified_or_zero();
- if self.block_flow.base.intrinsic_inline_sizes.minimum_inline_size <
- specified_inline_size {
- self.block_flow.base.intrinsic_inline_sizes.minimum_inline_size = specified_inline_size
+ let specified_inline_size = MaybeAuto::from_style(
+ self.block_flow.fragment.style().content_inline_size(),
+ Au(0),
+ ).specified_or_zero();
+ if self
+ .block_flow
+ .base
+ .intrinsic_inline_sizes
+ .minimum_inline_size <
+ specified_inline_size
+ {
+ self.block_flow
+ .base
+ .intrinsic_inline_sizes
+ .minimum_inline_size = specified_inline_size
}
- if self.block_flow.base.intrinsic_inline_sizes.preferred_inline_size <
- self.block_flow.base.intrinsic_inline_sizes.minimum_inline_size {
- self.block_flow.base.intrinsic_inline_sizes.preferred_inline_size =
- self.block_flow.base.intrinsic_inline_sizes.minimum_inline_size;
+ if self
+ .block_flow
+ .base
+ .intrinsic_inline_sizes
+ .preferred_inline_size <
+ self.block_flow
+ .base
+ .intrinsic_inline_sizes
+ .minimum_inline_size
+ {
+ self.block_flow
+ .base
+ .intrinsic_inline_sizes
+ .preferred_inline_size = self
+ .block_flow
+ .base
+ .intrinsic_inline_sizes
+ .minimum_inline_size;
}
}
@@ -209,35 +237,42 @@ impl Flow for TableCellFlow {
/// When called on this context, the context has had its inline-size set by the parent table
/// row.
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
- let _scope = layout_debug_scope!("table_cell::assign_inline_sizes {:x}",
- self.block_flow.base.debug_id());
- debug!("assign_inline_sizes({}): assigning inline_size for flow", "table_cell");
+ let _scope = layout_debug_scope!(
+ "table_cell::assign_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
+ debug!(
+ "assign_inline_sizes({}): assigning inline_size for flow",
+ "table_cell"
+ );
let shared_context = layout_context.shared_context();
// The position was set to the column inline-size by the parent flow, table row flow.
let containing_block_inline_size = self.block_flow.base.block_container_inline_size;
let inline_size_computer = InternalTable;
- inline_size_computer.compute_used_inline_size(&mut self.block_flow,
- shared_context,
- containing_block_inline_size);
+ inline_size_computer.compute_used_inline_size(
+ &mut self.block_flow,
+ shared_context,
+ containing_block_inline_size,
+ );
- let inline_start_content_edge =
- self.block_flow.fragment.border_box.start.i +
+ let inline_start_content_edge = self.block_flow.fragment.border_box.start.i +
self.block_flow.fragment.border_padding.inline_start;
- let inline_end_content_edge =
- self.block_flow.base.block_container_inline_size -
+ let inline_end_content_edge = self.block_flow.base.block_container_inline_size -
self.block_flow.fragment.border_padding.inline_start_end() -
self.block_flow.fragment.border_box.size.inline;
let padding_and_borders = self.block_flow.fragment.border_padding.inline_start_end();
let content_inline_size =
self.block_flow.fragment.border_box.size.inline - padding_and_borders;
- self.block_flow.propagate_assigned_inline_size_to_children(shared_context,
- inline_start_content_edge,
- inline_end_content_edge,
- content_inline_size,
- |_, _, _, _, _, _| {});
+ self.block_flow.propagate_assigned_inline_size_to_children(
+ shared_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ content_inline_size,
+ |_, _, _, _, _, _| {},
+ );
}
fn assign_block_size(&mut self, layout_context: &LayoutContext) {
@@ -246,15 +281,18 @@ impl Flow for TableCellFlow {
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context)
+ self.block_flow
+ .compute_stacking_relative_position(layout_context)
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn build_display_list(&mut self, _: &mut DisplayListBuildState) {
@@ -264,12 +302,15 @@ impl Flow for TableCellFlow {
// we skip setting the damage in TableCellStyleInfo::build_display_list()
// because we only have immutable access
- self.block_flow.fragment.restyle_damage.remove(ServoRestyleDamage::REPAINT);
+ self.block_flow
+ .fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::REPAINT);
}
fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {
- self.block_flow.collect_stacking_contexts_for_block(state,
- StackingContextCollectionFlags::empty());
+ self.block_flow
+ .collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty());
}
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
@@ -292,11 +333,17 @@ impl Flow for TableCellFlow {
self.block_flow.generated_containing_block_size(flow)
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position)
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ )
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
@@ -379,67 +426,74 @@ impl CollapsedBordersForCell {
}
}
- pub fn adjust_border_bounds_for_painting(&self,
- border_bounds: &mut Rect<Au>,
- writing_mode: WritingMode) {
+ pub fn adjust_border_bounds_for_painting(
+ &self,
+ border_bounds: &mut Rect<Au>,
+ writing_mode: WritingMode,
+ ) {
let inline_start_divisor = if self.should_paint_inline_start_border() {
2
} else {
-2
};
- let inline_start_offset = self.inline_start_width / 2 + self.inline_start_border.width /
- inline_start_divisor;
+ let inline_start_offset =
+ self.inline_start_width / 2 + self.inline_start_border.width / inline_start_divisor;
let inline_end_divisor = if self.should_paint_inline_end_border() {
2
} else {
-2
};
- let inline_end_offset = self.inline_end_width / 2 + self.inline_end_border.width /
- inline_end_divisor;
+ let inline_end_offset =
+ self.inline_end_width / 2 + self.inline_end_border.width / inline_end_divisor;
let block_start_divisor = if self.should_paint_block_start_border() {
2
} else {
-2
};
- let block_start_offset = self.block_start_width / 2 + self.block_start_border.width /
- block_start_divisor;
+ let block_start_offset =
+ self.block_start_width / 2 + self.block_start_border.width / block_start_divisor;
let block_end_divisor = if self.should_paint_block_end_border() {
2
} else {
-2
};
- let block_end_offset = self.block_end_width / 2 + self.block_end_border.width /
- block_end_divisor;
+ let block_end_offset =
+ self.block_end_width / 2 + self.block_end_border.width / block_end_divisor;
// FIXME(pcwalton): Get the real container size.
let mut logical_bounds =
LogicalRect::from_physical(writing_mode, *border_bounds, Size2D::new(Au(0), Au(0)));
logical_bounds.start.i = logical_bounds.start.i - inline_start_offset;
logical_bounds.start.b = logical_bounds.start.b - block_start_offset;
- logical_bounds.size.inline = logical_bounds.size.inline + inline_start_offset +
- inline_end_offset;
- logical_bounds.size.block = logical_bounds.size.block + block_start_offset +
- block_end_offset;
+ logical_bounds.size.inline =
+ logical_bounds.size.inline + inline_start_offset + inline_end_offset;
+ logical_bounds.size.block =
+ logical_bounds.size.block + block_start_offset + block_end_offset;
*border_bounds = logical_bounds.to_physical(writing_mode, Size2D::new(Au(0), Au(0)))
}
pub fn adjust_border_colors_and_styles_for_painting(
- &self,
- border_colors: &mut SideOffsets2D<Color>,
- border_styles: &mut SideOffsets2D<BorderStyle>,
- writing_mode: WritingMode) {
- let logical_border_colors = LogicalMargin::new(writing_mode,
- self.block_start_border.color,
- self.inline_end_border.color,
- self.block_end_border.color,
- self.inline_start_border.color);
+ &self,
+ border_colors: &mut SideOffsets2D<Color>,
+ border_styles: &mut SideOffsets2D<BorderStyle>,
+ writing_mode: WritingMode,
+ ) {
+ let logical_border_colors = LogicalMargin::new(
+ writing_mode,
+ self.block_start_border.color,
+ self.inline_end_border.color,
+ self.block_end_border.color,
+ self.inline_start_border.color,
+ );
*border_colors = logical_border_colors.to_physical(writing_mode);
- let logical_border_styles = LogicalMargin::new(writing_mode,
- self.block_start_border.style,
- self.inline_end_border.style,
- self.block_end_border.style,
- self.inline_start_border.style);
+ let logical_border_styles = LogicalMargin::new(
+ writing_mode,
+ self.block_start_border.style,
+ self.inline_end_border.style,
+ self.block_end_border.style,
+ self.inline_start_border.style,
+ );
*border_styles = logical_border_styles.to_physical(writing_mode);
}
}
diff --git a/components/layout/table_colgroup.rs b/components/layout/table_colgroup.rs
index cd1260098f1..7a3b54a2ed0 100644
--- a/components/layout/table_colgroup.rs
+++ b/components/layout/table_colgroup.rs
@@ -43,12 +43,14 @@ impl TableColGroupFlow {
pub fn from_fragments(fragment: Fragment, fragments: Vec<Fragment>) -> TableColGroupFlow {
let writing_mode = fragment.style().writing_mode;
TableColGroupFlow {
- base: BaseFlow::new(Some(fragment.style()),
- writing_mode,
- ForceNonfloatedFlag::ForceNonfloated),
+ base: BaseFlow::new(
+ Some(fragment.style()),
+ writing_mode,
+ ForceNonfloatedFlag::ForceNonfloated,
+ ),
fragment: Some(fragment),
cols: fragments,
- inline_sizes: vec!(),
+ inline_sizes: vec![],
}
}
}
@@ -67,8 +69,10 @@ impl Flow for TableColGroupFlow {
}
fn bubble_inline_sizes(&mut self) {
- let _scope = layout_debug_scope!("table_colgroup::bubble_inline_sizes {:x}",
- self.base.debug_id());
+ let _scope = layout_debug_scope!(
+ "table_colgroup::bubble_inline_sizes {:x}",
+ self.base.debug_id()
+ );
for fragment in &self.cols {
// Retrieve the specified value from the appropriate CSS property.
@@ -81,19 +85,17 @@ impl Flow for TableColGroupFlow {
/// Table column inline-sizes are assigned in the table flow and propagated to table row flows
/// and/or rowgroup flows. Therefore, table colgroup flows do not need to assign inline-sizes.
- fn assign_inline_sizes(&mut self, _: &LayoutContext) {
- }
+ fn assign_inline_sizes(&mut self, _: &LayoutContext) {}
/// Table columns do not have block-size.
- fn assign_block_size(&mut self, _: &LayoutContext) {
- }
+ fn assign_block_size(&mut self, _: &LayoutContext) {}
fn update_late_computed_inline_position_if_necessary(&mut self, _: Au) {}
fn update_late_computed_block_position_if_necessary(&mut self, _: Au) {}
// Table columns are invisible.
- fn build_display_list(&mut self, _: &mut DisplayListBuildState) { }
+ fn build_display_list(&mut self, _: &mut DisplayListBuildState) {}
fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {
self.base.stacking_context_id = state.current_stacking_context_id;
@@ -110,10 +112,13 @@ impl Flow for TableColGroupFlow {
panic!("Table column groups can't be containing blocks!")
}
- fn iterate_through_fragment_border_boxes(&self,
- _: &mut FragmentBorderBoxIterator,
- _: i32,
- _: &Point2D<Au>) {}
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ _: &mut FragmentBorderBoxIterator,
+ _: i32,
+ _: &Point2D<Au>,
+ ) {
+ }
fn mutate_fragments(&mut self, _: &mut FnMut(&mut Fragment)) {}
}
diff --git a/components/layout/table_row.rs b/components/layout/table_row.rs
index ffecce5d6c7..9d5c3a15618 100644
--- a/components/layout/table_row.rs
+++ b/components/layout/table_row.rs
@@ -89,7 +89,6 @@ pub struct CellIntrinsicInlineSize {
pub row_span: u32,
}
-
impl TableRowFlow {
pub fn from_fragment(fragment: Fragment) -> TableRowFlow {
let writing_mode = fragment.style().writing_mode;
@@ -111,14 +110,19 @@ impl TableRowFlow {
/// TODO(pcwalton): This doesn't handle floats and positioned elements right.
///
/// Returns the block size
- pub fn compute_block_size_table_row_base<'a>(&'a mut self, layout_context: &LayoutContext,
- incoming_rowspan_data: &mut Vec<Au>,
- border_info: &[TableRowSizeData],
- row_index: usize) -> Au {
- fn include_sizes_from_previous_rows(col: &mut usize,
- incoming_rowspan: &[u32],
- incoming_rowspan_data: &mut Vec<Au>,
- max_block_size: &mut Au) {
+ pub fn compute_block_size_table_row_base<'a>(
+ &'a mut self,
+ layout_context: &LayoutContext,
+ incoming_rowspan_data: &mut Vec<Au>,
+ border_info: &[TableRowSizeData],
+ row_index: usize,
+ ) -> Au {
+ fn include_sizes_from_previous_rows(
+ col: &mut usize,
+ incoming_rowspan: &[u32],
+ incoming_rowspan_data: &mut Vec<Au>,
+ max_block_size: &mut Au,
+ ) {
while let Some(span) = incoming_rowspan.get(*col) {
if *span == 1 {
break;
@@ -141,19 +145,28 @@ impl TableRowFlow {
// all cells).
let mut max_block_size = Au(0);
let thread_id = self.block_flow.base.thread_id;
- let content_box = self.block_flow.base.position
- - self.block_flow.fragment.border_padding
- - self.block_flow.fragment.margin;
+ let content_box = self.block_flow.base.position -
+ self.block_flow.fragment.border_padding -
+ self.block_flow.fragment.margin;
let mut col = 0;
for kid in self.block_flow.base.child_iter_mut() {
- include_sizes_from_previous_rows(&mut col, &self.incoming_rowspan,
- incoming_rowspan_data, &mut max_block_size);
+ include_sizes_from_previous_rows(
+ &mut col,
+ &self.incoming_rowspan,
+ incoming_rowspan_data,
+ &mut max_block_size,
+ );
kid.place_float_if_applicable();
- debug_assert!(!kid.base().flags.is_float(), "table cells should never float");
- kid.assign_block_size_for_inorder_child_if_necessary(layout_context,
- thread_id,
- content_box);
+ debug_assert!(
+ !kid.base().flags.is_float(),
+ "table cells should never float"
+ );
+ kid.assign_block_size_for_inorder_child_if_necessary(
+ layout_context,
+ thread_id,
+ content_box,
+ );
let mut row_span;
let column_span;
@@ -172,7 +185,8 @@ impl TableRowFlow {
if incoming_rowspan_data.len() <= col {
incoming_rowspan_data.resize(col + 1, Au(0));
}
- let border_sizes_spanned = get_spanned_border_size(border_info, row_index, &mut row_span);
+ let border_sizes_spanned =
+ get_spanned_border_size(border_info, row_index, &mut row_span);
cell_block_size_pressure -= border_sizes_spanned;
@@ -186,33 +200,41 @@ impl TableRowFlow {
max_block_size = max(max_block_size, cell_block_size_pressure);
col += column_span;
}
- include_sizes_from_previous_rows(&mut col, &self.incoming_rowspan, incoming_rowspan_data, &mut max_block_size);
+ include_sizes_from_previous_rows(
+ &mut col,
+ &self.incoming_rowspan,
+ incoming_rowspan_data,
+ &mut max_block_size,
+ );
let mut block_size = max_block_size;
// TODO: Percentage block-size
- block_size = match MaybeAuto::from_style(self.block_flow
- .fragment
- .style()
- .content_block_size(),
- Au(0)) {
+ block_size = match MaybeAuto::from_style(
+ self.block_flow.fragment.style().content_block_size(),
+ Au(0),
+ ) {
MaybeAuto::Auto => block_size,
MaybeAuto::Specified(value) => max(value, block_size),
};
block_size
}
- pub fn assign_block_size_to_self_and_children(&mut self, sizes: &[TableRowSizeData], index: usize) {
+ pub fn assign_block_size_to_self_and_children(
+ &mut self,
+ sizes: &[TableRowSizeData],
+ index: usize,
+ ) {
// Assign the block-size of kid fragments, which is the same value as own block-size.
let block_size = sizes[index].size;
for kid in self.block_flow.base.child_iter_mut() {
let child_table_cell = kid.as_mut_table_cell();
let block_size = if child_table_cell.row_span != 1 {
let mut row_span = child_table_cell.row_span;
- let border_sizes_spanned =
- get_spanned_border_size(sizes, index, &mut row_span);
- let row_sizes = sizes[index..].iter()
- .take(row_span as usize)
- .fold(Au(0), |accum, r| accum + r.size);
+ let border_sizes_spanned = get_spanned_border_size(sizes, index, &mut row_span);
+ let row_sizes = sizes[index..]
+ .iter()
+ .take(row_span as usize)
+ .fold(Au(0), |accum, r| accum + r.size);
row_sizes + border_sizes_spanned
} else {
block_size
@@ -232,17 +254,13 @@ impl TableRowFlow {
// Write in the size of the relative containing block for children. (This
// information is also needed to handle RTL.)
- child_table_cell.block_flow.base.early_absolute_position_info =
- EarlyAbsolutePositionInfo {
- relative_containing_block_size: self.block_flow
- .fragment
- .content_box()
- .size,
- relative_containing_block_mode: self.block_flow
- .fragment
- .style()
- .writing_mode,
- };
+ child_table_cell
+ .block_flow
+ .base
+ .early_absolute_position_info = EarlyAbsolutePositionInfo {
+ relative_containing_block_size: self.block_flow.fragment.content_box().size,
+ relative_containing_block_mode: self.block_flow.fragment.style().writing_mode,
+ };
}
// Assign the block-size of own fragment
@@ -253,22 +271,28 @@ impl TableRowFlow {
}
pub fn populate_collapsed_border_spacing<'a, I>(
- &mut self,
- collapsed_inline_direction_border_widths_for_table: &[Au],
- collapsed_block_direction_border_widths_for_table: &mut Peekable<I>)
- where I: Iterator<Item=&'a Au> {
+ &mut self,
+ collapsed_inline_direction_border_widths_for_table: &[Au],
+ collapsed_block_direction_border_widths_for_table: &mut Peekable<I>,
+ ) where
+ I: Iterator<Item = &'a Au>,
+ {
self.collapsed_border_spacing.inline.clear();
- self.collapsed_border_spacing
- .inline
- .extend(collapsed_inline_direction_border_widths_for_table.into_iter().map(|x| *x));
+ self.collapsed_border_spacing.inline.extend(
+ collapsed_inline_direction_border_widths_for_table
+ .into_iter()
+ .map(|x| *x),
+ );
if let Some(collapsed_block_direction_border_width_for_table) =
- collapsed_block_direction_border_widths_for_table.next() {
+ collapsed_block_direction_border_widths_for_table.next()
+ {
self.collapsed_border_spacing.block_start =
*collapsed_block_direction_border_width_for_table
}
if let Some(collapsed_block_direction_border_width_for_table) =
- collapsed_block_direction_border_widths_for_table.peek() {
+ collapsed_block_direction_border_widths_for_table.peek()
+ {
self.collapsed_border_spacing.block_end =
**collapsed_block_direction_border_width_for_table
}
@@ -308,9 +332,10 @@ fn get_spanned_border_size(sizes: &[TableRowSizeData], row_index: usize, row_spa
if sizes[last_row_idx].rowgroup_id != sizes[row_index].rowgroup_id {
// XXXManishearth this loop can be avoided by also storing
// a "last_rowgroup_at" index so we can leapfrog back quickly
- *row_span = sizes[row_index..last_row_idx + 1].iter()
- .position(|s| s.rowgroup_id != sizes[row_index].rowgroup_id)
- .unwrap() as u32;
+ *row_span = sizes[row_index..last_row_idx + 1]
+ .iter()
+ .position(|s| s.rowgroup_id != sizes[row_index].rowgroup_id)
+ .unwrap() as u32;
last_row_idx = row_index + *row_span as usize - 1;
}
sizes[last_row_idx].cumulative_border_spacing - sizes[row_index].cumulative_border_spacing
@@ -345,20 +370,26 @@ impl Flow for TableRowFlow {
/// The specified column inline-sizes of children cells are used in fixed table layout
/// calculation.
fn bubble_inline_sizes(&mut self) {
- let _scope = layout_debug_scope!("table_row::bubble_inline_sizes {:x}",
- self.block_flow.base.debug_id());
+ let _scope = layout_debug_scope!(
+ "table_row::bubble_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
// Bubble up the specified inline-sizes from child table cells.
let (mut min_inline_size, mut pref_inline_size) = (Au(0), Au(0));
- let collapsing_borders = self.block_flow
- .fragment
- .style()
- .get_inherited_table()
- .border_collapse == BorderCollapse::Collapse;
+ let collapsing_borders = self
+ .block_flow
+ .fragment
+ .style()
+ .get_inherited_table()
+ .border_collapse ==
+ BorderCollapse::Collapse;
let row_style = &*self.block_flow.fragment.style;
- self.preliminary_collapsed_borders.reset(
- CollapsedBorder::inline_start(&row_style,
- CollapsedBorderProvenance::FromTableRow));
+ self.preliminary_collapsed_borders
+ .reset(CollapsedBorder::inline_start(
+ &row_style,
+ CollapsedBorderProvenance::FromTableRow,
+ ));
{
let children_count = self.block_flow.base.children.len();
@@ -373,10 +404,11 @@ impl Flow for TableRowFlow {
let child_row_span;
{
let child_table_cell = kid.as_mut_table_cell();
- child_specified_inline_size = child_table_cell.block_flow
- .fragment
- .style
- .content_inline_size();
+ child_specified_inline_size = child_table_cell
+ .block_flow
+ .fragment
+ .style
+ .content_inline_size();
child_column_span = child_table_cell.column_span;
child_row_span = child_table_cell.row_span;
@@ -388,7 +420,8 @@ impl Flow for TableRowFlow {
i,
child_table_cell,
&mut iterator,
- &mut self.preliminary_collapsed_borders)
+ &mut self.preliminary_collapsed_borders,
+ )
}
}
@@ -401,7 +434,7 @@ impl Flow for TableRowFlow {
LengthOrPercentageOrAuto::Calc(_) |
LengthOrPercentageOrAuto::Percentage(_) => {
child_base.intrinsic_inline_sizes.minimum_inline_size
- }
+ },
LengthOrPercentageOrAuto::Length(length) => Au::from(length),
},
percentage: match child_specified_inline_size {
@@ -420,23 +453,34 @@ impl Flow for TableRowFlow {
};
min_inline_size = min_inline_size + child_column_inline_size.minimum_length;
pref_inline_size = pref_inline_size + child_column_inline_size.preferred;
- self.cell_intrinsic_inline_sizes.push(CellIntrinsicInlineSize {
- column_size: child_column_inline_size,
- column_span: child_column_span,
- row_span: child_row_span,
- });
+ self.cell_intrinsic_inline_sizes
+ .push(CellIntrinsicInlineSize {
+ column_size: child_column_inline_size,
+ column_span: child_column_span,
+ row_span: child_row_span,
+ });
}
}
- self.block_flow.base.intrinsic_inline_sizes.minimum_inline_size = min_inline_size;
- self.block_flow.base.intrinsic_inline_sizes.preferred_inline_size = max(min_inline_size,
- pref_inline_size);
+ self.block_flow
+ .base
+ .intrinsic_inline_sizes
+ .minimum_inline_size = min_inline_size;
+ self.block_flow
+ .base
+ .intrinsic_inline_sizes
+ .preferred_inline_size = max(min_inline_size, pref_inline_size);
}
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
- let _scope = layout_debug_scope!("table_row::assign_inline_sizes {:x}",
- self.block_flow.base.debug_id());
- debug!("assign_inline_sizes({}): assigning inline_size for flow", "table_row");
+ let _scope = layout_debug_scope!(
+ "table_row::assign_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
+ debug!(
+ "assign_inline_sizes({}): assigning inline_size for flow",
+ "table_row"
+ );
let shared_context = layout_context.shared_context();
// The position was set to the containing block by the flow's parent.
@@ -447,9 +491,11 @@ impl Flow for TableRowFlow {
let inline_end_content_edge = Au(0);
let inline_size_computer = InternalTable;
- inline_size_computer.compute_used_inline_size(&mut self.block_flow,
- shared_context,
- containing_block_inline_size);
+ inline_size_computer.compute_used_inline_size(
+ &mut self.block_flow,
+ shared_context,
+ containing_block_inline_size,
+ );
// Spread out the completed inline sizes among columns with spans > 1.
let num_columns = self.column_computed_inline_sizes.len();
@@ -461,26 +507,23 @@ impl Flow for TableRowFlow {
while col < self.incoming_rowspan.len() && self.incoming_rowspan[col] != 1 {
let size = match self.column_computed_inline_sizes.get(col) {
Some(column_computed_inline_size) => *column_computed_inline_size,
- None => ColumnComputedInlineSize { size: Au(0) } // See FIXME below.
+ None => ColumnComputedInlineSize { size: Au(0) }, // See FIXME below.
};
computed_inline_size_for_cells.push(size);
col += 1;
}
// Start with the computed inline size for the first column in the span.
- let mut column_computed_inline_size =
- match self.column_computed_inline_sizes.get(col) {
- Some(column_computed_inline_size) => *column_computed_inline_size,
- None => {
- // We're in fixed layout mode and there are more cells in this row than
- // columns we know about. According to CSS 2.1 § 17.5.2.1, the behavior is
- // now undefined. So just use zero.
- //
- // FIXME(pcwalton): $10 says this isn't Web compatible.
- ColumnComputedInlineSize {
- size: Au(0),
- }
- }
- };
+ let mut column_computed_inline_size = match self.column_computed_inline_sizes.get(col) {
+ Some(column_computed_inline_size) => *column_computed_inline_size,
+ None => {
+ // We're in fixed layout mode and there are more cells in this row than
+ // columns we know about. According to CSS 2.1 § 17.5.2.1, the behavior is
+ // now undefined. So just use zero.
+ //
+ // FIXME(pcwalton): $10 says this isn't Web compatible.
+ ColumnComputedInlineSize { size: Au(0) }
+ },
+ };
col += 1;
// Add in computed inline sizes for any extra columns in the span.
@@ -491,7 +534,8 @@ impl Flow for TableRowFlow {
None => break,
};
column_computed_inline_size.size = column_computed_inline_size.size +
- extra_column_computed_inline_size.size + self.spacing.horizontal();
+ extra_column_computed_inline_size.size +
+ self.spacing.horizontal();
col += 1;
}
@@ -499,16 +543,19 @@ impl Flow for TableRowFlow {
}
// Set up border collapse info.
- let border_collapse_info =
- match self.block_flow.fragment.style().get_inherited_table().border_collapse {
- BorderCollapse::Collapse => {
- Some(BorderCollapseInfoForChildTableCell {
- collapsed_borders_for_row: &self.final_collapsed_borders,
- collapsed_border_spacing_for_row: &self.collapsed_border_spacing,
- })
- }
- BorderCollapse::Separate => None,
- };
+ let border_collapse_info = match self
+ .block_flow
+ .fragment
+ .style()
+ .get_inherited_table()
+ .border_collapse
+ {
+ BorderCollapse::Collapse => Some(BorderCollapseInfoForChildTableCell {
+ collapsed_borders_for_row: &self.final_collapsed_borders,
+ collapsed_border_spacing_for_row: &self.collapsed_border_spacing,
+ }),
+ BorderCollapse::Separate => None,
+ };
// Push those inline sizes down to the cells.
let spacing = self.spacing;
@@ -517,30 +564,33 @@ impl Flow for TableRowFlow {
let incoming_rowspan = &self.incoming_rowspan;
let mut column_index = 0;
- self.block_flow.propagate_assigned_inline_size_to_children(shared_context,
- inline_start_content_edge,
- inline_end_content_edge,
- containing_block_inline_size,
- |child_flow,
- child_index,
- content_inline_size,
- _writing_mode,
- inline_start_margin_edge,
- inline_end_margin_edge| {
- set_inline_position_of_child_flow(
- child_flow,
- child_index,
- &mut column_index,
- incoming_rowspan,
- row_writing_mode,
- table_writing_mode,
- &computed_inline_size_for_cells,
- &spacing,
- &border_collapse_info,
- content_inline_size,
- inline_start_margin_edge,
- inline_end_margin_edge);
- })
+ self.block_flow.propagate_assigned_inline_size_to_children(
+ shared_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ containing_block_inline_size,
+ |child_flow,
+ child_index,
+ content_inline_size,
+ _writing_mode,
+ inline_start_margin_edge,
+ inline_end_margin_edge| {
+ set_inline_position_of_child_flow(
+ child_flow,
+ child_index,
+ &mut column_index,
+ incoming_rowspan,
+ row_writing_mode,
+ table_writing_mode,
+ &computed_inline_size_for_cells,
+ &spacing,
+ &border_collapse_info,
+ content_inline_size,
+ inline_start_margin_edge,
+ inline_end_margin_edge,
+ );
+ },
+ )
}
fn assign_block_size(&mut self, _: &LayoutContext) {
@@ -548,15 +598,18 @@ impl Flow for TableRowFlow {
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context)
+ self.block_flow
+ .compute_stacking_relative_position(layout_context)
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn build_display_list(&mut self, _: &mut DisplayListBuildState) {
@@ -564,12 +617,15 @@ impl Flow for TableRowFlow {
// handled in TableCellStyleInfo::build_display_list
// we skip setting the damage in TableCellStyleInfo::build_display_list()
// because we only have immutable access
- self.block_flow.fragment.restyle_damage.remove(ServoRestyleDamage::REPAINT);
+ self.block_flow
+ .fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::REPAINT);
}
fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {
- self.block_flow.collect_stacking_contexts_for_block(state,
- StackingContextCollectionFlags::empty());
+ self.block_flow
+ .collect_stacking_contexts_for_block(state, StackingContextCollectionFlags::empty());
}
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
@@ -592,11 +648,17 @@ impl Flow for TableRowFlow {
self.block_flow.generated_containing_block_size(flow)
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position)
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ )
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
@@ -711,8 +773,7 @@ impl CollapsedBorder {
/// Creates a collapsed border from the block-start border described in the given CSS style
/// object.
- fn top(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
- -> CollapsedBorder {
+ fn top(css_style: &ComputedValues, provenance: CollapsedBorderProvenance) -> CollapsedBorder {
CollapsedBorder {
style: css_style.get_border().border_top_style,
width: Au::from(css_style.get_border().border_top_width),
@@ -723,8 +784,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the right border described in the given CSS style
/// object.
- fn right(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
- -> CollapsedBorder {
+ fn right(css_style: &ComputedValues, provenance: CollapsedBorderProvenance) -> CollapsedBorder {
CollapsedBorder {
style: css_style.get_border().border_right_style,
width: Au::from(css_style.get_border().border_right_width),
@@ -735,8 +795,10 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the bottom border described in the given CSS style
/// object.
- fn bottom(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
- -> CollapsedBorder {
+ fn bottom(
+ css_style: &ComputedValues,
+ provenance: CollapsedBorderProvenance,
+ ) -> CollapsedBorder {
CollapsedBorder {
style: css_style.get_border().border_bottom_style,
width: Au::from(css_style.get_border().border_bottom_width),
@@ -747,8 +809,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the left border described in the given CSS style
/// object.
- fn left(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
- -> CollapsedBorder {
+ fn left(css_style: &ComputedValues, provenance: CollapsedBorderProvenance) -> CollapsedBorder {
CollapsedBorder {
style: css_style.get_border().border_left_style,
width: Au::from(css_style.get_border().border_left_width),
@@ -758,10 +819,11 @@ impl CollapsedBorder {
}
/// Creates a collapsed border style from the given physical side.
- fn from_side(side: PhysicalSide,
- css_style: &ComputedValues,
- provenance: CollapsedBorderProvenance)
- -> CollapsedBorder {
+ fn from_side(
+ side: PhysicalSide,
+ css_style: &ComputedValues,
+ provenance: CollapsedBorderProvenance,
+ ) -> CollapsedBorder {
match side {
PhysicalSide::Top => CollapsedBorder::top(css_style, provenance),
PhysicalSide::Right => CollapsedBorder::right(css_style, provenance),
@@ -772,56 +834,72 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the inline-start border described in the given CSS
/// style object.
- pub fn inline_start(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
- -> CollapsedBorder {
- CollapsedBorder::from_side(css_style.writing_mode.inline_start_physical_side(),
- css_style,
- provenance)
+ pub fn inline_start(
+ css_style: &ComputedValues,
+ provenance: CollapsedBorderProvenance,
+ ) -> CollapsedBorder {
+ CollapsedBorder::from_side(
+ css_style.writing_mode.inline_start_physical_side(),
+ css_style,
+ provenance,
+ )
}
/// Creates a collapsed border style from the inline-start border described in the given CSS
/// style object.
- pub fn inline_end(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
- -> CollapsedBorder {
- CollapsedBorder::from_side(css_style.writing_mode.inline_end_physical_side(),
- css_style,
- provenance)
+ pub fn inline_end(
+ css_style: &ComputedValues,
+ provenance: CollapsedBorderProvenance,
+ ) -> CollapsedBorder {
+ CollapsedBorder::from_side(
+ css_style.writing_mode.inline_end_physical_side(),
+ css_style,
+ provenance,
+ )
}
/// Creates a collapsed border style from the block-start border described in the given CSS
/// style object.
- pub fn block_start(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
- -> CollapsedBorder {
- CollapsedBorder::from_side(css_style.writing_mode.block_start_physical_side(),
- css_style,
- provenance)
+ pub fn block_start(
+ css_style: &ComputedValues,
+ provenance: CollapsedBorderProvenance,
+ ) -> CollapsedBorder {
+ CollapsedBorder::from_side(
+ css_style.writing_mode.block_start_physical_side(),
+ css_style,
+ provenance,
+ )
}
/// Creates a collapsed border style from the block-end border described in the given CSS style
/// object.
- pub fn block_end(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
- -> CollapsedBorder {
- CollapsedBorder::from_side(css_style.writing_mode.block_end_physical_side(),
- css_style,
- provenance)
+ pub fn block_end(
+ css_style: &ComputedValues,
+ provenance: CollapsedBorderProvenance,
+ ) -> CollapsedBorder {
+ CollapsedBorder::from_side(
+ css_style.writing_mode.block_end_physical_side(),
+ css_style,
+ provenance,
+ )
}
/// If `other` has a higher priority per CSS 2.1 § 17.6.2.1, replaces `self` with it.
pub fn combine(&mut self, other: &CollapsedBorder) {
match (self.style, other.style) {
// Step 1.
- (BorderStyle::Hidden, _) => {}
+ (BorderStyle::Hidden, _) => {},
(_, BorderStyle::Hidden) => *self = *other,
// Step 2.
(BorderStyle::None, _) => *self = *other,
- (_, BorderStyle::None) => {}
+ (_, BorderStyle::None) => {},
// Step 3.
- _ if self.width > other.width => {}
+ _ if self.width > other.width => {},
_ if self.width < other.width => *self = *other,
- (this_style, other_style) if this_style > other_style => {}
+ (this_style, other_style) if this_style > other_style => {},
(this_style, other_style) if this_style < other_style => *self = *other,
// Step 4.
- _ if (self.provenance as i8) >= other.provenance as i8 => {}
+ _ if (self.provenance as i8) >= other.provenance as i8 => {},
_ => *self = *other,
}
}
@@ -829,11 +907,12 @@ impl CollapsedBorder {
/// Pushes column inline size, incoming rowspan, and border collapse info down to a child.
pub fn propagate_column_inline_sizes_to_child(
- child_flow: &mut Flow,
- table_writing_mode: WritingMode,
- column_computed_inline_sizes: &[ColumnComputedInlineSize],
- border_spacing: &BorderSpacing,
- incoming_rowspan: &mut Vec<u32>) {
+ child_flow: &mut Flow,
+ table_writing_mode: WritingMode,
+ column_computed_inline_sizes: &[ColumnComputedInlineSize],
+ border_spacing: &BorderSpacing,
+ incoming_rowspan: &mut Vec<u32>,
+) {
// If the child is a row group or a row, the column inline-size and rowspan info should be copied from its
// parent.
//
@@ -844,13 +923,15 @@ pub fn propagate_column_inline_sizes_to_child(
let child_table_rowgroup_flow = child_flow.as_mut_table_rowgroup();
child_table_rowgroup_flow.spacing = *border_spacing;
for kid in child_table_rowgroup_flow.block_flow.base.child_iter_mut() {
- propagate_column_inline_sizes_to_child(kid,
- table_writing_mode,
- column_computed_inline_sizes,
- border_spacing,
- incoming_rowspan);
+ propagate_column_inline_sizes_to_child(
+ kid,
+ table_writing_mode,
+ column_computed_inline_sizes,
+ border_spacing,
+ incoming_rowspan,
+ );
}
- }
+ },
FlowClass::TableRow => {
let child_table_row_flow = child_flow.as_mut_table_row();
child_table_row_flow.column_computed_inline_sizes =
@@ -887,27 +968,28 @@ pub fn propagate_column_inline_sizes_to_child(
col += 1;
}
}
- }
- c => warn!("unexpected flow in table {:?}", c)
+ },
+ c => warn!("unexpected flow in table {:?}", c),
}
}
/// Lay out table cells inline according to the computer column sizes.
fn set_inline_position_of_child_flow(
- child_flow: &mut Flow,
- child_index: usize,
- column_index: &mut usize,
- incoming_rowspan: &[u32],
- row_writing_mode: WritingMode,
- table_writing_mode: WritingMode,
- column_computed_inline_sizes: &[ColumnComputedInlineSize],
- border_spacing: &BorderSpacing,
- border_collapse_info: &Option<BorderCollapseInfoForChildTableCell>,
- parent_content_inline_size: Au,
- inline_start_margin_edge: &mut Au,
- inline_end_margin_edge: &mut Au) {
+ child_flow: &mut Flow,
+ child_index: usize,
+ column_index: &mut usize,
+ incoming_rowspan: &[u32],
+ row_writing_mode: WritingMode,
+ table_writing_mode: WritingMode,
+ column_computed_inline_sizes: &[ColumnComputedInlineSize],
+ border_spacing: &BorderSpacing,
+ border_collapse_info: &Option<BorderCollapseInfoForChildTableCell>,
+ parent_content_inline_size: Au,
+ inline_start_margin_edge: &mut Au,
+ inline_end_margin_edge: &mut Au,
+) {
if !child_flow.is_table_cell() {
- return
+ return;
}
let reverse_column_order = table_writing_mode.is_bidi_ltr() != row_writing_mode.is_bidi_ltr();
@@ -933,33 +1015,42 @@ fn set_inline_position_of_child_flow(
Some(ref border_collapse_info) => {
// Write in the child's border collapse state.
child_table_cell.collapsed_borders = CollapsedBordersForCell {
- inline_start_border: border_collapse_info.collapsed_borders_for_row
- .inline
- .get(child_index)
- .map_or(CollapsedBorder::new(), |x| *x),
- inline_end_border: border_collapse_info.collapsed_borders_for_row
- .inline
- .get(child_index + 1)
- .map_or(CollapsedBorder::new(), |x| *x),
- block_start_border: border_collapse_info.collapsed_borders_for_row
- .block_start
- .get(child_index)
- .map_or(CollapsedBorder::new(), |x| *x),
- block_end_border: border_collapse_info.collapsed_borders_for_row
- .block_end
- .get(child_index)
- .map_or(CollapsedBorder::new(), |x| *x),
- inline_start_width: border_collapse_info.collapsed_border_spacing_for_row
- .inline
- .get(child_index)
- .map_or(Au(0), |x| *x),
- inline_end_width: border_collapse_info.collapsed_border_spacing_for_row
- .inline
- .get(child_index + 1)
- .map_or(Au(0), |x| *x),
- block_start_width: border_collapse_info.collapsed_border_spacing_for_row
- .block_start,
- block_end_width: border_collapse_info.collapsed_border_spacing_for_row.block_end,
+ inline_start_border: border_collapse_info
+ .collapsed_borders_for_row
+ .inline
+ .get(child_index)
+ .map_or(CollapsedBorder::new(), |x| *x),
+ inline_end_border: border_collapse_info
+ .collapsed_borders_for_row
+ .inline
+ .get(child_index + 1)
+ .map_or(CollapsedBorder::new(), |x| *x),
+ block_start_border: border_collapse_info
+ .collapsed_borders_for_row
+ .block_start
+ .get(child_index)
+ .map_or(CollapsedBorder::new(), |x| *x),
+ block_end_border: border_collapse_info
+ .collapsed_borders_for_row
+ .block_end
+ .get(child_index)
+ .map_or(CollapsedBorder::new(), |x| *x),
+ inline_start_width: border_collapse_info
+ .collapsed_border_spacing_for_row
+ .inline
+ .get(child_index)
+ .map_or(Au(0), |x| *x),
+ inline_end_width: border_collapse_info
+ .collapsed_border_spacing_for_row
+ .inline
+ .get(child_index + 1)
+ .map_or(Au(0), |x| *x),
+ block_start_width: border_collapse_info
+ .collapsed_border_spacing_for_row
+ .block_start,
+ block_end_width: border_collapse_info
+ .collapsed_border_spacing_for_row
+ .block_end,
};
// Move over past the collapsed border.
@@ -968,7 +1059,7 @@ fn set_inline_position_of_child_flow(
} else {
*inline_start_margin_edge += child_table_cell.collapsed_borders.inline_start_width;
}
- }
+ },
None => {
// Take spacing into account.
if reverse_column_order {
@@ -976,7 +1067,7 @@ fn set_inline_position_of_child_flow(
} else {
*inline_start_margin_edge += border_spacing.horizontal();
}
- }
+ },
}
let column_inline_size = column_computed_inline_sizes[*column_index].size;
@@ -1008,51 +1099,68 @@ pub struct BorderCollapseInfoForChildTableCell<'a> {
/// table row. This is done eagerly here so that at least the inline inside border collapse
/// computations can be parallelized across all the rows of the table.
fn perform_inline_direction_border_collapse_for_row(
- row_style: &ComputedValues,
- children_count: usize,
- child_index: usize,
- child_table_cell: &mut TableCellFlow,
- iterator: &mut Peekable<Enumerate<MutFlowListIterator>>,
- preliminary_collapsed_borders: &mut CollapsedBordersForRow) {
+ row_style: &ComputedValues,
+ children_count: usize,
+ child_index: usize,
+ child_table_cell: &mut TableCellFlow,
+ iterator: &mut Peekable<Enumerate<MutFlowListIterator>>,
+ preliminary_collapsed_borders: &mut CollapsedBordersForRow,
+) {
// In the first cell, combine its border with the one coming from the row.
if child_index == 0 {
let first_inline_border = &mut preliminary_collapsed_borders.inline[0];
- first_inline_border.combine(
- &CollapsedBorder::inline_start(&*child_table_cell.block_flow.fragment.style,
- CollapsedBorderProvenance::FromNextTableCell));
+ first_inline_border.combine(&CollapsedBorder::inline_start(
+ &*child_table_cell.block_flow.fragment.style,
+ CollapsedBorderProvenance::FromNextTableCell,
+ ));
}
let inline_collapsed_border = preliminary_collapsed_borders.inline.push_or_set(
child_index + 1,
- CollapsedBorder::inline_end(&*child_table_cell.block_flow.fragment.style,
- CollapsedBorderProvenance::FromPreviousTableCell));
+ CollapsedBorder::inline_end(
+ &*child_table_cell.block_flow.fragment.style,
+ CollapsedBorderProvenance::FromPreviousTableCell,
+ ),
+ );
if let Some(&(_, ref next_child_flow)) = iterator.peek() {
let next_child_flow = next_child_flow.as_block();
- inline_collapsed_border.combine(
- &CollapsedBorder::inline_start(&*next_child_flow.fragment.style,
- CollapsedBorderProvenance::FromNextTableCell))
+ inline_collapsed_border.combine(&CollapsedBorder::inline_start(
+ &*next_child_flow.fragment.style,
+ CollapsedBorderProvenance::FromNextTableCell,
+ ))
};
// In the last cell, also take into account the border that may
// come from the row.
if child_index + 1 == children_count {
- inline_collapsed_border.combine(
- &CollapsedBorder::inline_end(&row_style,
- CollapsedBorderProvenance::FromTableRow));
+ inline_collapsed_border.combine(&CollapsedBorder::inline_end(
+ &row_style,
+ CollapsedBorderProvenance::FromTableRow,
+ ));
}
- let mut block_start_border =
- CollapsedBorder::block_start(&*child_table_cell.block_flow.fragment.style,
- CollapsedBorderProvenance::FromNextTableCell);
- block_start_border.combine(
- &CollapsedBorder::block_start(row_style, CollapsedBorderProvenance::FromTableRow));
- preliminary_collapsed_borders.block_start.push_or_set(child_index, block_start_border);
- let mut block_end_border =
- CollapsedBorder::block_end(&*child_table_cell.block_flow.fragment.style,
- CollapsedBorderProvenance::FromPreviousTableCell);
- block_end_border.combine(
- &CollapsedBorder::block_end(row_style, CollapsedBorderProvenance::FromTableRow));
-
- preliminary_collapsed_borders.block_end.push_or_set(child_index, block_end_border);
+ let mut block_start_border = CollapsedBorder::block_start(
+ &*child_table_cell.block_flow.fragment.style,
+ CollapsedBorderProvenance::FromNextTableCell,
+ );
+ block_start_border.combine(&CollapsedBorder::block_start(
+ row_style,
+ CollapsedBorderProvenance::FromTableRow,
+ ));
+ preliminary_collapsed_borders
+ .block_start
+ .push_or_set(child_index, block_start_border);
+ let mut block_end_border = CollapsedBorder::block_end(
+ &*child_table_cell.block_flow.fragment.style,
+ CollapsedBorderProvenance::FromPreviousTableCell,
+ );
+ block_end_border.combine(&CollapsedBorder::block_end(
+ row_style,
+ CollapsedBorderProvenance::FromTableRow,
+ ));
+
+ preliminary_collapsed_borders
+ .block_end
+ .push_or_set(child_index, block_end_border);
}
diff --git a/components/layout/table_rowgroup.rs b/components/layout/table_rowgroup.rs
index d11c38cc275..3d77aca9382 100644
--- a/components/layout/table_rowgroup.rs
+++ b/components/layout/table_rowgroup.rs
@@ -66,23 +66,32 @@ impl TableRowGroupFlow {
}
pub fn populate_collapsed_border_spacing<'a, I>(
- &mut self,
- collapsed_inline_direction_border_widths_for_table: &[Au],
- collapsed_block_direction_border_widths_for_table: &mut Peekable<I>)
- where I: Iterator<Item=&'a Au> {
- self.collapsed_inline_direction_border_widths_for_table.clear();
+ &mut self,
+ collapsed_inline_direction_border_widths_for_table: &[Au],
+ collapsed_block_direction_border_widths_for_table: &mut Peekable<I>,
+ ) where
+ I: Iterator<Item = &'a Au>,
+ {
self.collapsed_inline_direction_border_widths_for_table
- .extend(collapsed_inline_direction_border_widths_for_table.into_iter().map(|x| *x));
+ .clear();
+ self.collapsed_inline_direction_border_widths_for_table
+ .extend(
+ collapsed_inline_direction_border_widths_for_table
+ .into_iter()
+ .map(|x| *x),
+ );
for _ in 0..self.block_flow.base.children.len() {
if let Some(collapsed_block_direction_border_width_for_table) =
- collapsed_block_direction_border_widths_for_table.next() {
+ collapsed_block_direction_border_widths_for_table.next()
+ {
self.collapsed_block_direction_border_widths_for_table
.push(*collapsed_block_direction_border_width_for_table)
}
}
if let Some(collapsed_block_direction_border_width_for_table) =
- collapsed_block_direction_border_widths_for_table.peek() {
+ collapsed_block_direction_border_widths_for_table.peek()
+ {
self.collapsed_block_direction_border_widths_for_table
.push(**collapsed_block_direction_border_width_for_table)
}
@@ -111,8 +120,10 @@ impl Flow for TableRowGroupFlow {
}
fn bubble_inline_sizes(&mut self) {
- let _scope = layout_debug_scope!("table_rowgroup::bubble_inline_sizes {:x}",
- self.block_flow.base.debug_id());
+ let _scope = layout_debug_scope!(
+ "table_rowgroup::bubble_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
// Proper calculation of intrinsic sizes in table layout requires access to the entire
// table, which we don't have yet. Defer to our parent.
}
@@ -120,9 +131,14 @@ impl Flow for TableRowGroupFlow {
/// Recursively (top-down) determines the actual inline-size of child contexts and fragments.
/// When called on this context, the context has had its inline-size set by the parent context.
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
- let _scope = layout_debug_scope!("table_rowgroup::assign_inline_sizes {:x}",
- self.block_flow.base.debug_id());
- debug!("assign_inline_sizes({}): assigning inline_size for flow", "table_rowgroup");
+ let _scope = layout_debug_scope!(
+ "table_rowgroup::assign_inline_sizes {:x}",
+ self.block_flow.base.debug_id()
+ );
+ debug!(
+ "assign_inline_sizes({}): assigning inline_size for flow",
+ "table_rowgroup"
+ );
let shared_context = layout_context.shared_context();
// The position was set to the containing block by the flow's parent.
@@ -130,50 +146,66 @@ impl Flow for TableRowGroupFlow {
let (inline_start_content_edge, inline_end_content_edge) = (Au(0), Au(0));
let content_inline_size = containing_block_inline_size;
- let border_collapse = self.block_flow.fragment.style.get_inherited_table().border_collapse;
+ let border_collapse = self
+ .block_flow
+ .fragment
+ .style
+ .get_inherited_table()
+ .border_collapse;
let inline_size_computer = InternalTable;
- inline_size_computer.compute_used_inline_size(&mut self.block_flow,
- shared_context,
- containing_block_inline_size);
+ inline_size_computer.compute_used_inline_size(
+ &mut self.block_flow,
+ shared_context,
+ containing_block_inline_size,
+ );
let collapsed_inline_direction_border_widths_for_table =
&self.collapsed_inline_direction_border_widths_for_table;
- let mut collapsed_block_direction_border_widths_for_table =
- self.collapsed_block_direction_border_widths_for_table.iter().peekable();
- self.block_flow.propagate_assigned_inline_size_to_children(shared_context,
- inline_start_content_edge,
- inline_end_content_edge,
- content_inline_size,
- |child_flow,
- _child_index,
- _content_inline_size,
- _writing_mode,
- _inline_start_margin_edge,
- _inline_end_margin_edge| {
- if border_collapse == border_collapse::T::Collapse {
- let child_table_row = child_flow.as_mut_table_row();
- child_table_row.populate_collapsed_border_spacing(
- collapsed_inline_direction_border_widths_for_table,
- &mut collapsed_block_direction_border_widths_for_table);
- }
- });
+ let mut collapsed_block_direction_border_widths_for_table = self
+ .collapsed_block_direction_border_widths_for_table
+ .iter()
+ .peekable();
+ self.block_flow.propagate_assigned_inline_size_to_children(
+ shared_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ content_inline_size,
+ |child_flow,
+ _child_index,
+ _content_inline_size,
+ _writing_mode,
+ _inline_start_margin_edge,
+ _inline_end_margin_edge| {
+ if border_collapse == border_collapse::T::Collapse {
+ let child_table_row = child_flow.as_mut_table_row();
+ child_table_row.populate_collapsed_border_spacing(
+ collapsed_inline_direction_border_widths_for_table,
+ &mut collapsed_block_direction_border_widths_for_table,
+ );
+ }
+ },
+ );
}
fn assign_block_size(&mut self, lc: &LayoutContext) {
debug!("assign_block_size: assigning block_size for table_rowgroup");
- self.block_flow.assign_block_size_for_table_like_flow(self.spacing.vertical(), lc);
+ self.block_flow
+ .assign_block_size_for_table_like_flow(self.spacing.vertical(), lc);
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context)
+ self.block_flow
+ .compute_stacking_relative_position(layout_context)
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn build_display_list(&mut self, _: &mut DisplayListBuildState) {
@@ -181,12 +213,17 @@ impl Flow for TableRowGroupFlow {
// we skip setting the damage in TableCellStyleInfo::build_display_list()
// because we only have immutable access
- self.block_flow.fragment.restyle_damage.remove(ServoRestyleDamage::REPAINT);
+ self.block_flow
+ .fragment
+ .restyle_damage
+ .remove(ServoRestyleDamage::REPAINT);
}
fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {
- self.block_flow.collect_stacking_contexts_for_block(state,
- StackingContextCollectionFlags::POSITION_NEVER_CREATES_CONTAINING_BLOCK);
+ self.block_flow.collect_stacking_contexts_for_block(
+ state,
+ StackingContextCollectionFlags::POSITION_NEVER_CREATES_CONTAINING_BLOCK,
+ );
}
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
@@ -209,11 +246,17 @@ impl Flow for TableRowGroupFlow {
self.block_flow.generated_containing_block_size(flow)
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position)
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ )
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
diff --git a/components/layout/table_wrapper.rs b/components/layout/table_wrapper.rs
index 90be14876cc..65684f8e165 100644
--- a/components/layout/table_wrapper.rs
+++ b/components/layout/table_wrapper.rs
@@ -39,7 +39,7 @@ use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
#[derive(Clone, Copy, Debug, Serialize)]
pub enum TableLayout {
Fixed,
- Auto
+ Auto,
}
#[allow(unsafe_code)]
@@ -63,19 +63,21 @@ impl TableWrapperFlow {
TableWrapperFlow::from_fragment_and_float_kind(fragment, None)
}
- pub fn from_fragment_and_float_kind(fragment: Fragment, float_kind: Option<FloatKind>)
- -> TableWrapperFlow {
+ pub fn from_fragment_and_float_kind(
+ fragment: Fragment,
+ float_kind: Option<FloatKind>,
+ ) -> TableWrapperFlow {
let mut block_flow = BlockFlow::from_fragment_and_float_kind(fragment, float_kind);
- let table_layout = if block_flow.fragment().style().get_table().table_layout ==
- table_layout::T::Fixed {
- TableLayout::Fixed
- } else {
- TableLayout::Auto
- };
+ let table_layout =
+ if block_flow.fragment().style().get_table().table_layout == table_layout::T::Fixed {
+ TableLayout::Fixed
+ } else {
+ TableLayout::Auto
+ };
TableWrapperFlow {
block_flow: block_flow,
- column_intrinsic_inline_sizes: vec!(),
- table_layout: table_layout
+ column_intrinsic_inline_sizes: vec![],
+ table_layout: table_layout,
}
}
@@ -85,9 +87,12 @@ impl TableWrapperFlow {
if kid.is_table() {
let kid_table = kid.as_table();
spacing = kid_table.total_horizontal_spacing();
- table_border_padding =
- kid_table.block_flow.fragment.border_padding.inline_start_end();
- break
+ table_border_padding = kid_table
+ .block_flow
+ .fragment
+ .border_padding
+ .inline_start_end();
+ break;
}
}
(table_border_padding, spacing)
@@ -103,41 +108,53 @@ impl TableWrapperFlow {
let available_inline_size = self.block_flow.base.block_container_inline_size;
for kid in self.block_flow.base.child_iter_mut() {
if !kid.is_table() {
- continue
+ continue;
}
let kid_table = kid.as_mut_table();
let kid_block_flow = &mut kid_table.block_flow;
- kid_block_flow.fragment.compute_border_and_padding(available_inline_size);
- kid_block_flow.fragment.compute_block_direction_margins(available_inline_size);
- kid_block_flow.fragment.compute_inline_direction_margins(available_inline_size);
- return
+ kid_block_flow
+ .fragment
+ .compute_border_and_padding(available_inline_size);
+ kid_block_flow
+ .fragment
+ .compute_block_direction_margins(available_inline_size);
+ kid_block_flow
+ .fragment
+ .compute_inline_direction_margins(available_inline_size);
+ return;
}
}
/// Calculates table column sizes for automatic layout per INTRINSIC § 4.3.
fn calculate_table_column_sizes_for_automatic_layout(
- &mut self,
- intermediate_column_inline_sizes: &mut [IntermediateColumnInlineSize]) {
+ &mut self,
+ intermediate_column_inline_sizes: &mut [IntermediateColumnInlineSize],
+ ) {
let available_inline_size = self.available_inline_size();
// Compute all the guesses for the column sizes, and sum them.
let mut total_guess = AutoLayoutCandidateGuess::new();
- let guesses: Vec<AutoLayoutCandidateGuess> =
- self.column_intrinsic_inline_sizes.iter().map(|column_intrinsic_inline_size| {
+ let guesses: Vec<AutoLayoutCandidateGuess> = self
+ .column_intrinsic_inline_sizes
+ .iter()
+ .map(|column_intrinsic_inline_size| {
let guess = AutoLayoutCandidateGuess::from_column_intrinsic_inline_size(
column_intrinsic_inline_size,
- available_inline_size);
+ available_inline_size,
+ );
total_guess = &total_guess + &guess;
guess
}).collect();
// Assign inline sizes.
- let selection = SelectedAutoLayoutCandidateGuess::select(&total_guess,
- available_inline_size);
+ let selection =
+ SelectedAutoLayoutCandidateGuess::select(&total_guess, available_inline_size);
let mut total_used_inline_size = Au(0);
- for (intermediate_column_inline_size, guess) in
- intermediate_column_inline_sizes.iter_mut().zip(guesses.iter()) {
+ for (intermediate_column_inline_size, guess) in intermediate_column_inline_sizes
+ .iter_mut()
+ .zip(guesses.iter())
+ {
intermediate_column_inline_size.size = guess.calculate(selection);
intermediate_column_inline_size.percentage = 0.0;
total_used_inline_size = total_used_inline_size + intermediate_column_inline_size.size
@@ -147,8 +164,10 @@ impl TableWrapperFlow {
//
// FIXME(pcwalton, spec): How do I deal with fractional excess?
let excess_inline_size = available_inline_size - total_used_inline_size;
- if excess_inline_size > Au(0) && selection ==
- SelectedAutoLayoutCandidateGuess::UsePreferredGuessAndDistributeExcessInlineSize {
+ if excess_inline_size > Au(0) &&
+ selection ==
+ SelectedAutoLayoutCandidateGuess::UsePreferredGuessAndDistributeExcessInlineSize
+ {
let mut info = ExcessInlineSizeDistributionInfo::new();
for column_intrinsic_inline_size in &self.column_intrinsic_inline_sizes {
info.update(column_intrinsic_inline_size)
@@ -156,13 +175,16 @@ impl TableWrapperFlow {
let mut total_distributed_excess_size = Au(0);
for (intermediate_column_inline_size, column_intrinsic_inline_size) in
- intermediate_column_inline_sizes.iter_mut()
- .zip(self.column_intrinsic_inline_sizes
- .iter()) {
- info.distribute_excess_inline_size_to_column(intermediate_column_inline_size,
- column_intrinsic_inline_size,
- excess_inline_size,
- &mut total_distributed_excess_size)
+ intermediate_column_inline_sizes
+ .iter_mut()
+ .zip(self.column_intrinsic_inline_sizes.iter())
+ {
+ info.distribute_excess_inline_size_to_column(
+ intermediate_column_inline_size,
+ column_intrinsic_inline_size,
+ excess_inline_size,
+ &mut total_distributed_excess_size,
+ )
}
total_used_inline_size = available_inline_size
}
@@ -179,9 +201,10 @@ impl TableWrapperFlow {
// just use the shrink-to-fit inline size.
let available_inline_size = match self.block_flow.fragment.style().content_inline_size() {
LengthOrPercentageOrAuto::Auto => {
- self.block_flow.get_shrink_to_fit_inline_size(available_inline_size) -
+ self.block_flow
+ .get_shrink_to_fit_inline_size(available_inline_size) -
table_border_padding
- }
+ },
// FIXME(mttr): This fixes #4421 without breaking our current reftests, but I'm not
// completely sure this is "correct".
//
@@ -196,10 +219,12 @@ impl TableWrapperFlow {
fn set_inline_size(&mut self, total_used_inline_size: Au) {
let (table_border_padding, spacing) = self.border_padding_and_spacing();
- self.block_flow.fragment.border_box.size.inline = total_used_inline_size +
- table_border_padding + spacing;
+ self.block_flow.fragment.border_box.size.inline =
+ total_used_inline_size + table_border_padding + spacing;
self.block_flow.base.position.size.inline = total_used_inline_size +
- table_border_padding + spacing + self.block_flow.fragment.margin.inline_start_end();
+ table_border_padding +
+ spacing +
+ self.block_flow.fragment.margin.inline_start_end();
let writing_mode = self.block_flow.base.writing_mode;
let container_mode = self.block_flow.base.block_container_writing_mode;
@@ -209,29 +234,30 @@ impl TableWrapperFlow {
// depends on `border_box.size.inline`.
self.block_flow.fragment.border_box.start.i =
self.block_flow.base.block_container_inline_size -
- self.block_flow.fragment.margin.inline_end -
- self.block_flow.fragment.border_box.size.inline;
+ self.block_flow.fragment.margin.inline_end -
+ self.block_flow.fragment.border_box.size.inline;
}
}
fn compute_used_inline_size(
- &mut self,
- shared_context: &SharedStyleContext,
- parent_flow_inline_size: Au,
- intermediate_column_inline_sizes: &[IntermediateColumnInlineSize]) {
+ &mut self,
+ shared_context: &SharedStyleContext,
+ parent_flow_inline_size: Au,
+ intermediate_column_inline_sizes: &[IntermediateColumnInlineSize],
+ ) {
let (border_padding, spacing) = self.border_padding_and_spacing();
- let minimum_width_of_all_columns =
- intermediate_column_inline_sizes.iter()
- .fold(border_padding + spacing,
- |accumulator, intermediate_column_inline_sizes| {
+ let minimum_width_of_all_columns = intermediate_column_inline_sizes.iter().fold(
+ border_padding + spacing,
+ |accumulator, intermediate_column_inline_sizes| {
accumulator + intermediate_column_inline_sizes.size
- });
- let preferred_width_of_all_columns =
- self.column_intrinsic_inline_sizes.iter()
- .fold(border_padding + spacing,
- |accumulator, column_intrinsic_inline_sizes| {
+ },
+ );
+ let preferred_width_of_all_columns = self.column_intrinsic_inline_sizes.iter().fold(
+ border_padding + spacing,
+ |accumulator, column_intrinsic_inline_sizes| {
accumulator + column_intrinsic_inline_sizes.preferred
- });
+ },
+ );
// Delegate to the appropriate inline size computer to find the constraint inputs and write
// the constraint solutions in.
@@ -241,38 +267,45 @@ impl TableWrapperFlow {
preferred_width_of_all_columns: preferred_width_of_all_columns,
table_border_padding: border_padding,
};
- let input =
- inline_size_computer.compute_inline_size_constraint_inputs(&mut self.block_flow,
- parent_flow_inline_size,
- shared_context);
-
- let solution = inline_size_computer.solve_inline_size_constraints(&mut self.block_flow,
- &input);
- inline_size_computer.set_inline_size_constraint_solutions(&mut self.block_flow,
- solution);
- inline_size_computer.set_inline_position_of_flow_if_necessary(&mut self.block_flow,
- solution);
- return
+ let input = inline_size_computer.compute_inline_size_constraint_inputs(
+ &mut self.block_flow,
+ parent_flow_inline_size,
+ shared_context,
+ );
+
+ let solution =
+ inline_size_computer.solve_inline_size_constraints(&mut self.block_flow, &input);
+ inline_size_computer
+ .set_inline_size_constraint_solutions(&mut self.block_flow, solution);
+ inline_size_computer
+ .set_inline_position_of_flow_if_necessary(&mut self.block_flow, solution);
+ return;
}
- if !self.block_flow.base.flags.contains(FlowFlags::INLINE_POSITION_IS_STATIC) {
+ if !self
+ .block_flow
+ .base
+ .flags
+ .contains(FlowFlags::INLINE_POSITION_IS_STATIC)
+ {
let inline_size_computer = AbsoluteTable {
minimum_width_of_all_columns: minimum_width_of_all_columns,
preferred_width_of_all_columns: preferred_width_of_all_columns,
table_border_padding: border_padding,
};
- let input =
- inline_size_computer.compute_inline_size_constraint_inputs(&mut self.block_flow,
- parent_flow_inline_size,
- shared_context);
-
- let solution = inline_size_computer.solve_inline_size_constraints(&mut self.block_flow,
- &input);
- inline_size_computer.set_inline_size_constraint_solutions(&mut self.block_flow,
- solution);
- inline_size_computer.set_inline_position_of_flow_if_necessary(&mut self.block_flow,
- solution);
- return
+ let input = inline_size_computer.compute_inline_size_constraint_inputs(
+ &mut self.block_flow,
+ parent_flow_inline_size,
+ shared_context,
+ );
+
+ let solution =
+ inline_size_computer.solve_inline_size_constraints(&mut self.block_flow, &input);
+ inline_size_computer
+ .set_inline_size_constraint_solutions(&mut self.block_flow, solution);
+ inline_size_computer
+ .set_inline_position_of_flow_if_necessary(&mut self.block_flow, solution);
+ return;
}
let inline_size_computer = Table {
@@ -280,16 +313,17 @@ impl TableWrapperFlow {
preferred_width_of_all_columns: preferred_width_of_all_columns,
table_border_padding: border_padding,
};
- let input =
- inline_size_computer.compute_inline_size_constraint_inputs(&mut self.block_flow,
- parent_flow_inline_size,
- shared_context);
-
- let solution = inline_size_computer.solve_inline_size_constraints(&mut self.block_flow,
- &input);
+ let input = inline_size_computer.compute_inline_size_constraint_inputs(
+ &mut self.block_flow,
+ parent_flow_inline_size,
+ shared_context,
+ );
+
+ let solution =
+ inline_size_computer.solve_inline_size_constraints(&mut self.block_flow, &input);
inline_size_computer.set_inline_size_constraint_solutions(&mut self.block_flow, solution);
- inline_size_computer.set_inline_position_of_flow_if_necessary(&mut self.block_flow,
- solution);
+ inline_size_computer
+ .set_inline_position_of_flow_if_necessary(&mut self.block_flow, solution);
}
}
@@ -332,90 +366,96 @@ impl Flow for TableWrapperFlow {
}
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
- debug!("assign_inline_sizes({}): assigning inline_size for flow",
- if self.block_flow.base.flags.is_float() {
- "floated table_wrapper"
- } else {
- "table_wrapper"
- });
+ debug!(
+ "assign_inline_sizes({}): assigning inline_size for flow",
+ if self.block_flow.base.flags.is_float() {
+ "floated table_wrapper"
+ } else {
+ "table_wrapper"
+ }
+ );
let shared_context = layout_context.shared_context();
- self.block_flow.initialize_container_size_for_root(shared_context);
-
- let mut intermediate_column_inline_sizes = self.column_intrinsic_inline_sizes
- .iter()
- .map(|column_intrinsic_inline_size| {
- IntermediateColumnInlineSize {
- size: column_intrinsic_inline_size.minimum_length,
- percentage: column_intrinsic_inline_size.percentage,
- }
- }).collect::<Vec<_>>();
+ self.block_flow
+ .initialize_container_size_for_root(shared_context);
+
+ let mut intermediate_column_inline_sizes = self
+ .column_intrinsic_inline_sizes
+ .iter()
+ .map(
+ |column_intrinsic_inline_size| IntermediateColumnInlineSize {
+ size: column_intrinsic_inline_size.minimum_length,
+ percentage: column_intrinsic_inline_size.percentage,
+ },
+ ).collect::<Vec<_>>();
// Our inline-size was set to the inline-size of the containing block by the flow's parent.
// Now compute the real value.
let containing_block_inline_size = self.block_flow.base.block_container_inline_size;
if self.block_flow.base.flags.is_float() {
- self.block_flow.float.as_mut().unwrap().containing_inline_size =
- containing_block_inline_size;
+ self.block_flow
+ .float
+ .as_mut()
+ .unwrap()
+ .containing_inline_size = containing_block_inline_size;
}
// This has to be done before computing our inline size because `compute_used_inline_size`
// internally consults the border and padding of the table.
self.compute_border_and_padding_of_table();
- self.compute_used_inline_size(shared_context,
- containing_block_inline_size,
- &intermediate_column_inline_sizes);
+ self.compute_used_inline_size(
+ shared_context,
+ containing_block_inline_size,
+ &intermediate_column_inline_sizes,
+ );
match self.table_layout {
- TableLayout::Auto => {
- self.calculate_table_column_sizes_for_automatic_layout(
- &mut intermediate_column_inline_sizes)
- }
- TableLayout::Fixed => {}
+ TableLayout::Auto => self.calculate_table_column_sizes_for_automatic_layout(
+ &mut intermediate_column_inline_sizes,
+ ),
+ TableLayout::Fixed => {},
}
let inline_start_content_edge = self.block_flow.fragment.border_box.start.i;
let content_inline_size = self.block_flow.fragment.border_box.size.inline;
let inline_end_content_edge = self.block_flow.fragment.border_padding.inline_end +
- self.block_flow.fragment.margin.inline_end;
+ self.block_flow.fragment.margin.inline_end;
// In case of fixed layout, column inline-sizes are calculated in table flow.
let assigned_column_inline_sizes = match self.table_layout {
TableLayout::Fixed => None,
- TableLayout::Auto => {
- Some(intermediate_column_inline_sizes.iter().map(|sizes| {
- ColumnComputedInlineSize {
- size: sizes.size,
- }
- }).collect::<Vec<_>>())
- }
+ TableLayout::Auto => Some(
+ intermediate_column_inline_sizes
+ .iter()
+ .map(|sizes| ColumnComputedInlineSize { size: sizes.size })
+ .collect::<Vec<_>>(),
+ ),
};
match assigned_column_inline_sizes {
- None => {
- self.block_flow
- .propagate_assigned_inline_size_to_children(shared_context,
- inline_start_content_edge,
- inline_end_content_edge,
- content_inline_size,
- |_, _, _, _, _, _| {})
- }
+ None => self.block_flow.propagate_assigned_inline_size_to_children(
+ shared_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ content_inline_size,
+ |_, _, _, _, _, _| {},
+ ),
Some(ref assigned_column_inline_sizes) => {
- self.block_flow
- .propagate_assigned_inline_size_to_children(shared_context,
- inline_start_content_edge,
- inline_end_content_edge,
- content_inline_size,
- |child_flow, _, _, _, _, _| {
- if child_flow.class() == FlowClass::Table {
- child_flow.as_mut_table().column_computed_inline_sizes =
- assigned_column_inline_sizes.to_vec();
- }
- })
- }
+ self.block_flow.propagate_assigned_inline_size_to_children(
+ shared_context,
+ inline_start_content_edge,
+ inline_end_content_edge,
+ content_inline_size,
+ |child_flow, _, _, _, _, _| {
+ if child_flow.class() == FlowClass::Table {
+ child_flow.as_mut_table().column_computed_inline_sizes =
+ assigned_column_inline_sizes.to_vec();
+ }
+ },
+ )
+ },
}
-
}
fn assign_block_size(&mut self, layout_context: &LayoutContext) {
@@ -423,34 +463,42 @@ impl Flow for TableWrapperFlow {
let remaining = self.block_flow.assign_block_size_block_base(
layout_context,
None,
- MarginsMayCollapseFlag::MarginsMayNotCollapse);
+ MarginsMayCollapseFlag::MarginsMayNotCollapse,
+ );
debug_assert!(remaining.is_none());
}
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
- self.block_flow.compute_stacking_relative_position(layout_context)
+ self.block_flow
+ .compute_stacking_relative_position(layout_context)
}
fn place_float_if_applicable<'a>(&mut self) {
self.block_flow.place_float_if_applicable()
}
- fn assign_block_size_for_inorder_child_if_necessary(&mut self,
- layout_context: &LayoutContext,
- parent_thread_id: u8,
- content_box: LogicalRect<Au>)
- -> bool {
- self.block_flow.assign_block_size_for_inorder_child_if_necessary(layout_context,
- parent_thread_id,
- content_box)
+ fn assign_block_size_for_inorder_child_if_necessary(
+ &mut self,
+ layout_context: &LayoutContext,
+ parent_thread_id: u8,
+ content_box: LogicalRect<Au>,
+ ) -> bool {
+ self.block_flow
+ .assign_block_size_for_inorder_child_if_necessary(
+ layout_context,
+ parent_thread_id,
+ content_box,
+ )
}
fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
- self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
+ self.block_flow
+ .update_late_computed_inline_position_if_necessary(inline_position)
}
fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
- self.block_flow.update_late_computed_block_position_if_necessary(block_position)
+ self.block_flow
+ .update_late_computed_block_position_if_necessary(block_position)
}
fn generated_containing_block_size(&self, flow: OpaqueFlow) -> LogicalSize<Au> {
@@ -465,7 +513,8 @@ impl Flow for TableWrapperFlow {
self.block_flow.collect_stacking_contexts_for_block(
state,
StackingContextCollectionFlags::POSITION_NEVER_CREATES_CONTAINING_BLOCK |
- StackingContextCollectionFlags::NEVER_CREATES_CLIP_SCROLL_NODE);
+ StackingContextCollectionFlags::NEVER_CREATES_CLIP_SCROLL_NODE,
+ );
}
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
@@ -476,11 +525,17 @@ impl Flow for TableWrapperFlow {
self.block_flow.compute_overflow()
}
- fn iterate_through_fragment_border_boxes(&self,
- iterator: &mut FragmentBorderBoxIterator,
- level: i32,
- stacking_context_position: &Point2D<Au>) {
- self.block_flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position)
+ fn iterate_through_fragment_border_boxes(
+ &self,
+ iterator: &mut FragmentBorderBoxIterator,
+ level: i32,
+ stacking_context_position: &Point2D<Au>,
+ ) {
+ self.block_flow.iterate_through_fragment_border_boxes(
+ iterator,
+ level,
+ stacking_context_position,
+ )
}
fn mutate_fragments(&mut self, mutator: &mut FnMut(&mut Fragment)) {
@@ -550,12 +605,14 @@ impl AutoLayoutCandidateGuess {
}
/// Fills in the inline-size guesses for this column per INTRINSIC § 4.3.
- fn from_column_intrinsic_inline_size(column_intrinsic_inline_size: &ColumnIntrinsicInlineSize,
- assignable_inline_size: Au)
- -> AutoLayoutCandidateGuess {
- let minimum_percentage_guess =
- max(assignable_inline_size.scale_by(column_intrinsic_inline_size.percentage),
- column_intrinsic_inline_size.minimum_length);
+ fn from_column_intrinsic_inline_size(
+ column_intrinsic_inline_size: &ColumnIntrinsicInlineSize,
+ assignable_inline_size: Au,
+ ) -> AutoLayoutCandidateGuess {
+ let minimum_percentage_guess = max(
+ assignable_inline_size.scale_by(column_intrinsic_inline_size.percentage),
+ column_intrinsic_inline_size.minimum_length,
+ );
AutoLayoutCandidateGuess {
minimum_guess: column_intrinsic_inline_size.minimum_length,
minimum_percentage_guess: minimum_percentage_guess,
@@ -607,8 +664,8 @@ impl<'a> Add for &'a AutoLayoutCandidateGuess {
fn add(self, other: &AutoLayoutCandidateGuess) -> AutoLayoutCandidateGuess {
AutoLayoutCandidateGuess {
minimum_guess: self.minimum_guess + other.minimum_guess,
- minimum_percentage_guess:
- self.minimum_percentage_guess + other.minimum_percentage_guess,
+ minimum_percentage_guess: self.minimum_percentage_guess +
+ other.minimum_percentage_guess,
minimum_specified_guess: self.minimum_specified_guess + other.minimum_specified_guess,
preferred_guess: self.preferred_guess + other.preferred_guess,
}
@@ -631,24 +688,32 @@ impl SelectedAutoLayoutCandidateGuess {
///
/// FIXME(pcwalton, INTRINSIC spec): INTRINSIC doesn't specify whether these are exclusive or
/// inclusive ranges.
- fn select(guess: &AutoLayoutCandidateGuess, assignable_inline_size: Au)
- -> SelectedAutoLayoutCandidateGuess {
+ fn select(
+ guess: &AutoLayoutCandidateGuess,
+ assignable_inline_size: Au,
+ ) -> SelectedAutoLayoutCandidateGuess {
if assignable_inline_size < guess.minimum_guess {
SelectedAutoLayoutCandidateGuess::UseMinimumGuess
} else if assignable_inline_size < guess.minimum_percentage_guess {
- let weight = weight(guess.minimum_guess,
- assignable_inline_size,
- guess.minimum_percentage_guess);
+ let weight = weight(
+ guess.minimum_guess,
+ assignable_inline_size,
+ guess.minimum_percentage_guess,
+ );
SelectedAutoLayoutCandidateGuess::InterpolateBetweenMinimumGuessAndMinimumPercentageGuess(weight)
} else if assignable_inline_size < guess.minimum_specified_guess {
- let weight = weight(guess.minimum_percentage_guess,
- assignable_inline_size,
- guess.minimum_specified_guess);
+ let weight = weight(
+ guess.minimum_percentage_guess,
+ assignable_inline_size,
+ guess.minimum_specified_guess,
+ );
SelectedAutoLayoutCandidateGuess::InterpolateBetweenMinimumPercentageGuessAndMinimumSpecifiedGuess(weight)
} else if assignable_inline_size < guess.preferred_guess {
- let weight = weight(guess.minimum_specified_guess,
- assignable_inline_size,
- guess.preferred_guess);
+ let weight = weight(
+ guess.minimum_specified_guess,
+ assignable_inline_size,
+ guess.preferred_guess,
+ );
SelectedAutoLayoutCandidateGuess::InterpolateBetweenMinimumSpecifiedGuessAndPreferredGuess(weight)
} else {
SelectedAutoLayoutCandidateGuess::UsePreferredGuessAndDistributeExcessInlineSize
@@ -688,17 +753,19 @@ impl ExcessInlineSizeDistributionInfo {
fn update(&mut self, column_intrinsic_inline_size: &ColumnIntrinsicInlineSize) {
if !column_intrinsic_inline_size.constrained &&
- column_intrinsic_inline_size.percentage == 0.0 {
+ column_intrinsic_inline_size.percentage == 0.0
+ {
self.preferred_inline_size_of_nonconstrained_columns_with_no_percentage =
self.preferred_inline_size_of_nonconstrained_columns_with_no_percentage +
- column_intrinsic_inline_size.preferred;
+ column_intrinsic_inline_size.preferred;
self.count_of_nonconstrained_columns_with_no_percentage += 1
}
if column_intrinsic_inline_size.constrained &&
- column_intrinsic_inline_size.percentage == 0.0 {
+ column_intrinsic_inline_size.percentage == 0.0
+ {
self.preferred_inline_size_of_constrained_columns_with_no_percentage =
self.preferred_inline_size_of_constrained_columns_with_no_percentage +
- column_intrinsic_inline_size.preferred
+ column_intrinsic_inline_size.preferred
}
self.total_percentage += column_intrinsic_inline_size.percentage;
self.column_count += 1
@@ -710,30 +777,32 @@ impl ExcessInlineSizeDistributionInfo {
/// `#[inline]` so the compiler will hoist out the branch, which is loop-invariant.
#[inline]
fn distribute_excess_inline_size_to_column(
- &self,
- intermediate_column_inline_size: &mut IntermediateColumnInlineSize,
- column_intrinsic_inline_size: &ColumnIntrinsicInlineSize,
- excess_inline_size: Au,
- total_distributed_excess_size: &mut Au) {
+ &self,
+ intermediate_column_inline_size: &mut IntermediateColumnInlineSize,
+ column_intrinsic_inline_size: &ColumnIntrinsicInlineSize,
+ excess_inline_size: Au,
+ total_distributed_excess_size: &mut Au,
+ ) {
let proportion =
if self.preferred_inline_size_of_nonconstrained_columns_with_no_percentage > Au(0) {
// FIXME(spec, pcwalton): Gecko and WebKit do *something* here when there are
// nonconstrained columns with no percentage *and* no preferred width. What do they
// do?
if !column_intrinsic_inline_size.constrained &&
- column_intrinsic_inline_size.percentage == 0.0 {
- column_intrinsic_inline_size.preferred.to_f32_px() /
- self.preferred_inline_size_of_nonconstrained_columns_with_no_percentage
- .to_f32_px()
+ column_intrinsic_inline_size.percentage == 0.0
+ {
+ column_intrinsic_inline_size.preferred.to_f32_px() / self
+ .preferred_inline_size_of_nonconstrained_columns_with_no_percentage
+ .to_f32_px()
} else {
0.0
}
} else if self.count_of_nonconstrained_columns_with_no_percentage > 0 {
1.0 / (self.count_of_nonconstrained_columns_with_no_percentage as CSSFloat)
- } else if self.preferred_inline_size_of_constrained_columns_with_no_percentage >
- Au(0) {
- column_intrinsic_inline_size.preferred.to_f32_px() /
- self.preferred_inline_size_of_constrained_columns_with_no_percentage.to_f32_px()
+ } else if self.preferred_inline_size_of_constrained_columns_with_no_percentage > Au(0) {
+ column_intrinsic_inline_size.preferred.to_f32_px() / self
+ .preferred_inline_size_of_constrained_columns_with_no_percentage
+ .to_f32_px()
} else if self.total_percentage > 0.0 {
column_intrinsic_inline_size.percentage / self.total_percentage
} else {
@@ -742,11 +811,13 @@ impl ExcessInlineSizeDistributionInfo {
// The `min` here has the effect of throwing away fractional excess at the end of the
// table.
- let amount_to_distribute = min(excess_inline_size.scale_by(proportion),
- excess_inline_size - *total_distributed_excess_size);
+ let amount_to_distribute = min(
+ excess_inline_size.scale_by(proportion),
+ excess_inline_size - *total_distributed_excess_size,
+ );
*total_distributed_excess_size = *total_distributed_excess_size + amount_to_distribute;
- intermediate_column_inline_size.size = intermediate_column_inline_size.size +
- amount_to_distribute
+ intermediate_column_inline_size.size =
+ intermediate_column_inline_size.size + amount_to_distribute
}
}
@@ -760,28 +831,32 @@ struct IntermediateColumnInlineSize {
///
/// `table_border_padding` is the sum of the sizes of all border and padding in the inline
/// direction of the table contained within this table wrapper.
-fn initial_computed_inline_size(block: &mut BlockFlow,
- containing_block_inline_size: Au,
- minimum_width_of_all_columns: Au,
- preferred_width_of_all_columns: Au,
- table_border_padding: Au)
- -> MaybeAuto {
- let inline_size_from_style = MaybeAuto::from_style(block.fragment.style.content_inline_size(),
- containing_block_inline_size);
+fn initial_computed_inline_size(
+ block: &mut BlockFlow,
+ containing_block_inline_size: Au,
+ minimum_width_of_all_columns: Au,
+ preferred_width_of_all_columns: Au,
+ table_border_padding: Au,
+) -> MaybeAuto {
+ let inline_size_from_style = MaybeAuto::from_style(
+ block.fragment.style.content_inline_size(),
+ containing_block_inline_size,
+ );
match inline_size_from_style {
MaybeAuto::Auto => {
- if preferred_width_of_all_columns + table_border_padding <= containing_block_inline_size {
+ if preferred_width_of_all_columns + table_border_padding <= containing_block_inline_size
+ {
MaybeAuto::Specified(preferred_width_of_all_columns + table_border_padding)
} else if minimum_width_of_all_columns > containing_block_inline_size {
MaybeAuto::Specified(minimum_width_of_all_columns)
} else {
MaybeAuto::Auto
}
- }
- MaybeAuto::Specified(inline_size_from_style) => {
- MaybeAuto::Specified(max(inline_size_from_style - table_border_padding,
- minimum_width_of_all_columns))
- }
+ },
+ MaybeAuto::Specified(inline_size_from_style) => MaybeAuto::Specified(max(
+ inline_size_from_style - table_border_padding,
+ minimum_width_of_all_columns,
+ )),
}
}
@@ -793,27 +868,33 @@ struct Table {
impl ISizeAndMarginsComputer for Table {
fn compute_border_and_padding(&self, block: &mut BlockFlow, containing_block_inline_size: Au) {
- block.fragment.compute_border_and_padding(containing_block_inline_size)
+ block
+ .fragment
+ .compute_border_and_padding(containing_block_inline_size)
}
- fn initial_computed_inline_size(&self,
- block: &mut BlockFlow,
- parent_flow_inline_size: Au,
- shared_context: &SharedStyleContext)
- -> MaybeAuto {
+ fn initial_computed_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ shared_context: &SharedStyleContext,
+ ) -> MaybeAuto {
let containing_block_inline_size =
self.containing_block_inline_size(block, parent_flow_inline_size, shared_context);
- initial_computed_inline_size(block,
- containing_block_inline_size,
- self.minimum_width_of_all_columns,
- self.preferred_width_of_all_columns,
- self.table_border_padding)
- }
-
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ initial_computed_inline_size(
+ block,
+ containing_block_inline_size,
+ self.minimum_width_of_all_columns,
+ self.preferred_width_of_all_columns,
+ self.table_border_padding,
+ )
+ }
+
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
self.solve_block_inline_size_constraints(block, input)
}
}
@@ -826,29 +907,33 @@ struct FloatedTable {
impl ISizeAndMarginsComputer for FloatedTable {
fn compute_border_and_padding(&self, block: &mut BlockFlow, containing_block_inline_size: Au) {
- block.fragment.compute_border_and_padding(containing_block_inline_size)
+ block
+ .fragment
+ .compute_border_and_padding(containing_block_inline_size)
}
- fn initial_computed_inline_size(&self,
- block: &mut BlockFlow,
- parent_flow_inline_size: Au,
- shared_context: &SharedStyleContext)
- -> MaybeAuto {
+ fn initial_computed_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ shared_context: &SharedStyleContext,
+ ) -> MaybeAuto {
let containing_block_inline_size =
- self.containing_block_inline_size(block,
- parent_flow_inline_size,
- shared_context);
- initial_computed_inline_size(block,
- containing_block_inline_size,
- self.minimum_width_of_all_columns,
- self.preferred_width_of_all_columns,
- self.table_border_padding)
- }
-
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ self.containing_block_inline_size(block, parent_flow_inline_size, shared_context);
+ initial_computed_inline_size(
+ block,
+ containing_block_inline_size,
+ self.minimum_width_of_all_columns,
+ self.preferred_width_of_all_columns,
+ self.table_border_padding,
+ )
+ }
+
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
FloatNonReplaced.solve_inline_size_constraints(block, input)
}
}
@@ -861,46 +946,54 @@ struct AbsoluteTable {
impl ISizeAndMarginsComputer for AbsoluteTable {
fn compute_border_and_padding(&self, block: &mut BlockFlow, containing_block_inline_size: Au) {
- block.fragment.compute_border_and_padding(containing_block_inline_size)
+ block
+ .fragment
+ .compute_border_and_padding(containing_block_inline_size)
}
- fn initial_computed_inline_size(&self,
- block: &mut BlockFlow,
- parent_flow_inline_size: Au,
- shared_context: &SharedStyleContext)
- -> MaybeAuto {
+ fn initial_computed_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ shared_context: &SharedStyleContext,
+ ) -> MaybeAuto {
let containing_block_inline_size =
- self.containing_block_inline_size(block,
- parent_flow_inline_size,
- shared_context);
- initial_computed_inline_size(block,
- containing_block_inline_size,
- self.minimum_width_of_all_columns,
- self.preferred_width_of_all_columns,
- self.table_border_padding)
- }
-
- fn containing_block_inline_size(&self,
- block: &mut BlockFlow,
- parent_flow_inline_size: Au,
- shared_context: &SharedStyleContext)
- -> Au {
- AbsoluteNonReplaced.containing_block_inline_size(block,
- parent_flow_inline_size,
- shared_context)
- }
-
- fn solve_inline_size_constraints(&self,
- block: &mut BlockFlow,
- input: &ISizeConstraintInput)
- -> ISizeConstraintSolution {
+ self.containing_block_inline_size(block, parent_flow_inline_size, shared_context);
+ initial_computed_inline_size(
+ block,
+ containing_block_inline_size,
+ self.minimum_width_of_all_columns,
+ self.preferred_width_of_all_columns,
+ self.table_border_padding,
+ )
+ }
+
+ fn containing_block_inline_size(
+ &self,
+ block: &mut BlockFlow,
+ parent_flow_inline_size: Au,
+ shared_context: &SharedStyleContext,
+ ) -> Au {
+ AbsoluteNonReplaced.containing_block_inline_size(
+ block,
+ parent_flow_inline_size,
+ shared_context,
+ )
+ }
+
+ fn solve_inline_size_constraints(
+ &self,
+ block: &mut BlockFlow,
+ input: &ISizeConstraintInput,
+ ) -> ISizeConstraintSolution {
AbsoluteNonReplaced.solve_inline_size_constraints(block, input)
}
- fn set_inline_position_of_flow_if_necessary(&self,
- block: &mut BlockFlow,
- solution: ISizeConstraintSolution) {
+ fn set_inline_position_of_flow_if_necessary(
+ &self,
+ block: &mut BlockFlow,
+ solution: ISizeConstraintSolution,
+ ) {
AbsoluteNonReplaced.set_inline_position_of_flow_if_necessary(block, solution);
}
-
}
diff --git a/components/layout/tests/size_of.rs b/components/layout/tests/size_of.rs
index f12b0049f4b..7d869271368 100644
--- a/components/layout/tests/size_of.rs
+++ b/components/layout/tests/size_of.rs
@@ -5,10 +5,15 @@
#![cfg(target_pointer_width = "64")]
extern crate layout;
-#[macro_use] extern crate size_of_test;
+#[macro_use]
+extern crate size_of_test;
use layout::Fragment;
use layout::SpecificFragmentInfo;
size_of_test!(test_size_of_fragment, Fragment, 176);
-size_of_test!(test_size_of_specific_fragment_info, SpecificFragmentInfo, 24);
+size_of_test!(
+ test_size_of_specific_fragment_info,
+ SpecificFragmentInfo,
+ 24
+);
diff --git a/components/layout/text.rs b/components/layout/text.rs
index ac93eaed03f..c8321e9a03b 100644
--- a/components/layout/text.rs
+++ b/components/layout/text.rs
@@ -55,7 +55,6 @@ fn text(fragments: &LinkedList<Fragment>) -> String {
text
}
-
/// A stack-allocated object for scanning an inline flow into `TextRun`-containing `TextFragment`s.
pub struct TextRunScanner {
pub clump: LinkedList<Fragment>,
@@ -68,16 +67,25 @@ impl TextRunScanner {
}
}
- pub fn scan_for_runs(&mut self,
- font_context: &mut LayoutFontContext,
- mut fragments: LinkedList<Fragment>)
- -> InlineFragments {
- debug!("TextRunScanner: scanning {} fragments for text runs...", fragments.len());
+ pub fn scan_for_runs(
+ &mut self,
+ font_context: &mut LayoutFontContext,
+ mut fragments: LinkedList<Fragment>,
+ ) -> InlineFragments {
+ debug!(
+ "TextRunScanner: scanning {} fragments for text runs...",
+ fragments.len()
+ );
debug_assert!(!fragments.is_empty());
// Calculate bidi embedding levels, so we can split bidirectional fragments for reordering.
let text = text(&fragments);
- let para_level = fragments.front().unwrap().style.writing_mode.to_bidi_level();
+ let para_level = fragments
+ .front()
+ .unwrap()
+ .style
+ .writing_mode
+ .to_bidi_level();
let bidi_info = bidi::BidiInfo::new(&text, Some(para_level));
// Optimization: If all the text is LTR, don't bother splitting on bidi levels.
@@ -106,22 +114,25 @@ impl TextRunScanner {
// Create a clump.
split_first_fragment_at_newline_if_necessary(&mut fragments);
self.clump.append(&mut split_off_head(&mut fragments));
- while !fragments.is_empty() && self.clump
- .back()
- .unwrap()
- .can_merge_with_fragment(fragments.front()
- .unwrap()) {
+ while !fragments.is_empty() && self
+ .clump
+ .back()
+ .unwrap()
+ .can_merge_with_fragment(fragments.front().unwrap())
+ {
split_first_fragment_at_newline_if_necessary(&mut fragments);
self.clump.append(&mut split_off_head(&mut fragments));
}
// Flush that clump to the list of fragments we're building up.
- last_whitespace = self.flush_clump_to_list(font_context,
- &mut new_fragments,
- &mut paragraph_bytes_processed,
- bidi_levels,
- last_whitespace,
- &mut linebreaker);
+ last_whitespace = self.flush_clump_to_list(
+ font_context,
+ &mut new_fragments,
+ &mut paragraph_bytes_processed,
+ bidi_levels,
+ last_whitespace,
+ &mut linebreaker,
+ );
}
debug!("TextRunScanner: complete.");
@@ -136,25 +147,31 @@ impl TextRunScanner {
/// The flow keeps track of the fragments contained by all non-leaf DOM nodes. This is necessary
/// for correct painting order. Since we compress several leaf fragments here, the mapping must
/// be adjusted.
- fn flush_clump_to_list(&mut self,
- mut font_context: &mut LayoutFontContext,
- out_fragments: &mut Vec<Fragment>,
- paragraph_bytes_processed: &mut usize,
- bidi_levels: Option<&[bidi::Level]>,
- mut last_whitespace: bool,
- linebreaker: &mut Option<LineBreakLeafIter>)
- -> bool {
- debug!("TextRunScanner: flushing {} fragments in range", self.clump.len());
+ fn flush_clump_to_list(
+ &mut self,
+ mut font_context: &mut LayoutFontContext,
+ out_fragments: &mut Vec<Fragment>,
+ paragraph_bytes_processed: &mut usize,
+ bidi_levels: Option<&[bidi::Level]>,
+ mut last_whitespace: bool,
+ linebreaker: &mut Option<LineBreakLeafIter>,
+ ) -> bool {
+ debug!(
+ "TextRunScanner: flushing {} fragments in range",
+ self.clump.len()
+ );
debug_assert!(!self.clump.is_empty());
match self.clump.front().unwrap().specific {
- SpecificFragmentInfo::UnscannedText(_) => {}
+ SpecificFragmentInfo::UnscannedText(_) => {},
_ => {
- debug_assert!(self.clump.len() == 1,
- "WAT: can't coalesce non-text nodes in flush_clump_to_list()!");
+ debug_assert!(
+ self.clump.len() == 1,
+ "WAT: can't coalesce non-text nodes in flush_clump_to_list()!"
+ );
out_fragments.push(self.clump.pop_front().unwrap());
- return false
- }
+ return false;
+ },
}
// Concatenate all of the transformed strings together, saving the new character indices.
@@ -173,17 +190,19 @@ impl TextRunScanner {
let inherited_text_style = in_fragment.style().get_inherited_text();
font_group = font_context.font_group(font_style);
compression = match in_fragment.white_space() {
- WhiteSpace::Normal |
- WhiteSpace::Nowrap => CompressionMode::CompressWhitespaceNewline,
- WhiteSpace::Pre |
- WhiteSpace::PreWrap => CompressionMode::CompressNone,
+ WhiteSpace::Normal | WhiteSpace::Nowrap => {
+ CompressionMode::CompressWhitespaceNewline
+ },
+ WhiteSpace::Pre | WhiteSpace::PreWrap => CompressionMode::CompressNone,
WhiteSpace::PreLine => CompressionMode::CompressWhitespace,
};
text_transform = inherited_text_style.text_transform;
letter_spacing = inherited_text_style.letter_spacing;
- word_spacing = inherited_text_style.word_spacing.value()
- .map(|lop| lop.to_hash_key())
- .unwrap_or((Au(0), NotNan::new(0.0).unwrap()));
+ word_spacing = inherited_text_style
+ .word_spacing
+ .value()
+ .map(|lop| lop.to_hash_key())
+ .unwrap_or((Au(0), NotNan::new(0.0).unwrap()));
text_rendering = inherited_text_style.text_rendering;
word_break = inherited_text_style.word_break;
}
@@ -201,7 +220,7 @@ impl TextRunScanner {
SpecificFragmentInfo::UnscannedText(ref text_fragment_info) => {
text = &text_fragment_info.text;
selection = text_fragment_info.selection;
- }
+ },
_ => panic!("Expected an unscanned text fragment!"),
};
insertion_point = match selection {
@@ -209,14 +228,16 @@ impl TextRunScanner {
// `range` is the range within the current fragment. To get the range
// within the text run, offset it by the length of the preceding fragments.
Some(range.begin() + ByteIndex(run_info.text.len() as isize))
- }
- _ => None
+ },
+ _ => None,
};
let (mut start_position, mut end_position) = (0, 0);
for (byte_index, character) in text.char_indices() {
if !character.is_control() {
- let font = font_group.borrow_mut().find_by_codepoint(&mut font_context, character);
+ let font = font_group
+ .borrow_mut()
+ .find_by_codepoint(&mut font_context, character);
let bidi_level = match bidi_levels {
Some(levels) => levels[*paragraph_bytes_processed],
@@ -230,19 +251,20 @@ impl TextRunScanner {
// http://www.unicode.org/reports/tr24/#Common
let script = get_script(character);
let compatible_script = is_compatible(script, run_info.script);
- if compatible_script && !is_specific(run_info.script) && is_specific(script) {
+ if compatible_script && !is_specific(run_info.script) && is_specific(script)
+ {
run_info.script = script;
}
let selected = match selection {
Some(range) => range.contains(ByteIndex(byte_index as isize)),
- None => false
+ None => false,
};
// Now, if necessary, flush the mapping we were building up.
let flush_run = !run_info.has_font(&font) ||
- run_info.bidi_level != bidi_level ||
- !compatible_script;
+ run_info.bidi_level != bidi_level ||
+ !compatible_script;
let new_mapping_needed = flush_run || mapping.selected != selected;
if new_mapping_needed {
@@ -250,22 +272,23 @@ impl TextRunScanner {
// The run info values are uninitialized at this point so
// flushing an empty mapping is pointless.
if end_position > 0 {
- mapping.flush(&mut mappings,
- &mut run_info,
- &**text,
- compression,
- text_transform,
- &mut last_whitespace,
- &mut start_position,
- end_position);
+ mapping.flush(
+ &mut mappings,
+ &mut run_info,
+ &**text,
+ compression,
+ text_transform,
+ &mut last_whitespace,
+ &mut start_position,
+ end_position,
+ );
}
if run_info.text.len() > 0 {
if flush_run {
run_info.flush(&mut run_info_list, &mut insertion_point);
run_info = RunInfo::new();
}
- mapping = RunMapping::new(&run_info_list[..],
- fragment_index);
+ mapping = RunMapping::new(&run_info_list[..], fragment_index);
}
run_info.font = font;
run_info.bidi_level = bidi_level;
@@ -280,14 +303,16 @@ impl TextRunScanner {
}
// Flush the last mapping we created for this fragment to the list.
- mapping.flush(&mut mappings,
- &mut run_info,
- &**text,
- compression,
- text_transform,
- &mut last_whitespace,
- &mut start_position,
- end_position);
+ mapping.flush(
+ &mut mappings,
+ &mut run_info,
+ &**text,
+ compression,
+ text_transform,
+ &mut last_whitespace,
+ &mut start_position,
+ end_position,
+ );
}
// Push the final run info.
@@ -326,20 +351,25 @@ impl TextRunScanner {
}
// If no font is found (including fallbacks), there's no way we can render.
- let font =
- run_info.font
- .or_else(|| font_group.borrow_mut().first(&mut font_context))
- .expect("No font found for text run!");
-
- let (run, break_at_zero) = TextRun::new(&mut *font.borrow_mut(),
- run_info.text,
- &options,
- run_info.bidi_level,
- linebreaker);
- result.push((ScannedTextRun {
- run: Arc::new(run),
- insertion_point: run_info.insertion_point,
- }, break_at_zero))
+ let font = run_info
+ .font
+ .or_else(|| font_group.borrow_mut().first(&mut font_context))
+ .expect("No font found for text run!");
+
+ let (run, break_at_zero) = TextRun::new(
+ &mut *font.borrow_mut(),
+ run_info.text,
+ &options,
+ run_info.bidi_level,
+ linebreaker,
+ );
+ result.push((
+ ScannedTextRun {
+ run: Arc::new(run),
+ insertion_point: run_info.insertion_point,
+ },
+ break_at_zero,
+ ))
}
result
};
@@ -349,12 +379,14 @@ impl TextRunScanner {
let mut mappings = mappings.into_iter().peekable();
let mut prev_fragments_to_meld = Vec::new();
- for (logical_offset, old_fragment) in
- mem::replace(&mut self.clump, LinkedList::new()).into_iter().enumerate() {
+ for (logical_offset, old_fragment) in mem::replace(&mut self.clump, LinkedList::new())
+ .into_iter()
+ .enumerate()
+ {
let mut is_first_mapping_of_this_old_fragment = true;
loop {
match mappings.peek() {
- Some(mapping) if mapping.old_fragment_index == logical_offset => {}
+ Some(mapping) if mapping.old_fragment_index == logical_offset => {},
Some(_) | None => {
if is_first_mapping_of_this_old_fragment {
// There were no mappings for this unscanned fragment. Transfer its
@@ -365,13 +397,15 @@ impl TextRunScanner {
prev_fragments_to_meld.push(old_fragment);
}
break;
- }
+ },
};
let mapping = mappings.next().unwrap();
let (scanned_run, break_at_zero) = runs[mapping.text_run_index].clone();
- let mut byte_range = Range::new(ByteIndex(mapping.byte_range.begin() as isize),
- ByteIndex(mapping.byte_range.length() as isize));
+ let mut byte_range = Range::new(
+ ByteIndex(mapping.byte_range.begin() as isize),
+ ByteIndex(mapping.byte_range.length() as isize),
+ );
let mut flags = ScannedTextFlags::empty();
if !break_at_zero && mapping.byte_range.begin() == 0 {
@@ -381,31 +415,34 @@ impl TextRunScanner {
}
let text_size = old_fragment.border_box.size;
- let requires_line_break_afterward_if_wrapping_on_newlines =
- scanned_run.run.text[mapping.byte_range.begin()..mapping.byte_range.end()]
+ let requires_line_break_afterward_if_wrapping_on_newlines = scanned_run.run.text
+ [mapping.byte_range.begin()..mapping.byte_range.end()]
.ends_with('\n');
if requires_line_break_afterward_if_wrapping_on_newlines {
byte_range.extend_by(ByteIndex(-1)); // Trim the '\n'
- flags.insert(ScannedTextFlags::REQUIRES_LINE_BREAK_AFTERWARD_IF_WRAPPING_ON_NEWLINES);
+ flags.insert(
+ ScannedTextFlags::REQUIRES_LINE_BREAK_AFTERWARD_IF_WRAPPING_ON_NEWLINES,
+ );
}
if mapping.selected {
flags.insert(ScannedTextFlags::SELECTED);
}
- let insertion_point = if mapping.contains_insertion_point(scanned_run.insertion_point) {
- scanned_run.insertion_point
- } else {
- None
- };
+ let insertion_point =
+ if mapping.contains_insertion_point(scanned_run.insertion_point) {
+ scanned_run.insertion_point
+ } else {
+ None
+ };
let mut new_text_fragment_info = Box::new(ScannedTextFragmentInfo::new(
scanned_run.run,
byte_range,
text_size,
insertion_point,
- flags
+ flags,
));
let new_metrics = new_text_fragment_info.run.metrics_for_range(&byte_range);
@@ -415,20 +452,23 @@ impl TextRunScanner {
let mut new_fragment = old_fragment.transform(
bounding_box_size,
- SpecificFragmentInfo::ScannedText(new_text_fragment_info));
+ SpecificFragmentInfo::ScannedText(new_text_fragment_info),
+ );
let is_last_mapping_of_this_old_fragment = match mappings.peek() {
Some(mapping) if mapping.old_fragment_index == logical_offset => false,
- _ => true
+ _ => true,
};
if let Some(ref mut context) = new_fragment.inline_context {
for node in &mut context.nodes {
if !is_last_mapping_of_this_old_fragment {
- node.flags.remove(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT);
+ node.flags
+ .remove(InlineFragmentNodeFlags::LAST_FRAGMENT_OF_ELEMENT);
}
if !is_first_mapping_of_this_old_fragment {
- node.flags.remove(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT);
+ node.flags
+ .remove(InlineFragmentNodeFlags::FIRST_FRAGMENT_OF_ELEMENT);
}
}
}
@@ -447,14 +487,17 @@ impl TextRunScanner {
}
#[inline]
-fn bounding_box_for_run_metrics(metrics: &RunMetrics, writing_mode: WritingMode)
- -> LogicalSize<Au> {
+fn bounding_box_for_run_metrics(
+ metrics: &RunMetrics,
+ writing_mode: WritingMode,
+) -> LogicalSize<Au> {
// TODO: When the text-orientation property is supported, the block and inline directions may
// be swapped for horizontal glyphs in vertical lines.
LogicalSize::new(
writing_mode,
metrics.bounding_box.size.width,
- metrics.bounding_box.size.height)
+ metrics.bounding_box.size.height,
+ )
}
/// Returns the metrics of the font represented by the given `FontStyleStruct`.
@@ -465,8 +508,10 @@ fn bounding_box_for_run_metrics(metrics: &RunMetrics, writing_mode: WritingMode)
///
/// Panics if no font can be found for the given font style.
#[inline]
-pub fn font_metrics_for_style(mut font_context: &mut LayoutFontContext, style: ::ServoArc<FontStyleStruct>)
- -> FontMetrics {
+pub fn font_metrics_for_style(
+ mut font_context: &mut LayoutFontContext,
+ style: ::ServoArc<FontStyleStruct>,
+) -> FontMetrics {
let font_group = font_context.font_group(style);
let font = font_group.borrow_mut().first(&mut font_context);
let font = font.as_ref().unwrap().borrow();
@@ -480,13 +525,13 @@ pub fn line_height_from_style(style: &ComputedValues, metrics: &FontMetrics) ->
match style.get_inherited_text().line_height {
LineHeight::Normal => Au::from(metrics.line_gap),
LineHeight::Number(l) => font_size.scale_by(l.0),
- LineHeight::Length(l) => Au::from(l)
+ LineHeight::Length(l) => Au::from(l),
}
}
fn split_first_fragment_at_newline_if_necessary(fragments: &mut LinkedList<Fragment>) {
if fragments.is_empty() {
- return
+ return;
}
let new_fragment = {
@@ -501,45 +546,46 @@ fn split_first_fragment_at_newline_if_necessary(fragments: &mut LinkedList<Fragm
let unscanned_text_fragment_info = match first_fragment.specific {
SpecificFragmentInfo::UnscannedText(ref mut unscanned_text_fragment_info) => {
unscanned_text_fragment_info
- }
+ },
_ => return,
};
let position = match unscanned_text_fragment_info.text.find('\n') {
Some(position) if position < unscanned_text_fragment_info.text.len() - 1 => {
position
- }
+ },
Some(_) | None => return,
};
- string_before =
- unscanned_text_fragment_info.text[..(position + 1)].to_owned();
- unscanned_text_fragment_info.text =
- unscanned_text_fragment_info.text[(position + 1)..].to_owned().into_boxed_str();
+ string_before = unscanned_text_fragment_info.text[..(position + 1)].to_owned();
+ unscanned_text_fragment_info.text = unscanned_text_fragment_info.text[(position + 1)..]
+ .to_owned()
+ .into_boxed_str();
let offset = ByteIndex(string_before.len() as isize);
match unscanned_text_fragment_info.selection {
Some(ref mut selection) if selection.begin() >= offset => {
// Selection is entirely in the second fragment.
selection_before = None;
selection.shift_by(-offset);
- }
+ },
Some(ref mut selection) if selection.end() > offset => {
// Selection is split across two fragments.
selection_before = Some(Range::new(selection.begin(), offset));
*selection = Range::new(ByteIndex(0), selection.end() - offset);
- }
+ },
_ => {
// Selection is entirely in the first fragment.
selection_before = unscanned_text_fragment_info.selection;
unscanned_text_fragment_info.selection = None;
- }
+ },
};
}
first_fragment.transform(
first_fragment.border_box.size,
- SpecificFragmentInfo::UnscannedText(Box::new(
- UnscannedTextFragmentInfo::new(string_before.into_boxed_str(), selection_before)
- ))
+ SpecificFragmentInfo::UnscannedText(Box::new(UnscannedTextFragmentInfo::new(
+ string_before.into_boxed_str(),
+ selection_before,
+ ))),
)
};
@@ -575,9 +621,7 @@ impl RunInfo {
///
/// * `insertion_point`: The position of the insertion point, in characters relative to the start
/// of this text run.
- fn flush(mut self,
- list: &mut Vec<RunInfo>,
- insertion_point: &mut Option<ByteIndex>) {
+ fn flush(mut self, list: &mut Vec<RunInfo>, insertion_point: &mut Option<ByteIndex>) {
if let Some(idx) = *insertion_point {
let char_len = ByteIndex(self.text.len() as isize);
if idx <= char_len {
@@ -617,8 +661,7 @@ struct RunMapping {
impl RunMapping {
/// Given the current set of text runs, creates a run mapping for the next fragment.
/// `run_info_list` describes the set of runs we've seen already.
- fn new(run_info_list: &[RunInfo], fragment_index: usize)
- -> RunMapping {
+ fn new(run_info_list: &[RunInfo], fragment_index: usize) -> RunMapping {
RunMapping {
byte_range: Range::new(0, 0),
old_fragment_index: fragment_index,
@@ -629,27 +672,36 @@ impl RunMapping {
/// Flushes this run mapping to the list. `run_info` describes the text run that we're
/// currently working on. `text` refers to the text of this fragment.
- fn flush(mut self,
- mappings: &mut Vec<RunMapping>,
- run_info: &mut RunInfo,
- text: &str,
- compression: CompressionMode,
- text_transform: TextTransform,
- last_whitespace: &mut bool,
- start_position: &mut usize,
- end_position: usize) {
+ fn flush(
+ mut self,
+ mappings: &mut Vec<RunMapping>,
+ run_info: &mut RunInfo,
+ text: &str,
+ compression: CompressionMode,
+ text_transform: TextTransform,
+ last_whitespace: &mut bool,
+ start_position: &mut usize,
+ end_position: usize,
+ ) {
let was_empty = *start_position == end_position;
let old_byte_length = run_info.text.len();
- *last_whitespace = util::transform_text(&text[(*start_position)..end_position],
- compression,
- *last_whitespace,
- &mut run_info.text);
+ *last_whitespace = util::transform_text(
+ &text[(*start_position)..end_position],
+ compression,
+ *last_whitespace,
+ &mut run_info.text,
+ );
// Account for `text-transform`. (Confusingly, this is not handled in "text
// transformation" above, but we follow Gecko in the naming.)
let is_first_run = *start_position == 0;
- apply_style_transform_if_necessary(&mut run_info.text, old_byte_length, text_transform,
- *last_whitespace, is_first_run);
+ apply_style_transform_if_necessary(
+ &mut run_info.text,
+ old_byte_length,
+ text_transform,
+ *last_whitespace,
+ is_first_run,
+ );
*start_position = end_position;
let new_byte_length = run_info.text.len();
@@ -674,38 +726,39 @@ impl RunMapping {
fn contains_insertion_point(&self, insertion_point: Option<ByteIndex>) -> bool {
match insertion_point.map(ByteIndex::to_usize) {
None => false,
- Some(idx) => self.byte_range.begin() <= idx && idx <= self.byte_range.end()
+ Some(idx) => self.byte_range.begin() <= idx && idx <= self.byte_range.end(),
}
}
}
-
/// Accounts for `text-transform`.
///
/// FIXME(#4311, pcwalton): Title-case mapping can change length of the string;
/// case mapping should be language-specific; `full-width`;
/// use graphemes instead of characters.
-fn apply_style_transform_if_necessary(string: &mut String,
- first_character_position: usize,
- text_transform: TextTransform,
- last_whitespace: bool,
- is_first_run: bool) {
+fn apply_style_transform_if_necessary(
+ string: &mut String,
+ first_character_position: usize,
+ text_transform: TextTransform,
+ last_whitespace: bool,
+ is_first_run: bool,
+) {
match text_transform {
- TextTransform::None => {}
+ TextTransform::None => {},
TextTransform::Uppercase => {
let original = string[first_character_position..].to_owned();
string.truncate(first_character_position);
for ch in original.chars().flat_map(|ch| ch.to_uppercase()) {
string.push(ch);
}
- }
+ },
TextTransform::Lowercase => {
let original = string[first_character_position..].to_owned();
string.truncate(first_character_position);
for ch in original.chars().flat_map(|ch| ch.to_lowercase()) {
string.push(ch);
}
- }
+ },
TextTransform::Capitalize => {
let original = string[first_character_position..].to_owned();
string.truncate(first_character_position);
@@ -719,7 +772,7 @@ fn apply_style_transform_if_necessary(string: &mut String,
if capitalize_next_letter && character.is_alphabetic() {
string.push(character.to_uppercase().next().unwrap());
capitalize_next_letter = false;
- continue
+ continue;
}
string.push(character);
@@ -729,7 +782,7 @@ fn apply_style_transform_if_necessary(string: &mut String,
capitalize_next_letter = true
}
}
- }
+ },
}
}
diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs
index 2d85ce23c9b..e1db809bd8f 100644
--- a/components/layout/traversal.rs
+++ b/components/layout/traversal.rs
@@ -33,9 +33,7 @@ impl<'a> RecalcStyleAndConstructFlows<'a> {
impl<'a> RecalcStyleAndConstructFlows<'a> {
/// Creates a traversal context, taking ownership of the shared layout context.
pub fn new(context: LayoutContext<'a>) -> Self {
- RecalcStyleAndConstructFlows {
- context: context,
- }
+ RecalcStyleAndConstructFlows { context: context }
}
/// Consumes this traversal context, returning ownership of the shared layout
@@ -55,11 +53,11 @@ where
fn process_preorder<F>(
&self,
traversal_data: &PerLevelTraversalData,
- context: &mut StyleContext<E>, node: E::ConcreteNode,
+ context: &mut StyleContext<E>,
+ node: E::ConcreteNode,
note_child: F,
- )
- where
- F: FnMut(E::ConcreteNode)
+ ) where
+ F: FnMut(E::ConcreteNode),
{
// FIXME(pcwalton): Stop allocating here. Ideally this should just be
// done by the HTML parser.
@@ -76,7 +74,7 @@ where
construct_flows_at(&self.context, node);
}
- fn text_node_needs_traversal(node: E::ConcreteNode, parent_data: &ElementData) -> bool {
+ fn text_node_needs_traversal(node: E::ConcreteNode, parent_data: &ElementData) -> bool {
// Text nodes never need styling. However, there are two cases they may need
// flow construction:
// (1) They child doesn't yet have layout data (preorder traversal initializes it).
@@ -192,7 +190,8 @@ pub trait PostorderNodeMutTraversal<ConcreteThreadSafeLayoutNode: ThreadSafeLayo
#[inline]
#[allow(unsafe_code)]
fn construct_flows_at<N>(context: &LayoutContext, node: N)
- where N: LayoutNode,
+where
+ N: LayoutNode,
{
debug!("construct_flows_at: {:?}", node);
@@ -202,22 +201,32 @@ fn construct_flows_at<N>(context: &LayoutContext, node: N)
// Always reconstruct if incremental layout is turned off.
let nonincremental_layout = opts::get().nonincremental_layout;
- if nonincremental_layout || tnode.restyle_damage() != RestyleDamage::empty() ||
- node.as_element().map_or(false, |el| el.has_dirty_descendants()) {
+ if nonincremental_layout || tnode.restyle_damage() != RestyleDamage::empty() || node
+ .as_element()
+ .map_or(false, |el| el.has_dirty_descendants())
+ {
let mut flow_constructor = FlowConstructor::new(context);
if nonincremental_layout || !flow_constructor.repair_if_possible(&tnode) {
flow_constructor.process(&tnode);
- debug!("Constructed flow for {:?}: {:x}",
- tnode,
- tnode.flow_debug_id());
+ debug!(
+ "Constructed flow for {:?}: {:x}",
+ tnode,
+ tnode.flow_debug_id()
+ );
}
}
- tnode.mutate_layout_data().unwrap().flags.insert(::data::LayoutDataFlags::HAS_BEEN_TRAVERSED);
+ tnode
+ .mutate_layout_data()
+ .unwrap()
+ .flags
+ .insert(::data::LayoutDataFlags::HAS_BEEN_TRAVERSED);
}
if let Some(el) = node.as_element() {
- unsafe { el.unset_dirty_descendants(); }
+ unsafe {
+ el.unset_dirty_descendants();
+ }
}
}
@@ -231,12 +240,16 @@ impl<'a> PostorderFlowTraversal for BubbleISizes<'a> {
#[inline]
fn process(&self, flow: &mut Flow) {
flow.bubble_inline_sizes();
- flow.mut_base().restyle_damage.remove(ServoRestyleDamage::BUBBLE_ISIZES);
+ flow.mut_base()
+ .restyle_damage
+ .remove(ServoRestyleDamage::BUBBLE_ISIZES);
}
#[inline]
fn should_process(&self, flow: &mut Flow) -> bool {
- flow.base().restyle_damage.contains(ServoRestyleDamage::BUBBLE_ISIZES)
+ flow.base()
+ .restyle_damage
+ .contains(ServoRestyleDamage::BUBBLE_ISIZES)
}
}
@@ -254,7 +267,9 @@ impl<'a> PreorderFlowTraversal for AssignISizes<'a> {
#[inline]
fn should_process(&self, flow: &mut Flow) -> bool {
- flow.base().restyle_damage.intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW)
+ flow.base()
+ .restyle_damage
+ .intersects(ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW)
}
}
@@ -275,7 +290,7 @@ impl<'a> PostorderFlowTraversal for AssignBSizes<'a> {
// NB: We must return without resetting the restyle bits for these, as we haven't actually
// reflowed anything!
if flow.floats_might_flow_through() {
- return
+ return;
}
flow.assign_block_size(self.layout_context);
@@ -298,13 +313,17 @@ pub struct ComputeStackingRelativePositions<'a> {
impl<'a> PreorderFlowTraversal for ComputeStackingRelativePositions<'a> {
#[inline]
fn should_process_subtree(&self, flow: &mut Flow) -> bool {
- flow.base().restyle_damage.contains(ServoRestyleDamage::REPOSITION)
+ flow.base()
+ .restyle_damage
+ .contains(ServoRestyleDamage::REPOSITION)
}
#[inline]
fn process(&self, flow: &mut Flow) {
flow.compute_stacking_relative_position(self.layout_context);
- flow.mut_base().restyle_damage.remove(ServoRestyleDamage::REPOSITION)
+ flow.mut_base()
+ .restyle_damage
+ .remove(ServoRestyleDamage::REPOSITION)
}
}
@@ -322,7 +341,9 @@ impl<'a> BuildDisplayList<'a> {
self.state.current_clipping_and_scrolling = flow.clipping_and_scrolling();
flow.build_display_list(&mut self.state);
- flow.mut_base().restyle_damage.remove(ServoRestyleDamage::REPAINT);
+ flow.mut_base()
+ .restyle_damage
+ .remove(ServoRestyleDamage::REPAINT);
for kid in flow.mut_base().child_iter_mut() {
self.traverse(kid);
diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs
index 63507127b07..1e3f30f3f7c 100644
--- a/components/layout/wrapper.rs
+++ b/components/layout/wrapper.rs
@@ -57,7 +57,8 @@ impl<T: GetLayoutData> LayoutNodeLayoutData for T {
}
fn flow_debug_id(self) -> usize {
- self.borrow_layout_data().map_or(0, |d| d.flow_construction_result.debug_id())
+ self.borrow_layout_data()
+ .map_or(0, |d| d.flow_construction_result.debug_id())
}
}
@@ -114,12 +115,10 @@ impl<T: ThreadSafeLayoutNode> ThreadSafeLayoutNodeHelpers for T {
if self.get_pseudo_element_type().is_replaced_content() {
let style = self.as_element().unwrap().resolved_style();
- return TextContent::GeneratedContent(
- match style.as_ref().get_counters().content {
- Content::Items(ref value) => value.to_vec(),
- _ => vec![],
- }
- );
+ return TextContent::GeneratedContent(match style.as_ref().get_counters().content {
+ Content::Items(ref value) => value.to_vec(),
+ _ => vec![],
+ });
}
TextContent::Text(self.node_text_content().into_boxed_str())
@@ -141,7 +140,12 @@ impl<T: ThreadSafeLayoutNode> ThreadSafeLayoutNodeHelpers for T {
let damage = {
let data = node.get_raw_data().unwrap();
- if !data.layout_data.borrow().flags.contains(::data::LayoutDataFlags::HAS_BEEN_TRAVERSED) {
+ if !data
+ .layout_data
+ .borrow()
+ .flags
+ .contains(::data::LayoutDataFlags::HAS_BEEN_TRAVERSED)
+ {
// We're reflowing a node that was styled for the first time and
// has never been visited by layout. Return rebuild_and_reflow,
// because that's what the code expects.
@@ -153,7 +157,6 @@ impl<T: ThreadSafeLayoutNode> ThreadSafeLayoutNodeHelpers for T {
damage
}
-
}
pub enum TextContent {
diff --git a/components/layout_thread/dom_wrapper.rs b/components/layout_thread/dom_wrapper.rs
index 7b2892f7c9a..204ff023c97 100644
--- a/components/layout_thread/dom_wrapper.rs
+++ b/components/layout_thread/dom_wrapper.rs
@@ -70,7 +70,7 @@ use style::dom::{TDocument, TElement, TNode, TShadowRoot};
use style::element_state::*;
use style::font_metrics::ServoMetricsProvider;
use style::properties::{ComputedValues, PropertyDeclarationBlock};
-use style::selector_parser::{AttrValue as SelectorAttrValue, NonTSPseudoClass, PseudoClassStringArg};
+use style::selector_parser::{AttrValue as SelectorAttrValue, NonTSPseudoClass, Lang};
use style::selector_parser::{PseudoElement, SelectorImpl, extended_filtering};
use style::shared_lock::{SharedRwLock as StyleSharedRwLock, Locked as StyleLocked};
use style::str::is_whitespace;
@@ -133,17 +133,13 @@ impl<'ln> ServoLayoutNode<'ln> {
}
fn script_type_id(&self) -> NodeTypeId {
- unsafe {
- self.node.type_id_for_layout()
- }
+ unsafe { self.node.type_id_for_layout() }
}
}
impl<'ln> NodeInfo for ServoLayoutNode<'ln> {
fn is_element(&self) -> bool {
- unsafe {
- self.node.is_element_for_layout()
- }
+ unsafe { self.node.is_element_for_layout() }
}
fn is_text_node(&self) -> bool {
@@ -152,7 +148,7 @@ impl<'ln> NodeInfo for ServoLayoutNode<'ln> {
}
#[derive(Clone, Copy, PartialEq)]
-enum Impossible { }
+enum Impossible {}
#[derive(Clone, Copy, PartialEq)]
pub struct ShadowRoot<'lr>(Impossible, PhantomData<&'lr ()>);
@@ -161,18 +157,18 @@ impl<'lr> TShadowRoot for ShadowRoot<'lr> {
type ConcreteNode = ServoLayoutNode<'lr>;
fn as_node(&self) -> Self::ConcreteNode {
- match self.0 { }
+ match self.0 {}
}
fn host(&self) -> ServoLayoutElement<'lr> {
- match self.0 { }
+ match self.0 {}
}
- fn style_data<'a>(&self) -> &'a CascadeData
+ fn style_data<'a>(&self) -> Option<&'a CascadeData>
where
Self: 'a,
{
- match self.0 { }
+ match self.0 {}
}
}
@@ -183,31 +179,41 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
fn parent_node(&self) -> Option<Self> {
unsafe {
- self.node.parent_node_ref().map(|node| self.new_with_this_lifetime(&node))
+ self.node
+ .parent_node_ref()
+ .map(|node| self.new_with_this_lifetime(&node))
}
}
fn first_child(&self) -> Option<Self> {
unsafe {
- self.node.first_child_ref().map(|node| self.new_with_this_lifetime(&node))
+ self.node
+ .first_child_ref()
+ .map(|node| self.new_with_this_lifetime(&node))
}
}
fn last_child(&self) -> Option<Self> {
unsafe {
- self.node.last_child_ref().map(|node| self.new_with_this_lifetime(&node))
+ self.node
+ .last_child_ref()
+ .map(|node| self.new_with_this_lifetime(&node))
}
}
fn prev_sibling(&self) -> Option<Self> {
unsafe {
- self.node.prev_sibling_ref().map(|node| self.new_with_this_lifetime(&node))
+ self.node
+ .prev_sibling_ref()
+ .map(|node| self.new_with_this_lifetime(&node))
}
}
fn next_sibling(&self) -> Option<Self> {
unsafe {
- self.node.next_sibling_ref().map(|node| self.new_with_this_lifetime(&node))
+ self.node
+ .next_sibling_ref()
+ .map(|node| self.new_with_this_lifetime(&node))
}
}
@@ -232,7 +238,9 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
}
fn as_document(&self) -> Option<ServoLayoutDocument<'ln>> {
- self.node.downcast().map(ServoLayoutDocument::from_layout_js)
+ self.node
+ .downcast()
+ .map(ServoLayoutDocument::from_layout_js)
}
fn as_shadow_root(&self) -> Option<ShadowRoot<'ln>> {
@@ -257,8 +265,7 @@ impl<'ln> LayoutNode for ServoLayoutNode<'ln> {
unsafe fn initialize_data(&self) {
if self.get_raw_data().is_none() {
- let ptr: *mut StyleAndLayoutData =
- Box::into_raw(Box::new(StyleAndLayoutData::new()));
+ let ptr: *mut StyleAndLayoutData = Box::into_raw(Box::new(StyleAndLayoutData::new()));
let opaque = OpaqueStyleAndLayoutData {
ptr: NonNull::new_unchecked(ptr as *mut StyleData),
};
@@ -277,9 +284,7 @@ impl<'ln> LayoutNode for ServoLayoutNode<'ln> {
impl<'ln> GetLayoutData for ServoLayoutNode<'ln> {
fn get_style_and_layout_data(&self) -> Option<OpaqueStyleAndLayoutData> {
- unsafe {
- self.get_jsmanaged().get_style_and_layout_data()
- }
+ unsafe { self.get_jsmanaged().get_style_and_layout_data() }
}
}
@@ -334,20 +339,26 @@ impl<'ld> TDocument for ServoLayoutDocument<'ld> {
impl<'ld> ServoLayoutDocument<'ld> {
pub fn root_element(&self) -> Option<ServoLayoutElement<'ld>> {
- self.as_node().dom_children().flat_map(|n| n.as_element()).next()
+ self.as_node()
+ .dom_children()
+ .flat_map(|n| n.as_element())
+ .next()
}
pub fn drain_pending_restyles(&self) -> Vec<(ServoLayoutElement<'ld>, PendingRestyle)> {
- let elements = unsafe { self.document.drain_pending_restyles() };
- elements.into_iter().map(|(el, snapshot)| (ServoLayoutElement::from_layout_js(el), snapshot)).collect()
+ let elements = unsafe { self.document.drain_pending_restyles() };
+ elements
+ .into_iter()
+ .map(|(el, snapshot)| (ServoLayoutElement::from_layout_js(el), snapshot))
+ .collect()
}
pub fn needs_paint_from_layout(&self) {
- unsafe { self.document.needs_paint_from_layout(); }
+ unsafe { self.document.needs_paint_from_layout() }
}
pub fn will_paint(&self) {
- unsafe { self.document.will_paint(); }
+ unsafe { self.document.will_paint() }
}
pub fn style_shared_lock(&self) -> &StyleSharedRwLock {
@@ -407,7 +418,9 @@ impl<'le> TElement for ServoLayoutElement<'le> {
fn style_attribute(&self) -> Option<ArcBorrow<StyleLocked<PropertyDeclarationBlock>>> {
unsafe {
- (*self.element.style_attribute()).as_ref().map(|x| x.borrow_arc())
+ (*self.element.style_attribute())
+ .as_ref()
+ .map(|x| x.borrow_arc())
}
}
@@ -422,13 +435,14 @@ impl<'le> TElement for ServoLayoutElement<'le> {
#[inline]
fn id(&self) -> Option<&Atom> {
- unsafe {
- (*self.element.id_attribute()).as_ref()
- }
+ unsafe { (*self.element.id_attribute()).as_ref() }
}
#[inline(always)]
- fn each_class<F>(&self, mut callback: F) where F: FnMut(&Atom) {
+ fn each_class<F>(&self, mut callback: F)
+ where
+ F: FnMut(&Atom),
+ {
unsafe {
if let Some(ref classes) = self.element.get_classes_for_layout() {
for class in *classes {
@@ -439,7 +453,11 @@ impl<'le> TElement for ServoLayoutElement<'le> {
}
fn has_dirty_descendants(&self) -> bool {
- unsafe { self.as_node().node.get_flag(NodeFlags::HAS_DIRTY_DESCENDANTS) }
+ unsafe {
+ self.as_node()
+ .node
+ .get_flag(NodeFlags::HAS_DIRTY_DESCENDANTS)
+ }
}
fn has_snapshot(&self) -> bool {
@@ -451,26 +469,37 @@ impl<'le> TElement for ServoLayoutElement<'le> {
}
unsafe fn set_handled_snapshot(&self) {
- self.as_node().node.set_flag(NodeFlags::HANDLED_SNAPSHOT, true);
+ self.as_node()
+ .node
+ .set_flag(NodeFlags::HANDLED_SNAPSHOT, true);
}
unsafe fn set_dirty_descendants(&self) {
debug_assert!(self.as_node().is_in_document());
- self.as_node().node.set_flag(NodeFlags::HAS_DIRTY_DESCENDANTS, true)
+ self.as_node()
+ .node
+ .set_flag(NodeFlags::HAS_DIRTY_DESCENDANTS, true)
}
unsafe fn unset_dirty_descendants(&self) {
- self.as_node().node.set_flag(NodeFlags::HAS_DIRTY_DESCENDANTS, false)
+ self.as_node()
+ .node
+ .set_flag(NodeFlags::HAS_DIRTY_DESCENDANTS, false)
}
fn store_children_to_process(&self, n: isize) {
let data = self.get_style_data().unwrap();
- data.parallel.children_to_process.store(n, Ordering::Relaxed);
+ data.parallel
+ .children_to_process
+ .store(n, Ordering::Relaxed);
}
fn did_process_child(&self) -> isize {
let data = self.get_style_data().unwrap();
- let old_value = data.parallel.children_to_process.fetch_sub(1, Ordering::Relaxed);
+ let old_value = data
+ .parallel
+ .children_to_process
+ .fetch_sub(1, Ordering::Relaxed);
debug_assert!(old_value >= 1);
old_value - 1
}
@@ -488,9 +517,8 @@ impl<'le> TElement for ServoLayoutElement<'le> {
fn get_data(&self) -> Option<&AtomicRefCell<ElementData>> {
unsafe {
- self.get_style_and_layout_data().map(|d| {
- &(*(d.ptr.as_ptr() as *mut StyleData)).element_data
- })
+ self.get_style_and_layout_data()
+ .map(|d| &(*(d.ptr.as_ptr() as *mut StyleData)).element_data)
}
}
@@ -531,7 +559,7 @@ impl<'le> TElement for ServoLayoutElement<'le> {
fn match_element_lang(
&self,
override_lang: Option<Option<SelectorAttrValue>>,
- value: &PseudoClassStringArg,
+ value: &Lang,
) -> bool {
// Servo supports :lang() from CSS Selectors 4, which can take a comma-
// separated list of language tags in the pseudo-class, and which
@@ -566,12 +594,12 @@ impl<'le> TElement for ServoLayoutElement<'le> {
&self,
_visited_handling: VisitedHandlingMode,
hints: &mut V,
- )
- where
+ ) where
V: Push<ApplicableDeclarationBlock>,
{
unsafe {
- self.element.synthesize_presentational_hints_for_legacy_attributes(hints);
+ self.element
+ .synthesize_presentational_hints_for_legacy_attributes(hints);
}
}
@@ -608,26 +636,25 @@ impl<'le> ServoLayoutElement<'le> {
#[inline]
fn get_attr_enum(&self, namespace: &Namespace, name: &LocalName) -> Option<&AttrValue> {
- unsafe {
- (*self.element.unsafe_get()).get_attr_for_layout(namespace, name)
- }
+ unsafe { (*self.element.unsafe_get()).get_attr_for_layout(namespace, name) }
}
#[inline]
fn get_attr(&self, namespace: &Namespace, name: &LocalName) -> Option<&str> {
- unsafe {
- (*self.element.unsafe_get()).get_attr_val_for_layout(namespace, name)
- }
+ unsafe { (*self.element.unsafe_get()).get_attr_val_for_layout(namespace, name) }
}
fn get_style_data(&self) -> Option<&StyleData> {
unsafe {
- self.get_style_and_layout_data().map(|d| &*(d.ptr.as_ptr() as *mut StyleData))
+ self.get_style_and_layout_data()
+ .map(|d| &*(d.ptr.as_ptr() as *mut StyleData))
}
}
pub unsafe fn unset_snapshot_flags(&self) {
- self.as_node().node.set_flag(NodeFlags::HAS_SNAPSHOT | NodeFlags::HANDLED_SNAPSHOT, false);
+ self.as_node()
+ .node
+ .set_flag(NodeFlags::HAS_SNAPSHOT | NodeFlags::HANDLED_SNAPSHOT, false);
}
pub unsafe fn set_has_snapshot(&self) {
@@ -662,9 +689,7 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
}
fn parent_element(&self) -> Option<ServoLayoutElement<'le>> {
- unsafe {
- self.element.upcast().parent_node_ref().and_then(as_element)
- }
+ unsafe { self.element.upcast().parent_node_ref().and_then(as_element) }
}
fn parent_node_is_shadow_root(&self) -> bool {
@@ -679,7 +704,7 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
let mut node = self.as_node();
while let Some(sibling) = node.prev_sibling() {
if let Some(element) = sibling.as_element() {
- return Some(element)
+ return Some(element);
}
node = sibling;
}
@@ -690,52 +715,51 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
let mut node = self.as_node();
while let Some(sibling) = node.next_sibling() {
if let Some(element) = sibling.as_element() {
- return Some(element)
+ return Some(element);
}
node = sibling;
}
None
}
- fn attr_matches(&self,
- ns: &NamespaceConstraint<&Namespace>,
- local_name: &LocalName,
- operation: &AttrSelectorOperation<&String>)
- -> bool {
+ fn attr_matches(
+ &self,
+ ns: &NamespaceConstraint<&Namespace>,
+ local_name: &LocalName,
+ operation: &AttrSelectorOperation<&String>,
+ ) -> bool {
match *ns {
- NamespaceConstraint::Specific(ref ns) => {
- self.get_attr_enum(ns, local_name)
- .map_or(false, |value| value.eval_selector(operation))
- }
+ NamespaceConstraint::Specific(ref ns) => self
+ .get_attr_enum(ns, local_name)
+ .map_or(false, |value| value.eval_selector(operation)),
NamespaceConstraint::Any => {
- let values = unsafe {
- (*self.element.unsafe_get()).get_attr_vals_for_layout(local_name)
- };
+ let values =
+ unsafe { (*self.element.unsafe_get()).get_attr_vals_for_layout(local_name) };
values.iter().any(|value| value.eval_selector(operation))
- }
+ },
}
}
fn is_root(&self) -> bool {
match self.as_node().parent_node() {
None => false,
- Some(node) => {
- match node.script_type_id() {
- NodeTypeId::Document(_) => true,
- _ => false
- }
+ Some(node) => match node.script_type_id() {
+ NodeTypeId::Document(_) => true,
+ _ => false,
},
}
}
fn is_empty(&self) -> bool {
- self.as_node().dom_children().all(|node| match node.script_type_id() {
- NodeTypeId::Element(..) => false,
- NodeTypeId::CharacterData(CharacterDataTypeId::Text) => unsafe {
- node.node.downcast().unwrap().data_for_layout().is_empty()
- },
- _ => true
- })
+ self.as_node()
+ .dom_children()
+ .all(|node| match node.script_type_id() {
+ NodeTypeId::Element(..) => false,
+ NodeTypeId::CharacterData(CharacterDataTypeId::Text) => unsafe {
+ node.node.downcast().unwrap().data_for_layout().is_empty()
+ },
+ _ => true,
+ })
}
#[inline]
@@ -767,24 +791,26 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
{
match *pseudo_class {
// https://github.com/servo/servo/issues/8718
- NonTSPseudoClass::Link |
- NonTSPseudoClass::AnyLink => self.is_link(),
+ NonTSPseudoClass::Link | NonTSPseudoClass::AnyLink => self.is_link(),
NonTSPseudoClass::Visited => false,
NonTSPseudoClass::Lang(ref lang) => self.match_element_lang(None, &*lang),
NonTSPseudoClass::ServoNonZeroBorder => unsafe {
- match (*self.element.unsafe_get()).get_attr_for_layout(&ns!(), &local_name!("border")) {
+ match (*self.element.unsafe_get())
+ .get_attr_for_layout(&ns!(), &local_name!("border"))
+ {
None | Some(&AttrValue::UInt(_, 0)) => false,
_ => true,
}
},
- NonTSPseudoClass::ServoCaseSensitiveTypeAttr(ref expected_value) => {
- self.get_attr_enum(&ns!(), &local_name!("type"))
- .map_or(false, |attr| attr == expected_value)
- }
- NonTSPseudoClass::ReadOnly =>
- !self.element.get_state_for_layout().contains(pseudo_class.state_flag()),
+ NonTSPseudoClass::ServoCaseSensitiveTypeAttr(ref expected_value) => self
+ .get_attr_enum(&ns!(), &local_name!("type"))
+ .map_or(false, |attr| attr == expected_value),
+ NonTSPseudoClass::ReadOnly => !self
+ .element
+ .get_state_for_layout()
+ .contains(pseudo_class.state_flag()),
NonTSPseudoClass::Active |
NonTSPseudoClass::Focus |
@@ -796,8 +822,10 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
NonTSPseudoClass::Indeterminate |
NonTSPseudoClass::ReadWrite |
NonTSPseudoClass::PlaceholderShown |
- NonTSPseudoClass::Target =>
- self.element.get_state_for_layout().contains(pseudo_class.state_flag())
+ NonTSPseudoClass::Target => self
+ .element
+ .get_state_for_layout()
+ .contains(pseudo_class.state_flag()),
}
}
@@ -806,10 +834,17 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
unsafe {
match self.as_node().script_type_id() {
// https://html.spec.whatwg.org/multipage/#selector-link
- NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLAnchorElement)) |
- NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLAreaElement)) |
- NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLLinkElement)) =>
- (*self.element.unsafe_get()).get_attr_val_for_layout(&ns!(), &local_name!("href")).is_some(),
+ NodeTypeId::Element(ElementTypeId::HTMLElement(
+ HTMLElementTypeId::HTMLAnchorElement,
+ )) |
+ NodeTypeId::Element(ElementTypeId::HTMLElement(
+ HTMLElementTypeId::HTMLAreaElement,
+ )) |
+ NodeTypeId::Element(ElementTypeId::HTMLElement(
+ HTMLElementTypeId::HTMLLinkElement,
+ )) => (*self.element.unsafe_get())
+ .get_attr_val_for_layout(&ns!(), &local_name!("href"))
+ .is_some(),
_ => false,
}
}
@@ -826,16 +861,11 @@ impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
#[inline]
fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool {
- unsafe {
- self.element.has_class_for_layout(name, case_sensitivity)
- }
+ unsafe { self.element.has_class_for_layout(name, case_sensitivity) }
}
fn is_html_slot_element(&self) -> bool {
- unsafe {
- self.element.is_html_element() &&
- self.local_name() == &local_name!("slot")
- }
+ unsafe { self.element.is_html_element() && self.local_name() == &local_name!("slot") }
}
fn is_html_element_in_html_document(&self) -> bool {
@@ -868,18 +898,23 @@ impl<'a> PartialEq for ServoThreadSafeLayoutNode<'a> {
impl<'ln> DangerousThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
unsafe fn dangerous_first_child(&self) -> Option<Self> {
- self.get_jsmanaged().first_child_ref()
- .map(|node| self.new_with_this_lifetime(&node))
+ self.get_jsmanaged()
+ .first_child_ref()
+ .map(|node| self.new_with_this_lifetime(&node))
}
unsafe fn dangerous_next_sibling(&self) -> Option<Self> {
- self.get_jsmanaged().next_sibling_ref()
- .map(|node| self.new_with_this_lifetime(&node))
+ self.get_jsmanaged()
+ .next_sibling_ref()
+ .map(|node| self.new_with_this_lifetime(&node))
}
}
impl<'ln> ServoThreadSafeLayoutNode<'ln> {
/// Creates a new layout node with the same lifetime as this layout node.
- pub unsafe fn new_with_this_lifetime(&self, node: &LayoutDom<Node>) -> ServoThreadSafeLayoutNode<'ln> {
+ pub unsafe fn new_with_this_lifetime(
+ &self,
+ node: &LayoutDom<Node>,
+ ) -> ServoThreadSafeLayoutNode<'ln> {
ServoThreadSafeLayoutNode {
node: self.node.new_with_this_lifetime(node),
pseudo: PseudoElementType::Normal,
@@ -944,10 +979,12 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
}
fn as_element(&self) -> Option<ServoThreadSafeLayoutElement<'ln>> {
- self.node.as_element().map(|el| ServoThreadSafeLayoutElement {
- element: el,
- pseudo: self.pseudo,
- })
+ self.node
+ .as_element()
+ .map(|el| ServoThreadSafeLayoutElement {
+ element: el,
+ pseudo: self.pseudo,
+ })
}
fn get_style_and_layout_data(&self) -> Option<OpaqueStyleAndLayoutData> {
@@ -958,11 +995,11 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
unsafe {
let text: LayoutDom<Text> = match self.get_jsmanaged().downcast() {
Some(text) => text,
- None => return false
+ None => return false,
};
if !is_whitespace(text.upcast().data_for_layout()) {
- return false
+ return false;
}
// NB: See the rules for `white-space` here:
@@ -971,7 +1008,11 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
//
// If you implement other values for this property, you will almost certainly
// want to update this check.
- !self.style(context).get_inherited_text().white_space.preserve_newlines()
+ !self
+ .style(context)
+ .get_inherited_text()
+ .white_space
+ .preserve_newlines()
}
}
@@ -988,8 +1029,10 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
let this = unsafe { self.get_jsmanaged() };
this.selection().map(|range| {
- Range::new(ByteIndex(range.start as isize),
- ByteIndex(range.len() as isize))
+ Range::new(
+ ByteIndex(range.start as isize),
+ ByteIndex(range.len() as isize),
+ )
})
}
@@ -1022,13 +1065,19 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
fn get_colspan(&self) -> u32 {
unsafe {
- self.get_jsmanaged().downcast::<Element>().unwrap().get_colspan()
+ self.get_jsmanaged()
+ .downcast::<Element>()
+ .unwrap()
+ .get_colspan()
}
}
fn get_rowspan(&self) -> u32 {
unsafe {
- self.get_jsmanaged().downcast::<Element>().unwrap().get_rowspan()
+ self.get_jsmanaged()
+ .downcast::<Element>()
+ .unwrap()
+ .get_rowspan()
}
}
}
@@ -1039,16 +1088,17 @@ pub struct ThreadSafeLayoutNodeChildrenIterator<ConcreteNode: ThreadSafeLayoutNo
}
impl<ConcreteNode> ThreadSafeLayoutNodeChildrenIterator<ConcreteNode>
- where ConcreteNode: DangerousThreadSafeLayoutNode {
+where
+ ConcreteNode: DangerousThreadSafeLayoutNode,
+{
pub fn new(parent: ConcreteNode) -> Self {
let first_child: Option<ConcreteNode> = match parent.get_pseudo_element_type() {
- PseudoElementType::Normal => {
- parent.get_before_pseudo().or_else(|| parent.get_details_summary_pseudo()).or_else(|| {
- unsafe { parent.dangerous_first_child() }
- })
- },
- PseudoElementType::DetailsContent | PseudoElementType::DetailsSummary => {
- unsafe { parent.dangerous_first_child() }
+ PseudoElementType::Normal => parent
+ .get_before_pseudo()
+ .or_else(|| parent.get_details_summary_pseudo())
+ .or_else(|| unsafe { parent.dangerous_first_child() }),
+ PseudoElementType::DetailsContent | PseudoElementType::DetailsSummary => unsafe {
+ parent.dangerous_first_child()
},
_ => None,
};
@@ -1060,7 +1110,9 @@ impl<ConcreteNode> ThreadSafeLayoutNodeChildrenIterator<ConcreteNode>
}
impl<ConcreteNode> Iterator for ThreadSafeLayoutNodeChildrenIterator<ConcreteNode>
- where ConcreteNode: DangerousThreadSafeLayoutNode {
+where
+ ConcreteNode: DangerousThreadSafeLayoutNode,
+{
type Item = ConcreteNode;
fn next(&mut self) -> Option<ConcreteNode> {
use ::selectors::Element;
@@ -1073,7 +1125,8 @@ impl<ConcreteNode> Iterator for ThreadSafeLayoutNodeChildrenIterator<ConcreteNod
let next_node = if let Some(ref node) = current_node {
if let Some(element) = node.as_element() {
if element.local_name() == &local_name!("summary") &&
- element.namespace() == &ns!(html) {
+ element.namespace() == &ns!(html)
+ {
self.current_node = None;
return Some(node.clone());
}
@@ -1081,18 +1134,19 @@ impl<ConcreteNode> Iterator for ThreadSafeLayoutNodeChildrenIterator<ConcreteNod
unsafe { node.dangerous_next_sibling() }
} else {
self.current_node = None;
- return None
+ return None;
};
current_node = next_node;
}
- }
+ },
PseudoElementType::DetailsContent => {
let node = self.current_node.clone();
let node = node.and_then(|node| {
if node.is_element() &&
- node.as_element().unwrap().local_name() == &local_name!("summary") &&
- node.as_element().unwrap().namespace() == &ns!(html) {
+ node.as_element().unwrap().local_name() == &local_name!("summary") &&
+ node.as_element().unwrap().namespace() == &ns!(html)
+ {
unsafe { node.dangerous_next_sibling() }
} else {
Some(node)
@@ -1100,28 +1154,28 @@ impl<ConcreteNode> Iterator for ThreadSafeLayoutNodeChildrenIterator<ConcreteNod
});
self.current_node = node.and_then(|node| unsafe { node.dangerous_next_sibling() });
node
- }
+ },
PseudoElementType::Normal => {
let node = self.current_node.clone();
if let Some(ref node) = node {
self.current_node = match node.get_pseudo_element_type() {
- PseudoElementType::Before => {
- self.parent_node.get_details_summary_pseudo()
- .or_else(|| unsafe { self.parent_node.dangerous_first_child() })
- .or_else(|| self.parent_node.get_after_pseudo())
+ PseudoElementType::Before => self
+ .parent_node
+ .get_details_summary_pseudo()
+ .or_else(|| unsafe { self.parent_node.dangerous_first_child() })
+ .or_else(|| self.parent_node.get_after_pseudo()),
+ PseudoElementType::Normal => unsafe { node.dangerous_next_sibling() }
+ .or_else(|| self.parent_node.get_after_pseudo()),
+ PseudoElementType::DetailsSummary => {
+ self.parent_node.get_details_content_pseudo()
},
- PseudoElementType::Normal => {
- unsafe { node.dangerous_next_sibling() }.or_else(|| self.parent_node.get_after_pseudo())
- },
- PseudoElementType::DetailsSummary => self.parent_node.get_details_content_pseudo(),
PseudoElementType::DetailsContent => self.parent_node.get_after_pseudo(),
PseudoElementType::After => None,
};
}
node
- }
-
+ },
}
}
}
@@ -1176,7 +1230,8 @@ impl<'le> ThreadSafeLayoutElement for ServoThreadSafeLayoutElement<'le> {
}
fn style_data(&self) -> AtomicRef<ElementData> {
- self.element.get_data()
+ self.element
+ .get_data()
.expect("Unstyled layout node?")
.borrow()
}
@@ -1201,7 +1256,6 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
::selectors::OpaqueElement::new(self.as_node().opaque().0 as *const ())
}
-
fn parent_element(&self) -> Option<Self> {
warn!("ServoThreadSafeLayoutElement::parent_element called");
None
@@ -1249,27 +1303,27 @@ impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
fn match_pseudo_element(
&self,
_pseudo: &PseudoElement,
- _context: &mut MatchingContext<Self::Impl>
+ _context: &mut MatchingContext<Self::Impl>,
) -> bool {
false
}
- fn attr_matches(&self,
- ns: &NamespaceConstraint<&Namespace>,
- local_name: &LocalName,
- operation: &AttrSelectorOperation<&String>)
- -> bool {
+ fn attr_matches(
+ &self,
+ ns: &NamespaceConstraint<&Namespace>,
+ local_name: &LocalName,
+ operation: &AttrSelectorOperation<&String>,
+ ) -> bool {
match *ns {
- NamespaceConstraint::Specific(ref ns) => {
- self.get_attr_enum(ns, local_name)
- .map_or(false, |value| value.eval_selector(operation))
- }
+ NamespaceConstraint::Specific(ref ns) => self
+ .get_attr_enum(ns, local_name)
+ .map_or(false, |value| value.eval_selector(operation)),
NamespaceConstraint::Any => {
let values = unsafe {
(*self.element.element.unsafe_get()).get_attr_vals_for_layout(local_name)
};
values.iter().any(|v| v.eval_selector(operation))
- }
+ },
}
}
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index 1d5676b4b54..aa520215cd2 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -243,8 +243,7 @@ pub struct LayoutThread {
/// All the other elements of this struct are read-only.
rw_data: Arc<Mutex<LayoutThreadData>>,
- webrender_image_cache: Arc<RwLock<FnvHashMap<(ServoUrl, UsePlaceholder),
- WebRenderImageInfo>>>,
+ webrender_image_cache: Arc<RwLock<FnvHashMap<(ServoUrl, UsePlaceholder), WebRenderImageInfo>>>,
/// The executors for paint worklets.
registered_painters: RegisteredPaintersImpl,
@@ -274,57 +273,69 @@ impl LayoutThreadFactory for LayoutThread {
type Message = Msg;
/// Spawns a new layout thread.
- fn create(id: PipelineId,
- top_level_browsing_context_id: TopLevelBrowsingContextId,
- url: ServoUrl,
- is_iframe: bool,
- chan: (Sender<Msg>, Receiver<Msg>),
- pipeline_port: IpcReceiver<LayoutControlMsg>,
- constellation_chan: IpcSender<ConstellationMsg>,
- script_chan: IpcSender<ConstellationControlMsg>,
- image_cache: Arc<ImageCache>,
- font_cache_thread: FontCacheThread,
- time_profiler_chan: time::ProfilerChan,
- mem_profiler_chan: mem::ProfilerChan,
- content_process_shutdown_chan: Option<IpcSender<()>>,
- webrender_api_sender: webrender_api::RenderApiSender,
- webrender_document: webrender_api::DocumentId,
- layout_threads: usize,
- paint_time_metrics: PaintTimeMetrics) {
- thread::Builder::new().name(format!("LayoutThread {:?}", id)).spawn(move || {
- thread_state::initialize(ThreadState::LAYOUT);
-
- // In order to get accurate crash reports, we install the top-level bc id.
- TopLevelBrowsingContextId::install(top_level_browsing_context_id);
-
- { // Ensures layout thread is destroyed before we send shutdown message
- let sender = chan.0;
- let layout = LayoutThread::new(id,
- top_level_browsing_context_id,
- url,
- is_iframe,
- chan.1,
- pipeline_port,
- constellation_chan,
- script_chan,
- image_cache.clone(),
- font_cache_thread,
- time_profiler_chan,
- mem_profiler_chan.clone(),
- webrender_api_sender,
- webrender_document,
- layout_threads,
- paint_time_metrics);
-
- let reporter_name = format!("layout-reporter-{}", id);
- mem_profiler_chan.run_with_memory_reporting(|| {
- layout.start();
- }, reporter_name, sender, Msg::CollectReports);
- }
- if let Some(content_process_shutdown_chan) = content_process_shutdown_chan {
- let _ = content_process_shutdown_chan.send(());
- }
- }).expect("Thread spawning failed");
+ fn create(
+ id: PipelineId,
+ top_level_browsing_context_id: TopLevelBrowsingContextId,
+ url: ServoUrl,
+ is_iframe: bool,
+ chan: (Sender<Msg>, Receiver<Msg>),
+ pipeline_port: IpcReceiver<LayoutControlMsg>,
+ constellation_chan: IpcSender<ConstellationMsg>,
+ script_chan: IpcSender<ConstellationControlMsg>,
+ image_cache: Arc<ImageCache>,
+ font_cache_thread: FontCacheThread,
+ time_profiler_chan: time::ProfilerChan,
+ mem_profiler_chan: mem::ProfilerChan,
+ content_process_shutdown_chan: Option<IpcSender<()>>,
+ webrender_api_sender: webrender_api::RenderApiSender,
+ webrender_document: webrender_api::DocumentId,
+ layout_threads: usize,
+ paint_time_metrics: PaintTimeMetrics,
+ ) {
+ thread::Builder::new()
+ .name(format!("LayoutThread {:?}", id))
+ .spawn(move || {
+ thread_state::initialize(ThreadState::LAYOUT);
+
+ // In order to get accurate crash reports, we install the top-level bc id.
+ TopLevelBrowsingContextId::install(top_level_browsing_context_id);
+
+ {
+ // Ensures layout thread is destroyed before we send shutdown message
+ let sender = chan.0;
+ let layout = LayoutThread::new(
+ id,
+ top_level_browsing_context_id,
+ url,
+ is_iframe,
+ chan.1,
+ pipeline_port,
+ constellation_chan,
+ script_chan,
+ image_cache.clone(),
+ font_cache_thread,
+ time_profiler_chan,
+ mem_profiler_chan.clone(),
+ webrender_api_sender,
+ webrender_document,
+ layout_threads,
+ paint_time_metrics,
+ );
+
+ let reporter_name = format!("layout-reporter-{}", id);
+ mem_profiler_chan.run_with_memory_reporting(
+ || {
+ layout.start();
+ },
+ reporter_name,
+ sender,
+ Msg::CollectReports,
+ );
+ }
+ if let Some(content_process_shutdown_chan) = content_process_shutdown_chan {
+ let _ = content_process_shutdown_chan.send(());
+ }
+ }).expect("Thread spawning failed");
}
}
@@ -357,11 +368,10 @@ impl ScriptReflowResult {
impl Drop for ScriptReflowResult {
fn drop(&mut self) {
- self.script_reflow.script_join_chan.send(
- self.result
- .borrow_mut()
- .take()
- .unwrap()).unwrap();
+ self.script_reflow
+ .script_join_chan
+ .send(self.result.borrow_mut().take().unwrap())
+ .unwrap();
}
}
@@ -415,20 +425,24 @@ impl<'a, 'b: 'a> RwData<'a, 'b> {
}
}
-fn add_font_face_rules(stylesheet: &Stylesheet,
- guard: &SharedRwLockReadGuard,
- device: &Device,
- font_cache_thread: &FontCacheThread,
- font_cache_sender: &IpcSender<()>,
- outstanding_web_fonts_counter: &Arc<AtomicUsize>) {
+fn add_font_face_rules(
+ stylesheet: &Stylesheet,
+ guard: &SharedRwLockReadGuard,
+ device: &Device,
+ font_cache_thread: &FontCacheThread,
+ font_cache_sender: &IpcSender<()>,
+ outstanding_web_fonts_counter: &Arc<AtomicUsize>,
+) {
if opts::get().load_webfonts_synchronously {
let (sender, receiver) = ipc::channel().unwrap();
stylesheet.effective_font_face_rules(&device, guard, |rule| {
if let Some(font_face) = rule.font_face() {
let effective_sources = font_face.effective_sources();
- font_cache_thread.add_web_font(font_face.family().clone(),
- effective_sources,
- sender.clone());
+ font_cache_thread.add_web_font(
+ font_face.family().clone(),
+ effective_sources,
+ sender.clone(),
+ );
receiver.recv().unwrap();
}
})
@@ -437,9 +451,11 @@ fn add_font_face_rules(stylesheet: &Stylesheet,
if let Some(font_face) = rule.font_face() {
let effective_sources = font_face.effective_sources();
outstanding_web_fonts_counter.fetch_add(1, Ordering::SeqCst);
- font_cache_thread.add_web_font(font_face.family().clone(),
- effective_sources,
- (*font_cache_sender).clone());
+ font_cache_thread.add_web_font(
+ font_face.family().clone(),
+ effective_sources,
+ (*font_cache_sender).clone(),
+ );
}
})
}
@@ -447,34 +463,36 @@ fn add_font_face_rules(stylesheet: &Stylesheet,
impl LayoutThread {
/// Creates a new `LayoutThread` structure.
- fn new(id: PipelineId,
- top_level_browsing_context_id: TopLevelBrowsingContextId,
- url: ServoUrl,
- is_iframe: bool,
- port: Receiver<Msg>,
- pipeline_port: IpcReceiver<LayoutControlMsg>,
- constellation_chan: IpcSender<ConstellationMsg>,
- script_chan: IpcSender<ConstellationControlMsg>,
- image_cache: Arc<ImageCache>,
- font_cache_thread: FontCacheThread,
- time_profiler_chan: time::ProfilerChan,
- mem_profiler_chan: mem::ProfilerChan,
- webrender_api_sender: webrender_api::RenderApiSender,
- webrender_document: webrender_api::DocumentId,
- layout_threads: usize,
- paint_time_metrics: PaintTimeMetrics)
- -> LayoutThread {
+ fn new(
+ id: PipelineId,
+ top_level_browsing_context_id: TopLevelBrowsingContextId,
+ url: ServoUrl,
+ is_iframe: bool,
+ port: Receiver<Msg>,
+ pipeline_port: IpcReceiver<LayoutControlMsg>,
+ constellation_chan: IpcSender<ConstellationMsg>,
+ script_chan: IpcSender<ConstellationControlMsg>,
+ image_cache: Arc<ImageCache>,
+ font_cache_thread: FontCacheThread,
+ time_profiler_chan: time::ProfilerChan,
+ mem_profiler_chan: mem::ProfilerChan,
+ webrender_api_sender: webrender_api::RenderApiSender,
+ webrender_document: webrender_api::DocumentId,
+ layout_threads: usize,
+ paint_time_metrics: PaintTimeMetrics,
+ ) -> LayoutThread {
// The device pixel ratio is incorrect (it does not have the hidpi value),
// but it will be set correctly when the initial reflow takes place.
let device = Device::new(
MediaType::screen(),
opts::get().initial_window_size.to_f32() * TypedScale::new(1.0),
- TypedScale::new(opts::get().device_pixels_per_px.unwrap_or(1.0)));
+ TypedScale::new(opts::get().device_pixels_per_px.unwrap_or(1.0)),
+ );
- let workers =
- rayon::ThreadPoolBuilder::new().num_threads(layout_threads)
- .start_handler(|_| thread_state::initialize_layout_worker_thread())
- .build();
+ let workers = rayon::ThreadPoolBuilder::new()
+ .num_threads(layout_threads)
+ .start_handler(|_| thread_state::initialize_layout_worker_thread())
+ .build();
let parallel_traversal = if layout_threads > 1 {
Some(workers.expect("ThreadPool creation failed"))
} else {
@@ -493,7 +511,6 @@ impl LayoutThread {
let font_cache_receiver =
ROUTER.route_ipc_receiver_to_new_mpsc_receiver(ipc_font_cache_receiver);
-
LayoutThread {
id: id,
top_level_browsing_context_id: top_level_browsing_context_id,
@@ -526,33 +543,33 @@ impl LayoutThread {
webrender_api: webrender_api_sender.create_api(),
webrender_document,
stylist: Stylist::new(device, QuirksMode::NoQuirks),
- rw_data: Arc::new(Mutex::new(
- LayoutThreadData {
- constellation_chan: constellation_chan,
- display_list: None,
- indexable_text: IndexableText::default(),
- content_box_response: None,
- content_boxes_response: Vec::new(),
- client_rect_response: Rect::zero(),
- scroll_id_response: None,
- scroll_area_response: Rect::zero(),
- resolved_style_response: String::new(),
- offset_parent_response: OffsetParentResponse::empty(),
- style_response: StyleResponse(None),
- scroll_offsets: HashMap::new(),
- text_index_response: TextIndexResponse(None),
- nodes_from_point_response: vec![],
- element_inner_text_response: String::new(),
- })),
- webrender_image_cache:
- Arc::new(RwLock::new(FnvHashMap::default())),
- timer:
- if PREFS.get("layout.animations.test.enabled")
- .as_boolean().unwrap_or(false) {
- Timer::test_mode()
- } else {
- Timer::new()
- },
+ rw_data: Arc::new(Mutex::new(LayoutThreadData {
+ constellation_chan: constellation_chan,
+ display_list: None,
+ indexable_text: IndexableText::default(),
+ content_box_response: None,
+ content_boxes_response: Vec::new(),
+ client_rect_response: Rect::zero(),
+ scroll_id_response: None,
+ scroll_area_response: Rect::zero(),
+ resolved_style_response: String::new(),
+ offset_parent_response: OffsetParentResponse::empty(),
+ style_response: StyleResponse(None),
+ scroll_offsets: HashMap::new(),
+ text_index_response: TextIndexResponse(None),
+ nodes_from_point_response: vec![],
+ element_inner_text_response: String::new(),
+ })),
+ webrender_image_cache: Arc::new(RwLock::new(FnvHashMap::default())),
+ timer: if PREFS
+ .get("layout.animations.test.enabled")
+ .as_boolean()
+ .unwrap_or(false)
+ {
+ Timer::test_mode()
+ } else {
+ Timer::new()
+ },
layout_threads: layout_threads,
paint_time_metrics: paint_time_metrics,
layout_query_waiting_time: Histogram::new(),
@@ -573,11 +590,12 @@ impl LayoutThread {
}
// Create a layout context for use in building display lists, hit testing, &c.
- fn build_layout_context<'a>(&'a self,
- guards: StylesheetGuards<'a>,
- script_initiated_layout: bool,
- snapshot_map: &'a SnapshotMap)
- -> LayoutContext<'a> {
+ fn build_layout_context<'a>(
+ &'a self,
+ guards: StylesheetGuards<'a>,
+ script_initiated_layout: bool,
+ snapshot_map: &'a SnapshotMap,
+ ) -> LayoutContext<'a> {
let thread_local_style_context_creation_data =
ThreadLocalStyleContextCreationInfo::new(self.new_animations_sender.clone());
@@ -599,8 +617,16 @@ impl LayoutThread {
image_cache: self.image_cache.clone(),
font_cache_thread: Mutex::new(self.font_cache_thread.clone()),
webrender_image_cache: self.webrender_image_cache.clone(),
- pending_images: if script_initiated_layout { Some(Mutex::new(vec![])) } else { None },
- newly_transitioning_nodes: if script_initiated_layout { Some(Mutex::new(vec![])) } else { None },
+ pending_images: if script_initiated_layout {
+ Some(Mutex::new(vec![]))
+ } else {
+ None
+ },
+ newly_transitioning_nodes: if script_initiated_layout {
+ Some(Mutex::new(vec![]))
+ } else {
+ None
+ },
registered_painters: &self.registered_painters,
}
}
@@ -632,20 +658,19 @@ impl LayoutThread {
};
match request {
- Request::FromPipeline(LayoutControlMsg::SetScrollStates(new_scroll_states)) => {
- self.handle_request_helper(Msg::SetScrollStates(new_scroll_states),
- possibly_locked_rw_data)
- },
+ Request::FromPipeline(LayoutControlMsg::SetScrollStates(new_scroll_states)) => self
+ .handle_request_helper(
+ Msg::SetScrollStates(new_scroll_states),
+ possibly_locked_rw_data,
+ ),
Request::FromPipeline(LayoutControlMsg::TickAnimations) => {
self.handle_request_helper(Msg::TickAnimations, possibly_locked_rw_data)
},
Request::FromPipeline(LayoutControlMsg::GetCurrentEpoch(sender)) => {
self.handle_request_helper(Msg::GetCurrentEpoch(sender), possibly_locked_rw_data)
},
- Request::FromPipeline(LayoutControlMsg::GetWebFontLoadState(sender)) => {
- self.handle_request_helper(Msg::GetWebFontLoadState(sender),
- possibly_locked_rw_data)
- },
+ Request::FromPipeline(LayoutControlMsg::GetWebFontLoadState(sender)) => self
+ .handle_request_helper(Msg::GetWebFontLoadState(sender), possibly_locked_rw_data),
Request::FromPipeline(LayoutControlMsg::ExitNow) => {
self.handle_request_helper(Msg::ExitNow, possibly_locked_rw_data)
},
@@ -653,14 +678,14 @@ impl LayoutThread {
self.paint_time_metrics.maybe_set_metric(epoch, paint_time);
true
},
- Request::FromScript(msg) => {
- self.handle_request_helper(msg, possibly_locked_rw_data)
- },
+ Request::FromScript(msg) => self.handle_request_helper(msg, possibly_locked_rw_data),
Request::FromFontCache => {
let _rw_data = possibly_locked_rw_data.lock();
self.outstanding_web_fonts.fetch_sub(1, Ordering::SeqCst);
font_context::invalidate_font_caches();
- self.script_chan.send(ConstellationControlMsg::WebFontLoaded(self.id)).unwrap();
+ self.script_chan
+ .send(ConstellationControlMsg::WebFontLoaded(self.id))
+ .unwrap();
true
},
}
@@ -678,63 +703,59 @@ impl LayoutThread {
self.handle_add_stylesheet(&stylesheet, &guard);
match before_stylesheet {
- Some(insertion_point) => {
- self.stylist.insert_stylesheet_before(
- DocumentStyleSheet(stylesheet.clone()),
- DocumentStyleSheet(insertion_point),
- &guard,
- )
- }
- None => {
- self.stylist.append_stylesheet(
- DocumentStyleSheet(stylesheet.clone()),
- &guard,
- )
- }
+ Some(insertion_point) => self.stylist.insert_stylesheet_before(
+ DocumentStyleSheet(stylesheet.clone()),
+ DocumentStyleSheet(insertion_point),
+ &guard,
+ ),
+ None => self
+ .stylist
+ .append_stylesheet(DocumentStyleSheet(stylesheet.clone()), &guard),
}
- }
+ },
Msg::RemoveStylesheet(stylesheet) => {
let guard = stylesheet.shared_lock.read();
- self.stylist.remove_stylesheet(
- DocumentStyleSheet(stylesheet.clone()),
- &guard,
- );
- }
+ self.stylist
+ .remove_stylesheet(DocumentStyleSheet(stylesheet.clone()), &guard);
+ },
Msg::SetQuirksMode(mode) => self.handle_set_quirks_mode(mode),
Msg::GetRPC(response_chan) => {
- response_chan.send(
- Box::new(LayoutRPCImpl(self.rw_data.clone())) as Box<LayoutRPC + Send>
- ).unwrap();
+ response_chan
+ .send(Box::new(LayoutRPCImpl(self.rw_data.clone())) as Box<LayoutRPC + Send>)
+ .unwrap();
},
Msg::Reflow(data) => {
let mut data = ScriptReflowResult::new(data);
- profile(time::ProfilerCategory::LayoutPerform,
- self.profiler_metadata(),
- self.time_profiler_chan.clone(),
- || self.handle_reflow(&mut data, possibly_locked_rw_data));
+ profile(
+ time::ProfilerCategory::LayoutPerform,
+ self.profiler_metadata(),
+ self.time_profiler_chan.clone(),
+ || self.handle_reflow(&mut data, possibly_locked_rw_data),
+ );
},
Msg::TickAnimations => self.tick_all_animations(possibly_locked_rw_data),
Msg::SetScrollStates(new_scroll_states) => {
self.set_scroll_states(new_scroll_states, possibly_locked_rw_data);
- }
+ },
Msg::UpdateScrollStateFromScript(state) => {
let mut rw_data = possibly_locked_rw_data.lock();
- rw_data.scroll_offsets.insert(state.scroll_id, state.scroll_offset);
+ rw_data
+ .scroll_offsets
+ .insert(state.scroll_id, state.scroll_offset);
let point = Point2D::new(-state.scroll_offset.x, -state.scroll_offset.y);
let mut txn = webrender_api::Transaction::new();
txn.scroll_node_with_id(
webrender_api::LayoutPoint::from_untyped(&point),
state.scroll_id,
- webrender_api::ScrollClamping::ToContentBounds
+ webrender_api::ScrollClamping::ToContentBounds,
);
- self.webrender_api.send_transaction(self.webrender_document, txn);
- }
- Msg::ReapStyleAndLayoutData(dead_data) => {
- unsafe {
- drop_style_and_layout_data(dead_data)
- }
- }
+ self.webrender_api
+ .send_transaction(self.webrender_document, txn);
+ },
+ Msg::ReapStyleAndLayoutData(dead_data) => unsafe {
+ drop_style_and_layout_data(dead_data)
+ },
Msg::CollectReports(reports_chan) => {
self.collect_reports(reports_chan, possibly_locked_rw_data);
},
@@ -744,26 +765,24 @@ impl LayoutThread {
},
Msg::AdvanceClockMs(how_many, do_tick) => {
self.handle_advance_clock_ms(how_many, possibly_locked_rw_data, do_tick);
- }
+ },
Msg::GetWebFontLoadState(sender) => {
let _rw_data = possibly_locked_rw_data.lock();
let outstanding_web_fonts = self.outstanding_web_fonts.load(Ordering::SeqCst);
sender.send(outstanding_web_fonts != 0).unwrap();
},
- Msg::CreateLayoutThread(info) => {
- self.create_layout_thread(info)
- }
+ Msg::CreateLayoutThread(info) => self.create_layout_thread(info),
Msg::SetFinalUrl(final_url) => {
self.url = final_url;
},
Msg::RegisterPaint(name, mut properties, painter) => {
debug!("Registering the painter");
- let properties = properties.drain(..)
+ let properties = properties
+ .drain(..)
.filter_map(|name| {
let id = PropertyId::parse_enabled_for_all_content(&*name).ok()?;
Some((name.clone(), id))
- })
- .filter(|&(_, ref id)| !id.is_shorthand())
+ }).filter(|&(_, ref id)| !id.is_shorthand())
.collect();
let registered_painter = RegisteredPainterImpl {
name: name.clone(),
@@ -774,12 +793,12 @@ impl LayoutThread {
},
Msg::PrepareToExit(response_chan) => {
self.prepare_to_exit(response_chan);
- return false
+ return false;
},
Msg::ExitNow => {
debug!("layout: ExitNow received");
self.exit_now();
- return false
+ return false;
},
Msg::SetNavigationStart(time) => {
self.paint_time_metrics.set_navigation_start(time);
@@ -789,9 +808,11 @@ impl LayoutThread {
true
}
- fn collect_reports<'a, 'b>(&self,
- reports_chan: ReportsChan,
- possibly_locked_rw_data: &mut RwData<'a, 'b>) {
+ fn collect_reports<'a, 'b>(
+ &self,
+ reports_chan: ReportsChan,
+ possibly_locked_rw_data: &mut RwData<'a, 'b>,
+ ) {
let mut reports = vec![];
// Servo uses vanilla jemalloc, which doesn't have a
// malloc_enclosing_size_of function.
@@ -824,23 +845,25 @@ impl LayoutThread {
}
fn create_layout_thread(&self, info: NewLayoutThreadInfo) {
- LayoutThread::create(info.id,
- self.top_level_browsing_context_id,
- info.url.clone(),
- info.is_parent,
- info.layout_pair,
- info.pipeline_port,
- info.constellation_chan,
- info.script_chan.clone(),
- info.image_cache.clone(),
- self.font_cache_thread.clone(),
- self.time_profiler_chan.clone(),
- self.mem_profiler_chan.clone(),
- info.content_process_shutdown_chan,
- self.webrender_api.clone_sender(),
- self.webrender_document,
- info.layout_threads,
- info.paint_time_metrics);
+ LayoutThread::create(
+ info.id,
+ self.top_level_browsing_context_id,
+ info.url.clone(),
+ info.is_parent,
+ info.layout_pair,
+ info.pipeline_port,
+ info.constellation_chan,
+ info.script_chan.clone(),
+ info.image_cache.clone(),
+ self.font_cache_thread.clone(),
+ self.time_profiler_chan.clone(),
+ self.mem_profiler_chan.clone(),
+ info.content_process_shutdown_chan,
+ self.webrender_api.clone_sender(),
+ self.webrender_document,
+ info.layout_threads,
+ info.paint_time_metrics,
+ );
}
/// Enters a quiescent state in which no new messages will be processed until an `ExitNow` is
@@ -849,22 +872,18 @@ impl LayoutThread {
response_chan.send(()).unwrap();
loop {
match self.port.recv().unwrap() {
- Msg::ReapStyleAndLayoutData(dead_data) => {
- unsafe {
- drop_style_and_layout_data(dead_data)
- }
- }
+ Msg::ReapStyleAndLayoutData(dead_data) => unsafe {
+ drop_style_and_layout_data(dead_data)
+ },
Msg::ExitNow => {
debug!("layout thread is exiting...");
self.exit_now();
- break
- }
+ break;
+ },
Msg::CollectReports(_) => {
// Just ignore these messages at this point.
- }
- _ => {
- panic!("layout: unexpected message received after `PrepareToExitMsg`")
- }
+ },
+ _ => panic!("layout: unexpected message received after `PrepareToExitMsg`"),
}
}
}
@@ -879,39 +898,38 @@ impl LayoutThread {
let waiting_time_max = self.layout_query_waiting_time.maximum().unwrap_or(0);
let waiting_time_mean = self.layout_query_waiting_time.mean().unwrap_or(0);
let waiting_time_stddev = self.layout_query_waiting_time.stddev().unwrap_or(0);
- debug!("layout: query waiting time: min: {}, max: {}, mean: {}, standard_deviation: {}",
- waiting_time_min,
- waiting_time_max,
- waiting_time_mean,
- waiting_time_stddev);
+ debug!(
+ "layout: query waiting time: min: {}, max: {}, mean: {}, standard_deviation: {}",
+ waiting_time_min, waiting_time_max, waiting_time_mean, waiting_time_stddev
+ );
self.root_flow.borrow_mut().take();
// Drop the rayon threadpool if present.
let _ = self.parallel_traversal.take();
}
- fn handle_add_stylesheet(
- &self,
- stylesheet: &Stylesheet,
- guard: &SharedRwLockReadGuard,
- ) {
+ fn handle_add_stylesheet(&self, stylesheet: &Stylesheet, guard: &SharedRwLockReadGuard) {
// Find all font-face rules and notify the font cache of them.
// GWTODO: Need to handle unloading web fonts.
if stylesheet.is_effective_for_device(self.stylist.device(), &guard) {
- add_font_face_rules(&*stylesheet,
- &guard,
- self.stylist.device(),
- &self.font_cache_thread,
- &self.font_cache_sender,
- &self.outstanding_web_fonts);
+ add_font_face_rules(
+ &*stylesheet,
+ &guard,
+ self.stylist.device(),
+ &self.font_cache_thread,
+ &self.font_cache_sender,
+ &self.outstanding_web_fonts,
+ );
}
}
/// Advances the animation clock of the document.
- fn handle_advance_clock_ms<'a, 'b>(&mut self,
- how_many_ms: i32,
- possibly_locked_rw_data: &mut RwData<'a, 'b>,
- tick_animations: bool) {
+ fn handle_advance_clock_ms<'a, 'b>(
+ &mut self,
+ how_many_ms: i32,
+ possibly_locked_rw_data: &mut RwData<'a, 'b>,
+ tick_animations: bool,
+ ) {
self.timer.increment(how_many_ms as f64 / 1000.0);
if tick_animations {
self.tick_all_animations(possibly_locked_rw_data);
@@ -935,7 +953,7 @@ impl LayoutThread {
// Set Root as CB for any remaining absolute descendants.
flow.set_absolute_descendants(abs_descendants);
flow
- }
+ },
_ => return None,
};
@@ -949,8 +967,7 @@ impl LayoutThread {
/// This corresponds to `Reflow()` in Gecko and `layout()` in WebKit/Blink and should be
/// benchmarked against those two. It is marked `#[inline(never)]` to aid profiling.
#[inline(never)]
- fn solve_constraints(layout_root: &mut Flow,
- layout_context: &LayoutContext) {
+ fn solve_constraints(layout_root: &mut Flow, layout_context: &LayoutContext) {
let _scope = layout_debug_scope!("solve_constraints");
sequential::reflow(layout_root, layout_context, RelayoutMode::Incremental);
}
@@ -960,139 +977,169 @@ impl LayoutThread {
/// This corresponds to `Reflow()` in Gecko and `layout()` in WebKit/Blink and should be
/// benchmarked against those two. It is marked `#[inline(never)]` to aid profiling.
#[inline(never)]
- fn solve_constraints_parallel(traversal: &rayon::ThreadPool,
- layout_root: &mut Flow,
- profiler_metadata: Option<TimerMetadata>,
- time_profiler_chan: time::ProfilerChan,
- layout_context: &LayoutContext) {
+ fn solve_constraints_parallel(
+ traversal: &rayon::ThreadPool,
+ layout_root: &mut Flow,
+ profiler_metadata: Option<TimerMetadata>,
+ time_profiler_chan: time::ProfilerChan,
+ layout_context: &LayoutContext,
+ ) {
let _scope = layout_debug_scope!("solve_constraints_parallel");
// NOTE: this currently computes borders, so any pruning should separate that
// operation out.
- parallel::reflow(layout_root,
- profiler_metadata,
- time_profiler_chan,
- layout_context,
- traversal);
+ parallel::reflow(
+ layout_root,
+ profiler_metadata,
+ time_profiler_chan,
+ layout_context,
+ traversal,
+ );
}
/// Computes the stacking-relative positions of all flows and, if the painting is dirty and the
/// reflow type need it, builds the display list.
- fn compute_abs_pos_and_build_display_list(&self,
- data: &Reflow,
- reflow_goal: &ReflowGoal,
- document: Option<&ServoLayoutDocument>,
- layout_root: &mut Flow,
- layout_context: &mut LayoutContext,
- rw_data: &mut LayoutThreadData) {
+ fn compute_abs_pos_and_build_display_list(
+ &self,
+ data: &Reflow,
+ reflow_goal: &ReflowGoal,
+ document: Option<&ServoLayoutDocument>,
+ layout_root: &mut Flow,
+ layout_context: &mut LayoutContext,
+ rw_data: &mut LayoutThreadData,
+ ) {
let writing_mode = layout_root.base().writing_mode;
let (metadata, sender) = (self.profiler_metadata(), self.time_profiler_chan.clone());
- profile(time::ProfilerCategory::LayoutDispListBuild,
- metadata.clone(),
- sender.clone(),
- || {
- layout_root.mut_base().stacking_relative_position =
- LogicalPoint::zero(writing_mode).to_physical(writing_mode,
- self.viewport_size).to_vector();
-
- layout_root.mut_base().clip = data.page_clip_rect;
-
- let traversal = ComputeStackingRelativePositions { layout_context: layout_context };
- traversal.traverse(layout_root);
-
- if layout_root.base().restyle_damage.contains(ServoRestyleDamage::REPAINT) ||
- rw_data.display_list.is_none() {
- if reflow_goal.needs_display_list() {
- let mut build_state =
- sequential::build_display_list_for_subtree(layout_root, layout_context);
-
- debug!("Done building display list.");
-
- let root_size = {
- let root_flow = layout_root.base();
- if self.stylist.viewport_constraints().is_some() {
- root_flow.position.size.to_physical(root_flow.writing_mode)
- } else {
- root_flow.overflow.scroll.size
+ profile(
+ time::ProfilerCategory::LayoutDispListBuild,
+ metadata.clone(),
+ sender.clone(),
+ || {
+ layout_root.mut_base().stacking_relative_position =
+ LogicalPoint::zero(writing_mode)
+ .to_physical(writing_mode, self.viewport_size)
+ .to_vector();
+
+ layout_root.mut_base().clip = data.page_clip_rect;
+
+ let traversal = ComputeStackingRelativePositions {
+ layout_context: layout_context,
+ };
+ traversal.traverse(layout_root);
+
+ if layout_root
+ .base()
+ .restyle_damage
+ .contains(ServoRestyleDamage::REPAINT) ||
+ rw_data.display_list.is_none()
+ {
+ if reflow_goal.needs_display_list() {
+ let mut build_state =
+ sequential::build_display_list_for_subtree(layout_root, layout_context);
+
+ debug!("Done building display list.");
+
+ let root_size = {
+ let root_flow = layout_root.base();
+ if self.stylist.viewport_constraints().is_some() {
+ root_flow.position.size.to_physical(root_flow.writing_mode)
+ } else {
+ root_flow.overflow.scroll.size
+ }
+ };
+
+ let origin = Rect::new(Point2D::new(Au(0), Au(0)), root_size).to_layout();
+ build_state.root_stacking_context.bounds = origin;
+ build_state.root_stacking_context.overflow = origin;
+
+ if !build_state.iframe_sizes.is_empty() {
+ // build_state.iframe_sizes is only used here, so its okay to replace
+ // it with an empty vector
+ let iframe_sizes =
+ std::mem::replace(&mut build_state.iframe_sizes, vec![]);
+ let msg = ConstellationMsg::IFrameSizes(iframe_sizes);
+ if let Err(e) = self.constellation_chan.send(msg) {
+ warn!("Layout resize to constellation failed ({}).", e);
+ }
}
- };
- let origin = Rect::new(Point2D::new(Au(0), Au(0)), root_size).to_layout();
- build_state.root_stacking_context.bounds = origin;
- build_state.root_stacking_context.overflow = origin;
-
- if !build_state.iframe_sizes.is_empty() {
- // build_state.iframe_sizes is only used here, so its okay to replace
- // it with an empty vector
- let iframe_sizes = std::mem::replace(&mut build_state.iframe_sizes, vec![]);
- let msg = ConstellationMsg::IFrameSizes(iframe_sizes);
- if let Err(e) = self.constellation_chan.send(msg) {
- warn!("Layout resize to constellation failed ({}).", e);
- }
+ rw_data.indexable_text = std::mem::replace(
+ &mut build_state.indexable_text,
+ IndexableText::default(),
+ );
+ rw_data.display_list = Some(Arc::new(build_state.to_display_list()));
}
-
- rw_data.indexable_text = std::mem::replace(
- &mut build_state.indexable_text,
- IndexableText::default());
- rw_data.display_list = Some(Arc::new(build_state.to_display_list()));
}
- }
- if !reflow_goal.needs_display() {
- // Defer the paint step until the next ForDisplay.
- //
- // We need to tell the document about this so it doesn't
- // incorrectly suppress reflows. See #13131.
- document.expect("No document in a non-display reflow?").needs_paint_from_layout();
- return;
- }
- if let Some(document) = document {
- document.will_paint();
- }
- let display_list = (*rw_data.display_list.as_ref().unwrap()).clone();
+ if !reflow_goal.needs_display() {
+ // Defer the paint step until the next ForDisplay.
+ //
+ // We need to tell the document about this so it doesn't
+ // incorrectly suppress reflows. See #13131.
+ document
+ .expect("No document in a non-display reflow?")
+ .needs_paint_from_layout();
+ return;
+ }
+ if let Some(document) = document {
+ document.will_paint();
+ }
+ let display_list = (*rw_data.display_list.as_ref().unwrap()).clone();
- if opts::get().dump_display_list {
- display_list.print();
- }
- if opts::get().dump_display_list_json {
- println!("{}", serde_json::to_string_pretty(&display_list).unwrap());
- }
+ if opts::get().dump_display_list {
+ display_list.print();
+ }
+ if opts::get().dump_display_list_json {
+ println!("{}", serde_json::to_string_pretty(&display_list).unwrap());
+ }
- debug!("Layout done!");
+ debug!("Layout done!");
- // TODO: Avoid the temporary conversion and build webrender sc/dl directly!
- let builder = rw_data.display_list.as_ref().unwrap().convert_to_webrender(self.id);
+ // TODO: Avoid the temporary conversion and build webrender sc/dl directly!
+ let builder = rw_data
+ .display_list
+ .as_ref()
+ .unwrap()
+ .convert_to_webrender(self.id);
- let viewport_size = Size2D::new(self.viewport_size.width.to_f32_px(),
- self.viewport_size.height.to_f32_px());
+ let viewport_size = Size2D::new(
+ self.viewport_size.width.to_f32_px(),
+ self.viewport_size.height.to_f32_px(),
+ );
- let mut epoch = self.epoch.get();
- epoch.next();
- self.epoch.set(epoch);
+ let mut epoch = self.epoch.get();
+ epoch.next();
+ self.epoch.set(epoch);
- let viewport_size = webrender_api::LayoutSize::from_untyped(&viewport_size);
+ let viewport_size = webrender_api::LayoutSize::from_untyped(&viewport_size);
- // Observe notifications about rendered frames if needed right before
- // sending the display list to WebRender in order to set time related
- // Progressive Web Metrics.
- self.paint_time_metrics.maybe_observe_paint_time(self, epoch, &*display_list);
+ // Observe notifications about rendered frames if needed right before
+ // sending the display list to WebRender in order to set time related
+ // Progressive Web Metrics.
+ self.paint_time_metrics
+ .maybe_observe_paint_time(self, epoch, &*display_list);
- let mut txn = webrender_api::Transaction::new();
- txn.set_display_list(
- webrender_api::Epoch(epoch.0),
- Some(get_root_flow_background_color(layout_root)),
- viewport_size,
- builder.finalize(),
- true);
- txn.generate_frame();
- self.webrender_api.send_transaction(self.webrender_document, txn);
- });
+ let mut txn = webrender_api::Transaction::new();
+ txn.set_display_list(
+ webrender_api::Epoch(epoch.0),
+ Some(get_root_flow_background_color(layout_root)),
+ viewport_size,
+ builder.finalize(),
+ true,
+ );
+ txn.generate_frame();
+ self.webrender_api
+ .send_transaction(self.webrender_document, txn);
+ },
+ );
}
/// The high-level routine that performs layout threads.
- fn handle_reflow<'a, 'b>(&mut self,
- data: &mut ScriptReflowResult,
- possibly_locked_rw_data: &mut RwData<'a, 'b>) {
+ fn handle_reflow<'a, 'b>(
+ &mut self,
+ data: &mut ScriptReflowResult,
+ possibly_locked_rw_data: &mut RwData<'a, 'b>,
+ ) {
let document = unsafe { ServoLayoutNode::new(&data.document) };
let document = document.as_document().unwrap();
@@ -1108,7 +1155,9 @@ impl LayoutThread {
// Record the time that layout query has been waited.
let now = std_time::precise_time_ns();
if let ReflowGoal::LayoutQuery(_, timestamp) = data.reflow_goal {
- self.layout_query_waiting_time.increment(now - timestamp).expect("layout: wrong layout query timestamp");
+ self.layout_query_waiting_time
+ .increment(now - timestamp)
+ .expect("layout: wrong layout query timestamp");
};
let element = match document.root_element() {
@@ -1146,27 +1195,31 @@ impl LayoutThread {
},
&QueryMsg::TextIndexQuery(..) => {
rw_data.text_index_response = TextIndexResponse(None);
- }
+ },
&QueryMsg::ElementInnerTextQuery(_) => {
rw_data.element_inner_text_response = String::new();
},
},
- ReflowGoal::Full | ReflowGoal:: TickAnimations => {}
+ ReflowGoal::Full | ReflowGoal::TickAnimations => {},
}
return;
},
Some(x) => x,
};
- debug!("layout: processing reflow request for: {:?} ({}) (query={:?})",
- element, self.url, data.reflow_goal);
+ debug!(
+ "layout: processing reflow request for: {:?} ({}) (query={:?})",
+ element, self.url, data.reflow_goal
+ );
trace!("{:?}", ShowSubtree(element.as_node()));
let initial_viewport = data.window_size.initial_viewport;
let device_pixel_ratio = data.window_size.device_pixel_ratio;
let old_viewport_size = self.viewport_size;
- let current_screen_size = Size2D::new(Au::from_f32_px(initial_viewport.width),
- Au::from_f32_px(initial_viewport.height));
+ let current_screen_size = Size2D::new(
+ Au::from_f32_px(initial_viewport.width),
+ Au::from_f32_px(initial_viewport.height),
+ );
// Calculate the actual viewport as per DEVICE-ADAPT § 6
// If the entire flow tree is invalid, then it will be reflowed anyhow.
@@ -1183,26 +1236,33 @@ impl LayoutThread {
let had_used_viewport_units = self.stylist.device().used_viewport_units();
let device = Device::new(MediaType::screen(), initial_viewport, device_pixel_ratio);
- let sheet_origins_affected_by_device_change =
- self.stylist.set_device(device, &guards);
+ let sheet_origins_affected_by_device_change = self.stylist.set_device(device, &guards);
- self.stylist.force_stylesheet_origins_dirty(sheet_origins_affected_by_device_change);
+ self.stylist
+ .force_stylesheet_origins_dirty(sheet_origins_affected_by_device_change);
self.viewport_size =
- self.stylist.viewport_constraints().map_or(current_screen_size, |constraints| {
- debug!("Viewport constraints: {:?}", constraints);
-
- // other rules are evaluated against the actual viewport
- Size2D::new(Au::from_f32_px(constraints.size.width),
- Au::from_f32_px(constraints.size.height))
- });
+ self.stylist
+ .viewport_constraints()
+ .map_or(current_screen_size, |constraints| {
+ debug!("Viewport constraints: {:?}", constraints);
+
+ // other rules are evaluated against the actual viewport
+ Size2D::new(
+ Au::from_f32_px(constraints.size.width),
+ Au::from_f32_px(constraints.size.height),
+ )
+ });
let viewport_size_changed = self.viewport_size != old_viewport_size;
if viewport_size_changed {
if let Some(constraints) = self.stylist.viewport_constraints() {
// let the constellation know about the viewport constraints
- rw_data.constellation_chan
- .send(ConstellationMsg::ViewportConstrained(self.id, constraints.clone()))
- .unwrap();
+ rw_data
+ .constellation_chan
+ .send(ConstellationMsg::ViewportConstrained(
+ self.id,
+ constraints.clone(),
+ )).unwrap();
}
if had_used_viewport_units {
if let Some(mut data) = element.mutate_data() {
@@ -1215,7 +1275,8 @@ impl LayoutThread {
if self.first_reflow.get() {
debug!("First reflow, rebuilding user and UA rules");
for stylesheet in &ua_stylesheets.user_or_user_agent_stylesheets {
- self.stylist.append_stylesheet(stylesheet.clone(), &ua_or_user_guard);
+ self.stylist
+ .append_stylesheet(stylesheet.clone(), &ua_or_user_guard);
self.handle_add_stylesheet(&stylesheet.0, &ua_or_user_guard);
}
@@ -1233,7 +1294,8 @@ impl LayoutThread {
if data.stylesheets_changed {
debug!("Doc sheets changed, flushing author sheets too");
- self.stylist.force_stylesheet_origins_dirty(Origin::Author.into());
+ self.stylist
+ .force_stylesheet_origins_dirty(Origin::Author.into());
}
}
@@ -1247,12 +1309,11 @@ impl LayoutThread {
debug!("Draining restyles: {}", restyles.len());
let mut map = SnapshotMap::new();
- let elements_with_snapshot: Vec<_> =
- restyles
- .iter()
- .filter(|r| r.1.snapshot.is_some())
- .map(|r| r.0)
- .collect();
+ let elements_with_snapshot: Vec<_> = restyles
+ .iter()
+ .filter(|r| r.1.snapshot.is_some())
+ .map(|r| r.0)
+ .collect();
for (el, restyle) in restyles {
// Propagate the descendant bit up the ancestors. Do this before
@@ -1269,7 +1330,7 @@ impl LayoutThread {
None => {
unsafe { el.unset_snapshot_flags() };
continue;
- }
+ },
};
if let Some(s) = restyle.snapshot {
@@ -1288,8 +1349,7 @@ impl LayoutThread {
self.stylist.flush(&guards, Some(element), Some(&map));
// Create a layout context for use throughout the following passes.
- let mut layout_context =
- self.build_layout_context(guards.clone(), true, &map);
+ let mut layout_context = self.build_layout_context(guards.clone(), true, &map);
let thread_pool = if self.parallel_flag {
self.parallel_traversal.as_ref()
@@ -1300,34 +1360,39 @@ impl LayoutThread {
let traversal = RecalcStyleAndConstructFlows::new(layout_context);
let token = {
let shared =
- <RecalcStyleAndConstructFlows as DomTraversal<ServoLayoutElement>>::shared_context(&traversal);
+ <RecalcStyleAndConstructFlows as DomTraversal<ServoLayoutElement>>::shared_context(
+ &traversal,
+ );
RecalcStyleAndConstructFlows::pre_traverse(element, shared)
};
if token.should_traverse() {
// Recalculate CSS styles and rebuild flows and fragments.
- profile(time::ProfilerCategory::LayoutStyleRecalc,
- self.profiler_metadata(),
- self.time_profiler_chan.clone(),
- || {
- // Perform CSS selector matching and flow construction.
- driver::traverse_dom::<ServoLayoutElement, RecalcStyleAndConstructFlows>(
- &traversal,
- token,
- thread_pool,
- );
- });
+ profile(
+ time::ProfilerCategory::LayoutStyleRecalc,
+ self.profiler_metadata(),
+ self.time_profiler_chan.clone(),
+ || {
+ // Perform CSS selector matching and flow construction.
+ driver::traverse_dom::<ServoLayoutElement, RecalcStyleAndConstructFlows>(
+ &traversal,
+ token,
+ thread_pool,
+ );
+ },
+ );
// TODO(pcwalton): Measure energy usage of text shaping, perhaps?
- let text_shaping_time =
- (font::get_and_reset_text_shaping_performance_counter() as u64) /
+ let text_shaping_time = (font::get_and_reset_text_shaping_performance_counter() as u64) /
(self.layout_threads as u64);
- time::send_profile_data(time::ProfilerCategory::LayoutTextShaping,
- self.profiler_metadata(),
- &self.time_profiler_chan,
- 0,
- text_shaping_time,
- 0,
- 0);
+ time::send_profile_data(
+ time::ProfilerCategory::LayoutTextShaping,
+ self.profiler_metadata(),
+ &self.time_profiler_chan,
+ 0,
+ text_shaping_time,
+ 0,
+ 0,
+ );
// Retrieve the (possibly rebuilt) root flow.
*self.root_flow.borrow_mut() = self.try_get_layout_root(element.as_node());
@@ -1344,34 +1409,46 @@ impl LayoutThread {
}
if opts::get().dump_rule_tree {
- layout_context.style_context.stylist.rule_tree().dump_stdout(&guards);
+ layout_context
+ .style_context
+ .stylist
+ .rule_tree()
+ .dump_stdout(&guards);
}
// GC the rule tree if some heuristics are met.
- unsafe { layout_context.style_context.stylist.rule_tree().maybe_gc(); }
+ unsafe {
+ layout_context.style_context.stylist.rule_tree().maybe_gc();
+ }
// Perform post-style recalculation layout passes.
if let Some(mut root_flow) = self.root_flow.borrow().clone() {
- self.perform_post_style_recalc_layout_passes(&mut root_flow,
- &data.reflow_info,
- &data.reflow_goal,
- Some(&document),
- &mut rw_data,
- &mut layout_context);
+ self.perform_post_style_recalc_layout_passes(
+ &mut root_flow,
+ &data.reflow_info,
+ &data.reflow_goal,
+ Some(&document),
+ &mut rw_data,
+ &mut layout_context,
+ );
}
self.first_reflow.set(false);
- self.respond_to_query_if_necessary(&data.reflow_goal,
- &mut *rw_data,
- &mut layout_context,
- data.result.borrow_mut().as_mut().unwrap());
+ self.respond_to_query_if_necessary(
+ &data.reflow_goal,
+ &mut *rw_data,
+ &mut layout_context,
+ data.result.borrow_mut().as_mut().unwrap(),
+ );
}
- fn respond_to_query_if_necessary(&self,
- reflow_goal: &ReflowGoal,
- rw_data: &mut LayoutThreadData,
- context: &mut LayoutContext,
- reflow_result: &mut ReflowComplete) {
+ fn respond_to_query_if_necessary(
+ &self,
+ reflow_goal: &ReflowGoal,
+ rw_data: &mut LayoutThreadData,
+ context: &mut LayoutContext,
+ reflow_result: &mut ReflowComplete,
+ ) {
let pending_images = match context.pending_images {
Some(ref pending) => std_mem::replace(&mut *pending.lock().unwrap(), vec![]),
None => vec![],
@@ -1404,10 +1481,12 @@ impl LayoutThread {
let opaque_node = node.opaque();
let point_in_node = Point2D::new(
Au::from_f32_px(point_in_node.x),
- Au::from_f32_px(point_in_node.y)
+ Au::from_f32_px(point_in_node.y),
);
rw_data.text_index_response = TextIndexResponse(
- rw_data.indexable_text.text_index(opaque_node, point_in_node)
+ rw_data
+ .indexable_text
+ .text_index(opaque_node, point_in_node),
);
},
&QueryMsg::NodeGeometryQuery(node) => {
@@ -1416,20 +1495,18 @@ impl LayoutThread {
},
&QueryMsg::NodeScrollGeometryQuery(node) => {
let node = unsafe { ServoLayoutNode::new(&node) };
- rw_data.scroll_area_response = process_node_scroll_area_request(node, root_flow);
+ rw_data.scroll_area_response =
+ process_node_scroll_area_request(node, root_flow);
},
&QueryMsg::NodeScrollIdQuery(node) => {
let node = unsafe { ServoLayoutNode::new(&node) };
- rw_data.scroll_id_response = Some(process_node_scroll_id_request(self.id, node));
+ rw_data.scroll_id_response =
+ Some(process_node_scroll_id_request(self.id, node));
},
&QueryMsg::ResolvedStyleQuery(node, ref pseudo, ref property) => {
let node = unsafe { ServoLayoutNode::new(&node) };
rw_data.resolved_style_response =
- process_resolved_style_request(context,
- node,
- pseudo,
- property,
- root_flow);
+ process_resolved_style_request(context, node, pseudo, property, root_flow);
},
&QueryMsg::OffsetParentQuery(node) => {
let node = unsafe { ServoLayoutNode::new(&node) };
@@ -1454,12 +1531,14 @@ impl LayoutThread {
self.webrender_document,
Some(self.id.to_webrender()),
client_point,
- flags
+ flags,
);
- rw_data.nodes_from_point_response = results.items.iter()
- .map(|item| UntrustedNodeAddress(item.tag.0 as *const c_void))
- .collect()
+ rw_data.nodes_from_point_response = results
+ .items
+ .iter()
+ .map(|item| UntrustedNodeAddress(item.tag.0 as *const c_void))
+ .collect()
},
&QueryMsg::ElementInnerTextQuery(node) => {
let node = unsafe { ServoLayoutNode::new(&node) };
@@ -1467,13 +1546,15 @@ impl LayoutThread {
process_element_inner_text_query(node, &rw_data.indexable_text);
},
},
- ReflowGoal::Full | ReflowGoal::TickAnimations => {}
+ ReflowGoal::Full | ReflowGoal::TickAnimations => {},
}
}
- fn set_scroll_states<'a, 'b>(&mut self,
- new_scroll_states: Vec<ScrollState>,
- possibly_locked_rw_data: &mut RwData<'a, 'b>) {
+ fn set_scroll_states<'a, 'b>(
+ &mut self,
+ new_scroll_states: Vec<ScrollState>,
+ possibly_locked_rw_data: &mut RwData<'a, 'b>,
+ ) {
let mut rw_data = possibly_locked_rw_data.lock();
let mut script_scroll_states = vec![];
let mut layout_scroll_states = HashMap::new();
@@ -1487,8 +1568,12 @@ impl LayoutThread {
script_scroll_states.push((UntrustedNodeAddress::from_id(node_id), offset))
}
}
- let _ = self.script_chan
- .send(ConstellationControlMsg::SetScrollState(self.id, script_scroll_states));
+ let _ = self
+ .script_chan
+ .send(ConstellationControlMsg::SetScrollState(
+ self.id,
+ script_scroll_states,
+ ));
rw_data.scroll_offsets = layout_scroll_states
}
@@ -1499,7 +1584,10 @@ impl LayoutThread {
fn tick_animations(&mut self, rw_data: &mut LayoutThreadData) {
if opts::get().relayout_event {
- println!("**** pipeline={}\tForDisplay\tSpecial\tAnimationTick", self.id);
+ println!(
+ "**** pipeline={}\tForDisplay\tSpecial\tAnimationTick",
+ self.id
+ );
}
if let Some(mut root_flow) = self.root_flow.borrow().clone() {
@@ -1517,50 +1605,53 @@ impl LayoutThread {
ua_or_user: &ua_or_user_guard,
};
let snapshots = SnapshotMap::new();
- let mut layout_context = self.build_layout_context(guards,
- false,
- &snapshots);
+ let mut layout_context = self.build_layout_context(guards, false, &snapshots);
{
// Perform an abbreviated style recalc that operates without access to the DOM.
let animations = self.running_animations.read();
- profile(time::ProfilerCategory::LayoutStyleRecalc,
- self.profiler_metadata(),
- self.time_profiler_chan.clone(),
- || {
- animation::recalc_style_for_animations::<ServoLayoutElement>(
- &layout_context,
- FlowRef::deref_mut(&mut root_flow),
- &animations,
- )
- });
+ profile(
+ time::ProfilerCategory::LayoutStyleRecalc,
+ self.profiler_metadata(),
+ self.time_profiler_chan.clone(),
+ || {
+ animation::recalc_style_for_animations::<ServoLayoutElement>(
+ &layout_context,
+ FlowRef::deref_mut(&mut root_flow),
+ &animations,
+ )
+ },
+ );
}
- self.perform_post_style_recalc_layout_passes(&mut root_flow,
- &reflow_info,
- &ReflowGoal::TickAnimations,
- None,
- &mut *rw_data,
- &mut layout_context);
+ self.perform_post_style_recalc_layout_passes(
+ &mut root_flow,
+ &reflow_info,
+ &ReflowGoal::TickAnimations,
+ None,
+ &mut *rw_data,
+ &mut layout_context,
+ );
assert!(layout_context.pending_images.is_none());
assert!(layout_context.newly_transitioning_nodes.is_none());
}
}
- fn perform_post_style_recalc_layout_passes(&self,
- root_flow: &mut FlowRef,
- data: &Reflow,
- reflow_goal: &ReflowGoal,
- document: Option<&ServoLayoutDocument>,
- rw_data: &mut LayoutThreadData,
- context: &mut LayoutContext) {
+ fn perform_post_style_recalc_layout_passes(
+ &self,
+ root_flow: &mut FlowRef,
+ data: &Reflow,
+ reflow_goal: &ReflowGoal,
+ document: Option<&ServoLayoutDocument>,
+ rw_data: &mut LayoutThreadData,
+ context: &mut LayoutContext,
+ ) {
{
let mut newly_transitioning_nodes = context
.newly_transitioning_nodes
.as_ref()
.map(|nodes| nodes.lock().unwrap());
- let newly_transitioning_nodes = newly_transitioning_nodes
- .as_mut()
- .map(|nodes| &mut **nodes);
+ let newly_transitioning_nodes =
+ newly_transitioning_nodes.as_mut().map(|nodes| &mut **nodes);
// Kick off animations if any were triggered, expire completed ones.
animation::update_animation_state::<ServoLayoutElement>(
&self.constellation_chan,
@@ -1574,89 +1665,113 @@ impl LayoutThread {
);
}
- profile(time::ProfilerCategory::LayoutRestyleDamagePropagation,
- self.profiler_metadata(),
- self.time_profiler_chan.clone(),
- || {
- // Call `compute_layout_damage` even in non-incremental mode, because it sets flags
- // that are needed in both incremental and non-incremental traversals.
- let damage = FlowRef::deref_mut(root_flow).compute_layout_damage();
-
- if opts::get().nonincremental_layout || damage.contains(SpecialRestyleDamage::REFLOW_ENTIRE_DOCUMENT) {
- FlowRef::deref_mut(root_flow).reflow_entire_document()
- }
- });
+ profile(
+ time::ProfilerCategory::LayoutRestyleDamagePropagation,
+ self.profiler_metadata(),
+ self.time_profiler_chan.clone(),
+ || {
+ // Call `compute_layout_damage` even in non-incremental mode, because it sets flags
+ // that are needed in both incremental and non-incremental traversals.
+ let damage = FlowRef::deref_mut(root_flow).compute_layout_damage();
+
+ if opts::get().nonincremental_layout ||
+ damage.contains(SpecialRestyleDamage::REFLOW_ENTIRE_DOCUMENT)
+ {
+ FlowRef::deref_mut(root_flow).reflow_entire_document()
+ }
+ },
+ );
if opts::get().trace_layout {
layout_debug::begin_trace(root_flow.clone());
}
// Resolve generated content.
- profile(time::ProfilerCategory::LayoutGeneratedContent,
- self.profiler_metadata(),
- self.time_profiler_chan.clone(),
- || sequential::resolve_generated_content(FlowRef::deref_mut(root_flow), &context));
+ profile(
+ time::ProfilerCategory::LayoutGeneratedContent,
+ self.profiler_metadata(),
+ self.time_profiler_chan.clone(),
+ || sequential::resolve_generated_content(FlowRef::deref_mut(root_flow), &context),
+ );
// Guess float placement.
- profile(time::ProfilerCategory::LayoutFloatPlacementSpeculation,
- self.profiler_metadata(),
- self.time_profiler_chan.clone(),
- || sequential::guess_float_placement(FlowRef::deref_mut(root_flow)));
+ profile(
+ time::ProfilerCategory::LayoutFloatPlacementSpeculation,
+ self.profiler_metadata(),
+ self.time_profiler_chan.clone(),
+ || sequential::guess_float_placement(FlowRef::deref_mut(root_flow)),
+ );
// Perform the primary layout passes over the flow tree to compute the locations of all
// the boxes.
- if root_flow.base().restyle_damage.intersects(ServoRestyleDamage::REFLOW |
- ServoRestyleDamage::REFLOW_OUT_OF_FLOW) {
- profile(time::ProfilerCategory::LayoutMain,
- self.profiler_metadata(),
- self.time_profiler_chan.clone(),
- || {
- let profiler_metadata = self.profiler_metadata();
-
- if let (true, Some(traversal)) = (self.parallel_flag, self.parallel_traversal.as_ref()) {
- // Parallel mode.
- LayoutThread::solve_constraints_parallel(traversal,
- FlowRef::deref_mut(root_flow),
- profiler_metadata,
- self.time_profiler_chan.clone(),
- &*context);
- } else {
- //Sequential mode
- LayoutThread::solve_constraints(FlowRef::deref_mut(root_flow), &context)
- }
- });
- }
-
- profile(time::ProfilerCategory::LayoutStoreOverflow,
+ if root_flow
+ .base()
+ .restyle_damage
+ .intersects(ServoRestyleDamage::REFLOW | ServoRestyleDamage::REFLOW_OUT_OF_FLOW)
+ {
+ profile(
+ time::ProfilerCategory::LayoutMain,
self.profiler_metadata(),
self.time_profiler_chan.clone(),
|| {
- sequential::store_overflow(context,
- FlowRef::deref_mut(root_flow) as &mut Flow);
- });
+ let profiler_metadata = self.profiler_metadata();
+
+ if let (true, Some(traversal)) =
+ (self.parallel_flag, self.parallel_traversal.as_ref())
+ {
+ // Parallel mode.
+ LayoutThread::solve_constraints_parallel(
+ traversal,
+ FlowRef::deref_mut(root_flow),
+ profiler_metadata,
+ self.time_profiler_chan.clone(),
+ &*context,
+ );
+ } else {
+ //Sequential mode
+ LayoutThread::solve_constraints(FlowRef::deref_mut(root_flow), &context)
+ }
+ },
+ );
+ }
+
+ profile(
+ time::ProfilerCategory::LayoutStoreOverflow,
+ self.profiler_metadata(),
+ self.time_profiler_chan.clone(),
+ || {
+ sequential::store_overflow(context, FlowRef::deref_mut(root_flow) as &mut Flow);
+ },
+ );
- self.perform_post_main_layout_passes(data,
- root_flow,
- reflow_goal,
- document,
- rw_data,
- context);
+ self.perform_post_main_layout_passes(
+ data,
+ root_flow,
+ reflow_goal,
+ document,
+ rw_data,
+ context,
+ );
}
- fn perform_post_main_layout_passes(&self,
- data: &Reflow,
- mut root_flow: &mut FlowRef,
- reflow_goal: &ReflowGoal,
- document: Option<&ServoLayoutDocument>,
- rw_data: &mut LayoutThreadData,
- layout_context: &mut LayoutContext) {
+ fn perform_post_main_layout_passes(
+ &self,
+ data: &Reflow,
+ mut root_flow: &mut FlowRef,
+ reflow_goal: &ReflowGoal,
+ document: Option<&ServoLayoutDocument>,
+ rw_data: &mut LayoutThreadData,
+ layout_context: &mut LayoutContext,
+ ) {
// Build the display list if necessary, and send it to the painter.
- self.compute_abs_pos_and_build_display_list(data,
- reflow_goal,
- document,
- FlowRef::deref_mut(&mut root_flow),
- &mut *layout_context,
- rw_data);
+ self.compute_abs_pos_and_build_display_list(
+ data,
+ reflow_goal,
+ document,
+ FlowRef::deref_mut(&mut root_flow),
+ &mut *layout_context,
+ rw_data,
+ );
if opts::get().trace_layout {
layout_debug::end_trace(self.generation.get());
@@ -1671,10 +1786,12 @@ impl LayoutThread {
fn reflow_all_nodes(flow: &mut Flow) {
debug!("reflowing all nodes!");
- flow.mut_base()
- .restyle_damage
- .insert(ServoRestyleDamage::REPAINT | ServoRestyleDamage::STORE_OVERFLOW |
- ServoRestyleDamage::REFLOW | ServoRestyleDamage::REPOSITION);
+ flow.mut_base().restyle_damage.insert(
+ ServoRestyleDamage::REPAINT |
+ ServoRestyleDamage::STORE_OVERFLOW |
+ ServoRestyleDamage::REFLOW |
+ ServoRestyleDamage::REPOSITION,
+ );
for child in flow.mut_base().child_iter_mut() {
LayoutThread::reflow_all_nodes(child);
@@ -1715,7 +1832,12 @@ impl ProfilerMetadataFactory for LayoutThread {
// color on an iframe element, while the iframe content itself has a default
// transparent background color is handled correctly.
fn get_root_flow_background_color(flow: &mut Flow) -> webrender_api::ColorF {
- let transparent = webrender_api::ColorF { r: 0.0, g: 0.0, b: 0.0, a: 0.0 };
+ let transparent = webrender_api::ColorF {
+ r: 0.0,
+ g: 0.0,
+ b: 0.0,
+ a: 0.0,
+ };
if !flow.is_block_like() {
return transparent;
}
@@ -1730,9 +1852,13 @@ fn get_root_flow_background_color(flow: &mut Flow) -> webrender_api::ColorF {
}
let kid_block_flow = kid.as_block();
- let color = kid_block_flow.fragment
- .style
- .resolve_color(kid_block_flow.fragment.style.get_background().background_color);
+ let color = kid_block_flow.fragment.style.resolve_color(
+ kid_block_flow
+ .fragment
+ .style
+ .get_background()
+ .background_color,
+ );
webrender_api::ColorF::new(
color.red_f32(),
color.green_f32(),
@@ -1765,17 +1891,26 @@ fn get_ua_stylesheets() -> Result<UserAgentStylesheets, &'static str> {
// FIXME: presentational-hints.css should be at author origin with zero specificity.
// (Does it make a difference?)
let mut user_or_user_agent_stylesheets = vec![
- parse_ua_stylesheet(&shared_lock, "user-agent.css",
- &resources::read_bytes(Resource::UserAgentCSS))?,
- parse_ua_stylesheet(&shared_lock, "servo.css",
- &resources::read_bytes(Resource::ServoCSS))?,
- parse_ua_stylesheet(&shared_lock, "presentational-hints.css",
- &resources::read_bytes(Resource::PresentationalHintsCSS))?,
+ parse_ua_stylesheet(
+ &shared_lock,
+ "user-agent.css",
+ &resources::read_bytes(Resource::UserAgentCSS),
+ )?,
+ parse_ua_stylesheet(
+ &shared_lock,
+ "servo.css",
+ &resources::read_bytes(Resource::ServoCSS),
+ )?,
+ parse_ua_stylesheet(
+ &shared_lock,
+ "presentational-hints.css",
+ &resources::read_bytes(Resource::PresentationalHintsCSS),
+ )?,
];
for &(ref contents, ref url) in &opts::get().user_stylesheets {
- user_or_user_agent_stylesheets.push(
- DocumentStyleSheet(ServoArc::new(Stylesheet::from_bytes(
+ user_or_user_agent_stylesheets.push(DocumentStyleSheet(ServoArc::new(
+ Stylesheet::from_bytes(
&contents,
url.clone(),
None,
@@ -1786,12 +1921,15 @@ fn get_ua_stylesheets() -> Result<UserAgentStylesheets, &'static str> {
None,
Some(&RustLogReporter),
QuirksMode::NoQuirks,
- )))
- );
+ ),
+ )));
}
- let quirks_mode_stylesheet = parse_ua_stylesheet(&shared_lock, "quirks-mode.css",
- &resources::read_bytes(Resource::QuirksModeCSS))?;
+ let quirks_mode_stylesheet = parse_ua_stylesheet(
+ &shared_lock,
+ "quirks-mode.css",
+ &resources::read_bytes(Resource::QuirksModeCSS),
+ )?;
Ok(UserAgentStylesheets {
shared_lock: shared_lock,
@@ -1807,7 +1945,7 @@ lazy_static! {
Err(filename) => {
error!("Failed to load UA stylesheet {}!", filename);
process::exit(1);
- }
+ },
}
};
}
@@ -1820,8 +1958,13 @@ struct RegisteredPainterImpl {
}
impl SpeculativePainter for RegisteredPainterImpl {
- fn speculatively_draw_a_paint_image(&self, properties: Vec<(Atom, String)>, arguments: Vec<String>) {
- self.painter.speculatively_draw_a_paint_image(properties, arguments);
+ fn speculatively_draw_a_paint_image(
+ &self,
+ properties: Vec<(Atom, String)>,
+ arguments: Vec<String>,
+ ) {
+ self.painter
+ .speculatively_draw_a_paint_image(properties, arguments);
}
}
@@ -1835,14 +1978,15 @@ impl RegisteredSpeculativePainter for RegisteredPainterImpl {
}
impl Painter for RegisteredPainterImpl {
- fn draw_a_paint_image(&self,
- size: TypedSize2D<f32, CSSPixel>,
- device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
- properties: Vec<(Atom, String)>,
- arguments: Vec<String>)
- -> Result<DrawAPaintImageResult, PaintWorkletError>
- {
- self.painter.draw_a_paint_image(size, device_pixel_ratio, properties, arguments)
+ fn draw_a_paint_image(
+ &self,
+ size: TypedSize2D<f32, CSSPixel>,
+ device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
+ properties: Vec<(Atom, String)>,
+ arguments: Vec<String>,
+ ) -> Result<DrawAPaintImageResult, PaintWorkletError> {
+ self.painter
+ .draw_a_paint_image(size, device_pixel_ratio, properties, arguments)
}
}
@@ -1850,14 +1994,18 @@ impl RegisteredPainter for RegisteredPainterImpl {}
struct RegisteredPaintersImpl(FnvHashMap<Atom, RegisteredPainterImpl>);
-impl RegisteredSpeculativePainters for RegisteredPaintersImpl {
+impl RegisteredSpeculativePainters for RegisteredPaintersImpl {
fn get(&self, name: &Atom) -> Option<&RegisteredSpeculativePainter> {
- self.0.get(&name).map(|painter| painter as &RegisteredSpeculativePainter)
+ self.0
+ .get(&name)
+ .map(|painter| painter as &RegisteredSpeculativePainter)
}
}
impl RegisteredPainters for RegisteredPaintersImpl {
fn get(&self, name: &Atom) -> Option<&RegisteredPainter> {
- self.0.get(&name).map(|painter| painter as &RegisteredPainter)
+ self.0
+ .get(&name)
+ .map(|painter| painter as &RegisteredPainter)
}
}
diff --git a/components/layout_traits/lib.rs b/components/layout_traits/lib.rs
index fe432604556..6566065e421 100644
--- a/components/layout_traits/lib.rs
+++ b/components/layout_traits/lib.rs
@@ -36,21 +36,23 @@ use std::sync::mpsc::{Receiver, Sender};
// Here to remove the compositor -> layout dependency
pub trait LayoutThreadFactory {
type Message;
- fn create(id: PipelineId,
- top_level_browsing_context_id: TopLevelBrowsingContextId,
- url: ServoUrl,
- is_iframe: bool,
- chan: (Sender<Self::Message>, Receiver<Self::Message>),
- pipeline_port: IpcReceiver<LayoutControlMsg>,
- constellation_chan: IpcSender<ConstellationMsg>,
- script_chan: IpcSender<ConstellationControlMsg>,
- image_cache: Arc<ImageCache>,
- font_cache_thread: FontCacheThread,
- time_profiler_chan: time::ProfilerChan,
- mem_profiler_chan: mem::ProfilerChan,
- content_process_shutdown_chan: Option<IpcSender<()>>,
- webrender_api_sender: webrender_api::RenderApiSender,
- webrender_document: webrender_api::DocumentId,
- layout_threads: usize,
- paint_time_metrics: PaintTimeMetrics);
+ fn create(
+ id: PipelineId,
+ top_level_browsing_context_id: TopLevelBrowsingContextId,
+ url: ServoUrl,
+ is_iframe: bool,
+ chan: (Sender<Self::Message>, Receiver<Self::Message>),
+ pipeline_port: IpcReceiver<LayoutControlMsg>,
+ constellation_chan: IpcSender<ConstellationMsg>,
+ script_chan: IpcSender<ConstellationControlMsg>,
+ image_cache: Arc<ImageCache>,
+ font_cache_thread: FontCacheThread,
+ time_profiler_chan: time::ProfilerChan,
+ mem_profiler_chan: mem::ProfilerChan,
+ content_process_shutdown_chan: Option<IpcSender<()>>,
+ webrender_api_sender: webrender_api::RenderApiSender,
+ webrender_document: webrender_api::DocumentId,
+ layout_threads: usize,
+ paint_time_metrics: PaintTimeMetrics,
+ );
}
diff --git a/components/malloc_size_of/lib.rs b/components/malloc_size_of/lib.rs
index f4774d66a3e..945ff9418b6 100644
--- a/components/malloc_size_of/lib.rs
+++ b/components/malloc_size_of/lib.rs
@@ -107,9 +107,11 @@ pub struct MallocSizeOfOps {
}
impl MallocSizeOfOps {
- pub fn new(size_of: VoidPtrToSizeFn,
- malloc_enclosing_size_of: Option<VoidPtrToSizeFn>,
- have_seen_ptr: Option<Box<VoidPtrToBoolFnMut>>) -> Self {
+ pub fn new(
+ size_of: VoidPtrToSizeFn,
+ malloc_enclosing_size_of: Option<VoidPtrToSizeFn>,
+ have_seen_ptr: Option<Box<VoidPtrToBoolFnMut>>,
+ ) -> Self {
MallocSizeOfOps {
size_of_op: size_of,
enclosing_size_of_op: malloc_enclosing_size_of,
@@ -127,7 +129,7 @@ impl MallocSizeOfOps {
// larger than the required alignment, but small enough that it is
// always in the first page of memory and therefore not a legitimate
// address.
- return ptr as *const usize as usize <= 256
+ return ptr as *const usize as usize <= 256;
}
/// Call `size_of_op` on `ptr`, first checking that the allocation isn't
@@ -154,7 +156,10 @@ impl MallocSizeOfOps {
/// Call `have_seen_ptr_op` on `ptr`.
pub fn have_seen_ptr<T>(&mut self, ptr: *const T) -> bool {
- let have_seen_ptr_op = self.have_seen_ptr_op.as_mut().expect("missing have_seen_ptr_op");
+ let have_seen_ptr_op = self
+ .have_seen_ptr_op
+ .as_mut()
+ .expect("missing have_seen_ptr_op");
have_seen_ptr_op(ptr as *const c_void)
}
}
@@ -257,7 +262,9 @@ impl MallocSizeOf for () {
}
impl<T1, T2> MallocSizeOf for (T1, T2)
- where T1: MallocSizeOf, T2: MallocSizeOf
+where
+ T1: MallocSizeOf,
+ T2: MallocSizeOf,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
self.0.size_of(ops) + self.1.size_of(ops)
@@ -265,7 +272,10 @@ impl<T1, T2> MallocSizeOf for (T1, T2)
}
impl<T1, T2, T3> MallocSizeOf for (T1, T2, T3)
- where T1: MallocSizeOf, T2: MallocSizeOf, T3: MallocSizeOf
+where
+ T1: MallocSizeOf,
+ T2: MallocSizeOf,
+ T3: MallocSizeOf,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
self.0.size_of(ops) + self.1.size_of(ops) + self.2.size_of(ops)
@@ -273,7 +283,11 @@ impl<T1, T2, T3> MallocSizeOf for (T1, T2, T3)
}
impl<T1, T2, T3, T4> MallocSizeOf for (T1, T2, T3, T4)
- where T1: MallocSizeOf, T2: MallocSizeOf, T3: MallocSizeOf, T4: MallocSizeOf
+where
+ T1: MallocSizeOf,
+ T2: MallocSizeOf,
+ T3: MallocSizeOf,
+ T4: MallocSizeOf,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
self.0.size_of(ops) + self.1.size_of(ops) + self.2.size_of(ops) + self.3.size_of(ops)
@@ -312,7 +326,8 @@ impl<T: MallocSizeOf> MallocSizeOf for std::cell::RefCell<T> {
}
impl<'a, B: ?Sized + ToOwned> MallocSizeOf for std::borrow::Cow<'a, B>
- where B::Owned: MallocSizeOf
+where
+ B::Owned: MallocSizeOf,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
match *self {
@@ -404,8 +419,9 @@ impl<A: smallvec::Array> MallocShallowSizeOf for smallvec::SmallVec<A> {
}
impl<A> MallocSizeOf for smallvec::SmallVec<A>
- where A: smallvec::Array,
- A::Item: MallocSizeOf
+where
+ A: smallvec::Array,
+ A::Item: MallocSizeOf,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
let mut n = self.shallow_size_of(ops);
@@ -417,8 +433,9 @@ impl<A> MallocSizeOf for smallvec::SmallVec<A>
}
impl<T, S> MallocShallowSizeOf for std::collections::HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
if ops.has_malloc_enclosing_size_of() {
@@ -426,7 +443,9 @@ impl<T, S> MallocShallowSizeOf for std::collections::HashSet<T, S>
// `ops.malloc_enclosing_size_of()` then gives us the storage size.
// This assumes that the `HashSet`'s contents (values and hashes)
// are all stored in a single contiguous heap allocation.
- self.iter().next().map_or(0, |t| unsafe { ops.malloc_enclosing_size_of(t) })
+ self.iter()
+ .next()
+ .map_or(0, |t| unsafe { ops.malloc_enclosing_size_of(t) })
} else {
// An estimate.
self.capacity() * (size_of::<T>() + size_of::<usize>())
@@ -435,8 +454,9 @@ impl<T, S> MallocShallowSizeOf for std::collections::HashSet<T, S>
}
impl<T, S> MallocSizeOf for std::collections::HashSet<T, S>
- where T: Eq + Hash + MallocSizeOf,
- S: BuildHasher,
+where
+ T: Eq + Hash + MallocSizeOf,
+ S: BuildHasher,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
let mut n = self.shallow_size_of(ops);
@@ -448,13 +468,16 @@ impl<T, S> MallocSizeOf for std::collections::HashSet<T, S>
}
impl<T, S> MallocShallowSizeOf for hashglobe::hash_set::HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
// See the implementation for std::collections::HashSet for details.
if ops.has_malloc_enclosing_size_of() {
- self.iter().next().map_or(0, |t| unsafe { ops.malloc_enclosing_size_of(t) })
+ self.iter()
+ .next()
+ .map_or(0, |t| unsafe { ops.malloc_enclosing_size_of(t) })
} else {
self.capacity() * (size_of::<T>() + size_of::<usize>())
}
@@ -462,8 +485,9 @@ impl<T, S> MallocShallowSizeOf for hashglobe::hash_set::HashSet<T, S>
}
impl<T, S> MallocSizeOf for hashglobe::hash_set::HashSet<T, S>
- where T: Eq + Hash + MallocSizeOf,
- S: BuildHasher,
+where
+ T: Eq + Hash + MallocSizeOf,
+ S: BuildHasher,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
let mut n = self.shallow_size_of(ops);
@@ -475,8 +499,9 @@ impl<T, S> MallocSizeOf for hashglobe::hash_set::HashSet<T, S>
}
impl<T, S> MallocShallowSizeOf for hashglobe::fake::HashSet<T, S>
- where T: Eq + Hash,
- S: BuildHasher,
+where
+ T: Eq + Hash,
+ S: BuildHasher,
{
fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
use std::ops::Deref;
@@ -485,8 +510,9 @@ impl<T, S> MallocShallowSizeOf for hashglobe::fake::HashSet<T, S>
}
impl<T, S> MallocSizeOf for hashglobe::fake::HashSet<T, S>
- where T: Eq + Hash + MallocSizeOf,
- S: BuildHasher,
+where
+ T: Eq + Hash + MallocSizeOf,
+ S: BuildHasher,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
use std::ops::Deref;
@@ -495,13 +521,16 @@ impl<T, S> MallocSizeOf for hashglobe::fake::HashSet<T, S>
}
impl<K, V, S> MallocShallowSizeOf for std::collections::HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
// See the implementation for std::collections::HashSet for details.
if ops.has_malloc_enclosing_size_of() {
- self.values().next().map_or(0, |v| unsafe { ops.malloc_enclosing_size_of(v) })
+ self.values()
+ .next()
+ .map_or(0, |v| unsafe { ops.malloc_enclosing_size_of(v) })
} else {
self.capacity() * (size_of::<V>() + size_of::<K>() + size_of::<usize>())
}
@@ -509,9 +538,10 @@ impl<K, V, S> MallocShallowSizeOf for std::collections::HashMap<K, V, S>
}
impl<K, V, S> MallocSizeOf for std::collections::HashMap<K, V, S>
- where K: Eq + Hash + MallocSizeOf,
- V: MallocSizeOf,
- S: BuildHasher,
+where
+ K: Eq + Hash + MallocSizeOf,
+ V: MallocSizeOf,
+ S: BuildHasher,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
let mut n = self.shallow_size_of(ops);
@@ -524,13 +554,16 @@ impl<K, V, S> MallocSizeOf for std::collections::HashMap<K, V, S>
}
impl<K, V, S> MallocShallowSizeOf for hashglobe::hash_map::HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
// See the implementation for std::collections::HashSet for details.
if ops.has_malloc_enclosing_size_of() {
- self.values().next().map_or(0, |v| unsafe { ops.malloc_enclosing_size_of(v) })
+ self.values()
+ .next()
+ .map_or(0, |v| unsafe { ops.malloc_enclosing_size_of(v) })
} else {
self.capacity() * (size_of::<V>() + size_of::<K>() + size_of::<usize>())
}
@@ -538,9 +571,10 @@ impl<K, V, S> MallocShallowSizeOf for hashglobe::hash_map::HashMap<K, V, S>
}
impl<K, V, S> MallocSizeOf for hashglobe::hash_map::HashMap<K, V, S>
- where K: Eq + Hash + MallocSizeOf,
- V: MallocSizeOf,
- S: BuildHasher,
+where
+ K: Eq + Hash + MallocSizeOf,
+ V: MallocSizeOf,
+ S: BuildHasher,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
let mut n = self.shallow_size_of(ops);
@@ -553,8 +587,9 @@ impl<K, V, S> MallocSizeOf for hashglobe::hash_map::HashMap<K, V, S>
}
impl<K, V, S> MallocShallowSizeOf for hashglobe::fake::HashMap<K, V, S>
- where K: Eq + Hash,
- S: BuildHasher,
+where
+ K: Eq + Hash,
+ S: BuildHasher,
{
fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
use std::ops::Deref;
@@ -563,9 +598,10 @@ impl<K, V, S> MallocShallowSizeOf for hashglobe::fake::HashMap<K, V, S>
}
impl<K, V, S> MallocSizeOf for hashglobe::fake::HashMap<K, V, S>
- where K: Eq + Hash + MallocSizeOf,
- V: MallocSizeOf,
- S: BuildHasher,
+where
+ K: Eq + Hash + MallocSizeOf,
+ V: MallocSizeOf,
+ S: BuildHasher,
{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
use std::ops::Deref;
@@ -667,8 +703,10 @@ impl<T: MallocSizeOf, U> MallocSizeOf for euclid::TypedRect<T, U> {
impl<T: MallocSizeOf, U> MallocSizeOf for euclid::TypedSideOffsets2D<T, U> {
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
- self.top.size_of(ops) + self.right.size_of(ops) +
- self.bottom.size_of(ops) + self.left.size_of(ops)
+ self.top.size_of(ops) +
+ self.right.size_of(ops) +
+ self.bottom.size_of(ops) +
+ self.left.size_of(ops)
}
}
@@ -680,22 +718,33 @@ impl<T: MallocSizeOf, U> MallocSizeOf for euclid::TypedSize2D<T, U> {
impl<T: MallocSizeOf, Src, Dst> MallocSizeOf for euclid::TypedTransform2D<T, Src, Dst> {
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
- self.m11.size_of(ops) + self.m12.size_of(ops) +
- self.m21.size_of(ops) + self.m22.size_of(ops) +
- self.m31.size_of(ops) + self.m32.size_of(ops)
+ self.m11.size_of(ops) +
+ self.m12.size_of(ops) +
+ self.m21.size_of(ops) +
+ self.m22.size_of(ops) +
+ self.m31.size_of(ops) +
+ self.m32.size_of(ops)
}
}
impl<T: MallocSizeOf, Src, Dst> MallocSizeOf for euclid::TypedTransform3D<T, Src, Dst> {
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
- self.m11.size_of(ops) + self.m12.size_of(ops) +
- self.m13.size_of(ops) + self.m14.size_of(ops) +
- self.m21.size_of(ops) + self.m22.size_of(ops) +
- self.m23.size_of(ops) + self.m24.size_of(ops) +
- self.m31.size_of(ops) + self.m32.size_of(ops) +
- self.m33.size_of(ops) + self.m34.size_of(ops) +
- self.m41.size_of(ops) + self.m42.size_of(ops) +
- self.m43.size_of(ops) + self.m44.size_of(ops)
+ self.m11.size_of(ops) +
+ self.m12.size_of(ops) +
+ self.m13.size_of(ops) +
+ self.m14.size_of(ops) +
+ self.m21.size_of(ops) +
+ self.m22.size_of(ops) +
+ self.m23.size_of(ops) +
+ self.m24.size_of(ops) +
+ self.m31.size_of(ops) +
+ self.m32.size_of(ops) +
+ self.m33.size_of(ops) +
+ self.m34.size_of(ops) +
+ self.m41.size_of(ops) +
+ self.m42.size_of(ops) +
+ self.m43.size_of(ops) +
+ self.m44.size_of(ops)
}
}
@@ -712,8 +761,7 @@ impl MallocSizeOf for selectors::parser::AncestorHashes {
}
}
-impl<Impl: selectors::parser::SelectorImpl> MallocSizeOf
- for selectors::parser::Selector<Impl>
+impl<Impl: selectors::parser::SelectorImpl> MallocSizeOf for selectors::parser::Selector<Impl>
where
Impl::NonTSPseudoClass: MallocSizeOf,
Impl::PseudoElement: MallocSizeOf,
@@ -733,8 +781,7 @@ where
}
}
-impl<Impl: selectors::parser::SelectorImpl> MallocSizeOf
- for selectors::parser::Component<Impl>
+impl<Impl: selectors::parser::SelectorImpl> MallocSizeOf for selectors::parser::Component<Impl>
where
Impl::NonTSPseudoClass: MallocSizeOf,
Impl::PseudoElement: MallocSizeOf,
@@ -743,22 +790,13 @@ where
use selectors::parser::Component;
match self {
- Component::AttributeOther(ref attr_selector) => {
- attr_selector.size_of(ops)
- }
- Component::Negation(ref components) => {
- components.size_of(ops)
- }
- Component::NonTSPseudoClass(ref pseudo) => {
- (*pseudo).size_of(ops)
- }
- Component::Slotted(ref selector) |
- Component::Host(Some(ref selector)) => {
+ Component::AttributeOther(ref attr_selector) => attr_selector.size_of(ops),
+ Component::Negation(ref components) => components.size_of(ops),
+ Component::NonTSPseudoClass(ref pseudo) => (*pseudo).size_of(ops),
+ Component::Slotted(ref selector) | Component::Host(Some(ref selector)) => {
selector.size_of(ops)
- }
- Component::PseudoElement(ref pseudo) => {
- (*pseudo).size_of(ops)
- }
+ },
+ Component::PseudoElement(ref pseudo) => (*pseudo).size_of(ops),
Component::Combinator(..) |
Component::ExplicitAnyNamespace |
Component::ExplicitNoNamespace |
@@ -845,12 +883,13 @@ macro_rules! malloc_size_of_is_0(
);
malloc_size_of_is_0!(bool, char, str);
-malloc_size_of_is_0!(u8, u16, u32, u64, usize);
-malloc_size_of_is_0!(i8, i16, i32, i64, isize);
+malloc_size_of_is_0!(u8, u16, u32, u64, u128, usize);
+malloc_size_of_is_0!(i8, i16, i32, i64, i128, isize);
malloc_size_of_is_0!(f32, f64);
malloc_size_of_is_0!(std::sync::atomic::AtomicBool);
-malloc_size_of_is_0!(std::sync::atomic::AtomicIsize, std::sync::atomic::AtomicUsize);
+malloc_size_of_is_0!(std::sync::atomic::AtomicIsize);
+malloc_size_of_is_0!(std::sync::atomic::AtomicUsize);
malloc_size_of_is_0!(Range<u8>, Range<u16>, Range<u32>, Range<u64>, Range<usize>);
malloc_size_of_is_0!(Range<i8>, Range<i16>, Range<i32>, Range<i64>, Range<isize>);
@@ -919,9 +958,7 @@ malloc_size_of_is_0!(webrender_api::TransformStyle);
#[cfg(feature = "servo")]
impl MallocSizeOf for xml5ever::QualName {
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
- self.prefix.size_of(ops) +
- self.ns.size_of(ops) +
- self.local.size_of(ops)
+ self.prefix.size_of(ops) + self.ns.size_of(ops) + self.local.size_of(ops)
}
}
@@ -946,9 +983,7 @@ impl MallocSizeOf for hyper::header::ContentType {
#[cfg(feature = "servo")]
impl MallocSizeOf for hyper::mime::Mime {
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
- self.0.size_of(ops) +
- self.1.size_of(ops) +
- self.2.size_of(ops)
+ self.0.size_of(ops) + self.1.size_of(ops) + self.2.size_of(ops)
}
}
@@ -975,10 +1010,12 @@ malloc_size_of_is_0!(time::Duration);
malloc_size_of_is_0!(time::Tm);
#[cfg(feature = "servo")]
-impl<T> MallocSizeOf for hyper_serde::Serde<T> where
- for <'de> hyper_serde::De<T>: serde::Deserialize<'de>,
- for <'a> hyper_serde::Ser<'a, T>: serde::Serialize,
- T: MallocSizeOf {
+impl<T> MallocSizeOf for hyper_serde::Serde<T>
+where
+ for<'de> hyper_serde::De<T>: serde::Deserialize<'de>,
+ for<'a> hyper_serde::Ser<'a, T>: serde::Serialize,
+ T: MallocSizeOf,
+{
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
self.0.size_of(ops)
}
@@ -1005,7 +1042,7 @@ impl MallocSizeOf for hyper::status::StatusCode {
/// Measurable that defers to inner value and used to verify MallocSizeOf implementation in a
/// struct.
#[derive(Clone)]
-pub struct Measurable<T: MallocSizeOf> (pub T);
+pub struct Measurable<T: MallocSizeOf>(pub T);
impl<T: MallocSizeOf> Deref for Measurable<T> {
type Target = T;
diff --git a/components/malloc_size_of_derive/lib.rs b/components/malloc_size_of_derive/lib.rs
index 20e9225277e..59446131508 100644
--- a/components/malloc_size_of_derive/lib.rs
+++ b/components/malloc_size_of_derive/lib.rs
@@ -11,25 +11,36 @@
//! A crate for deriving the MallocSizeOf trait.
extern crate quote;
-#[macro_use] extern crate syn;
-#[macro_use] extern crate synstructure;
+#[macro_use]
+extern crate syn;
+#[macro_use]
+extern crate synstructure;
#[cfg(not(test))]
decl_derive!([MallocSizeOf, attributes(ignore_malloc_size_of)] => malloc_size_of_derive);
fn malloc_size_of_derive(s: synstructure::Structure) -> quote::Tokens {
let match_body = s.each(|binding| {
- let ignore = binding.ast().attrs.iter().any(|attr| match attr.interpret_meta().unwrap() {
- syn::Meta::Word(ref ident) |
- syn::Meta::List(syn::MetaList { ref ident, .. }) if ident == "ignore_malloc_size_of" => {
- panic!("#[ignore_malloc_size_of] should have an explanation, \
- e.g. #[ignore_malloc_size_of = \"because reasons\"]");
- }
- syn::Meta::NameValue(syn::MetaNameValue { ref ident, .. }) if ident == "ignore_malloc_size_of" => {
- true
- }
- _ => false,
- });
+ let ignore = binding
+ .ast()
+ .attrs
+ .iter()
+ .any(|attr| match attr.interpret_meta().unwrap() {
+ syn::Meta::Word(ref ident) | syn::Meta::List(syn::MetaList { ref ident, .. })
+ if ident == "ignore_malloc_size_of" =>
+ {
+ panic!(
+ "#[ignore_malloc_size_of] should have an explanation, \
+ e.g. #[ignore_malloc_size_of = \"because reasons\"]"
+ );
+ }
+ syn::Meta::NameValue(syn::MetaNameValue { ref ident, .. })
+ if ident == "ignore_malloc_size_of" =>
+ {
+ true
+ },
+ _ => false,
+ });
if ignore {
None
} else if let syn::Type::Array(..) = binding.ast().ty {
@@ -51,7 +62,9 @@ fn malloc_size_of_derive(s: synstructure::Structure) -> quote::Tokens {
let mut where_clause = where_clause.unwrap_or(&parse_quote!(where)).clone();
for param in ast.generics.type_params() {
let ident = param.ident;
- where_clause.predicates.push(parse_quote!(#ident: ::malloc_size_of::MallocSizeOf));
+ where_clause
+ .predicates
+ .push(parse_quote!(#ident: ::malloc_size_of::MallocSizeOf));
}
let tokens = quote! {
@@ -73,18 +86,23 @@ fn malloc_size_of_derive(s: synstructure::Structure) -> quote::Tokens {
#[test]
fn test_struct() {
- let source =
- syn::parse_str("struct Foo<T> { bar: Bar, baz: T, #[ignore_malloc_size_of = \"\"] z: Arc<T> }").unwrap();
+ let source = syn::parse_str(
+ "struct Foo<T> { bar: Bar, baz: T, #[ignore_malloc_size_of = \"\"] z: Arc<T> }",
+ ).unwrap();
let source = synstructure::Structure::new(&source);
let expanded = malloc_size_of_derive(source).to_string();
let mut no_space = expanded.replace(" ", "");
macro_rules! match_count {
($e: expr, $count: expr) => {
- assert_eq!(no_space.matches(&$e.replace(" ", "")).count(), $count,
- "counting occurences of {:?} in {:?} (whitespace-insensitive)",
- $e, expanded)
- }
+ assert_eq!(
+ no_space.matches(&$e.replace(" ", "")).count(),
+ $count,
+ "counting occurences of {:?} in {:?} (whitespace-insensitive)",
+ $e,
+ expanded
+ )
+ };
}
match_count!("struct", 0);
match_count!("ignore_malloc_size_of", 0);
@@ -104,4 +122,3 @@ fn test_no_reason() {
let input = syn::parse_str("struct A { #[ignore_malloc_size_of] b: C }").unwrap();
malloc_size_of_derive(synstructure::Structure::new(&input));
}
-
diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs
index 667b46090c7..2ed528e17fb 100644
--- a/components/net/fetch/methods.rs
+++ b/components/net/fetch/methods.rs
@@ -25,14 +25,17 @@ use servo_url::ServoUrl;
use std::borrow::Cow;
use std::fmt;
use std::fs::File;
-use std::io::Read;
+use std::io::{BufReader, BufRead};
use std::mem;
use std::str;
use std::sync::{Arc, Mutex};
use std::sync::atomic::Ordering;
-use std::sync::mpsc::{Sender, Receiver};
+use std::sync::mpsc::{Sender, Receiver, channel};
+use std::thread;
use subresource_integrity::is_response_integrity_valid;
+const FILE_CHUNK_SIZE: usize = 32768; //32 KB
+
pub type Target<'a> = &'a mut (FetchTaskTarget + Send);
pub enum Data {
@@ -486,13 +489,51 @@ fn scheme_fetch(request: &mut Request,
Ok(file_path) => {
match File::open(file_path.clone()) {
Ok(mut file) => {
- let mut bytes = vec![];
- let _ = file.read_to_end(&mut bytes);
let mime = guess_mime_type(file_path);
let mut response = Response::new(url);
- *response.body.lock().unwrap() = ResponseBody::Done(bytes);
response.headers.set(ContentType(mime));
+
+ let (done_sender, done_receiver) = channel();
+ *done_chan = Some((done_sender.clone(), done_receiver));
+ *response.body.lock().unwrap() = ResponseBody::Receiving(vec![]);
+
+ let mut res_body = response.body.clone();
+
+ let cancellation_listener = context.cancellation_listener.clone();
+
+ thread::Builder::new().name("fetch file worker thread".to_string()).spawn(move || {
+ let mut reader = BufReader::with_capacity(FILE_CHUNK_SIZE, file);
+ loop {
+ if cancellation_listener.lock().unwrap().cancelled() {
+ *res_body.lock().unwrap() = ResponseBody::Done(vec![]);
+ let _ = done_sender.send(Data::Cancelled);
+ return;
+ }
+ let length = {
+ let mut buffer = reader.fill_buf().unwrap().to_vec();
+ let buffer_len = buffer.len();
+ if let ResponseBody::Receiving(ref mut body) = *res_body.lock().unwrap() {
+ body.extend_from_slice(&buffer);
+ let _ = done_sender.send(Data::Payload(buffer));
+ }
+ buffer_len
+ };
+ if length == 0 {
+ let mut body = res_body.lock().unwrap();
+ let completed_body = match *body {
+ ResponseBody::Receiving(ref mut body) => {
+ mem::replace(body, vec![])
+ },
+ _ => vec![],
+ };
+ *body = ResponseBody::Done(completed_body);
+ let _ = done_sender.send(Data::Done);
+ break;
+ }
+ reader.consume(length);
+ }
+ }).expect("Failed to create fetch file worker thread");
response
},
_ => Response::network_error(NetworkError::Internal("Opening file failed".into())),
diff --git a/components/profile/heartbeats.rs b/components/profile/heartbeats.rs
index 0d474fe3a11..ef95c853fce 100644
--- a/components/profile/heartbeats.rs
+++ b/components/profile/heartbeats.rs
@@ -14,24 +14,22 @@ use std::path::Path;
/// Initialize heartbeats
pub fn init() {
- lock_and_work(|hbs_opt|
+ lock_and_work(|hbs_opt| {
if hbs_opt.is_none() {
let mut hbs: Box<HashMap<ProfilerCategory, Heartbeat>> = Box::new(HashMap::new());
maybe_create_heartbeat(&mut hbs, ProfilerCategory::ApplicationHeartbeat);
*hbs_opt = Some(Box::into_raw(hbs))
}
- );
+ });
}
/// Log regmaining buffer data and cleanup heartbeats
pub fn cleanup() {
- let hbs_opt_box: Option<Box<HashMap<ProfilerCategory, Heartbeat>>> = lock_and_work(|hbs_opt|
- hbs_opt.take().map(|hbs_ptr|
- unsafe {
- Box::from_raw(hbs_ptr)
- }
- )
- );
+ let hbs_opt_box: Option<Box<HashMap<ProfilerCategory, Heartbeat>>> = lock_and_work(|hbs_opt| {
+ hbs_opt
+ .take()
+ .map(|hbs_ptr| unsafe { Box::from_raw(hbs_ptr) })
+ });
if let Some(mut hbs) = hbs_opt_box {
for (_, v) in hbs.iter_mut() {
// log any remaining heartbeat records before dropping
@@ -43,23 +41,23 @@ pub fn cleanup() {
/// Check if a heartbeat exists for the given category
pub fn is_heartbeat_enabled(category: &ProfilerCategory) -> bool {
- let is_enabled = lock_and_work(|hbs_opt|
- hbs_opt.map_or(false, |hbs_ptr|
- unsafe {
- (*hbs_ptr).contains_key(category)
- }
- )
- );
+ let is_enabled = lock_and_work(|hbs_opt| {
+ hbs_opt.map_or(false, |hbs_ptr| unsafe {
+ (*hbs_ptr).contains_key(category)
+ })
+ });
is_enabled || is_create_heartbeat(category)
}
/// Issue a heartbeat (if one exists) for the given category
-pub fn maybe_heartbeat(category: &ProfilerCategory,
- start_time: u64,
- end_time: u64,
- start_energy: u64,
- end_energy: u64) {
- lock_and_work(|hbs_opt|
+pub fn maybe_heartbeat(
+ category: &ProfilerCategory,
+ start_time: u64,
+ end_time: u64,
+ start_energy: u64,
+ end_energy: u64,
+) {
+ lock_and_work(|hbs_opt| {
if let Some(hbs_ptr) = *hbs_opt {
unsafe {
if !(*hbs_ptr).contains_key(category) {
@@ -70,13 +68,14 @@ pub fn maybe_heartbeat(category: &ProfilerCategory,
}
}
}
- );
+ });
}
// TODO(cimes): Android doesn't really do environment variables. Need a better way to configure dynamically.
fn is_create_heartbeat(category: &ProfilerCategory) -> bool {
- opts::get().profile_heartbeats || var_os(format!("SERVO_HEARTBEAT_ENABLE_{:?}", category)).is_some()
+ opts::get().profile_heartbeats ||
+ var_os(format!("SERVO_HEARTBEAT_ENABLE_{:?}", category)).is_some()
}
fn open_heartbeat_log<P: AsRef<Path>>(name: P) -> Option<File> {
@@ -111,8 +110,10 @@ fn get_heartbeat_window_size(category: &ProfilerCategory) -> usize {
}
/// Possibly create a heartbeat
-fn maybe_create_heartbeat(hbs: &mut HashMap<ProfilerCategory, Heartbeat>,
- category: ProfilerCategory) {
+fn maybe_create_heartbeat(
+ hbs: &mut HashMap<ProfilerCategory, Heartbeat>,
+ category: ProfilerCategory,
+) {
if is_create_heartbeat(&category) {
// get optional log file
let logfile: Option<File> = get_heartbeat_log(&category);
@@ -151,11 +152,11 @@ mod synchronized_heartbeat {
static HBS_SPINLOCK: AtomicBool = ATOMIC_BOOL_INIT;
pub fn lock_and_work<F, R>(work: F) -> R
- where F: FnOnce(&mut Option<*mut HashMap<ProfilerCategory, Heartbeat>>) -> R {
+ where
+ F: FnOnce(&mut Option<*mut HashMap<ProfilerCategory, Heartbeat>>) -> R,
+ {
while HBS_SPINLOCK.compare_and_swap(false, true, Ordering::SeqCst) {}
- let result = unsafe {
- work(&mut HBS)
- };
+ let result = unsafe { work(&mut HBS) };
HBS_SPINLOCK.store(false, Ordering::SeqCst);
result
}
@@ -163,7 +164,7 @@ mod synchronized_heartbeat {
/// Callback function used to log the window buffer.
/// When this is called from native C, the heartbeat is safely locked internally and the global lock is held.
/// If calling from this file, you must already hold the global lock!
- pub extern fn heartbeat_window_callback(hb: *const HeartbeatContext) {
+ pub extern "C" fn heartbeat_window_callback(hb: *const HeartbeatContext) {
unsafe {
if let Some(hbs_ptr) = HBS {
for (_, v) in (*hbs_ptr).iter_mut() {
diff --git a/components/profile/mem.rs b/components/profile/mem.rs
index bb2a3873a91..2f2cda21847 100644
--- a/components/profile/mem.rs
+++ b/components/profile/mem.rs
@@ -36,22 +36,24 @@ impl Profiler {
// Create the timer thread if a period was provided.
if let Some(period) = period {
let chan = chan.clone();
- thread::Builder::new().name("Memory profiler timer".to_owned()).spawn(move || {
- loop {
+ thread::Builder::new()
+ .name("Memory profiler timer".to_owned())
+ .spawn(move || loop {
thread::sleep(duration_from_seconds(period));
if chan.send(ProfilerMsg::Print).is_err() {
break;
}
- }
- }).expect("Thread spawning failed");
+ }).expect("Thread spawning failed");
}
// Always spawn the memory profiler. If there is no timer thread it won't receive regular
// `Print` events, but it will still receive the other events.
- thread::Builder::new().name("Memory profiler".to_owned()).spawn(move || {
- let mut mem_profiler = Profiler::new(port);
- mem_profiler.start();
- }).expect("Thread spawning failed");
+ thread::Builder::new()
+ .name("Memory profiler".to_owned())
+ .spawn(move || {
+ let mut mem_profiler = Profiler::new(port);
+ mem_profiler.start();
+ }).expect("Thread spawning failed");
let mem_profiler_chan = ProfilerChan(chan);
@@ -59,12 +61,17 @@ impl Profiler {
// be unregistered, because as long as the memory profiler is running the system memory
// reporter can make measurements.
let (system_reporter_sender, system_reporter_receiver) = ipc::channel().unwrap();
- ROUTER.add_route(system_reporter_receiver.to_opaque(), Box::new(|message| {
- let request: ReporterRequest = message.to().unwrap();
- system_reporter::collect_reports(request)
- }));
- mem_profiler_chan.send(ProfilerMsg::RegisterReporter("system".to_owned(),
- Reporter(system_reporter_sender)));
+ ROUTER.add_route(
+ system_reporter_receiver.to_opaque(),
+ Box::new(|message| {
+ let request: ReporterRequest = message.to().unwrap();
+ system_reporter::collect_reports(request)
+ }),
+ );
+ mem_profiler_chan.send(ProfilerMsg::RegisterReporter(
+ "system".to_owned(),
+ Reporter(system_reporter_sender),
+ ));
mem_profiler_chan
}
@@ -79,9 +86,9 @@ impl Profiler {
pub fn start(&mut self) {
while let Ok(msg) = self.port.recv() {
- if !self.handle_msg(msg) {
- break
- }
+ if !self.handle_msg(msg) {
+ break;
+ }
}
}
@@ -92,8 +99,10 @@ impl Profiler {
let name_clone = name.clone();
match self.reporters.insert(name, reporter) {
None => true,
- Some(_) => panic!(format!("RegisterReporter: '{}' name is already in use",
- name_clone)),
+ Some(_) => panic!(format!(
+ "RegisterReporter: '{}' name is already in use",
+ name_clone
+ )),
}
},
@@ -101,8 +110,7 @@ impl Profiler {
// Panic if it hasn't previously been registered.
match self.reporters.remove(&name) {
Some(_) => true,
- None =>
- panic!(format!("UnregisterReporter: '{}' name is unknown", &name)),
+ None => panic!(format!("UnregisterReporter: '{}' name is unknown", &name)),
}
},
@@ -111,7 +119,7 @@ impl Profiler {
true
},
- ProfilerMsg::Exit => false
+ ProfilerMsg::Exit => false,
}
}
@@ -149,17 +157,20 @@ impl Profiler {
ReportKind::ExplicitJemallocHeapSize |
ReportKind::ExplicitSystemHeapSize |
ReportKind::ExplicitNonHeapSize |
- ReportKind::ExplicitUnknownLocationSize =>
- report.path.insert(0, String::from("explicit")),
+ ReportKind::ExplicitUnknownLocationSize => {
+ report.path.insert(0, String::from("explicit"))
+ },
ReportKind::NonExplicitSize => {},
}
// Update the reported fractions of the heaps, when appropriate.
match report.kind {
- ReportKind::ExplicitJemallocHeapSize =>
- jemalloc_heap_reported_size += report.size,
- ReportKind::ExplicitSystemHeapSize =>
- system_heap_reported_size += report.size,
+ ReportKind::ExplicitJemallocHeapSize => {
+ jemalloc_heap_reported_size += report.size
+ },
+ ReportKind::ExplicitSystemHeapSize => {
+ system_heap_reported_size += report.size
+ },
_ => {},
}
@@ -182,12 +193,16 @@ impl Profiler {
// Compute and insert the heap-unclassified values.
if let Some(jemalloc_heap_allocated_size) = jemalloc_heap_allocated_size {
- forest.insert(&path!["explicit", "jemalloc-heap-unclassified"],
- jemalloc_heap_allocated_size - jemalloc_heap_reported_size);
+ forest.insert(
+ &path!["explicit", "jemalloc-heap-unclassified"],
+ jemalloc_heap_allocated_size - jemalloc_heap_reported_size,
+ );
}
if let Some(system_heap_allocated_size) = system_heap_allocated_size {
- forest.insert(&path!["explicit", "system-heap-unclassified"],
- system_heap_allocated_size - system_heap_reported_size);
+ forest.insert(
+ &path!["explicit", "system-heap-unclassified"],
+ system_heap_allocated_size - system_heap_reported_size,
+ );
}
forest.print();
@@ -222,7 +237,7 @@ impl ReportsTree {
size: 0,
count: 0,
path_seg: path_seg,
- children: vec![]
+ children: vec![],
}
}
@@ -249,7 +264,7 @@ impl ReportsTree {
t.children.len() - 1
},
};
- let tmp = t; // this temporary is needed to satisfy the borrow checker
+ let tmp = t; // this temporary is needed to satisfy the borrow checker
t = &mut tmp.children[i];
}
@@ -286,9 +301,18 @@ impl ReportsTree {
}
let mebi = 1024f64 * 1024f64;
- let count_str = if self.count > 1 { format!(" [{}]", self.count) } else { "".to_owned() };
- println!("|{}{:8.2} MiB -- {}{}",
- indent_str, (self.size as f64) / mebi, self.path_seg, count_str);
+ let count_str = if self.count > 1 {
+ format!(" [{}]", self.count)
+ } else {
+ "".to_owned()
+ };
+ println!(
+ "|{}{:8.2} MiB -- {}{}",
+ indent_str,
+ (self.size as f64) / mebi,
+ self.path_seg,
+ count_str
+ );
for child in &self.children {
child.print(depth + 1);
@@ -314,7 +338,8 @@ impl ReportsForest {
let (head, tail) = path.split_first().unwrap();
// Get the right tree, creating it if necessary.
if !self.trees.contains_key(head) {
- self.trees.insert(head.clone(), ReportsTree::new(head.clone()));
+ self.trees
+ .insert(head.clone(), ReportsTree::new(head.clone()));
}
let t = self.trees.get_mut(head).unwrap();
@@ -405,7 +430,10 @@ mod system_reporter {
// directly from the jemalloc documentation.
// "Total number of bytes allocated by the application."
- report(path![JEMALLOC_HEAP_ALLOCATED_STR], jemalloc_stat("stats.allocated"));
+ report(
+ path![JEMALLOC_HEAP_ALLOCATED_STR],
+ jemalloc_stat("stats.allocated"),
+ );
// "Total number of bytes in active pages allocated by the application.
// This is a multiple of the page size, and greater than or equal to
@@ -422,20 +450,20 @@ mod system_reporter {
}
#[cfg(target_os = "linux")]
- extern {
+ extern "C" {
fn mallinfo() -> struct_mallinfo;
}
#[cfg(target_os = "linux")]
#[repr(C)]
pub struct struct_mallinfo {
- arena: c_int,
- ordblks: c_int,
- smblks: c_int,
- hblks: c_int,
- hblkhd: c_int,
- usmblks: c_int,
- fsmblks: c_int,
+ arena: c_int,
+ ordblks: c_int,
+ smblks: c_int,
+ hblks: c_int,
+ hblkhd: c_int,
+ usmblks: c_int,
+ fsmblks: c_int,
uordblks: c_int,
fordblks: c_int,
keepcost: c_int,
@@ -487,15 +515,26 @@ mod system_reporter {
// Using the same values for the `old` and `new` parameters is enough
// to get the statistics updated.
let rv = unsafe {
- mallctl(epoch_c_name.as_ptr(), epoch_ptr, &mut epoch_len, epoch_ptr,
- epoch_len)
+ mallctl(
+ epoch_c_name.as_ptr(),
+ epoch_ptr,
+ &mut epoch_len,
+ epoch_ptr,
+ epoch_len,
+ )
};
if rv != 0 {
return None;
}
let rv = unsafe {
- mallctl(value_c_name.as_ptr(), value_ptr, &mut value_len, null_mut(), 0)
+ mallctl(
+ value_c_name.as_ptr(),
+ value_ptr,
+ &mut value_len,
+ null_mut(),
+ 0,
+ )
};
if rv != 0 {
return None;
@@ -511,9 +550,7 @@ mod system_reporter {
#[cfg(target_os = "linux")]
fn page_size() -> usize {
- unsafe {
- ::libc::sysconf(::libc::_SC_PAGESIZE) as usize
- }
+ unsafe { ::libc::sysconf(::libc::_SC_PAGESIZE) as usize }
}
#[cfg(target_os = "linux")]
@@ -585,14 +622,18 @@ mod system_reporter {
};
let seg_re = Regex::new(
- r"^[:xdigit:]+-[:xdigit:]+ (....) [:xdigit:]+ [:xdigit:]+:[:xdigit:]+ \d+ +(.*)").unwrap();
+ r"^[:xdigit:]+-[:xdigit:]+ (....) [:xdigit:]+ [:xdigit:]+:[:xdigit:]+ \d+ +(.*)",
+ ).unwrap();
let rss_re = Regex::new(r"^Rss: +(\d+) kB").unwrap();
// We record each segment's resident size.
let mut seg_map: HashMap<String, usize> = HashMap::new();
#[derive(PartialEq)]
- enum LookingFor { Segment, Rss }
+ enum LookingFor {
+ Segment,
+ Rss,
+ }
let mut looking_for = LookingFor::Segment;
let mut curr_seg_name = String::new();
@@ -644,7 +685,9 @@ mod system_reporter {
curr_seg_name.clone()
};
match seg_map.entry(seg_name) {
- Entry::Vacant(entry) => { entry.insert(rss); },
+ Entry::Vacant(entry) => {
+ entry.insert(rss);
+ },
Entry::Occupied(mut entry) => *entry.get_mut() += rss,
}
}
diff --git a/components/profile/time.rs b/components/profile/time.rs
index 6c1130345e0..fd09ca8cd8e 100644
--- a/components/profile/time.rs
+++ b/components/profile/time.rs
@@ -50,11 +50,7 @@ impl Formattable for Option<TimerMetadata> {
},
_ => {
/* The profiling output is the terminal */
- let url = if url.len() > 30 {
- &url[..30]
- } else {
- url
- };
+ let url = if url.len() > 30 { &url[..30] } else { url };
let incremental = match meta.incremental {
TimerMetadataReflowType::Incremental => " yes",
TimerMetadataReflowType::FirstReflow => " no ",
@@ -67,16 +63,12 @@ impl Formattable for Option<TimerMetadata> {
},
}
},
- None => {
- match *output {
- Some(OutputOptions::FileName(_)) => {
- format!(" {}\t{}\t{}", " N/A", " N/A", " N/A")
- },
- _ => {
- format!(" {:14} {:9} {:30}", " N/A", " N/A", " N/A")
- }
- }
- }
+ None => match *output {
+ Some(OutputOptions::FileName(_)) => {
+ format!(" {}\t{}\t{}", " N/A", " N/A", " N/A")
+ },
+ _ => format!(" {:14} {:9} {:30}", " N/A", " N/A", " N/A"),
+ },
}
}
}
@@ -102,7 +94,7 @@ impl Formattable for ProfilerCategory {
ProfilerCategory::LayoutSelectorMatch |
ProfilerCategory::LayoutTreeBuilder |
ProfilerCategory::LayoutTextShaping => "| + ",
- _ => ""
+ _ => "",
};
let name = match *self {
ProfilerCategory::Compositing => "Compositing",
@@ -183,27 +175,29 @@ impl Profiler {
Some(ref option) => {
// Spawn the time profiler thread
let outputoption = option.clone();
- thread::Builder::new().name("Time profiler".to_owned()).spawn(move || {
- let trace = file_path.as_ref()
- .and_then(|p| TraceDump::new(p).ok());
- let mut profiler = Profiler::new(port, trace, Some(outputoption));
- profiler.start();
- }).expect("Thread spawning failed");
+ thread::Builder::new()
+ .name("Time profiler".to_owned())
+ .spawn(move || {
+ let trace = file_path.as_ref().and_then(|p| TraceDump::new(p).ok());
+ let mut profiler = Profiler::new(port, trace, Some(outputoption));
+ profiler.start();
+ }).expect("Thread spawning failed");
// decide if we need to spawn the timer thread
match option {
- &OutputOptions::FileName(_) |
- &OutputOptions::DB(_, _, _, _) => { /* no timer thread needed */ },
+ &OutputOptions::FileName(_) | &OutputOptions::DB(_, _, _, _) => {
+ /* no timer thread needed */
+ },
&OutputOptions::Stdout(period) => {
// Spawn a timer thread
let chan = chan.clone();
- thread::Builder::new().name("Time profiler timer".to_owned()).spawn(move || {
- loop {
+ thread::Builder::new()
+ .name("Time profiler timer".to_owned())
+ .spawn(move || loop {
thread::sleep(duration_from_seconds(period));
if chan.send(ProfilerMsg::Print).is_err() {
break;
}
- }
- }).expect("Thread spawning failed");
+ }).expect("Thread spawning failed");
},
}
},
@@ -211,37 +205,37 @@ impl Profiler {
// this is when the -p option hasn't been specified
if file_path.is_some() {
// Spawn the time profiler
- thread::Builder::new().name("Time profiler".to_owned()).spawn(move || {
- let trace = file_path.as_ref()
- .and_then(|p| TraceDump::new(p).ok());
- let mut profiler = Profiler::new(port, trace, None);
- profiler.start();
- }).expect("Thread spawning failed");
+ thread::Builder::new()
+ .name("Time profiler".to_owned())
+ .spawn(move || {
+ let trace = file_path.as_ref().and_then(|p| TraceDump::new(p).ok());
+ let mut profiler = Profiler::new(port, trace, None);
+ profiler.start();
+ }).expect("Thread spawning failed");
} else {
// No-op to handle messages when the time profiler is not printing:
- thread::Builder::new().name("Time profiler".to_owned()).spawn(move || {
- loop {
+ thread::Builder::new()
+ .name("Time profiler".to_owned())
+ .spawn(move || loop {
match port.recv() {
Err(_) => break,
Ok(ProfilerMsg::Exit(chan)) => {
let _ = chan.send(());
break;
},
- _ => {}
+ _ => {},
}
- }
- }).expect("Thread spawning failed");
+ }).expect("Thread spawning failed");
}
- }
+ },
}
heartbeats::init();
let profiler_chan = ProfilerChan(chan);
// only spawn the application-level profiler thread if its heartbeat is enabled
- let run_ap_thread = || {
- heartbeats::is_heartbeat_enabled(&ProfilerCategory::ApplicationHeartbeat)
- };
+ let run_ap_thread =
+ || heartbeats::is_heartbeat_enabled(&ProfilerCategory::ApplicationHeartbeat);
if run_ap_thread() {
let profiler_chan = profiler_chan.clone();
// min of 1 heartbeat/sec, max of 20 should provide accurate enough power/energy readings
@@ -249,39 +243,52 @@ impl Profiler {
const SLEEP_MS: u32 = 10;
const MIN_ENERGY_INTERVAL_MS: u32 = 50;
const MAX_ENERGY_INTERVAL_MS: u32 = 1000;
- let interval_ms = enforce_range(MIN_ENERGY_INTERVAL_MS, MAX_ENERGY_INTERVAL_MS, energy_interval_ms());
+ let interval_ms = enforce_range(
+ MIN_ENERGY_INTERVAL_MS,
+ MAX_ENERGY_INTERVAL_MS,
+ energy_interval_ms(),
+ );
let loop_count: u32 = (interval_ms as f32 / SLEEP_MS as f32).ceil() as u32;
- thread::Builder::new().name("Application heartbeat profiler".to_owned()).spawn(move || {
- let mut start_time = precise_time_ns();
- let mut start_energy = read_energy_uj();
- loop {
- for _ in 0..loop_count {
- if run_ap_thread() {
- thread::sleep(Duration::from_millis(SLEEP_MS as u64))
- } else {
- return
+ thread::Builder::new()
+ .name("Application heartbeat profiler".to_owned())
+ .spawn(move || {
+ let mut start_time = precise_time_ns();
+ let mut start_energy = read_energy_uj();
+ loop {
+ for _ in 0..loop_count {
+ if run_ap_thread() {
+ thread::sleep(Duration::from_millis(SLEEP_MS as u64))
+ } else {
+ return;
+ }
}
+ let end_time = precise_time_ns();
+ let end_energy = read_energy_uj();
+ // send using the inner channel
+ // (using ProfilerChan.send() forces an unwrap
+ // and sometimes panics for this background profiler)
+ let ProfilerChan(ref c) = profiler_chan;
+ if let Err(_) = c.send(ProfilerMsg::Time(
+ (ProfilerCategory::ApplicationHeartbeat, None),
+ (start_time, end_time),
+ (start_energy, end_energy),
+ )) {
+ return;
+ }
+ start_time = end_time;
+ start_energy = end_energy;
}
- let end_time = precise_time_ns();
- let end_energy = read_energy_uj();
- // send using the inner channel
- // (using ProfilerChan.send() forces an unwrap and sometimes panics for this background profiler)
- let ProfilerChan(ref c) = profiler_chan;
- if let Err(_) = c.send(ProfilerMsg::Time((ProfilerCategory::ApplicationHeartbeat, None),
- (start_time, end_time),
- (start_energy, end_energy))) {
- return;
- }
- start_time = end_time;
- start_energy = end_energy;
- }
- }).expect("Thread spawning failed");
+ }).expect("Thread spawning failed");
}
profiler_chan
}
- pub fn new(port: IpcReceiver<ProfilerMsg>, trace: Option<TraceDump>, output: Option<OutputOptions>) -> Profiler {
+ pub fn new(
+ port: IpcReceiver<ProfilerMsg>,
+ trace: Option<TraceDump>,
+ output: Option<OutputOptions>,
+ ) -> Profiler {
Profiler {
port: port,
buckets: BTreeMap::new(),
@@ -293,9 +300,9 @@ impl Profiler {
pub fn start(&mut self) {
while let Ok(msg) = self.port.recv() {
- if !self.handle_msg(msg) {
- break
- }
+ if !self.handle_msg(msg) {
+ break;
+ }
}
}
@@ -320,7 +327,9 @@ impl Profiler {
ProfilerMsg::Get(k, sender) => {
let vec_option = self.buckets.get(&k);
match vec_option {
- Some(vec_entry) => sender.send(ProfilerData::Record(vec_entry.to_vec())).unwrap(),
+ Some(vec_entry) => sender
+ .send(ProfilerData::Record(vec_entry.to_vec()))
+ .unwrap(),
None => sender.send(ProfilerData::NoRecords).unwrap(),
};
},
@@ -344,11 +353,12 @@ impl Profiler {
let data_len = data.len();
debug_assert!(data_len > 0);
- let (mean, median, min, max) =
- (data.iter().sum::<f64>() / (data_len as f64),
+ let (mean, median, min, max) = (
+ data.iter().sum::<f64>() / (data_len as f64),
data[data_len / 2],
data[0],
- data[data_len - 1]);
+ data[data_len - 1],
+ );
(mean, median, min, max)
}
@@ -357,21 +367,34 @@ impl Profiler {
Some(OutputOptions::FileName(ref filename)) => {
let path = Path::new(&filename);
let mut file = match File::create(&path) {
- Err(e) => panic!("Couldn't create {}: {}",
- path.display(),
- Error::description(&e)),
+ Err(e) => panic!(
+ "Couldn't create {}: {}",
+ path.display(),
+ Error::description(&e)
+ ),
Ok(file) => file,
};
- write!(file, "_category_\t_incremental?_\t_iframe?_\t_url_\t_mean (ms)_\t\
- _median (ms)_\t_min (ms)_\t_max (ms)_\t_events_\n").unwrap();
+ write!(
+ file,
+ "_category_\t_incremental?_\t_iframe?_\t_url_\t_mean (ms)_\t\
+ _median (ms)_\t_min (ms)_\t_max (ms)_\t_events_\n"
+ ).unwrap();
for (&(ref category, ref meta), ref mut data) in &mut self.buckets {
data.sort_by(|a, b| a.partial_cmp(b).expect("No NaN values in profiles"));
let data_len = data.len();
if data_len > 0 {
let (mean, median, min, max) = Self::get_statistics(data);
- write!(file, "{}\t{}\t{:15.4}\t{:15.4}\t{:15.4}\t{:15.4}\t{:15}\n",
- category.format(&self.output), meta.format(&self.output),
- mean, median, min, max, data_len).unwrap();
+ write!(
+ file,
+ "{}\t{}\t{:15.4}\t{:15.4}\t{:15.4}\t{:15.4}\t{:15}\n",
+ category.format(&self.output),
+ meta.format(&self.output),
+ mean,
+ median,
+ min,
+ max,
+ data_len
+ ).unwrap();
}
}
},
@@ -379,18 +402,35 @@ impl Profiler {
let stdout = io::stdout();
let mut lock = stdout.lock();
- writeln!(&mut lock, "{:35} {:14} {:9} {:30} {:15} {:15} {:-15} {:-15} {:-15}",
- "_category_", "_incremental?_", "_iframe?_",
- " _url_", " _mean (ms)_", " _median (ms)_",
- " _min (ms)_", " _max (ms)_", " _events_").unwrap();
+ writeln!(
+ &mut lock,
+ "{:35} {:14} {:9} {:30} {:15} {:15} {:-15} {:-15} {:-15}",
+ "_category_",
+ "_incremental?_",
+ "_iframe?_",
+ " _url_",
+ " _mean (ms)_",
+ " _median (ms)_",
+ " _min (ms)_",
+ " _max (ms)_",
+ " _events_"
+ ).unwrap();
for (&(ref category, ref meta), ref mut data) in &mut self.buckets {
data.sort_by(|a, b| a.partial_cmp(b).expect("No NaN values in profiles"));
let data_len = data.len();
if data_len > 0 {
let (mean, median, min, max) = Self::get_statistics(data);
- writeln!(&mut lock, "{:-35}{} {:15.4} {:15.4} {:15.4} {:15.4} {:15}",
- category.format(&self.output), meta.format(&self.output), mean, median, min, max,
- data_len).unwrap();
+ writeln!(
+ &mut lock,
+ "{:-35}{} {:15.4} {:15.4} {:15.4} {:15.4} {:15}",
+ category.format(&self.output),
+ meta.format(&self.output),
+ mean,
+ median,
+ min,
+ max,
+ data_len
+ ).unwrap();
}
}
writeln!(&mut lock, "").unwrap();
@@ -434,22 +474,22 @@ impl Profiler {
}
}
}
-
},
None => { /* Do nothing if no output option has been set */ },
};
}
}
-fn enforce_range<T>(min: T, max: T, value: T) -> T where T: Ord {
+fn enforce_range<T>(min: T, max: T, value: T) -> T
+where
+ T: Ord,
+{
assert!(min <= max);
match value.cmp(&max) {
Ordering::Equal | Ordering::Greater => max,
- Ordering::Less => {
- match value.cmp(&min) {
- Ordering::Equal | Ordering::Less => min,
- Ordering::Greater => value,
- }
+ Ordering::Less => match value.cmp(&min) {
+ Ordering::Equal | Ordering::Less => min,
+ Ordering::Greater => value,
},
}
}
diff --git a/components/profile/trace_dump.rs b/components/profile/trace_dump.rs
index b0c8f9d7ef5..4654f4dfb57 100644
--- a/components/profile/trace_dump.rs
+++ b/components/profile/trace_dump.rs
@@ -38,7 +38,8 @@ impl TraceDump {
/// Create a new TraceDump and write the prologue of the HTML file out to
/// disk.
pub fn new<P>(trace_file_path: P) -> io::Result<TraceDump>
- where P: AsRef<path::Path>
+ where
+ P: AsRef<path::Path>,
{
let mut file = fs::File::create(trace_file_path)?;
write_prologue(&mut file)?;
@@ -46,10 +47,12 @@ impl TraceDump {
}
/// Write one trace to the trace dump file.
- pub fn write_one(&mut self,
- category: &(ProfilerCategory, Option<TimerMetadata>),
- time: (u64, u64),
- energy: (u64, u64)) {
+ pub fn write_one(
+ &mut self,
+ category: &(ProfilerCategory, Option<TimerMetadata>),
+ time: (u64, u64),
+ energy: (u64, u64),
+ ) {
let entry = TraceEntry {
category: category.0,
metadata: category.1.clone(),
diff --git a/components/profile_traits/energy.rs b/components/profile_traits/energy.rs
index 1e34645b180..bbd427ca834 100644
--- a/components/profile_traits/energy.rs
+++ b/components/profile_traits/energy.rs
@@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
#[cfg(feature = "energy-profiling")]
pub fn read_energy_uj() -> u64 {
energymon::read_energy_uj()
@@ -33,7 +32,6 @@ mod energymon {
use std::mem;
use std::sync::{Once, ONCE_INIT};
-
static mut EM: Option<*mut EnergyMon> = None;
fn init() {
@@ -60,9 +58,7 @@ mod energymon {
pub fn get_min_interval_ms() -> u32 {
init();
- unsafe {
- EM.map_or(0, |em| ((*em).interval_us() as f64 / 1000.0).ceil() as u32)
- }
+ unsafe { EM.map_or(0, |em| ((*em).interval_us() as f64 / 1000.0).ceil() as u32) }
}
}
diff --git a/components/profile_traits/ipc.rs b/components/profile_traits/ipc.rs
index fe64d54ef07..cd4553ea8bc 100644
--- a/components/profile_traits/ipc.rs
+++ b/components/profile_traits/ipc.rs
@@ -10,12 +10,18 @@ use time;
use time::ProfilerCategory;
use time::ProfilerChan;
-pub struct IpcReceiver<T> where T: for<'de> Deserialize<'de> + Serialize {
+pub struct IpcReceiver<T>
+where
+ T: for<'de> Deserialize<'de> + Serialize,
+{
ipc_receiver: ipc::IpcReceiver<T>,
time_profile_chan: ProfilerChan,
}
-impl<T> IpcReceiver<T> where T: for<'de> Deserialize<'de> + Serialize {
+impl<T> IpcReceiver<T>
+where
+ T: for<'de> Deserialize<'de> + Serialize,
+{
pub fn recv(&self) -> Result<T, bincode::Error> {
time::profile(
ProfilerCategory::IpcReceiver,
@@ -34,8 +40,12 @@ impl<T> IpcReceiver<T> where T: for<'de> Deserialize<'de> + Serialize {
}
}
-pub fn channel<T>(time_profile_chan: ProfilerChan) -> Result<(ipc::IpcSender<T>, IpcReceiver<T>), Error>
- where T: for<'de> Deserialize<'de> + Serialize, {
+pub fn channel<T>(
+ time_profile_chan: ProfilerChan,
+) -> Result<(ipc::IpcSender<T>, IpcReceiver<T>), Error>
+where
+ T: for<'de> Deserialize<'de> + Serialize,
+{
let (ipc_sender, ipc_receiver) = ipc::channel()?;
let profiled_ipc_receiver = IpcReceiver {
ipc_receiver,
diff --git a/components/profile_traits/lib.rs b/components/profile_traits/lib.rs
index 029e59a3241..e70d0b7ac40 100644
--- a/components/profile_traits/lib.rs
+++ b/components/profile_traits/lib.rs
@@ -12,7 +12,8 @@ extern crate bincode;
extern crate ipc_channel;
#[macro_use]
extern crate log;
-#[macro_use] extern crate serde;
+#[macro_use]
+extern crate serde;
extern crate servo_config;
extern crate signpost;
diff --git a/components/profile_traits/mem.rs b/components/profile_traits/mem.rs
index b0df9ac7db7..8e4d756884b 100644
--- a/components/profile_traits/mem.rs
+++ b/components/profile_traits/mem.rs
@@ -21,15 +21,24 @@ pub trait OpaqueSender<T> {
impl<T> OpaqueSender<T> for Sender<T> {
fn send(&self, message: T) {
if let Err(e) = Sender::send(self, message) {
- warn!("Error communicating with the target thread from the profiler: {}", e);
+ warn!(
+ "Error communicating with the target thread from the profiler: {}",
+ e
+ );
}
}
}
-impl<T> OpaqueSender<T> for IpcSender<T> where T: serde::Serialize {
+impl<T> OpaqueSender<T> for IpcSender<T>
+where
+ T: serde::Serialize,
+{
fn send(&self, message: T) {
if let Err(e) = IpcSender::send(self, message) {
- warn!("Error communicating with the target thread from the profiler: {}", e);
+ warn!(
+ "Error communicating with the target thread from the profiler: {}",
+ e
+ );
}
}
}
@@ -50,24 +59,32 @@ impl ProfilerChan {
}
/// Runs `f()` with memory profiling.
- pub fn run_with_memory_reporting<F, M, T, C>(&self, f: F,
- reporter_name: String,
- channel_for_reporter: C,
- msg: M)
- where F: FnOnce(),
- M: Fn(ReportsChan) -> T + Send + 'static,
- T: Send + 'static,
- C: OpaqueSender<T> + Send + 'static
+ pub fn run_with_memory_reporting<F, M, T, C>(
+ &self,
+ f: F,
+ reporter_name: String,
+ channel_for_reporter: C,
+ msg: M,
+ ) where
+ F: FnOnce(),
+ M: Fn(ReportsChan) -> T + Send + 'static,
+ T: Send + 'static,
+ C: OpaqueSender<T> + Send + 'static,
{
// Register the memory reporter.
let (reporter_sender, reporter_receiver) = ipc::channel().unwrap();
- ROUTER.add_route(reporter_receiver.to_opaque(), Box::new(move |message| {
- // Just injects an appropriate event into the paint thread's queue.
- let request: ReporterRequest = message.to().unwrap();
- channel_for_reporter.send(msg(request.reports_channel));
- }));
- self.send(ProfilerMsg::RegisterReporter(reporter_name.clone(),
- Reporter(reporter_sender)));
+ ROUTER.add_route(
+ reporter_receiver.to_opaque(),
+ Box::new(move |message| {
+ // Just injects an appropriate event into the paint thread's queue.
+ let request: ReporterRequest = message.to().unwrap();
+ channel_for_reporter.send(msg(request.reports_channel));
+ }),
+ );
+ self.send(ProfilerMsg::RegisterReporter(
+ reporter_name.clone(),
+ Reporter(reporter_sender),
+ ));
f();
@@ -154,9 +171,10 @@ pub struct Reporter(pub IpcSender<ReporterRequest>);
impl Reporter {
/// Collect one or more memory reports. Returns true on success, and false on failure.
pub fn collect_reports(&self, reports_chan: ReportsChan) {
- self.0.send(ReporterRequest {
- reports_channel: reports_chan,
- }).unwrap()
+ self.0
+ .send(ReporterRequest {
+ reports_channel: reports_chan,
+ }).unwrap()
}
}
@@ -188,4 +206,3 @@ pub enum ProfilerMsg {
/// Tells the memory profiler to shut down.
Exit,
}
-
diff --git a/components/profile_traits/time.rs b/components/profile_traits/time.rs
index 2c297003b9e..f905348a882 100644
--- a/components/profile_traits/time.rs
+++ b/components/profile_traits/time.rs
@@ -37,9 +37,16 @@ pub enum ProfilerData {
#[derive(Clone, Deserialize, Serialize)]
pub enum ProfilerMsg {
/// Normal message used for reporting time
- Time((ProfilerCategory, Option<TimerMetadata>), (u64, u64), (u64, u64)),
+ Time(
+ (ProfilerCategory, Option<TimerMetadata>),
+ (u64, u64),
+ (u64, u64),
+ ),
/// Message used to get time spend entries for a particular ProfilerBuckets (in nanoseconds)
- Get((ProfilerCategory, Option<TimerMetadata>), IpcSender<ProfilerData>),
+ Get(
+ (ProfilerCategory, Option<TimerMetadata>),
+ IpcSender<ProfilerData>,
+ ),
/// Message used to force print the profiling metrics
Print,
/// Tells the profiler to shut down.
@@ -118,12 +125,14 @@ pub enum TimerMetadataReflowType {
FirstReflow,
}
-pub fn profile<T, F>(category: ProfilerCategory,
- meta: Option<TimerMetadata>,
- profiler_chan: ProfilerChan,
- callback: F)
- -> T
- where F: FnOnce() -> T,
+pub fn profile<T, F>(
+ category: ProfilerCategory,
+ meta: Option<TimerMetadata>,
+ profiler_chan: ProfilerChan,
+ callback: F,
+) -> T
+where
+ F: FnOnce() -> T,
{
if opts::get().signpost {
signpost::start(category as u32, &[0, 0, 0, (category as usize) >> 4]);
@@ -139,24 +148,30 @@ pub fn profile<T, F>(category: ProfilerCategory,
signpost::end(category as u32, &[0, 0, 0, (category as usize) >> 4]);
}
- send_profile_data(category,
- meta,
- &profiler_chan,
- start_time,
- end_time,
- start_energy,
- end_energy);
+ send_profile_data(
+ category,
+ meta,
+ &profiler_chan,
+ start_time,
+ end_time,
+ start_energy,
+ end_energy,
+ );
val
}
-pub fn send_profile_data(category: ProfilerCategory,
- meta: Option<TimerMetadata>,
- profiler_chan: &ProfilerChan,
- start_time: u64,
- end_time: u64,
- start_energy: u64,
- end_energy: u64) {
- profiler_chan.send(ProfilerMsg::Time((category, meta),
- (start_time, end_time),
- (start_energy, end_energy)));
+pub fn send_profile_data(
+ category: ProfilerCategory,
+ meta: Option<TimerMetadata>,
+ profiler_chan: &ProfilerChan,
+ start_time: u64,
+ end_time: u64,
+ start_energy: u64,
+ end_energy: u64,
+) {
+ profiler_chan.send(ProfilerMsg::Time(
+ (category, meta),
+ (start_time, end_time),
+ (start_energy, end_energy),
+ ));
}
diff --git a/components/script/dom/abstractworkerglobalscope.rs b/components/script/dom/abstractworkerglobalscope.rs
index f6d868765ed..45c594dbaee 100644
--- a/components/script/dom/abstractworkerglobalscope.rs
+++ b/components/script/dom/abstractworkerglobalscope.rs
@@ -2,25 +2,31 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+use devtools_traits::DevtoolScriptControlMsg;
use dom::abstractworker::WorkerScriptMsg;
-use dom::bindings::refcounted::Trusted;
+use dom::bindings::conversions::DerivedFrom;
use dom::bindings::reflector::DomObject;
-use dom::bindings::trace::JSTraceable;
+use dom::dedicatedworkerglobalscope::{AutoWorkerReset, DedicatedWorkerScriptMsg};
+use dom::globalscope::GlobalScope;
+use dom::worker::TrustedWorkerAddress;
+use dom::workerglobalscope::WorkerGlobalScope;
use script_runtime::{ScriptChan, CommonScriptMsg, ScriptPort};
-use std::sync::mpsc::{Receiver, Sender};
+use std::sync::mpsc::{Receiver, Select, Sender};
+use task_queue::{QueuedTaskConversion, TaskQueue};
/// A ScriptChan that can be cloned freely and will silently send a TrustedWorkerAddress with
/// common event loop messages. While this SendableWorkerScriptChan is alive, the associated
/// Worker object will remain alive.
#[derive(Clone, JSTraceable)]
-pub struct SendableWorkerScriptChan<T: DomObject> {
- pub sender: Sender<(Trusted<T>, CommonScriptMsg)>,
- pub worker: Trusted<T>,
+pub struct SendableWorkerScriptChan {
+ pub sender: Sender<DedicatedWorkerScriptMsg>,
+ pub worker: TrustedWorkerAddress,
}
-impl<T: JSTraceable + DomObject + 'static> ScriptChan for SendableWorkerScriptChan<T> {
+impl ScriptChan for SendableWorkerScriptChan {
fn send(&self, msg: CommonScriptMsg) -> Result<(), ()> {
- self.sender.send((self.worker.clone(), msg)).map_err(|_| ())
+ let msg = DedicatedWorkerScriptMsg::CommonWorker(self.worker.clone(), WorkerScriptMsg::Common(msg));
+ self.sender.send(msg).map_err(|_| ())
}
fn clone(&self) -> Box<ScriptChan + Send> {
@@ -35,15 +41,16 @@ impl<T: JSTraceable + DomObject + 'static> ScriptChan for SendableWorkerScriptCh
/// worker event loop messages. While this SendableWorkerScriptChan is alive, the associated
/// Worker object will remain alive.
#[derive(Clone, JSTraceable)]
-pub struct WorkerThreadWorkerChan<T: DomObject> {
- pub sender: Sender<(Trusted<T>, WorkerScriptMsg)>,
- pub worker: Trusted<T>,
+pub struct WorkerThreadWorkerChan {
+ pub sender: Sender<DedicatedWorkerScriptMsg>,
+ pub worker: TrustedWorkerAddress,
}
-impl<T: JSTraceable + DomObject + 'static> ScriptChan for WorkerThreadWorkerChan<T> {
+impl ScriptChan for WorkerThreadWorkerChan {
fn send(&self, msg: CommonScriptMsg) -> Result<(), ()> {
+ let msg = DedicatedWorkerScriptMsg::CommonWorker(self.worker.clone(), WorkerScriptMsg::Common(msg));
self.sender
- .send((self.worker.clone(), WorkerScriptMsg::Common(msg)))
+ .send(msg)
.map_err(|_| ())
}
@@ -55,12 +62,100 @@ impl<T: JSTraceable + DomObject + 'static> ScriptChan for WorkerThreadWorkerChan
}
}
-impl<T: DomObject> ScriptPort for Receiver<(Trusted<T>, WorkerScriptMsg)> {
+impl ScriptPort for Receiver<DedicatedWorkerScriptMsg> {
fn recv(&self) -> Result<CommonScriptMsg, ()> {
- match self.recv().map(|(_, msg)| msg) {
- Ok(WorkerScriptMsg::Common(script_msg)) => Ok(script_msg),
- Ok(WorkerScriptMsg::DOMMessage(_)) => panic!("unexpected worker event message!"),
- Err(_) => Err(()),
+ let common_msg = match self.recv() {
+ Ok(DedicatedWorkerScriptMsg::CommonWorker(_worker, common_msg)) => common_msg,
+ Err(_) => return Err(()),
+ Ok(DedicatedWorkerScriptMsg::WakeUp) => panic!("unexpected worker event message!")
+ };
+ match common_msg {
+ WorkerScriptMsg::Common(script_msg) => Ok(script_msg),
+ WorkerScriptMsg::DOMMessage(_) => panic!("unexpected worker event message!"),
}
}
}
+
+pub trait WorkerEventLoopMethods {
+ type TimerMsg: Send;
+ type WorkerMsg: QueuedTaskConversion + Send;
+ type Event;
+ fn timer_event_port(&self) -> &Receiver<Self::TimerMsg>;
+ fn task_queue(&self) -> &TaskQueue<Self::WorkerMsg>;
+ fn handle_event(&self, event: Self::Event);
+ fn handle_worker_post_event(&self, worker: &TrustedWorkerAddress) -> Option<AutoWorkerReset>;
+ fn from_worker_msg(&self, msg: Self::WorkerMsg) -> Self::Event;
+ fn from_timer_msg(&self, msg: Self::TimerMsg) -> Self::Event;
+ fn from_devtools_msg(&self, msg: DevtoolScriptControlMsg) -> Self::Event;
+}
+
+#[allow(unsafe_code)]
+// https://html.spec.whatwg.org/multipage/#worker-event-loop
+pub fn run_worker_event_loop<T, TimerMsg, WorkerMsg, Event>(worker_scope: &T,
+ worker: Option<&TrustedWorkerAddress>)
+where
+ TimerMsg: Send,
+ WorkerMsg: QueuedTaskConversion + Send,
+ T: WorkerEventLoopMethods<TimerMsg = TimerMsg, WorkerMsg = WorkerMsg, Event = Event>
+ + DerivedFrom<WorkerGlobalScope> + DerivedFrom<GlobalScope>
+ + DomObject {
+ let scope = worker_scope.upcast::<WorkerGlobalScope>();
+ let timer_event_port = worker_scope.timer_event_port();
+ let devtools_port = scope.from_devtools_receiver();
+ let task_queue = worker_scope.task_queue();
+ let sel = Select::new();
+ let mut worker_handle = sel.handle(task_queue.select());
+ let mut timer_event_handle = sel.handle(timer_event_port);
+ let mut devtools_handle = sel.handle(devtools_port);
+ unsafe {
+ worker_handle.add();
+ timer_event_handle.add();
+ if scope.from_devtools_sender().is_some() {
+ devtools_handle.add();
+ }
+ }
+ let ret = sel.wait();
+ let event = {
+ if ret == worker_handle.id() {
+ task_queue.take_tasks();
+ worker_scope.from_worker_msg(task_queue.recv().unwrap())
+ } else if ret == timer_event_handle.id() {
+ worker_scope.from_timer_msg(timer_event_port.recv().unwrap())
+ } else if ret == devtools_handle.id() {
+ worker_scope.from_devtools_msg(devtools_port.recv().unwrap())
+ } else {
+ panic!("unexpected select result!")
+ }
+ };
+ let mut sequential = vec![];
+ sequential.push(event);
+ // https://html.spec.whatwg.org/multipage/#worker-event-loop
+ // Once the WorkerGlobalScope's closing flag is set to true,
+ // the event loop's task queues must discard any further tasks
+ // that would be added to them
+ // (tasks already on the queue are unaffected except where otherwise specified).
+ while !scope.is_closing() {
+ // Batch all events that are ready.
+ // The task queue will throttle non-priority tasks if necessary.
+ match task_queue.try_recv() {
+ Err(_) => match timer_event_port.try_recv() {
+ Err(_) => match devtools_port.try_recv() {
+ Err(_) => break,
+ Ok(ev) => sequential.push(worker_scope.from_devtools_msg(ev)),
+ },
+ Ok(ev) => sequential.push(worker_scope.from_timer_msg(ev)),
+ },
+ Ok(ev) => sequential.push(worker_scope.from_worker_msg(ev)),
+ }
+ }
+ // Step 3
+ for event in sequential {
+ worker_scope.handle_event(event);
+ // Step 6
+ let _ar = match worker {
+ Some(worker) => worker_scope.handle_worker_post_event(worker),
+ None => None
+ };
+ worker_scope.upcast::<GlobalScope>().perform_a_microtask_checkpoint();
+ }
+}
diff --git a/components/script/dom/audiobuffer.rs b/components/script/dom/audiobuffer.rs
index 8cf3bb6648f..761bcde404b 100644
--- a/components/script/dom/audiobuffer.rs
+++ b/components/script/dom/audiobuffer.rs
@@ -64,7 +64,7 @@ impl AudioBuffer {
number_of_channels: u32,
length: u32,
sample_rate: f32,
- initial_data: Option<&[f32]>,
+ initial_data: Option<&[Vec<f32>]>,
) -> DomRoot<AudioBuffer> {
let buffer = AudioBuffer::new_inherited(number_of_channels, length, sample_rate);
let buffer = reflect_dom_object(Box::new(buffer), global, AudioBufferBinding::Wrap);
@@ -93,20 +93,19 @@ impl AudioBuffer {
}
#[allow(unsafe_code)]
- pub fn set_channels(&self, initial_data: Option<&[f32]>) {
+ pub fn set_channels(&self, initial_data: Option<&[Vec<f32>]>) {
let global = self.global();
let cx = global.get_cx();
let _ac = JSAutoCompartment::new(cx, global.reflector().get_jsobject().get());
let chans = self.js_channels.borrow_mut();
for channel in 0..self.number_of_channels {
rooted!(in (cx) let mut array = ptr::null_mut::<JSObject>());
- let offset = (channel * self.length) as usize;
match initial_data {
Some(data) => {
let _ = unsafe {
Float32Array::create(
cx,
- CreateWith::Slice(&data[offset..offset + (self.length as usize) - 1]),
+ CreateWith::Slice(data[channel as usize].as_slice()),
array.handle_mut(),
)
};
diff --git a/components/script/dom/audiobuffersourcenode.rs b/components/script/dom/audiobuffersourcenode.rs
index 79841e38e22..a3ddf4121a9 100644
--- a/components/script/dom/audiobuffersourcenode.rs
+++ b/components/script/dom/audiobuffersourcenode.rs
@@ -44,7 +44,7 @@ impl AudioBufferSourceNode {
window: &Window,
context: &BaseAudioContext,
options: &AudioBufferSourceOptions,
- ) -> AudioBufferSourceNode {
+ ) -> Fallible<AudioBufferSourceNode> {
let mut node_options = AudioNodeOptions::empty();
node_options.channelCount = Some(2);
node_options.channelCountMode = Some(ChannelCountMode::Max);
@@ -55,7 +55,7 @@ impl AudioBufferSourceNode {
&node_options,
0, /* inputs */
1, /* outputs */
- );
+ )?;
let node_id = source_node.node().node_id();
let playback_rate = AudioParam::new(
&window,
@@ -77,7 +77,7 @@ impl AudioBufferSourceNode {
f32::MIN,
f32::MAX,
);
- AudioBufferSourceNode {
+ Ok(AudioBufferSourceNode {
source_node,
buffer: Default::default(),
playback_rate: Dom::from_ref(&playback_rate),
@@ -85,7 +85,7 @@ impl AudioBufferSourceNode {
loop_enabled: Cell::new(options.loop_),
loop_start: Cell::new(*options.loopStart),
loop_end: Cell::new(*options.loopEnd),
- }
+ })
}
#[allow(unrooted_must_root)]
@@ -93,9 +93,9 @@ impl AudioBufferSourceNode {
window: &Window,
context: &BaseAudioContext,
options: &AudioBufferSourceOptions,
- ) -> DomRoot<AudioBufferSourceNode> {
- let node = AudioBufferSourceNode::new_inherited(window, context, options);
- reflect_dom_object(Box::new(node), window, AudioBufferSourceNodeBinding::Wrap)
+ ) -> Fallible<DomRoot<AudioBufferSourceNode>> {
+ let node = AudioBufferSourceNode::new_inherited(window, context, options)?;
+ Ok(reflect_dom_object(Box::new(node), window, AudioBufferSourceNodeBinding::Wrap))
}
pub fn Constructor(
@@ -103,7 +103,7 @@ impl AudioBufferSourceNode {
context: &BaseAudioContext,
options: &AudioBufferSourceOptions,
) -> Fallible<DomRoot<AudioBufferSourceNode>> {
- Ok(AudioBufferSourceNode::new(window, context, options))
+ AudioBufferSourceNode::new(window, context, options)
}
}
diff --git a/components/script/dom/audionode.rs b/components/script/dom/audionode.rs
index 4690f74245e..5a149dd814f 100644
--- a/components/script/dom/audionode.rs
+++ b/components/script/dom/audionode.rs
@@ -44,9 +44,14 @@ impl AudioNode {
options: &AudioNodeOptions,
number_of_inputs: u32,
number_of_outputs: u32,
- ) -> AudioNode {
+ ) -> Fallible<AudioNode> {
+ if let Some(c) = options.channelCount {
+ if c == 0 || c > MAX_CHANNEL_COUNT {
+ return Err(Error::NotSupported);
+ }
+ }
let node_id = context.audio_context_impl().create_node(node_type);
- AudioNode::new_inherited_for_id(node_id, context, options, number_of_inputs, number_of_outputs)
+ Ok(AudioNode::new_inherited_for_id(node_id, context, options, number_of_inputs, number_of_outputs))
}
pub fn new_inherited_for_id(
@@ -218,6 +223,11 @@ impl AudioNodeMethods for AudioNode {
return Err(Error::NotSupported)
}
}
+ EventTargetTypeId::AudioNode(AudioNodeTypeId::ChannelMergerNode) => {
+ if value != 1 {
+ return Err(Error::InvalidState)
+ }
+ }
// XXX We do not support any of the other AudioNodes with
// constraints yet. Add more cases here as we add support
// for new AudioNodes.
@@ -256,6 +266,11 @@ impl AudioNodeMethods for AudioNode {
return Err(Error::NotSupported)
}
}
+ EventTargetTypeId::AudioNode(AudioNodeTypeId::ChannelMergerNode) => {
+ if value != ChannelCountMode::Explicit {
+ return Err(Error::InvalidState)
+ }
+ }
// XXX We do not support any of the other AudioNodes with
// constraints yet. Add more cases here as we add support
// for new AudioNodes.
diff --git a/components/script/dom/audioscheduledsourcenode.rs b/components/script/dom/audioscheduledsourcenode.rs
index 03f1f952102..871a793f6ec 100644
--- a/components/script/dom/audioscheduledsourcenode.rs
+++ b/components/script/dom/audioscheduledsourcenode.rs
@@ -24,24 +24,25 @@ pub struct AudioScheduledSourceNode {
}
impl AudioScheduledSourceNode {
+ #[allow(unrooted_must_root)]
pub fn new_inherited(
node_type: AudioNodeInit,
context: &BaseAudioContext,
options: &AudioNodeOptions,
number_of_inputs: u32,
number_of_outputs: u32,
- ) -> AudioScheduledSourceNode {
- AudioScheduledSourceNode {
+ ) -> Fallible<AudioScheduledSourceNode> {
+ Ok(AudioScheduledSourceNode {
node: AudioNode::new_inherited(
node_type,
context,
options,
number_of_inputs,
number_of_outputs,
- ),
+ )?,
started: Cell::new(false),
stopped: Cell::new(false),
- }
+ })
}
pub fn node(&self) -> &AudioNode {
diff --git a/components/script/dom/baseaudiocontext.rs b/components/script/dom/baseaudiocontext.rs
index 9513a0b22d1..dbd821b64fe 100644
--- a/components/script/dom/baseaudiocontext.rs
+++ b/components/script/dom/baseaudiocontext.rs
@@ -16,6 +16,7 @@ use dom::bindings::codegen::Bindings::BaseAudioContextBinding::AudioContextState
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextMethods;
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeErrorCallback;
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeSuccessCallback;
+use dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::ChannelMergerOptions;
use dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions;
use dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions;
use dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions;
@@ -25,6 +26,7 @@ use dom::bindings::num::Finite;
use dom::bindings::refcounted::Trusted;
use dom::bindings::reflector::DomObject;
use dom::bindings::root::{DomRoot, MutNullableDom};
+use dom::channelmergernode::ChannelMergerNode;
use dom::domexception::{DOMErrorName, DOMException};
use dom::eventtarget::EventTarget;
use dom::gainnode::GainNode;
@@ -317,7 +319,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
event_handler!(statechange, GetOnstatechange, SetOnstatechange);
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createoscillator
- fn CreateOscillator(&self) -> DomRoot<OscillatorNode> {
+ fn CreateOscillator(&self) -> Fallible<DomRoot<OscillatorNode>> {
OscillatorNode::new(
&self.global().as_window(),
&self,
@@ -326,7 +328,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
}
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-creategain
- fn CreateGain(&self) -> DomRoot<GainNode> {
+ fn CreateGain(&self) -> Fallible<DomRoot<GainNode>> {
GainNode::new(&self.global().as_window(), &self, &GainOptions::empty())
}
@@ -335,6 +337,12 @@ impl BaseAudioContextMethods for BaseAudioContext {
PannerNode::new(&self.global().as_window(), &self, &PannerOptions::empty())
}
+ /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createchannelmerger
+ fn CreateChannelMerger(&self, count: u32) -> Fallible<DomRoot<ChannelMergerNode>> {
+ let mut opts = ChannelMergerOptions::empty();
+ opts.numberOfInputs = count;
+ ChannelMergerNode::new(&self.global().as_window(), &self, &opts)
+ }
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffer
fn CreateBuffer(
@@ -360,7 +368,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
}
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffersource
- fn CreateBufferSource(&self) -> DomRoot<AudioBufferSourceNode> {
+ fn CreateBufferSource(&self) -> Fallible<DomRoot<AudioBufferSourceNode>> {
AudioBufferSourceNode::new(
&self.global().as_window(),
&self,
@@ -397,6 +405,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
let audio_data = audio_data.to_vec();
let decoded_audio = Arc::new(Mutex::new(Vec::new()));
let decoded_audio_ = decoded_audio.clone();
+ let decoded_audio__ = decoded_audio.clone();
let this = Trusted::new(self);
let this_ = this.clone();
let task_source = window.dom_manipulation_task_source();
@@ -404,15 +413,30 @@ impl BaseAudioContextMethods for BaseAudioContext {
let canceller = window.task_canceller(TaskSourceName::DOMManipulation);
let canceller_ = window.task_canceller(TaskSourceName::DOMManipulation);
let callbacks = AudioDecoderCallbacks::new()
+ .ready(move |channel_count| {
+ decoded_audio
+ .lock()
+ .unwrap()
+ .resize(channel_count as usize, Vec::new());
+ })
+ .progress(move |buffer, channel| {
+ let mut decoded_audio = decoded_audio_.lock().unwrap();
+ decoded_audio[(channel - 1) as usize].extend_from_slice((*buffer).as_ref());
+ })
.eos(move || {
let _ = task_source.queue_with_canceller(
task!(audio_decode_eos: move || {
let this = this.root();
- let decoded_audio = decoded_audio.lock().unwrap();
+ let decoded_audio = decoded_audio__.lock().unwrap();
+ let length = if decoded_audio.len() >= 1 {
+ decoded_audio[0].len()
+ } else {
+ 0
+ };
let buffer = AudioBuffer::new(
&this.global().as_window(),
- 1, // XXX servo-media should provide this info
- decoded_audio.len() as u32,
+ decoded_audio.len() as u32 /* number of channels */,
+ length as u32,
this.sample_rate,
Some(decoded_audio.as_slice()));
let mut resolvers = this.decode_resolvers.borrow_mut();
@@ -443,12 +467,6 @@ impl BaseAudioContextMethods for BaseAudioContext {
&canceller_,
);
})
- .progress(move |buffer| {
- decoded_audio_
- .lock()
- .unwrap()
- .extend_from_slice((*buffer).as_ref());
- })
.build();
self.audio_context_impl
.decode_audio_data(audio_data, callbacks);
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 449fda3b7ea..39409e7deaa 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -344,12 +344,17 @@ class CGMethodCall(CGThing):
distinguishingIndex = method.distinguishingIndexForArgCount(argCount)
- # We can't handle unions at the distinguishing index.
+ # We can't handle unions of non-object values at the distinguishing index.
for (returnType, args) in possibleSignatures:
- if args[distinguishingIndex].type.isUnion():
- raise TypeError("No support for unions as distinguishing "
- "arguments yet: %s",
- args[distinguishingIndex].location)
+ type = args[distinguishingIndex].type
+ if type.isUnion():
+ if type.nullable():
+ type = type.inner
+ for type in type.flatMemberTypes:
+ if not (type.isObject() or type.isNonCallbackInterface()):
+ raise TypeError("No support for unions with non-object variants "
+ "as distinguishing arguments yet: %s",
+ args[distinguishingIndex].location)
# Convert all our arguments up to the distinguishing index.
# Doesn't matter which of the possible signatures we use, since
@@ -388,6 +393,7 @@ class CGMethodCall(CGThing):
interfacesSigs = [
s for s in possibleSignatures
if (s[1][distinguishingIndex].type.isObject() or
+ s[1][distinguishingIndex].type.isUnion() or
s[1][distinguishingIndex].type.isNonCallbackInterface())]
# There might be more than one of these; we need to check
# which ones we unwrap to.
@@ -2366,7 +2372,6 @@ def UnionTypes(descriptors, dictionaries, callbacks, typedefs, config):
'dom::bindings::conversions::ConversionBehavior',
'dom::bindings::conversions::StringificationBehavior',
'dom::bindings::conversions::root_from_handlevalue',
- 'dom::bindings::error::throw_not_in_union',
'std::ptr::NonNull',
'dom::bindings::mozmap::MozMap',
'dom::bindings::root::DomRoot',
@@ -4450,8 +4455,8 @@ class CGUnionConversionStruct(CGThing):
other.append(booleanConversion[0])
conversions.append(CGList(other, "\n\n"))
conversions.append(CGGeneric(
- "throw_not_in_union(cx, \"%s\");\n"
- "Err(())" % ", ".join(names)))
+ "Ok(ConversionResult::Failure(\"argument could not be converted to any of: %s\".into()))" % ", ".join(names)
+ ))
method = CGWrapper(
CGIndenter(CGList(conversions, "\n\n")),
pre="unsafe fn from_jsval(cx: *mut JSContext,\n"
@@ -4977,7 +4982,7 @@ class CGDOMJSProxyHandler_getOwnPropertyDescriptor(CGAbstractExternMethod):
def __init__(self, descriptor):
args = [Argument('*mut JSContext', 'cx'), Argument('RawHandleObject', 'proxy'),
Argument('RawHandleId', 'id'),
- Argument('RawMutableHandle<PropertyDescriptor>', 'desc')]
+ Argument('RawMutableHandle<PropertyDescriptor>', 'mut desc')]
CGAbstractExternMethod.__init__(self, descriptor, "getOwnPropertyDescriptor",
"bool", args)
self.descriptor = descriptor
@@ -5050,7 +5055,6 @@ if %s {
else:
namedGet = ""
- # FIXME(#11868) Should assign to desc.obj, desc.get() is a copy.
return get + """\
rooted!(in(cx) let mut expando = ptr::null_mut::<JSObject>());
get_expando_object(proxy, expando.handle_mut());
@@ -5063,7 +5067,7 @@ if !expando.is_null() {
}
if !desc.obj.is_null() {
// Pretend the property lives on the wrapper.
- desc.get().obj = proxy.get();
+ desc.obj = proxy.get();
return true;
}
}
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index c953df65c1d..7c68de0df18 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -255,14 +255,6 @@ pub unsafe fn report_pending_exception(cx: *mut JSContext, dispatch_event: bool)
}
}
-/// Throw an exception to signal that a `JSVal` can not be converted to any of
-/// the types in an IDL union type.
-pub unsafe fn throw_not_in_union(cx: *mut JSContext, names: &'static str) {
- assert!(!JS_IsExceptionPending(cx));
- let error = format!("argument could not be converted to any of: {}", names);
- throw_type_error(cx, &error);
-}
-
/// Throw an exception to signal that a `JSObject` can not be converted to a
/// given DOM type.
pub unsafe fn throw_invalid_this(cx: *mut JSContext, proto_id: u16) {
diff --git a/components/script/dom/channelmergernode.rs b/components/script/dom/channelmergernode.rs
new file mode 100644
index 00000000000..d36c481a158
--- /dev/null
+++ b/components/script/dom/channelmergernode.rs
@@ -0,0 +1,83 @@
+/* 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 dom::audionode::{AudioNode, MAX_CHANNEL_COUNT};
+use dom::baseaudiocontext::BaseAudioContext;
+use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions;
+use dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::{self, ChannelMergerOptions};
+use dom::bindings::error::{Error, Fallible};
+use dom::bindings::reflector::reflect_dom_object;
+use dom::bindings::root::DomRoot;
+use dom::window::Window;
+use dom_struct::dom_struct;
+use servo_media::audio::channel_node::ChannelNodeOptions;
+use servo_media::audio::node::AudioNodeInit;
+
+#[dom_struct]
+pub struct ChannelMergerNode {
+ node: AudioNode,
+}
+
+impl ChannelMergerNode {
+ #[allow(unrooted_must_root)]
+ pub fn new_inherited(
+ _: &Window,
+ context: &BaseAudioContext,
+ options: &ChannelMergerOptions,
+ ) -> Fallible<ChannelMergerNode> {
+ let mut node_options = AudioNodeOptions::empty();
+ let count = options.parent.channelCount.unwrap_or(1);
+ let mode = options.parent.channelCountMode.unwrap_or(ChannelCountMode::Explicit);
+ let interpretation = options.parent.channelInterpretation.unwrap_or(ChannelInterpretation::Speakers);
+
+ if count != 1 || mode != ChannelCountMode::Explicit {
+ return Err(Error::InvalidState)
+ }
+
+ if options.numberOfInputs < 1 || options.numberOfInputs > MAX_CHANNEL_COUNT {
+ return Err(Error::IndexSize)
+ }
+
+ node_options.channelCount = Some(count);
+ node_options.channelCountMode = Some(mode);
+ node_options.channelInterpretation = Some(interpretation);
+ let node = AudioNode::new_inherited(
+ AudioNodeInit::ChannelMergerNode(options.into()),
+ context,
+ &node_options,
+ options.numberOfInputs, // inputs
+ 1, // outputs
+ )?;
+ Ok(ChannelMergerNode {
+ node,
+ })
+ }
+
+ #[allow(unrooted_must_root)]
+ pub fn new(
+ window: &Window,
+ context: &BaseAudioContext,
+ options: &ChannelMergerOptions,
+ ) -> Fallible<DomRoot<ChannelMergerNode>> {
+ let node = ChannelMergerNode::new_inherited(window, context, options)?;
+ Ok(reflect_dom_object(Box::new(node), window, ChannelMergerNodeBinding::Wrap))
+ }
+
+ pub fn Constructor(
+ window: &Window,
+ context: &BaseAudioContext,
+ options: &ChannelMergerOptions,
+ ) -> Fallible<DomRoot<ChannelMergerNode>> {
+ ChannelMergerNode::new(window, context, options)
+ }
+}
+
+impl<'a> From<&'a ChannelMergerOptions> for ChannelNodeOptions {
+ fn from(options: &'a ChannelMergerOptions) -> Self {
+ Self {
+ channels: options.numberOfInputs as u8,
+ }
+ }
+}
diff --git a/components/script/dom/css.rs b/components/script/dom/css.rs
index d642b44a19f..7a42d6b6e68 100644
--- a/components/script/dom/css.rs
+++ b/components/script/dom/css.rs
@@ -44,6 +44,7 @@ impl CSS {
ParsingMode::DEFAULT,
QuirksMode::NoQuirks,
None,
+ None,
);
decl.eval(&context)
}
@@ -61,6 +62,7 @@ impl CSS {
ParsingMode::DEFAULT,
QuirksMode::NoQuirks,
None,
+ None,
);
cond.eval(&context)
} else {
diff --git a/components/script/dom/cssmediarule.rs b/components/script/dom/cssmediarule.rs
index 23f3c46a251..ccc803e4b42 100644
--- a/components/script/dom/cssmediarule.rs
+++ b/components/script/dom/cssmediarule.rs
@@ -81,6 +81,7 @@ impl CSSMediaRule {
ParsingMode::DEFAULT,
quirks_mode,
window.css_error_reporter(),
+ None,
);
let new_medialist = StyleMediaList::parse(&context, &mut input);
diff --git a/components/script/dom/csssupportsrule.rs b/components/script/dom/csssupportsrule.rs
index a96cd706b86..8b66fbe76cf 100644
--- a/components/script/dom/csssupportsrule.rs
+++ b/components/script/dom/csssupportsrule.rs
@@ -69,6 +69,7 @@ impl CSSSupportsRule {
ParsingMode::DEFAULT,
quirks_mode,
None,
+ None,
);
let enabled = cond.eval(&context);
let mut guard = self.cssconditionrule.shared_lock().write();
diff --git a/components/script/dom/dedicatedworkerglobalscope.rs b/components/script/dom/dedicatedworkerglobalscope.rs
index 1c8c2316dde..c582177f42e 100644
--- a/components/script/dom/dedicatedworkerglobalscope.rs
+++ b/components/script/dom/dedicatedworkerglobalscope.rs
@@ -6,6 +6,7 @@ use devtools;
use devtools_traits::DevtoolScriptControlMsg;
use dom::abstractworker::{SimpleWorkerErrorHandler, WorkerScriptMsg};
use dom::abstractworkerglobalscope::{SendableWorkerScriptChan, WorkerThreadWorkerChan};
+use dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop};
use dom::bindings::cell::DomRefCell;
use dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding;
use dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding::DedicatedWorkerGlobalScopeMethods;
@@ -40,15 +41,17 @@ use servo_url::ServoUrl;
use std::mem::replace;
use std::sync::Arc;
use std::sync::atomic::AtomicBool;
-use std::sync::mpsc::{Receiver, RecvError, Select, Sender, channel};
+use std::sync::mpsc::{Receiver, Sender, channel};
use std::thread;
use style::thread_state::{self, ThreadState};
+use task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
+use task_source::TaskSourceName;
/// Set the `worker` field of a related DedicatedWorkerGlobalScope object to a particular
/// value for the duration of this object's lifetime. This ensures that the related Worker
/// object only lives as long as necessary (ie. while events are being executed), while
/// providing a reference that can be cloned freely.
-struct AutoWorkerReset<'a> {
+pub struct AutoWorkerReset<'a> {
workerscope: &'a DedicatedWorkerGlobalScope,
old_worker: Option<TrustedWorkerAddress>,
}
@@ -70,20 +73,85 @@ impl<'a> Drop for AutoWorkerReset<'a> {
}
}
-enum MixedMessage {
- FromWorker((TrustedWorkerAddress, WorkerScriptMsg)),
+pub enum DedicatedWorkerScriptMsg {
+ /// Standard message from a worker.
+ CommonWorker(TrustedWorkerAddress, WorkerScriptMsg),
+ /// Wake-up call from the task queue.
+ WakeUp,
+}
+
+pub enum MixedMessage {
+ FromWorker(DedicatedWorkerScriptMsg),
FromScheduler((TrustedWorkerAddress, TimerEvent)),
FromDevtools(DevtoolScriptControlMsg)
}
+impl QueuedTaskConversion for DedicatedWorkerScriptMsg {
+ fn task_source_name(&self) -> Option<&TaskSourceName> {
+ let common_worker_msg = match self {
+ DedicatedWorkerScriptMsg::CommonWorker(_, common_worker_msg) => common_worker_msg,
+ _ => return None,
+ };
+ let script_msg = match common_worker_msg {
+ WorkerScriptMsg::Common(ref script_msg) => script_msg,
+ _ => return None,
+ };
+ match script_msg {
+ CommonScriptMsg::Task(_category, _boxed, _pipeline_id, source_name) => Some(&source_name),
+ _ => return None,
+ }
+ }
+
+ fn into_queued_task(self) -> Option<QueuedTask> {
+ let (worker, common_worker_msg) = match self {
+ DedicatedWorkerScriptMsg::CommonWorker(worker, common_worker_msg) => (worker, common_worker_msg),
+ _ => return None,
+ };
+ let script_msg = match common_worker_msg {
+ WorkerScriptMsg::Common(script_msg) => script_msg,
+ _ => return None,
+ };
+ let (category, boxed, pipeline_id, task_source) = match script_msg {
+ CommonScriptMsg::Task(category, boxed, pipeline_id, task_source) =>
+ (category, boxed, pipeline_id, task_source),
+ _ => return None,
+ };
+ Some((Some(worker), category, boxed, pipeline_id, task_source))
+ }
+
+ fn from_queued_task(queued_task: QueuedTask) -> Self {
+ let (worker, category, boxed, pipeline_id, task_source) = queued_task;
+ let script_msg = CommonScriptMsg::Task(
+ category,
+ boxed,
+ pipeline_id,
+ task_source
+ );
+ DedicatedWorkerScriptMsg::CommonWorker(worker.unwrap(), WorkerScriptMsg::Common(script_msg))
+ }
+
+ fn wake_up_msg() -> Self {
+ DedicatedWorkerScriptMsg::WakeUp
+ }
+
+ fn is_wake_up(&self) -> bool {
+ match self {
+ DedicatedWorkerScriptMsg::WakeUp => true,
+ _ => false,
+ }
+ }
+}
+
+unsafe_no_jsmanaged_fields!(TaskQueue<DedicatedWorkerScriptMsg>);
+
// https://html.spec.whatwg.org/multipage/#dedicatedworkerglobalscope
#[dom_struct]
pub struct DedicatedWorkerGlobalScope {
workerglobalscope: WorkerGlobalScope,
#[ignore_malloc_size_of = "Defined in std"]
- receiver: Receiver<(TrustedWorkerAddress, WorkerScriptMsg)>,
+ task_queue: TaskQueue<DedicatedWorkerScriptMsg>,
#[ignore_malloc_size_of = "Defined in std"]
- own_sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>,
+ own_sender: Sender<DedicatedWorkerScriptMsg>,
#[ignore_malloc_size_of = "Defined in std"]
timer_event_port: Receiver<(TrustedWorkerAddress, TimerEvent)>,
#[ignore_malloc_size_of = "Trusted<T> has unclear ownership like Dom<T>"]
@@ -93,14 +161,49 @@ pub struct DedicatedWorkerGlobalScope {
parent_sender: Box<ScriptChan + Send>,
}
+impl WorkerEventLoopMethods for DedicatedWorkerGlobalScope {
+ type TimerMsg = (TrustedWorkerAddress, TimerEvent);
+ type WorkerMsg = DedicatedWorkerScriptMsg;
+ type Event = MixedMessage;
+
+ fn timer_event_port(&self) -> &Receiver<(TrustedWorkerAddress, TimerEvent)> {
+ &self.timer_event_port
+ }
+
+ fn task_queue(&self) -> &TaskQueue<DedicatedWorkerScriptMsg> {
+ &self.task_queue
+ }
+
+ fn handle_event(&self, event: MixedMessage) {
+ self.handle_mixed_message(event);
+ }
+
+ fn handle_worker_post_event(&self, worker: &TrustedWorkerAddress) -> Option<AutoWorkerReset> {
+ let ar = AutoWorkerReset::new(&self, worker.clone());
+ Some(ar)
+ }
+
+ fn from_worker_msg(&self, msg: DedicatedWorkerScriptMsg) -> MixedMessage {
+ MixedMessage::FromWorker(msg)
+ }
+
+ fn from_timer_msg(&self, msg: (TrustedWorkerAddress, TimerEvent)) -> MixedMessage {
+ MixedMessage::FromScheduler(msg)
+ }
+
+ fn from_devtools_msg(&self, msg: DevtoolScriptControlMsg) -> MixedMessage {
+ MixedMessage::FromDevtools(msg)
+ }
+}
+
impl DedicatedWorkerGlobalScope {
fn new_inherited(init: WorkerGlobalScopeInit,
worker_url: ServoUrl,
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
runtime: Runtime,
parent_sender: Box<ScriptChan + Send>,
- own_sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>,
- receiver: Receiver<(TrustedWorkerAddress, WorkerScriptMsg)>,
+ own_sender: Sender<DedicatedWorkerScriptMsg>,
+ receiver: Receiver<DedicatedWorkerScriptMsg>,
timer_event_chan: IpcSender<TimerEvent>,
timer_event_port: Receiver<(TrustedWorkerAddress, TimerEvent)>,
closing: Arc<AtomicBool>)
@@ -112,7 +215,7 @@ impl DedicatedWorkerGlobalScope {
from_devtools_receiver,
timer_event_chan,
Some(closing)),
- receiver: receiver,
+ task_queue: TaskQueue::new(receiver, own_sender.clone()),
own_sender: own_sender,
timer_event_port: timer_event_port,
parent_sender: parent_sender,
@@ -126,8 +229,8 @@ impl DedicatedWorkerGlobalScope {
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
runtime: Runtime,
parent_sender: Box<ScriptChan + Send>,
- own_sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>,
- receiver: Receiver<(TrustedWorkerAddress, WorkerScriptMsg)>,
+ own_sender: Sender<DedicatedWorkerScriptMsg>,
+ receiver: Receiver<DedicatedWorkerScriptMsg>,
timer_event_chan: IpcSender<TimerEvent>,
timer_event_port: Receiver<(TrustedWorkerAddress, TimerEvent)>,
closing: Arc<AtomicBool>)
@@ -151,13 +254,14 @@ impl DedicatedWorkerGlobalScope {
}
#[allow(unsafe_code)]
+ // https://html.spec.whatwg.org/multipage/#run-a-worker
pub fn run_worker_scope(init: WorkerGlobalScopeInit,
worker_url: ServoUrl,
from_devtools_receiver: IpcReceiver<DevtoolScriptControlMsg>,
worker: TrustedWorkerAddress,
parent_sender: Box<ScriptChan + Send>,
- own_sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>,
- receiver: Receiver<(TrustedWorkerAddress, WorkerScriptMsg)>,
+ own_sender: Sender<DedicatedWorkerScriptMsg>,
+ receiver: Receiver<DedicatedWorkerScriptMsg>,
worker_load_origin: WorkerScriptLoadOrigin,
closing: Arc<AtomicBool>) {
let serialized_worker_url = worker_url.to_string();
@@ -196,7 +300,8 @@ impl DedicatedWorkerGlobalScope {
parent_sender.send(CommonScriptMsg::Task(
WorkerEvent,
Box::new(SimpleWorkerErrorHandler::new(worker)),
- pipeline_id
+ pipeline_id,
+ TaskSourceName::DOMManipulation,
)).unwrap();
return;
}
@@ -242,17 +347,11 @@ impl DedicatedWorkerGlobalScope {
let reporter_name = format!("dedicated-worker-reporter-{}", random::<u64>());
scope.upcast::<GlobalScope>().mem_profiler_chan().run_with_memory_reporting(|| {
- // https://html.spec.whatwg.org/multipage/#event-loop-processing-model
- // Step 1
- while let Ok(event) = global.receive_event() {
- if scope.is_closing() {
- break;
- }
- // Step 3
- global.handle_event(event);
- // Step 6
- let _ar = AutoWorkerReset::new(&global, worker.clone());
- global.upcast::<GlobalScope>().perform_a_microtask_checkpoint();
+ // Step 29, Run the responsible event loop specified by inside settings until it is destroyed.
+ // The worker processing model remains on this step until the event loop is destroyed,
+ // which happens after the closing flag is set to true.
+ while !scope.is_closing() {
+ run_worker_event_loop(&*global, Some(&worker));
}
}, reporter_name, parent_sender, CommonScriptMsg::CollectReports);
}).expect("Thread spawning failed");
@@ -274,36 +373,6 @@ impl DedicatedWorkerGlobalScope {
(chan, Box::new(rx))
}
- #[allow(unsafe_code)]
- fn receive_event(&self) -> Result<MixedMessage, RecvError> {
- let scope = self.upcast::<WorkerGlobalScope>();
- let worker_port = &self.receiver;
- let timer_event_port = &self.timer_event_port;
- let devtools_port = scope.from_devtools_receiver();
-
- let sel = Select::new();
- let mut worker_handle = sel.handle(worker_port);
- let mut timer_event_handle = sel.handle(timer_event_port);
- let mut devtools_handle = sel.handle(devtools_port);
- unsafe {
- worker_handle.add();
- timer_event_handle.add();
- if scope.from_devtools_sender().is_some() {
- devtools_handle.add();
- }
- }
- let ret = sel.wait();
- if ret == worker_handle.id() {
- Ok(MixedMessage::FromWorker(worker_port.recv()?))
- } else if ret == timer_event_handle.id() {
- Ok(MixedMessage::FromScheduler(timer_event_port.recv()?))
- } else if ret == devtools_handle.id() {
- Ok(MixedMessage::FromDevtools(devtools_port.recv()?))
- } else {
- panic!("unexpected select result!")
- }
- }
-
fn handle_script_event(&self, msg: WorkerScriptMsg) {
match msg {
WorkerScriptMsg::DOMMessage(data) => {
@@ -321,8 +390,8 @@ impl DedicatedWorkerGlobalScope {
}
}
- fn handle_event(&self, event: MixedMessage) {
- match event {
+ fn handle_mixed_message(&self, msg: MixedMessage) {
+ match msg {
MixedMessage::FromDevtools(msg) => {
match msg {
DevtoolScriptControlMsg::EvaluateJS(_pipe_id, string, sender) =>
@@ -346,10 +415,11 @@ impl DedicatedWorkerGlobalScope {
}
}
}
- MixedMessage::FromWorker((linked_worker, msg)) => {
+ MixedMessage::FromWorker(DedicatedWorkerScriptMsg::CommonWorker(linked_worker, msg)) => {
let _ar = AutoWorkerReset::new(self, linked_worker);
self.handle_script_event(msg);
}
+ MixedMessage::FromWorker(DedicatedWorkerScriptMsg::WakeUp) => {},
}
}
@@ -382,8 +452,12 @@ impl DedicatedWorkerGlobalScope {
global.report_an_error(error_info, HandleValue::null());
}
}));
- // TODO: Should use the DOM manipulation task source.
- self.parent_sender.send(CommonScriptMsg::Task(WorkerEvent, task, Some(pipeline_id))).unwrap();
+ self.parent_sender.send(CommonScriptMsg::Task(
+ WorkerEvent,
+ task,
+ Some(pipeline_id),
+ TaskSourceName::DOMManipulation,
+ )).unwrap();
}
}
@@ -408,7 +482,13 @@ impl DedicatedWorkerGlobalScopeMethods for DedicatedWorkerGlobalScope {
let task = Box::new(task!(post_worker_message: move || {
Worker::handle_message(worker, data);
}));
- self.parent_sender.send(CommonScriptMsg::Task(WorkerEvent, task, Some(pipeline_id))).unwrap();
+ // TODO: Change this task source to a new `unshipped-port-message-queue` task source
+ self.parent_sender.send(CommonScriptMsg::Task(
+ WorkerEvent,
+ task,
+ Some(pipeline_id),
+ TaskSourceName::DOMManipulation,
+ )).unwrap();
Ok(())
}
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 5394089d220..cc1a82d04ef 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -2837,7 +2837,14 @@ impl Document {
let trusted_pending = Trusted::new(pending);
let trusted_promise = TrustedPromise::new(promise.clone());
let handler = ElementPerformFullscreenEnter::new(trusted_pending, trusted_promise, error);
- let script_msg = CommonScriptMsg::Task(ScriptThreadEventCategory::EnterFullscreen, handler, pipeline_id);
+ // NOTE: This steps should be running in parallel
+ // https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
+ let script_msg = CommonScriptMsg::Task(
+ ScriptThreadEventCategory::EnterFullscreen,
+ handler,
+ pipeline_id,
+ TaskSourceName::DOMManipulation,
+ );
let msg = MainThreadScriptMsg::Common(script_msg);
window.main_thread_script_chan().send(msg).unwrap();
@@ -2870,7 +2877,14 @@ impl Document {
let trusted_promise = TrustedPromise::new(promise.clone());
let handler = ElementPerformFullscreenExit::new(trusted_element, trusted_promise);
let pipeline_id = Some(global.pipeline_id());
- let script_msg = CommonScriptMsg::Task(ScriptThreadEventCategory::ExitFullscreen, handler, pipeline_id);
+ // NOTE: This steps should be running in parallel
+ // https://fullscreen.spec.whatwg.org/#exit-fullscreen
+ let script_msg = CommonScriptMsg::Task(
+ ScriptThreadEventCategory::ExitFullscreen,
+ handler,
+ pipeline_id,
+ TaskSourceName::DOMManipulation,
+ );
let msg = MainThreadScriptMsg::Common(script_msg);
window.main_thread_script_chan().send(msg).unwrap();
diff --git a/components/script/dom/gainnode.rs b/components/script/dom/gainnode.rs
index 5cdbd8a89c9..a48cdc7c86b 100644
--- a/components/script/dom/gainnode.rs
+++ b/components/script/dom/gainnode.rs
@@ -30,19 +30,22 @@ impl GainNode {
pub fn new_inherited(
window: &Window,
context: &BaseAudioContext,
- gain_options: &GainOptions,
- ) -> GainNode {
+ options: &GainOptions,
+ ) -> Fallible<GainNode> {
let mut node_options = AudioNodeOptions::empty();
- node_options.channelCount = Some(2);
- node_options.channelCountMode = Some(ChannelCountMode::Max);
- node_options.channelInterpretation = Some(ChannelInterpretation::Speakers);
+ let count = options.parent.channelCount.unwrap_or(2);
+ let mode = options.parent.channelCountMode.unwrap_or(ChannelCountMode::Max);
+ let interpretation = options.parent.channelInterpretation.unwrap_or(ChannelInterpretation::Speakers);
+ node_options.channelCount = Some(count);
+ node_options.channelCountMode = Some(mode);
+ node_options.channelInterpretation = Some(interpretation);
let node = AudioNode::new_inherited(
- AudioNodeInit::GainNode(gain_options.into()),
+ AudioNodeInit::GainNode(options.into()),
context,
&node_options,
1, // inputs
1, // outputs
- );
+ )?;
let gain = AudioParam::new(
window,
context,
@@ -53,10 +56,10 @@ impl GainNode {
f32::MIN, // min value
f32::MAX, // max value
);
- GainNode {
+ Ok(GainNode {
node,
gain: Dom::from_ref(&gain),
- }
+ })
}
#[allow(unrooted_must_root)]
@@ -64,9 +67,9 @@ impl GainNode {
window: &Window,
context: &BaseAudioContext,
options: &GainOptions,
- ) -> DomRoot<GainNode> {
- let node = GainNode::new_inherited(window, context, options);
- reflect_dom_object(Box::new(node), window, GainNodeBinding::Wrap)
+ ) -> Fallible<DomRoot<GainNode>> {
+ let node = GainNode::new_inherited(window, context, options)?;
+ Ok(reflect_dom_object(Box::new(node), window, GainNodeBinding::Wrap))
}
pub fn Constructor(
@@ -74,7 +77,7 @@ impl GainNode {
context: &BaseAudioContext,
options: &GainOptions,
) -> Fallible<DomRoot<GainNode>> {
- Ok(GainNode::new(window, context, options))
+ GainNode::new(window, context, options)
}
}
diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs
index 596530058ec..b2429948874 100644
--- a/components/script/dom/globalscope.rs
+++ b/components/script/dom/globalscope.rs
@@ -59,6 +59,7 @@ use task_source::file_reading::FileReadingTaskSource;
use task_source::networking::NetworkingTaskSource;
use task_source::performance_timeline::PerformanceTimelineTaskSource;
use task_source::remote_event::RemoteEventTaskSource;
+use task_source::websocket::WebsocketTaskSource;
use time::{Timespec, get_time};
use timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle};
use timers::{OneshotTimers, TimerCallback};
@@ -430,6 +431,18 @@ impl GlobalScope {
unreachable!();
}
+ /// `ScriptChan` to send messages to the websocket task source of
+ /// this global scope.
+ pub fn websocket_task_source(&self) -> WebsocketTaskSource {
+ if let Some(window) = self.downcast::<Window>() {
+ return window.websocket_task_source();
+ }
+ if let Some(worker) = self.downcast::<WorkerGlobalScope>() {
+ return worker.websocket_task_source();
+ }
+ unreachable!();
+ }
+
/// Evaluate JS code on this global scope.
pub fn evaluate_js_on_global_with_result(
&self, code: &str, rval: MutableHandleValue) -> bool {
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs
index 7261f34b8ca..3aaa7c579cb 100644
--- a/components/script/dom/htmlimageelement.rs
+++ b/components/script/dom/htmlimageelement.rs
@@ -538,12 +538,17 @@ impl HTMLImageElement {
/// https://html.spec.whatwg.org/multipage/#matches-the-environment
fn matches_environment(&self, media_query: String) -> bool {
let document = document_from_node(self);
- let device = document.device();
- if !device.is_some() {
- return false;
- }
+ let device = match document.device() {
+ Some(device) => device,
+ None => return false,
+ };
let quirks_mode = document.quirks_mode();
let document_url = &document.url();
+ // FIXME(emilio): This should do the same that we do for other media
+ // lists regarding the rule type and such, though it doesn't really
+ // matter right now...
+ //
+ // Also, ParsingMode::all() is wrong, and should be DEFAULT.
let context = ParserContext::new(
Origin::Author,
document_url,
@@ -551,11 +556,12 @@ impl HTMLImageElement {
ParsingMode::all(),
quirks_mode,
None,
+ None,
);
let mut parserInput = ParserInput::new(&media_query);
let mut parser = Parser::new(&mut parserInput);
let media_list = MediaList::parse(&context, &mut parser);
- media_list.evaluate(&device.unwrap(), quirks_mode)
+ media_list.evaluate(&device, quirks_mode)
}
/// <https://html.spec.whatwg.org/multipage/#normalise-the-source-densities>
@@ -1039,9 +1045,12 @@ pub fn parse_a_sizes_attribute(value: DOMString) -> SourceSizeList {
Origin::Author,
&url,
Some(CssRuleType::Style),
+ // FIXME(emilio): why ::empty() instead of ::DEFAULT? Also, what do
+ // browsers do regarding quirks-mode in a media list?
ParsingMode::empty(),
QuirksMode::NoQuirks,
None,
+ None,
);
SourceSizeList::parse(&context, &mut parser)
}
@@ -1147,10 +1156,16 @@ impl HTMLImageElementMethods for HTMLImageElement {
// https://html.spec.whatwg.org/multipage/#dom-img-currentsrc
fn CurrentSrc(&self) -> DOMString {
- let ref url = self.current_request.borrow().source_url;
+ let ref url = self.current_request.borrow().parsed_url;
match *url {
- Some(ref url) => url.clone(),
- None => DOMString::from(""),
+ Some(ref url) => DOMString::from_string(url.clone().into_string()),
+ None => {
+ let ref unparsed_url = self.current_request.borrow().source_url;
+ match *unparsed_url {
+ Some(ref url) => url.clone(),
+ None => DOMString::from("")
+ }
+ },
}
}
diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs
index a86789dcd71..be7b2785ee9 100644
--- a/components/script/dom/htmllinkelement.rs
+++ b/components/script/dom/htmllinkelement.rs
@@ -287,6 +287,7 @@ impl HTMLLinkElement {
ParsingMode::DEFAULT,
document.quirks_mode(),
window.css_error_reporter(),
+ None,
);
let media = MediaList::parse(&context, &mut css_parser);
diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs
index 82da9ba6180..bcecab9088b 100644
--- a/components/script/dom/htmlstyleelement.rs
+++ b/components/script/dom/htmlstyleelement.rs
@@ -91,6 +91,7 @@ impl HTMLStyleElement {
ParsingMode::DEFAULT,
doc.quirks_mode(),
css_error_reporter,
+ None,
);
let shared_lock = node.owner_doc().style_shared_lock().clone();
let mut input = ParserInput::new(&mq_str);
diff --git a/components/script/dom/medialist.rs b/components/script/dom/medialist.rs
index d43f6d3a710..99800f1beb1 100644
--- a/components/script/dom/medialist.rs
+++ b/components/script/dom/medialist.rs
@@ -83,6 +83,7 @@ impl MediaListMethods for MediaList {
ParsingMode::DEFAULT,
quirks_mode,
window.css_error_reporter(),
+ None,
);
*media_queries = StyleMediaList::parse(&context, &mut parser);
}
@@ -123,6 +124,7 @@ impl MediaListMethods for MediaList {
ParsingMode::DEFAULT,
quirks_mode,
win.css_error_reporter(),
+ None,
);
let m = MediaQuery::parse(&context, &mut parser);
// Step 2
@@ -156,6 +158,7 @@ impl MediaListMethods for MediaList {
ParsingMode::DEFAULT,
quirks_mode,
win.css_error_reporter(),
+ None,
);
let m = MediaQuery::parse(&context, &mut parser);
// Step 2
diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs
index 758c4284979..04a234a80d3 100644
--- a/components/script/dom/mod.rs
+++ b/components/script/dom/mod.rs
@@ -241,6 +241,7 @@ pub mod bluetoothuuid;
pub mod canvasgradient;
pub mod canvaspattern;
pub mod canvasrenderingcontext2d;
+pub mod channelmergernode;
pub mod characterdata;
pub mod client;
pub mod closeevent;
diff --git a/components/script/dom/offlineaudiocontext.rs b/components/script/dom/offlineaudiocontext.rs
index 4490d5df6f9..21376c11a4d 100644
--- a/components/script/dom/offlineaudiocontext.rs
+++ b/components/script/dom/offlineaudiocontext.rs
@@ -144,6 +144,10 @@ impl OfflineAudioContextMethods for OfflineAudioContext {
task!(resolve: move || {
let this = this.root();
let processed_audio = processed_audio.lock().unwrap();
+ let processed_audio: Vec<_> = processed_audio
+ .chunks(this.length as usize)
+ .map(|channel| channel.to_vec())
+ .collect();
let buffer = AudioBuffer::new(
&this.global().as_window(),
this.channel_count,
diff --git a/components/script/dom/oscillatornode.rs b/components/script/dom/oscillatornode.rs
index f44fa747f7d..662724c4438 100644
--- a/components/script/dom/oscillatornode.rs
+++ b/components/script/dom/oscillatornode.rs
@@ -35,7 +35,7 @@ impl OscillatorNode {
window: &Window,
context: &BaseAudioContext,
oscillator_options: &OscillatorOptions,
- ) -> OscillatorNode {
+ ) -> Fallible<OscillatorNode> {
let mut node_options = AudioNodeOptions::empty();
node_options.channelCount = Some(2);
node_options.channelCountMode = Some(ChannelCountMode::Max);
@@ -46,7 +46,7 @@ impl OscillatorNode {
&node_options,
0, /* inputs */
1, /* outputs */
- );
+ )?;
let node_id = source_node.node().node_id();
let frequency = AudioParam::new(
window,
@@ -69,12 +69,12 @@ impl OscillatorNode {
440. / 2.,
);
- OscillatorNode {
+ Ok(OscillatorNode {
source_node,
oscillator_type: oscillator_options.type_,
frequency: Dom::from_ref(&frequency),
detune: Dom::from_ref(&detune),
- }
+ })
}
#[allow(unrooted_must_root)]
@@ -82,9 +82,9 @@ impl OscillatorNode {
window: &Window,
context: &BaseAudioContext,
options: &OscillatorOptions,
- ) -> DomRoot<OscillatorNode> {
- let node = OscillatorNode::new_inherited(window, context, options);
- reflect_dom_object(Box::new(node), window, OscillatorNodeBinding::Wrap)
+ ) -> Fallible<DomRoot<OscillatorNode>> {
+ let node = OscillatorNode::new_inherited(window, context, options)?;
+ Ok(reflect_dom_object(Box::new(node), window, OscillatorNodeBinding::Wrap))
}
pub fn Constructor(
@@ -92,7 +92,7 @@ impl OscillatorNode {
context: &BaseAudioContext,
options: &OscillatorOptions,
) -> Fallible<DomRoot<OscillatorNode>> {
- Ok(OscillatorNode::new(window, context, options))
+ OscillatorNode::new(window, context, options)
}
}
diff --git a/components/script/dom/pannernode.rs b/components/script/dom/pannernode.rs
index 7f1909cdb50..a27388f2cab 100644
--- a/components/script/dom/pannernode.rs
+++ b/components/script/dom/pannernode.rs
@@ -54,16 +54,29 @@ impl PannerNode {
) -> Fallible<PannerNode> {
let count = options.parent.channelCount.unwrap_or(2);
let mode = options.parent.channelCountMode.unwrap_or(ChannelCountMode::Clamped_max);
+ let interpretation = options.parent.channelInterpretation.unwrap_or(ChannelInterpretation::Speakers);
if mode == ChannelCountMode::Max {
return Err(Error::NotSupported)
}
- if count > 2 {
+ if count > 2 || count == 0 {
return Err(Error::NotSupported)
}
+ if *options.maxDistance <= 0. {
+ return Err(Error::Range("maxDistance should be positive".into()))
+ }
+ if *options.refDistance < 0. {
+ return Err(Error::Range("refDistance should be non-negative".into()))
+ }
+ if *options.rolloffFactor < 0. {
+ return Err(Error::Range("rolloffFactor should be non-negative".into()))
+ }
+ if *options.coneOuterGain < 0. || *options.coneOuterGain > 1. {
+ return Err(Error::InvalidState)
+ }
let mut node_options = AudioNodeOptions::empty();
node_options.channelCount = Some(count);
node_options.channelCountMode = Some(mode);
- node_options.channelInterpretation = Some(ChannelInterpretation::Speakers);
+ node_options.channelInterpretation = Some(interpretation);
let options = options.into();
let node = AudioNode::new_inherited(
AudioNodeInit::PannerNode(options),
@@ -71,7 +84,7 @@ impl PannerNode {
&node_options,
1, // inputs
1, // outputs
- );
+ )?;
let id = node.node_id();
let position_x = AudioParam::new(
window,
@@ -230,10 +243,14 @@ impl PannerNodeMethods for PannerNode {
Finite::wrap(self.ref_distance.get())
}
// https://webaudio.github.io/web-audio-api/#dom-pannernode-refdistance
- fn SetRefDistance(&self, val: Finite<f64>) {
+ fn SetRefDistance(&self, val: Finite<f64>) -> Fallible<()> {
+ if *val < 0. {
+ return Err(Error::Range("value should be non-negative".into()))
+ }
self.ref_distance.set(*val);
let msg = PannerNodeMessage::SetRefDistance(self.ref_distance.get());
self.upcast::<AudioNode>().message(AudioNodeMessage::PannerNode(msg));
+ Ok(())
}
// https://webaudio.github.io/web-audio-api/#dom-pannernode-maxdistance
fn MaxDistance(&self) -> Finite<f64> {
@@ -241,8 +258,8 @@ impl PannerNodeMethods for PannerNode {
}
// https://webaudio.github.io/web-audio-api/#dom-pannernode-maxdistance
fn SetMaxDistance(&self, val: Finite<f64>) -> Fallible<()> {
- if *val < 0. {
- return Err(Error::NotSupported)
+ if *val <= 0. {
+ return Err(Error::Range("value should be positive".into()))
}
self.max_distance.set(*val);
let msg = PannerNodeMessage::SetMaxDistance(self.max_distance.get());
@@ -256,7 +273,7 @@ impl PannerNodeMethods for PannerNode {
// https://webaudio.github.io/web-audio-api/#dom-pannernode-rollofffactor
fn SetRolloffFactor(&self, val: Finite<f64>) -> Fallible<()> {
if *val < 0. {
- return Err(Error::Range("value should be positive".into()))
+ return Err(Error::Range("value should be non-negative".into()))
}
self.rolloff_factor.set(*val);
let msg = PannerNodeMessage::SetRolloff(self.rolloff_factor.get());
@@ -289,7 +306,7 @@ impl PannerNodeMethods for PannerNode {
}
// https://webaudio.github.io/web-audio-api/#dom-pannernode-coneoutergain
fn SetConeOuterGain(&self, val: Finite<f64>) -> Fallible<()> {
- if *val < 0. || *val > 360. {
+ if *val < 0. || *val > 1. {
return Err(Error::InvalidState)
}
self.cone_outer_gain.set(*val);
diff --git a/components/script/dom/serviceworkerglobalscope.rs b/components/script/dom/serviceworkerglobalscope.rs
index 7e737b8d3d0..50080f9925b 100644
--- a/components/script/dom/serviceworkerglobalscope.rs
+++ b/components/script/dom/serviceworkerglobalscope.rs
@@ -5,17 +5,20 @@
use devtools;
use devtools_traits::DevtoolScriptControlMsg;
use dom::abstractworker::WorkerScriptMsg;
+use dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop};
use dom::bindings::codegen::Bindings::ServiceWorkerGlobalScopeBinding;
use dom::bindings::codegen::Bindings::ServiceWorkerGlobalScopeBinding::ServiceWorkerGlobalScopeMethods;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::DomObject;
use dom::bindings::root::{DomRoot, RootCollection, ThreadLocalStackRoots};
use dom::bindings::str::DOMString;
+use dom::dedicatedworkerglobalscope::AutoWorkerReset;
use dom::event::Event;
use dom::eventtarget::EventTarget;
use dom::extendableevent::ExtendableEvent;
use dom::extendablemessageevent::ExtendableMessageEvent;
use dom::globalscope::GlobalScope;
+use dom::worker::TrustedWorkerAddress;
use dom::workerglobalscope::WorkerGlobalScope;
use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcSender, IpcReceiver};
@@ -29,17 +32,64 @@ use script_traits::{TimerEvent, WorkerGlobalScopeInit, ScopeThings, ServiceWorke
use servo_config::prefs::PREFS;
use servo_rand::random;
use servo_url::ServoUrl;
-use std::sync::mpsc::{Receiver, RecvError, Select, Sender, channel};
+use std::sync::mpsc::{Receiver, Sender, channel};
use std::thread;
use std::time::Duration;
use style::thread_state::{self, ThreadState};
+use task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
+use task_source::TaskSourceName;
/// Messages used to control service worker event loop
pub enum ServiceWorkerScriptMsg {
/// Message common to all workers
CommonWorker(WorkerScriptMsg),
- // Message to request a custom response by the service worker
- Response(CustomResponseMediator)
+ /// Message to request a custom response by the service worker
+ Response(CustomResponseMediator),
+ /// Wake-up call from the task queue.
+ WakeUp,
+}
+
+impl QueuedTaskConversion for ServiceWorkerScriptMsg {
+ fn task_source_name(&self) -> Option<&TaskSourceName> {
+ let script_msg = match self {
+ ServiceWorkerScriptMsg::CommonWorker(WorkerScriptMsg::Common(script_msg)) => script_msg,
+ _ => return None,
+ };
+ match script_msg {
+ CommonScriptMsg::Task(_category, _boxed, _pipeline_id, task_source) => Some(&task_source),
+ _ => return None,
+ }
+ }
+
+ fn into_queued_task(self) -> Option<QueuedTask> {
+ let script_msg = match self {
+ ServiceWorkerScriptMsg::CommonWorker(WorkerScriptMsg::Common(script_msg)) => script_msg,
+ _ => return None,
+ };
+ let (category, boxed, pipeline_id, task_source) = match script_msg {
+ CommonScriptMsg::Task(category, boxed, pipeline_id, task_source) =>
+ (category, boxed, pipeline_id, task_source),
+ _ => return None,
+ };
+ Some((None, category, boxed, pipeline_id, task_source))
+ }
+
+ fn from_queued_task(queued_task: QueuedTask) -> Self {
+ let (_worker, category, boxed, pipeline_id, task_source) = queued_task;
+ let script_msg = CommonScriptMsg::Task(category, boxed, pipeline_id, task_source);
+ ServiceWorkerScriptMsg::CommonWorker(WorkerScriptMsg::Common(script_msg))
+ }
+
+ fn wake_up_msg() -> Self {
+ ServiceWorkerScriptMsg::WakeUp
+ }
+
+ fn is_wake_up(&self) -> bool {
+ match self {
+ ServiceWorkerScriptMsg::WakeUp => true,
+ _ => false,
+ }
+ }
}
pub enum MixedMessage {
@@ -67,11 +117,13 @@ impl ScriptChan for ServiceWorkerChan {
}
}
+unsafe_no_jsmanaged_fields!(TaskQueue<ServiceWorkerScriptMsg>);
+
#[dom_struct]
pub struct ServiceWorkerGlobalScope {
workerglobalscope: WorkerGlobalScope,
#[ignore_malloc_size_of = "Defined in std"]
- receiver: Receiver<ServiceWorkerScriptMsg>,
+ task_queue: TaskQueue<ServiceWorkerScriptMsg>,
#[ignore_malloc_size_of = "Defined in std"]
own_sender: Sender<ServiceWorkerScriptMsg>,
#[ignore_malloc_size_of = "Defined in std"]
@@ -81,6 +133,40 @@ pub struct ServiceWorkerGlobalScope {
scope_url: ServoUrl,
}
+impl WorkerEventLoopMethods for ServiceWorkerGlobalScope {
+ type TimerMsg = ();
+ type WorkerMsg = ServiceWorkerScriptMsg;
+ type Event = MixedMessage;
+
+ fn timer_event_port(&self) -> &Receiver<()> {
+ &self.timer_event_port
+ }
+
+ fn task_queue(&self) -> &TaskQueue<ServiceWorkerScriptMsg> {
+ &self.task_queue
+ }
+
+ fn handle_event(&self, event: MixedMessage) {
+ self.handle_mixed_message(event);
+ }
+
+ fn handle_worker_post_event(&self, _worker: &TrustedWorkerAddress) -> Option<AutoWorkerReset> {
+ None
+ }
+
+ fn from_worker_msg(&self, msg: ServiceWorkerScriptMsg) -> MixedMessage {
+ MixedMessage::FromServiceWorker(msg)
+ }
+
+ fn from_timer_msg(&self, msg: ()) -> MixedMessage {
+ MixedMessage::FromTimeoutThread(msg)
+ }
+
+ fn from_devtools_msg(&self, msg: DevtoolScriptControlMsg) -> MixedMessage {
+ MixedMessage::FromDevtools(msg)
+ }
+}
+
impl ServiceWorkerGlobalScope {
fn new_inherited(init: WorkerGlobalScopeInit,
worker_url: ServoUrl,
@@ -100,7 +186,7 @@ impl ServiceWorkerGlobalScope {
from_devtools_receiver,
timer_event_chan,
None),
- receiver: receiver,
+ task_queue: TaskQueue::new(receiver, own_sender.clone()),
timer_event_port: timer_event_port,
own_sender: own_sender,
swmanager_sender: swmanager_sender,
@@ -139,6 +225,7 @@ impl ServiceWorkerGlobalScope {
}
#[allow(unsafe_code)]
+ // https://html.spec.whatwg.org/multipage/#run-a-worker
pub fn run_serviceworker_scope(scope_things: ScopeThings,
own_sender: Sender<ServiceWorkerScriptMsg>,
receiver: Receiver<ServiceWorkerScriptMsg>,
@@ -211,22 +298,18 @@ impl ServiceWorkerGlobalScope {
global.dispatch_activate();
let reporter_name = format!("service-worker-reporter-{}", random::<u64>());
scope.upcast::<GlobalScope>().mem_profiler_chan().run_with_memory_reporting(|| {
- // https://html.spec.whatwg.org/multipage/#event-loop-processing-model
- // Step 1
- while let Ok(event) = global.receive_event() {
- // Step 3
- if !global.handle_event(event) {
- break;
- }
- // Step 6
- global.upcast::<GlobalScope>().perform_a_microtask_checkpoint();
+ // Step 29, Run the responsible event loop specified by inside settings until it is destroyed.
+ // The worker processing model remains on this step until the event loop is destroyed,
+ // which happens after the closing flag is set to true.
+ while !scope.is_closing() {
+ run_worker_event_loop(&*global, None);
}
}, reporter_name, scope.script_chan(), CommonScriptMsg::CollectReports);
}).expect("Thread spawning failed");
}
- fn handle_event(&self, event: MixedMessage) -> bool {
- match event {
+ fn handle_mixed_message(&self, msg: MixedMessage) -> bool {
+ match msg {
MixedMessage::FromDevtools(msg) => {
match msg {
DevtoolScriptControlMsg::EvaluateJS(_pipe_id, string, sender) =>
@@ -271,38 +354,8 @@ impl ServiceWorkerGlobalScope {
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker_1/index.html#fetch-event-section
self.upcast::<EventTarget>().fire_event(atom!("fetch"));
let _ = mediator.response_chan.send(None);
- }
- }
- }
-
- #[allow(unsafe_code)]
- fn receive_event(&self) -> Result<MixedMessage, RecvError> {
- let scope = self.upcast::<WorkerGlobalScope>();
- let worker_port = &self.receiver;
- let devtools_port = scope.from_devtools_receiver();
- let timer_event_port = &self.timer_event_port;
-
- let sel = Select::new();
- let mut worker_handle = sel.handle(worker_port);
- let mut devtools_handle = sel.handle(devtools_port);
- let mut timer_port_handle = sel.handle(timer_event_port);
- unsafe {
- worker_handle.add();
- if scope.from_devtools_sender().is_some() {
- devtools_handle.add();
- }
- timer_port_handle.add();
- }
-
- let ret = sel.wait();
- if ret == worker_handle.id() {
- Ok(MixedMessage::FromServiceWorker(worker_port.recv()?))
- }else if ret == devtools_handle.id() {
- Ok(MixedMessage::FromDevtools(devtools_port.recv()?))
- } else if ret == timer_port_handle.id() {
- Ok(MixedMessage::FromTimeoutThread(timer_event_port.recv()?))
- } else {
- panic!("unexpected select result!")
+ },
+ WakeUp => {},
}
}
diff --git a/components/script/dom/vrdisplay.rs b/components/script/dom/vrdisplay.rs
index c9f24d04ffa..397ec725a4d 100644
--- a/components/script/dom/vrdisplay.rs
+++ b/components/script/dom/vrdisplay.rs
@@ -42,6 +42,7 @@ use std::ops::Deref;
use std::rc::Rc;
use std::sync::mpsc;
use std::thread;
+use task_source::TaskSourceName;
use webvr_traits::{WebVRDisplayData, WebVRDisplayEvent, WebVRFrameData, WebVRLayer, WebVRMsg};
#[dom_struct]
@@ -517,7 +518,14 @@ impl VRDisplay {
let task = Box::new(task!(handle_vrdisplay_raf: move || {
this.root().handle_raf(&sender);
}));
- js_sender.send(CommonScriptMsg::Task(WebVREvent, task, Some(pipeline_id))).unwrap();
+ // NOTE: WebVR spec doesn't specify what task source we should use. Is
+ // dom-manipulation a good choice long term?
+ js_sender.send(CommonScriptMsg::Task(
+ WebVREvent,
+ task,
+ Some(pipeline_id),
+ TaskSourceName::DOMManipulation,
+ )).unwrap();
// Run Sync Poses in parallell on Render thread
let msg = WebVRCommand::SyncPoses(display_id, near, far, sync_sender.clone());
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs
index 811fc100e6b..da50ed556df 100644
--- a/components/script/dom/webgl2renderingcontext.rs
+++ b/components/script/dom/webgl2renderingcontext.rs
@@ -240,14 +240,18 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
self.base.GenerateMipmap(target)
}
- #[allow(unsafe_code)]
/// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
- unsafe fn BufferData(&self, cx: *mut JSContext, target: u32, data: *mut JSObject, usage: u32) -> Fallible<()> {
- self.base.BufferData(cx, target, data, usage)
+ fn BufferData(
+ &self,
+ target: u32,
+ data: Option<ArrayBufferViewOrArrayBuffer>,
+ usage: u32,
+ ) {
+ self.base.BufferData(target, data, usage)
}
/// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
- fn BufferData_(&self, target: u32, size: i64, usage: u32) -> Fallible<()> {
+ fn BufferData_(&self, target: u32, size: i64, usage: u32) {
self.base.BufferData_(target, size, usage)
}
@@ -957,7 +961,10 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
count: i32,
primcount: i32,
) {
- self.base.draw_arrays_instanced(mode, first, count, primcount);
+ handle_potential_webgl_error!(
+ self.base,
+ self.base.draw_arrays_instanced(mode, first, count, primcount)
+ )
}
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.9
@@ -969,7 +976,10 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
offset: i64,
primcount: i32,
) {
- self.base.draw_elements_instanced(mode, count, type_, offset, primcount);
+ handle_potential_webgl_error!(
+ self.base,
+ self.base.draw_elements_instanced(mode, count, type_, offset, primcount)
+ )
}
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.9
diff --git a/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs b/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs
index f35abaf15af..7c93c8c6567 100644
--- a/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs
+++ b/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs
@@ -71,7 +71,10 @@ impl ANGLEInstancedArraysMethods for ANGLEInstancedArrays {
count: i32,
primcount: i32,
) {
- self.ctx.draw_arrays_instanced(mode, first, count, primcount);
+ handle_potential_webgl_error!(
+ self.ctx,
+ self.ctx.draw_arrays_instanced(mode, first, count, primcount)
+ )
}
// https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
@@ -83,7 +86,10 @@ impl ANGLEInstancedArraysMethods for ANGLEInstancedArrays {
offset: i64,
primcount: i32,
) {
- self.ctx.draw_elements_instanced(mode, count, type_, offset, primcount);
+ handle_potential_webgl_error!(
+ self.ctx,
+ self.ctx.draw_elements_instanced(mode, count, type_, offset, primcount)
+ )
}
fn VertexAttribDivisorANGLE(&self, index: u32, divisor: u32) {
diff --git a/components/script/dom/webglbuffer.rs b/components/script/dom/webglbuffer.rs
index 66a3ce0af40..c49a3852709 100644
--- a/components/script/dom/webglbuffer.rs
+++ b/components/script/dom/webglbuffer.rs
@@ -13,6 +13,7 @@ use dom::bindings::root::DomRoot;
use dom::webglobject::WebGLObject;
use dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
+use ipc_channel::ipc;
use std::cell::Cell;
#[dom_struct]
@@ -62,10 +63,7 @@ impl WebGLBuffer {
self.id
}
- pub fn buffer_data<T>(&self, target: u32, data: T, usage: u32) -> WebGLResult<()>
- where
- T: Into<Vec<u8>>,
- {
+ pub fn buffer_data(&self, data: &[u8], usage: u32) -> WebGLResult<()> {
match usage {
WebGLRenderingContextConstants::STREAM_DRAW |
WebGLRenderingContextConstants::STATIC_DRAW |
@@ -73,17 +71,13 @@ impl WebGLBuffer {
_ => return Err(WebGLError::InvalidEnum),
}
- if let Some(previous_target) = self.target.get() {
- if target != previous_target {
- return Err(WebGLError::InvalidOperation);
- }
- }
- let data = data.into();
self.capacity.set(data.len());
self.usage.set(usage);
+ let (sender, receiver) = ipc::bytes_channel().unwrap();
self.upcast::<WebGLObject>()
.context()
- .send_command(WebGLCommand::BufferData(target, data.into(), usage));
+ .send_command(WebGLCommand::BufferData(self.target.get().unwrap(), receiver, usage));
+ sender.send(data).unwrap();
Ok(())
}
@@ -154,6 +148,7 @@ impl WebGLBuffer {
impl Drop for WebGLBuffer {
fn drop(&mut self) {
- self.delete();
+ self.mark_for_deletion();
+ assert!(self.is_deleted());
}
}
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 4aa6c047a1b..ab7178ffa16 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
+use byteorder::{ByteOrder, NativeEndian, WriteBytesExt};
use canvas_traits::canvas::{byte_swap, multiply_u8_pixel};
use canvas_traits::webgl::{DOMToTextureCommand, Parameter};
use canvas_traits::webgl::{TexParameter, WebGLCommand, WebGLContextShareMode, WebGLError};
@@ -52,6 +52,7 @@ use dom::window::Window;
use dom_struct::dom_struct;
use euclid::Size2D;
use half::f16;
+use ipc_channel::ipc;
use js::jsapi::{JSContext, JSObject, Type};
use js::jsval::{BooleanValue, DoubleValue, Int32Value, UInt32Value, JSVal};
use js::jsval::{ObjectValue, NullValue, UndefinedValue};
@@ -336,17 +337,12 @@ impl WebGLRenderingContext {
//
// The WebGL spec mentions a couple more operations that trigger
// this: clear() and getParameter(IMPLEMENTATION_COLOR_READ_*).
- fn validate_framebuffer_complete(&self) -> bool {
+ fn validate_framebuffer(&self) -> WebGLResult<()> {
match self.bound_framebuffer.get() {
- Some(fb) => match fb.check_status() {
- constants::FRAMEBUFFER_COMPLETE => return true,
- _ => {
- self.webgl_error(InvalidFramebufferOperation);
- return false;
- }
+ Some(ref fb) if fb.check_status() != constants::FRAMEBUFFER_COMPLETE => {
+ Err(InvalidFramebufferOperation)
},
- // The default framebuffer is always complete.
- None => return true,
+ _ => Ok(()),
}
}
@@ -485,206 +481,6 @@ impl WebGLRenderingContext {
}
}
- // https://en.wikipedia.org/wiki/Relative_luminance
- #[inline]
- fn luminance(r: u8, g: u8, b: u8) -> u8 {
- (0.2126 * (r as f32) +
- 0.7152 * (g as f32) +
- 0.0722 * (b as f32)) as u8
- }
-
- /// Translates an image in rgba8 (red in the first byte) format to
- /// the format that was requested of TexImage.
- ///
- /// From the WebGL 1.0 spec, 5.14.8:
- ///
- /// "The source image data is conceptually first converted to
- /// the data type and format specified by the format and type
- /// arguments, and then transferred to the WebGL
- /// implementation. If a packed pixel format is specified
- /// which would imply loss of bits of precision from the image
- /// data, this loss of precision must occur."
- fn rgba8_image_to_tex_image_data(&self,
- format: TexFormat,
- data_type: TexDataType,
- pixels: Vec<u8>) -> Vec<u8> {
- // hint for vector allocation sizing.
- let pixel_count = pixels.len() / 4;
-
- match (format, data_type) {
- (TexFormat::RGBA, TexDataType::UnsignedByte) => pixels,
- (TexFormat::RGB, TexDataType::UnsignedByte) => {
- // Remove alpha channel
- let mut rgb8 = Vec::<u8>::with_capacity(pixel_count * 3);
- for rgba8 in pixels.chunks(4) {
- rgb8.push(rgba8[0]);
- rgb8.push(rgba8[1]);
- rgb8.push(rgba8[2]);
- }
- rgb8
- },
-
- (TexFormat::Alpha, TexDataType::UnsignedByte) => {
- let mut alpha = Vec::<u8>::with_capacity(pixel_count);
- for rgba8 in pixels.chunks(4) {
- alpha.push(rgba8[3]);
- }
- alpha
- },
-
- (TexFormat::Luminance, TexDataType::UnsignedByte) => {
- let mut luminance = Vec::<u8>::with_capacity(pixel_count);
- for rgba8 in pixels.chunks(4) {
- luminance.push(Self::luminance(rgba8[0], rgba8[1], rgba8[2]));
- }
- luminance
- },
-
- (TexFormat::LuminanceAlpha, TexDataType::UnsignedByte) => {
- let mut data = Vec::<u8>::with_capacity(pixel_count * 2);
- for rgba8 in pixels.chunks(4) {
- data.push(Self::luminance(rgba8[0], rgba8[1], rgba8[2]));
- data.push(rgba8[3]);
- }
- data
- },
-
- (TexFormat::RGBA, TexDataType::UnsignedShort4444) => {
- let mut rgba4 = Vec::<u8>::with_capacity(pixel_count * 2);
- for rgba8 in pixels.chunks(4) {
- rgba4.write_u16::<NativeEndian>((rgba8[0] as u16 & 0xf0) << 8 |
- (rgba8[1] as u16 & 0xf0) << 4 |
- (rgba8[2] as u16 & 0xf0) |
- (rgba8[3] as u16 & 0xf0) >> 4).unwrap();
- }
- rgba4
- }
-
- (TexFormat::RGBA, TexDataType::UnsignedShort5551) => {
- let mut rgba5551 = Vec::<u8>::with_capacity(pixel_count * 2);
- for rgba8 in pixels.chunks(4) {
- rgba5551.write_u16::<NativeEndian>((rgba8[0] as u16 & 0xf8) << 8 |
- (rgba8[1] as u16 & 0xf8) << 3 |
- (rgba8[2] as u16 & 0xf8) >> 2 |
- (rgba8[3] as u16) >> 7).unwrap();
- }
- rgba5551
- }
-
- (TexFormat::RGB, TexDataType::UnsignedShort565) => {
- let mut rgb565 = Vec::<u8>::with_capacity(pixel_count * 2);
- for rgba8 in pixels.chunks(4) {
- rgb565.write_u16::<NativeEndian>((rgba8[0] as u16 & 0xf8) << 8 |
- (rgba8[1] as u16 & 0xfc) << 3 |
- (rgba8[2] as u16 & 0xf8) >> 3).unwrap();
- }
- rgb565
- }
-
-
- (TexFormat::RGBA, TexDataType::Float) => {
- let mut rgbaf32 = Vec::<u8>::with_capacity(pixel_count * 16);
- for rgba8 in pixels.chunks(4) {
- rgbaf32.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap();
- rgbaf32.write_f32::<NativeEndian>(rgba8[1] as f32).unwrap();
- rgbaf32.write_f32::<NativeEndian>(rgba8[2] as f32).unwrap();
- rgbaf32.write_f32::<NativeEndian>(rgba8[3] as f32).unwrap();
- }
- rgbaf32
- }
-
- (TexFormat::RGB, TexDataType::Float) => {
- let mut rgbf32 = Vec::<u8>::with_capacity(pixel_count * 12);
- for rgba8 in pixels.chunks(4) {
- rgbf32.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap();
- rgbf32.write_f32::<NativeEndian>(rgba8[1] as f32).unwrap();
- rgbf32.write_f32::<NativeEndian>(rgba8[2] as f32).unwrap();
- }
- rgbf32
- }
-
- (TexFormat::Alpha, TexDataType::Float) => {
- let mut alpha = Vec::<u8>::with_capacity(pixel_count * 4);
- for rgba8 in pixels.chunks(4) {
- alpha.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap();
- }
- alpha
- },
-
- (TexFormat::Luminance, TexDataType::Float) => {
- let mut luminance = Vec::<u8>::with_capacity(pixel_count * 4);
- for rgba8 in pixels.chunks(4) {
- let p = Self::luminance(rgba8[0], rgba8[1], rgba8[2]);
- luminance.write_f32::<NativeEndian>(p as f32).unwrap();
- }
- luminance
- },
-
- (TexFormat::LuminanceAlpha, TexDataType::Float) => {
- let mut data = Vec::<u8>::with_capacity(pixel_count * 8);
- for rgba8 in pixels.chunks(4) {
- let p = Self::luminance(rgba8[0], rgba8[1], rgba8[2]);
- data.write_f32::<NativeEndian>(p as f32).unwrap();
- data.write_f32::<NativeEndian>(rgba8[3] as f32).unwrap();
- }
- data
- },
-
- (TexFormat::RGBA, TexDataType::HalfFloat) => {
- let mut rgbaf16 = Vec::<u8>::with_capacity(pixel_count * 8);
- for rgba8 in pixels.chunks(4) {
- rgbaf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[0] as f32).as_bits()).unwrap();
- rgbaf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[1] as f32).as_bits()).unwrap();
- rgbaf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[2] as f32).as_bits()).unwrap();
- rgbaf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[3] as f32).as_bits()).unwrap();
- }
- rgbaf16
- },
-
- (TexFormat::RGB, TexDataType::HalfFloat) => {
- let mut rgbf16 = Vec::<u8>::with_capacity(pixel_count * 6);
- for rgba8 in pixels.chunks(4) {
- rgbf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[0] as f32).as_bits()).unwrap();
- rgbf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[1] as f32).as_bits()).unwrap();
- rgbf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[2] as f32).as_bits()).unwrap();
- }
- rgbf16
- },
-
- (TexFormat::Alpha, TexDataType::HalfFloat) => {
- let mut alpha = Vec::<u8>::with_capacity(pixel_count * 2);
- for rgba8 in pixels.chunks(4) {
- alpha.write_u16::<NativeEndian>(f16::from_f32(rgba8[3] as f32).as_bits()).unwrap();
- }
- alpha
- },
-
- (TexFormat::Luminance, TexDataType::HalfFloat) => {
- let mut luminance = Vec::<u8>::with_capacity(pixel_count * 4);
- for rgba8 in pixels.chunks(4) {
- let p = Self::luminance(rgba8[0], rgba8[1], rgba8[2]);
- luminance.write_u16::<NativeEndian>(f16::from_f32(p as f32).as_bits()).unwrap();
- }
- luminance
- },
-
- (TexFormat::LuminanceAlpha, TexDataType::HalfFloat) => {
- let mut data = Vec::<u8>::with_capacity(pixel_count * 8);
- for rgba8 in pixels.chunks(4) {
- let p = Self::luminance(rgba8[0], rgba8[1], rgba8[2]);
- data.write_u16::<NativeEndian>(f16::from_f32(p as f32).as_bits()).unwrap();
- data.write_u16::<NativeEndian>(f16::from_f32(rgba8[3] as f32).as_bits()).unwrap();
- }
- data
- },
-
- // Validation should have ensured that we only hit the
- // above cases, but we haven't turned the (format, type)
- // into an enum yet so there's a default case here.
- _ => unreachable!("Unsupported formats {:?} {:?}", format, data_type)
- }
- }
-
fn get_image_pixels(
&self,
source: ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement,
@@ -829,83 +625,51 @@ impl WebGLRenderingContext {
/// Performs premultiplication of the pixels if
/// UNPACK_PREMULTIPLY_ALPHA_WEBGL is currently enabled.
- fn premultiply_pixels(&self,
- format: TexFormat,
- data_type: TexDataType,
- pixels: Vec<u8>) -> Vec<u8> {
+ fn premultiply_pixels(&self, format: TexFormat, data_type: TexDataType, pixels: &mut [u8]) {
if !self.texture_unpacking_settings.get().contains(TextureUnpacking::PREMULTIPLY_ALPHA) {
- return pixels;
+ return;
}
match (format, data_type) {
(TexFormat::RGBA, TexDataType::UnsignedByte) => {
- let mut premul = Vec::<u8>::with_capacity(pixels.len());
- for rgba in pixels.chunks(4) {
- premul.push(multiply_u8_pixel(rgba[0], rgba[3]));
- premul.push(multiply_u8_pixel(rgba[1], rgba[3]));
- premul.push(multiply_u8_pixel(rgba[2], rgba[3]));
- premul.push(rgba[3]);
+ for rgba in pixels.chunks_mut(4) {
+ rgba[0] = multiply_u8_pixel(rgba[0], rgba[3]);
+ rgba[1] = multiply_u8_pixel(rgba[1], rgba[3]);
+ rgba[2] = multiply_u8_pixel(rgba[2], rgba[3]);
}
- premul
- }
+ },
(TexFormat::LuminanceAlpha, TexDataType::UnsignedByte) => {
- let mut premul = Vec::<u8>::with_capacity(pixels.len());
- for la in pixels.chunks(2) {
- premul.push(multiply_u8_pixel(la[0], la[1]));
- premul.push(la[1]);
+ for la in pixels.chunks_mut(2) {
+ la[0] = multiply_u8_pixel(la[0], la[1]);
}
- premul
- }
-
+ },
(TexFormat::RGBA, TexDataType::UnsignedShort5551) => {
- let mut premul = Vec::<u8>::with_capacity(pixels.len());
- for mut rgba in pixels.chunks(2) {
- let pix = rgba.read_u16::<NativeEndian>().unwrap();
- if pix & (1 << 15) != 0 {
- premul.write_u16::<NativeEndian>(pix).unwrap();
- } else {
- premul.write_u16::<NativeEndian>(0).unwrap();
+ for rgba in pixels.chunks_mut(2) {
+ if NativeEndian::read_u16(rgba) & 1 == 0 {
+ NativeEndian::write_u16(rgba, 0);
}
}
- premul
- }
-
+ },
(TexFormat::RGBA, TexDataType::UnsignedShort4444) => {
- let mut premul = Vec::<u8>::with_capacity(pixels.len());
- for mut rgba in pixels.chunks(2) {
- let pix = rgba.read_u16::<NativeEndian>().unwrap();
- let extend_to_8_bits = |val| { (val | val << 4) as u8 };
- let r = extend_to_8_bits(pix & 0x000f);
- let g = extend_to_8_bits((pix & 0x00f0) >> 4);
- let b = extend_to_8_bits((pix & 0x0f00) >> 8);
- let a = extend_to_8_bits((pix & 0xf000) >> 12);
-
- premul.write_u16::<NativeEndian>((multiply_u8_pixel(r, a) & 0xf0) as u16 >> 4 |
- (multiply_u8_pixel(g, a) & 0xf0) as u16 |
- ((multiply_u8_pixel(b, a) & 0xf0) as u16) << 4 |
- pix & 0xf000).unwrap();
+ for rgba in pixels.chunks_mut(2) {
+ let pix = NativeEndian::read_u16(rgba);
+ let extend_to_8_bits = |val| (val | val << 4) as u8;
+ let r = extend_to_8_bits(pix >> 12 & 0x0f);
+ let g = extend_to_8_bits(pix >> 8 & 0x0f);
+ let b = extend_to_8_bits(pix >> 4 & 0x0f);
+ let a = extend_to_8_bits(pix & 0x0f);
+ NativeEndian::write_u16(
+ rgba,
+ ((multiply_u8_pixel(r, a) & 0xf0) as u16) << 8 |
+ ((multiply_u8_pixel(g, a) & 0xf0) as u16) << 4 |
+ ((multiply_u8_pixel(b, a) & 0xf0) as u16) |
+ ((a & 0x0f) as u16),
+ );
}
- premul
- }
-
+ },
// Other formats don't have alpha, so return their data untouched.
- _ => pixels
- }
- }
-
- // Remove premultiplied alpha.
- // This is only called when texImage2D is called using a canvas2d source and
- // UNPACK_PREMULTIPLY_ALPHA_WEBGL is disabled. Pixels got from a canvas2D source
- // are always RGBA8 with premultiplied alpha, so we don't have to worry about
- // additional formats as happens in the premultiply_pixels method.
- fn remove_premultiplied_alpha(&self, mut pixels: Vec<u8>) -> Vec<u8> {
- for rgba in pixels.chunks_mut(4) {
- let a = (rgba[3] as f32) / 255.0;
- rgba[0] = (rgba[0] as f32 / a) as u8;
- rgba[1] = (rgba[1] as f32 / a) as u8;
- rgba[2] = (rgba[2] as f32 / a) as u8;
+ _ => {},
}
- pixels
}
fn prepare_pixels(&self,
@@ -921,16 +685,16 @@ impl WebGLRenderingContext {
if !source_premultiplied && dest_premultiply {
if source_from_image_or_canvas {
// When the pixels come from image or canvas or imagedata, use RGBA8 format
- pixels = self.premultiply_pixels(TexFormat::RGBA, TexDataType::UnsignedByte, pixels);
+ self.premultiply_pixels(TexFormat::RGBA, TexDataType::UnsignedByte, &mut pixels);
} else {
- pixels = self.premultiply_pixels(internal_format, data_type, pixels);
+ self.premultiply_pixels(internal_format, data_type, &mut pixels);
}
} else if source_premultiplied && !dest_premultiply {
- pixels = self.remove_premultiplied_alpha(pixels);
+ remove_premultiplied_alpha(&mut pixels);
}
if source_from_image_or_canvas {
- pixels = self.rgba8_image_to_tex_image_data(internal_format, data_type, pixels);
+ pixels = rgba8_image_to_tex_image_data(internal_format, data_type, pixels);
}
// FINISHME: Consider doing premultiply and flip in a single mutable Vec.
@@ -970,17 +734,17 @@ impl WebGLRenderingContext {
let internal_format = self.extension_manager.get_effective_tex_internal_format(format, data_type);
// TODO(emilio): convert colorspace if requested
- let msg = WebGLCommand::TexImage2D(
+ let (sender, receiver) = ipc::bytes_channel().unwrap();
+ self.send_command(WebGLCommand::TexImage2D(
target.as_gl_constant(),
level as i32,
internal_format as i32,
width as i32, height as i32,
format,
data_type,
- pixels.into(),
- );
-
- self.send_command(msg);
+ receiver,
+ ));
+ sender.send(&pixels).unwrap();
if let Some(fb) = self.bound_framebuffer.get() {
fb.invalidate_texture(&*texture);
@@ -1025,7 +789,8 @@ impl WebGLRenderingContext {
self.send_command(WebGLCommand::PixelStorei(constants::UNPACK_ALIGNMENT, unpacking_alignment as i32));
// TODO(emilio): convert colorspace if requested
- let msg = WebGLCommand::TexSubImage2D(
+ let (sender, receiver) = ipc::bytes_channel().unwrap();
+ self.send_command(WebGLCommand::TexSubImage2D(
target.as_gl_constant(),
level as i32,
xoffset,
@@ -1034,10 +799,9 @@ impl WebGLRenderingContext {
height as i32,
format.as_gl_constant(),
data_type.as_gl_constant(),
- pixels.into(),
- );
-
- self.send_command(msg);
+ receiver,
+ ));
+ sender.send(&pixels).unwrap();
}
fn get_gl_extensions(&self) -> String {
@@ -1076,48 +840,38 @@ impl WebGLRenderingContext {
first: i32,
count: i32,
primcount: i32,
- ) {
+ ) -> WebGLResult<()> {
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);
+ return Err(InvalidEnum);
}
}
if first < 0 || count < 0 || primcount < 0 {
- return self.webgl_error(InvalidValue);
+ return Err(InvalidValue);
}
- let current_program = handle_potential_webgl_error!(
- self,
- self.current_program.get().ok_or(InvalidOperation),
- return
- );
+ let current_program = self.current_program.get().ok_or(InvalidOperation)?;
let required_len = if count > 0 {
- handle_potential_webgl_error!(
- self,
- first.checked_add(count).map(|len| len as u32).ok_or(InvalidOperation),
- return
- )
+ first.checked_add(count).map(|len| len as u32).ok_or(InvalidOperation)?
} else {
0
};
- handle_potential_webgl_error!(
- self,
- self.current_vao().validate_for_draw(required_len, primcount as u32, &current_program.active_attribs()),
- return
- );
+ self.current_vao().validate_for_draw(
+ required_len,
+ primcount as u32,
+ &current_program.active_attribs(),
+ )?;
- if !self.validate_framebuffer_complete() {
- return;
- }
+ self.validate_framebuffer()?;
if count == 0 || primcount == 0 {
- return;
+ return Ok(());
}
self.send_command(if primcount == 1 {
@@ -1126,6 +880,7 @@ impl WebGLRenderingContext {
WebGLCommand::DrawArraysInstanced { mode, first, count, primcount }
});
self.mark_as_dirty();
+ Ok(())
}
// https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
@@ -1136,60 +891,47 @@ impl WebGLRenderingContext {
type_: u32,
offset: i64,
primcount: i32,
- ) {
+ ) -> WebGLResult<()> {
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);
+ return Err(InvalidEnum);
}
}
if count < 0 || offset < 0 || primcount < 0 {
- return self.webgl_error(InvalidValue);
+ return Err(InvalidValue);
}
let type_size = match type_ {
constants::UNSIGNED_BYTE => 1,
constants::UNSIGNED_SHORT => 2,
constants::UNSIGNED_INT if self.extension_manager.is_element_index_uint_enabled() => 4,
- _ => return self.webgl_error(InvalidEnum),
+ _ => return Err(InvalidEnum),
};
if offset % type_size != 0 {
- return self.webgl_error(InvalidOperation);
+ return Err(InvalidOperation);
}
- let current_program = handle_potential_webgl_error!(
- self,
- self.current_program.get().ok_or(InvalidOperation),
- return
- );
+ let current_program = self.current_program.get().ok_or(InvalidOperation)?;
+ let array_buffer = self.current_vao().element_array_buffer().get().ok_or(InvalidOperation)?;
if count > 0 && primcount > 0 {
- if let Some(array_buffer) = self.current_vao().element_array_buffer().get() {
- // This operation cannot overflow in u64 and we know all those values are nonnegative.
- 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 {
- return self.webgl_error(InvalidOperation);
+ // This operation cannot overflow in u64 and we know all those values are nonnegative.
+ let val = offset as u64 + (count as u64 * type_size as u64);
+ if val > array_buffer.capacity() as u64 {
+ return Err(InvalidOperation);
}
}
// TODO(nox): Pass the correct number of vertices required.
- handle_potential_webgl_error!(
- self,
- self.current_vao().validate_for_draw(0, primcount as u32, &current_program.active_attribs()),
- return
- );
+ self.current_vao().validate_for_draw(0, primcount as u32, &current_program.active_attribs())?;
- if !self.validate_framebuffer_complete() {
- return;
- }
+ self.validate_framebuffer()?;
if count == 0 || primcount == 0 {
- return;
+ return Ok(());
}
let offset = offset as u32;
@@ -1199,6 +941,7 @@ impl WebGLRenderingContext {
WebGLCommand::DrawElementsInstanced { mode, count, type_, offset, primcount }
});
self.mark_as_dirty();
+ Ok(())
}
pub fn vertex_attrib_divisor(&self, index: u32, divisor: u32) {
@@ -1216,20 +959,18 @@ impl WebGLRenderingContext {
// can fail and that it is UB what happens in that case.
//
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#2.2
- pub fn get_image_data(&self, mut width: u32, mut height: u32) -> Option<Vec<u8>> {
- if !self.validate_framebuffer_complete() {
- return None;
- }
+ pub fn get_image_data(&self, width: u32, height: u32) -> Option<Vec<u8>> {
+ handle_potential_webgl_error!(self, self.validate_framebuffer(), return None);
- if let Some((fb_width, fb_height)) = self.get_current_framebuffer_size() {
- width = cmp::min(width, fb_width as u32);
- height = cmp::min(height, fb_height as u32);
- } else {
- self.webgl_error(InvalidOperation);
- return None;
- }
+ let (fb_width, fb_height) = handle_potential_webgl_error!(
+ self,
+ self.get_current_framebuffer_size().ok_or(InvalidOperation),
+ return None
+ );
+ let width = cmp::min(width, fb_width as u32);
+ let height = cmp::min(height, fb_height as u32);
- let (sender, receiver) = webgl_channel().unwrap();
+ let (sender, receiver) = ipc::bytes_channel().unwrap();
self.send_command(WebGLCommand::ReadPixels(
0,
0,
@@ -1239,7 +980,7 @@ impl WebGLRenderingContext {
constants::UNSIGNED_BYTE,
sender,
));
- Some(receiver.recv().unwrap().into())
+ Some(receiver.recv().unwrap())
}
pub fn array_buffer(&self) -> Option<DomRoot<WebGLBuffer>> {
@@ -1324,19 +1065,6 @@ impl Drop for WebGLRenderingContext {
}
}
-#[allow(unsafe_code)]
-unsafe fn fallible_array_buffer_view_to_vec(
- cx: *mut JSContext,
- abv: *mut JSObject,
-) -> Result<Vec<u8>, Error> {
- assert!(!abv.is_null());
- typedarray!(in(cx) let array_buffer_view: ArrayBufferView = abv);
- match array_buffer_view {
- Ok(v) => Ok(v.to_vec()),
- Err(_) => Err(Error::Type("Not an ArrayBufferView".to_owned())),
- }
-}
-
impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.1
fn Canvas(&self) -> DomRoot<HTMLCanvasElement> {
@@ -1436,18 +1164,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// GL_OES_read_format support (assuming an underlying GLES
// driver. Desktop is happy to format convert for us).
constants::IMPLEMENTATION_COLOR_READ_FORMAT => {
- if !self.validate_framebuffer_complete() {
- return NullValue();
- } else {
- return Int32Value(constants::RGBA as i32);
- }
+ handle_potential_webgl_error!(self, self.validate_framebuffer(), return NullValue());
+ return Int32Value(constants::RGBA as i32);
}
constants::IMPLEMENTATION_COLOR_READ_TYPE => {
- if !self.validate_framebuffer_complete() {
- return NullValue();
- } else {
- return Int32Value(constants::UNSIGNED_BYTE as i32);
- }
+ handle_potential_webgl_error!(self, self.validate_framebuffer(), return NullValue());
+ return Int32Value(constants::UNSIGNED_BYTE as i32);
}
constants::COMPRESSED_TEXTURE_FORMATS => {
// FIXME(nox): https://github.com/servo/servo/issues/20594
@@ -1892,80 +1614,71 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
handle_potential_webgl_error!(self, texture.generate_mipmap());
}
- #[allow(unsafe_code)]
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
- unsafe fn BufferData(
+ #[allow(unsafe_code)]
+ fn BufferData(
&self,
- cx: *mut JSContext,
target: u32,
- data: *mut JSObject,
+ data: Option<ArrayBufferViewOrArrayBuffer>,
usage: u32,
- ) -> ErrorResult {
- if data.is_null() {
- return Ok(self.webgl_error(InvalidValue));
- }
+ ) {
+ let data = handle_potential_webgl_error!(self, data.ok_or(InvalidValue), return);
- typedarray!(in(cx) let array_buffer: ArrayBuffer = data);
- let data_vec = match array_buffer {
- Ok(data) => data.to_vec(),
- Err(_) => fallible_array_buffer_view_to_vec(cx, data)?,
- };
+ let bound_buffer = handle_potential_webgl_error!(self, self.bound_buffer(target), return);
+ let bound_buffer = handle_potential_webgl_error!(self, bound_buffer.ok_or(InvalidOperation), return);
- let bound_buffer = handle_potential_webgl_error!(self, self.bound_buffer(target), return Ok(()));
- let bound_buffer = match bound_buffer {
- Some(bound_buffer) => bound_buffer,
- None => return Ok(self.webgl_error(InvalidOperation)),
+ let data = unsafe {
+ // Safe because we don't do anything with JS until the end of the method.
+ match data {
+ ArrayBufferViewOrArrayBuffer::ArrayBuffer(ref data) => data.as_slice(),
+ ArrayBufferViewOrArrayBuffer::ArrayBufferView(ref data) => data.as_slice(),
+ }
};
-
- handle_potential_webgl_error!(self, bound_buffer.buffer_data(target, data_vec, usage));
- Ok(())
+ handle_potential_webgl_error!(self, bound_buffer.buffer_data(data, usage));
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
- fn BufferData_(&self, target: u32, size: i64, usage: u32) -> ErrorResult {
- let bound_buffer = handle_potential_webgl_error!(self, self.bound_buffer(target), return Ok(()));
- let bound_buffer = match bound_buffer {
- Some(bound_buffer) => bound_buffer,
- None => return Ok(self.webgl_error(InvalidOperation)),
- };
+ fn BufferData_(&self, target: u32, size: i64, usage: u32) {
+ let bound_buffer = handle_potential_webgl_error!(self, self.bound_buffer(target), return);
+ let bound_buffer = handle_potential_webgl_error!(self, bound_buffer.ok_or(InvalidOperation), return);
if size < 0 {
- return Ok(self.webgl_error(InvalidValue));
+ return self.webgl_error(InvalidValue);
}
// FIXME: Allocating a buffer based on user-requested size is
// not great, but we don't have a fallible allocation to try.
let data = vec![0u8; size as usize];
- handle_potential_webgl_error!(self, bound_buffer.buffer_data(target, data, usage));
- Ok(())
+ handle_potential_webgl_error!(self, bound_buffer.buffer_data(&data, usage));
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
+ #[allow(unsafe_code)]
fn BufferSubData(&self, target: u32, offset: i64, data: ArrayBufferViewOrArrayBuffer) {
- let data_vec = match data {
- // Typed array is rooted, so we can safely temporarily retrieve its slice
- ArrayBufferViewOrArrayBuffer::ArrayBuffer(inner) => inner.to_vec(),
- ArrayBufferViewOrArrayBuffer::ArrayBufferView(inner) => inner.to_vec(),
- };
-
let bound_buffer = handle_potential_webgl_error!(self, self.bound_buffer(target), return);
- let bound_buffer = match bound_buffer {
- Some(bound_buffer) => bound_buffer,
- None => return self.webgl_error(InvalidOperation),
- };
+ let bound_buffer = handle_potential_webgl_error!(self, bound_buffer.ok_or(InvalidOperation), return);
if offset < 0 {
return self.webgl_error(InvalidValue);
}
- if (offset as usize) + data_vec.len() > bound_buffer.capacity() {
+ let data = unsafe {
+ // Safe because we don't do anything with JS until the end of the method.
+ match data {
+ ArrayBufferViewOrArrayBuffer::ArrayBuffer(ref data) => data.as_slice(),
+ ArrayBufferViewOrArrayBuffer::ArrayBufferView(ref data) => data.as_slice(),
+ }
+ };
+ if (offset as u64) + data.len() as u64 > bound_buffer.capacity() as u64 {
return self.webgl_error(InvalidValue);
}
+ let (sender, receiver) = ipc::bytes_channel().unwrap();
self.send_command(WebGLCommand::BufferSubData(
target,
offset as isize,
- data_vec.into(),
+ receiver,
));
+ sender.send(data).unwrap();
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
@@ -1989,9 +1702,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
fn CopyTexImage2D(&self, target: u32, level: i32, internal_format: u32,
x: i32, y: i32, width: i32, height: i32, border: i32) {
- if !self.validate_framebuffer_complete() {
- return;
- }
+ handle_potential_webgl_error!(self, self.validate_framebuffer(), return);
let validator = CommonTexImage2DValidator::new(self, target, level,
internal_format, width,
@@ -2046,9 +1757,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
fn CopyTexSubImage2D(&self, target: u32, level: i32, xoffset: i32, yoffset: i32,
x: i32, y: i32, width: i32, height: i32) {
- if !self.validate_framebuffer_complete() {
- return;
- }
+ handle_potential_webgl_error!(self, self.validate_framebuffer(), return);
// NB: We use a dummy (valid) format and border in order to reuse the
// common validations, but this should have its own validator.
@@ -2089,9 +1798,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11
fn Clear(&self, mask: u32) {
- if !self.validate_framebuffer_complete() {
- return;
- }
+ handle_potential_webgl_error!(self, self.validate_framebuffer(), return);
if mask & !(constants::DEPTH_BUFFER_BIT | constants::STENCIL_BUFFER_BIT | constants::COLOR_BUFFER_BIT) != 0 {
return self.webgl_error(InvalidValue);
}
@@ -2347,12 +2054,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11
fn DrawArrays(&self, mode: u32, first: i32, count: i32) {
- self.draw_arrays_instanced(mode, first, count, 1);
+ handle_potential_webgl_error!(self, self.draw_arrays_instanced(mode, first, count, 1));
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.11
fn DrawElements(&self, mode: u32, count: i32, type_: u32, offset: i64) {
- self.draw_elements_instanced(mode, count, type_, offset, 1);
+ handle_potential_webgl_error!(self, self.draw_elements_instanced(mode, count, type_, offset, 1));
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
@@ -2757,7 +2464,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.5
fn IsBuffer(&self, buffer: Option<&WebGLBuffer>) -> bool {
buffer.map_or(false, |buf| {
- self.validate_ownership(buf).is_ok() && buf.target().is_some() && !buf.is_marked_for_deletion()
+ self.validate_ownership(buf).is_ok() && buf.target().is_some() && !buf.is_deleted()
})
}
@@ -2874,9 +2581,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Some(ref mut data) => (data.get_array_type(), unsafe { data.as_mut_slice() }),
};
- if !self.validate_framebuffer_complete() {
- return;
- }
+ handle_potential_webgl_error!(self, self.validate_framebuffer(), return);
match array_type {
Type::Uint8 => (),
@@ -2957,7 +2662,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
_ => return self.webgl_error(InvalidOperation),
};
- let (sender, receiver) = webgl_channel().unwrap();
+ let (sender, receiver) = ipc::bytes_channel().unwrap();
self.send_command(WebGLCommand::ReadPixels(x, y, width, height, format, pixel_type, sender));
let result = receiver.recv().unwrap();
@@ -3643,7 +3348,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Float32ArrayOrUnrestrictedFloatSequence::UnrestrictedFloatSequence(v) => v,
};
if values.len() < 1 {
- return self.webgl_error(InvalidOperation);
+ // https://github.com/KhronosGroup/WebGL/issues/2700
+ return self.webgl_error(InvalidValue);
}
self.vertex_attrib(indx, values[0], 0f32, 0f32, 1f32);
}
@@ -3660,7 +3366,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Float32ArrayOrUnrestrictedFloatSequence::UnrestrictedFloatSequence(v) => v,
};
if values.len() < 2 {
- return self.webgl_error(InvalidOperation);
+ // https://github.com/KhronosGroup/WebGL/issues/2700
+ return self.webgl_error(InvalidValue);
}
self.vertex_attrib(indx, values[0], values[1], 0f32, 1f32);
}
@@ -3677,7 +3384,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Float32ArrayOrUnrestrictedFloatSequence::UnrestrictedFloatSequence(v) => v,
};
if values.len() < 3 {
- return self.webgl_error(InvalidOperation);
+ // https://github.com/KhronosGroup/WebGL/issues/2700
+ return self.webgl_error(InvalidValue);
}
self.vertex_attrib(indx, values[0], values[1], values[2], 1f32);
}
@@ -3694,7 +3402,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Float32ArrayOrUnrestrictedFloatSequence::UnrestrictedFloatSequence(v) => v,
};
if values.len() < 4 {
- return self.webgl_error(InvalidOperation);
+ // https://github.com/KhronosGroup/WebGL/issues/2700
+ return self.webgl_error(InvalidValue);
}
self.vertex_attrib(indx, values[0], values[1], values[2], values[3]);
}
@@ -3742,7 +3451,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
border: i32,
format: u32,
data_type: u32,
- mut pixels: CustomAutoRooterGuard<Option<ArrayBufferView>>,
+ pixels: CustomAutoRooterGuard<Option<ArrayBufferView>>,
) -> ErrorResult {
if !self.extension_manager.is_tex_type_enabled(data_type) {
return Ok(self.webgl_error(InvalidEnum));
@@ -3780,7 +3489,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// initialized to 0 is passed.
let buff = match *pixels {
None => vec![0u8; expected_byte_length as usize],
- Some(ref mut data) => data.to_vec(),
+ Some(ref data) => data.to_vec(),
};
// From the WebGL spec:
@@ -4271,3 +3980,217 @@ impl TextureUnit {
None
}
}
+
+// Remove premultiplied alpha.
+// This is only called when texImage2D is called using a canvas2d source and
+// UNPACK_PREMULTIPLY_ALPHA_WEBGL is disabled. Pixels got from a canvas2D source
+// are always RGBA8 with premultiplied alpha, so we don't have to worry about
+// additional formats as happens in the premultiply_pixels method.
+fn remove_premultiplied_alpha(pixels: &mut [u8]) {
+ for rgba in pixels.chunks_mut(4) {
+ let a = (rgba[3] as f32) / 255.0;
+ rgba[0] = (rgba[0] as f32 / a) as u8;
+ rgba[1] = (rgba[1] as f32 / a) as u8;
+ rgba[2] = (rgba[2] as f32 / a) as u8;
+ }
+}
+
+/// Translates an image in rgba8 (red in the first byte) format to
+/// the format that was requested of TexImage.
+///
+/// From the WebGL 1.0 spec, 5.14.8:
+///
+/// "The source image data is conceptually first converted to
+/// the data type and format specified by the format and type
+/// arguments, and then transferred to the WebGL
+/// implementation. If a packed pixel format is specified
+/// which would imply loss of bits of precision from the image
+/// data, this loss of precision must occur."
+fn rgba8_image_to_tex_image_data(
+ format: TexFormat,
+ data_type: TexDataType,
+ mut pixels: Vec<u8>,
+) -> Vec<u8> {
+ // hint for vector allocation sizing.
+ let pixel_count = pixels.len() / 4;
+
+ match (format, data_type) {
+ (TexFormat::RGBA, TexDataType::UnsignedByte) => pixels,
+ (TexFormat::RGB, TexDataType::UnsignedByte) => {
+ for i in 0..pixel_count {
+ let rgb = {
+ let rgb = &pixels[i * 4..i * 4 + 3];
+ [rgb[0], rgb[1], rgb[2]]
+ };
+ pixels[i * 3..i * 3 + 3].copy_from_slice(&rgb);
+ }
+ pixels.truncate(pixel_count * 3);
+ pixels
+ },
+ (TexFormat::Alpha, TexDataType::UnsignedByte) => {
+ for i in 0..pixel_count {
+ let p = pixels[i * 4 + 3];
+ pixels[i] = p;
+ }
+ pixels.truncate(pixel_count);
+ pixels
+ },
+ (TexFormat::Luminance, TexDataType::UnsignedByte) => {
+ for i in 0..pixel_count {
+ let p = pixels[i * 4];
+ pixels[i] = p;
+ }
+ pixels.truncate(pixel_count);
+ pixels
+ },
+ (TexFormat::LuminanceAlpha, TexDataType::UnsignedByte) => {
+ for i in 0..pixel_count {
+ let (lum, a) = {
+ let rgba = &pixels[i * 4..i * 4 + 4];
+ (rgba[0], rgba[3])
+ };
+ pixels[i * 2] = lum;
+ pixels[i * 2 + 1] = a;
+ }
+ pixels.truncate(pixel_count * 2);
+ pixels
+ },
+ (TexFormat::RGBA, TexDataType::UnsignedShort4444) => {
+ for i in 0..pixel_count {
+ let p = {
+ let rgba = &pixels[i * 4..i * 4 + 4];
+ (rgba[0] as u16 & 0xf0) << 8 |
+ (rgba[1] as u16 & 0xf0) << 4 |
+ (rgba[2] as u16 & 0xf0) |
+ (rgba[3] as u16 & 0xf0) >> 4
+ };
+ NativeEndian::write_u16(&mut pixels[i * 2..i * 2 + 2], p);
+ }
+ pixels.truncate(pixel_count * 2);
+ pixels
+ },
+ (TexFormat::RGBA, TexDataType::UnsignedShort5551) => {
+ for i in 0..pixel_count {
+ let p = {
+ let rgba = &pixels[i * 4..i * 4 + 4];
+ (rgba[0] as u16 & 0xf8) << 8 |
+ (rgba[1] as u16 & 0xf8) << 3 |
+ (rgba[2] as u16 & 0xf8) >> 2 |
+ (rgba[3] as u16) >> 7
+ };
+ NativeEndian::write_u16(&mut pixels[i * 2..i * 2 + 2], p);
+ }
+ pixels.truncate(pixel_count * 2);
+ pixels
+ },
+ (TexFormat::RGB, TexDataType::UnsignedShort565) => {
+ for i in 0..pixel_count {
+ let p = {
+ let rgb = &pixels[i * 4..i * 4 + 3];
+ (rgb[0] as u16 & 0xf8) << 8 |
+ (rgb[1] as u16 & 0xfc) << 3 |
+ (rgb[2] as u16 & 0xf8) >> 3
+ };
+ NativeEndian::write_u16(&mut pixels[i * 2..i * 2 + 2], p);
+ }
+ pixels.truncate(pixel_count * 2);
+ pixels
+ },
+ (TexFormat::RGBA, TexDataType::Float) => {
+ let mut rgbaf32 = Vec::<u8>::with_capacity(pixel_count * 16);
+ for rgba8 in pixels.chunks(4) {
+ rgbaf32.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap();
+ rgbaf32.write_f32::<NativeEndian>(rgba8[1] as f32).unwrap();
+ rgbaf32.write_f32::<NativeEndian>(rgba8[2] as f32).unwrap();
+ rgbaf32.write_f32::<NativeEndian>(rgba8[3] as f32).unwrap();
+ }
+ rgbaf32
+ }
+
+ (TexFormat::RGB, TexDataType::Float) => {
+ let mut rgbf32 = Vec::<u8>::with_capacity(pixel_count * 12);
+ for rgba8 in pixels.chunks(4) {
+ rgbf32.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap();
+ rgbf32.write_f32::<NativeEndian>(rgba8[1] as f32).unwrap();
+ rgbf32.write_f32::<NativeEndian>(rgba8[2] as f32).unwrap();
+ }
+ rgbf32
+ }
+
+ (TexFormat::Alpha, TexDataType::Float) => {
+ for rgba8 in pixels.chunks_mut(4) {
+ let p = rgba8[3] as f32;
+ NativeEndian::write_f32(rgba8, p);
+ }
+ pixels
+ },
+
+ (TexFormat::Luminance, TexDataType::Float) => {
+ for rgba8 in pixels.chunks_mut(4) {
+ let p = rgba8[0] as f32;
+ NativeEndian::write_f32(rgba8, p);
+ }
+ pixels
+ },
+
+ (TexFormat::LuminanceAlpha, TexDataType::Float) => {
+ let mut data = Vec::<u8>::with_capacity(pixel_count * 8);
+ for rgba8 in pixels.chunks(4) {
+ data.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap();
+ data.write_f32::<NativeEndian>(rgba8[3] as f32).unwrap();
+ }
+ data
+ },
+
+ (TexFormat::RGBA, TexDataType::HalfFloat) => {
+ let mut rgbaf16 = Vec::<u8>::with_capacity(pixel_count * 8);
+ for rgba8 in pixels.chunks(4) {
+ rgbaf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[0] as f32).as_bits()).unwrap();
+ rgbaf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[1] as f32).as_bits()).unwrap();
+ rgbaf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[2] as f32).as_bits()).unwrap();
+ rgbaf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[3] as f32).as_bits()).unwrap();
+ }
+ rgbaf16
+ },
+
+ (TexFormat::RGB, TexDataType::HalfFloat) => {
+ let mut rgbf16 = Vec::<u8>::with_capacity(pixel_count * 6);
+ for rgba8 in pixels.chunks(4) {
+ rgbf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[0] as f32).as_bits()).unwrap();
+ rgbf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[1] as f32).as_bits()).unwrap();
+ rgbf16.write_u16::<NativeEndian>(f16::from_f32(rgba8[2] as f32).as_bits()).unwrap();
+ }
+ rgbf16
+ },
+ (TexFormat::Alpha, TexDataType::HalfFloat) => {
+ for i in 0..pixel_count {
+ let p = f16::from_f32(pixels[i * 4 + 3] as f32).as_bits();
+ NativeEndian::write_u16(&mut pixels[i * 2..i * 2 + 2], p);
+ }
+ pixels.truncate(pixel_count * 2);
+ pixels
+ },
+ (TexFormat::Luminance, TexDataType::HalfFloat) => {
+ for i in 0..pixel_count {
+ let p = f16::from_f32(pixels[i * 4] as f32).as_bits();
+ NativeEndian::write_u16(&mut pixels[i * 2..i * 2 + 2], p);
+ }
+ pixels.truncate(pixel_count * 2);
+ pixels
+ },
+ (TexFormat::LuminanceAlpha, TexDataType::HalfFloat) => {
+ for rgba8 in pixels.chunks_mut(4) {
+ let lum = f16::from_f32(rgba8[0] as f32).as_bits();
+ let a = f16::from_f32(rgba8[3] as f32).as_bits();
+ NativeEndian::write_u16(&mut rgba8[0..2], lum);
+ NativeEndian::write_u16(&mut rgba8[2..4], a);
+ }
+ pixels
+ },
+
+ // Validation should have ensured that we only hit the
+ // above cases, but we haven't turned the (format, type)
+ // into an enum yet so there's a default case here.
+ _ => unreachable!("Unsupported formats {:?} {:?}", format, data_type)
+ }
+}
diff --git a/components/script/dom/webglvertexarrayobjectoes.rs b/components/script/dom/webglvertexarrayobjectoes.rs
index c717108b2aa..ca13b2833f5 100644
--- a/components/script/dom/webglvertexarrayobjectoes.rs
+++ b/components/script/dom/webglvertexarrayobjectoes.rs
@@ -124,8 +124,15 @@ impl WebGLVertexArrayObjectOES {
}
let context = self.upcast::<WebGLObject>().context();
- let buffer = context.array_buffer().ok_or(WebGLError::InvalidOperation)?;
- buffer.increment_attached_counter();
+ let buffer = context.array_buffer();
+ match buffer {
+ Some(ref buffer) => buffer.increment_attached_counter(),
+ None if offset != 0 => {
+ // https://github.com/KhronosGroup/WebGL/pull/2228
+ return Err(WebGLError::InvalidOperation)
+ },
+ _ => {},
+ }
context.send_command(WebGLCommand::VertexAttribPointer(
index,
size,
@@ -146,7 +153,7 @@ impl WebGLVertexArrayObjectOES {
normalized,
stride: stride as u8,
offset: offset as u32,
- buffer: Some(Dom::from_ref(&*buffer)),
+ buffer: buffer.map(|b| Dom::from_ref(&*b)),
divisor: data.divisor,
};
diff --git a/components/script/dom/webidls/BaseAudioContext.webidl b/components/script/dom/webidls/BaseAudioContext.webidl
index f00ec373667..f8b85007a64 100644
--- a/components/script/dom/webidls/BaseAudioContext.webidl
+++ b/components/script/dom/webidls/BaseAudioContext.webidl
@@ -30,13 +30,13 @@ interface BaseAudioContext : EventTarget {
Promise<AudioBuffer> decodeAudioData(ArrayBuffer audioData,
optional DecodeSuccessCallback successCallback,
optional DecodeErrorCallback errorCallback);
- AudioBufferSourceNode createBufferSource();
+ [Throws] AudioBufferSourceNode createBufferSource();
// ConstantSourceNode createConstantSource();
// ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0,
// optional unsigned long numberOfInputChannels = 2,
// optional unsigned long numberOfOutputChannels = 2);
// AnalyserNode createAnalyser();
- GainNode createGain();
+ [Throws] GainNode createGain();
// DelayNode createDelay(optional double maxDelayTime = 1);
// BiquadFilterNode createBiquadFilter();
// IIRFilterNode createIIRFilter(sequence<double> feedforward,
@@ -46,9 +46,9 @@ interface BaseAudioContext : EventTarget {
// StereoPannerNode createStereoPanner();
// ConvolverNode createConvolver();
// ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);
- // ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
+ [Throws] ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
// DynamicsCompressorNode createDynamicsCompressor();
- OscillatorNode createOscillator();
+ [Throws] OscillatorNode createOscillator();
// PeriodicWave createPeriodicWave(sequence<float> real,
// sequence<float> imag,
// optional PeriodicWaveConstraints constraints);
diff --git a/components/script/dom/webidls/ChannelMergerNode.webidl b/components/script/dom/webidls/ChannelMergerNode.webidl
new file mode 100644
index 00000000000..071da8971a0
--- /dev/null
+++ b/components/script/dom/webidls/ChannelMergerNode.webidl
@@ -0,0 +1,16 @@
+/* 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/. */
+/*
+ * The origin of this IDL file is
+ * https://webaudio.github.io/web-audio-api/#channelmergernode
+ */
+
+dictionary ChannelMergerOptions : AudioNodeOptions {
+ unsigned long numberOfInputs = 6;
+};
+
+[Exposed=Window,
+ Constructor (BaseAudioContext context, optional ChannelMergerOptions options)]
+interface ChannelMergerNode : AudioNode {
+};
diff --git a/components/script/dom/webidls/PannerNode.webidl b/components/script/dom/webidls/PannerNode.webidl
index 18d01f52b11..b1c1cdfb68f 100644
--- a/components/script/dom/webidls/PannerNode.webidl
+++ b/components/script/dom/webidls/PannerNode.webidl
@@ -45,7 +45,7 @@ interface PannerNode : AudioNode {
readonly attribute AudioParam orientationY;
readonly attribute AudioParam orientationZ;
attribute DistanceModelType distanceModel;
- attribute double refDistance;
+ [SetterThrows] attribute double refDistance;
[SetterThrows] attribute double maxDistance;
[SetterThrows] attribute double rolloffFactor;
attribute double coneInnerAngle;
diff --git a/components/script/dom/webidls/WebGL2RenderingContext.webidl b/components/script/dom/webidls/WebGL2RenderingContext.webidl
index b14711d107e..88a2fb273b6 100644
--- a/components/script/dom/webidls/WebGL2RenderingContext.webidl
+++ b/components/script/dom/webidls/WebGL2RenderingContext.webidl
@@ -305,10 +305,7 @@ interface WebGL2RenderingContextBase
/* Buffer objects */
// WebGL1:
// BUG: https://github.com/KhronosGroup/WebGL/issues/2216
- // FIXME(xanewok): https://github.com/servo/servo/issues/20513
- [Throws]
- void bufferData(GLenum target, object? data, GLenum usage);
- [Throws]
+ void bufferData(GLenum target, /*[AllowShared]*/ BufferSource? data, GLenum usage);
void bufferData(GLenum target, GLsizeiptr size, GLenum usage);
void bufferSubData(GLenum target, GLintptr dstByteOffset, /*[AllowShared]*/ BufferSource srcData);
// WebGL2:
diff --git a/components/script/dom/webidls/WebGLRenderingContext.webidl b/components/script/dom/webidls/WebGLRenderingContext.webidl
index d36154c7355..2a5d8cf99d0 100644
--- a/components/script/dom/webidls/WebGLRenderingContext.webidl
+++ b/components/script/dom/webidls/WebGLRenderingContext.webidl
@@ -421,7 +421,8 @@ interface WebGLRenderingContextBase
const GLenum RGB5_A1 = 0x8057;
const GLenum RGB565 = 0x8D62;
const GLenum DEPTH_COMPONENT16 = 0x81A5;
- const GLenum STENCIL_INDEX = 0x1901;
+ // https://github.com/KhronosGroup/WebGL/pull/2371
+ // const GLenum STENCIL_INDEX = 0x1901;
const GLenum STENCIL_INDEX8 = 0x8D48;
const GLenum DEPTH_STENCIL = 0x84F9;
@@ -687,10 +688,7 @@ interface WebGLRenderingContext
{
// BUG: https://github.com/KhronosGroup/WebGL/issues/2216
- // FIXME(xanewok): https://github.com/servo/servo/issues/20513
- [Throws]
- void bufferData(GLenum target, object? data, GLenum usage);
- [Throws]
+ void bufferData(GLenum target, /*[AllowShared]*/ BufferSource? data, GLenum usage);
void bufferData(GLenum target, GLsizeiptr size, GLenum usage);
void bufferSubData(GLenum target, GLintptr offset, /*[AllowShared]*/ BufferSource data);
diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs
index 2de8f97d98e..ac0f14ad436 100644
--- a/components/script/dom/websocket.rs
+++ b/components/script/dom/websocket.rs
@@ -39,8 +39,8 @@ use std::cell::Cell;
use std::ptr;
use std::thread;
use task::{TaskOnce, TaskCanceller};
-use task_source::{TaskSource, TaskSourceName};
-use task_source::networking::NetworkingTaskSource;
+use task_source::TaskSource;
+use task_source::websocket::WebsocketTaskSource;
#[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf, PartialEq)]
enum WebSocketRequestState {
@@ -70,7 +70,7 @@ mod close_code {
pub fn close_the_websocket_connection(
address: Trusted<WebSocket>,
- task_source: &NetworkingTaskSource,
+ task_source: &WebsocketTaskSource,
canceller: &TaskCanceller,
code: Option<u16>,
reason: String,
@@ -86,7 +86,7 @@ pub fn close_the_websocket_connection(
pub fn fail_the_websocket_connection(
address: Trusted<WebSocket>,
- task_source: &NetworkingTaskSource,
+ task_source: &WebsocketTaskSource,
canceller: &TaskCanceller,
) {
let close_task = CloseTask {
@@ -199,11 +199,8 @@ impl WebSocket {
};
let _ = global.core_resource_thread().send(CoreResourceMsg::Fetch(request, channels));
- // TODO: use a dedicated task source,
- // https://html.spec.whatwg.org/multipage/#websocket-task-source
- // When making the switch, also update the task_canceller call.
- let task_source = global.networking_task_source();
- let canceller = global.task_canceller(TaskSourceName::Networking);
+ let task_source = global.websocket_task_source();
+ let canceller = global.task_canceller(WebsocketTaskSource::NAME);
thread::spawn(move || {
while let Ok(event) = dom_event_receiver.recv() {
match event {
@@ -268,7 +265,13 @@ impl WebSocket {
let pipeline_id = self.global().pipeline_id();
self.global()
.script_chan()
- .send(CommonScriptMsg::Task(WebSocketEvent, task, Some(pipeline_id)))
+ // TODO: Use a dedicated `websocket-task-source` task source instead.
+ .send(CommonScriptMsg::Task(
+ WebSocketEvent,
+ task,
+ Some(pipeline_id),
+ WebsocketTaskSource::NAME,
+ ))
.unwrap();
}
@@ -401,10 +404,10 @@ impl WebSocketMethods for WebSocket {
// TODO: use a dedicated task source,
// https://html.spec.whatwg.org/multipage/#websocket-task-source
// When making the switch, also update the task_canceller call.
- let task_source = self.global().networking_task_source();
+ let task_source = self.global().websocket_task_source();
fail_the_websocket_connection(address,
&task_source,
- &self.global().task_canceller(TaskSourceName::Networking));
+ &self.global().task_canceller(WebsocketTaskSource::NAME));
}
WebSocketRequestState::Open => {
self.ready_state.set(WebSocketRequestState::Closing);
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index e125aa87fd9..052f121fb2a 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -128,6 +128,7 @@ use task_source::networking::NetworkingTaskSource;
use task_source::performance_timeline::PerformanceTimelineTaskSource;
use task_source::remote_event::RemoteEventTaskSource;
use task_source::user_interaction::UserInteractionTaskSource;
+use task_source::websocket::WebsocketTaskSource;
use time;
use timers::{IsInterval, TimerCallback};
use url::Position;
@@ -186,6 +187,8 @@ pub struct Window {
performance_timeline_task_source: PerformanceTimelineTaskSource,
#[ignore_malloc_size_of = "task sources are hard"]
remote_event_task_source: RemoteEventTaskSource,
+ #[ignore_malloc_size_of = "task sources are hard"]
+ websocket_task_source: WebsocketTaskSource,
navigator: MutNullableDom<Navigator>,
#[ignore_malloc_size_of = "Arc"]
image_cache: Arc<ImageCache>,
@@ -376,6 +379,10 @@ impl Window {
self.remote_event_task_source.clone()
}
+ pub fn websocket_task_source(&self) -> WebsocketTaskSource {
+ self.websocket_task_source.clone()
+ }
+
pub fn main_thread_script_chan(&self) -> &Sender<MainThreadScriptMsg> {
&self.script_chan.0
}
@@ -1089,6 +1096,7 @@ impl WindowMethods for Window {
ParsingMode::DEFAULT,
quirks_mode,
self.css_error_reporter(),
+ None,
);
let media_query_list =
media_queries::MediaList::parse(&context, &mut parser);
@@ -1666,7 +1674,8 @@ impl Window {
let _ = self.script_chan.send(CommonScriptMsg::Task(
ScriptThreadEventCategory::DomEvent,
Box::new(self.task_canceller(TaskSourceName::DOMManipulation).wrap_task(task)),
- self.pipeline_id()
+ self.pipeline_id(),
+ TaskSourceName::DOMManipulation,
));
doc.set_url(url.clone());
return
@@ -1902,6 +1911,7 @@ impl Window {
file_reading_task_source: FileReadingTaskSource,
performance_timeline_task_source: PerformanceTimelineTaskSource,
remote_event_task_source: RemoteEventTaskSource,
+ websocket_task_source: WebsocketTaskSource,
image_cache_chan: Sender<ImageCacheMsg>,
image_cache: Arc<ImageCache>,
resource_threads: ResourceThreads,
@@ -1955,6 +1965,7 @@ impl Window {
file_reading_task_source,
performance_timeline_task_source,
remote_event_task_source,
+ websocket_task_source,
image_cache_chan,
image_cache,
navigator: Default::default(),
@@ -2123,7 +2134,8 @@ impl Window {
let _ = self.script_chan.send(CommonScriptMsg::Task(
ScriptThreadEventCategory::DomEvent,
Box::new(self.task_canceller(TaskSourceName::DOMManipulation).wrap_task(task)),
- self.pipeline_id()
+ self.pipeline_id(),
+ TaskSourceName::DOMManipulation,
));
}
}
diff --git a/components/script/dom/worker.rs b/components/script/dom/worker.rs
index b3ba42afb2b..653a2fa141c 100644
--- a/components/script/dom/worker.rs
+++ b/components/script/dom/worker.rs
@@ -14,7 +14,7 @@ use dom::bindings::reflector::{DomObject, reflect_dom_object};
use dom::bindings::root::DomRoot;
use dom::bindings::str::DOMString;
use dom::bindings::structuredclone::StructuredCloneData;
-use dom::dedicatedworkerglobalscope::DedicatedWorkerGlobalScope;
+use dom::dedicatedworkerglobalscope::{DedicatedWorkerGlobalScope, DedicatedWorkerScriptMsg};
use dom::eventtarget::EventTarget;
use dom::globalscope::GlobalScope;
use dom::messageevent::MessageEvent;
@@ -40,14 +40,14 @@ pub struct Worker {
#[ignore_malloc_size_of = "Defined in std"]
/// Sender to the Receiver associated with the DedicatedWorkerGlobalScope
/// this Worker created.
- sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>,
+ sender: Sender<DedicatedWorkerScriptMsg>,
#[ignore_malloc_size_of = "Arc"]
closing: Arc<AtomicBool>,
terminated: Cell<bool>,
}
impl Worker {
- fn new_inherited(sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>,
+ fn new_inherited(sender: Sender<DedicatedWorkerScriptMsg>,
closing: Arc<AtomicBool>) -> Worker {
Worker {
eventtarget: EventTarget::new_inherited(),
@@ -58,7 +58,7 @@ impl Worker {
}
pub fn new(global: &GlobalScope,
- sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>,
+ sender: Sender<DedicatedWorkerScriptMsg>,
closing: Arc<AtomicBool>) -> DomRoot<Worker> {
reflect_dom_object(Box::new(Worker::new_inherited(sender, closing)),
global,
@@ -148,7 +148,7 @@ impl WorkerMethods for Worker {
// NOTE: step 9 of https://html.spec.whatwg.org/multipage/#dom-messageport-postmessage
// indicates that a nonexistent communication channel should result in a silent error.
- let _ = self.sender.send((address, WorkerScriptMsg::DOMMessage(data)));
+ let _ = self.sender.send(DedicatedWorkerScriptMsg::CommonWorker(address, WorkerScriptMsg::DOMMessage(data)));
Ok(())
}
diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs
index 5415492b0da..ac372c5fe98 100644
--- a/components/script/dom/workerglobalscope.rs
+++ b/components/script/dom/workerglobalscope.rs
@@ -47,6 +47,7 @@ use task_source::file_reading::FileReadingTaskSource;
use task_source::networking::NetworkingTaskSource;
use task_source::performance_timeline::PerformanceTimelineTaskSource;
use task_source::remote_event::RemoteEventTaskSource;
+use task_source::websocket::WebsocketTaskSource;
use time::precise_time_ns;
use timers::{IsInterval, TimerCallback};
@@ -386,6 +387,10 @@ impl WorkerGlobalScope {
RemoteEventTaskSource(self.script_chan(), self.pipeline_id())
}
+ pub fn websocket_task_source(&self) -> WebsocketTaskSource {
+ WebsocketTaskSource(self.script_chan(), self.pipeline_id())
+ }
+
pub fn new_script_pair(&self) -> (Box<ScriptChan + Send>, Box<ScriptPort + Send>) {
let dedicated = self.downcast::<DedicatedWorkerGlobalScope>();
if let Some(dedicated) = dedicated {
@@ -397,7 +402,7 @@ impl WorkerGlobalScope {
pub fn process_event(&self, msg: CommonScriptMsg) {
match msg {
- CommonScriptMsg::Task(_, task, _) => {
+ CommonScriptMsg::Task(_, task, _, _) => {
task.run_box()
},
CommonScriptMsg::CollectReports(reports_chan) => {
@@ -407,8 +412,6 @@ impl WorkerGlobalScope {
reports_chan.send(reports);
},
}
-
- // FIXME(jdm): Should we do a microtask checkpoint here?
}
pub fn handle_fire_timer(&self, timer_id: TimerEventId) {
diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs
index a2e454507a8..d1b7ba9c44a 100644
--- a/components/script/dom/worklet.rs
+++ b/components/script/dom/worklet.rs
@@ -66,6 +66,7 @@ use style::thread_state::{self, ThreadState};
use swapper::Swapper;
use swapper::swapper;
use task::TaskBox;
+use task_source::TaskSourceName;
use uuid::Uuid;
// Magic numbers
@@ -644,7 +645,14 @@ impl WorkletThread {
where
T: TaskBox + 'static,
{
- let msg = CommonScriptMsg::Task(ScriptThreadEventCategory::WorkletEvent, Box::new(task), None);
+ // NOTE: It's unclear which task source should be used here:
+ // https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule
+ let msg = CommonScriptMsg::Task(
+ ScriptThreadEventCategory::WorkletEvent,
+ Box::new(task),
+ None,
+ TaskSourceName::DOMManipulation,
+ );
let msg = MainThreadScriptMsg::Common(msg);
self.global_init.to_script_thread_sender.send(msg).expect("Worklet thread outlived script thread.");
}
diff --git a/components/script/lib.rs b/components/script/lib.rs
index d7a57a28898..416eaec06f7 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -5,11 +5,10 @@
#![cfg_attr(feature = "unstable", feature(core_intrinsics))]
#![cfg_attr(feature = "unstable", feature(on_unimplemented))]
#![feature(const_fn)]
+#![feature(drain_filter)]
#![feature(mpsc_select)]
#![feature(plugin)]
-#![feature(string_retain)]
#![feature(try_from)]
-#![feature(use_extern_macros)]
#![deny(unsafe_code)]
#![allow(non_snake_case)]
@@ -125,6 +124,7 @@ pub mod script_thread;
mod serviceworker_manager;
mod serviceworkerjob;
mod stylesheet_loader;
+mod task_queue;
mod task_source;
pub mod test;
pub mod textinput;
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index b5d598d1c79..6758e3bd852 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -43,6 +43,7 @@ use std::panic::AssertUnwindSafe;
use std::ptr;
use style::thread_state::{self, ThreadState};
use task::TaskBox;
+use task_source::TaskSourceName;
use time::{Tm, now};
/// Common messages used to control the event loops in both the script and the worker
@@ -51,14 +52,14 @@ pub enum CommonScriptMsg {
/// supplied channel.
CollectReports(ReportsChan),
/// Generic message that encapsulates event handling.
- Task(ScriptThreadEventCategory, Box<TaskBox>, Option<PipelineId>),
+ Task(ScriptThreadEventCategory, Box<TaskBox>, Option<PipelineId>, TaskSourceName),
}
impl fmt::Debug for CommonScriptMsg {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CommonScriptMsg::CollectReports(_) => write!(f, "CollectReports(...)"),
- CommonScriptMsg::Task(ref category, ref task, _) => {
+ CommonScriptMsg::Task(ref category, ref task, _, _) => {
f.debug_tuple("Task").field(category).field(task).finish()
},
}
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 011a3f0106f..8f9d98a2e93 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -116,6 +116,8 @@ use std::sync::Arc;
use std::sync::mpsc::{Receiver, Select, Sender, channel};
use std::thread;
use style::thread_state::{self, ThreadState};
+use task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
+use task_source::TaskSourceName;
use task_source::dom_manipulation::DOMManipulationTaskSource;
use task_source::file_reading::FileReadingTaskSource;
use task_source::history_traversal::HistoryTraversalTaskSource;
@@ -123,6 +125,7 @@ use task_source::networking::NetworkingTaskSource;
use task_source::performance_timeline::PerformanceTimelineTaskSource;
use task_source::remote_event::RemoteEventTaskSource;
use task_source::user_interaction::UserInteractionTaskSource;
+use task_source::websocket::WebsocketTaskSource;
use time::{get_time, precise_time_ns, Tm};
use url::Position;
use url::percent_encoding::percent_decode;
@@ -242,6 +245,51 @@ pub enum MainThreadScriptMsg {
},
/// Dispatches a job queue.
DispatchJobQueue { scope_url: ServoUrl },
+ /// Wake-up call from the task queue.
+ WakeUp,
+}
+
+impl QueuedTaskConversion for MainThreadScriptMsg {
+ fn task_source_name(&self) -> Option<&TaskSourceName> {
+ let script_msg = match self {
+ MainThreadScriptMsg::Common(script_msg) => script_msg,
+ _ => return None,
+ };
+ match script_msg {
+ CommonScriptMsg::Task(_category, _boxed, _pipeline_id, task_source) => Some(&task_source),
+ _ => return None,
+ }
+ }
+
+ fn into_queued_task(self) -> Option<QueuedTask> {
+ let script_msg = match self {
+ MainThreadScriptMsg::Common(script_msg) => script_msg,
+ _ => return None,
+ };
+ let (category, boxed, pipeline_id, task_source) = match script_msg {
+ CommonScriptMsg::Task(category, boxed, pipeline_id, task_source) =>
+ (category, boxed, pipeline_id, task_source),
+ _ => return None,
+ };
+ Some((None, category, boxed, pipeline_id, task_source))
+ }
+
+ fn from_queued_task(queued_task: QueuedTask) -> Self {
+ let (_worker, category, boxed, pipeline_id, task_source) = queued_task;
+ let script_msg = CommonScriptMsg::Task(category, boxed, pipeline_id, task_source);
+ MainThreadScriptMsg::Common(script_msg)
+ }
+
+ fn wake_up_msg() -> Self {
+ MainThreadScriptMsg::WakeUp
+ }
+
+ fn is_wake_up(&self) -> bool {
+ match self {
+ MainThreadScriptMsg::WakeUp => true,
+ _ => false,
+ }
+ }
}
impl OpaqueSender<CommonScriptMsg> for Box<ScriptChan + Send> {
@@ -398,6 +446,8 @@ impl<'a> Iterator for DocumentsIter<'a> {
type IncompleteParserContexts = Vec<(PipelineId, ParserContext)>;
unsafe_no_jsmanaged_fields!(RefCell<IncompleteParserContexts>);
+unsafe_no_jsmanaged_fields!(TaskQueue<MainThreadScriptMsg>);
+
#[derive(JSTraceable)]
// ScriptThread instances are rooted on creation, so this is okay
#[allow(unrooted_must_root)]
@@ -423,8 +473,9 @@ pub struct ScriptThread {
/// A handle to the bluetooth thread.
bluetooth_thread: IpcSender<BluetoothRequest>,
- /// The port on which the script thread receives messages (load URL, exit, etc.)
- port: Receiver<MainThreadScriptMsg>,
+ /// A queue of tasks to be executed in this script-thread.
+ task_queue: TaskQueue<MainThreadScriptMsg>,
+
/// A channel to hand out to script thread-based entities that need to be able to enqueue
/// events in the event queue.
chan: MainThreadScriptChan,
@@ -856,6 +907,8 @@ impl ScriptThread {
let (image_cache_channel, image_cache_port) = channel();
+ let task_queue = TaskQueue::new(port, chan.clone());
+
ScriptThread {
documents: DomRefCell::new(Documents::new()),
window_proxies: DomRefCell::new(HashMap::new()),
@@ -871,7 +924,7 @@ impl ScriptThread {
resource_threads: state.resource_threads,
bluetooth_thread: state.bluetooth_thread,
- port: port,
+ task_queue,
chan: MainThreadScriptChan(chan.clone()),
dom_manipulation_task_sender: chan.clone(),
@@ -968,7 +1021,7 @@ impl ScriptThread {
debug!("Waiting for event.");
let mut event = {
let sel = Select::new();
- let mut script_port = sel.handle(&self.port);
+ let mut script_port = sel.handle(self.task_queue.select());
let mut control_port = sel.handle(&self.control_port);
let mut timer_event_port = sel.handle(&self.timer_event_port);
let mut devtools_port = sel.handle(&self.devtools_port);
@@ -984,7 +1037,8 @@ impl ScriptThread {
}
let ret = sel.wait();
if ret == script_port.id() {
- FromScript(self.port.recv().unwrap())
+ self.task_queue.take_tasks();
+ FromScript(self.task_queue.recv().unwrap())
} else if ret == control_port.id() {
FromConstellation(self.control_port.recv().unwrap())
} else if ret == timer_event_port.id() {
@@ -1077,7 +1131,7 @@ impl ScriptThread {
// and check for more resize events. If there are no events pending, we'll move
// on and execute the sequential non-resize events we've seen.
match self.control_port.try_recv() {
- Err(_) => match self.port.try_recv() {
+ Err(_) => match self.task_queue.try_recv() {
Err(_) => match self.timer_event_port.try_recv() {
Err(_) => match self.devtools_port.try_recv() {
Err(_) => match self.image_cache_port.try_recv() {
@@ -1226,13 +1280,14 @@ impl ScriptThread {
MixedMessage::FromDevtools(_) => None,
MixedMessage::FromScript(ref inner_msg) => {
match *inner_msg {
- MainThreadScriptMsg::Common(CommonScriptMsg::Task(_, _, pipeline_id)) =>
+ MainThreadScriptMsg::Common(CommonScriptMsg::Task(_, _, pipeline_id, _)) =>
pipeline_id,
MainThreadScriptMsg::Common(CommonScriptMsg::CollectReports(_)) => None,
MainThreadScriptMsg::Navigate(pipeline_id, ..) => Some(pipeline_id),
MainThreadScriptMsg::WorkletLoaded(pipeline_id) => Some(pipeline_id),
MainThreadScriptMsg::RegisterPaintWorklet { pipeline_id, .. } => Some(pipeline_id),
MainThreadScriptMsg::DispatchJobQueue { .. } => None,
+ MainThreadScriptMsg::WakeUp => None,
}
},
MixedMessage::FromImageCache((pipeline_id, _)) => Some(pipeline_id),
@@ -1379,7 +1434,7 @@ impl ScriptThread {
MainThreadScriptMsg::Navigate(parent_pipeline_id, load_data, replace) => {
self.handle_navigate(parent_pipeline_id, None, load_data, replace)
},
- MainThreadScriptMsg::Common(CommonScriptMsg::Task(_, task, _)) => {
+ MainThreadScriptMsg::Common(CommonScriptMsg::Task(_, task, _, _)) => {
task.run_box()
}
MainThreadScriptMsg::Common(CommonScriptMsg::CollectReports(chan)) => {
@@ -1404,6 +1459,7 @@ impl ScriptThread {
MainThreadScriptMsg::DispatchJobQueue { scope_url } => {
self.job_queue_map.run_job(scope_url, self)
}
+ MainThreadScriptMsg::WakeUp => {},
}
}
@@ -1841,6 +1897,10 @@ impl ScriptThread {
RemoteEventTaskSource(self.remote_event_task_sender.clone(), pipeline_id)
}
+ pub fn websocket_task_source(&self, pipeline_id: PipelineId) -> WebsocketTaskSource {
+ WebsocketTaskSource(self.remote_event_task_sender.clone(), pipeline_id)
+ }
+
/// Handles a request for the window title.
fn handle_get_title_msg(&self, pipeline_id: PipelineId) {
let document = match { self.documents.borrow().find_document(pipeline_id) } {
@@ -2165,6 +2225,7 @@ impl ScriptThread {
self.file_reading_task_source(incomplete.pipeline_id),
self.performance_timeline_task_source(incomplete.pipeline_id).clone(),
self.remote_event_task_source(incomplete.pipeline_id),
+ self.websocket_task_source(incomplete.pipeline_id),
self.image_cache_channel.clone(),
self.image_cache.clone(),
self.resource_threads.clone(),
diff --git a/components/script/task_queue.rs b/components/script/task_queue.rs
new file mode 100644
index 00000000000..7093474e1ed
--- /dev/null
+++ b/components/script/task_queue.rs
@@ -0,0 +1,166 @@
+/* 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/. */
+
+//! Machinery for [task-queue](https://html.spec.whatwg.org/multipage/#task-queue).
+
+use dom::bindings::cell::DomRefCell;
+use dom::worker::TrustedWorkerAddress;
+use msg::constellation_msg::PipelineId;
+use script_runtime::ScriptThreadEventCategory;
+use std::cell::Cell;
+use std::collections::{HashMap, VecDeque};
+use std::default::Default;
+use std::sync::mpsc::{Receiver, Sender};
+use task::TaskBox;
+use task_source::TaskSourceName;
+
+
+pub type QueuedTask = (
+ Option<TrustedWorkerAddress>,
+ ScriptThreadEventCategory,
+ Box<TaskBox>,
+ Option<PipelineId>,
+ TaskSourceName
+);
+
+/// Defining the operations used to convert from a msg T to a QueuedTask.
+pub trait QueuedTaskConversion {
+ fn task_source_name(&self) -> Option<&TaskSourceName>;
+ fn into_queued_task(self) -> Option<QueuedTask>;
+ fn from_queued_task(queued_task: QueuedTask) -> Self;
+ fn wake_up_msg() -> Self;
+ fn is_wake_up(&self) -> bool;
+}
+
+pub struct TaskQueue<T> {
+ /// The original port on which the task-sources send tasks as messages.
+ port: Receiver<T>,
+ /// A sender to ensure the port doesn't block on select while there are throttled tasks.
+ wake_up_sender: Sender<T>,
+ /// A queue from which the event-loop can drain tasks.
+ msg_queue: DomRefCell<VecDeque<T>>,
+ /// A "business" counter, reset for each iteration of the event-loop
+ taken_task_counter: Cell<u64>,
+ /// Tasks that will be throttled for as long as we are "busy".
+ throttled: DomRefCell<HashMap<TaskSourceName, VecDeque<QueuedTask>>>
+}
+
+impl<T: QueuedTaskConversion> TaskQueue<T> {
+ pub fn new(port: Receiver<T>, wake_up_sender: Sender<T>) -> TaskQueue<T> {
+ TaskQueue {
+ port,
+ wake_up_sender,
+ msg_queue: DomRefCell::new(VecDeque::new()),
+ taken_task_counter: Default::default(),
+ throttled: Default::default(),
+ }
+ }
+
+ /// Process incoming tasks, immediately sending priority ones downstream,
+ /// and categorizing potential throttles.
+ fn process_incoming_tasks(&self) {
+ let mut non_throttled: Vec<T> = self.port
+ .try_iter()
+ .filter(|msg| !msg.is_wake_up())
+ .collect();
+
+ let to_be_throttled: Vec<T> = non_throttled.drain_filter(|msg|{
+ let task_source = match msg.task_source_name() {
+ Some(task_source) => task_source,
+ None => return false,
+ };
+ match task_source {
+ TaskSourceName::PerformanceTimeline => return true,
+ _ => {
+ // A task that will not be throttled, start counting "business"
+ self.taken_task_counter.set(self.taken_task_counter.get() + 1);
+ return false
+ },
+ }
+ }).collect();
+
+ for msg in non_throttled {
+ // Immediately send non-throttled tasks for processing.
+ let _ = self.msg_queue.borrow_mut().push_back(msg);
+ }
+
+ for msg in to_be_throttled {
+ // Categorize tasks per task queue.
+ let (worker, category, boxed, pipeline_id, task_source) = match msg.into_queued_task() {
+ Some(queued_task) => queued_task,
+ None => unreachable!("A message to be throttled should always be convertible into a queued task"),
+ };
+ let mut throttled_tasks = self.throttled.borrow_mut();
+ throttled_tasks
+ .entry(task_source.clone())
+ .or_insert(VecDeque::new())
+ .push_back((worker, category, boxed, pipeline_id, task_source));
+ }
+ }
+
+ /// Reset the queue for a new iteration of the event-loop,
+ /// returning the port about whose readiness we want to be notified.
+ pub fn select(&self) -> &Receiver<T> {
+ // This is a new iteration of the event-loop, so we reset the "business" counter.
+ self.taken_task_counter.set(0);
+ // We want to be notified when the script-port is ready to receive.
+ // Hence that's the one we need to include in the select.
+ &self.port
+ }
+
+ /// Take a message from the front of the queue, without waiting if empty.
+ pub fn recv(&self) -> Result<T, ()> {
+ self.msg_queue.borrow_mut().pop_front().ok_or(())
+ }
+
+ /// Same as recv.
+ pub fn try_recv(&self) -> Result<T, ()> {
+ self.recv()
+ }
+
+ /// Drain the queue for the current iteration of the event-loop.
+ /// Holding-back throttles above a given high-water mark.
+ pub fn take_tasks(&self) {
+ // High-watermark: once reached, throttled tasks will be held-back.
+ const PER_ITERATION_MAX: u64 = 5;
+ // Always first check for new tasks, but don't reset 'taken_task_counter'.
+ self.process_incoming_tasks();
+ let mut throttled = self.throttled.borrow_mut();
+ let mut throttled_length: usize = throttled.values().map(|queue| queue.len()).sum();
+ let task_source_names = TaskSourceName::all();
+ let mut task_source_cycler = task_source_names.iter().cycle();
+ // "being busy", is defined as having more than x tasks for this loop's iteration.
+ // As long as we're not busy, and there are throttled tasks left:
+ loop {
+ let max_reached = self.taken_task_counter.get() > PER_ITERATION_MAX;
+ let none_left = throttled_length == 0;
+ match (max_reached, none_left) {
+ (_, true) => break,
+ (true, false) => {
+ // We have reached the high-watermark for this iteration of the event-loop,
+ // yet also have throttled messages left in the queue.
+ // Ensure the select wakes up in the next iteration of the event-loop
+ let _ = self.wake_up_sender.send(T::wake_up_msg());
+ break;
+ },
+ (false, false) => {
+ // Cycle through non-priority task sources, taking one throttled task from each.
+ let task_source = task_source_cycler.next().unwrap();
+ let throttled_queue = match throttled.get_mut(&task_source) {
+ Some(queue) => queue,
+ None => continue,
+ };
+ let queued_task = match throttled_queue.pop_front() {
+ Some(queued_task) => queued_task,
+ None => continue,
+ };
+ let msg = T::from_queued_task(queued_task);
+ let _ = self.msg_queue.borrow_mut().push_back(msg);
+ self.taken_task_counter.set(self.taken_task_counter.get() + 1);
+ throttled_length = throttled_length - 1;
+ },
+ }
+ }
+ }
+}
diff --git a/components/script/task_source/dom_manipulation.rs b/components/script/task_source/dom_manipulation.rs
index 03b2d85a945..f184aa3d828 100644
--- a/components/script/task_source/dom_manipulation.rs
+++ b/components/script/task_source/dom_manipulation.rs
@@ -27,7 +27,7 @@ impl fmt::Debug for DOMManipulationTaskSource {
}
impl TaskSource for DOMManipulationTaskSource {
- const NAME: TaskSourceName = TaskSourceName::DOMManipulation;
+ const NAME: TaskSourceName = TaskSourceName::DOMManipulation;
fn queue_with_canceller<T>(
&self,
@@ -40,7 +40,8 @@ impl TaskSource for DOMManipulationTaskSource {
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
ScriptThreadEventCategory::ScriptEvent,
Box::new(canceller.wrap_task(task)),
- Some(self.1)
+ Some(self.1),
+ DOMManipulationTaskSource::NAME,
));
self.0.send(msg).map_err(|_| ())
}
diff --git a/components/script/task_source/file_reading.rs b/components/script/task_source/file_reading.rs
index 8fd3a143eff..f8ca38a0c30 100644
--- a/components/script/task_source/file_reading.rs
+++ b/components/script/task_source/file_reading.rs
@@ -34,6 +34,7 @@ impl TaskSource for FileReadingTaskSource {
ScriptThreadEventCategory::FileRead,
Box::new(canceller.wrap_task(task)),
Some(self.1),
+ FileReadingTaskSource::NAME,
))
}
}
diff --git a/components/script/task_source/mod.rs b/components/script/task_source/mod.rs
index 23fb3e9ca8f..4dbf0a61c37 100644
--- a/components/script/task_source/mod.rs
+++ b/components/script/task_source/mod.rs
@@ -10,6 +10,7 @@ pub mod networking;
pub mod performance_timeline;
pub mod remote_event;
pub mod user_interaction;
+pub mod websocket;
use dom::globalscope::GlobalScope;
use enum_iterator::IntoEnumIterator;
@@ -20,7 +21,7 @@ use task::{TaskCanceller, TaskOnce};
// Note: When adding a task source, update this enum.
// Note: The HistoryTraversalTaskSource is not part of this,
// because it doesn't implement TaskSource.
-#[derive(Eq, Hash, IntoEnumIterator, JSTraceable, PartialEq)]
+#[derive(Clone, Eq, Hash, IntoEnumIterator, JSTraceable, PartialEq)]
pub enum TaskSourceName {
DOMManipulation,
FileReading,
@@ -28,7 +29,8 @@ pub enum TaskSourceName {
Networking,
PerformanceTimeline,
UserInteraction,
- RemoteEvent
+ RemoteEvent,
+ Websocket,
}
impl TaskSourceName {
diff --git a/components/script/task_source/networking.rs b/components/script/task_source/networking.rs
index 9058f9653e4..9ecbea9c80d 100644
--- a/components/script/task_source/networking.rs
+++ b/components/script/task_source/networking.rs
@@ -31,6 +31,7 @@ impl TaskSource for NetworkingTaskSource {
ScriptThreadEventCategory::NetworkEvent,
Box::new(canceller.wrap_task(task)),
Some(self.1),
+ NetworkingTaskSource::NAME,
))
}
}
@@ -46,6 +47,7 @@ impl NetworkingTaskSource {
ScriptThreadEventCategory::NetworkEvent,
Box::new(task),
Some(self.1),
+ NetworkingTaskSource::NAME,
))
}
}
diff --git a/components/script/task_source/performance_timeline.rs b/components/script/task_source/performance_timeline.rs
index 05591bbe71b..6191db7600a 100644
--- a/components/script/task_source/performance_timeline.rs
+++ b/components/script/task_source/performance_timeline.rs
@@ -44,7 +44,8 @@ impl TaskSource for PerformanceTimelineTaskSource {
let msg = CommonScriptMsg::Task(
ScriptThreadEventCategory::PerformanceTimelineTask,
Box::new(canceller.wrap_task(task)),
- Some(self.1)
+ Some(self.1),
+ PerformanceTimelineTaskSource::NAME,
);
self.0.send(msg).map_err(|_| ())
}
diff --git a/components/script/task_source/remote_event.rs b/components/script/task_source/remote_event.rs
index 2d8428cddbf..97e33977e6f 100644
--- a/components/script/task_source/remote_event.rs
+++ b/components/script/task_source/remote_event.rs
@@ -31,6 +31,7 @@ impl TaskSource for RemoteEventTaskSource {
ScriptThreadEventCategory::NetworkEvent,
Box::new(canceller.wrap_task(task)),
Some(self.1),
+ RemoteEventTaskSource::NAME,
))
}
}
diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs
index 2ace44f1093..2beaee95731 100644
--- a/components/script/task_source/user_interaction.rs
+++ b/components/script/task_source/user_interaction.rs
@@ -40,7 +40,8 @@ impl TaskSource for UserInteractionTaskSource {
let msg = MainThreadScriptMsg::Common(CommonScriptMsg::Task(
ScriptThreadEventCategory::InputEvent,
Box::new(canceller.wrap_task(task)),
- Some(self.1)
+ Some(self.1),
+ UserInteractionTaskSource::NAME,
));
self.0.send(msg).map_err(|_| ())
}
diff --git a/components/script/task_source/websocket.rs b/components/script/task_source/websocket.rs
new file mode 100644
index 00000000000..fbf28aeeb92
--- /dev/null
+++ b/components/script/task_source/websocket.rs
@@ -0,0 +1,37 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use msg::constellation_msg::PipelineId;
+use script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
+use task::{TaskCanceller, TaskOnce};
+use task_source::{TaskSource, TaskSourceName};
+
+#[derive(JSTraceable)]
+pub struct WebsocketTaskSource(pub Box<ScriptChan + Send + 'static>, pub PipelineId);
+
+impl Clone for WebsocketTaskSource {
+ fn clone(&self) -> WebsocketTaskSource {
+ WebsocketTaskSource(self.0.clone(), self.1.clone())
+ }
+}
+
+impl TaskSource for WebsocketTaskSource {
+ const NAME: TaskSourceName = TaskSourceName::Websocket;
+
+ fn queue_with_canceller<T>(
+ &self,
+ task: T,
+ canceller: &TaskCanceller,
+ ) -> Result<(), ()>
+ where
+ T: TaskOnce + 'static,
+ {
+ self.0.send(CommonScriptMsg::Task(
+ ScriptThreadEventCategory::NetworkEvent,
+ Box::new(canceller.wrap_task(task)),
+ Some(self.1),
+ WebsocketTaskSource::NAME,
+ ))
+ }
+}
diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs
index eb21b57be16..4ed12129df1 100644
--- a/components/script_plugins/lib.rs
+++ b/components/script_plugins/lib.rs
@@ -17,7 +17,6 @@
#![deny(unsafe_code)]
#![feature(macro_at_most_once_rep)]
-#![feature(macro_vis_matcher)]
#![feature(plugin)]
#![feature(plugin_registrar)]
#![feature(rustc_private)]
diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs
index 86825808f2c..81dece8fdd5 100644
--- a/components/script_plugins/unrooted_must_root.rs
+++ b/components/script_plugins/unrooted_must_root.rs
@@ -4,10 +4,9 @@
use rustc::hir::{self, ExprKind};
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, symbol::Ident};
+use syntax::{ast, source_map, symbol::Ident};
use utils::{match_def_path, in_derive_expn};
declare_lint!(UNROOTED_MUST_ROOT, Deny,
@@ -43,7 +42,7 @@ fn is_unrooted_ty(cx: &LateContext, ty: &ty::TyS, in_new_function: bool) -> bool
let mut ret = false;
ty.maybe_walk(|t| {
match t.sty {
- ty::TyAdt(did, _) => {
+ ty::Adt(did, _) => {
if cx.tcx.has_attr(did.did, "must_root") {
ret = true;
false
@@ -67,9 +66,9 @@ fn is_unrooted_ty(cx: &LateContext, ty: &ty::TyS, in_new_function: bool) -> bool
true
}
},
- ty::TyRef(..) => false, // don't recurse down &ptrs
- ty::TyRawPtr(..) => false, // don't recurse down *ptrs
- ty::TyFnDef(..) | ty::TyFnPtr(_) => false,
+ ty::Ref(..) => false, // don't recurse down &ptrs
+ ty::RawPtr(..) => false, // don't recurse down *ptrs
+ ty::FnDef(..) | ty::FnPtr(_) => false,
_ => true
}
});
@@ -91,7 +90,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
_gen: &hir::Generics,
id: ast::NodeId) {
let item = match cx.tcx.hir.get(id) {
- ast_map::Node::NodeItem(item) => item,
+ hir::Node::Item(item) => item,
_ => cx.tcx.hir.expect_item(cx.tcx.hir.get_parent(id)),
};
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
@@ -130,7 +129,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
kind: visit::FnKind,
decl: &'tcx hir::FnDecl,
body: &'tcx hir::Body,
- span: codemap::Span,
+ span: source_map::Span,
id: ast::NodeId) {
let in_new_function = match kind {
visit::FnKind::ItemFn(n, _, _, _, _) |
diff --git a/components/script_plugins/utils.rs b/components/script_plugins/utils.rs
index 92797f81430..f264a65ea0a 100644
--- a/components/script_plugins/utils.rs
+++ b/components/script_plugins/utils.rs
@@ -4,7 +4,7 @@
use rustc::hir::def_id::DefId;
use rustc::lint::LateContext;
-use syntax::codemap::{ExpnFormat, Span};
+use syntax::source_map::{ExpnFormat, Span};
/// check if a DefId's path matches the given absolute type path
/// usage e.g. with
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index 278e590bae5..f6edcc45bde 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -66,7 +66,7 @@ fn webdriver(port: u16, constellation: Sender<ConstellationMsg>) {
}
#[cfg(not(feature = "webdriver"))]
-fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) { }
+fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) {}
use bluetooth::BluetoothThreadFactory;
use bluetooth_traits::BluetoothRequest;
@@ -128,7 +128,10 @@ pub struct Servo<Window: WindowMethods + 'static> {
embedder_events: Vec<(Option<BrowserId>, EmbedderMsg)>,
}
-impl<Window> Servo<Window> where Window: WindowMethods + 'static {
+impl<Window> Servo<Window>
+where
+ Window: WindowMethods + 'static,
+{
pub fn new(window: Rc<Window>) -> Servo<Window> {
// Global configuration options, parsed from the command line.
let opts = opts::get();
@@ -148,15 +151,13 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
let (embedder_proxy, embedder_receiver) =
create_embedder_channel(window.create_event_loop_waker());
let supports_clipboard = window.supports_clipboard();
- let time_profiler_chan = profile_time::Profiler::create(&opts.time_profiling,
- opts.time_profiler_trace_path.clone());
+ let time_profiler_chan = profile_time::Profiler::create(
+ &opts.time_profiling,
+ opts.time_profiler_trace_path.clone(),
+ );
let mem_profiler_chan = profile_mem::Profiler::create(opts.mem_profiler_period);
- let debugger_chan = opts.debugger_port.map(|port| {
- debugger::start_server(port)
- });
- let devtools_chan = opts.devtools_port.map(|port| {
- devtools::start_server(port)
- });
+ let debugger_chan = opts.debugger_port.map(|port| debugger::start_server(port));
+ let devtools_chan = opts.devtools_port.map(|port| devtools::start_server(port));
let coordinates = window.get_coordinates();
@@ -180,23 +181,28 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
let render_notifier = Box::new(RenderNotifier::new(compositor_proxy.clone()));
- webrender::Renderer::new(window.gl(), render_notifier, webrender::RendererOptions {
- device_pixel_ratio: coordinates.hidpi_factor.get(),
- resource_override_path: opts.shaders_dir.clone(),
- enable_aa: opts.enable_text_antialiasing,
- debug_flags: debug_flags,
- recorder: recorder,
- precache_shaders: opts.precache_shaders,
- enable_scrollbars: opts.output_file.is_none(),
- renderer_kind: renderer_kind,
- enable_subpixel_aa: opts.enable_subpixel_text_antialiasing,
- ..Default::default()
- }).expect("Unable to initialize webrender!")
+ webrender::Renderer::new(
+ window.gl(),
+ render_notifier,
+ webrender::RendererOptions {
+ device_pixel_ratio: coordinates.hidpi_factor.get(),
+ resource_override_path: opts.shaders_dir.clone(),
+ enable_aa: opts.enable_text_antialiasing,
+ debug_flags: debug_flags,
+ recorder: recorder,
+ precache_shaders: opts.precache_shaders,
+ enable_scrollbars: opts.output_file.is_none(),
+ renderer_kind: renderer_kind,
+ enable_subpixel_aa: opts.enable_subpixel_text_antialiasing,
+ ..Default::default()
+ },
+ ).expect("Unable to initialize webrender!")
};
let webrender_api = webrender_api_sender.create_api();
let wr_document_layer = 0; //TODO
- let webrender_document = webrender_api.add_document(coordinates.framebuffer, wr_document_layer);
+ let webrender_document =
+ webrender_api.add_document(coordinates.framebuffer, wr_document_layer);
// Important that this call is done in a single-threaded fashion, we
// can't defer it after `create_constellation` has started.
@@ -205,19 +211,21 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
// Create the constellation, which maintains the engine
// pipelines, including the script and layout threads, as well
// as the navigation context.
- let (constellation_chan, sw_senders) = create_constellation(opts.user_agent.clone(),
- opts.config_dir.clone(),
- embedder_proxy.clone(),
- compositor_proxy.clone(),
- time_profiler_chan.clone(),
- mem_profiler_chan.clone(),
- debugger_chan,
- devtools_chan,
- supports_clipboard,
- &mut webrender,
- webrender_document,
- webrender_api_sender,
- window.gl());
+ let (constellation_chan, sw_senders) = create_constellation(
+ opts.user_agent.clone(),
+ opts.config_dir.clone(),
+ embedder_proxy.clone(),
+ compositor_proxy.clone(),
+ time_profiler_chan.clone(),
+ mem_profiler_chan.clone(),
+ debugger_chan,
+ devtools_chan,
+ supports_clipboard,
+ &mut webrender,
+ webrender_document,
+ webrender_api_sender,
+ window.gl(),
+ );
// Send the constellation's swmanager sender to service worker manager thread
script::init_service_workers(sw_senders);
@@ -230,16 +238,19 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
// The compositor coordinates with the client window to create the final
// rendered page and display it somewhere.
- let compositor = IOCompositor::create(window, InitialCompositorState {
- sender: compositor_proxy,
- receiver: compositor_receiver,
- constellation_chan: constellation_chan.clone(),
- time_profiler_chan: time_profiler_chan,
- mem_profiler_chan: mem_profiler_chan,
- webrender,
- webrender_document,
- webrender_api,
- });
+ let compositor = IOCompositor::create(
+ window,
+ InitialCompositorState {
+ sender: compositor_proxy,
+ receiver: compositor_receiver,
+ constellation_chan: constellation_chan.clone(),
+ time_profiler_chan: time_profiler_chan,
+ mem_profiler_chan: mem_profiler_chan,
+ webrender,
+ webrender_document,
+ webrender_api,
+ },
+ );
Servo {
compositor: compositor,
@@ -251,127 +262,147 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
fn handle_window_event(&mut self, event: WindowEvent) {
match event {
- WindowEvent::Idle => {
- }
+ WindowEvent::Idle => {},
WindowEvent::Refresh => {
self.compositor.composite();
- }
+ },
WindowEvent::Resize => {
self.compositor.on_resize_window_event();
- }
+ },
WindowEvent::LoadUrl(top_level_browsing_context_id, url) => {
let msg = ConstellationMsg::LoadUrl(top_level_browsing_context_id, url);
if let Err(e) = self.constellation_chan.send(msg) {
warn!("Sending load url to constellation failed ({}).", e);
}
- }
+ },
WindowEvent::MouseWindowEventClass(mouse_window_event) => {
- self.compositor.on_mouse_window_event_class(mouse_window_event);
- }
+ self.compositor
+ .on_mouse_window_event_class(mouse_window_event);
+ },
WindowEvent::MouseWindowMoveEventClass(cursor) => {
self.compositor.on_mouse_window_move_event_class(cursor);
- }
+ },
WindowEvent::Touch(event_type, identifier, location) => {
- self.compositor.on_touch_event(event_type, identifier, location);
- }
+ self.compositor
+ .on_touch_event(event_type, identifier, location);
+ },
WindowEvent::Scroll(delta, cursor, phase) => {
self.compositor.on_scroll_event(delta, cursor, phase);
- }
+ },
WindowEvent::Zoom(magnification) => {
self.compositor.on_zoom_window_event(magnification);
- }
+ },
WindowEvent::ResetZoom => {
self.compositor.on_zoom_reset_window_event();
- }
+ },
WindowEvent::PinchZoom(magnification) => {
self.compositor.on_pinch_zoom_window_event(magnification);
- }
+ },
WindowEvent::Navigation(top_level_browsing_context_id, direction) => {
- let msg = ConstellationMsg::TraverseHistory(top_level_browsing_context_id, direction);
+ let msg =
+ ConstellationMsg::TraverseHistory(top_level_browsing_context_id, direction);
if let Err(e) = self.constellation_chan.send(msg) {
warn!("Sending navigation to constellation failed ({}).", e);
}
- }
+ },
WindowEvent::KeyEvent(ch, key, state, modifiers) => {
let msg = ConstellationMsg::KeyEvent(ch, key, state, modifiers);
if let Err(e) = self.constellation_chan.send(msg) {
warn!("Sending key event to constellation failed ({}).", e);
}
- }
+ },
WindowEvent::Quit => {
self.compositor.maybe_start_shutting_down();
- }
+ },
WindowEvent::Reload(top_level_browsing_context_id) => {
let msg = ConstellationMsg::Reload(top_level_browsing_context_id);
if let Err(e) = self.constellation_chan.send(msg) {
warn!("Sending reload to constellation failed ({}).", e);
}
- }
+ },
WindowEvent::ToggleWebRenderDebug(option) => {
self.compositor.toggle_webrender_debug(option);
- }
+ },
WindowEvent::CaptureWebRender => {
self.compositor.capture_webrender();
- }
+ },
WindowEvent::NewBrowser(url, browser_id) => {
let msg = ConstellationMsg::NewBrowser(url, browser_id);
if let Err(e) = self.constellation_chan.send(msg) {
- warn!("Sending NewBrowser message to constellation failed ({}).", e);
+ warn!(
+ "Sending NewBrowser message to constellation failed ({}).",
+ e
+ );
}
- }
+ },
WindowEvent::SelectBrowser(ctx) => {
let msg = ConstellationMsg::SelectBrowser(ctx);
if let Err(e) = self.constellation_chan.send(msg) {
- warn!("Sending SelectBrowser message to constellation failed ({}).", e);
+ warn!(
+ "Sending SelectBrowser message to constellation failed ({}).",
+ e
+ );
}
- }
+ },
WindowEvent::CloseBrowser(ctx) => {
let msg = ConstellationMsg::CloseBrowser(ctx);
if let Err(e) = self.constellation_chan.send(msg) {
- warn!("Sending CloseBrowser message to constellation failed ({}).", e);
+ warn!(
+ "Sending CloseBrowser message to constellation failed ({}).",
+ e
+ );
}
- }
+ },
WindowEvent::SendError(ctx, e) => {
let msg = ConstellationMsg::SendError(ctx, e);
if let Err(e) = self.constellation_chan.send(msg) {
warn!("Sending SendError message to constellation failed ({}).", e);
}
- }
+ },
}
}
fn receive_messages(&mut self) {
- while let Some((top_level_browsing_context, msg)) = self.embedder_receiver.try_recv_embedder_msg() {
+ while let Some((top_level_browsing_context, msg)) =
+ self.embedder_receiver.try_recv_embedder_msg()
+ {
match (msg, self.compositor.shutdown_state) {
(_, ShutdownState::FinishedShuttingDown) => {
- error!("embedder shouldn't be handling messages after compositor has shut down");
+ error!(
+ "embedder shouldn't be handling messages after compositor has shut down"
+ );
},
(_, ShutdownState::ShuttingDown) => {},
- (EmbedderMsg::KeyEvent(ch, key, state, modified),
- ShutdownState::NotShuttingDown) => {
- let event = (top_level_browsing_context, EmbedderMsg::KeyEvent(ch, key, state, modified));
+ (
+ EmbedderMsg::KeyEvent(ch, key, state, modified),
+ ShutdownState::NotShuttingDown,
+ ) => {
+ let event = (
+ top_level_browsing_context,
+ EmbedderMsg::KeyEvent(ch, key, state, modified),
+ );
self.embedder_events.push(event);
},
@@ -426,55 +457,62 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
}
}
-fn create_embedder_channel(event_loop_waker: Box<EventLoopWaker>)
- -> (EmbedderProxy, EmbedderReceiver) {
+fn create_embedder_channel(
+ event_loop_waker: Box<EventLoopWaker>,
+) -> (EmbedderProxy, EmbedderReceiver) {
let (sender, receiver) = channel();
- (EmbedderProxy {
- sender: sender,
- event_loop_waker: event_loop_waker,
- },
- EmbedderReceiver {
- receiver: receiver
- })
+ (
+ EmbedderProxy {
+ sender: sender,
+ event_loop_waker: event_loop_waker,
+ },
+ EmbedderReceiver { receiver: receiver },
+ )
}
-fn create_compositor_channel(event_loop_waker: Box<EventLoopWaker>)
- -> (CompositorProxy, CompositorReceiver) {
+fn create_compositor_channel(
+ event_loop_waker: Box<EventLoopWaker>,
+) -> (CompositorProxy, CompositorReceiver) {
let (sender, receiver) = channel();
- (CompositorProxy {
- sender: sender,
- event_loop_waker: event_loop_waker,
- },
- CompositorReceiver {
- receiver: receiver
- })
+ (
+ CompositorProxy {
+ sender: sender,
+ event_loop_waker: event_loop_waker,
+ },
+ CompositorReceiver { receiver: receiver },
+ )
}
-fn create_constellation(user_agent: Cow<'static, str>,
- config_dir: Option<PathBuf>,
- embedder_proxy: EmbedderProxy,
- compositor_proxy: CompositorProxy,
- time_profiler_chan: time::ProfilerChan,
- mem_profiler_chan: mem::ProfilerChan,
- debugger_chan: Option<debugger::Sender>,
- devtools_chan: Option<Sender<devtools_traits::DevtoolsControlMsg>>,
- supports_clipboard: bool,
- webrender: &mut webrender::Renderer,
- webrender_document: webrender_api::DocumentId,
- webrender_api_sender: webrender_api::RenderApiSender,
- window_gl: Rc<gl::Gl>)
- -> (Sender<ConstellationMsg>, SWManagerSenders) {
- let bluetooth_thread: IpcSender<BluetoothRequest> = BluetoothThreadFactory::new(embedder_proxy.clone());
-
- let (public_resource_threads, private_resource_threads) =
- new_resource_threads(user_agent,
- devtools_chan.clone(),
- time_profiler_chan.clone(),
- mem_profiler_chan.clone(),
- embedder_proxy.clone(),
- config_dir);
- let font_cache_thread = FontCacheThread::new(public_resource_threads.sender(),
- webrender_api_sender.create_api());
+fn create_constellation(
+ user_agent: Cow<'static, str>,
+ config_dir: Option<PathBuf>,
+ embedder_proxy: EmbedderProxy,
+ compositor_proxy: CompositorProxy,
+ time_profiler_chan: time::ProfilerChan,
+ mem_profiler_chan: mem::ProfilerChan,
+ debugger_chan: Option<debugger::Sender>,
+ devtools_chan: Option<Sender<devtools_traits::DevtoolsControlMsg>>,
+ supports_clipboard: bool,
+ webrender: &mut webrender::Renderer,
+ webrender_document: webrender_api::DocumentId,
+ webrender_api_sender: webrender_api::RenderApiSender,
+ window_gl: Rc<gl::Gl>,
+) -> (Sender<ConstellationMsg>, SWManagerSenders) {
+ let bluetooth_thread: IpcSender<BluetoothRequest> =
+ BluetoothThreadFactory::new(embedder_proxy.clone());
+
+ let (public_resource_threads, private_resource_threads) = new_resource_threads(
+ user_agent,
+ devtools_chan.clone(),
+ time_profiler_chan.clone(),
+ mem_profiler_chan.clone(),
+ embedder_proxy.clone(),
+ config_dir,
+ );
+ let font_cache_thread = FontCacheThread::new(
+ public_resource_threads.sender(),
+ webrender_api_sender.create_api(),
+ );
let resource_sender = public_resource_threads.sender();
@@ -483,7 +521,11 @@ fn create_constellation(user_agent: Cow<'static, str>,
let (mut handler, sender) = WebVRCompositorHandler::new();
let (webvr_thread, constellation_sender) = WebVRThread::spawn(sender);
handler.set_webvr_thread_sender(webvr_thread.clone());
- (Some(webvr_thread), Some(constellation_sender), Some(handler))
+ (
+ Some(webvr_thread),
+ Some(constellation_sender),
+ Some(handler),
+ )
} else {
(None, None, None)
};
@@ -497,13 +539,12 @@ fn create_constellation(user_agent: Cow<'static, str>,
// Initialize WebGL Thread entry point.
let webgl_threads = gl_factory.map(|factory| {
- let (webgl_threads, image_handler, output_handler) =
- WebGLThreads::new(
- factory,
- window_gl,
- webrender_api_sender.clone(),
- webvr_compositor.map(|c| c as Box<_>),
- );
+ let (webgl_threads, image_handler, output_handler) = WebGLThreads::new(
+ factory,
+ window_gl,
+ webrender_api_sender.clone(),
+ webvr_compositor.map(|c| c as Box<_>),
+ );
// Set webrender external image handler for WebGL textures
webrender.set_external_image_handler(image_handler);
@@ -533,20 +574,23 @@ fn create_constellation(user_agent: Cow<'static, str>,
webgl_threads,
webvr_chan,
};
- let (constellation_chan, from_swmanager_sender) =
- Constellation::<script_layout_interface::message::Msg,
- layout_thread::LayoutThread,
- script::script_thread::ScriptThread>::start(initial_state);
+ let (constellation_chan, from_swmanager_sender) = Constellation::<
+ script_layout_interface::message::Msg,
+ layout_thread::LayoutThread,
+ script::script_thread::ScriptThread,
+ >::start(initial_state);
if let Some(webvr_constellation_sender) = webvr_constellation_sender {
// Set constellation channel used by WebVR thread to broadcast events
- webvr_constellation_sender.send(constellation_chan.clone()).unwrap();
+ webvr_constellation_sender
+ .send(constellation_chan.clone())
+ .unwrap();
}
// channels to communicate with Service Worker Manager
let sw_senders = SWManagerSenders {
swmanager_sender: from_swmanager_sender,
- resource_sender: resource_sender
+ resource_sender: resource_sender,
};
(constellation_chan, sw_senders)
@@ -556,7 +600,11 @@ fn create_constellation(user_agent: Cow<'static, str>,
// This should probably be in the log crate.
struct BothLogger<Log1, Log2>(Log1, Log2);
-impl<Log1, Log2> Log for BothLogger<Log1, Log2> where Log1: Log, Log2: Log {
+impl<Log1, Log2> Log for BothLogger<Log1, Log2>
+where
+ Log1: Log,
+ Log2: Log,
+{
fn enabled(&self, metadata: &Metadata) -> bool {
self.0.enabled(metadata) || self.1.enabled(metadata)
}
@@ -590,7 +638,9 @@ pub fn run_content_process(token: String) {
ipc::channel::<UnprivilegedPipelineContent>().unwrap();
let connection_bootstrap: IpcSender<IpcSender<UnprivilegedPipelineContent>> =
IpcSender::connect(token).unwrap();
- connection_bootstrap.send(unprivileged_content_sender).unwrap();
+ connection_bootstrap
+ .send(unprivileged_content_sender)
+ .unwrap();
let unprivileged_content = unprivileged_content_receiver.recv().unwrap();
opts::set_defaults(unprivileged_content.opts());
@@ -599,7 +649,7 @@ pub fn run_content_process(token: String) {
// Enter the sandbox if necessary.
if opts::get().sandbox {
- create_sandbox();
+ create_sandbox();
}
// send the required channels to the service worker manager
@@ -614,7 +664,8 @@ pub fn run_content_process(token: String) {
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
fn create_sandbox() {
- ChildSandbox::new(content_process_sandbox_profile()).activate()
+ ChildSandbox::new(content_process_sandbox_profile())
+ .activate()
.expect("Failed to activate sandbox!");
}
diff --git a/components/size_of_test/lib.rs b/components/size_of_test/lib.rs
index fdd2cd62ec9..f190c24599d 100644
--- a/components/size_of_test/lib.rs
+++ b/components/size_of_test/lib.rs
@@ -13,16 +13,22 @@ macro_rules! size_of_test {
panic!(
"Your changes have decreased the stack size of {} from {} to {}. \
Good work! Please update the expected size in {}.",
- stringify!($t), old, new, file!()
+ stringify!($t),
+ old,
+ new,
+ file!()
)
} else if new > old {
panic!(
"Your changes have increased the stack size of {} from {} to {}. \
Please consider choosing a design which avoids this increase. \
If you feel that the increase is necessary, update the size in {}.",
- stringify!($t), old, new, file!()
+ stringify!($t),
+ old,
+ new,
+ file!()
)
}
}
- }
+ };
}
diff --git a/components/style/animation.rs b/components/style/animation.rs
index 2d421ce06a9..3e501781987 100644
--- a/components/style/animation.rs
+++ b/components/style/animation.rs
@@ -213,7 +213,12 @@ pub enum Animation {
/// node-dependent state (i.e. iteration count, etc.).
///
/// TODO(emilio): The animation object could be refcounted.
- Keyframes(OpaqueNode, KeyframesAnimation, Atom, KeyframesAnimationState),
+ Keyframes(
+ OpaqueNode,
+ KeyframesAnimation,
+ Atom,
+ KeyframesAnimationState,
+ ),
}
impl Animation {
@@ -304,8 +309,7 @@ impl PropertyAnimation {
let duration = box_style.transition_duration_mod(transition_index);
match transition_property {
- TransitionProperty::Custom(..) |
- TransitionProperty::Unsupported(..) => result,
+ TransitionProperty::Custom(..) | TransitionProperty::Unsupported(..) => result,
TransitionProperty::Shorthand(ref shorthand_id) => shorthand_id
.longhands()
.filter_map(|longhand| {
@@ -316,8 +320,7 @@ impl PropertyAnimation {
old_style,
new_style,
)
- })
- .collect(),
+ }).collect(),
TransitionProperty::Longhand(longhand_id) => {
let animation = PropertyAnimation::from_longhand(
longhand_id,
@@ -455,8 +458,7 @@ pub fn start_transitions_if_applicable(
property_animation: property_animation,
},
/* is_expired = */ false,
- ))
- .unwrap();
+ )).unwrap();
had_animations = true;
}
@@ -505,7 +507,9 @@ where
Some(previous_style),
Some(previous_style),
font_metrics_provider,
- CascadeMode::Unvisited { visited_rules: None },
+ CascadeMode::Unvisited {
+ visited_rules: None,
+ },
context.quirks_mode(),
/* rule_cache = */ None,
&mut Default::default(),
@@ -596,8 +600,7 @@ where
expired: false,
cascade_style: new_style.clone(),
},
- ))
- .unwrap();
+ )).unwrap();
had_animations = true;
}
}
@@ -735,8 +738,7 @@ pub fn update_style_for_animation<E>(
} else {
None
}
- })
- .unwrap_or(animation.steps.len() - 1);
+ }).unwrap_or(animation.steps.len() - 1);
},
_ => unreachable!(),
}
diff --git a/components/style/applicable_declarations.rs b/components/style/applicable_declarations.rs
index a1476917fcb..986dc04c371 100644
--- a/components/style/applicable_declarations.rs
+++ b/components/style/applicable_declarations.rs
@@ -38,7 +38,8 @@ const SOURCE_ORDER_MASK: u32 = SOURCE_ORDER_MAX << SOURCE_ORDER_SHIFT;
const SHADOW_CASCADE_ORDER_SHIFT: usize = SOURCE_ORDER_BITS;
const SHADOW_CASCADE_ORDER_BITS: usize = 4;
const SHADOW_CASCADE_ORDER_MAX: u8 = (1 << SHADOW_CASCADE_ORDER_BITS) - 1;
-const SHADOW_CASCADE_ORDER_MASK: u32 = (SHADOW_CASCADE_ORDER_MAX as u32) << SHADOW_CASCADE_ORDER_SHIFT;
+const SHADOW_CASCADE_ORDER_MASK: u32 =
+ (SHADOW_CASCADE_ORDER_MAX as u32) << SHADOW_CASCADE_ORDER_SHIFT;
const CASCADE_LEVEL_SHIFT: usize = SOURCE_ORDER_BITS + SHADOW_CASCADE_ORDER_BITS;
const CASCADE_LEVEL_BITS: usize = 4;
@@ -61,7 +62,8 @@ impl ApplicableDeclarationBits {
"Gotta find more bits!"
);
let mut bits = ::std::cmp::min(source_order, SOURCE_ORDER_MAX);
- bits |= ((shadow_cascade_order & SHADOW_CASCADE_ORDER_MAX) as u32) << SHADOW_CASCADE_ORDER_SHIFT;
+ bits |= ((shadow_cascade_order & SHADOW_CASCADE_ORDER_MAX) as u32) <<
+ SHADOW_CASCADE_ORDER_SHIFT;
bits |= (cascade_level as u8 as u32) << CASCADE_LEVEL_SHIFT;
ApplicableDeclarationBits(bits)
}
diff --git a/components/style/attr.rs b/components/style/attr.rs
index 5f335472f32..a3b119c3a97 100644
--- a/components/style/attr.rs
+++ b/components/style/attr.rs
@@ -158,15 +158,15 @@ pub fn parse_double(string: &str) -> Result<f64, ()> {
impl AttrValue {
pub fn from_serialized_tokenlist(tokens: String) -> AttrValue {
- let atoms = split_html_space_chars(&tokens).map(Atom::from).fold(
- vec![],
- |mut acc, atom| {
- if !acc.contains(&atom) {
- acc.push(atom)
- }
- acc
- },
- );
+ let atoms =
+ split_html_space_chars(&tokens)
+ .map(Atom::from)
+ .fold(vec![], |mut acc, atom| {
+ if !acc.contains(&atom) {
+ acc.push(atom)
+ }
+ acc
+ });
AttrValue::TokenList(tokens, atoms)
}
diff --git a/components/style/author_styles.rs b/components/style/author_styles.rs
index e8ec621bd92..837569078c0 100644
--- a/components/style/author_styles.rs
+++ b/components/style/author_styles.rs
@@ -60,7 +60,8 @@ where
E: TElement,
S: ToMediaListKey,
{
- let flusher = self.stylesheets
+ let flusher = self
+ .stylesheets
.flush::<E>(/* host = */ None, /* snapshot_map = */ None);
if flusher.sheets.dirty() {
@@ -68,7 +69,8 @@ where
}
// Ignore OOM.
- let _ = self.data
+ let _ = self
+ .data
.rebuild(device, quirks_mode, flusher.sheets, guard);
}
}
diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs
index 8387f6513a6..1ecc7ec6fc3 100644
--- a/components/style/build_gecko.rs
+++ b/components/style/build_gecko.rs
@@ -322,13 +322,11 @@ mod bindings {
.expect(&format!(
"Unrecognized line in ServoArcTypeList.h: '{}'",
line
- ))
- .get(1)
+ )).get(1)
.unwrap()
.as_str()
.to_string()
- })
- .collect()
+ }).collect()
}
struct BuilderWithConfig<'a> {
@@ -406,11 +404,7 @@ mod bindings {
fn generate_structs() {
let builder = Builder::get_initial_builder()
.enable_cxx_namespaces()
- .with_codegen_config(CodegenConfig {
- types: true,
- vars: true,
- ..CodegenConfig::nothing()
- });
+ .with_codegen_config(CodegenConfig::TYPES | CodegenConfig::VARS);
let mut fixups = vec![];
let builder = BuilderWithConfig::new(builder, CONFIG["structs"].as_table().unwrap())
.handle_common(&mut fixups)
@@ -440,8 +434,7 @@ mod bindings {
servo,
if generic { "<T>" } else { "" }
))
- })
- .get_builder();
+ }).get_builder();
write_binding_file(builder, STRUCTS_FILE, &fixups);
}
@@ -500,10 +493,7 @@ mod bindings {
fn generate_bindings() {
let builder = Builder::get_initial_builder()
.disable_name_namespacing()
- .with_codegen_config(CodegenConfig {
- functions: true,
- ..CodegenConfig::nothing()
- });
+ .with_codegen_config(CodegenConfig::FUNCTIONS);
let config = CONFIG["bindings"].as_table().unwrap();
let mut structs_types = HashSet::new();
let mut fixups = vec![];
@@ -560,8 +550,7 @@ mod bindings {
.raw_line(format!(
"pub type {0}Strong = ::gecko_bindings::sugar::ownership::Strong<{0}>;",
ty
- ))
- .borrowed_type(ty)
+ )).borrowed_type(ty)
.zero_size_type(ty, &structs_types);
}
write_binding_file(builder, BINDINGS_FILE, &fixups);
diff --git a/components/style/cbindgen.toml b/components/style/cbindgen.toml
index 5a0e5e19ea7..46162e43db5 100644
--- a/components/style/cbindgen.toml
+++ b/components/style/cbindgen.toml
@@ -7,6 +7,7 @@ autogen_warning = """/* DO NOT MODIFY THIS MANUALLY! This file was generated usi
* a. Alternatively, you can clone `https://github.com/eqrion/cbindgen` and use a tagged release
* 2. Run `rustup run nightly cbindgen toolkit/library/rust/ --lockfile Cargo.lock --crate style -o layout/style/ServoStyleConsts.h`
*/"""
+include_guard = "mozilla_ServoStyleConsts_h"
include_version = true
braces = "SameLine"
line_length = 80
@@ -22,5 +23,11 @@ derive_helper_methods = true
[export]
prefix = "Style"
-include = ["StyleDisplay", "StyleAppearance", "StyleDisplayMode"]
-item_types = ["enums"]
+include = [
+ "StyleAppearance",
+ "StyleDisplay",
+ "StyleDisplayMode",
+ "StyleFillRule",
+ "StylePathCommand"
+]
+item_types = ["enums", "structs", "typedefs"]
diff --git a/components/style/counter_style/mod.rs b/components/style/counter_style/mod.rs
index 2542dee3625..653d199545c 100644
--- a/components/style/counter_style/mod.rs
+++ b/components/style/counter_style/mod.rs
@@ -91,8 +91,7 @@ pub fn parse_counter_style_body<'i, 't>(
if let Err((error, slice)) = declaration {
let location = error.location;
let error = ContextualParseError::UnsupportedCounterStyleDescriptorDeclaration(
- slice,
- error,
+ slice, error,
);
context.log_css_error(location, error)
}
@@ -103,7 +102,8 @@ pub fn parse_counter_style_body<'i, 't>(
ref system @ System::Fixed { .. } |
ref system @ System::Symbolic |
ref system @ System::Alphabetic |
- ref system @ System::Numeric if rule.symbols.is_none() =>
+ ref system @ System::Numeric
+ if rule.symbols.is_none() =>
{
let system = system.to_css_string();
Some(ContextualParseError::InvalidCounterStyleWithoutSymbols(
@@ -496,12 +496,13 @@ impl Parse for Ranges {
(opt_start, opt_end)
{
if start > end {
- return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
+ return Err(
+ input.new_custom_error(StyleParseErrorKind::UnspecifiedError)
+ );
}
}
Ok(opt_start..opt_end)
- })
- .map(Ranges)
+ }).map(Ranges)
}
}
}
diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs
index d79a27c5c4d..985179db025 100644
--- a/components/style/custom_properties.rs
+++ b/components/style/custom_properties.rs
@@ -243,7 +243,8 @@ impl VariableValue {
self.first_token_type.set_if_nothing(css_first_token_type);
// If self.first_token_type was nothing,
// self.last_token_type is also nothing and this will be false:
- if self.last_token_type
+ if self
+ .last_token_type
.needs_separator_when_before(css_first_token_type)
{
self.css.push_str("/**/")
@@ -569,7 +570,8 @@ impl<'a> CustomPropertiesBuilder<'a> {
_ => {},
}
- let existing_value = self.custom_properties
+ let existing_value = self
+ .custom_properties
.as_ref()
.and_then(|m| m.get(name))
.or_else(|| self.inherited.and_then(|m| m.get(name)));
diff --git a/components/style/data.rs b/components/style/data.rs
index 71a0ac23320..4a9b0c53940 100644
--- a/components/style/data.rs
+++ b/components/style/data.rs
@@ -272,12 +272,8 @@ impl ElementData {
return InvalidationResult::empty();
}
- let mut processor = StateAndAttrInvalidationProcessor::new(
- shared_context,
- element,
- self,
- nth_index_cache,
- );
+ let mut processor =
+ StateAndAttrInvalidationProcessor::new(shared_context, element, self, nth_index_cache);
let invalidator = TreeStyleInvalidator::new(element, stack_limit_checker, &mut processor);
@@ -305,7 +301,8 @@ impl ElementData {
/// Returns this element's primary style as a resolved style to use for sharing.
pub fn share_primary_style(&self) -> PrimaryStyle {
- let reused_via_rule_node = self.flags
+ let reused_via_rule_node = self
+ .flags
.contains(ElementDataFlags::PRIMARY_STYLE_REUSED_VIA_RULE_NODE);
PrimaryStyle {
@@ -390,7 +387,8 @@ impl ElementData {
guards: &StylesheetGuards,
) -> bool {
debug_assert!(self.has_styles());
- let (important_rules, _custom) = self.styles
+ let (important_rules, _custom) = self
+ .styles
.primary()
.rules()
.get_properties_overriding_animations(&guards);
diff --git a/components/style/dom.rs b/components/style/dom.rs
index 42f6e9ba0c0..872a55a54b2 100644
--- a/components/style/dom.rs
+++ b/components/style/dom.rs
@@ -19,7 +19,7 @@ use element_state::ElementState;
use font_metrics::FontMetricsProvider;
use media_queries::Device;
use properties::{AnimationRules, ComputedValues, PropertyDeclarationBlock};
-use selector_parser::{AttrValue, PseudoClassStringArg, PseudoElement, SelectorImpl};
+use selector_parser::{AttrValue, Lang, PseudoElement, SelectorImpl};
use selectors::Element as SelectorsElement;
use selectors::matching::{ElementSelectorFlags, QuirksMode, VisitedHandlingMode};
use selectors::sink::Push;
@@ -42,7 +42,10 @@ use traversal_flags::TraversalFlags;
/// data structures. Also, layout code tends to be faster when the DOM is not being accessed, for
/// locality reasons. Using `OpaqueNode` enforces this invariant.
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
-#[cfg_attr(feature = "servo", derive(MallocSizeOf, Deserialize, Serialize))]
+#[cfg_attr(
+ feature = "servo",
+ derive(MallocSizeOf, Deserialize, Serialize)
+)]
pub struct OpaqueNode(pub usize);
impl OpaqueNode {
@@ -342,7 +345,7 @@ pub trait TShadowRoot: Sized + Copy + Clone + PartialEq {
fn host(&self) -> <Self::ConcreteNode as TNode>::ConcreteElement;
/// Get the style data for this ShadowRoot.
- fn style_data<'a>(&self) -> &'a CascadeData
+ fn style_data<'a>(&self) -> Option<&'a CascadeData>
where
Self: 'a;
@@ -459,7 +462,9 @@ pub trait TElement:
fn is_svg_element(&self) -> bool;
/// Return whether this element is an element in the XUL namespace.
- fn is_xul_element(&self) -> bool { false }
+ fn is_xul_element(&self) -> bool {
+ false
+ }
/// Return the list of slotted nodes of this node.
fn slotted_nodes(&self) -> &[Self::ConcreteNode] {
@@ -824,30 +829,36 @@ pub trait TElement:
if let Some(shadow) = self.containing_shadow() {
doc_rules_apply = false;
- f(
- shadow.style_data(),
- self.as_node().owner_doc().quirks_mode(),
- Some(shadow.host()),
- );
+ if let Some(data) = shadow.style_data() {
+ f(
+ data,
+ self.as_node().owner_doc().quirks_mode(),
+ Some(shadow.host()),
+ );
+ }
}
if let Some(shadow) = self.shadow_root() {
- f(
- shadow.style_data(),
- self.as_node().owner_doc().quirks_mode(),
- Some(shadow.host()),
- );
+ if let Some(data) = shadow.style_data() {
+ f(
+ data,
+ self.as_node().owner_doc().quirks_mode(),
+ Some(shadow.host()),
+ );
+ }
}
let mut current = self.assigned_slot();
while let Some(slot) = current {
// Slots can only have assigned nodes when in a shadow tree.
let shadow = slot.containing_shadow().unwrap();
- f(
- shadow.style_data(),
- self.as_node().owner_doc().quirks_mode(),
- Some(shadow.host()),
- );
+ if let Some(data) = shadow.style_data() {
+ f(
+ data,
+ self.as_node().owner_doc().quirks_mode(),
+ Some(shadow.host()),
+ );
+ }
current = slot.assigned_slot();
}
@@ -886,11 +897,7 @@ pub trait TElement:
/// of the `xml:lang=""` or `lang=""` attribute to use in place of
/// looking at the element and its ancestors. (This argument is used
/// to implement matching of `:lang()` against snapshots.)
- fn match_element_lang(
- &self,
- override_lang: Option<Option<AttrValue>>,
- value: &PseudoClassStringArg,
- ) -> bool;
+ fn match_element_lang(&self, override_lang: Option<Option<AttrValue>>, value: &Lang) -> bool;
/// Returns whether this element is the main body element of the HTML
/// document it is on.
diff --git a/components/style/dom_apis.rs b/components/style/dom_apis.rs
index 393fb6e119e..9d7ab917a91 100644
--- a/components/style/dom_apis.rs
+++ b/components/style/dom_apis.rs
@@ -426,8 +426,7 @@ where
return Ok(());
}
- let elements =
- fast_connected_elements_with_id(root, id, quirks_mode)?;
+ let elements = fast_connected_elements_with_id(root, id, quirks_mode)?;
if elements.is_empty() {
return Ok(());
}
diff --git a/components/style/font_face.rs b/components/style/font_face.rs
index d7501c1cca7..fde25f08f6f 100644
--- a/components/style/font_face.rs
+++ b/components/style/font_face.rs
@@ -104,8 +104,9 @@ impl Parse for FontWeight {
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
let first = AbsoluteFontWeight::parse(context, input)?;
- let second =
- input.try(|input| AbsoluteFontWeight::parse(context, input)).ok();
+ let second = input
+ .try(|input| AbsoluteFontWeight::parse(context, input))
+ .ok();
Ok(FontWeight(first, second))
}
}
@@ -122,8 +123,9 @@ impl Parse for FontStretch {
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
let first = SpecifiedFontStretch::parse(context, input)?;
- let second =
- input.try(|input| SpecifiedFontStretch::parse(context, input)).ok();
+ let second = input
+ .try(|input| SpecifiedFontStretch::parse(context, input))
+ .ok();
Ok(FontStretch(first, second))
}
}
@@ -149,12 +151,12 @@ impl Parse for FontStyle {
GenericFontStyle::Normal => FontStyle::Normal,
GenericFontStyle::Italic => FontStyle::Italic,
GenericFontStyle::Oblique(angle) => {
- let second_angle = input.try(|input| {
- SpecifiedFontStyle::parse_angle(context, input)
- }).unwrap_or_else(|_| angle.clone());
+ let second_angle = input
+ .try(|input| SpecifiedFontStyle::parse_angle(context, input))
+ .unwrap_or_else(|_| angle.clone());
FontStyle::Oblique(angle, second_angle)
- }
+ },
})
}
}
@@ -178,7 +180,7 @@ impl ToCss for FontStyle {
second.to_css(dest)?;
}
Ok(())
- }
+ },
}
}
}
@@ -235,15 +237,13 @@ impl<'a> FontFace<'a> {
// We support only opentype fonts and truetype is an alias for
// that format. Sources without format hints need to be
// downloaded in case we support them.
- hints.is_empty() ||
- hints.iter().any(|hint| {
- hint == "truetype" || hint == "opentype" || hint == "woff"
- })
+ hints.is_empty() || hints
+ .iter()
+ .any(|hint| hint == "truetype" || hint == "opentype" || hint == "woff")
} else {
true
}
- })
- .cloned()
+ }).cloned()
.collect(),
)
}
diff --git a/components/style/gecko/conversions.rs b/components/style/gecko/conversions.rs
index 3b1f31a1b08..c6009c96dee 100644
--- a/components/style/gecko/conversions.rs
+++ b/components/style/gecko/conversions.rs
@@ -19,6 +19,7 @@ use stylesheets::{Origin, RulesMutateError};
use values::computed::{Angle, CalcLengthOrPercentage, Gradient, Image};
use values::computed::{Integer, LengthOrPercentage, LengthOrPercentageOrAuto};
use values::computed::{Percentage, TextAlign};
+use values::computed::image::LineDirection;
use values::computed::url::ComputedImageUrl;
use values::generics::box_::VerticalAlign;
use values::generics::grid::{TrackListValue, TrackSize};
@@ -139,6 +140,65 @@ impl Angle {
}
}
+fn line_direction(horizontal: LengthOrPercentage, vertical: LengthOrPercentage) -> LineDirection {
+ use values::computed::position::Position;
+ use values::specified::position::{X, Y};
+
+ let horizontal_percentage = match horizontal {
+ LengthOrPercentage::Percentage(percentage) => Some(percentage.0),
+ _ => None,
+ };
+
+ let vertical_percentage = match vertical {
+ LengthOrPercentage::Percentage(percentage) => Some(percentage.0),
+ _ => None,
+ };
+
+ let horizontal_as_corner = horizontal_percentage.and_then(|percentage| {
+ if percentage == 0.0 {
+ Some(X::Left)
+ } else if percentage == 1.0 {
+ Some(X::Right)
+ } else {
+ None
+ }
+ });
+
+ let vertical_as_corner = vertical_percentage.and_then(|percentage| {
+ if percentage == 0.0 {
+ Some(Y::Top)
+ } else if percentage == 1.0 {
+ Some(Y::Bottom)
+ } else {
+ None
+ }
+ });
+
+ if let (Some(hc), Some(vc)) = (horizontal_as_corner, vertical_as_corner) {
+ return LineDirection::Corner(hc, vc);
+ }
+
+ if let Some(hc) = horizontal_as_corner {
+ if vertical_percentage == Some(0.5) {
+ return LineDirection::Horizontal(hc);
+ }
+ }
+
+ if let Some(vc) = vertical_as_corner {
+ if horizontal_percentage == Some(0.5) {
+ return LineDirection::Vertical(vc);
+ }
+ }
+
+ LineDirection::MozPosition(
+ Some(Position {
+ horizontal,
+ vertical,
+ }),
+ None,
+ )
+}
+
impl nsStyleImage {
/// Set a given Servo `Image` value into this `nsStyleImage`.
pub fn set(&mut self, image: Image) {
@@ -149,7 +209,10 @@ impl nsStyleImage {
},
GenericImage::Rect(ref image_rect) => {
unsafe {
- bindings::Gecko_SetLayerImageImageValue(self, image_rect.url.0.image_value.get());
+ bindings::Gecko_SetLayerImageImageValue(
+ self,
+ image_rect.url.0.image_value.get(),
+ );
bindings::Gecko_InitializeImageCropRect(self);
// Set CropRect
@@ -174,13 +237,13 @@ impl nsStyleImage {
}
}
+ // FIXME(emilio): This is really complex, we should use cbindgen for this.
fn set_gradient(&mut self, gradient: Gradient) {
use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER as CLOSEST_CORNER;
use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE as CLOSEST_SIDE;
use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER as FARTHEST_CORNER;
use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE as FARTHEST_SIDE;
use self::structs::nsStyleCoord;
- use values::computed::image::LineDirection;
use values::generics::image::{Circle, Ellipse, EndingShape, GradientKind, ShapeExtent};
use values::specified::position::{X, Y};
@@ -428,7 +491,8 @@ impl nsStyleImage {
unsafe fn get_image_url(&self) -> ComputedImageUrl {
let image_request = bindings::Gecko_GetImageRequest(self)
- .as_ref().expect("Null image request?");
+ .as_ref()
+ .expect("Null image request?");
ComputedImageUrl::from_image_request(image_request)
}
@@ -437,12 +501,11 @@ impl nsStyleImage {
use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE as CLOSEST_SIDE;
use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER as FARTHEST_CORNER;
use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE as FARTHEST_SIDE;
- use values::computed::{Length, LengthOrPercentage};
+ use values::computed::Length;
use values::computed::image::LineDirection;
use values::computed::position::Position;
use values::generics::image::{Circle, ColorStop, CompatMode, Ellipse};
use values::generics::image::{EndingShape, GradientKind, ShapeExtent};
- use values::specified::position::{X, Y};
let gecko_gradient = bindings::Gecko_GetGradientImageValue(self)
.as_ref()
@@ -456,41 +519,7 @@ impl nsStyleImage {
let line_direction = match (angle, horizontal_style, vertical_style) {
(Some(a), None, None) => LineDirection::Angle(a),
(None, Some(horizontal), Some(vertical)) => {
- let horizontal_as_corner = match horizontal {
- LengthOrPercentage::Percentage(percentage) => {
- if percentage.0 == 0.0 {
- Some(X::Left)
- } else if percentage.0 == 1.0 {
- Some(X::Right)
- } else {
- None
- }
- },
- _ => None,
- };
- let vertical_as_corner = match vertical {
- LengthOrPercentage::Percentage(percentage) => {
- if percentage.0 == 0.0 {
- Some(Y::Top)
- } else if percentage.0 == 1.0 {
- Some(Y::Bottom)
- } else {
- None
- }
- },
- _ => None,
- };
-
- match (horizontal_as_corner, vertical_as_corner) {
- (Some(hc), Some(vc)) => LineDirection::Corner(hc, vc),
- _ => LineDirection::MozPosition(
- Some(Position {
- horizontal,
- vertical,
- }),
- None,
- ),
- }
+ line_direction(horizontal, vertical)
},
(Some(_), Some(horizontal), Some(vertical)) => LineDirection::MozPosition(
Some(Position {
@@ -527,9 +556,9 @@ impl nsStyleImage {
structs::NS_STYLE_GRADIENT_SHAPE_CIRCULAR => {
let circle = match gecko_gradient.mSize as u32 {
structs::NS_STYLE_GRADIENT_SIZE_EXPLICIT_SIZE => {
- let radius = Length::from_gecko_style_coord(
- &gecko_gradient.mRadiusX,
- ).expect("mRadiusX could not convert to Length");
+ let radius =
+ Length::from_gecko_style_coord(&gecko_gradient.mRadiusX)
+ .expect("mRadiusX could not convert to Length");
debug_assert_eq!(
radius,
Length::from_gecko_style_coord(&gecko_gradient.mRadiusY)
@@ -604,8 +633,7 @@ impl nsStyleImage {
position: LengthOrPercentage::from_gecko_style_coord(&stop.mLocation),
})
}
- })
- .collect();
+ }).collect();
let compat_mode = if gecko_gradient.mMozLegacySyntax {
CompatMode::Moz
@@ -638,13 +666,15 @@ pub mod basic_shape {
use values::computed::basic_shape::{BasicShape, ClippingShape, FloatAreaShape, ShapeRadius};
use values::computed::border::{BorderCornerRadius, BorderRadius};
use values::computed::length::LengthOrPercentage;
+ use values::computed::motion::OffsetPath;
use values::computed::position;
use values::computed::url::ComputedUrl;
use values::generics::basic_shape::{BasicShape as GenericBasicShape, InsetRect, Polygon};
- use values::generics::basic_shape::{Circle, Ellipse, FillRule};
+ use values::generics::basic_shape::{Circle, Ellipse, FillRule, Path, PolygonCoord};
use values::generics::basic_shape::{GeometryBox, ShapeBox, ShapeSource};
use values::generics::border::BorderRadius as GenericBorderRadius;
use values::generics::rect::Rect;
+ use values::specified::SVGPathData;
impl StyleShapeSource {
/// Convert StyleShapeSource to ShapeSource except URL and Image
@@ -669,6 +699,36 @@ pub mod basic_shape {
Some(ShapeSource::Shape(shape, reference_box))
},
StyleShapeSourceType::URL | StyleShapeSourceType::Image => None,
+ StyleShapeSourceType::Path => {
+ let path = self.to_svg_path().expect("expect an SVGPathData");
+ let gecko_path = unsafe { &*self.__bindgen_anon_1.mSVGPath.as_ref().mPtr };
+ let fill = if gecko_path.mFillRule == StyleFillRule::Evenodd {
+ FillRule::Evenodd
+ } else {
+ FillRule::Nonzero
+ };
+ Some(ShapeSource::Path(Path { fill, path }))
+ },
+ }
+ }
+
+ /// Generate a SVGPathData from StyleShapeSource if possible.
+ fn to_svg_path(&self) -> Option<SVGPathData> {
+ use gecko_bindings::structs::StylePathCommand;
+ use values::specified::svg_path::PathCommand;
+ match self.mType {
+ StyleShapeSourceType::Path => {
+ let gecko_path = unsafe { &*self.__bindgen_anon_1.mSVGPath.as_ref().mPtr };
+ let result: Vec<PathCommand> = gecko_path
+ .mPath
+ .iter()
+ .map(|gecko: &StylePathCommand| {
+ // unsafe: cbindgen ensures the representation is the same.
+ unsafe { ::std::mem::transmute(*gecko) }
+ }).collect();
+ Some(SVGPathData::new(result.into_boxed_slice()))
+ },
+ _ => None,
}
}
}
@@ -710,6 +770,21 @@ pub mod basic_shape {
}
}
+ impl<'a> From<&'a StyleShapeSource> for OffsetPath {
+ fn from(other: &'a StyleShapeSource) -> Self {
+ match other.mType {
+ StyleShapeSourceType::Path => {
+ OffsetPath::Path(other.to_svg_path().expect("Cannot convert to SVGPathData"))
+ },
+ StyleShapeSourceType::None => OffsetPath::none(),
+ StyleShapeSourceType::Shape |
+ StyleShapeSourceType::Box |
+ StyleShapeSourceType::URL |
+ StyleShapeSourceType::Image => unreachable!("Unsupported offset-path type"),
+ }
+ }
+ }
+
impl<'a> From<&'a StyleBasicShape> for BasicShape {
fn from(other: &'a StyleBasicShape) -> Self {
match other.mType {
@@ -718,17 +793,15 @@ pub mod basic_shape {
let r = LengthOrPercentage::from_gecko_style_coord(&other.mCoordinates[1]);
let b = LengthOrPercentage::from_gecko_style_coord(&other.mCoordinates[2]);
let l = LengthOrPercentage::from_gecko_style_coord(&other.mCoordinates[3]);
- let round = (&other.mRadius).into();
+ let round: BorderRadius = (&other.mRadius).into();
+ let round = if round.all_zero() { None } else { Some(round) };
let rect = Rect::new(
t.expect("inset() offset should be a length, percentage, or calc value"),
r.expect("inset() offset should be a length, percentage, or calc value"),
b.expect("inset() offset should be a length, percentage, or calc value"),
l.expect("inset() offset should be a length, percentage, or calc value"),
);
- GenericBasicShape::Inset(InsetRect {
- rect: rect,
- round: Some(round),
- })
+ GenericBasicShape::Inset(InsetRect { rect, round })
},
StyleBasicShapeType::Circle => GenericBasicShape::Circle(Circle {
radius: (&other.mCoordinates[0]).into(),
@@ -749,11 +822,18 @@ pub mod basic_shape {
for i in 0..(other.mCoordinates.len() / 2) {
let x = 2 * i;
let y = x + 1;
- coords.push((LengthOrPercentage::from_gecko_style_coord(&other.mCoordinates[x])
- .expect("polygon() coordinate should be a length, percentage, or calc value"),
- LengthOrPercentage::from_gecko_style_coord(&other.mCoordinates[y])
- .expect("polygon() coordinate should be a length, percentage, or calc value")
- ))
+ coords.push(PolygonCoord(
+ LengthOrPercentage::from_gecko_style_coord(&other.mCoordinates[x])
+ .expect(
+ "polygon() coordinate should be a length, percentage, \
+ or calc value",
+ ),
+ LengthOrPercentage::from_gecko_style_coord(&other.mCoordinates[y])
+ .expect(
+ "polygon() coordinate should be a length, percentage, \
+ or calc value",
+ ),
+ ))
}
GenericBasicShape::Polygon(Polygon {
fill: fill_rule,
diff --git a/components/style/gecko/data.rs b/components/style/gecko/data.rs
index 0bd938c67e8..d737167c28a 100644
--- a/components/style/gecko/data.rs
+++ b/components/style/gecko/data.rs
@@ -29,7 +29,8 @@ pub struct GeckoStyleSheet(*const DomStyleSheet);
impl fmt::Debug for GeckoStyleSheet {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
let contents = self.contents();
- formatter.debug_struct("GeckoStyleSheet")
+ formatter
+ .debug_struct("GeckoStyleSheet")
.field("origin", &contents.origin)
.field("url_data", &*contents.url_data.read())
.finish()
@@ -66,9 +67,7 @@ impl GeckoStyleSheet {
}
fn inner(&self) -> &StyleSheetInfo {
- unsafe {
- &*(self.raw().mInner as *const StyleSheetInfo)
- }
+ unsafe { &*(self.raw().mInner as *const StyleSheetInfo) }
}
/// Gets the StylesheetContents for this stylesheet.
@@ -193,7 +192,8 @@ impl PerDocumentStyleDataImpl {
/// Returns whether visited styles are enabled.
#[inline]
pub fn visited_styles_enabled(&self) -> bool {
- let doc = self.stylist
+ let doc = self
+ .stylist
.device()
.pres_context()
.mDocument
diff --git a/components/style/gecko/media_features.rs b/components/style/gecko/media_features.rs
index 386d0ad5b43..85f0ba27d43 100644
--- a/components/style/gecko/media_features.rs
+++ b/components/style/gecko/media_features.rs
@@ -21,7 +21,7 @@ fn viewport_size(device: &Device) -> Size2D<Au> {
// We want the page size, including unprintable areas and margins.
// FIXME(emilio, bug 1414600): Not quite!
let area = &pc.mPageSize;
- return Size2D::new(Au(area.width), Au(area.height))
+ return Size2D::new(Au(area.width), Au(area.height));
}
device.au_viewport_size()
}
@@ -30,11 +30,7 @@ fn device_size(device: &Device) -> Size2D<Au> {
let mut width = 0;
let mut height = 0;
unsafe {
- bindings::Gecko_MediaFeatures_GetDeviceSize(
- device.document(),
- &mut width,
- &mut height,
- );
+ bindings::Gecko_MediaFeatures_GetDeviceSize(device.document(), &mut width, &mut height);
}
Size2D::new(Au(width), Au(height))
}
@@ -152,11 +148,7 @@ enum Orientation {
Portrait,
}
-fn eval_orientation_for<F>(
- device: &Device,
- value: Option<Orientation>,
- get_size: F,
-) -> bool
+fn eval_orientation_for<F>(device: &Device, value: Option<Orientation>, get_size: F) -> bool
where
F: FnOnce(&Device) -> Size2D<Au>,
{
@@ -176,18 +168,12 @@ where
}
/// https://drafts.csswg.org/mediaqueries-4/#orientation
-fn eval_orientation(
- device: &Device,
- value: Option<Orientation>,
-) -> bool {
+fn eval_orientation(device: &Device, value: Option<Orientation>) -> bool {
eval_orientation_for(device, value, viewport_size)
}
/// FIXME: There's no spec for `-moz-device-orientation`.
-fn eval_device_orientation(
- device: &Device,
- value: Option<Orientation>,
-) -> bool {
+fn eval_device_orientation(device: &Device, value: Option<Orientation>) -> bool {
eval_orientation_for(device, value, device_size)
}
@@ -196,25 +182,21 @@ fn eval_device_orientation(
#[repr(u8)]
#[allow(missing_docs)]
pub enum DisplayMode {
- Browser = 0,
- MinimalUi,
- Standalone,
- Fullscreen,
+ Browser = 0,
+ MinimalUi,
+ Standalone,
+ Fullscreen,
}
/// https://w3c.github.io/manifest/#the-display-mode-media-feature
-fn eval_display_mode(
- device: &Device,
- query_value: Option<DisplayMode>,
-) -> bool {
+fn eval_display_mode(device: &Device, query_value: Option<DisplayMode>) -> bool {
let query_value = match query_value {
Some(v) => v,
None => return true,
};
- let gecko_display_mode = unsafe {
- bindings::Gecko_MediaFeatures_GetDisplayMode(device.document())
- };
+ let gecko_display_mode =
+ unsafe { bindings::Gecko_MediaFeatures_GetDisplayMode(device.document()) };
// NOTE: cbindgen guarantees the same representation.
gecko_display_mode as u8 == query_value as u8
@@ -229,11 +211,7 @@ fn eval_grid(_: &Device, query_value: Option<bool>, _: Option<RangeOrOperator>)
}
/// https://compat.spec.whatwg.org/#css-media-queries-webkit-transform-3d
-fn eval_transform_3d(
- _: &Device,
- query_value: Option<bool>,
- _: Option<RangeOrOperator>,
-) -> bool {
+fn eval_transform_3d(_: &Device, query_value: Option<bool>, _: Option<RangeOrOperator>) -> bool {
let supports_transforms = true;
query_value.map_or(supports_transforms, |v| v == supports_transforms)
}
@@ -260,11 +238,7 @@ fn eval_color(
) -> bool {
let color_bits_per_channel =
unsafe { bindings::Gecko_MediaFeatures_GetColorDepth(device.document()) };
- RangeOrOperator::evaluate(
- range_or_operator,
- query_value,
- color_bits_per_channel,
- )
+ RangeOrOperator::evaluate(range_or_operator, query_value, color_bits_per_channel)
}
/// https://drafts.csswg.org/mediaqueries-4/#color-index
@@ -275,11 +249,7 @@ fn eval_color_index(
) -> bool {
// We should return zero if the device does not use a color lookup table.
let index = 0;
- RangeOrOperator::evaluate(
- range_or_operator,
- query_value,
- index,
- )
+ RangeOrOperator::evaluate(range_or_operator, query_value, index)
}
/// https://drafts.csswg.org/mediaqueries-4/#monochrome
@@ -291,11 +261,7 @@ fn eval_monochrome(
// For color devices we should return 0.
// FIXME: On a monochrome device, return the actual color depth, not 0!
let depth = 0;
- RangeOrOperator::evaluate(
- range_or_operator,
- query_value,
- depth,
- )
+ RangeOrOperator::evaluate(range_or_operator, query_value, depth)
}
/// https://drafts.csswg.org/mediaqueries-4/#resolution
@@ -304,8 +270,7 @@ fn eval_resolution(
query_value: Option<Resolution>,
range_or_operator: Option<RangeOrOperator>,
) -> bool {
- let resolution_dppx =
- unsafe { bindings::Gecko_MediaFeatures_GetResolution(device.document()) };
+ let resolution_dppx = unsafe { bindings::Gecko_MediaFeatures_GetResolution(device.document()) };
RangeOrOperator::evaluate(
range_or_operator,
query_value.map(|r| r.dppx()),
@@ -321,10 +286,7 @@ enum PrefersReducedMotion {
}
/// https://drafts.csswg.org/mediaqueries-5/#prefers-reduced-motion
-fn eval_prefers_reduced_motion(
- device: &Device,
- query_value: Option<PrefersReducedMotion>,
-) -> bool {
+fn eval_prefers_reduced_motion(device: &Device, query_value: Option<PrefersReducedMotion>) -> bool {
let prefers_reduced =
unsafe { bindings::Gecko_MediaFeatures_PrefersReducedMotion(device.document()) };
let query_value = match query_value {
@@ -352,9 +314,8 @@ fn eval_moz_is_resource_document(
query_value: Option<bool>,
_: Option<RangeOrOperator>,
) -> bool {
- let is_resource_doc = unsafe {
- bindings::Gecko_MediaFeatures_IsResourceDocument(device.document())
- };
+ let is_resource_doc =
+ unsafe { bindings::Gecko_MediaFeatures_IsResourceDocument(device.document()) };
query_value.map_or(is_resource_doc, |v| v == is_resource_doc)
}
@@ -397,37 +358,30 @@ fn eval_moz_os_version(
None => return false,
};
- let os_version = unsafe {
- bindings::Gecko_MediaFeatures_GetOperatingSystemVersion(device.document())
- };
+ let os_version =
+ unsafe { bindings::Gecko_MediaFeatures_GetOperatingSystemVersion(device.document()) };
query_value.as_ptr() == os_version
}
macro_rules! system_metric_feature {
- ($feature_name:expr) => {
- {
- fn __eval(
- device: &Device,
- query_value: Option<bool>,
- _: Option<RangeOrOperator>,
- ) -> bool {
- eval_system_metric(
- device,
- query_value,
- $feature_name,
- /* accessible_from_content = */ false,
- )
- }
-
- feature!(
+ ($feature_name:expr) => {{
+ fn __eval(device: &Device, query_value: Option<bool>, _: Option<RangeOrOperator>) -> bool {
+ eval_system_metric(
+ device,
+ query_value,
$feature_name,
- AllowsRanges::No,
- Evaluator::BoolInteger(__eval),
- ParsingRequirements::CHROME_AND_UA_ONLY,
+ /* accessible_from_content = */ false,
)
}
- }
+
+ feature!(
+ $feature_name,
+ AllowsRanges::No,
+ Evaluator::BoolInteger(__eval),
+ ParsingRequirements::CHROME_AND_UA_ONLY,
+ )
+ }};
}
lazy_static! {
diff --git a/components/style/gecko/media_queries.rs b/components/style/gecko/media_queries.rs
index c41bc4ffd73..ccf5b7a5180 100644
--- a/components/style/gecko/media_queries.rs
+++ b/components/style/gecko/media_queries.rs
@@ -126,7 +126,8 @@ impl Device {
/// Set the font size of the root element (for rem)
pub fn set_root_font_size(&self, size: Au) {
- self.root_font_size.store(size.0 as isize, Ordering::Relaxed)
+ self.root_font_size
+ .store(size.0 as isize, Ordering::Relaxed)
}
/// Sets the body text color for the "inherit color from body" quirk.
diff --git a/components/style/gecko/non_ts_pseudo_class_list.rs b/components/style/gecko/non_ts_pseudo_class_list.rs
index 04f57b73885..813250e4383 100644
--- a/components/style/gecko/non_ts_pseudo_class_list.rs
+++ b/components/style/gecko/non_ts_pseudo_class_list.rs
@@ -12,22 +12,13 @@
* Expected usage is as follows:
* ```
* macro_rules! pseudo_class_macro{
- * (bare: [$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*],
- * string: [$(($s_css:expr, $s_name:ident, $s_gecko_type:tt, $s_state:tt, $s_flags:tt),)*]) => {
- * keyword: [$(($k_css:expr, $k_name:ident, $k_gecko_type:tt, $k_state:tt, $k_flags:tt),)*]) => {
+ * ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => {
* // do stuff
* }
* }
* apply_non_ts_list!(pseudo_class_macro)
* ```
*
- * The `string` and `keyword` variables will be applied to pseudoclasses that are of the form of
- * functions with string or keyword arguments.
- *
- * Pending pseudo-classes:
- *
- * :scope -> <style scoped>, pending discussion.
- *
* $gecko_type can be either "_" or an ident in Gecko's CSSPseudoClassType.
* $state can be either "_" or an expression of type ElementState. If present,
* the semantics are that the pseudo-class matches if any of the bits in
@@ -39,7 +30,7 @@
macro_rules! apply_non_ts_list {
($apply_macro:ident) => {
$apply_macro! {
- bare: [
+ [
("-moz-table-border-nonzero", MozTableBorderNonzero, mozTableBorderNonzero, _, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
("-moz-browser-frame", MozBrowserFrame, mozBrowserFrame, _, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
("link", Link, link, IN_UNVISITED_STATE, _),
@@ -111,9 +102,6 @@ macro_rules! apply_non_ts_list {
("-moz-lwtheme-brighttext", MozLWThemeBrightText, mozLWThemeBrightText, _, _),
("-moz-lwtheme-darktext", MozLWThemeDarkText, mozLWThemeDarkText, _, _),
("-moz-window-inactive", MozWindowInactive, mozWindowInactive, _, _),
- ],
- string: [
- ("lang", Lang, lang, _, _),
]
}
}
diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs
index a08da8d40f1..70b0e112cee 100644
--- a/components/style/gecko/pseudo_element.rs
+++ b/components/style/gecko/pseudo_element.rs
@@ -14,6 +14,7 @@ use properties::{ComputedValues, PropertyFlags};
use properties::longhands::display::computed_value::T as Display;
use selector_parser::{NonTSPseudoClass, PseudoElementCascadeType, SelectorImpl};
use std::fmt;
+use str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
use string_cache::Atom;
use thin_slice::ThinBoxedSlice;
use values::serialize_atom_identifier;
@@ -61,7 +62,9 @@ impl PseudoElement {
///
/// This is used in Servo for anonymous boxes, though it's likely broken.
#[inline]
- pub fn inherits_all(&self) -> bool { false }
+ pub fn inherits_all(&self) -> bool {
+ false
+ }
/// Whether the pseudo-element should inherit from the default computed
/// values instead of from the parent element.
diff --git a/components/style/gecko/pseudo_element_definition.mako.rs b/components/style/gecko/pseudo_element_definition.mako.rs
index be0318eadea..7c45ee8bfb7 100644
--- a/components/style/gecko/pseudo_element_definition.mako.rs
+++ b/components/style/gecko/pseudo_element_definition.mako.rs
@@ -13,6 +13,9 @@ pub enum PseudoElement {
${pseudo.capitalized_pseudo()},
% endif
% endfor
+ /// ::-webkit-* that we don't recognize
+ /// https://github.com/whatwg/compat/issues/103
+ UnknownWebkit(Atom),
}
/// Important: If you change this, you should also update Gecko's
@@ -47,11 +50,12 @@ PseudoElement::${pseudo.capitalized_pseudo()}${"({})".format(tree_arg) if pseudo
impl PseudoElement {
/// Get the pseudo-element as an atom.
#[inline]
- pub fn atom(&self) -> Atom {
+ fn atom(&self) -> Atom {
match *self {
% for pseudo in PSEUDOS:
${pseudo_element_variant(pseudo)} => atom!("${pseudo.value}"),
% endfor
+ PseudoElement::UnknownWebkit(..) => unreachable!(),
}
}
@@ -62,6 +66,7 @@ impl PseudoElement {
% for i, pseudo in enumerate(PSEUDOS):
${pseudo_element_variant(pseudo)} => ${i},
% endfor
+ PseudoElement::UnknownWebkit(..) => unreachable!(),
}
}
@@ -105,6 +110,12 @@ impl PseudoElement {
}
}
+ /// Whether this pseudo-element is an unknown Webkit-prefixed pseudo-element.
+ #[inline]
+ pub fn is_unknown_webkit_pseudo_element(&self) -> bool {
+ matches!(*self, PseudoElement::UnknownWebkit(..))
+ }
+
/// Gets the flags associated to this pseudo-element, or 0 if it's an
/// anonymous box.
pub fn flags(&self) -> u32 {
@@ -123,6 +134,7 @@ impl PseudoElement {
structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_${pseudo.pseudo_ident},
% endif
% endfor
+ PseudoElement::UnknownWebkit(..) => 0,
}
}
@@ -143,7 +155,7 @@ impl PseudoElement {
/// Construct a `CSSPseudoElementType` from a pseudo-element
#[inline]
- pub fn pseudo_type(&self) -> CSSPseudoElementType {
+ fn pseudo_type(&self) -> CSSPseudoElementType {
use gecko_bindings::structs::CSSPseudoElementType_InheritingAnonBox;
match *self {
@@ -158,6 +170,7 @@ impl PseudoElement {
PseudoElement::${pseudo.capitalized_pseudo()} => CSSPseudoElementType::NonInheritingAnonBox,
% endif
% endfor
+ PseudoElement::UnknownWebkit(..) => unreachable!(),
}
}
@@ -242,11 +255,18 @@ impl PseudoElement {
return Some(PseudoElement::Placeholder);
}
_ => {
- // FIXME: -moz-tree check should probably be
- // ascii-case-insensitive.
- if name.starts_with("-moz-tree-") {
+ if starts_with_ignore_ascii_case(name, "-moz-tree-") {
return PseudoElement::tree_pseudo_element(name, Box::new([]))
}
+ if unsafe {
+ structs::StaticPrefs_sVarCache_layout_css_unknown_webkit_pseudo_element
+ } {
+ const WEBKIT_PREFIX: &str = "-webkit-";
+ if starts_with_ignore_ascii_case(name, WEBKIT_PREFIX) {
+ let part = string_as_ascii_lowercase(&name[WEBKIT_PREFIX.len()..]);
+ return Some(PseudoElement::UnknownWebkit(part.into()));
+ }
+ }
}
}
@@ -259,7 +279,7 @@ impl PseudoElement {
/// Returns `None` if the pseudo-element is not recognized.
#[inline]
pub fn tree_pseudo_element(name: &str, args: Box<[Atom]>) -> Option<Self> {
- debug_assert!(name.starts_with("-moz-tree-"));
+ debug_assert!(starts_with_ignore_ascii_case(name, "-moz-tree-"));
let tree_part = &name[10..];
% for pseudo in TREE_PSEUDOS:
if tree_part.eq_ignore_ascii_case("${pseudo.value[11:]}") {
@@ -277,6 +297,10 @@ impl ToCss for PseudoElement {
% for pseudo in PSEUDOS:
${pseudo_element_variant(pseudo)} => dest.write_str("${pseudo.value}")?,
% endfor
+ PseudoElement::UnknownWebkit(ref atom) => {
+ dest.write_str(":-webkit-")?;
+ serialize_atom_identifier(atom, dest)?;
+ }
}
if let Some(args) = self.tree_pseudo_args() {
if !args.is_empty() {
diff --git a/components/style/gecko/rules.rs b/components/style/gecko/rules.rs
index a57314a418c..233b1757ef5 100644
--- a/components/style/gecko/rules.rs
+++ b/components/style/gecko/rules.rs
@@ -88,7 +88,7 @@ macro_rules! descriptor_range_conversion {
None => {
nscssvalue.set_from(first);
return;
- }
+ },
Some(ref second) => second,
};
@@ -101,7 +101,7 @@ macro_rules! descriptor_range_conversion {
nscssvalue.set_pair(&a, &b);
}
}
- }
+ };
}
descriptor_range_conversion!(FontWeight);
@@ -120,7 +120,7 @@ impl<'a> ToNsCssValue for &'a FontStyle {
b.set_font_style(SpecifiedFontStyle::compute_angle(second).degrees());
nscssvalue.set_pair(&a, &b);
- }
+ },
}
}
}
diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs
index fa514835e8c..2365356f2f8 100644
--- a/components/style/gecko/selector_parser.rs
+++ b/components/style/gecko/selector_parser.rs
@@ -17,9 +17,11 @@ use selectors::parser::{SelectorParseErrorKind, Visit};
use selectors::parser::{self as selector_parser, Selector};
use selectors::visitor::SelectorVisitor;
use std::fmt;
+use str::starts_with_ignore_ascii_case;
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss as ToCss_};
use thin_slice::ThinBoxedSlice;
+use values::serialize_atom_identifier;
pub use gecko::pseudo_element::{PseudoElement, EAGER_PSEUDOS, EAGER_PSEUDO_COUNT, PSEUDO_COUNT};
pub use gecko::snapshot::SnapshotMap;
@@ -35,12 +37,11 @@ bitflags! {
}
}
-/// The type used for storing pseudo-class string arguments.
-pub type PseudoClassStringArg = ThinBoxedSlice<u16>;
+/// The type used to store the language argument to the `:lang` pseudo-class.
+pub type Lang = Atom;
macro_rules! pseudo_class_name {
- (bare: [$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*],
- string: [$(($s_css:expr, $s_name:ident, $s_gecko_type:tt, $s_state:tt, $s_flags:tt),)*]) => {
+ ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => {
/// Our representation of a non tree-structural pseudo-class.
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq)]
pub enum NonTSPseudoClass {
@@ -48,19 +49,17 @@ macro_rules! pseudo_class_name {
#[doc = $css]
$name,
)*
- $(
- #[doc = $s_css]
- $s_name(PseudoClassStringArg),
- )*
+ /// The `:lang` pseudo-class.
+ Lang(Lang),
/// The `:dir` pseudo-class.
- Dir(Box<Direction>),
+ Dir(Direction),
/// The non-standard `:-moz-any` pseudo-class.
///
/// TODO(emilio): We disallow combinators and pseudos here, so we
/// should use SimpleSelector instead
MozAny(ThinBoxedSlice<Selector<SelectorImpl>>),
/// The non-standard `:-moz-locale-dir` pseudo-class.
- MozLocaleDir(Box<Direction>),
+ MozLocaleDir(Direction),
}
}
}
@@ -71,25 +70,15 @@ impl ToCss for NonTSPseudoClass {
where
W: fmt::Write,
{
- use cssparser::CssStringWriter;
- use std::fmt::Write;
macro_rules! pseudo_class_serialize {
- (bare: [$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*],
- string: [$(($s_css:expr, $s_name:ident, $s_gecko_type:tt, $s_state:tt, $s_flags:tt),)*]) => {
+ ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => {
match *self {
$(NonTSPseudoClass::$name => concat!(":", $css),)*
- $(NonTSPseudoClass::$s_name(ref s) => {
- dest.write_str(concat!(":", $s_css, "("))?;
- {
- // FIXME(emilio): Avoid the extra allocation!
- let mut css = CssStringWriter::new(dest);
-
- // Discount the null char in the end from the
- // string.
- css.write_str(&String::from_utf16(&s[..s.len() - 1]).unwrap())?;
- }
- return dest.write_str(")")
- }, )*
+ NonTSPseudoClass::Lang(ref s) => {
+ dest.write_str(":lang(")?;
+ serialize_atom_identifier(s, dest)?;
+ return dest.write_char(')');
+ },
NonTSPseudoClass::MozLocaleDir(ref dir) => {
dest.write_str(":-moz-locale-dir(")?;
dir.to_css(&mut CssWriter::new(dest))?;
@@ -109,7 +98,7 @@ impl ToCss for NonTSPseudoClass {
dest.write_str(", ")?;
selector.to_css(dest)?;
}
- return dest.write_str(")")
+ return dest.write_char(')')
}
}
}
@@ -144,8 +133,7 @@ impl NonTSPseudoClass {
/// in a particular state.
pub fn parse_non_functional(name: &str) -> Option<Self> {
macro_rules! pseudo_class_parse {
- (bare: [$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*],
- string: [$(($s_css:expr, $s_name:ident, $s_gecko_type:tt, $s_state:tt, $s_flags:tt),)*]) => {
+ ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => {
match_ignore_ascii_case! { &name,
$($css => Some(NonTSPseudoClass::$name),)*
_ => None,
@@ -166,12 +154,11 @@ impl NonTSPseudoClass {
};
}
macro_rules! pseudo_class_check_is_enabled_in {
- (bare: [$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*],
- string: [$(($s_css:expr, $s_name:ident, $s_gecko_type:tt, $s_state:tt, $s_flags:tt),)*]) => {
+ ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => {
match *self {
$(NonTSPseudoClass::$name => check_flag!($flags),)*
- $(NonTSPseudoClass::$s_name(..) => check_flag!($s_flags),)*
NonTSPseudoClass::MozLocaleDir(_) |
+ NonTSPseudoClass::Lang(_) |
NonTSPseudoClass::Dir(_) |
NonTSPseudoClass::MozAny(_) => false,
}
@@ -194,9 +181,8 @@ impl NonTSPseudoClass {
},
// Otherwise, a pseudo-class is enabled in content when it
// doesn't have any enabled flag.
- _ => !self.has_any_flag(
- NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME,
- ),
+ _ => !self
+ .has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
}
}
@@ -221,13 +207,12 @@ impl NonTSPseudoClass {
};
}
macro_rules! pseudo_class_state {
- (bare: [$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*],
- string: [$(($s_css:expr, $s_name:ident, $s_gecko_type:tt, $s_state:tt, $s_flags:tt),)*]) => {
+ ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => {
match *self {
$(NonTSPseudoClass::$name => flag!($state),)*
- $(NonTSPseudoClass::$s_name(..) => flag!($s_state),)*
NonTSPseudoClass::Dir(..) |
NonTSPseudoClass::MozLocaleDir(..) |
+ NonTSPseudoClass::Lang(..) |
NonTSPseudoClass::MozAny(..) => ElementState::empty(),
}
}
@@ -247,8 +232,7 @@ impl NonTSPseudoClass {
/// Returns true if the given pseudoclass should trigger style sharing cache
/// revalidation.
pub fn needs_cache_revalidation(&self) -> bool {
- self.state_flag().is_empty() &&
- !matches!(*self,
+ self.state_flag().is_empty() && !matches!(*self,
// :-moz-any is handled by the revalidation visitor walking
// the things inside it; it does not need to cause
// revalidation on its own.
@@ -282,7 +266,8 @@ impl NonTSPseudoClass {
pub fn is_attr_based(&self) -> bool {
matches!(
*self,
- NonTSPseudoClass::MozTableBorderNonzero | NonTSPseudoClass::MozBrowserFrame |
+ NonTSPseudoClass::MozTableBorderNonzero |
+ NonTSPseudoClass::MozBrowserFrame |
NonTSPseudoClass::Lang(..)
)
}
@@ -398,42 +383,29 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
name: CowRcStr<'i>,
parser: &mut Parser<'i, 't>,
) -> Result<NonTSPseudoClass, ParseError<'i>> {
- macro_rules! pseudo_class_string_parse {
- (bare: [$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*],
- string: [$(($s_css:expr, $s_name:ident, $s_gecko_type:tt, $s_state:tt, $s_flags:tt),)*]) => {
- match_ignore_ascii_case! { &name,
- $($s_css => {
- let name = parser.expect_ident_or_string()?;
- // convert to null terminated utf16 string
- // since that's what Gecko deals with
- let utf16: Vec<u16> = name.encode_utf16().chain(Some(0u16)).collect();
- NonTSPseudoClass::$s_name(utf16.into_boxed_slice().into())
- }, )*
- "-moz-locale-dir" => {
- NonTSPseudoClass::MozLocaleDir(
- Box::new(Direction::parse(parser)?)
- )
- },
- "dir" => {
- NonTSPseudoClass::Dir(
- Box::new(Direction::parse(parser)?)
- )
- },
- "-moz-any" => {
- NonTSPseudoClass::MozAny(
- selector_parser::parse_compound_selector_list(
- self,
- parser,
- )?.into()
- )
- }
- _ => return Err(parser.new_custom_error(
- SelectorParseErrorKind::UnsupportedPseudoClassOrElement(name.clone())
- ))
- }
+ let pseudo_class = match_ignore_ascii_case! { &name,
+ "lang" => {
+ let name = parser.expect_ident_or_string()?;
+ NonTSPseudoClass::Lang(Atom::from(name.as_ref()))
+ },
+ "-moz-locale-dir" => {
+ NonTSPseudoClass::MozLocaleDir(Direction::parse(parser)?)
+ },
+ "dir" => {
+ NonTSPseudoClass::Dir(Direction::parse(parser)?)
+ },
+ "-moz-any" => {
+ NonTSPseudoClass::MozAny(
+ selector_parser::parse_compound_selector_list(
+ self,
+ parser,
+ )?.into()
+ )
}
- }
- let pseudo_class = apply_non_ts_list!(pseudo_class_string_parse);
+ _ => return Err(parser.new_custom_error(
+ SelectorParseErrorKind::UnsupportedPseudoClassOrElement(name.clone())
+ ))
+ };
if self.is_pseudo_class_enabled(&pseudo_class) {
Ok(pseudo_class)
} else {
@@ -468,8 +440,7 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
name: CowRcStr<'i>,
parser: &mut Parser<'i, 't>,
) -> Result<PseudoElement, ParseError<'i>> {
- // FIXME: -moz-tree check should probably be ascii-case-insensitive.
- if name.starts_with("-moz-tree-") {
+ if starts_with_ignore_ascii_case(&name, "-moz-tree-") {
// Tree pseudo-elements can have zero or more arguments, separated
// by either comma or space.
let mut args = Vec::new();
diff --git a/components/style/gecko/snapshot_helpers.rs b/components/style/gecko/snapshot_helpers.rs
index 6c40f242d5f..371a2b78da1 100644
--- a/components/style/gecko/snapshot_helpers.rs
+++ b/components/style/gecko/snapshot_helpers.rs
@@ -41,15 +41,26 @@ unsafe fn get_class_from_attr(attr: &structs::nsAttrValue) -> Class {
debug_assert_eq!(base_type, structs::nsAttrValue_ValueBaseType_eOtherBase);
let container = ptr::<structs::MiscContainer>(attr);
- debug_assert_eq!((*container).mType, structs::nsAttrValue_ValueType_eAtomArray);
- let array =
- (*container).__bindgen_anon_1.mValue.as_ref().__bindgen_anon_1.mAtomArray.as_ref();
+ debug_assert_eq!(
+ (*container).mType,
+ structs::nsAttrValue_ValueType_eAtomArray
+ );
+ let array = (*container)
+ .__bindgen_anon_1
+ .mValue
+ .as_ref()
+ .__bindgen_anon_1
+ .mAtomArray
+ .as_ref();
Class::More(&***array)
}
#[inline(always)]
unsafe fn get_id_from_attr(attr: &structs::nsAttrValue) -> &WeakAtom {
- debug_assert_eq!(base_type(attr), structs::nsAttrValue_ValueBaseType_eAtomBase);
+ debug_assert_eq!(
+ base_type(attr),
+ structs::nsAttrValue_ValueBaseType_eAtomBase
+ );
WeakAtom::new(ptr::<nsAtom>(attr))
}
@@ -59,7 +70,8 @@ pub fn find_attr<'a>(
attrs: &'a [structs::AttrArray_InternalAttr],
name: &Atom,
) -> Option<&'a structs::nsAttrValue> {
- attrs.iter()
+ attrs
+ .iter()
.find(|attr| attr.mName.mBits == name.as_ptr() as usize)
.map(|attr| &attr.mValue)
}
@@ -80,19 +92,17 @@ pub fn has_class(
) -> bool {
match unsafe { get_class_from_attr(attr) } {
Class::None => false,
- Class::One(atom) => unsafe {
- case_sensitivity.eq_atom(name, WeakAtom::new(atom))
+ Class::One(atom) => unsafe { case_sensitivity.eq_atom(name, WeakAtom::new(atom)) },
+ Class::More(atoms) => match case_sensitivity {
+ CaseSensitivity::CaseSensitive => {
+ atoms.iter().any(|atom| atom.mRawPtr == name.as_ptr())
+ },
+ CaseSensitivity::AsciiCaseInsensitive => unsafe {
+ atoms
+ .iter()
+ .any(|atom| WeakAtom::new(atom.mRawPtr).eq_ignore_ascii_case(name))
+ },
},
- Class::More(atoms) => {
- match case_sensitivity {
- CaseSensitivity::CaseSensitive => {
- atoms.iter().any(|atom| atom.mRawPtr == name.as_ptr())
- }
- CaseSensitivity::AsciiCaseInsensitive => unsafe {
- atoms.iter().any(|atom| WeakAtom::new(atom.mRawPtr).eq_ignore_ascii_case(name))
- }
- }
- }
}
}
@@ -111,7 +121,7 @@ where
for atom in atoms {
Atom::with(atom.mRawPtr, &mut callback)
}
- }
+ },
}
}
}
diff --git a/components/style/gecko/url.rs b/components/style/gecko/url.rs
index b94d2139764..8d785cae679 100644
--- a/components/style/gecko/url.rs
+++ b/components/style/gecko/url.rs
@@ -55,8 +55,7 @@ impl CssUrl {
/// Convert from URLValueData to SpecifiedUrl.
unsafe fn from_url_value_data(url: &URLValueData) -> Self {
- let arc_type =
- &url.mString as *const _ as *const RawOffsetArc<String>;
+ let arc_type = &url.mString as *const _ as *const RawOffsetArc<String>;
CssUrl {
serialization: Arc::from_raw_offset((*arc_type).clone()),
extra_data: UrlExtraData(url.mExtraData.to_safe()),
@@ -140,7 +139,6 @@ impl SpecifiedUrl {
}
}
-
impl PartialEq for SpecifiedUrl {
fn eq(&self, other: &Self) -> bool {
self.url.eq(&other.url)
@@ -255,10 +253,7 @@ impl ToComputedValue for SpecifiedImageUrl {
}
}
-fn serialize_computed_url<W>(
- url_value_data: &URLValueData,
- dest: &mut CssWriter<W>,
-) -> fmt::Result
+fn serialize_computed_url<W>(url_value_data: &URLValueData, dest: &mut CssWriter<W>) -> fmt::Result
where
W: Write,
{
@@ -281,7 +276,7 @@ pub struct ComputedUrl(pub SpecifiedUrl);
impl ToCss for ComputedUrl {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
where
- W: Write
+ W: Write,
{
serialize_computed_url(&self.0.url_value._base, dest)
}
@@ -302,7 +297,7 @@ pub struct ComputedImageUrl(pub SpecifiedImageUrl);
impl ToCss for ComputedImageUrl {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
where
- W: Write
+ W: Write,
{
serialize_computed_url(&self.0.image_value._base, dest)
}
diff --git a/components/style/gecko/values.rs b/components/style/gecko/values.rs
index 3bb22947211..fed9dc161c0 100644
--- a/components/style/gecko/values.rs
+++ b/components/style/gecko/values.rs
@@ -488,7 +488,9 @@ where
/// Convert a given RGBA value to `nscolor`.
pub fn convert_rgba_to_nscolor(rgba: &RGBA) -> u32 {
- ((rgba.alpha as u32) << 24) | ((rgba.blue as u32) << 16) | ((rgba.green as u32) << 8) |
+ ((rgba.alpha as u32) << 24) |
+ ((rgba.blue as u32) << 16) |
+ ((rgba.green as u32) << 8) |
(rgba.red as u32)
}
@@ -537,8 +539,7 @@ impl CounterStyleOrNone {
.map(|symbol| match *symbol {
Symbol::String(ref s) => nsCStr::from(s),
Symbol::Ident(_) => unreachable!("Should not have identifier in symbols()"),
- })
- .collect();
+ }).collect();
let symbols: Vec<_> = symbols
.iter()
.map(|symbol| symbol as &nsACString as *const _)
diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs
index 1ba850696d1..efe37e647c5 100644
--- a/components/style/gecko/wrapper.rs
+++ b/components/style/gecko/wrapper.rs
@@ -69,7 +69,7 @@ use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock};
use properties::animated_properties::{AnimationValue, AnimationValueMap};
use properties::style_structs::Font;
use rule_tree::CascadeLevel as ServoCascadeLevel;
-use selector_parser::{AttrValue, Direction, PseudoClassStringArg};
+use selector_parser::{AttrValue, HorizontalDirection, Lang};
use selectors::{Element, OpaqueElement};
use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator};
use selectors::attr::{CaseSensitivity, NamespaceConstraint};
@@ -86,7 +86,6 @@ use std::ptr;
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
use stylist::CascadeData;
-
#[inline]
fn elements_with_id<'a, 'le>(
array: *const structs::nsTArray<*mut RawGeckoElement>,
@@ -167,18 +166,16 @@ impl<'lr> TShadowRoot for GeckoShadowRoot<'lr> {
}
#[inline]
- fn style_data<'a>(&self) -> &'a CascadeData
+ fn style_data<'a>(&self) -> Option<&'a CascadeData>
where
Self: 'a,
{
- debug_assert!(!self.0.mServoStyles.mPtr.is_null());
-
let author_styles = unsafe {
- &*(self.0.mServoStyles.mPtr as *const structs::RawServoAuthorStyles
+ (self.0.mServoStyles.mPtr as *const structs::RawServoAuthorStyles
as *const bindings::RawServoAuthorStyles)
+ .as_ref()?
};
-
let author_styles = AuthorStyles::<GeckoStyleSheet>::from_ffi(author_styles);
debug_assert!(
@@ -187,7 +184,7 @@ impl<'lr> TShadowRoot for GeckoShadowRoot<'lr> {
author_styles.stylesheets.dirty()
);
- &author_styles.data
+ Some(&author_styles.data)
}
#[inline]
@@ -376,7 +373,8 @@ impl<'ln> TNode for GeckoNode<'ln> {
fn first_child(&self) -> Option<Self> {
unsafe {
self.0
- .mFirstChild.raw::<nsIContent>()
+ .mFirstChild
+ .raw::<nsIContent>()
.as_ref()
.map(GeckoNode::from_content)
}
@@ -396,7 +394,8 @@ impl<'ln> TNode for GeckoNode<'ln> {
fn next_sibling(&self) -> Option<Self> {
unsafe {
self.0
- .mNextSibling.raw::<nsIContent>()
+ .mNextSibling
+ .raw::<nsIContent>()
.as_ref()
.map(GeckoNode::from_content)
}
@@ -601,7 +600,7 @@ impl<'le> GeckoElement<'le> {
if self.is_svg_element() {
let svg_class = unsafe { bindings::Gecko_GetSVGAnimatedClass(self.0).as_ref() };
if let Some(c) = svg_class {
- return Some(c)
+ return Some(c);
}
}
@@ -673,8 +672,7 @@ impl<'le> GeckoElement<'le> {
// 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()
+ (e_slots as *const structs::FragmentOrElement_nsExtendedDOMSlots).as_ref()
})
}
@@ -720,9 +718,8 @@ impl<'le> GeckoElement<'le> {
.and_then(|n| n.as_element());
debug_assert!(
- binding_parent == unsafe {
- bindings::Gecko_GetBindingParent(self.0).map(GeckoElement)
- }
+ binding_parent ==
+ unsafe { bindings::Gecko_GetBindingParent(self.0).map(GeckoElement) }
);
binding_parent
}
@@ -731,8 +728,9 @@ impl<'le> GeckoElement<'le> {
#[inline]
fn non_xul_xbl_binding_parent_raw_content(&self) -> *mut nsIContent {
debug_assert!(!self.is_xul_element());
- self.extended_slots()
- .map_or(ptr::null_mut(), |slots| slots._base.mBindingParent.raw::<nsIContent>())
+ self.extended_slots().map_or(ptr::null_mut(), |slots| {
+ slots._base.mBindingParent.raw::<nsIContent>()
+ })
}
#[inline]
@@ -748,7 +746,8 @@ impl<'le> GeckoElement<'le> {
#[inline]
fn state_internal(&self) -> u64 {
- if !self.as_node()
+ if !self
+ .as_node()
.get_bool_flag(nsINode_BooleanFlag::ElementHasLockedStyleStates)
{
return self.0.mState.mStates;
@@ -879,9 +878,7 @@ impl<'le> GeckoElement<'le> {
return false;
}
match self.containing_shadow_host() {
- Some(e) => {
- e.is_svg_element() && e.local_name() == &*local_name!("use")
- },
+ Some(e) => e.is_svg_element() && e.local_name() == &*local_name!("use"),
None => false,
}
}
@@ -935,13 +932,12 @@ impl<'le> GeckoElement<'le> {
debug_assert_eq!(to.is_some(), from.is_some());
- combined_duration > 0.0f32 && from != to &&
- from.unwrap()
- .animate(
- to.as_ref().unwrap(),
- Procedure::Interpolate { progress: 0.5 },
- )
- .is_ok()
+ combined_duration > 0.0f32 && from != to && from
+ .unwrap()
+ .animate(
+ to.as_ref().unwrap(),
+ Procedure::Interpolate { progress: 0.5 },
+ ).is_ok()
}
}
@@ -981,7 +977,9 @@ fn get_animation_rule(
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::with_capacity_and_hasher(
- effect_count.min(ANIMATABLE_PROPERTY_COUNT), Default::default());
+ effect_count.min(ANIMATABLE_PROPERTY_COUNT),
+ Default::default(),
+ );
if unsafe {
Gecko_GetAnimationRule(
element.0,
@@ -1085,10 +1083,12 @@ impl<'le> TElement for GeckoElement<'le> {
fn inheritance_parent(&self) -> Option<Self> {
if self.implemented_pseudo_element().is_some() {
- return self.pseudo_element_originating_element()
+ return self.pseudo_element_originating_element();
}
- self.as_node().flattened_tree_parent().and_then(|n| n.as_element())
+ self.as_node()
+ .flattened_tree_parent()
+ .and_then(|n| n.as_element())
}
fn traversal_children(&self) -> LayoutIterator<GeckoChildrenIterator<'le>> {
@@ -1096,8 +1096,10 @@ impl<'le> TElement for GeckoElement<'le> {
// StyleChildrenIterator::IsNeeded does, except that it might return
// true if we used to (but no longer) have anonymous content from
// ::before/::after, XBL bindings, or nsIAnonymousContentCreators.
- if self.is_in_anonymous_subtree() || self.has_xbl_binding_with_content() ||
- self.is_html_slot_element() || self.shadow_root().is_some() ||
+ if self.is_in_anonymous_subtree() ||
+ self.has_xbl_binding_with_content() ||
+ self.is_html_slot_element() ||
+ self.shadow_root().is_some() ||
self.may_have_anonymous_children()
{
unsafe {
@@ -1158,17 +1160,16 @@ impl<'le> TElement for GeckoElement<'le> {
// Bug 1466580 tracks running the Android layout tests on automation.
//
// The actual bindgen bug still needs reduction.
- let assigned_nodes: &[structs::RefPtr<structs::nsINode>] =
- if !cfg!(target_os = "android") {
- debug_assert_eq!(
- unsafe { bindings::Gecko_GetAssignedNodes(self.0) },
- &slot.mAssignedNodes as *const _,
- );
+ let assigned_nodes: &[structs::RefPtr<structs::nsINode>] = if !cfg!(target_os = "android") {
+ debug_assert_eq!(
+ unsafe { bindings::Gecko_GetAssignedNodes(self.0) },
+ &slot.mAssignedNodes as *const _,
+ );
- &*slot.mAssignedNodes
- } else {
- unsafe { &**bindings::Gecko_GetAssignedNodes(self.0) }
- };
+ &*slot.mAssignedNodes
+ } else {
+ unsafe { &**bindings::Gecko_GetAssignedNodes(self.0) }
+ };
debug_assert_eq!(
mem::size_of::<structs::RefPtr<structs::nsINode>>(),
@@ -1240,11 +1241,10 @@ impl<'le> TElement for GeckoElement<'le> {
}
fn owner_doc_matches_for_testing(&self, device: &Device) -> bool {
- self.as_node().owner_doc().0 as *const structs::nsIDocument ==
- device
- .pres_context()
- .mDocument
- .raw::<structs::nsIDocument>()
+ self.as_node().owner_doc().0 as *const structs::nsIDocument == device
+ .pres_context()
+ .mDocument
+ .raw::<structs::nsIDocument>()
}
fn style_attribute(&self) -> Option<ArcBorrow<Locked<PropertyDeclarationBlock>>> {
@@ -1379,7 +1379,8 @@ impl<'le> TElement for GeckoElement<'le> {
self.unset_flags(
ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32 |
ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32 |
- NODE_DESCENDANTS_NEED_FRAMES as u32 | NODE_NEEDS_FRAME as u32,
+ NODE_DESCENDANTS_NEED_FRAMES as u32 |
+ NODE_NEEDS_FRAME as u32,
)
}
@@ -1439,8 +1440,10 @@ impl<'le> TElement for GeckoElement<'le> {
unsafe fn clear_data(&self) {
let ptr = self.0.mServoData.get();
self.unset_flags(
- ELEMENT_HAS_SNAPSHOT as u32 | ELEMENT_HANDLED_SNAPSHOT as u32 |
- structs::Element_kAllServoDescendantBits | NODE_NEEDS_FRAME as u32,
+ ELEMENT_HAS_SNAPSHOT as u32 |
+ ELEMENT_HANDLED_SNAPSHOT as u32 |
+ structs::Element_kAllServoDescendantBits |
+ NODE_NEEDS_FRAME as u32,
);
if !ptr.is_null() {
debug!("Dropping ElementData for {:?}", self);
@@ -1669,8 +1672,7 @@ impl<'le> TElement for GeckoElement<'le> {
let transition_property: TransitionProperty = property.into();
let mut property_check_helper = |property: LonghandId| -> bool {
- let property =
- property.to_physical(after_change_style.writing_mode);
+ let property = property.to_physical(after_change_style.writing_mode);
transitions_to_keep.insert(property);
self.needs_transitions_update_per_property(
property,
@@ -1682,8 +1684,7 @@ impl<'le> TElement for GeckoElement<'le> {
};
match transition_property {
- TransitionProperty::Custom(..) |
- TransitionProperty::Unsupported(..) => {},
+ TransitionProperty::Custom(..) | TransitionProperty::Unsupported(..) => {},
TransitionProperty::Shorthand(ref shorthand) => {
if shorthand.longhands().any(property_check_helper) {
return true;
@@ -1714,18 +1715,10 @@ impl<'le> TElement for GeckoElement<'le> {
}
}
- fn match_element_lang(
- &self,
- override_lang: Option<Option<AttrValue>>,
- value: &PseudoClassStringArg,
- ) -> bool {
+ fn match_element_lang(&self, override_lang: Option<Option<AttrValue>>, value: &Lang) -> bool {
// Gecko supports :lang() from CSS Selectors 3, which only accepts a
// single language tag, and which performs simple dash-prefix matching
// on it.
- debug_assert!(
- value.len() > 0 && value[value.len() - 1] == 0,
- "expected value to be null terminated"
- );
let override_lang_ptr = match &override_lang {
&Some(Some(ref atom)) => atom.as_ptr(),
_ => ptr::null_mut(),
@@ -1735,7 +1728,7 @@ impl<'le> TElement for GeckoElement<'le> {
self.0,
override_lang_ptr,
override_lang.is_some(),
- value.as_ptr(),
+ value.as_slice().as_ptr(),
)
}
}
@@ -1865,7 +1858,8 @@ impl<'le> TElement for GeckoElement<'le> {
));
}
- let active = self.state()
+ let active = self
+ .state()
.intersects(NonTSPseudoClass::Active.state_flag());
if active {
let declarations = unsafe { Gecko_GetActiveLinkAttrDeclarationBlock(self.0) };
@@ -2075,7 +2069,10 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
#[inline]
fn is_root(&self) -> bool {
- if self.as_node().get_bool_flag(nsINode_BooleanFlag::ParentIsContent) {
+ if self
+ .as_node()
+ .get_bool_flag(nsINode_BooleanFlag::ParentIsContent)
+ {
return false;
}
@@ -2083,12 +2080,17 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
return false;
}
- debug_assert!(self.as_node().parent_node().map_or(false, |p| p.is_document()));
+ debug_assert!(
+ self.as_node()
+ .parent_node()
+ .map_or(false, |p| p.is_document())
+ );
unsafe { bindings::Gecko_IsRootElement(self.0) }
}
fn is_empty(&self) -> bool {
- !self.as_node()
+ !self
+ .as_node()
.dom_children()
.any(|child| unsafe { Gecko_IsSignificantChild(child.0, true) })
}
@@ -2199,7 +2201,8 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
},
NonTSPseudoClass::MozOnlyWhitespace => {
flags_setter(self, ElementSelectorFlags::HAS_EMPTY_SELECTOR);
- if self.as_node()
+ if self
+ .as_node()
.dom_children()
.any(|c| c.contains_non_whitespace_content())
{
@@ -2238,24 +2241,20 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
NonTSPseudoClass::MozLocaleDir(ref dir) => {
let state_bit = DocumentState::NS_DOCUMENT_STATE_RTL_LOCALE;
if context.extra_data.document_state.intersects(state_bit) {
- // NOTE(emilio): We could still return false for
- // Direction::Other(..), but we don't bother.
+ // NOTE(emilio): We could still return false for values
+ // other than "ltr" and "rtl", but we don't bother.
return !context.in_negation();
}
let doc_is_rtl = self.document_state().contains(state_bit);
- match **dir {
- Direction::Ltr => !doc_is_rtl,
- Direction::Rtl => doc_is_rtl,
- Direction::Other(..) => false,
+ match dir.as_horizontal_direction() {
+ Some(HorizontalDirection::Ltr) => !doc_is_rtl,
+ Some(HorizontalDirection::Rtl) => doc_is_rtl,
+ None => false,
}
},
- NonTSPseudoClass::Dir(ref dir) => match **dir {
- Direction::Ltr => self.state().intersects(ElementState::IN_LTR_STATE),
- Direction::Rtl => self.state().intersects(ElementState::IN_RTL_STATE),
- Direction::Other(..) => false,
- },
+ NonTSPseudoClass::Dir(ref dir) => self.state().intersects(dir.element_state()),
}
}
diff --git a/components/style/gecko_bindings/mod.rs b/components/style/gecko_bindings/mod.rs
index eb3f0d220bf..166e2f66fd5 100644
--- a/components/style/gecko_bindings/mod.rs
+++ b/components/style/gecko_bindings/mod.rs
@@ -4,7 +4,12 @@
//! Gecko's C++ bindings, along with some rust helpers to ease its use.
-#[allow(dead_code, improper_ctypes, non_camel_case_types, missing_docs)]
+#[allow(
+ dead_code,
+ improper_ctypes,
+ non_camel_case_types,
+ missing_docs
+)]
pub mod bindings {
include!(concat!(env!("OUT_DIR"), "/gecko/bindings.rs"));
}
@@ -13,8 +18,14 @@ pub mod bindings {
// foreign structs to have `PhantomData`. We should remove this once the lint
// ignores this case.
-#[allow(dead_code, improper_ctypes, non_camel_case_types, non_snake_case, non_upper_case_globals,
- missing_docs)]
+#[allow(
+ dead_code,
+ improper_ctypes,
+ non_camel_case_types,
+ non_snake_case,
+ non_upper_case_globals,
+ missing_docs
+)]
pub mod structs {
include!(concat!(env!("OUT_DIR"), "/gecko/structs.rs"));
}
diff --git a/components/style/gecko_bindings/sugar/ns_style_coord.rs b/components/style/gecko_bindings/sugar/ns_style_coord.rs
index 3825c5520ec..bc3b195524d 100644
--- a/components/style/gecko_bindings/sugar/ns_style_coord.rs
+++ b/components/style/gecko_bindings/sugar/ns_style_coord.rs
@@ -52,7 +52,8 @@ impl nsStyleCoord_CalcValue {
impl PartialEq for nsStyleCoord_CalcValue {
fn eq(&self, other: &Self) -> bool {
- self.mLength == other.mLength && self.mPercent == other.mPercent &&
+ self.mLength == other.mLength &&
+ self.mPercent == other.mPercent &&
self.mHasPercent == other.mHasPercent
}
}
@@ -409,9 +410,12 @@ pub unsafe trait CoordData {
unsafe fn get_float(&self) -> f32 {
use gecko_bindings::structs::nsStyleUnit::*;
debug_assert!(
- self.unit() == eStyleUnit_Percent || self.unit() == eStyleUnit_Factor ||
- self.unit() == eStyleUnit_Degree || self.unit() == eStyleUnit_Grad ||
- self.unit() == eStyleUnit_Radian || self.unit() == eStyleUnit_Turn ||
+ self.unit() == eStyleUnit_Percent ||
+ self.unit() == eStyleUnit_Factor ||
+ self.unit() == eStyleUnit_Degree ||
+ self.unit() == eStyleUnit_Grad ||
+ self.unit() == eStyleUnit_Radian ||
+ self.unit() == eStyleUnit_Turn ||
self.unit() == eStyleUnit_FlexFraction
);
*self.union().mFloat.as_ref()
@@ -422,7 +426,8 @@ pub unsafe trait CoordData {
unsafe fn get_integer(&self) -> i32 {
use gecko_bindings::structs::nsStyleUnit::*;
debug_assert!(
- self.unit() == eStyleUnit_Coord || self.unit() == eStyleUnit_Integer ||
+ self.unit() == eStyleUnit_Coord ||
+ self.unit() == eStyleUnit_Integer ||
self.unit() == eStyleUnit_Enumerated
);
*self.union().mInt.as_ref()
diff --git a/components/style/gecko_bindings/sugar/ownership.rs b/components/style/gecko_bindings/sugar/ownership.rs
index 2bc85f53ff7..91c7a504eb1 100644
--- a/components/style/gecko_bindings/sugar/ownership.rs
+++ b/components/style/gecko_bindings/sugar/ownership.rs
@@ -305,6 +305,15 @@ pub struct OwnedOrNull<GeckoType> {
}
impl<GeckoType> OwnedOrNull<GeckoType> {
+ /// Returns a null pointer.
+ #[inline]
+ pub fn null() -> Self {
+ Self {
+ ptr: ptr::null_mut(),
+ _marker: PhantomData,
+ }
+ }
+
/// Returns whether this pointer is null.
#[inline]
pub fn is_null(&self) -> bool {
diff --git a/components/style/gecko_bindings/sugar/refptr.rs b/components/style/gecko_bindings/sugar/refptr.rs
index 6a32b81430e..835e77098c9 100644
--- a/components/style/gecko_bindings/sugar/refptr.rs
+++ b/components/style/gecko_bindings/sugar/refptr.rs
@@ -321,8 +321,4 @@ unsafe fn addref_atom(atom: *mut structs::nsAtom) {
unsafe fn release_atom(atom: *mut structs::nsAtom) {
let _ = Atom::from_addrefed(atom);
}
-impl_threadsafe_refcount!(
- structs::nsAtom,
- addref_atom,
- release_atom
-);
+impl_threadsafe_refcount!(structs::nsAtom, addref_atom, release_atom);
diff --git a/components/style/gecko_bindings/sugar/style_complex_color.rs b/components/style/gecko_bindings/sugar/style_complex_color.rs
index 90e93b72fd0..c2b3b1c6270 100644
--- a/components/style/gecko_bindings/sugar/style_complex_color.rs
+++ b/components/style/gecko_bindings/sugar/style_complex_color.rs
@@ -59,7 +59,7 @@ impl From<ComputedColor> for StyleComplexColor {
mFgRatio: ratios.fg,
mTag: Tag::eComplex,
}
- }
+ },
}
}
}
@@ -70,11 +70,11 @@ impl From<StyleComplexColor> for ComputedColor {
Tag::eNumeric => {
debug_assert!(other.mBgRatio == 1. && other.mFgRatio == 0.);
GenericColor::Numeric(convert_nscolor_to_rgba(other.mColor))
- }
+ },
Tag::eForeground => {
debug_assert!(other.mBgRatio == 0. && other.mFgRatio == 1.);
GenericColor::Foreground
- }
+ },
Tag::eComplex => {
debug_assert!(other.mBgRatio != 1. || other.mFgRatio != 0.);
debug_assert!(other.mBgRatio != 0. || other.mFgRatio != 1.);
@@ -85,7 +85,7 @@ impl From<StyleComplexColor> for ComputedColor {
fg: other.mFgRatio,
},
)
- }
+ },
Tag::eAuto => unreachable!("Unsupport StyleComplexColor with tag eAuto"),
}
}
diff --git a/components/style/invalidation/element/element_wrapper.rs b/components/style/invalidation/element/element_wrapper.rs
index cb4f79e92e1..cd1b1d13a25 100644
--- a/components/style/invalidation/element/element_wrapper.rs
+++ b/components/style/invalidation/element/element_wrapper.rs
@@ -46,7 +46,9 @@ pub trait ElementSnapshot: Sized {
/// Gets the attribute information of the snapshot as a string.
///
/// Only for debugging purposes.
- fn debug_list_attributes(&self) -> String { String::new() }
+ fn debug_list_attributes(&self) -> String {
+ String::new()
+ }
/// The ID attribute per this snapshot. Should only be called if
/// `has_attrs()` returns true.
@@ -188,8 +190,7 @@ where
// support we don't forget to update this code?
#[cfg(feature = "gecko")]
NonTSPseudoClass::Dir(ref dir) => {
- use invalidation::element::invalidation_map::dir_selector_to_state;
- let selector_flag = dir_selector_to_state(dir);
+ let selector_flag = dir.element_state();
if selector_flag.is_empty() {
// :dir() with some random argument; does not match.
return false;
@@ -234,7 +235,8 @@ where
// :lang() needs to match using the closest ancestor xml:lang="" or
// lang="" attribtue from snapshots.
NonTSPseudoClass::Lang(ref lang_arg) => {
- return self.element
+ return self
+ .element
.match_element_lang(Some(self.get_lang()), lang_arg);
},
@@ -243,12 +245,14 @@ where
let flag = pseudo_class.state_flag();
if flag.is_empty() {
- return self.element
+ return self
+ .element
.match_non_ts_pseudo_class(pseudo_class, context, &mut |_, _| {});
}
match self.snapshot().and_then(|s| s.state()) {
Some(snapshot_state) => snapshot_state.intersects(flag),
- None => self.element
+ None => self
+ .element
.match_non_ts_pseudo_class(pseudo_class, context, &mut |_, _| {}),
}
}
diff --git a/components/style/invalidation/element/invalidation_map.rs b/components/style/invalidation/element/invalidation_map.rs
index 67849d89627..038852a6dd4 100644
--- a/components/style/invalidation/element/invalidation_map.rs
+++ b/components/style/invalidation/element/invalidation_map.rs
@@ -10,8 +10,6 @@ use element_state::{DocumentState, ElementState};
use fallible::FallibleVec;
use hashglobe::FailedAllocationError;
use selector_map::{MaybeCaseInsensitiveHashMap, SelectorMap, SelectorMapEntry};
-#[cfg(feature = "gecko")]
-use selector_parser::Direction;
use selector_parser::SelectorImpl;
use selectors::attr::NamespaceConstraint;
use selectors::parser::{Combinator, Component};
@@ -19,20 +17,6 @@ use selectors::parser::{Selector, SelectorIter, Visit};
use selectors::visitor::SelectorVisitor;
use smallvec::SmallVec;
-#[cfg(feature = "gecko")]
-/// Gets the element state relevant to the given `:dir` pseudo-class selector.
-pub fn dir_selector_to_state(dir: &Direction) -> ElementState {
- match *dir {
- Direction::Ltr => ElementState::IN_LTR_STATE,
- Direction::Rtl => ElementState::IN_RTL_STATE,
- Direction::Other(_) => {
- // :dir(something-random) is a valid selector, but shouldn't
- // match anything.
- ElementState::empty()
- },
- }
-}
-
/// Mapping between (partial) CompoundSelectors (and the combinator to their
/// right) and the states and attributes they depend on.
///
@@ -54,8 +38,10 @@ pub fn dir_selector_to_state(dir: &Direction) -> ElementState {
#[derive(Clone, Debug, MallocSizeOf)]
pub struct Dependency {
/// The dependency selector.
- #[cfg_attr(feature = "gecko",
- ignore_malloc_size_of = "CssRules have primary refs, we measure there")]
+ #[cfg_attr(
+ feature = "gecko",
+ ignore_malloc_size_of = "CssRules have primary refs, we measure there"
+ )]
#[cfg_attr(feature = "servo", ignore_malloc_size_of = "Arc")]
pub selector: Selector<SelectorImpl>,
@@ -143,8 +129,10 @@ impl SelectorMapEntry for StateDependency {
pub struct DocumentStateDependency {
/// The selector that is affected. We don't need to track an offset, since
/// when it changes it changes for the whole document anyway.
- #[cfg_attr(feature = "gecko",
- ignore_malloc_size_of = "CssRules have primary refs, we measure there")]
+ #[cfg_attr(
+ feature = "gecko",
+ ignore_malloc_size_of = "CssRules have primary refs, we measure there"
+ )]
#[cfg_attr(feature = "servo", ignore_malloc_size_of = "Arc")]
pub selector: Selector<SelectorImpl>,
/// The state this dependency is affected by.
@@ -201,7 +189,8 @@ impl InvalidationMap {
/// Returns the number of dependencies stored in the invalidation map.
pub fn len(&self) -> usize {
- self.state_affecting_selectors.len() + self.document_state_selectors.len() +
+ self.state_affecting_selectors.len() +
+ self.document_state_selectors.len() +
self.other_attribute_affecting_selectors.len() +
self.id_to_selector
.iter()
@@ -382,7 +371,7 @@ impl<'a> SelectorVisitor for CompoundSelectorDependencyCollector<'a> {
self.other_attributes |= pc.is_attr_based();
self.state |= match *pc {
#[cfg(feature = "gecko")]
- NonTSPseudoClass::Dir(ref dir) => dir_selector_to_state(dir),
+ NonTSPseudoClass::Dir(ref dir) => dir.element_state(),
_ => pc.state_flag(),
};
*self.document_state |= pc.document_state_flag();
diff --git a/components/style/invalidation/element/restyle_hints.rs b/components/style/invalidation/element/restyle_hints.rs
index 4ac06c8b163..18e2f96470a 100644
--- a/components/style/invalidation/element/restyle_hints.rs
+++ b/components/style/invalidation/element/restyle_hints.rs
@@ -67,7 +67,8 @@ impl RestyleHint {
/// Returns whether we need to restyle this element.
pub fn has_non_animation_invalidations(&self) -> bool {
self.intersects(
- RestyleHint::RESTYLE_SELF | RestyleHint::RECASCADE_SELF |
+ RestyleHint::RESTYLE_SELF |
+ RestyleHint::RECASCADE_SELF |
(Self::replacements() & !Self::for_animations()),
)
}
@@ -119,7 +120,8 @@ impl RestyleHint {
/// The replacements for the animation cascade levels.
#[inline]
pub fn for_animations() -> Self {
- RestyleHint::RESTYLE_SMIL | RestyleHint::RESTYLE_CSS_ANIMATIONS |
+ RestyleHint::RESTYLE_SMIL |
+ RestyleHint::RESTYLE_CSS_ANIMATIONS |
RestyleHint::RESTYLE_CSS_TRANSITIONS
}
diff --git a/components/style/invalidation/element/state_and_attributes.rs b/components/style/invalidation/element/state_and_attributes.rs
index 1eb022b298a..bf259bb6f02 100644
--- a/components/style/invalidation/element/state_and_attributes.rs
+++ b/components/style/invalidation/element/state_and_attributes.rs
@@ -155,17 +155,11 @@ where
return false;
}
- // If we are sensitive to visitedness and the visited state changed, we
- // force a restyle here. Matching doesn't depend on the actual visited
- // state at all, so we can't look at matching results to decide what to
- // do for this case.
+ // If we the visited state changed, we force a restyle here. Matching
+ // doesn't depend on the actual visited state at all, so we can't look
+ // at matching results to decide what to do for this case.
if state_changes.intersects(ElementState::IN_VISITED_OR_UNVISITED_STATE) {
trace!(" > visitedness change, force subtree restyle");
- // If we get here with visited links disabled, we should probably
- // just avoid the restyle and remove the state change here, not only
- // as an optimization, but also because it kind of would kill the
- // point of disabling visited links.
- debug_assert!(self.shared_context.visited_styles_enabled);
// We can't just return here because there may also be attribute
// changes as well that imply additional hints for siblings.
self.data.hint.insert(RestyleHint::restyle_subtree());
@@ -206,17 +200,12 @@ where
debug!(" > state: {:?}", state_changes);
}
if snapshot.id_changed() {
- debug!(
- " > id changed: +{:?} -{:?}",
- id_added,
- id_removed
- );
+ debug!(" > id changed: +{:?} -{:?}", id_added, id_removed);
}
if snapshot.class_changed() {
debug!(
" > class changed: +{:?} -{:?}",
- classes_added,
- classes_removed
+ classes_added, classes_removed
);
}
if snapshot.other_attr_changed() {
@@ -239,7 +228,6 @@ where
shadow_rule_datas.push((data, quirks_mode, host.map(|h| h.opaque())))
});
-
let invalidated_self = {
let mut collector = Collector {
wrapper,
@@ -416,10 +404,7 @@ where
}
/// Check whether a dependency should be taken into account.
- fn check_dependency(
- &mut self,
- dependency: &Dependency,
- ) -> bool {
+ fn check_dependency(&mut self, dependency: &Dependency) -> bool {
let element = &self.element;
let wrapper = &self.wrapper;
let matches_now = matches_selector(
diff --git a/components/style/lib.rs b/components/style/lib.rs
index 1c3630b0986..57d507a4ab4 100644
--- a/components/style/lib.rs
+++ b/components/style/lib.rs
@@ -157,6 +157,7 @@ pub mod thread_state;
pub mod timer;
pub mod traversal;
pub mod traversal_flags;
+pub mod use_counters;
#[macro_use]
#[allow(non_camel_case_types)]
pub mod values;
@@ -199,7 +200,6 @@ pub mod gecko;
#[allow(unsafe_code)]
pub mod servo;
-
#[cfg(feature = "gecko")]
#[allow(unsafe_code, missing_docs)]
pub mod gecko_properties {
diff --git a/components/style/logical_geometry.rs b/components/style/logical_geometry.rs
index b345c2ad375..8c677c210bf 100644
--- a/components/style/logical_geometry.rs
+++ b/components/style/logical_geometry.rs
@@ -957,8 +957,10 @@ impl<T: Copy> LogicalMargin<T> {
impl<T: PartialEq + Zero> LogicalMargin<T> {
#[inline]
pub fn is_zero(&self) -> bool {
- self.block_start == Zero::zero() && self.inline_end == Zero::zero() &&
- self.block_end == Zero::zero() && self.inline_start == Zero::zero()
+ self.block_start == Zero::zero() &&
+ self.inline_end == Zero::zero() &&
+ self.block_end == Zero::zero() &&
+ self.inline_start == Zero::zero()
}
}
diff --git a/components/style/macros.rs b/components/style/macros.rs
index 671ba35b8bc..58889389336 100644
--- a/components/style/macros.rs
+++ b/components/style/macros.rs
@@ -68,9 +68,19 @@ macro_rules! try_match_ident_ignore_ascii_case {
macro_rules! define_keyword_type {
($name:ident, $css:expr) => {
#[allow(missing_docs)]
- #[derive(Animate, Clone, ComputeSquaredDistance, Copy, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero,
- ToComputedValue, ToCss)]
+ #[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+ )]
pub struct $name;
impl fmt::Debug for $name {
diff --git a/components/style/matching.rs b/components/style/matching.rs
index 6f239d361d8..922ecad9eb4 100644
--- a/components/style/matching.rs
+++ b/components/style/matching.rs
@@ -356,10 +356,9 @@ trait PrivateMatchMethods: TElement {
tasks.insert(UpdateAnimationsTasks::CSS_ANIMATIONS);
}
- let before_change_style = if self.might_need_transitions_update(
- old_values.as_ref().map(|s| &**s),
- new_values,
- ) {
+ let before_change_style = if self
+ .might_need_transitions_update(old_values.as_ref().map(|s| &**s), new_values)
+ {
let after_change_style = if self.has_css_transitions() {
self.after_change_style(context, new_values)
} else {
@@ -469,9 +468,11 @@ trait PrivateMatchMethods: TElement {
pseudo: Option<&PseudoElement>,
) -> ChildCascadeRequirement {
debug!("accumulate_damage_for: {:?}", self);
- debug_assert!(!shared_context
- .traversal_flags
- .contains(TraversalFlags::Forgetful));
+ debug_assert!(
+ !shared_context
+ .traversal_flags
+ .contains(TraversalFlags::Forgetful)
+ );
let difference = self.compute_style_difference(old_values, new_values, pseudo);
diff --git a/components/style/media_queries/media_condition.rs b/components/style/media_queries/media_condition.rs
index dbd677d0aee..78252db8c0b 100644
--- a/components/style/media_queries/media_condition.rs
+++ b/components/style/media_queries/media_condition.rs
@@ -53,12 +53,12 @@ impl ToCss for MediaCondition {
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)?;
@@ -69,7 +69,7 @@ impl ToCss for MediaCondition {
item.to_css(dest)?;
}
Ok(())
- }
+ },
}
}
}
@@ -104,14 +104,12 @@ impl MediaCondition {
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()))
- }
+ 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)))
+ return Ok(MediaCondition::Not(Box::new(inner_condition)));
}
// ParenthesisBlock.
@@ -162,7 +160,7 @@ impl MediaCondition {
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)))
+ return Ok(MediaCondition::InParens(Box::new(inner)));
}
let expr = MediaFeatureExpression::parse_in_parenthesis_block(context, input)?;
Ok(MediaCondition::Feature(expr))
@@ -178,14 +176,10 @@ impl MediaCondition {
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))
- }
+ 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_feature.rs b/components/style/media_queries/media_feature.rs
index 5a5bc88863e..771a11e8fbb 100644
--- a/components/style/media_queries/media_feature.rs
+++ b/components/style/media_queries/media_feature.rs
@@ -30,10 +30,9 @@ type MediaFeatureEvaluator<T> = fn(
pub type KeywordSerializer = fn(KeywordDiscriminant) -> String;
/// Parses a given identifier.
-pub type KeywordParser = for <'a, 'i, 't> fn(
- context: &'a ParserContext,
- input: &'a mut Parser<'i, 't>,
-) -> Result<KeywordDiscriminant, ParseError<'i>>;
+pub type KeywordParser =
+ for<'a, 'i, 't> fn(context: &'a ParserContext, input: &'a mut Parser<'i, 't>)
+ -> Result<KeywordDiscriminant, ParseError<'i>>;
/// An evaluator for a given media feature.
///
@@ -70,50 +69,49 @@ pub enum Evaluator {
/// asserts if that's not true. As of today there's nothing like that (does that
/// even make sense?).
macro_rules! keyword_evaluator {
- ($actual_evaluator:ident, $keyword_type:ty) => {
- {
- fn __parse<'i, 't>(
- context: &$crate::parser::ParserContext,
- input: &mut $crate::cssparser::Parser<'i, 't>,
- ) -> Result<
- $crate::media_queries::media_feature::KeywordDiscriminant,
- ::style_traits::ParseError<'i>,
- > {
- let kw = <$keyword_type as $crate::parser::Parse>::parse(context, input)?;
- Ok(kw as $crate::media_queries::media_feature::KeywordDiscriminant)
- }
-
- fn __serialize(kw: $crate::media_queries::media_feature::KeywordDiscriminant) -> String {
- // This unwrap is ok because the only discriminants that get
- // back to us is the ones that `parse` produces.
- let value: $keyword_type =
- ::num_traits::cast::FromPrimitive::from_u8(kw).unwrap();
- <$keyword_type as ::style_traits::ToCss>::to_css_string(&value)
- }
-
- fn __evaluate(
- device: &$crate::media_queries::Device,
- value: Option<$crate::media_queries::media_feature::KeywordDiscriminant>,
- range_or_operator: Option<$crate::media_queries::media_feature_expression::RangeOrOperator>,
- ) -> bool {
- debug_assert!(
- range_or_operator.is_none(),
- "Since when do keywords accept ranges?"
- );
- // This unwrap is ok because the only discriminants that get
- // back to us is the ones that `parse` produces.
- let value: Option<$keyword_type> =
- value.map(|kw| ::num_traits::cast::FromPrimitive::from_u8(kw).unwrap());
- $actual_evaluator(device, value)
- }
-
- $crate::media_queries::media_feature::Evaluator::Enumerated {
- parser: __parse,
- serializer: __serialize,
- evaluator: __evaluate,
- }
+ ($actual_evaluator:ident, $keyword_type:ty) => {{
+ fn __parse<'i, 't>(
+ context: &$crate::parser::ParserContext,
+ input: &mut $crate::cssparser::Parser<'i, 't>,
+ ) -> Result<
+ $crate::media_queries::media_feature::KeywordDiscriminant,
+ ::style_traits::ParseError<'i>,
+ > {
+ let kw = <$keyword_type as $crate::parser::Parse>::parse(context, input)?;
+ Ok(kw as $crate::media_queries::media_feature::KeywordDiscriminant)
}
- }
+
+ fn __serialize(kw: $crate::media_queries::media_feature::KeywordDiscriminant) -> String {
+ // This unwrap is ok because the only discriminants that get
+ // back to us is the ones that `parse` produces.
+ let value: $keyword_type = ::num_traits::cast::FromPrimitive::from_u8(kw).unwrap();
+ <$keyword_type as ::style_traits::ToCss>::to_css_string(&value)
+ }
+
+ fn __evaluate(
+ device: &$crate::media_queries::Device,
+ value: Option<$crate::media_queries::media_feature::KeywordDiscriminant>,
+ range_or_operator: Option<
+ $crate::media_queries::media_feature_expression::RangeOrOperator,
+ >,
+ ) -> bool {
+ debug_assert!(
+ range_or_operator.is_none(),
+ "Since when do keywords accept ranges?"
+ );
+ // This unwrap is ok because the only discriminants that get
+ // back to us is the ones that `parse` produces.
+ let value: Option<$keyword_type> =
+ value.map(|kw| ::num_traits::cast::FromPrimitive::from_u8(kw).unwrap());
+ $actual_evaluator(device, value)
+ }
+
+ $crate::media_queries::media_feature::Evaluator::Enumerated {
+ parser: __parse,
+ serializer: __serialize,
+ evaluator: __evaluate,
+ }
+ }};
}
bitflags! {
@@ -169,7 +167,7 @@ macro_rules! feature {
evaluator: $evaluator,
requirements: $reqs,
}
- }
+ };
}
impl fmt::Debug for MediaFeatureDescription {
diff --git a/components/style/media_queries/media_feature_expression.rs b/components/style/media_queries/media_feature_expression.rs
index f07b8cc27e4..64406218e88 100644
--- a/components/style/media_queries/media_feature_expression.rs
+++ b/components/style/media_queries/media_feature_expression.rs
@@ -102,13 +102,9 @@ pub enum RangeOrOperator {
impl RangeOrOperator {
/// Evaluate a given range given an optional query value and a value from
/// the browser.
- pub fn evaluate<T>(
- range_or_op: Option<Self>,
- query_value: Option<T>,
- value: T,
- ) -> bool
+ pub fn evaluate<T>(range_or_op: Option<Self>, query_value: Option<T>, value: T) -> bool
where
- T: PartialOrd + Zero
+ T: PartialOrd + Zero,
{
match query_value {
Some(v) => Self::evaluate_with_query_value(range_or_op, v, value),
@@ -118,11 +114,7 @@ impl RangeOrOperator {
/// Evaluate a given range given a non-optional query value and a value from
/// the browser.
- pub fn evaluate_with_query_value<T>(
- range_or_op: Option<Self>,
- query_value: T,
- value: T,
- ) -> bool
+ pub fn evaluate_with_query_value<T>(range_or_op: Option<Self>, query_value: T, value: T) -> bool
where
T: PartialOrd,
{
@@ -142,20 +134,14 @@ impl RangeOrOperator {
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
- }
- }
- }
+ },
+ 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,
+ },
}
}
}
@@ -172,8 +158,8 @@ pub struct MediaFeatureExpression {
impl PartialEq for MediaFeatureExpression {
fn eq(&self, other: &Self) -> bool {
self.feature as *const _ == other.feature as *const _ &&
- self.value == other.value &&
- self.range_or_operator == other.range_or_operator
+ self.value == other.value &&
+ self.range_or_operator == other.range_or_operator
}
}
@@ -184,7 +170,11 @@ impl ToCss for MediaFeatureExpression {
{
dest.write_str("(")?;
- if self.feature.requirements.contains(ParsingRequirements::WEBKIT_PREFIX) {
+ if self
+ .feature
+ .requirements
+ .contains(ParsingRequirements::WEBKIT_PREFIX)
+ {
dest.write_str("-webkit-")?;
}
@@ -215,9 +205,7 @@ impl ToCss for MediaFeatureExpression {
}
/// Consumes an operation or a colon, or returns an error.
-fn consume_operation_or_colon(
- input: &mut Parser,
-) -> Result<Option<Operator>, ()> {
+fn consume_operation_or_colon(input: &mut Parser) -> Result<Option<Operator>, ()> {
let first_delim = {
let next_token = match input.next() {
Ok(t) => t,
@@ -238,14 +226,14 @@ fn consume_operation_or_colon(
} else {
Operator::GreaterThan
}
- }
+ },
'<' => {
if input.try(|i| i.expect_delim('=')).is_ok() {
Operator::LessThanEqual
} else {
Operator::LessThan
}
- }
+ },
_ => return Err(()),
}))
}
@@ -256,7 +244,11 @@ impl MediaFeatureExpression {
value: Option<MediaExpressionValue>,
range_or_operator: Option<RangeOrOperator>,
) -> Self {
- Self { feature, value, range_or_operator }
+ Self {
+ feature,
+ value,
+ range_or_operator,
+ }
}
/// Parse a media expression of the form:
@@ -269,9 +261,7 @@ impl MediaFeatureExpression {
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
input.expect_parenthesis_block()?;
- input.parse_nested_block(|input| {
- Self::parse_in_parenthesis_block(context, input)
- })
+ input.parse_nested_block(|input| Self::parse_in_parenthesis_block(context, input))
}
/// Parse a media feature expression where we've already consumed the
@@ -294,9 +284,7 @@ impl MediaFeatureExpression {
let mut requirements = ParsingRequirements::empty();
- if context.chrome_rules_enabled() ||
- context.stylesheet_origin == Origin::UserAgent
- {
+ if context.chrome_rules_enabled() || context.stylesheet_origin == Origin::UserAgent {
requirements.insert(ParsingRequirements::CHROME_AND_UA_ONLY);
}
@@ -313,7 +301,9 @@ impl MediaFeatureExpression {
if unsafe {
structs::StaticPrefs_sVarCache_layout_css_prefixes_device_pixel_ratio_webkit
} {
- requirements.insert(ParsingRequirements::WEBKIT_DEVICE_PIXEL_RATIO_PREF_ENABLED);
+ requirements.insert(
+ ParsingRequirements::WEBKIT_DEVICE_PIXEL_RATIO_PREF_ENABLED,
+ );
}
}
}
@@ -370,45 +360,41 @@ impl MediaFeatureExpression {
// 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
- ));
+ return Err(
+ input.new_custom_error(StyleParseErrorKind::RangedExpressionWithNoValue)
+ );
}
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
- ));
+ return Err(
+ input.new_custom_error(StyleParseErrorKind::MediaQueryUnexpectedOperator)
+ );
}
Some(RangeOrOperator::Range(range))
- }
- None => {
- match operator {
- Some(operator) => {
- if !feature.allows_ranges() {
- return Err(input.new_custom_error(
- StyleParseErrorKind::MediaQueryUnexpectedOperator
- ));
- }
- Some(RangeOrOperator::Operator(operator))
+ },
+ None => match operator {
+ Some(operator) => {
+ if !feature.allows_ranges() {
+ return Err(input
+ .new_custom_error(StyleParseErrorKind::MediaQueryUnexpectedOperator));
}
- None => None,
- }
- }
+ Some(RangeOrOperator::Operator(operator))
+ },
+ None => None,
+ },
};
- let value =
- MediaExpressionValue::parse(feature, context, input).map_err(|err| {
- err.location
- .new_custom_error(StyleParseErrorKind::MediaQueryExpectedFeatureValue)
- })?;
+ let value = MediaExpressionValue::parse(feature, context, input).map_err(|err| {
+ err.location
+ .new_custom_error(StyleParseErrorKind::MediaQueryExpectedFeatureValue)
+ })?;
Ok(Self::new(feature, Some(value), range_or_operator))
}
@@ -419,13 +405,11 @@ impl MediaFeatureExpression {
macro_rules! expect {
($variant:ident) => {
- value.map(|value| {
- match *value {
- MediaExpressionValue::$variant(ref v) => v,
- _ => unreachable!("Unexpected MediaExpressionValue"),
- }
+ value.map(|value| match *value {
+ MediaExpressionValue::$variant(ref v) => v,
+ _ => unreachable!("Unexpected MediaExpressionValue"),
})
- }
+ };
}
match self.feature.evaluator {
@@ -436,13 +420,11 @@ impl MediaFeatureExpression {
})
});
eval(device, computed, self.range_or_operator)
- }
+ },
Evaluator::Integer(eval) => {
eval(device, expect!(Integer).cloned(), self.range_or_operator)
- }
- Evaluator::Float(eval) => {
- eval(device, expect!(Float).cloned(), self.range_or_operator)
- }
+ },
+ Evaluator::Float(eval) => eval(device, expect!(Float).cloned(), self.range_or_operator),
Evaluator::IntRatio(eval) => {
eval(device, expect!(IntRatio).cloned(), self.range_or_operator)
},
@@ -453,20 +435,16 @@ impl MediaFeatureExpression {
})
});
eval(device, computed, self.range_or_operator)
- }
+ },
Evaluator::Enumerated { evaluator, .. } => {
- evaluator(
- device,
- expect!(Enumerated).cloned(),
- self.range_or_operator,
- )
- }
- Evaluator::Ident(eval) => {
- eval(device, expect!(Ident).cloned(), self.range_or_operator)
- }
- Evaluator::BoolInteger(eval) => {
- eval(device, expect!(BoolInteger).cloned(), self.range_or_operator)
- }
+ evaluator(device, expect!(Enumerated).cloned(), self.range_or_operator)
+ },
+ Evaluator::Ident(eval) => eval(device, expect!(Ident).cloned(), self.range_or_operator),
+ Evaluator::BoolInteger(eval) => eval(
+ device,
+ expect!(BoolInteger).cloned(),
+ self.range_or_operator,
+ ),
}
}
}
@@ -502,11 +480,7 @@ pub enum MediaExpressionValue {
}
impl MediaExpressionValue {
- fn to_css<W>(
- &self,
- dest: &mut CssWriter<W>,
- for_expr: &MediaFeatureExpression,
- ) -> fmt::Result
+ fn to_css<W>(&self, dest: &mut CssWriter<W>, for_expr: &MediaFeatureExpression) -> fmt::Result
where
W: fmt::Write,
{
@@ -515,18 +489,12 @@ impl MediaExpressionValue {
MediaExpressionValue::Integer(v) => v.to_css(dest),
MediaExpressionValue::Float(v) => v.to_css(dest),
MediaExpressionValue::BoolInteger(v) => dest.write_str(if v { "1" } else { "0" }),
- MediaExpressionValue::IntRatio(ratio) => {
- ratio.to_css(dest)
- },
+ MediaExpressionValue::IntRatio(ratio) => ratio.to_css(dest),
MediaExpressionValue::Resolution(ref r) => r.to_css(dest),
MediaExpressionValue::Ident(ref ident) => serialize_atom_identifier(ident, dest),
- MediaExpressionValue::Enumerated(value) => {
- match for_expr.feature.evaluator {
- Evaluator::Enumerated { serializer, .. } => {
- dest.write_str(&*serializer(value))
- }
- _ => unreachable!(),
- }
+ MediaExpressionValue::Enumerated(value) => match for_expr.feature.evaluator {
+ Evaluator::Enumerated { serializer, .. } => dest.write_str(&*serializer(value)),
+ _ => unreachable!(),
},
}
}
@@ -540,11 +508,11 @@ impl MediaExpressionValue {
Evaluator::Length(..) => {
let length = Length::parse_non_negative(context, input)?;
MediaExpressionValue::Length(length)
- }
+ },
Evaluator::Integer(..) => {
let integer = Integer::parse_non_negative(context, input)?;
MediaExpressionValue::Integer(integer.value() as u32)
- }
+ },
Evaluator::BoolInteger(..) => {
let integer = Integer::parse_non_negative(context, input)?;
let value = integer.value();
@@ -552,29 +520,26 @@ impl MediaExpressionValue {
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
}
MediaExpressionValue::BoolInteger(value == 1)
- }
+ },
Evaluator::Float(..) => {
let number = Number::parse(context, input)?;
MediaExpressionValue::Float(number.get())
- }
+ },
Evaluator::IntRatio(..) => {
let a = Integer::parse_positive(context, input)?;
input.expect_delim('/')?;
let b = Integer::parse_positive(context, input)?;
- MediaExpressionValue::IntRatio(AspectRatio(
- a.value() as u32,
- b.value() as u32
- ))
- }
+ MediaExpressionValue::IntRatio(AspectRatio(a.value() as u32, b.value() as u32))
+ },
Evaluator::Resolution(..) => {
MediaExpressionValue::Resolution(Resolution::parse(context, input)?)
- }
+ },
Evaluator::Enumerated { parser, .. } => {
MediaExpressionValue::Enumerated(parser(context, input)?)
- }
+ },
Evaluator::Ident(..) => {
MediaExpressionValue::Ident(Atom::from(input.expect_ident()?.as_ref()))
- }
+ },
})
}
}
diff --git a/components/style/media_queries/media_list.rs b/components/style/media_queries/media_list.rs
index f8d15df7257..168671288cf 100644
--- a/components/style/media_queries/media_list.rs
+++ b/components/style/media_queries/media_list.rs
@@ -30,10 +30,7 @@ impl MediaList {
/// "not all", see:
///
/// <https://drafts.csswg.org/mediaqueries/#error-handling>
- pub fn parse(
- context: &ParserContext,
- input: &mut Parser,
- ) -> Self {
+ pub fn parse(context: &ParserContext, input: &mut Parser) -> Self {
if input.is_exhausted() {
return Self::empty();
}
@@ -48,8 +45,10 @@ impl MediaList {
Err(err) => {
media_queries.push(MediaQuery::never_matching());
let location = err.location;
- let error =
- ContextualParseError::InvalidMediaRule(input.slice_from(start_position), err);
+ let error = ContextualParseError::InvalidMediaRule(
+ input.slice_from(start_position),
+ err,
+ );
context.log_css_error(location, error);
},
}
@@ -79,8 +78,10 @@ impl MediaList {
let media_match = mq.media_type.matches(device.media_type());
// Check if the media condition match.
- let query_match = media_match &&
- mq.condition.as_ref().map_or(true, |c| c.matches(device, quirks_mode));
+ let query_match = media_match && 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 089fc9412b2..46c35618b22 100644
--- a/components/style/media_queries/media_query.rs
+++ b/components/style/media_queries/media_query.rs
@@ -15,7 +15,6 @@ 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 {
@@ -125,12 +124,13 @@ impl MediaQuery {
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> 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 (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)?)
@@ -141,7 +141,11 @@ impl MediaQuery {
};
let media_type = explicit_media_type.unwrap_or(MediaQueryType::All);
- Ok(Self { qualifier, media_type, condition })
+ Ok(Self {
+ qualifier,
+ media_type,
+ condition,
+ })
}
}
diff --git a/components/style/parser.rs b/components/style/parser.rs
index a4b7d816203..2d667f3f343 100644
--- a/components/style/parser.rs
+++ b/components/style/parser.rs
@@ -9,6 +9,7 @@ use cssparser::{Parser, SourceLocation, UnicodeRange};
use error_reporting::{ContextualParseError, ParseErrorReporter};
use style_traits::{OneOrMoreSeparated, ParseError, ParsingMode, Separator};
use stylesheets::{CssRuleType, Namespaces, Origin, UrlExtraData};
+use use_counters::UseCounters;
/// Asserts that all ParsingMode flags have a matching ParsingMode value in gecko.
#[cfg(feature = "gecko")]
@@ -53,6 +54,8 @@ pub struct ParserContext<'a> {
error_reporter: Option<&'a ParseErrorReporter>,
/// The currently active namespaces.
pub namespaces: Option<&'a Namespaces>,
+ /// The use counters we want to record while parsing style rules, if any.
+ pub use_counters: Option<&'a UseCounters>,
}
impl<'a> ParserContext<'a> {
@@ -65,8 +68,9 @@ impl<'a> ParserContext<'a> {
parsing_mode: ParsingMode,
quirks_mode: QuirksMode,
error_reporter: Option<&'a ParseErrorReporter>,
+ use_counters: Option<&'a UseCounters>,
) -> Self {
- ParserContext {
+ Self {
stylesheet_origin,
url_data,
rule_type,
@@ -74,6 +78,7 @@ impl<'a> ParserContext<'a> {
quirks_mode,
error_reporter,
namespaces: None,
+ use_counters,
}
}
@@ -85,6 +90,7 @@ impl<'a> ParserContext<'a> {
parsing_mode: ParsingMode,
quirks_mode: QuirksMode,
error_reporter: Option<&'a ParseErrorReporter>,
+ use_counters: Option<&'a UseCounters>,
) -> Self {
Self::new(
Origin::Author,
@@ -93,17 +99,19 @@ impl<'a> ParserContext<'a> {
parsing_mode,
quirks_mode,
error_reporter,
+ use_counters,
)
}
- /// Create a parser context based on a previous context, but with a modified rule type.
+ /// Create a parser context based on a previous context, but with a modified
+ /// rule type.
#[inline]
pub fn new_with_rule_type(
context: &'a ParserContext,
rule_type: CssRuleType,
namespaces: &'a Namespaces,
) -> ParserContext<'a> {
- ParserContext {
+ Self {
stylesheet_origin: context.stylesheet_origin,
url_data: context.url_data,
rule_type: Some(rule_type),
@@ -111,6 +119,7 @@ impl<'a> ParserContext<'a> {
quirks_mode: context.quirks_mode,
namespaces: Some(namespaces),
error_reporter: context.error_reporter,
+ use_counters: context.use_counters,
}
}
@@ -128,11 +137,7 @@ impl<'a> ParserContext<'a> {
}
/// Record a CSS parse error with this context’s error reporting.
- pub fn log_css_error(
- &self,
- location: SourceLocation,
- error: ContextualParseError,
- ) {
+ pub fn log_css_error(&self, location: SourceLocation, error: ContextualParseError) {
let error_reporter = match self.error_reporter {
Some(r) => r,
None => return,
diff --git a/components/style/properties/declaration_block.rs b/components/style/properties/declaration_block.rs
index ad5aa75e8f2..56aa2fde4f4 100644
--- a/components/style/properties/declaration_block.rs
+++ b/components/style/properties/declaration_block.rs
@@ -138,56 +138,9 @@ impl<'a> DoubleEndedIterator for DeclarationImportanceIterator<'a> {
}
}
-/// Iterator over `PropertyDeclaration` for Importance::Normal.
-///
-/// TODO(emilio): This should be replaced by `impl Trait`, returning a
-/// filter()ed iterator when available instead, and all the boilerplate below
-/// should go.
-pub struct NormalDeclarationIterator<'a>(DeclarationImportanceIterator<'a>);
-
-impl<'a> NormalDeclarationIterator<'a> {
- #[inline]
- fn new(declarations: &'a [PropertyDeclaration], important: &'a SmallBitVec) -> Self {
- NormalDeclarationIterator(
- DeclarationImportanceIterator::new(declarations, important)
- )
- }
-}
-
-impl<'a> Iterator for NormalDeclarationIterator<'a> {
- type Item = &'a PropertyDeclaration;
-
- #[inline]
- fn next(&mut self) -> Option<Self::Item> {
- loop {
- let (decl, importance) = self.0.iter.next()?;
- if !importance {
- return Some(decl);
- }
- }
- }
-
- #[inline]
- fn size_hint(&self) -> (usize, Option<usize>) {
- self.0.iter.size_hint()
- }
-}
-
-impl<'a> DoubleEndedIterator for NormalDeclarationIterator<'a> {
- #[inline]
- fn next_back(&mut self) -> Option<Self::Item> {
- loop {
- let (decl, importance) = self.0.iter.next_back()?;
- if !importance {
- return Some(decl);
- }
- }
- }
-}
-
/// Iterator for AnimationValue to be generated from PropertyDeclarationBlock.
pub struct AnimationValueIterator<'a, 'cx, 'cx_a:'cx> {
- iter: NormalDeclarationIterator<'a>,
+ iter: DeclarationImportanceIterator<'a>,
context: &'cx mut Context<'cx_a>,
default_values: &'a ComputedValues,
/// Custom properties in a keyframe if exists.
@@ -202,7 +155,7 @@ impl<'a, 'cx, 'cx_a:'cx> AnimationValueIterator<'a, 'cx, 'cx_a> {
extra_custom_properties: Option<&'a Arc<::custom_properties::CustomPropertiesMap>>,
) -> AnimationValueIterator<'a, 'cx, 'cx_a> {
AnimationValueIterator {
- iter: declarations.normal_declaration_iter(),
+ iter: declarations.declaration_importance_iter(),
context,
default_values,
extra_custom_properties,
@@ -215,7 +168,11 @@ impl<'a, 'cx, 'cx_a:'cx> Iterator for AnimationValueIterator<'a, 'cx, 'cx_a> {
#[inline]
fn next(&mut self) -> Option<Self::Item> {
loop {
- let decl = self.iter.next()?;
+ let (decl, importance) = self.iter.next()?;
+
+ if importance.important() {
+ continue;
+ }
let animation = AnimationValue::from_declaration(
decl,
@@ -287,8 +244,12 @@ impl PropertyDeclarationBlock {
/// Iterate over `PropertyDeclaration` for Importance::Normal
#[inline]
- pub fn normal_declaration_iter(&self) -> NormalDeclarationIterator {
- NormalDeclarationIterator::new(&self.declarations, &self.declarations_importance)
+ pub fn normal_declaration_iter<'a>(
+ &'a self,
+ ) -> impl DoubleEndedIterator<Item = &'a PropertyDeclaration> {
+ self.declaration_importance_iter()
+ .filter(|(_, importance)| !importance.important())
+ .map(|(declaration, _)| declaration)
}
/// Return an iterator of (AnimatableLonghand, AnimationValue).
@@ -344,14 +305,8 @@ impl PropertyDeclarationBlock {
}
}
- self.declarations.iter().enumerate().find(|&(_, decl)| decl.id() == property).map(|(i, decl)| {
- let importance = if self.declarations_importance[i] {
- Importance::Important
- } else {
- Importance::Normal
- };
- (decl, importance)
- })
+ self.declaration_importance_iter()
+ .find(|(declaration, _)| declaration.id() == property)
}
fn shorthand_to_css(
@@ -1248,6 +1203,7 @@ pub fn parse_style_attribute(
ParsingMode::DEFAULT,
quirks_mode,
error_reporter,
+ None,
);
let mut input = ParserInput::new(input);
@@ -1275,6 +1231,7 @@ pub fn parse_one_declaration_into(
parsing_mode,
quirks_mode,
error_reporter,
+ None,
);
let mut input = ParserInput::new(input);
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs
index 33a66498b2d..9e9a6835a42 100644
--- a/components/style/properties/gecko.mako.rs
+++ b/components/style/properties/gecko.mako.rs
@@ -3053,7 +3053,7 @@ fn static_assert() {
scroll-snap-points-x scroll-snap-points-y
scroll-snap-type-x scroll-snap-type-y scroll-snap-coordinate
perspective-origin -moz-binding will-change
- overscroll-behavior-x overscroll-behavior-y
+ offset-path overscroll-behavior-x overscroll-behavior-y
overflow-clip-box-inline overflow-clip-box-block
perspective-origin -moz-binding will-change
shape-outside contain touch-action translate
@@ -3681,6 +3681,40 @@ fn static_assert() {
${impl_simple_copy("contain", "mContain")}
${impl_simple_type_with_conversion("touch_action")}
+
+ pub fn set_offset_path(&mut self, v: longhands::offset_path::computed_value::T) {
+ use gecko_bindings::bindings::{Gecko_NewStyleMotion, Gecko_SetStyleMotion};
+ use gecko_bindings::structs::StyleShapeSourceType;
+ use values::generics::basic_shape::FillRule;
+ use values::specified::OffsetPath;
+
+ let motion = unsafe { Gecko_NewStyleMotion().as_mut().unwrap() };
+ match v {
+ OffsetPath::None => motion.mOffsetPath.mType = StyleShapeSourceType::None,
+ OffsetPath::Path(p) => {
+ set_style_svg_path(&mut motion.mOffsetPath, &p, FillRule::Nonzero)
+ },
+ }
+ unsafe { Gecko_SetStyleMotion(&mut self.gecko.mMotion, motion) };
+ }
+
+ pub fn clone_offset_path(&self) -> longhands::offset_path::computed_value::T {
+ use values::specified::OffsetPath;
+ match unsafe { self.gecko.mMotion.mPtr.as_ref() } {
+ None => OffsetPath::none(),
+ Some(v) => (&v.mOffsetPath).into()
+ }
+ }
+
+ pub fn copy_offset_path_from(&mut self, other: &Self) {
+ use gecko_bindings::bindings::Gecko_CopyStyleMotions;
+ unsafe { Gecko_CopyStyleMotions(&mut self.gecko.mMotion, other.gecko.mMotion.mPtr) };
+ }
+
+ pub fn reset_offset_path(&mut self, other: &Self) {
+ self.copy_offset_path_from(other);
+ }
+
</%self:impl_trait>
<%def name="simple_image_array_property(name, shorthand, field_name)">
@@ -4937,14 +4971,43 @@ fn static_assert() {
}
</%self:impl_trait>
+// Set SVGPathData to StyleShapeSource.
+fn set_style_svg_path(
+ shape_source: &mut structs::mozilla::StyleShapeSource,
+ servo_path: &values::specified::svg_path::SVGPathData,
+ fill: values::generics::basic_shape::FillRule,
+) {
+ use gecko_bindings::bindings::Gecko_NewStyleSVGPath;
+ use gecko_bindings::structs::StyleShapeSourceType;
+
+ // Setup type.
+ shape_source.mType = StyleShapeSourceType::Path;
+
+ // Setup path.
+ let gecko_path = unsafe {
+ Gecko_NewStyleSVGPath(shape_source);
+ &mut shape_source.__bindgen_anon_1.mSVGPath.as_mut().mPtr.as_mut().unwrap()
+ };
+ unsafe { gecko_path.mPath.set_len(servo_path.commands().len() as u32) };
+ debug_assert_eq!(gecko_path.mPath.len(), servo_path.commands().len());
+ for (servo, gecko) in servo_path.commands().iter().zip(gecko_path.mPath.iter_mut()) {
+ // unsafe: cbindgen ensures the representation is the same.
+ *gecko = unsafe { transmute(*servo) };
+ }
+
+ // Setup fill-rule.
+ // unsafe: cbindgen ensures the representation is the same.
+ gecko_path.mFillRule = unsafe { transmute(fill) };
+}
+
<%def name="impl_shape_source(ident, gecko_ffi_name)">
pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
use gecko_bindings::bindings::{Gecko_NewBasicShape, Gecko_DestroyShapeSource};
use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleShapeSourceType};
- use gecko_bindings::structs::{StyleFillRule, StyleGeometryBox, StyleShapeSource};
+ use gecko_bindings::structs::{StyleGeometryBox, StyleShapeSource};
use gecko::conversions::basic_shape::set_corners_from_radius;
use gecko::values::GeckoStyleCoordConvertible;
- use values::generics::basic_shape::{BasicShape, FillRule, ShapeSource};
+ use values::generics::basic_shape::{BasicShape, ShapeSource};
let ref mut ${ident} = self.gecko.${gecko_ffi_name};
@@ -4976,6 +5039,7 @@ fn static_assert() {
${ident}.mReferenceBox = reference.into();
${ident}.mType = StyleShapeSourceType::Box;
}
+ ShapeSource::Path(p) => set_style_svg_path(${ident}, &p.path, p.fill),
ShapeSource::Shape(servo_shape, maybe_box) => {
fn init_shape(${ident}: &mut StyleShapeSource, basic_shape_type: StyleBasicShapeType)
-> &mut StyleBasicShape {
@@ -5038,11 +5102,8 @@ fn static_assert() {
coord.0.to_gecko_style_coord(&mut shape.mCoordinates[2 * i]);
coord.1.to_gecko_style_coord(&mut shape.mCoordinates[2 * i + 1]);
}
- shape.mFillRule = if poly.fill == FillRule::Evenodd {
- StyleFillRule::Evenodd
- } else {
- StyleFillRule::Nonzero
- };
+ // unsafe: cbindgen ensures the representation is the same.
+ shape.mFillRule = unsafe { transmute(poly.fill) };
}
}
diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs
index f6277a21271..437232d386a 100644
--- a/components/style/properties/helpers/animated_properties.mako.rs
+++ b/components/style/properties/helpers/animated_properties.mako.rs
@@ -1296,9 +1296,27 @@ impl Animate for ComputedTransformOperation {
&TransformOperation::Perspective(ref fd),
&TransformOperation::Perspective(ref td),
) => {
- Ok(TransformOperation::Perspective(
- fd.animate(td, procedure)?
- ))
+ use values::computed::CSSPixelLength;
+ use values::generics::transform::create_perspective_matrix;
+
+ // From https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions:
+ //
+ // The transform functions matrix(), matrix3d() and
+ // perspective() get converted into 4x4 matrices first and
+ // interpolated as defined in section Interpolation of
+ // Matrices afterwards.
+ //
+ let from = create_perspective_matrix(fd.px());
+ let to = create_perspective_matrix(td.px());
+
+ let interpolated =
+ Matrix3D::from(from).animate(&Matrix3D::from(to), procedure)?;
+
+ let decomposed = decompose_3d_matrix(interpolated)?;
+ let perspective_z = decomposed.perspective.2;
+ let used_value =
+ if perspective_z == 0. { 0. } else { -1. / perspective_z };
+ Ok(TransformOperation::Perspective(CSSPixelLength::new(used_value)))
},
_ if self.is_translate() && other.is_translate() => {
self.to_translate_3d().animate(&other.to_translate_3d(), procedure)
diff --git a/components/style/properties/longhands/background.mako.rs b/components/style/properties/longhands/background.mako.rs
index 9bb4e03e523..65df61a2e71 100644
--- a/components/style/properties/longhands/background.mako.rs
+++ b/components/style/properties/longhands/background.mako.rs
@@ -18,14 +18,17 @@ ${helpers.predefined_type(
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
)}
-${helpers.predefined_type("background-image", "ImageLayer",
+${helpers.predefined_type(
+ "background-image",
+ "ImageLayer",
initial_value="Either::First(None_)",
initial_specified_value="Either::First(None_)",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
vector="True",
animation_value_type="discrete",
ignored_when_colors_disabled="True",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER")}
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+)}
% for (axis, direction, initial) in [("x", "Horizontal", "left"), ("y", "Vertical", "top")]:
${helpers.predefined_type(
@@ -52,13 +55,15 @@ ${helpers.predefined_type(
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
)}
-${helpers.single_keyword("background-attachment",
- "scroll fixed" + (" local" if product == "gecko" else ""),
- vector=True,
- gecko_enum_prefix="StyleImageLayerAttachment",
- spec="https://drafts.csswg.org/css-backgrounds/#the-background-attachment",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER")}
+${helpers.single_keyword(
+ "background-attachment",
+ "scroll fixed" + (" local" if product == "gecko" else ""),
+ vector=True,
+ gecko_enum_prefix="StyleImageLayerAttachment",
+ spec="https://drafts.csswg.org/css-backgrounds/#the-background-attachment",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+)}
${helpers.single_keyword(
"background-clip",
@@ -96,12 +101,14 @@ ${helpers.predefined_type(
extra_prefixes="webkit")}
// https://drafts.fxtf.org/compositing/#background-blend-mode
-${helpers.single_keyword("background-blend-mode",
- """normal multiply screen overlay darken lighten color-dodge
- color-burn hard-light soft-light difference exclusion hue
- saturation color luminosity""",
- gecko_constant_prefix="NS_STYLE_BLEND",
- gecko_pref="layout.css.background-blend-mode.enabled",
- vector=True, products="gecko", animation_value_type="discrete",
- spec="https://drafts.fxtf.org/compositing/#background-blend-mode",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER")}
+${helpers.single_keyword(
+ "background-blend-mode",
+ """normal multiply screen overlay darken lighten color-dodge
+ color-burn hard-light soft-light difference exclusion hue
+ saturation color luminosity""",
+ gecko_constant_prefix="NS_STYLE_BLEND",
+ gecko_pref="layout.css.background-blend-mode.enabled",
+ vector=True, products="gecko", animation_value_type="discrete",
+ spec="https://drafts.fxtf.org/compositing/#background-blend-mode",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+)}
diff --git a/components/style/properties/longhands/border.mako.rs b/components/style/properties/longhands/border.mako.rs
index 901d29728b1..1066dbbc619 100644
--- a/components/style/properties/longhands/border.mako.rs
+++ b/components/style/properties/longhands/border.mako.rs
@@ -61,51 +61,70 @@
)}
% endfor
-${helpers.gecko_keyword_conversion(Keyword('border-style',
- "none solid double dotted dashed hidden groove ridge inset outset"),
- type="::values::specified::BorderStyle")}
+${helpers.gecko_keyword_conversion(
+ Keyword('border-style',
+ "none solid double dotted dashed hidden groove ridge inset outset"),
+ type="::values::specified::BorderStyle",
+)}
// FIXME(#4126): when gfx supports painting it, make this Size2D<LengthOrPercentage>
% for corner in ["top-left", "top-right", "bottom-right", "bottom-left"]:
- ${helpers.predefined_type("border-" + corner + "-radius", "BorderCornerRadius",
- "computed::BorderCornerRadius::zero()",
- "parse", extra_prefixes="webkit",
- spec="https://drafts.csswg.org/css-backgrounds/#border-%s-radius" % corner,
- boxed=True,
- flags="APPLIES_TO_FIRST_LETTER",
- animation_value_type="BorderCornerRadius")}
+ ${helpers.predefined_type(
+ "border-" + corner + "-radius",
+ "BorderCornerRadius",
+ "computed::BorderCornerRadius::zero()",
+ "parse",
+ extra_prefixes="webkit",
+ spec="https://drafts.csswg.org/css-backgrounds/#border-%s-radius" % corner,
+ boxed=True,
+ flags="APPLIES_TO_FIRST_LETTER",
+ animation_value_type="BorderCornerRadius",
+ )}
% endfor
-${helpers.single_keyword("box-decoration-break", "slice clone",
- gecko_enum_prefix="StyleBoxDecorationBreak",
- gecko_pref="layout.css.box-decoration-break.enabled",
- spec="https://drafts.csswg.org/css-break/#propdef-box-decoration-break",
- products="gecko", animation_value_type="discrete")}
+${helpers.single_keyword(
+ "box-decoration-break",
+ "slice clone",
+ gecko_enum_prefix="StyleBoxDecorationBreak",
+ gecko_pref="layout.css.box-decoration-break.enabled",
+ spec="https://drafts.csswg.org/css-break/#propdef-box-decoration-break",
+ products="gecko",
+ animation_value_type="discrete",
+)}
-${helpers.single_keyword("-moz-float-edge", "content-box margin-box",
- gecko_ffi_name="mFloatEdge",
- gecko_enum_prefix="StyleFloatEdge",
- products="gecko",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-float-edge)",
- animation_value_type="discrete")}
+${helpers.single_keyword(
+ "-moz-float-edge",
+ "content-box margin-box",
+ gecko_ffi_name="mFloatEdge",
+ gecko_enum_prefix="StyleFloatEdge",
+ products="gecko",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-float-edge)",
+ animation_value_type="discrete",
+)}
-${helpers.predefined_type("border-image-source", "ImageLayer",
+${helpers.predefined_type(
+ "border-image-source",
+ "ImageLayer",
initial_value="Either::First(None_)",
initial_specified_value="Either::First(None_)",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
vector=False,
animation_value_type="discrete",
flags="APPLIES_TO_FIRST_LETTER",
- boxed=True)}
+ boxed=True,
+)}
-${helpers.predefined_type("border-image-outset", "LengthOrNumberRect",
+${helpers.predefined_type(
+ "border-image-outset",
+ "LengthOrNumberRect",
parse_method="parse_non_negative",
initial_value="computed::LengthOrNumberRect::all(computed::LengthOrNumber::zero())",
initial_specified_value="specified::LengthOrNumberRect::all(specified::LengthOrNumber::zero())",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-outset",
animation_value_type="discrete",
flags="APPLIES_TO_FIRST_LETTER",
- boxed=True)}
+ boxed=True,
+)}
${helpers.predefined_type(
"border-image-repeat",
@@ -117,21 +136,27 @@ ${helpers.predefined_type(
flags="APPLIES_TO_FIRST_LETTER",
)}
-${helpers.predefined_type("border-image-width", "BorderImageWidth",
+${helpers.predefined_type(
+ "border-image-width",
+ "BorderImageWidth",
initial_value="computed::BorderImageWidth::all(computed::BorderImageSideWidth::one())",
initial_specified_value="specified::BorderImageWidth::all(specified::BorderImageSideWidth::one())",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-width",
animation_value_type="discrete",
flags="APPLIES_TO_FIRST_LETTER",
- boxed=True)}
+ boxed=True,
+)}
-${helpers.predefined_type("border-image-slice", "BorderImageSlice",
+${helpers.predefined_type(
+ "border-image-slice",
+ "BorderImageSlice",
initial_value="computed::NumberOrPercentage::Percentage(computed::Percentage(1.)).into()",
initial_specified_value="specified::NumberOrPercentage::Percentage(specified::Percentage::new(1.)).into()",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-slice",
animation_value_type="discrete",
flags="APPLIES_TO_FIRST_LETTER",
- boxed=True)}
+ boxed=True,
+)}
#[cfg(feature = "gecko")]
impl ::values::computed::BorderImageWidth {
@@ -155,8 +180,9 @@ impl ::values::computed::BorderImageWidth {
% endfor
}
- pub fn from_gecko_rect(sides: &::gecko_bindings::structs::nsStyleSides)
- -> Option<::values::computed::BorderImageWidth> {
+ pub fn from_gecko_rect(
+ sides: &::gecko_bindings::structs::nsStyleSides,
+ ) -> Option<::values::computed::BorderImageWidth> {
use gecko_bindings::structs::nsStyleUnit::{eStyleUnit_Factor, eStyleUnit_Auto};
use gecko_bindings::sugar::ns_style_coord::CoordData;
use gecko::values::GeckoStyleCoordConvertible;
diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs
index 6b6bcf9cbe3..ed7839360d9 100644
--- a/components/style/properties/longhands/box.mako.rs
+++ b/components/style/properties/longhands/box.mako.rs
@@ -23,36 +23,25 @@ ${helpers.predefined_type(
needs_context=product == "gecko"
)}
-// FIXME(emilio): Listing all the display values here is very unfortunate, we should teach C++ to use the
-// Rust enum directly, or generate the conversions to `StyleDisplay`.
-${helpers.gecko_keyword_conversion(
- Keyword('display', """
- inline block inline-block
- table inline-table table-row-group table-header-group table-footer-group
- table-row table-column-group table-column table-cell table-caption
- list-item none flex inline-flex grid inline-grid ruby ruby-base ruby-base-container
- ruby-text ruby-text-container contents flow-root -webkit-box
- -webkit-inline-box -moz-box -moz-inline-box -moz-grid -moz-inline-grid
- -moz-grid-group -moz-grid-line -moz-stack -moz-inline-stack -moz-deck
- -moz-popup -moz-groupbox
- """,
- gecko_enum_prefix='StyleDisplay',
- gecko_strip_moz_prefix=False),
- type="::values::specified::Display"
-)}
-
-${helpers.single_keyword("-moz-top-layer", "none top",
- gecko_constant_prefix="NS_STYLE_TOP_LAYER",
- gecko_ffi_name="mTopLayer",
- products="gecko", animation_value_type="none",
- enabled_in="ua",
- spec="Internal (not web-exposed)")}
-
-${helpers.single_keyword("position", "static absolute relative fixed sticky",
- animation_value_type="discrete",
- flags="CREATES_STACKING_CONTEXT ABSPOS_CB",
- spec="https://drafts.csswg.org/css-position/#position-property",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.single_keyword(
+ "-moz-top-layer",
+ "none top",
+ gecko_constant_prefix="NS_STYLE_TOP_LAYER",
+ gecko_ffi_name="mTopLayer",
+ products="gecko",
+ animation_value_type="none",
+ enabled_in="ua",
+ spec="Internal (not web-exposed)",
+)}
+
+${helpers.single_keyword(
+ "position",
+ "static absolute relative fixed sticky",
+ animation_value_type="discrete",
+ flags="CREATES_STACKING_CONTEXT ABSPOS_CB",
+ spec="https://drafts.csswg.org/css-position/#position-property",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
${helpers.predefined_type(
"float",
@@ -64,7 +53,7 @@ ${helpers.predefined_type(
needs_context=False,
flags="APPLIES_TO_FIRST_LETTER",
servo_restyle_damage="rebuild_and_reflow",
- gecko_ffi_name="mFloat"
+ gecko_ffi_name="mFloat",
)}
${helpers.predefined_type(
@@ -75,7 +64,7 @@ ${helpers.predefined_type(
needs_context=False,
gecko_ffi_name="mBreakType",
spec="https://drafts.csswg.org/css-box/#propdef-clear",
- servo_restyle_damage="rebuild_and_reflow"
+ servo_restyle_damage="rebuild_and_reflow",
)}
${helpers.predefined_type(
@@ -85,7 +74,7 @@ ${helpers.predefined_type(
animation_value_type="ComputedValue",
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
spec="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align",
- servo_restyle_damage = "reflow"
+ servo_restyle_damage = "reflow",
)}
// CSS 2.1, Section 11 - Visual effects
@@ -118,14 +107,17 @@ ${helpers.single_keyword("-servo-overflow-clip-box", "padding-box content-box",
// FIXME(pcwalton, #2742): Implement scrolling for `scroll` and `auto`.
//
// We allow it to apply to placeholders for UA sheets, which set it !important.
-${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
- animation_value_type="discrete",
- extra_gecko_values="-moz-hidden-unscrollable",
- custom_consts=overflow_custom_consts,
- gecko_constant_prefix="NS_STYLE_OVERFLOW",
- flags="APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-overflow/#propdef-overflow-x",
- servo_restyle_damage = "reflow")}
+${helpers.single_keyword(
+ "overflow-x",
+ "visible hidden scroll auto",
+ animation_value_type="discrete",
+ extra_gecko_values="-moz-hidden-unscrollable",
+ custom_consts=overflow_custom_consts,
+ gecko_constant_prefix="NS_STYLE_OVERFLOW",
+ flags="APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-overflow/#propdef-overflow-x",
+ servo_restyle_damage = "reflow",
+)}
// FIXME(pcwalton, #2742): Implement scrolling for `scroll` and `auto`.
//
@@ -139,26 +131,30 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
<% transition_extra_prefixes = "moz:layout.css.prefixes.transitions webkit" %>
-${helpers.predefined_type("transition-duration",
- "Time",
- "computed::Time::zero()",
- initial_specified_value="specified::Time::zero()",
- parse_method="parse_non_negative",
- vector=True,
- need_index=True,
- animation_value_type="none",
- extra_prefixes=transition_extra_prefixes,
- spec="https://drafts.csswg.org/css-transitions/#propdef-transition-duration")}
-
-${helpers.predefined_type("transition-timing-function",
- "TimingFunction",
- "computed::TimingFunction::ease()",
- initial_specified_value="specified::TimingFunction::ease()",
- vector=True,
- need_index=True,
- animation_value_type="none",
- extra_prefixes=transition_extra_prefixes,
- spec="https://drafts.csswg.org/css-transitions/#propdef-transition-timing-function")}
+${helpers.predefined_type(
+ "transition-duration",
+ "Time",
+ "computed::Time::zero()",
+ initial_specified_value="specified::Time::zero()",
+ parse_method="parse_non_negative",
+ vector=True,
+ need_index=True,
+ animation_value_type="none",
+ extra_prefixes=transition_extra_prefixes,
+ spec="https://drafts.csswg.org/css-transitions/#propdef-transition-duration",
+)}
+
+${helpers.predefined_type(
+ "transition-timing-function",
+ "TimingFunction",
+ "computed::TimingFunction::ease()",
+ initial_specified_value="specified::TimingFunction::ease()",
+ vector=True,
+ need_index=True,
+ animation_value_type="none",
+ extra_prefixes=transition_extra_prefixes,
+ spec="https://drafts.csswg.org/css-transitions/#propdef-transition-timing-function",
+)}
${helpers.predefined_type(
"transition-property",
@@ -173,16 +169,17 @@ ${helpers.predefined_type(
spec="https://drafts.csswg.org/css-transitions/#propdef-transition-property",
)}
-${helpers.predefined_type("transition-delay",
- "Time",
- "computed::Time::zero()",
- initial_specified_value="specified::Time::zero()",
- vector=True,
- need_index=True,
- animation_value_type="none",
- extra_prefixes=transition_extra_prefixes,
- spec="https://drafts.csswg.org/css-transitions/#propdef-transition-delay")}
-
+${helpers.predefined_type(
+ "transition-delay",
+ "Time",
+ "computed::Time::zero()",
+ initial_specified_value="specified::Time::zero()",
+ vector=True,
+ need_index=True,
+ animation_value_type="none",
+ extra_prefixes=transition_extra_prefixes,
+ spec="https://drafts.csswg.org/css-transitions/#propdef-transition-delay",
+)}
<% animation_extra_prefixes = "moz:layout.css.prefixes.animations webkit" %>
@@ -199,29 +196,33 @@ ${helpers.predefined_type(
spec="https://drafts.csswg.org/css-animations/#propdef-animation-name",
)}
-${helpers.predefined_type("animation-duration",
- "Time",
- "computed::Time::zero()",
- initial_specified_value="specified::Time::zero()",
- parse_method="parse_non_negative",
- vector=True,
- need_index=True,
- animation_value_type="none",
- extra_prefixes=animation_extra_prefixes,
- spec="https://drafts.csswg.org/css-transitions/#propdef-transition-duration")}
+${helpers.predefined_type(
+ "animation-duration",
+ "Time",
+ "computed::Time::zero()",
+ initial_specified_value="specified::Time::zero()",
+ parse_method="parse_non_negative",
+ vector=True,
+ need_index=True,
+ animation_value_type="none",
+ extra_prefixes=animation_extra_prefixes,
+ spec="https://drafts.csswg.org/css-transitions/#propdef-transition-duration",
+)}
// animation-timing-function is the exception to the rule for allowed_in_keyframe_block:
// https://drafts.csswg.org/css-animations/#keyframes
-${helpers.predefined_type("animation-timing-function",
- "TimingFunction",
- "computed::TimingFunction::ease()",
- initial_specified_value="specified::TimingFunction::ease()",
- vector=True,
- need_index=True,
- animation_value_type="none",
- extra_prefixes=animation_extra_prefixes,
- allowed_in_keyframe_block=True,
- spec="https://drafts.csswg.org/css-transitions/#propdef-animation-timing-function")}
+${helpers.predefined_type(
+ "animation-timing-function",
+ "TimingFunction",
+ "computed::TimingFunction::ease()",
+ initial_specified_value="specified::TimingFunction::ease()",
+ vector=True,
+ need_index=True,
+ animation_value_type="none",
+ extra_prefixes=animation_extra_prefixes,
+ allowed_in_keyframe_block=True,
+ spec="https://drafts.csswg.org/css-transitions/#propdef-animation-timing-function",
+)}
${helpers.predefined_type(
"animation-iteration-count",
@@ -237,46 +238,54 @@ ${helpers.predefined_type(
)}
<% animation_direction_custom_consts = { "alternate-reverse": "Alternate_reverse" } %>
-${helpers.single_keyword("animation-direction",
- "normal reverse alternate alternate-reverse",
- need_index=True,
- animation_value_type="none",
- vector=True,
- gecko_enum_prefix="PlaybackDirection",
- custom_consts=animation_direction_custom_consts,
- extra_prefixes=animation_extra_prefixes,
- spec="https://drafts.csswg.org/css-animations/#propdef-animation-direction",
- allowed_in_keyframe_block=False)}
-
-${helpers.single_keyword("animation-play-state",
- "running paused",
- need_index=True,
- animation_value_type="none",
- vector=True,
- extra_prefixes=animation_extra_prefixes,
- spec="https://drafts.csswg.org/css-animations/#propdef-animation-play-state",
- allowed_in_keyframe_block=False)}
-
-${helpers.single_keyword("animation-fill-mode",
- "none forwards backwards both",
- need_index=True,
- animation_value_type="none",
- vector=True,
- gecko_enum_prefix="FillMode",
- extra_prefixes=animation_extra_prefixes,
- spec="https://drafts.csswg.org/css-animations/#propdef-animation-fill-mode",
- allowed_in_keyframe_block=False)}
-
-${helpers.predefined_type("animation-delay",
- "Time",
- "computed::Time::zero()",
- initial_specified_value="specified::Time::zero()",
- vector=True,
- need_index=True,
- animation_value_type="none",
- extra_prefixes=animation_extra_prefixes,
- spec="https://drafts.csswg.org/css-animations/#propdef-animation-delay",
- allowed_in_keyframe_block=False)}
+${helpers.single_keyword(
+ "animation-direction",
+ "normal reverse alternate alternate-reverse",
+ need_index=True,
+ animation_value_type="none",
+ vector=True,
+ gecko_enum_prefix="PlaybackDirection",
+ custom_consts=animation_direction_custom_consts,
+ extra_prefixes=animation_extra_prefixes,
+ spec="https://drafts.csswg.org/css-animations/#propdef-animation-direction",
+ allowed_in_keyframe_block=False,
+)}
+
+${helpers.single_keyword(
+ "animation-play-state",
+ "running paused",
+ need_index=True,
+ animation_value_type="none",
+ vector=True,
+ extra_prefixes=animation_extra_prefixes,
+ spec="https://drafts.csswg.org/css-animations/#propdef-animation-play-state",
+ allowed_in_keyframe_block=False,
+)}
+
+${helpers.single_keyword(
+ "animation-fill-mode",
+ "none forwards backwards both",
+ need_index=True,
+ animation_value_type="none",
+ vector=True,
+ gecko_enum_prefix="FillMode",
+ extra_prefixes=animation_extra_prefixes,
+ spec="https://drafts.csswg.org/css-animations/#propdef-animation-fill-mode",
+ allowed_in_keyframe_block=False,
+)}
+
+${helpers.predefined_type(
+ "animation-delay",
+ "Time",
+ "computed::Time::zero()",
+ initial_specified_value="specified::Time::zero()",
+ vector=True,
+ need_index=True,
+ animation_value_type="none",
+ extra_prefixes=animation_extra_prefixes,
+ spec="https://drafts.csswg.org/css-animations/#propdef-animation-delay",
+ allowed_in_keyframe_block=False,
+)}
% for axis in ["x", "y"]:
${helpers.predefined_type(
@@ -290,14 +299,16 @@ ${helpers.predefined_type("animation-delay",
)}
% endfor
-${helpers.predefined_type("scroll-snap-destination",
- "Position",
- "computed::Position::zero()",
- products="gecko",
- gecko_pref="layout.css.scroll-snap.enabled",
- boxed=True,
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
- animation_value_type="discrete")}
+${helpers.predefined_type(
+ "scroll-snap-destination",
+ "Position",
+ "computed::Position::zero()",
+ products="gecko",
+ gecko_pref="layout.css.scroll-snap.enabled",
+ boxed=True,
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
+ animation_value_type="discrete",
+)}
${helpers.predefined_type(
"scroll-snap-coordinate",
@@ -308,7 +319,7 @@ ${helpers.predefined_type(
gecko_pref="layout.css.scroll-snap.enabled",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
animation_value_type="discrete",
- allow_empty="NotInitial"
+ allow_empty="NotInitial",
)}
<% transform_extra_prefixes = "moz:layout.css.prefixes.transforms webkit" %>
@@ -323,26 +334,32 @@ ${helpers.predefined_type(
flags="CREATES_STACKING_CONTEXT FIXPOS_CB \
GETCS_NEEDS_LAYOUT_FLUSH CAN_ANIMATE_ON_COMPOSITOR",
spec="https://drafts.csswg.org/css-transforms/#propdef-transform",
- servo_restyle_damage="reflow_out_of_flow"
+ servo_restyle_damage="reflow_out_of_flow",
)}
-${helpers.predefined_type("rotate", "Rotate",
- "generics::transform::Rotate::None",
- animation_value_type="ComputedValue",
- boxed=True,
- flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
- gecko_pref="layout.css.individual-transform.enabled",
- spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms",
- servo_restyle_damage = "reflow_out_of_flow")}
+${helpers.predefined_type(
+ "rotate",
+ "Rotate",
+ "generics::transform::Rotate::None",
+ animation_value_type="ComputedValue",
+ boxed=True,
+ flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
+ gecko_pref="layout.css.individual-transform.enabled",
+ spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms",
+ servo_restyle_damage = "reflow_out_of_flow",
+)}
-${helpers.predefined_type("scale", "Scale",
- "generics::transform::Scale::None",
- animation_value_type="ComputedValue",
- boxed=True,
- flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
- gecko_pref="layout.css.individual-transform.enabled",
- spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms",
- servo_restyle_damage = "reflow_out_of_flow")}
+${helpers.predefined_type(
+ "scale",
+ "Scale",
+ "generics::transform::Scale::None",
+ animation_value_type="ComputedValue",
+ boxed=True,
+ flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
+ gecko_pref="layout.css.individual-transform.enabled",
+ spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms",
+ servo_restyle_damage = "reflow_out_of_flow",
+)}
${helpers.predefined_type(
"translate",
@@ -353,17 +370,31 @@ ${helpers.predefined_type(
flags="CREATES_STACKING_CONTEXT FIXPOS_CB GETCS_NEEDS_LAYOUT_FLUSH",
gecko_pref="layout.css.individual-transform.enabled",
spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms",
- servo_restyle_damage="reflow_out_of_flow"
+ servo_restyle_damage="reflow_out_of_flow",
+)}
+
+// Motion Path Module Level 1
+${helpers.predefined_type(
+ "offset-path",
+ "OffsetPath",
+ "computed::OffsetPath::none()",
+ products="gecko",
+ animation_value_type="ComputedValue",
+ gecko_pref="layout.css.motion-path.enabled",
+ flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
+ spec="https://drafts.fxtf.org/motion-1/#offset-path-property",
)}
// CSSOM View Module
// https://www.w3.org/TR/cssom-view-1/
-${helpers.single_keyword("scroll-behavior",
- "auto smooth",
- gecko_pref="layout.css.scroll-behavior.property-enabled",
- products="gecko",
- spec="https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior",
- animation_value_type="discrete")}
+${helpers.single_keyword(
+ "scroll-behavior",
+ "auto smooth",
+ gecko_pref="layout.css.scroll-behavior.property-enabled",
+ products="gecko",
+ spec="https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior",
+ animation_value_type="discrete",
+)}
% for axis in ["x", "y"]:
${helpers.predefined_type(
@@ -374,7 +405,7 @@ ${helpers.single_keyword("scroll-behavior",
needs_context=False,
gecko_pref="layout.css.scroll-snap.enabled",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type-x)",
- animation_value_type="discrete"
+ animation_value_type="discrete",
)}
% endfor
@@ -387,38 +418,48 @@ ${helpers.single_keyword("scroll-behavior",
needs_context=False,
gecko_pref="layout.css.overscroll-behavior.enabled",
spec="https://wicg.github.io/overscroll-behavior/#overscroll-behavior-properties",
- animation_value_type="discrete"
+ animation_value_type="discrete",
)}
% endfor
// Compositing and Blending Level 1
// http://www.w3.org/TR/compositing-1/
-${helpers.single_keyword("isolation",
- "auto isolate",
- products="gecko",
- gecko_pref="layout.css.isolation.enabled",
- spec="https://drafts.fxtf.org/compositing/#isolation",
- flags="CREATES_STACKING_CONTEXT",
- animation_value_type="discrete")}
+${helpers.single_keyword(
+ "isolation",
+ "auto isolate",
+ products="gecko",
+ gecko_pref="layout.css.isolation.enabled",
+ spec="https://drafts.fxtf.org/compositing/#isolation",
+ flags="CREATES_STACKING_CONTEXT",
+ animation_value_type="discrete",
+)}
// TODO add support for logical values recto and verso
-${helpers.single_keyword("page-break-after",
- "auto always avoid left right",
- products="gecko",
- spec="https://drafts.csswg.org/css2/page.html#propdef-page-break-after",
- animation_value_type="discrete")}
-${helpers.single_keyword("page-break-before",
- "auto always avoid left right",
- products="gecko",
- spec="https://drafts.csswg.org/css2/page.html#propdef-page-break-before",
- animation_value_type="discrete")}
-${helpers.single_keyword("page-break-inside",
- "auto avoid",
- products="gecko",
- gecko_ffi_name="mBreakInside",
- gecko_constant_prefix="NS_STYLE_PAGE_BREAK",
- spec="https://drafts.csswg.org/css2/page.html#propdef-page-break-inside",
- animation_value_type="discrete")}
+${helpers.single_keyword(
+ "page-break-after",
+ "auto always avoid left right",
+ products="gecko",
+ spec="https://drafts.csswg.org/css2/page.html#propdef-page-break-after",
+ animation_value_type="discrete",
+)}
+
+${helpers.single_keyword(
+ "page-break-before",
+ "auto always avoid left right",
+ products="gecko",
+ spec="https://drafts.csswg.org/css2/page.html#propdef-page-break-before",
+ animation_value_type="discrete",
+)}
+
+${helpers.single_keyword(
+ "page-break-inside",
+ "auto avoid",
+ products="gecko",
+ gecko_ffi_name="mBreakInside",
+ gecko_constant_prefix="NS_STYLE_PAGE_BREAK",
+ spec="https://drafts.csswg.org/css2/page.html#propdef-page-break-inside",
+ animation_value_type="discrete",
+)}
// CSS Basic User Interface Module Level 3
// http://dev.w3.org/csswg/css-ui
@@ -462,20 +503,24 @@ ${helpers.predefined_type(
servo_restyle_damage="reflow_out_of_flow"
)}
-${helpers.single_keyword("backface-visibility",
- "visible hidden",
- spec="https://drafts.csswg.org/css-transforms/#backface-visibility-property",
- extra_prefixes=transform_extra_prefixes,
- animation_value_type="discrete")}
+${helpers.single_keyword(
+ "backface-visibility",
+ "visible hidden",
+ spec="https://drafts.csswg.org/css-transforms/#backface-visibility-property",
+ extra_prefixes=transform_extra_prefixes,
+ animation_value_type="discrete",
+)}
-${helpers.single_keyword("transform-box",
- "border-box fill-box view-box",
- gecko_enum_prefix="StyleGeometryBox",
- products="gecko",
- gecko_pref="svg.transform-box.enabled",
- spec="https://drafts.csswg.org/css-transforms/#transform-box",
- gecko_inexhaustive="True",
- animation_value_type="discrete")}
+${helpers.single_keyword(
+ "transform-box",
+ "border-box fill-box view-box",
+ gecko_enum_prefix="StyleGeometryBox",
+ products="gecko",
+ gecko_pref="svg.transform-box.enabled",
+ spec="https://drafts.csswg.org/css-transforms/#transform-box",
+ gecko_inexhaustive="True",
+ animation_value_type="discrete",
+)}
${helpers.predefined_type(
"transform-style",
@@ -499,17 +544,19 @@ ${helpers.predefined_type(
boxed=True,
flags="GETCS_NEEDS_LAYOUT_FLUSH",
spec="https://drafts.csswg.org/css-transforms/#transform-origin-property",
- servo_restyle_damage="reflow_out_of_flow"
+ servo_restyle_damage="reflow_out_of_flow",
)}
-${helpers.predefined_type("contain",
- "Contain",
- "specified::Contain::empty()",
- animation_value_type="discrete",
- products="gecko",
- flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
- gecko_pref="layout.css.contain.enabled",
- spec="https://drafts.csswg.org/css-contain/#contain-property")}
+${helpers.predefined_type(
+ "contain",
+ "Contain",
+ "specified::Contain::empty()",
+ animation_value_type="none",
+ products="gecko",
+ flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
+ gecko_pref="layout.css.contain.enabled",
+ spec="https://drafts.csswg.org/css-contain/#contain-property",
+)}
// Non-standard
${helpers.predefined_type(
@@ -522,27 +569,33 @@ ${helpers.predefined_type(
animation_value_type="discrete",
)}
-${helpers.predefined_type("-moz-binding", "url::UrlOrNone", "computed::url::UrlOrNone::none()",
- products="gecko",
- animation_value_type="none",
- gecko_ffi_name="mBinding",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-binding)")}
+${helpers.predefined_type(
+ "-moz-binding",
+ "url::UrlOrNone",
+ "computed::url::UrlOrNone::none()",
+ products="gecko",
+ animation_value_type="none",
+ gecko_ffi_name="mBinding",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-binding)",
+)}
-${helpers.single_keyword("-moz-orient",
- "inline block horizontal vertical",
- products="gecko",
- gecko_ffi_name="mOrient",
- gecko_enum_prefix="StyleOrient",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-orient)",
- animation_value_type="discrete")}
+${helpers.single_keyword(
+ "-moz-orient",
+ "inline block horizontal vertical",
+ products="gecko",
+ gecko_ffi_name="mOrient",
+ gecko_enum_prefix="StyleOrient",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-orient)",
+ animation_value_type="discrete",
+)}
${helpers.predefined_type(
"will-change",
"WillChange",
"computed::WillChange::auto()",
products="gecko",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-will-change/#will-change"
+ animation_value_type="none",
+ spec="https://drafts.csswg.org/css-will-change/#will-change",
)}
${helpers.predefined_type(
diff --git a/components/style/properties/longhands/color.mako.rs b/components/style/properties/longhands/color.mako.rs
index a4d1830190a..d53632835b6 100644
--- a/components/style/properties/longhands/color.mako.rs
+++ b/components/style/properties/longhands/color.mako.rs
@@ -15,7 +15,7 @@ ${helpers.predefined_type(
animation_value_type="AnimatedRGBA",
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
ignored_when_colors_disabled="True",
- spec="https://drafts.csswg.org/css-color/#color"
+ spec="https://drafts.csswg.org/css-color/#color",
)}
// FIXME(#15973): Add servo support for system colors
@@ -96,8 +96,10 @@ pub mod system_colors {
#[inline]
fn to_computed_value(&self, cx: &Context) -> Self::ComputedValue {
unsafe {
- Gecko_GetLookAndFeelSystemColor(*self as i32,
- cx.device().pres_context())
+ Gecko_GetLookAndFeelSystemColor(
+ *self as i32,
+ cx.device().pres_context(),
+ )
}
}
diff --git a/components/style/properties/longhands/column.mako.rs b/components/style/properties/longhands/column.mako.rs
index e7305e5b4f3..adc9371e99f 100644
--- a/components/style/properties/longhands/column.mako.rs
+++ b/components/style/properties/longhands/column.mako.rs
@@ -6,16 +6,17 @@
<% data.new_style_struct("Column", inherited=False) %>
-${helpers.predefined_type("column-width",
- "length::NonNegativeLengthOrAuto",
- "Either::Second(Auto)",
- initial_specified_value="Either::Second(Auto)",
- extra_prefixes="moz",
- animation_value_type="NonNegativeLengthOrAuto",
- servo_pref="layout.columns.enabled",
- spec="https://drafts.csswg.org/css-multicol/#propdef-column-width",
- servo_restyle_damage="rebuild_and_reflow")}
-
+${helpers.predefined_type(
+ "column-width",
+ "length::NonNegativeLengthOrAuto",
+ "Either::Second(Auto)",
+ initial_specified_value="Either::Second(Auto)",
+ extra_prefixes="moz",
+ animation_value_type="NonNegativeLengthOrAuto",
+ servo_pref="layout.columns.enabled",
+ spec="https://drafts.csswg.org/css-multicol/#propdef-column-width",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
${helpers.predefined_type(
"column-count",
@@ -29,22 +30,27 @@ ${helpers.predefined_type(
servo_restyle_damage="rebuild_and_reflow",
)}
+${helpers.single_keyword(
+ "column-fill",
+ "balance auto",
+ extra_prefixes="moz",
+ products="gecko",
+ animation_value_type="discrete",
+ gecko_enum_prefix="StyleColumnFill",
+ spec="https://drafts.csswg.org/css-multicol/#propdef-column-fill",
+)}
-
-${helpers.single_keyword("column-fill", "balance auto", extra_prefixes="moz",
- products="gecko", animation_value_type="discrete",
- gecko_enum_prefix="StyleColumnFill",
- spec="https://drafts.csswg.org/css-multicol/#propdef-column-fill")}
-
-${helpers.predefined_type("column-rule-width",
- "BorderSideWidth",
- "::values::computed::NonNegativeLength::new(3.)",
- initial_specified_value="specified::BorderSideWidth::Medium",
- computed_type="::values::computed::NonNegativeLength",
- products="gecko",
- spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-width",
- animation_value_type="NonNegativeLength",
- extra_prefixes="moz")}
+${helpers.predefined_type(
+ "column-rule-width",
+ "BorderSideWidth",
+ "::values::computed::NonNegativeLength::new(3.)",
+ initial_specified_value="specified::BorderSideWidth::Medium",
+ computed_type="::values::computed::NonNegativeLength",
+ products="gecko",
+ spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-width",
+ animation_value_type="NonNegativeLength",
+ extra_prefixes="moz",
+)}
// https://drafts.csswg.org/css-multicol-1/#crc
${helpers.predefined_type(
@@ -59,16 +65,23 @@ ${helpers.predefined_type(
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-color",
)}
-${helpers.single_keyword("column-span", "none all",
- products="gecko", animation_value_type="discrete",
- gecko_enum_prefix="StyleColumnSpan",
- gecko_pref="layout.css.column-span.enabled",
- spec="https://drafts.csswg.org/css-multicol/#propdef-column-span",
- extra_prefixes="moz:layout.css.column-span.enabled")}
+${helpers.single_keyword(
+ "column-span",
+ "none all",
+ products="gecko",
+ animation_value_type="discrete",
+ gecko_enum_prefix="StyleColumnSpan",
+ gecko_pref="layout.css.column-span.enabled",
+ spec="https://drafts.csswg.org/css-multicol/#propdef-column-span",
+ extra_prefixes="moz:layout.css.column-span.enabled",
+)}
-${helpers.single_keyword("column-rule-style",
- "none hidden dotted dashed solid double groove ridge inset outset",
- products="gecko", extra_prefixes="moz",
- gecko_constant_prefix="NS_STYLE_BORDER_STYLE",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-style")}
+${helpers.single_keyword(
+ "column-rule-style",
+ "none hidden dotted dashed solid double groove ridge inset outset",
+ products="gecko",
+ extra_prefixes="moz",
+ gecko_constant_prefix="NS_STYLE_BORDER_STYLE",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-style",
+)}
diff --git a/components/style/properties/longhands/counters.mako.rs b/components/style/properties/longhands/counters.mako.rs
index ececf58310f..4a8fd0bb6d1 100644
--- a/components/style/properties/longhands/counters.mako.rs
+++ b/components/style/properties/longhands/counters.mako.rs
@@ -6,13 +6,15 @@
<% data.new_style_struct("Counters", inherited=False, gecko_name="Content") %>
-${helpers.predefined_type("content",
- "Content",
- "computed::Content::normal()",
- initial_specified_value="specified::Content::normal()",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-content/#propdef-content",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.predefined_type(
+ "content",
+ "Content",
+ "computed::Content::normal()",
+ initial_specified_value="specified::Content::normal()",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-content/#propdef-content",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
${helpers.predefined_type(
"counter-increment",
@@ -20,7 +22,7 @@ ${helpers.predefined_type(
initial_value="Default::default()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-counter-increment",
- servo_restyle_damage="rebuild_and_reflow"
+ servo_restyle_damage="rebuild_and_reflow",
)}
${helpers.predefined_type(
@@ -29,5 +31,5 @@ ${helpers.predefined_type(
initial_value="Default::default()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset",
- servo_restyle_damage="rebuild_and_reflow"
+ servo_restyle_damage="rebuild_and_reflow",
)}
diff --git a/components/style/properties/longhands/effects.mako.rs b/components/style/properties/longhands/effects.mako.rs
index 674340c391a..6649dc4d55b 100644
--- a/components/style/properties/longhands/effects.mako.rs
+++ b/components/style/properties/longhands/effects.mako.rs
@@ -15,7 +15,7 @@ ${helpers.predefined_type(
flags="CREATES_STACKING_CONTEXT APPLIES_TO_PLACEHOLDER \
CAN_ANIMATE_ON_COMPOSITOR",
spec="https://drafts.csswg.org/css-color/#opacity",
- servo_restyle_damage = "reflow_out_of_flow"
+ servo_restyle_damage = "reflow_out_of_flow",
)}
${helpers.predefined_type(
@@ -31,13 +31,15 @@ ${helpers.predefined_type(
spec="https://drafts.csswg.org/css-backgrounds/#box-shadow",
)}
-${helpers.predefined_type("clip",
- "ClipRectOrAuto",
- "computed::ClipRectOrAuto::auto()",
- animation_value_type="ComputedValue",
- boxed=True,
- allow_quirks=True,
- spec="https://drafts.fxtf.org/css-masking/#clip-property")}
+${helpers.predefined_type(
+ "clip",
+ "ClipRectOrAuto",
+ "computed::ClipRectOrAuto::auto()",
+ animation_value_type="ComputedValue",
+ boxed=True,
+ allow_quirks=True,
+ spec="https://drafts.fxtf.org/css-masking/#clip-property",
+)}
${helpers.predefined_type(
"filter",
@@ -52,11 +54,14 @@ ${helpers.predefined_type(
spec="https://drafts.fxtf.org/filters/#propdef-filter",
)}
-${helpers.single_keyword("mix-blend-mode",
- """normal multiply screen overlay darken lighten color-dodge
- color-burn hard-light soft-light difference exclusion hue
- saturation color luminosity""", gecko_constant_prefix="NS_STYLE_BLEND",
- animation_value_type="discrete",
- flags="CREATES_STACKING_CONTEXT",
- gecko_pref="layout.css.mix-blend-mode.enabled",
- spec="https://drafts.fxtf.org/compositing/#propdef-mix-blend-mode")}
+${helpers.single_keyword(
+ "mix-blend-mode",
+ """normal multiply screen overlay darken lighten color-dodge
+ color-burn hard-light soft-light difference exclusion hue
+ saturation color luminosity""",
+ gecko_constant_prefix="NS_STYLE_BLEND",
+ animation_value_type="discrete",
+ flags="CREATES_STACKING_CONTEXT",
+ gecko_pref="layout.css.mix-blend-mode.enabled",
+ spec="https://drafts.fxtf.org/compositing/#propdef-mix-blend-mode",
+)}
diff --git a/components/style/properties/longhands/inherited_box.mako.rs b/components/style/properties/longhands/inherited_box.mako.rs
index 4482931fd7a..d810ec3d29a 100644
--- a/components/style/properties/longhands/inherited_box.mako.rs
+++ b/components/style/properties/longhands/inherited_box.mako.rs
@@ -40,15 +40,12 @@ ${helpers.single_keyword(
servo_restyle_damage="rebuild_and_reflow",
)}
-// 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",
+ animation_value_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-text-orientation",
)}
diff --git a/components/style/properties/longhands/inherited_svg.mako.rs b/components/style/properties/longhands/inherited_svg.mako.rs
index b3bc12b1367..40c61b10129 100644
--- a/components/style/properties/longhands/inherited_svg.mako.rs
+++ b/components/style/properties/longhands/inherited_svg.mako.rs
@@ -6,61 +6,81 @@
// SVG 1.1 (Second Edition)
// https://www.w3.org/TR/SVG/
-<% data.new_style_struct("InheritedSVG",
- inherited=True,
- gecko_name="SVG") %>
+<% data.new_style_struct("InheritedSVG", inherited=True, gecko_name="SVG") %>
// Section 10 - Text
-${helpers.single_keyword("text-anchor",
- "start middle end",
- products="gecko",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG/text.html#TextAnchorProperty")}
+${helpers.single_keyword(
+ "text-anchor",
+ "start middle end",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG/text.html#TextAnchorProperty",
+)}
// Section 11 - Painting: Filling, Stroking and Marker Symbols
-${helpers.single_keyword("color-interpolation",
- "srgb auto linearrgb",
- products="gecko",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG11/painting.html#ColorInterpolationProperty")}
-
-${helpers.single_keyword("color-interpolation-filters", "linearrgb auto srgb",
- products="gecko",
- gecko_constant_prefix="NS_STYLE_COLOR_INTERPOLATION",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG11/painting.html#ColorInterpolationFiltersProperty")}
+${helpers.single_keyword(
+ "color-interpolation",
+ "srgb auto linearrgb",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG11/painting.html#ColorInterpolationProperty",
+)}
+
+${helpers.single_keyword(
+ "color-interpolation-filters",
+ "linearrgb auto srgb",
+ products="gecko",
+ gecko_constant_prefix="NS_STYLE_COLOR_INTERPOLATION",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG11/painting.html#ColorInterpolationFiltersProperty",
+)}
${helpers.predefined_type(
- "fill", "SVGPaint",
+ "fill",
+ "SVGPaint",
"::values::computed::SVGPaint::black()",
products="gecko",
animation_value_type="IntermediateSVGPaint",
boxed=True,
- spec="https://www.w3.org/TR/SVG2/painting.html#SpecifyingFillPaint")}
+ spec="https://www.w3.org/TR/SVG2/painting.html#SpecifyingFillPaint",
+)}
-${helpers.predefined_type("fill-opacity", "SVGOpacity", "Default::default()",
- products="gecko", animation_value_type="ComputedValue",
- spec="https://www.w3.org/TR/SVG11/painting.html#FillOpacityProperty")}
+${helpers.predefined_type(
+ "fill-opacity",
+ "SVGOpacity",
+ "Default::default()",
+ products="gecko",
+ animation_value_type="ComputedValue",
+ spec="https://www.w3.org/TR/SVG11/painting.html#FillOpacityProperty",
+)}
-${helpers.single_keyword("fill-rule", "nonzero evenodd",
- gecko_enum_prefix="StyleFillRule",
- products="gecko", animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG11/painting.html#FillRuleProperty")}
+${helpers.single_keyword(
+ "fill-rule",
+ "nonzero evenodd",
+ gecko_enum_prefix="StyleFillRule",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG11/painting.html#FillRuleProperty",
+)}
-${helpers.single_keyword("shape-rendering",
- "auto optimizespeed crispedges geometricprecision",
- products="gecko",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG11/painting.html#ShapeRenderingProperty")}
+${helpers.single_keyword(
+ "shape-rendering",
+ "auto optimizespeed crispedges geometricprecision",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG11/painting.html#ShapeRenderingProperty",
+)}
${helpers.predefined_type(
- "stroke", "SVGPaint",
+ "stroke",
+ "SVGPaint",
"Default::default()",
products="gecko",
animation_value_type="IntermediateSVGPaint",
boxed=True,
- spec="https://www.w3.org/TR/SVG2/painting.html#SpecifyingStrokePaint")}
+ spec="https://www.w3.org/TR/SVG2/painting.html#SpecifyingStrokePaint",
+)}
${helpers.predefined_type(
"stroke-width", "SVGWidth",
@@ -70,23 +90,39 @@ ${helpers.predefined_type(
spec="https://www.w3.org/TR/SVG2/painting.html#StrokeWidth",
)}
-${helpers.single_keyword("stroke-linecap", "butt round square",
- products="gecko", animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG11/painting.html#StrokeLinecapProperty")}
+${helpers.single_keyword(
+ "stroke-linecap",
+ "butt round square",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG11/painting.html#StrokeLinecapProperty",
+)}
-${helpers.single_keyword("stroke-linejoin", "miter round bevel",
- products="gecko", animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG11/painting.html#StrokeLinejoinProperty")}
+${helpers.single_keyword(
+ "stroke-linejoin",
+ "miter round bevel",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG11/painting.html#StrokeLinejoinProperty",
+)}
-${helpers.predefined_type("stroke-miterlimit", "GreaterThanOrEqualToOneNumber",
- "From::from(4.0)",
- products="gecko",
- animation_value_type="::values::computed::GreaterThanOrEqualToOneNumber",
- spec="https://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty")}
+${helpers.predefined_type(
+ "stroke-miterlimit",
+ "GreaterThanOrEqualToOneNumber",
+ "From::from(4.0)",
+ products="gecko",
+ animation_value_type="::values::computed::GreaterThanOrEqualToOneNumber",
+ spec="https://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty",
+)}
-${helpers.predefined_type("stroke-opacity", "SVGOpacity", "Default::default()",
- products="gecko", animation_value_type="ComputedValue",
- spec="https://www.w3.org/TR/SVG11/painting.html#StrokeOpacityProperty")}
+${helpers.predefined_type(
+ "stroke-opacity",
+ "SVGOpacity",
+ "Default::default()",
+ products="gecko",
+ animation_value_type="ComputedValue",
+ spec="https://www.w3.org/TR/SVG11/painting.html#StrokeOpacityProperty",
+)}
${helpers.predefined_type(
"stroke-dasharray",
@@ -106,38 +142,59 @@ ${helpers.predefined_type(
)}
// Section 14 - Clipping, Masking and Compositing
-${helpers.single_keyword("clip-rule", "nonzero evenodd",
- products="gecko",
- gecko_enum_prefix="StyleFillRule",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG11/masking.html#ClipRuleProperty")}
-
-${helpers.predefined_type("marker-start", "url::UrlOrNone", "computed::url::UrlOrNone::none()",
- products="gecko",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties")}
-
-${helpers.predefined_type("marker-mid", "url::UrlOrNone", "computed::url::UrlOrNone::none()",
- products="gecko",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties")}
-
-${helpers.predefined_type("marker-end", "url::UrlOrNone", "computed::url::UrlOrNone::none()",
- products="gecko",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties")}
-
-${helpers.predefined_type("paint-order", "SVGPaintOrder", "computed::SVGPaintOrder::normal()",
- products="gecko",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG2/painting.html#PaintOrder")}
-
-${helpers.predefined_type("-moz-context-properties",
- "MozContextProperties",
- initial_value=None,
- vector=True,
- need_index=True,
- animation_value_type="none",
- products="gecko",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-context-properties)",
- allow_empty=True)}
+${helpers.single_keyword(
+ "clip-rule",
+ "nonzero evenodd",
+ products="gecko",
+ gecko_enum_prefix="StyleFillRule",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG11/masking.html#ClipRuleProperty",
+)}
+
+${helpers.predefined_type(
+ "marker-start",
+ "url::UrlOrNone",
+ "computed::url::UrlOrNone::none()",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties",
+)}
+
+${helpers.predefined_type(
+ "marker-mid",
+ "url::UrlOrNone",
+ "computed::url::UrlOrNone::none()",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties",
+)}
+
+${helpers.predefined_type(
+ "marker-end",
+ "url::UrlOrNone",
+ "computed::url::UrlOrNone::none()",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG2/painting.html#VertexMarkerProperties",
+)}
+
+${helpers.predefined_type(
+ "paint-order",
+ "SVGPaintOrder",
+ "computed::SVGPaintOrder::normal()",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG2/painting.html#PaintOrder",
+)}
+
+${helpers.predefined_type(
+ "-moz-context-properties",
+ "MozContextProperties",
+ initial_value=None,
+ vector=True,
+ need_index=True,
+ animation_value_type="none",
+ products="gecko",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-context-properties)",
+ allow_empty=True,
+)}
diff --git a/components/style/properties/longhands/inherited_table.mako.rs b/components/style/properties/longhands/inherited_table.mako.rs
index 4f55d9b1fa5..177907dc8f7 100644
--- a/components/style/properties/longhands/inherited_table.mako.rs
+++ b/components/style/properties/longhands/inherited_table.mako.rs
@@ -6,27 +6,40 @@
<% data.new_style_struct("InheritedTable", inherited=True, gecko_name="TableBorder") %>
-${helpers.single_keyword("border-collapse", "separate collapse",
- gecko_constant_prefix="NS_STYLE_BORDER",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-tables/#propdef-border-collapse",
- servo_restyle_damage = "reflow")}
-${helpers.single_keyword("empty-cells", "show hide",
- gecko_constant_prefix="NS_STYLE_TABLE_EMPTY_CELLS",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-tables/#propdef-empty-cells",
- servo_restyle_damage="rebuild_and_reflow")}
-${helpers.single_keyword("caption-side", "top bottom",
- extra_gecko_values="right left top-outside bottom-outside",
- needs_conversion="True",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-tables/#propdef-caption-side",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.single_keyword(
+ "border-collapse",
+ "separate collapse",
+ gecko_constant_prefix="NS_STYLE_BORDER",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-tables/#propdef-border-collapse",
+ servo_restyle_damage = "reflow",
+)}
-${helpers.predefined_type("border-spacing",
- "BorderSpacing",
- "computed::BorderSpacing::zero()",
- animation_value_type="BorderSpacing",
- boxed=True,
- spec="https://drafts.csswg.org/css-tables/#propdef-border-spacing",
- servo_restyle_damage = "reflow")}
+${helpers.single_keyword(
+ "empty-cells",
+ "show hide",
+ gecko_constant_prefix="NS_STYLE_TABLE_EMPTY_CELLS",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-tables/#propdef-empty-cells",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
+
+${helpers.single_keyword(
+ "caption-side",
+ "top bottom",
+ extra_gecko_values="right left top-outside bottom-outside",
+ needs_conversion="True",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-tables/#propdef-caption-side",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
+
+${helpers.predefined_type(
+ "border-spacing",
+ "BorderSpacing",
+ "computed::BorderSpacing::zero()",
+ animation_value_type="BorderSpacing",
+ boxed=True,
+ spec="https://drafts.csswg.org/css-tables/#propdef-border-spacing",
+ servo_restyle_damage = "reflow",
+)}
diff --git a/components/style/properties/longhands/inherited_text.mako.rs b/components/style/properties/longhands/inherited_text.mako.rs
index 62819a78cbc..de7b613a183 100644
--- a/components/style/properties/longhands/inherited_text.mako.rs
+++ b/components/style/properties/longhands/inherited_text.mako.rs
@@ -20,51 +20,68 @@ ${helpers.predefined_type(
// CSS Text Module Level 3
// TODO(pcwalton): `full-width`
-${helpers.single_keyword("text-transform",
- "none capitalize uppercase lowercase",
- extra_gecko_values="full-width",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-text/#propdef-text-transform",
- servo_restyle_damage="rebuild_and_reflow")}
-
-${helpers.single_keyword("hyphens", "manual none auto",
- gecko_enum_prefix="StyleHyphens",
- products="gecko", animation_value_type="discrete", extra_prefixes="moz",
- spec="https://drafts.csswg.org/css-text/#propdef-hyphens")}
+${helpers.single_keyword(
+ "text-transform",
+ "none capitalize uppercase lowercase",
+ extra_gecko_values="full-width",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-text/#propdef-text-transform",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
+
+${helpers.single_keyword(
+ "hyphens",
+ "manual none auto",
+ gecko_enum_prefix="StyleHyphens",
+ products="gecko",
+ animation_value_type="discrete",
+ extra_prefixes="moz",
+ spec="https://drafts.csswg.org/css-text/#propdef-hyphens",
+)}
// TODO: Support <percentage>
-${helpers.single_keyword("-moz-text-size-adjust", "auto none",
- gecko_constant_prefix="NS_STYLE_TEXT_SIZE_ADJUST",
- gecko_ffi_name="mTextSizeAdjust",
- products="gecko", animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-size-adjust/#adjustment-control",
- alias="-webkit-text-size-adjust")}
-
-${helpers.predefined_type("text-indent",
- "LengthOrPercentage",
- "computed::LengthOrPercentage::Length(computed::Length::new(0.))",
- animation_value_type="ComputedValue",
- spec="https://drafts.csswg.org/css-text/#propdef-text-indent",
- allow_quirks=True, servo_restyle_damage = "reflow")}
+${helpers.single_keyword(
+ "-moz-text-size-adjust",
+ "auto none",
+ gecko_constant_prefix="NS_STYLE_TEXT_SIZE_ADJUST",
+ gecko_ffi_name="mTextSizeAdjust",
+ products="gecko", animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-size-adjust/#adjustment-control",
+ alias="-webkit-text-size-adjust",
+)}
+
+${helpers.predefined_type(
+ "text-indent",
+ "LengthOrPercentage",
+ "computed::LengthOrPercentage::Length(computed::Length::new(0.))",
+ animation_value_type="ComputedValue",
+ spec="https://drafts.csswg.org/css-text/#propdef-text-indent",
+ allow_quirks=True,
+ servo_restyle_damage = "reflow",
+)}
// Also known as "word-wrap" (which is more popular because of IE), but this is the preferred
// name per CSS-TEXT 6.2.
-${helpers.single_keyword("overflow-wrap",
- "normal break-word",
- gecko_constant_prefix="NS_STYLE_OVERFLOWWRAP",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap",
- alias="word-wrap",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.single_keyword(
+ "overflow-wrap",
+ "normal break-word",
+ gecko_constant_prefix="NS_STYLE_OVERFLOWWRAP",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap",
+ alias="word-wrap",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
// TODO(pcwalton): Support `word-break: keep-all` once we have better CJK support.
-${helpers.single_keyword("word-break",
- "normal break-all keep-all",
- gecko_constant_prefix="NS_STYLE_WORDBREAK",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-text/#propdef-word-break",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.single_keyword(
+ "word-break",
+ "normal break-all keep-all",
+ gecko_constant_prefix="NS_STYLE_WORDBREAK",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-text/#propdef-word-break",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
// TODO(pcwalton): Support `text-justify: distribute`.
<%helpers:single_keyword
@@ -106,39 +123,45 @@ ${helpers.single_keyword("word-break",
% endif
</%helpers:single_keyword>
-${helpers.single_keyword("text-align-last",
- "auto start end left right center justify",
- products="gecko",
- gecko_constant_prefix="NS_STYLE_TEXT_ALIGN",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-text/#propdef-text-align-last")}
+${helpers.single_keyword(
+ "text-align-last",
+ "auto start end left right center justify",
+ products="gecko",
+ gecko_constant_prefix="NS_STYLE_TEXT_ALIGN",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-text/#propdef-text-align-last",
+)}
// TODO make this a shorthand and implement text-align-last/text-align-all
-//
-// FIXME(emilio): This can't really be that complicated.
-${helpers.predefined_type("text-align",
- "TextAlign",
- "computed::TextAlign::start()",
- animation_value_type="discrete",
- flags="APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-text/#propdef-text-align",
- servo_restyle_damage = "reflow")}
-
-${helpers.predefined_type("letter-spacing",
- "LetterSpacing",
- "computed::LetterSpacing::normal()",
- animation_value_type="ComputedValue",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-text/#propdef-letter-spacing",
- servo_restyle_damage="rebuild_and_reflow")}
-
-${helpers.predefined_type("word-spacing",
- "WordSpacing",
- "computed::WordSpacing::normal()",
- animation_value_type="ComputedValue",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-text/#propdef-word-spacing",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.predefined_type(
+ "text-align",
+ "TextAlign",
+ "computed::TextAlign::start()",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-text/#propdef-text-align",
+ servo_restyle_damage = "reflow",
+)}
+
+${helpers.predefined_type(
+ "letter-spacing",
+ "LetterSpacing",
+ "computed::LetterSpacing::normal()",
+ animation_value_type="ComputedValue",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-text/#propdef-letter-spacing",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
+
+${helpers.predefined_type(
+ "word-spacing",
+ "WordSpacing",
+ "computed::WordSpacing::normal()",
+ animation_value_type="ComputedValue",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-text/#propdef-word-spacing",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
<%helpers:single_keyword
name="white-space"
@@ -267,47 +290,65 @@ ${helpers.predefined_type(
spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-color",
)}
-${helpers.predefined_type("-webkit-text-stroke-width",
- "BorderSideWidth",
- "::values::computed::NonNegativeLength::new(0.)",
- initial_specified_value="specified::BorderSideWidth::Length(specified::Length::zero())",
- computed_type="::values::computed::NonNegativeLength",
- products="gecko",
- gecko_pref="layout.css.prefixes.webkit",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-width",
- animation_value_type="discrete")}
+${helpers.predefined_type(
+ "-webkit-text-stroke-width",
+ "BorderSideWidth",
+ "::values::computed::NonNegativeLength::new(0.)",
+ initial_specified_value="specified::BorderSideWidth::Length(specified::Length::zero())",
+ computed_type="::values::computed::NonNegativeLength",
+ products="gecko",
+ gecko_pref="layout.css.prefixes.webkit",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-width",
+ animation_value_type="discrete",
+)}
// CSS Ruby Layout Module Level 1
// https://drafts.csswg.org/css-ruby/
-${helpers.single_keyword("ruby-align", "space-around start center space-between",
- products="gecko", animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-ruby/#ruby-align-property")}
+${helpers.single_keyword(
+ "ruby-align",
+ "space-around start center space-between",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-ruby/#ruby-align-property",
+)}
-${helpers.single_keyword("ruby-position", "over under",
- products="gecko", animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-ruby/#ruby-position-property")}
+${helpers.single_keyword(
+ "ruby-position",
+ "over under",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-ruby/#ruby-position-property",
+)}
// CSS Writing Modes Module Level 3
// https://drafts.csswg.org/css-writing-modes-3/
-${helpers.single_keyword("text-combine-upright", "none all",
- products="gecko", animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-writing-modes-3/#text-combine-upright")}
+${helpers.single_keyword(
+ "text-combine-upright",
+ "none all",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-writing-modes-3/#text-combine-upright",
+)}
// SVG 1.1: Section 11 - Painting: Filling, Stroking and Marker Symbols
-${helpers.single_keyword("text-rendering",
- "auto optimizespeed optimizelegibility geometricprecision",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG11/painting.html#TextRenderingProperty",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.single_keyword(
+ "text-rendering",
+ "auto optimizespeed optimizelegibility geometricprecision",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG11/painting.html#TextRenderingProperty",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
// FIXME Firefox expects the initial value of this property to change depending
// on the value of the layout.css.control-characters.visible pref.
-${helpers.single_keyword("-moz-control-character-visibility",
- "hidden visible",
- gecko_constant_prefix="NS_STYLE_CONTROL_CHARACTER_VISIBILITY",
- gecko_ffi_name="mControlCharacterVisibility",
- animation_value_type="none",
- products="gecko",
- spec="Nonstandard")}
+${helpers.single_keyword(
+ "-moz-control-character-visibility",
+ "hidden visible",
+ gecko_constant_prefix="NS_STYLE_CONTROL_CHARACTER_VISIBILITY",
+ gecko_ffi_name="mControlCharacterVisibility",
+ animation_value_type="none",
+ products="gecko",
+ spec="Nonstandard",
+)}
diff --git a/components/style/properties/longhands/inherited_ui.mako.rs b/components/style/properties/longhands/inherited_ui.mako.rs
index e597f97ce8c..0b2b590cf7f 100644
--- a/components/style/properties/longhands/inherited_ui.mako.rs
+++ b/components/style/properties/longhands/inherited_ui.mako.rs
@@ -6,40 +6,56 @@
<% data.new_style_struct("InheritedUI", inherited=True, gecko_name="UI") %>
-${helpers.predefined_type("cursor",
- "Cursor",
- "computed::Cursor::auto()",
- initial_specified_value="specified::Cursor::auto()",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-ui/#cursor")}
+${helpers.predefined_type(
+ "cursor",
+ "Cursor",
+ "computed::Cursor::auto()",
+ initial_specified_value="specified::Cursor::auto()",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-ui/#cursor",
+)}
// NB: `pointer-events: auto` (and use of `pointer-events` in anything that isn't SVG, in fact)
// is nonstandard, slated for CSS4-UI.
// TODO(pcwalton): SVG-only values.
-${helpers.single_keyword("pointer-events", "auto none", animation_value_type="discrete",
- extra_gecko_values="visiblepainted visiblefill visiblestroke visible painted fill stroke all",
- flags="APPLIES_TO_PLACEHOLDER",
- spec="https://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty")}
+${helpers.single_keyword(
+ "pointer-events",
+ "auto none",
+ animation_value_type="discrete",
+ extra_gecko_values="visiblepainted visiblefill visiblestroke visible painted fill stroke all",
+ flags="APPLIES_TO_PLACEHOLDER",
+ spec="https://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty",
+)}
-${helpers.single_keyword("-moz-user-input", "auto none",
- products="gecko", gecko_ffi_name="mUserInput",
- gecko_enum_prefix="StyleUserInput",
- animation_value_type="discrete",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-user-input)")}
+${helpers.single_keyword(
+ "-moz-user-input",
+ "auto none",
+ products="gecko",
+ gecko_ffi_name="mUserInput",
+ gecko_enum_prefix="StyleUserInput",
+ animation_value_type="discrete",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-user-input)",
+)}
-${helpers.single_keyword("-moz-user-modify", "read-only read-write write-only",
- products="gecko", gecko_ffi_name="mUserModify",
- gecko_enum_prefix="StyleUserModify",
- needs_conversion=True,
- animation_value_type="discrete",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-user-modify)")}
+${helpers.single_keyword(
+ "-moz-user-modify",
+ "read-only read-write write-only",
+ products="gecko",
+ gecko_ffi_name="mUserModify",
+ gecko_enum_prefix="StyleUserModify",
+ needs_conversion=True,
+ animation_value_type="discrete",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-user-modify)",
+)}
-${helpers.single_keyword("-moz-user-focus",
- "none ignore normal select-after select-before select-menu select-same select-all",
- products="gecko", gecko_ffi_name="mUserFocus",
- gecko_enum_prefix="StyleUserFocus",
- animation_value_type="discrete",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-user-focus)")}
+${helpers.single_keyword(
+ "-moz-user-focus",
+ "none ignore normal select-after select-before select-menu select-same select-all",
+ products="gecko", gecko_ffi_name="mUserFocus",
+ gecko_enum_prefix="StyleUserFocus",
+ animation_value_type="discrete",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-user-focus)",
+)}
${helpers.predefined_type(
"caret-color",
diff --git a/components/style/properties/longhands/list.mako.rs b/components/style/properties/longhands/list.mako.rs
index 5ed1ea44831..732275fb03e 100644
--- a/components/style/properties/longhands/list.mako.rs
+++ b/components/style/properties/longhands/list.mako.rs
@@ -40,25 +40,31 @@ ${helpers.single_keyword("list-style-position", "outside inside", animation_valu
)}
% endif
-${helpers.predefined_type("list-style-image",
- "url::ImageUrlOrNone",
- initial_value="computed::url::ImageUrlOrNone::none()",
- initial_specified_value="specified::url::ImageUrlOrNone::none()",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-lists/#propdef-list-style-image",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.predefined_type(
+ "list-style-image",
+ "url::ImageUrlOrNone",
+ initial_value="computed::url::ImageUrlOrNone::none()",
+ initial_specified_value="specified::url::ImageUrlOrNone::none()",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-lists/#propdef-list-style-image",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
-${helpers.predefined_type("quotes",
- "Quotes",
- "computed::Quotes::get_initial_value()",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-content/#propdef-quotes",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.predefined_type(
+ "quotes",
+ "Quotes",
+ "computed::Quotes::get_initial_value()",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-content/#propdef-quotes",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
-${helpers.predefined_type("-moz-image-region",
- "ClipRectOrAuto",
- "computed::ClipRectOrAuto::auto()",
- animation_value_type="ComputedValue",
- products="gecko",
- boxed=True,
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-image-region)")}
+${helpers.predefined_type(
+ "-moz-image-region",
+ "ClipRectOrAuto",
+ "computed::ClipRectOrAuto::auto()",
+ animation_value_type="ComputedValue",
+ products="gecko",
+ boxed=True,
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-image-region)",
+)}
diff --git a/components/style/properties/longhands/outline.mako.rs b/components/style/properties/longhands/outline.mako.rs
index 9446745ec3e..a61aae06d7c 100644
--- a/components/style/properties/longhands/outline.mako.rs
+++ b/components/style/properties/longhands/outline.mako.rs
@@ -29,24 +29,34 @@ ${helpers.predefined_type(
spec="https://drafts.csswg.org/css-ui/#propdef-outline-style",
)}
-${helpers.predefined_type("outline-width",
- "BorderSideWidth",
- "::values::computed::NonNegativeLength::new(3.)",
- initial_specified_value="specified::BorderSideWidth::Medium",
- computed_type="::values::computed::NonNegativeLength",
- animation_value_type="NonNegativeLength",
- spec="https://drafts.csswg.org/css-ui/#propdef-outline-width")}
+${helpers.predefined_type(
+ "outline-width",
+ "BorderSideWidth",
+ "::values::computed::NonNegativeLength::new(3.)",
+ initial_specified_value="specified::BorderSideWidth::Medium",
+ computed_type="::values::computed::NonNegativeLength",
+ animation_value_type="NonNegativeLength",
+ spec="https://drafts.csswg.org/css-ui/#propdef-outline-width",
+)}
// The -moz-outline-radius-* properties are non-standard and not on a standards track.
% for corner in ["topleft", "topright", "bottomright", "bottomleft"]:
- ${helpers.predefined_type("-moz-outline-radius-" + corner, "BorderCornerRadius",
+ ${helpers.predefined_type(
+ "-moz-outline-radius-" + corner,
+ "BorderCornerRadius",
"computed::BorderCornerRadius::zero()",
products="gecko",
boxed=True,
animation_value_type="BorderCornerRadius",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)")}
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)",
+ )}
% endfor
-${helpers.predefined_type("outline-offset", "Length", "::values::computed::Length::new(0.)",
- products="servo gecko", animation_value_type="ComputedValue",
- spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset")}
+${helpers.predefined_type(
+ "outline-offset",
+ "Length",
+ "::values::computed::Length::new(0.)",
+ products="servo gecko",
+ animation_value_type="ComputedValue",
+ spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset",
+)}
diff --git a/components/style/properties/longhands/position.mako.rs b/components/style/properties/longhands/position.mako.rs
index 957335d32b2..5ec34961d22 100644
--- a/components/style/properties/longhands/position.mako.rs
+++ b/components/style/properties/longhands/position.mako.rs
@@ -68,73 +68,93 @@ ${helpers.predefined_type(
// http://www.w3.org/TR/css3-flexbox/
// Flex container properties
-${helpers.single_keyword("flex-direction", "row row-reverse column column-reverse",
- spec="https://drafts.csswg.org/css-flexbox/#flex-direction-property",
- extra_prefixes="webkit",
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
-
-${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse",
- spec="https://drafts.csswg.org/css-flexbox/#flex-wrap-property",
- extra_prefixes="webkit",
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
+${helpers.single_keyword(
+ "flex-direction",
+ "row row-reverse column column-reverse",
+ spec="https://drafts.csswg.org/css-flexbox/#flex-direction-property",
+ extra_prefixes="webkit",
+ animation_value_type="discrete",
+ servo_restyle_damage = "reflow",
+)}
+
+${helpers.single_keyword(
+ "flex-wrap",
+ "nowrap wrap wrap-reverse",
+ spec="https://drafts.csswg.org/css-flexbox/#flex-wrap-property",
+ extra_prefixes="webkit",
+ animation_value_type="discrete",
+ servo_restyle_damage = "reflow",
+)}
% if product == "servo":
// FIXME: Update Servo to support the same Syntax as Gecko.
- ${helpers.single_keyword("justify-content", "flex-start stretch flex-end center space-between space-around",
- extra_prefixes="webkit",
- spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
+ ${helpers.single_keyword(
+ "justify-content",
+ "flex-start stretch flex-end center space-between space-around",
+ extra_prefixes="webkit",
+ spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
+ animation_value_type="discrete",
+ servo_restyle_damage = "reflow",
+ )}
% else:
- ${helpers.predefined_type(name="justify-content",
- type="JustifyContent",
- initial_value="specified::JustifyContent(specified::ContentDistribution::normal())",
- spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
- extra_prefixes="webkit",
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
+ ${helpers.predefined_type(
+ "justify-content",
+ "JustifyContent",
+ "specified::JustifyContent(specified::ContentDistribution::normal())",
+ spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
+ extra_prefixes="webkit",
+ animation_value_type="discrete",
+ servo_restyle_damage="reflow",
+ )}
% endif
% if product == "servo":
// FIXME: Update Servo to support the same Syntax as Gecko.
- ${helpers.single_keyword("align-content", "stretch flex-start flex-end center space-between space-around",
- extra_prefixes="webkit",
- spec="https://drafts.csswg.org/css-align/#propdef-align-content",
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
-
- ${helpers.single_keyword("align-items",
- "stretch flex-start flex-end center baseline",
- extra_prefixes="webkit",
- spec="https://drafts.csswg.org/css-flexbox/#align-items-property",
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
+ ${helpers.single_keyword(
+ "align-content",
+ "stretch flex-start flex-end center space-between space-around",
+ extra_prefixes="webkit",
+ spec="https://drafts.csswg.org/css-align/#propdef-align-content",
+ animation_value_type="discrete",
+ servo_restyle_damage="reflow",
+ )}
+
+ ${helpers.single_keyword(
+ "align-items",
+ "stretch flex-start flex-end center baseline",
+ extra_prefixes="webkit",
+ spec="https://drafts.csswg.org/css-flexbox/#align-items-property",
+ animation_value_type="discrete",
+ servo_restyle_damage="reflow",
+ )}
% else:
- ${helpers.predefined_type(name="align-content",
- type="AlignContent",
- initial_value="specified::AlignContent(specified::ContentDistribution::normal())",
- spec="https://drafts.csswg.org/css-align/#propdef-align-content",
- extra_prefixes="webkit",
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
-
- ${helpers.predefined_type(name="align-items",
- type="AlignItems",
- initial_value="specified::AlignItems::normal()",
- spec="https://drafts.csswg.org/css-align/#propdef-align-items",
- extra_prefixes="webkit",
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
+ ${helpers.predefined_type(
+ "align-content",
+ "AlignContent",
+ "specified::AlignContent(specified::ContentDistribution::normal())",
+ spec="https://drafts.csswg.org/css-align/#propdef-align-content",
+ extra_prefixes="webkit",
+ animation_value_type="discrete",
+ servo_restyle_damage="reflow",
+ )}
+
+ ${helpers.predefined_type(
+ "align-items",
+ "AlignItems",
+ "specified::AlignItems::normal()",
+ spec="https://drafts.csswg.org/css-align/#propdef-align-items",
+ extra_prefixes="webkit",
+ animation_value_type="discrete",
+ servo_restyle_damage="reflow",
+ )}
#[cfg(feature = "gecko")]
impl_align_conversions!(::values::specified::align::AlignItems);
${helpers.predefined_type(
- name="justify-items",
- type="JustifyItems",
- initial_value="computed::JustifyItems::legacy()",
+ "justify-items",
+ "JustifyItems",
+ "computed::JustifyItems::legacy()",
spec="https://drafts.csswg.org/css-align/#propdef-justify-items",
animation_value_type="discrete",
)}
@@ -144,52 +164,69 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse",
% endif
// Flex item properties
-${helpers.predefined_type("flex-grow", "NonNegativeNumber",
- "From::from(0.0)",
- spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property",
- extra_prefixes="webkit",
- animation_value_type="NonNegativeNumber",
- servo_restyle_damage = "reflow")}
-
-${helpers.predefined_type("flex-shrink", "NonNegativeNumber",
- "From::from(1.0)",
- spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property",
- extra_prefixes="webkit",
- animation_value_type="NonNegativeNumber",
- servo_restyle_damage = "reflow")}
+${helpers.predefined_type(
+ "flex-grow",
+ "NonNegativeNumber",
+ "From::from(0.0)",
+ spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property",
+ extra_prefixes="webkit",
+ animation_value_type="NonNegativeNumber",
+ servo_restyle_damage="reflow",
+)}
+
+${helpers.predefined_type(
+ "flex-shrink",
+ "NonNegativeNumber",
+ "From::from(1.0)",
+ spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property",
+ extra_prefixes="webkit",
+ animation_value_type="NonNegativeNumber",
+ servo_restyle_damage = "reflow",
+)}
// https://drafts.csswg.org/css-align/#align-self-property
% if product == "servo":
// FIXME: Update Servo to support the same syntax as Gecko.
- ${helpers.single_keyword("align-self", "auto stretch flex-start flex-end center baseline",
- extra_prefixes="webkit",
- spec="https://drafts.csswg.org/css-flexbox/#propdef-align-self",
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
+ ${helpers.single_keyword(
+ "align-self",
+ "auto stretch flex-start flex-end center baseline",
+ extra_prefixes="webkit",
+ spec="https://drafts.csswg.org/css-flexbox/#propdef-align-self",
+ animation_value_type="discrete",
+ servo_restyle_damage = "reflow",
+ )}
% else:
- ${helpers.predefined_type(name="align-self",
- type="AlignSelf",
- initial_value="specified::AlignSelf(specified::SelfAlignment::auto())",
- spec="https://drafts.csswg.org/css-align/#align-self-property",
- extra_prefixes="webkit",
- animation_value_type="discrete")}
-
- ${helpers.predefined_type(name="justify-self",
- type="JustifySelf",
- initial_value="specified::JustifySelf(specified::SelfAlignment::auto())",
- spec="https://drafts.csswg.org/css-align/#justify-self-property",
- animation_value_type="discrete")}
+ ${helpers.predefined_type(
+ "align-self",
+ "AlignSelf",
+ "specified::AlignSelf(specified::SelfAlignment::auto())",
+ spec="https://drafts.csswg.org/css-align/#align-self-property",
+ extra_prefixes="webkit",
+ animation_value_type="discrete",
+ )}
+
+ ${helpers.predefined_type(
+ "justify-self",
+ "JustifySelf",
+ "specified::JustifySelf(specified::SelfAlignment::auto())",
+ spec="https://drafts.csswg.org/css-align/#justify-self-property",
+ animation_value_type="discrete",
+ )}
#[cfg(feature = "gecko")]
impl_align_conversions!(::values::specified::align::SelfAlignment);
% endif
// https://drafts.csswg.org/css-flexbox/#propdef-order
-${helpers.predefined_type("order", "Integer", "0",
- extra_prefixes="webkit",
- animation_value_type="ComputedValue",
- spec="https://drafts.csswg.org/css-flexbox/#order-property",
- servo_restyle_damage = "reflow")}
+${helpers.predefined_type(
+ "order",
+ "Integer",
+ "0",
+ extra_prefixes="webkit",
+ animation_value_type="ComputedValue",
+ spec="https://drafts.csswg.org/css-flexbox/#order-property",
+ servo_restyle_damage = "reflow",
+)}
${helpers.predefined_type(
"flex-basis",
@@ -198,7 +235,7 @@ ${helpers.predefined_type(
spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property",
extra_prefixes="webkit",
animation_value_type="FlexBasis",
- servo_restyle_damage = "reflow"
+ servo_restyle_damage = "reflow",
)}
% for (size, logical) in ALL_SIZES:
@@ -228,7 +265,7 @@ ${helpers.predefined_type(
spec=spec % size,
animation_value_type="MozLength",
flags="GETCS_NEEDS_LAYOUT_FLUSH",
- servo_restyle_damage="reflow"
+ servo_restyle_damage="reflow",
)}
// min-width, min-height, min-block-size, min-inline-size,
${helpers.predefined_type(
@@ -241,7 +278,7 @@ ${helpers.predefined_type(
allow_quirks=not logical,
spec=spec % size,
animation_value_type="MozLength",
- servo_restyle_damage = "reflow"
+ servo_restyle_damage="reflow",
)}
${helpers.predefined_type(
"max-%s" % size,
@@ -253,7 +290,7 @@ ${helpers.predefined_type(
allow_quirks=not logical,
spec=spec % size,
animation_value_type="MaxLength",
- servo_restyle_damage = "reflow"
+ servo_restyle_damage="reflow",
)}
% else:
// servo versions (no keyword support)
@@ -266,7 +303,7 @@ ${helpers.predefined_type(
logical_group="size",
allow_quirks=not logical,
animation_value_type="ComputedValue", logical = logical,
- servo_restyle_damage = "reflow",
+ servo_restyle_damage="reflow",
)}
${helpers.predefined_type(
"min-%s" % size,
@@ -278,7 +315,7 @@ ${helpers.predefined_type(
animation_value_type="ComputedValue",
logical=logical,
allow_quirks=not logical,
- servo_restyle_damage = "reflow",
+ servo_restyle_damage="reflow",
)}
${helpers.predefined_type(
"max-%s" % size,
@@ -290,52 +327,64 @@ ${helpers.predefined_type(
animation_value_type="ComputedValue",
logical=logical,
allow_quirks=not logical,
- servo_restyle_damage = "reflow",
+ servo_restyle_damage="reflow",
)}
% endif
% endfor
-${helpers.single_keyword("box-sizing",
- "content-box border-box",
- extra_prefixes="moz:layout.css.prefixes.box-sizing webkit",
- spec="https://drafts.csswg.org/css-ui/#propdef-box-sizing",
- gecko_enum_prefix="StyleBoxSizing",
- custom_consts={ "content-box": "Content", "border-box": "Border" },
- animation_value_type="discrete",
- servo_restyle_damage = "reflow")}
-
-${helpers.single_keyword("object-fit", "fill contain cover none scale-down",
- products="gecko", animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-images/#propdef-object-fit")}
-
-${helpers.predefined_type("object-position",
- "Position",
- "computed::Position::zero()",
- products="gecko",
- boxed=True,
- spec="https://drafts.csswg.org/css-images-3/#the-object-position",
- animation_value_type="ComputedValue")}
+${helpers.single_keyword(
+ "box-sizing",
+ "content-box border-box",
+ extra_prefixes="moz:layout.css.prefixes.box-sizing webkit",
+ spec="https://drafts.csswg.org/css-ui/#propdef-box-sizing",
+ gecko_enum_prefix="StyleBoxSizing",
+ custom_consts={ "content-box": "Content", "border-box": "Border" },
+ animation_value_type="discrete",
+ servo_restyle_damage = "reflow",
+)}
+
+${helpers.single_keyword(
+ "object-fit",
+ "fill contain cover none scale-down",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-images/#propdef-object-fit",
+)}
+
+${helpers.predefined_type(
+ "object-position",
+ "Position",
+ "computed::Position::zero()",
+ products="gecko",
+ boxed=True,
+ spec="https://drafts.csswg.org/css-images-3/#the-object-position",
+ animation_value_type="ComputedValue",
+)}
% for kind in ["row", "column"]:
% for range in ["start", "end"]:
- ${helpers.predefined_type("grid-%s-%s" % (kind, range),
- "GridLine",
- "Default::default()",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-grid/#propdef-grid-%s-%s" % (kind, range),
- products="gecko",
- boxed=True)}
+ ${helpers.predefined_type(
+ "grid-%s-%s" % (kind, range),
+ "GridLine",
+ "Default::default()",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-grid/#propdef-grid-%s-%s" % (kind, range),
+ products="gecko",
+ boxed=True,
+ )}
% endfor
// NOTE: According to the spec, this should handle multiple values of `<track-size>`,
// but gecko supports only a single value
- ${helpers.predefined_type("grid-auto-%ss" % kind,
- "TrackSize",
- "Default::default()",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-grid/#propdef-grid-auto-%ss" % kind,
- products="gecko",
- boxed=True)}
+ ${helpers.predefined_type(
+ "grid-auto-%ss" % kind,
+ "TrackSize",
+ "Default::default()",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-grid/#propdef-grid-auto-%ss" % kind,
+ products="gecko",
+ boxed=True,
+ )}
${helpers.predefined_type(
"grid-template-%ss" % kind,
@@ -345,41 +394,49 @@ ${helpers.predefined_type("object-position",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-template-%ss" % kind,
boxed=True,
flags="GETCS_NEEDS_LAYOUT_FLUSH",
- animation_value_type="discrete"
+ animation_value_type="discrete",
)}
% endfor
-${helpers.predefined_type("grid-auto-flow",
- "GridAutoFlow",
- initial_value="computed::GridAutoFlow::row()",
- products="gecko",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-grid/#propdef-grid-auto-flow")}
-
-${helpers.predefined_type("grid-template-areas",
- "GridTemplateAreas",
- initial_value="computed::GridTemplateAreas::none()",
- products="gecko",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-grid/#propdef-grid-template-areas")}
-
-${helpers.predefined_type("column-gap",
- "length::NonNegativeLengthOrPercentageOrNormal",
- "Either::Second(Normal)",
- alias="grid-column-gap" if product == "gecko" else "",
- extra_prefixes="moz",
- servo_pref="layout.columns.enabled",
- spec="https://drafts.csswg.org/css-align-3/#propdef-column-gap",
- animation_value_type="NonNegativeLengthOrPercentageOrNormal",
- servo_restyle_damage = "reflow")}
+${helpers.predefined_type(
+ "grid-auto-flow",
+ "GridAutoFlow",
+ "computed::GridAutoFlow::row()",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-grid/#propdef-grid-auto-flow",
+)}
+
+${helpers.predefined_type(
+ "grid-template-areas",
+ "GridTemplateAreas",
+ "computed::GridTemplateAreas::none()",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-grid/#propdef-grid-template-areas",
+)}
+
+${helpers.predefined_type(
+ "column-gap",
+ "length::NonNegativeLengthOrPercentageOrNormal",
+ "Either::Second(Normal)",
+ alias="grid-column-gap" if product == "gecko" else "",
+ extra_prefixes="moz",
+ servo_pref="layout.columns.enabled",
+ spec="https://drafts.csswg.org/css-align-3/#propdef-column-gap",
+ animation_value_type="NonNegativeLengthOrPercentageOrNormal",
+ servo_restyle_damage="reflow",
+)}
// no need for -moz- prefixed alias for this property
-${helpers.predefined_type("row-gap",
- "length::NonNegativeLengthOrPercentageOrNormal",
- "Either::Second(Normal)",
- alias="grid-row-gap",
- products="gecko",
- spec="https://drafts.csswg.org/css-align-3/#propdef-row-gap",
- animation_value_type="NonNegativeLengthOrPercentageOrNormal",
- servo_restyle_damage = "reflow")}
+${helpers.predefined_type(
+ "row-gap",
+ "length::NonNegativeLengthOrPercentageOrNormal",
+ "Either::Second(Normal)",
+ alias="grid-row-gap",
+ products="gecko",
+ spec="https://drafts.csswg.org/css-align-3/#propdef-row-gap",
+ animation_value_type="NonNegativeLengthOrPercentageOrNormal",
+ servo_restyle_damage="reflow",
+)}
diff --git a/components/style/properties/longhands/svg.mako.rs b/components/style/properties/longhands/svg.mako.rs
index 6d7bf803f1e..36105247676 100644
--- a/components/style/properties/longhands/svg.mako.rs
+++ b/components/style/properties/longhands/svg.mako.rs
@@ -6,16 +6,22 @@
<% data.new_style_struct("SVG", inherited=False, gecko_name="SVGReset") %>
-${helpers.single_keyword("dominant-baseline",
- """auto use-script no-change reset-size ideographic alphabetic hanging
- mathematical central middle text-after-edge text-before-edge""",
- products="gecko",
- animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVG11/text.html#DominantBaselineProperty")}
+${helpers.single_keyword(
+ "dominant-baseline",
+ """auto use-script no-change reset-size ideographic alphabetic hanging
+ mathematical central middle text-after-edge text-before-edge""",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVG11/text.html#DominantBaselineProperty",
+)}
-${helpers.single_keyword("vector-effect", "none non-scaling-stroke",
- products="gecko", animation_value_type="discrete",
- spec="https://www.w3.org/TR/SVGTiny12/painting.html#VectorEffectProperty")}
+${helpers.single_keyword(
+ "vector-effect",
+ "none non-scaling-stroke",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://www.w3.org/TR/SVGTiny12/painting.html#VectorEffectProperty",
+)}
// Section 13 - Gradients and Patterns
@@ -28,10 +34,14 @@ ${helpers.predefined_type(
spec="https://www.w3.org/TR/SVGTiny12/painting.html#StopColorProperty",
)}
-${helpers.predefined_type("stop-opacity", "Opacity", "1.0",
- products="gecko",
- animation_value_type="ComputedValue",
- spec="https://www.w3.org/TR/SVGTiny12/painting.html#propdef-stop-opacity")}
+${helpers.predefined_type(
+ "stop-opacity",
+ "Opacity",
+ "1.0",
+ products="gecko",
+ animation_value_type="ComputedValue",
+ spec="https://www.w3.org/TR/SVGTiny12/painting.html#propdef-stop-opacity",
+)}
// Section 15 - Filter Effects
@@ -44,9 +54,14 @@ ${helpers.predefined_type(
spec="https://www.w3.org/TR/SVG/filters.html#FloodColorProperty",
)}
-${helpers.predefined_type("flood-opacity", "Opacity",
- "1.0", products="gecko", animation_value_type="ComputedValue",
- spec="https://www.w3.org/TR/SVG/filters.html#FloodOpacityProperty")}
+${helpers.predefined_type(
+ "flood-opacity",
+ "Opacity",
+ "1.0",
+ products="gecko",
+ animation_value_type="ComputedValue",
+ spec="https://www.w3.org/TR/SVG/filters.html#FloodOpacityProperty",
+)}
${helpers.predefined_type(
"lighting-color",
@@ -59,9 +74,13 @@ ${helpers.predefined_type(
// CSS Masking Module Level 1
// https://drafts.fxtf.org/css-masking
-${helpers.single_keyword("mask-type", "luminance alpha",
- products="gecko", animation_value_type="discrete",
- spec="https://drafts.fxtf.org/css-masking/#propdef-mask-type")}
+${helpers.single_keyword(
+ "mask-type",
+ "luminance alpha",
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://drafts.fxtf.org/css-masking/#propdef-mask-type",
+)}
${helpers.predefined_type(
"clip-path",
@@ -74,12 +93,14 @@ ${helpers.predefined_type(
spec="https://drafts.fxtf.org/css-masking/#propdef-clip-path",
)}
-${helpers.single_keyword("mask-mode",
- "match-source alpha luminance",
- vector=True,
- products="gecko",
- animation_value_type="discrete",
- spec="https://drafts.fxtf.org/css-masking/#propdef-mask-mode")}
+${helpers.single_keyword(
+ "mask-mode",
+ "match-source alpha luminance",
+ vector=True,
+ products="gecko",
+ animation_value_type="discrete",
+ spec="https://drafts.fxtf.org/css-masking/#propdef-mask-mode",
+)}
${helpers.predefined_type(
"mask-repeat",
@@ -97,9 +118,9 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"mask-position-" + axis,
"position::" + direction + "Position",
+ "computed::LengthOrPercentage::zero()",
products="gecko",
extra_prefixes="webkit",
- initial_value="computed::LengthOrPercentage::zero()",
initial_specified_value="specified::PositionComponent::Center",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-position",
animation_value_type="ComputedValue",
@@ -147,20 +168,25 @@ ${helpers.predefined_type(
vector_animation_type="repeatable_list",
)}
-${helpers.single_keyword("mask-composite",
- "add subtract intersect exclude",
- vector=True,
- products="gecko",
- extra_prefixes="webkit",
- animation_value_type="discrete",
- spec="https://drafts.fxtf.org/css-masking/#propdef-mask-composite")}
+${helpers.single_keyword(
+ "mask-composite",
+ "add subtract intersect exclude",
+ vector=True,
+ products="gecko",
+ extra_prefixes="webkit",
+ animation_value_type="discrete",
+ spec="https://drafts.fxtf.org/css-masking/#propdef-mask-composite",
+)}
-${helpers.predefined_type("mask-image", "ImageLayer",
- initial_value="Either::First(None_)",
+${helpers.predefined_type(
+ "mask-image",
+ "ImageLayer",
+ "Either::First(None_)",
initial_specified_value="Either::First(None_)",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-image",
vector=True,
products="gecko",
extra_prefixes="webkit",
animation_value_type="discrete",
- flags="CREATES_STACKING_CONTEXT")}
+ flags="CREATES_STACKING_CONTEXT",
+)}
diff --git a/components/style/properties/longhands/table.mako.rs b/components/style/properties/longhands/table.mako.rs
index 2af39e1d6e3..8a371f269a6 100644
--- a/components/style/properties/longhands/table.mako.rs
+++ b/components/style/properties/longhands/table.mako.rs
@@ -6,15 +6,21 @@
<% data.new_style_struct("Table", inherited=False) %>
-${helpers.single_keyword("table-layout", "auto fixed",
- gecko_ffi_name="mLayoutStrategy", animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-tables/#propdef-table-layout",
- servo_restyle_damage = "reflow")}
+${helpers.single_keyword(
+ "table-layout",
+ "auto fixed",
+ gecko_ffi_name="mLayoutStrategy",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-tables/#propdef-table-layout",
+ servo_restyle_damage="reflow",
+)}
-${helpers.predefined_type("-x-span",
- "XSpan",
- "computed::XSpan(1)",
- products="gecko",
- spec="Internal-only (for `<col span>` pres attr)",
- animation_value_type="none",
- enabled_in="")}
+${helpers.predefined_type(
+ "-x-span",
+ "XSpan",
+ "computed::XSpan(1)",
+ products="gecko",
+ spec="Internal-only (for `<col span>` pres attr)",
+ animation_value_type="none",
+ enabled_in="",
+)}
diff --git a/components/style/properties/longhands/text.mako.rs b/components/style/properties/longhands/text.mako.rs
index 613ed6c5f67..715019f9c08 100644
--- a/components/style/properties/longhands/text.mako.rs
+++ b/components/style/properties/longhands/text.mako.rs
@@ -5,43 +5,55 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
<% from data import Method %>
-<% data.new_style_struct("Text",
- inherited=False,
- gecko_name="TextReset",
- additional_methods=[Method("has_underline", "bool"),
- Method("has_overline", "bool"),
- Method("has_line_through", "bool")]) %>
+<% data.new_style_struct(
+ "Text",
+ inherited=False,
+ gecko_name="TextReset",
+ additional_methods=[
+ Method("has_underline", "bool"),
+ Method("has_overline", "bool"),
+ Method("has_line_through", "bool"),
+ ]
+) %>
-${helpers.predefined_type("text-overflow",
- "TextOverflow",
- "computed::TextOverflow::get_initial_value()",
- animation_value_type="discrete",
- boxed=True,
- flags="APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-ui/#propdef-text-overflow",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.predefined_type(
+ "text-overflow",
+ "TextOverflow",
+ "computed::TextOverflow::get_initial_value()",
+ animation_value_type="discrete",
+ boxed=True,
+ flags="APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-ui/#propdef-text-overflow",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
-${helpers.single_keyword("unicode-bidi",
- "normal embed isolate bidi-override isolate-override plaintext",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-writing-modes/#propdef-unicode-bidi",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.single_keyword(
+ "unicode-bidi",
+ "normal embed isolate bidi-override isolate-override plaintext",
+ animation_value_type="none",
+ spec="https://drafts.csswg.org/css-writing-modes/#propdef-unicode-bidi",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
-${helpers.predefined_type("text-decoration-line",
- "TextDecorationLine",
- "specified::TextDecorationLine::none()",
- initial_specified_value="specified::TextDecorationLine::none()",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line",
- servo_restyle_damage="rebuild_and_reflow")}
+${helpers.predefined_type(
+ "text-decoration-line",
+ "TextDecorationLine",
+ "specified::TextDecorationLine::none()",
+ initial_specified_value="specified::TextDecorationLine::none()",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line",
+ servo_restyle_damage="rebuild_and_reflow",
+)}
-${helpers.single_keyword("text-decoration-style",
- "solid double dotted dashed wavy -moz-none",
- products="gecko",
- animation_value_type="discrete",
- flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
- spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style")}
+${helpers.single_keyword(
+ "text-decoration-style",
+ "solid double dotted dashed wavy -moz-none",
+ products="gecko",
+ animation_value_type="discrete",
+ flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
+ spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style",
+)}
${helpers.predefined_type(
"text-decoration-color",
@@ -64,4 +76,5 @@ ${helpers.predefined_type(
products="gecko",
flags="APPLIES_TO_FIRST_LETTER",
gecko_pref="layout.css.initial-letter.enabled",
- spec="https://drafts.csswg.org/css-inline/#sizing-drop-initials")}
+ spec="https://drafts.csswg.org/css-inline/#sizing-drop-initials",
+)}
diff --git a/components/style/properties/longhands/ui.mako.rs b/components/style/properties/longhands/ui.mako.rs
index 419024862d4..b8a188d896b 100644
--- a/components/style/properties/longhands/ui.mako.rs
+++ b/components/style/properties/longhands/ui.mako.rs
@@ -11,10 +11,14 @@
// TODO spec says that UAs should not support this
// we should probably remove from gecko (https://bugzilla.mozilla.org/show_bug.cgi?id=1328331)
-${helpers.single_keyword("ime-mode", "auto normal active disabled inactive",
- products="gecko", gecko_ffi_name="mIMEMode",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-ui/#input-method-editor")}
+${helpers.single_keyword(
+ "ime-mode",
+ "auto normal active disabled inactive",
+ products="gecko",
+ gecko_ffi_name="mIMEMode",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-ui/#input-method-editor",
+)}
${helpers.single_keyword(
"scrollbar-width",
@@ -27,30 +31,40 @@ ${helpers.single_keyword(
spec="https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width"
)}
-${helpers.single_keyword("-moz-user-select", "auto text none all element elements" +
- " toggle tri-state -moz-all -moz-text",
- products="gecko",
- alias="-webkit-user-select",
- gecko_ffi_name="mUserSelect",
- gecko_enum_prefix="StyleUserSelect",
- gecko_strip_moz_prefix=False,
- aliases="-moz-none=none",
- animation_value_type="discrete",
- spec="https://drafts.csswg.org/css-ui-4/#propdef-user-select")}
+${helpers.single_keyword(
+ "-moz-user-select",
+ "auto text none all element elements toggle tri-state -moz-all -moz-text",
+ products="gecko",
+ alias="-webkit-user-select",
+ gecko_ffi_name="mUserSelect",
+ gecko_enum_prefix="StyleUserSelect",
+ gecko_strip_moz_prefix=False,
+ aliases="-moz-none=none",
+ animation_value_type="discrete",
+ spec="https://drafts.csswg.org/css-ui-4/#propdef-user-select",
+)}
// TODO(emilio): This probably should be hidden from content.
-${helpers.single_keyword("-moz-window-dragging", "default drag no-drag", products="gecko",
- gecko_ffi_name="mWindowDragging",
- gecko_enum_prefix="StyleWindowDragging",
- animation_value_type="discrete",
- spec="None (Nonstandard Firefox-only property)")}
+${helpers.single_keyword(
+ "-moz-window-dragging",
+ "default drag no-drag",
+ products="gecko",
+ gecko_ffi_name="mWindowDragging",
+ gecko_enum_prefix="StyleWindowDragging",
+ animation_value_type="discrete",
+ spec="None (Nonstandard Firefox-only property)",
+)}
-${helpers.single_keyword("-moz-window-shadow", "none default menu tooltip sheet", products="gecko",
- gecko_ffi_name="mWindowShadow",
- gecko_constant_prefix="NS_STYLE_WINDOW_SHADOW",
- animation_value_type="discrete",
- enabled_in="chrome",
- spec="None (Nonstandard internal property)")}
+${helpers.single_keyword(
+ "-moz-window-shadow",
+ "none default menu tooltip sheet",
+ products="gecko",
+ gecko_ffi_name="mWindowShadow",
+ gecko_constant_prefix="NS_STYLE_WINDOW_SHADOW",
+ animation_value_type="discrete",
+ enabled_in="chrome",
+ spec="None (Nonstandard internal property)",
+)}
${helpers.predefined_type(
"-moz-window-opacity",
@@ -89,9 +103,11 @@ ${helpers.predefined_type(
)}
// TODO(emilio): Probably also should be hidden from content.
-${helpers.predefined_type("-moz-force-broken-image-icon",
- "MozForceBrokenImageIcon",
- "computed::MozForceBrokenImageIcon::false_value()",
- animation_value_type="discrete",
- products="gecko",
- spec="None (Nonstandard Firefox-only property)")}
+${helpers.predefined_type(
+ "-moz-force-broken-image-icon",
+ "MozForceBrokenImageIcon",
+ "computed::MozForceBrokenImageIcon::false_value()",
+ animation_value_type="discrete",
+ products="gecko",
+ spec="None (Nonstandard Firefox-only property)",
+)}
diff --git a/components/style/properties/longhands/xul.mako.rs b/components/style/properties/longhands/xul.mako.rs
index 15b8a695411..5089bbf985b 100644
--- a/components/style/properties/longhands/xul.mako.rs
+++ b/components/style/properties/longhands/xul.mako.rs
@@ -8,51 +8,79 @@
// Non-standard properties that Gecko uses for XUL elements.
<% data.new_style_struct("XUL", inherited=False) %>
-${helpers.single_keyword("-moz-box-align", "stretch start center baseline end",
- products="gecko", gecko_ffi_name="mBoxAlign",
- gecko_enum_prefix="StyleBoxAlign",
- animation_value_type="discrete",
- alias="-webkit-box-align",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-align)")}
-
-${helpers.single_keyword("-moz-box-direction", "normal reverse",
- products="gecko", gecko_ffi_name="mBoxDirection",
- gecko_enum_prefix="StyleBoxDirection",
- animation_value_type="discrete",
- alias="-webkit-box-direction",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-direction)")}
-
-${helpers.predefined_type("-moz-box-flex", "NonNegativeNumber", "From::from(0.)",
- products="gecko", gecko_ffi_name="mBoxFlex",
- animation_value_type="NonNegativeNumber",
- alias="-webkit-box-flex",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-flex)")}
-
-${helpers.single_keyword("-moz-box-orient", "horizontal vertical",
- products="gecko", gecko_ffi_name="mBoxOrient",
- extra_gecko_aliases="inline-axis=horizontal block-axis=vertical",
- gecko_enum_prefix="StyleBoxOrient",
- animation_value_type="discrete",
- alias="-webkit-box-orient",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-orient)")}
-
-${helpers.single_keyword("-moz-box-pack", "start center end justify",
- products="gecko", gecko_ffi_name="mBoxPack",
- gecko_enum_prefix="StyleBoxPack",
- animation_value_type="discrete",
- alias="-webkit-box-pack",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-pack)")}
-
-${helpers.single_keyword("-moz-stack-sizing", "stretch-to-fit ignore ignore-horizontal ignore-vertical",
- products="gecko", gecko_ffi_name="mStackSizing",
- gecko_enum_prefix="StyleStackSizing",
- animation_value_type="discrete",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-stack-sizing)")}
-
-${helpers.predefined_type("-moz-box-ordinal-group", "Integer", "0",
- parse_method="parse_non_negative",
- products="gecko",
- alias="-webkit-box-ordinal-group",
- gecko_ffi_name="mBoxOrdinal",
- animation_value_type="discrete",
- spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-box-ordinal-group)")}
+${helpers.single_keyword(
+ "-moz-box-align",
+ "stretch start center baseline end",
+ products="gecko",
+ gecko_ffi_name="mBoxAlign",
+ gecko_enum_prefix="StyleBoxAlign",
+ animation_value_type="discrete",
+ alias="-webkit-box-align",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-align)",
+)}
+
+${helpers.single_keyword(
+ "-moz-box-direction",
+ "normal reverse",
+ products="gecko",
+ gecko_ffi_name="mBoxDirection",
+ gecko_enum_prefix="StyleBoxDirection",
+ animation_value_type="discrete",
+ alias="-webkit-box-direction",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-direction)",
+)}
+
+${helpers.predefined_type(
+ "-moz-box-flex",
+ "NonNegativeNumber",
+ "From::from(0.)",
+ products="gecko",
+ gecko_ffi_name="mBoxFlex",
+ animation_value_type="NonNegativeNumber",
+ alias="-webkit-box-flex",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-flex)",
+)}
+
+${helpers.single_keyword(
+ "-moz-box-orient",
+ "horizontal vertical",
+ products="gecko",
+ gecko_ffi_name="mBoxOrient",
+ extra_gecko_aliases="inline-axis=horizontal block-axis=vertical",
+ gecko_enum_prefix="StyleBoxOrient",
+ animation_value_type="discrete",
+ alias="-webkit-box-orient",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-orient)",
+)}
+
+${helpers.single_keyword(
+ "-moz-box-pack",
+ "start center end justify",
+ products="gecko", gecko_ffi_name="mBoxPack",
+ gecko_enum_prefix="StyleBoxPack",
+ animation_value_type="discrete",
+ alias="-webkit-box-pack",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/box-pack)",
+)}
+
+${helpers.single_keyword(
+ "-moz-stack-sizing",
+ "stretch-to-fit ignore ignore-horizontal ignore-vertical",
+ products="gecko",
+ gecko_ffi_name="mStackSizing",
+ gecko_enum_prefix="StyleStackSizing",
+ animation_value_type="discrete",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-stack-sizing)",
+)}
+
+${helpers.predefined_type(
+ "-moz-box-ordinal-group",
+ "Integer",
+ "0",
+ parse_method="parse_non_negative",
+ products="gecko",
+ alias="-webkit-box-ordinal-group",
+ gecko_ffi_name="mBoxOrdinal",
+ animation_value_type="discrete",
+ spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-box-ordinal-group)",
+)}
diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs
index 64e99ba205d..681e9556653 100644
--- a/components/style/properties/properties.mako.rs
+++ b/components/style/properties/properties.mako.rs
@@ -425,6 +425,10 @@ pub mod animated_properties {
#[derive(Clone, Copy, Debug)]
pub struct NonCustomPropertyId(usize);
+/// The length of all the non-custom properties.
+pub const NON_CUSTOM_PROPERTY_ID_COUNT: usize =
+ ${len(data.longhands) + len(data.shorthands) + len(data.all_aliases())};
+
% if product == "gecko":
#[allow(dead_code)]
unsafe fn static_assert_nscsspropertyid() {
@@ -435,6 +439,11 @@ unsafe fn static_assert_nscsspropertyid() {
% endif
impl NonCustomPropertyId {
+ /// Returns the underlying index, used for use counter.
+ pub fn bit(self) -> usize {
+ self.0
+ }
+
#[cfg(feature = "gecko")]
#[inline]
fn to_nscsspropertyid(self) -> nsCSSPropertyID {
@@ -450,7 +459,7 @@ impl NonCustomPropertyId {
if prop < 0 {
return Err(());
}
- if prop >= ${len(data.longhands) + len(data.shorthands) + len(data.all_aliases())} {
+ if prop >= NON_CUSTOM_PROPERTY_ID_COUNT as i32 {
return Err(());
}
// unsafe: guaranteed by static_assert_nscsspropertyid above.
@@ -460,7 +469,7 @@ impl NonCustomPropertyId {
/// Get the property name.
#[inline]
pub fn name(self) -> &'static str {
- static MAP: [&'static str; ${len(data.longhands) + len(data.shorthands) + len(data.all_aliases())}] = [
+ static MAP: [&'static str; NON_CUSTOM_PROPERTY_ID_COUNT] = [
% for property in data.longhands + data.shorthands + data.all_aliases():
"${property.name}",
% endfor
@@ -635,7 +644,7 @@ impl NonCustomPropertyId {
PropertyId::Shorthand(transmute((self.0 - ${len(data.longhands)}) as u16))
}
}
- assert!(self.0 < ${len(data.longhands) + len(data.shorthands) + len(data.all_aliases())});
+ assert!(self.0 < NON_CUSTOM_PROPERTY_ID_COUNT);
let alias_id: AliasId = unsafe {
transmute((self.0 - ${len(data.longhands) + len(data.shorthands)}) as u16)
};
@@ -671,7 +680,7 @@ impl From<AliasId> for NonCustomPropertyId {
/// A set of all properties
#[derive(Clone, PartialEq)]
pub struct NonCustomPropertyIdSet {
- storage: [u32; (${len(data.longhands) + len(data.shorthands) + len(data.all_aliases())} - 1 + 32) / 32]
+ storage: [u32; (NON_CUSTOM_PROPERTY_ID_COUNT - 1 + 32) / 32]
}
impl NonCustomPropertyIdSet {
@@ -1554,6 +1563,7 @@ impl UnparsedValue {
ParsingMode::DEFAULT,
quirks_mode,
None,
+ None,
);
let mut input = ParserInput::new(&css);
@@ -1853,7 +1863,8 @@ impl PropertyId {
}
}
- fn non_custom_id(&self) -> Option<NonCustomPropertyId> {
+ /// Returns the `NonCustomPropertyId` corresponding to this property id.
+ pub fn non_custom_id(&self) -> Option<NonCustomPropertyId> {
Some(match *self {
PropertyId::Custom(_) => return None,
PropertyId::Shorthand(shorthand_id) => shorthand_id.into(),
@@ -2198,7 +2209,7 @@ impl PropertyDeclaration {
// FIXME: fully implement https://github.com/w3c/csswg-drafts/issues/774
// before adding skip_whitespace here.
// This probably affects some test results.
- let value = match input.try(|i| CSSWideKeyword::parse(i)) {
+ let value = match input.try(CSSWideKeyword::parse) {
Ok(keyword) => DeclaredValueOwned::CSSWideKeyword(keyword),
Err(()) => match ::custom_properties::SpecifiedValue::parse(input) {
Ok(value) => DeclaredValueOwned::Value(value),
@@ -2212,12 +2223,12 @@ impl PropertyDeclaration {
name: property_name,
value,
}));
- Ok(())
+ return Ok(());
}
PropertyId::LonghandAlias(id, _) |
PropertyId::Longhand(id) => {
input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
- input.try(|i| CSSWideKeyword::parse(i)).map(|keyword| {
+ input.try(CSSWideKeyword::parse).map(|keyword| {
PropertyDeclaration::CSSWideKeyword(
WideKeywordDeclaration { id, keyword },
)
@@ -2253,12 +2264,12 @@ impl PropertyDeclaration {
})
}).map(|declaration| {
declarations.push(declaration)
- })
+ })?;
}
PropertyId::ShorthandAlias(id, _) |
PropertyId::Shorthand(id) => {
input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
- if let Ok(keyword) = input.try(|i| CSSWideKeyword::parse(i)) {
+ if let Ok(keyword) = input.try(CSSWideKeyword::parse) {
if id == ShorthandId::All {
declarations.all_shorthand = AllShorthand::CSSWideKeyword(keyword)
} else {
@@ -2271,51 +2282,55 @@ impl PropertyDeclaration {
))
}
}
- Ok(())
} else {
input.look_for_var_functions();
// Not using parse_entirely here: each ${shorthand.ident}::parse_into function
// needs to do so *before* pushing to `declarations`.
id.parse_into(declarations, context, input).or_else(|err| {
while let Ok(_) = input.next() {} // Look for var() after the error.
- if input.seen_var_functions() {
- input.reset(&start);
- let (first_token_type, css) =
- ::custom_properties::parse_non_custom_with_var(input).map_err(|e| {
- StyleParseErrorKind::new_invalid(
- non_custom_id.unwrap().name(),
- e,
- )
- })?;
- let unparsed = Arc::new(UnparsedValue {
- css: css.into_owned(),
- first_token_type: first_token_type,
- url_data: context.url_data.clone(),
- from_shorthand: Some(id),
- });
- if id == ShorthandId::All {
- declarations.all_shorthand = AllShorthand::WithVariables(unparsed)
- } else {
- for id in id.longhands() {
- declarations.push(
- PropertyDeclaration::WithVariables(VariableDeclaration {
- id,
- value: unparsed.clone(),
- })
- )
- }
- }
- Ok(())
- } else {
- Err(StyleParseErrorKind::new_invalid(
+ if !input.seen_var_functions() {
+ return Err(StyleParseErrorKind::new_invalid(
non_custom_id.unwrap().name(),
err,
- ))
+ ));
}
- })
+
+ input.reset(&start);
+ let (first_token_type, css) =
+ ::custom_properties::parse_non_custom_with_var(input).map_err(|e| {
+ StyleParseErrorKind::new_invalid(
+ non_custom_id.unwrap().name(),
+ e,
+ )
+ })?;
+ let unparsed = Arc::new(UnparsedValue {
+ css: css.into_owned(),
+ first_token_type: first_token_type,
+ url_data: context.url_data.clone(),
+ from_shorthand: Some(id),
+ });
+ if id == ShorthandId::All {
+ declarations.all_shorthand = AllShorthand::WithVariables(unparsed)
+ } else {
+ for id in id.longhands() {
+ declarations.push(
+ PropertyDeclaration::WithVariables(VariableDeclaration {
+ id,
+ value: unparsed.clone(),
+ })
+ )
+ }
+ }
+ Ok(())
+ })?;
}
}
}
+ debug_assert!(non_custom_id.is_some(), "Custom properties should've returned earlier");
+ if let Some(use_counters) = context.use_counters {
+ use_counters.non_custom_properties.record(non_custom_id.unwrap());
+ }
+ Ok(())
}
}
diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs
index 5414b254aae..d4fb0d00925 100644
--- a/components/style/rule_tree/mod.rs
+++ b/components/style/rule_tree/mod.rs
@@ -488,7 +488,8 @@ impl RuleTree {
return path.clone();
}
- let iter = path.self_and_ancestors()
+ let iter = path
+ .self_and_ancestors()
.take_while(|node| node.cascade_level() >= CascadeLevel::SMILOverride);
let mut last = path;
let mut children = SmallVec::<[_; 10]>::new();
@@ -1452,7 +1453,8 @@ impl StrongRuleNode {
// transitions and animations are present for a given element and
// property, transitions are suppressed so that they don't actually
// override animations.
- let iter = self.self_and_ancestors()
+ let iter = self
+ .self_and_ancestors()
.skip_while(|node| node.cascade_level() == CascadeLevel::Transitions)
.take_while(|node| node.cascade_level() > CascadeLevel::Animations);
let mut result = (LonghandIdSet::new(), false);
diff --git a/components/style/selector_map.rs b/components/style/selector_map.rs
index 3ab78ce2d87..1e35f748917 100644
--- a/components/style/selector_map.rs
+++ b/components/style/selector_map.rs
@@ -287,7 +287,9 @@ impl SelectorMap<Rule> {
context,
flags_setter,
) {
- matching_rules.push(rule.to_applicable_declaration_block(cascade_level, shadow_cascade_order));
+ matching_rules.push(
+ rule.to_applicable_declaration_block(cascade_level, shadow_cascade_order),
+ );
}
}
}
@@ -305,10 +307,12 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
let vector = match find_bucket(entry.selector()) {
Bucket::Root => &mut self.root,
- Bucket::ID(id) => self.id_hash
+ Bucket::ID(id) => self
+ .id_hash
.try_entry(id.clone(), quirks_mode)?
.or_insert_with(SmallVec::new),
- Bucket::Class(class) => self.class_hash
+ Bucket::Class(class) => self
+ .class_hash
.try_entry(class.clone(), quirks_mode)?
.or_insert_with(SmallVec::new),
Bucket::LocalName { name, lower_name } => {
@@ -333,7 +337,8 @@ impl<T: SelectorMapEntry> SelectorMap<T> {
.try_entry(name.clone())?
.or_insert_with(SmallVec::new)
},
- Bucket::Namespace(url) => self.namespace_hash
+ Bucket::Namespace(url) => self
+ .namespace_hash
.try_entry(url.clone())?
.or_insert_with(SmallVec::new),
Bucket::Universal => &mut self.other,
@@ -490,8 +495,9 @@ 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),
+ 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:
@@ -534,7 +540,7 @@ fn find_bucket<'a>(mut iter: SelectorIter<'a, SelectorImpl>) -> Bucket<'a> {
Bucket::Root => return new_bucket,
Bucket::ID(..) => {
current_bucket = new_bucket;
- }
+ },
Bucket::Class(..) => {
if !matches!(current_bucket, Bucket::ID(..)) {
current_bucket = new_bucket;
@@ -549,7 +555,7 @@ fn find_bucket<'a>(mut iter: SelectorIter<'a, SelectorImpl>) -> Bucket<'a> {
if matches!(current_bucket, Bucket::Universal) {
current_bucket = new_bucket;
}
- }
+ },
Bucket::Universal => {},
}
}
diff --git a/components/style/selector_parser.rs b/components/style/selector_parser.rs
index 7250502b1ad..5d6ddbb0e3f 100644
--- a/components/style/selector_parser.rs
+++ b/components/style/selector_parser.rs
@@ -6,11 +6,14 @@
#![deny(missing_docs)]
+use Atom;
use cssparser::{Parser as CssParser, ParserInput};
+use element_state::ElementState;
use selectors::parser::SelectorList;
use std::fmt::{self, Debug, Write};
use style_traits::{CssWriter, ParseError, ToCss};
use stylesheets::{Namespaces, Origin, UrlExtraData};
+use values::serialize_atom_identifier;
/// A convenient alias for the type that represents an attribute value used for
/// selector parser implementation.
@@ -172,27 +175,49 @@ impl<T> PerPseudoElementMap<T> {
}
/// Values for the :dir() pseudo class
+///
+/// "ltr" and "rtl" values are normalized to lowercase.
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq)]
-pub enum Direction {
- /// left-to-right semantic directionality
+pub struct Direction(pub Atom);
+
+/// Horizontal values for the :dir() pseudo class
+#[derive(Clone, Debug, Eq, PartialEq)]
+pub enum HorizontalDirection {
+ /// :dir(ltr)
Ltr,
- /// right-to-left semantic directionality
+ /// :dir(rtl)
Rtl,
- /// Some other provided directionality value
- ///
- /// TODO(emilio): If we atomize we can then unbox in NonTSPseudoClass.
- Other(Box<str>),
}
impl Direction {
/// Parse a direction value.
pub fn parse<'i, 't>(parser: &mut CssParser<'i, 't>) -> Result<Self, ParseError<'i>> {
let ident = parser.expect_ident()?;
- Ok(match_ignore_ascii_case! { &ident,
- "rtl" => Direction::Rtl,
- "ltr" => Direction::Ltr,
- _ => Direction::Other(Box::from(ident.as_ref())),
- })
+ Ok(Direction(match_ignore_ascii_case! { &ident,
+ "rtl" => atom!("rtl"),
+ "ltr" => atom!("ltr"),
+ _ => Atom::from(ident.as_ref()),
+ }))
+ }
+
+ /// Convert this Direction into a HorizontalDirection, if applicable
+ pub fn as_horizontal_direction(&self) -> Option<HorizontalDirection> {
+ if self.0 == atom!("ltr") {
+ Some(HorizontalDirection::Ltr)
+ } else if self.0 == atom!("rtl") {
+ Some(HorizontalDirection::Rtl)
+ } else {
+ None
+ }
+ }
+
+ /// Gets the element state relevant to this :dir() selector.
+ pub fn element_state(&self) -> ElementState {
+ match self.as_horizontal_direction() {
+ Some(HorizontalDirection::Ltr) => ElementState::IN_LTR_STATE,
+ Some(HorizontalDirection::Rtl) => ElementState::IN_RTL_STATE,
+ None => ElementState::empty(),
+ }
}
}
@@ -201,12 +226,6 @@ impl ToCss for Direction {
where
W: Write,
{
- let dir_str = match *self {
- Direction::Rtl => "rtl",
- Direction::Ltr => "ltr",
- // FIXME: This should be escaped as an identifier; see #19231
- Direction::Other(ref other) => other,
- };
- dest.write_str(dir_str)
+ serialize_atom_identifier(&self.0, dest)
}
}
diff --git a/components/style/servo/restyle_damage.rs b/components/style/servo/restyle_damage.rs
index 5cde20c9658..7b49a592751 100644
--- a/components/style/servo/restyle_damage.rs
+++ b/components/style/servo/restyle_damage.rs
@@ -80,9 +80,12 @@ impl ServoRestyleDamage {
/// FIXME(bholley): Do we ever actually need this? Shouldn't
/// RECONSTRUCT_FLOW imply everything else?
pub fn rebuild_and_reflow() -> ServoRestyleDamage {
- ServoRestyleDamage::REPAINT | ServoRestyleDamage::REPOSITION |
- ServoRestyleDamage::STORE_OVERFLOW | ServoRestyleDamage::BUBBLE_ISIZES |
- ServoRestyleDamage::REFLOW_OUT_OF_FLOW | ServoRestyleDamage::REFLOW |
+ ServoRestyleDamage::REPAINT |
+ ServoRestyleDamage::REPOSITION |
+ ServoRestyleDamage::STORE_OVERFLOW |
+ ServoRestyleDamage::BUBBLE_ISIZES |
+ ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
+ ServoRestyleDamage::REFLOW |
ServoRestyleDamage::RECONSTRUCT_FLOW
}
@@ -95,12 +98,14 @@ impl ServoRestyleDamage {
/// returns the damage that we should add to the *parent* of this flow.
pub fn damage_for_parent(self, child_is_absolutely_positioned: bool) -> ServoRestyleDamage {
if child_is_absolutely_positioned {
- self & (ServoRestyleDamage::REPAINT | ServoRestyleDamage::REPOSITION |
+ self & (ServoRestyleDamage::REPAINT |
+ ServoRestyleDamage::REPOSITION |
ServoRestyleDamage::STORE_OVERFLOW |
ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
ServoRestyleDamage::RESOLVE_GENERATED_CONTENT)
} else {
- self & (ServoRestyleDamage::REPAINT | ServoRestyleDamage::REPOSITION |
+ self & (ServoRestyleDamage::REPAINT |
+ ServoRestyleDamage::REPOSITION |
ServoRestyleDamage::STORE_OVERFLOW |
ServoRestyleDamage::REFLOW |
ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
@@ -136,7 +141,8 @@ impl ServoRestyleDamage {
},
_ => {
// TODO(pcwalton): Take floatedness into account.
- self & (ServoRestyleDamage::REPAINT | ServoRestyleDamage::REPOSITION |
+ self & (ServoRestyleDamage::REPAINT |
+ ServoRestyleDamage::REPOSITION |
ServoRestyleDamage::REFLOW)
},
}
@@ -205,22 +211,21 @@ fn compute_damage(old: &ComputedValues, new: &ComputedValues) -> ServoRestyleDam
ServoRestyleDamage::REFLOW,
ServoRestyleDamage::RECONSTRUCT_FLOW
]
- ) ||
- (new.get_box().display == Display::Inline &&
- restyle_damage_rebuild_and_reflow_inline!(
- old,
- new,
- damage,
- [
- ServoRestyleDamage::REPAINT,
- ServoRestyleDamage::REPOSITION,
- ServoRestyleDamage::STORE_OVERFLOW,
- ServoRestyleDamage::BUBBLE_ISIZES,
- ServoRestyleDamage::REFLOW_OUT_OF_FLOW,
- ServoRestyleDamage::REFLOW,
- ServoRestyleDamage::RECONSTRUCT_FLOW
- ]
- )) ||
+ ) || (new.get_box().display == Display::Inline &&
+ restyle_damage_rebuild_and_reflow_inline!(
+ old,
+ new,
+ damage,
+ [
+ ServoRestyleDamage::REPAINT,
+ ServoRestyleDamage::REPOSITION,
+ ServoRestyleDamage::STORE_OVERFLOW,
+ ServoRestyleDamage::BUBBLE_ISIZES,
+ ServoRestyleDamage::REFLOW_OUT_OF_FLOW,
+ ServoRestyleDamage::REFLOW,
+ ServoRestyleDamage::RECONSTRUCT_FLOW
+ ]
+ )) ||
restyle_damage_reflow!(
old,
new,
@@ -244,7 +249,8 @@ fn compute_damage(old: &ComputedValues, new: &ComputedValues) -> ServoRestyleDam
ServoRestyleDamage::STORE_OVERFLOW,
ServoRestyleDamage::REFLOW_OUT_OF_FLOW
]
- ) || restyle_damage_repaint!(old, new, damage, [ServoRestyleDamage::REPAINT]);
+ ) ||
+ restyle_damage_repaint!(old, new, damage, [ServoRestyleDamage::REPAINT]);
// Paint worklets may depend on custom properties,
// so if they have changed we should repaint.
diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs
index 2083539f51b..7c1e082022d 100644
--- a/components/style/servo/selector_parser.rs
+++ b/components/style/servo/selector_parser.rs
@@ -135,6 +135,12 @@ impl PseudoElement {
self.is_before() || self.is_after()
}
+ /// Whether this is an unknown ::-webkit- pseudo-element.
+ #[inline]
+ pub fn is_unknown_webkit_pseudo_element(&self) -> bool {
+ false
+ }
+
/// Whether this pseudo-element is the ::before pseudo.
#[inline]
pub fn is_before(&self) -> bool {
@@ -284,8 +290,8 @@ impl PseudoElement {
}
}
-/// The type used for storing pseudo-class string arguments.
-pub type PseudoClassStringArg = Box<str>;
+/// The type used for storing `:lang` arguments.
+pub type Lang = Box<str>;
/// A non tree-structural pseudo-class.
/// See https://drafts.csswg.org/selectors-4/#structural-pseudos
@@ -302,7 +308,7 @@ pub enum NonTSPseudoClass {
Fullscreen,
Hover,
Indeterminate,
- Lang(PseudoClassStringArg),
+ Lang(Lang),
Link,
PlaceholderShown,
ReadWrite,
@@ -762,7 +768,8 @@ impl ServoElementSnapshot {
operation: &AttrSelectorOperation<&String>,
) -> bool {
match *ns {
- NamespaceConstraint::Specific(ref ns) => self.get_attr(ns, local_name)
+ NamespaceConstraint::Specific(ref ns) => self
+ .get_attr(ns, local_name)
.map_or(false, |value| value.eval_selector(operation)),
NamespaceConstraint::Any => {
self.any_attr_ignore_ns(local_name, |value| value.eval_selector(operation))
diff --git a/components/style/sharing/mod.rs b/components/style/sharing/mod.rs
index d6148d16b49..b3177216f64 100644
--- a/components/style/sharing/mod.rs
+++ b/components/style/sharing/mod.rs
@@ -197,8 +197,7 @@ impl ValidationData {
let values =
OpaqueComputedValues::from(parent.borrow_data().unwrap().styles.primary());
values
- })
- .clone()
+ }).clone()
}
/// Computes the revalidation results if needed, and returns it.
diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs
index 704c875a932..7c65798286e 100644
--- a/components/style/style_adjuster.rs
+++ b/components/style/style_adjuster.rs
@@ -64,10 +64,21 @@ where
// FIXME(emilio): This should be an actual static.
lazy_static! {
static ref SPECIAL_HTML_ELEMENTS: [Atom; 16] = [
- atom!("br"), atom!("wbr"), atom!("meter"), atom!("progress"),
- atom!("canvas"), atom!("embed"), atom!("object"), atom!("audio"),
- atom!("iframe"), atom!("img"), atom!("video"), atom!("frame"),
- atom!("frameset"), atom!("input"), atom!("textarea"),
+ atom!("br"),
+ atom!("wbr"),
+ atom!("meter"),
+ atom!("progress"),
+ atom!("canvas"),
+ atom!("embed"),
+ atom!("object"),
+ atom!("audio"),
+ atom!("iframe"),
+ atom!("img"),
+ atom!("video"),
+ atom!("frame"),
+ atom!("frameset"),
+ atom!("input"),
+ atom!("textarea"),
atom!("select"),
];
}
@@ -79,15 +90,21 @@ where
// UA implements this either.
lazy_static! {
static ref SPECIAL_SVG_ELEMENTS: [Atom; 6] = [
- atom!("svg"), atom!("a"), atom!("g"), atom!("use"),
- atom!("tspan"), atom!("textPath"),
+ atom!("svg"),
+ atom!("a"),
+ atom!("g"),
+ atom!("use"),
+ atom!("tspan"),
+ atom!("textPath"),
];
}
// https://drafts.csswg.org/css-display/#unbox-html
if element.is_html_element() {
let local_name = element.local_name();
- return SPECIAL_HTML_ELEMENTS.iter().any(|name| &**name == local_name);
+ return SPECIAL_HTML_ELEMENTS
+ .iter()
+ .any(|name| &**name == local_name);
}
// https://drafts.csswg.org/css-display/#unbox-svg
@@ -96,7 +113,9 @@ where
return true;
}
let local_name = element.local_name();
- return !SPECIAL_SVG_ELEMENTS.iter().any(|name| &**name == local_name);
+ return !SPECIAL_SVG_ELEMENTS
+ .iter()
+ .any(|name| &**name == local_name);
}
// https://drafts.csswg.org/css-display/#unbox-mathml
@@ -201,11 +220,11 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
pub fn set_bits(&mut self) {
let display = self.style.get_box().clone_display();
- if !display.is_contents() &&
- !self.style
- .get_text()
- .clone_text_decoration_line()
- .is_empty()
+ if !display.is_contents() && !self
+ .style
+ .get_text()
+ .clone_text_decoration_line()
+ .is_empty()
{
self.style
.flags
@@ -280,10 +299,10 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
#[cfg(feature = "gecko")]
fn adjust_for_text_in_ruby(&mut self) {
let parent_display = self.style.get_parent_box().clone_display();
- if parent_display.is_ruby_type() ||
- self.style
- .get_parent_flags()
- .contains(ComputedValueFlags::SHOULD_SUPPRESS_LINEBREAK)
+ if parent_display.is_ruby_type() || self
+ .style
+ .get_parent_flags()
+ .contains(ComputedValueFlags::SHOULD_SUPPRESS_LINEBREAK)
{
self.style
.flags
@@ -370,10 +389,12 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// The initial value of outline-width may be changed at computed value time.
fn adjust_for_outline(&mut self) {
- if self.style
+ if self
+ .style
.get_outline()
.clone_outline_style()
- .none_or_hidden() && self.style.get_outline().outline_has_nonzero_width()
+ .none_or_hidden() &&
+ self.style.get_outline().outline_has_nonzero_width()
{
self.style.mutate_outline().set_outline_width(Au(0).into());
}
@@ -517,7 +538,9 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
let decorations_in_effect = TextDecorationsInEffect::from_style(&self.style);
if self.style.get_inherited_text().text_decorations_in_effect != decorations_in_effect {
- self.style.mutate_inherited_text().text_decorations_in_effect = decorations_in_effect;
+ self.style
+ .mutate_inherited_text()
+ .text_decorations_in_effect = decorations_in_effect;
}
}
@@ -677,11 +700,8 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
/// When comparing to Gecko, this is similar to the work done by
/// `ComputedStyle::ApplyStyleFixups`, plus some parts of
/// `nsStyleSet::GetContext`.
- pub fn adjust<E>(
- &mut self,
- layout_parent_style: &ComputedValues,
- element: Option<E>,
- ) where
+ pub fn adjust<E>(&mut self, layout_parent_style: &ComputedValues, element: Option<E>)
+ where
E: TElement,
{
if cfg!(debug_assertions) {
diff --git a/components/style/style_resolver.rs b/components/style/style_resolver.rs
index b31beff7460..0899faa9ce7 100644
--- a/components/style/style_resolver.rs
+++ b/components/style/style_resolver.rs
@@ -190,8 +190,7 @@ where
) -> PrimaryStyle {
// Before doing the cascade, check the sharing cache and see if we can
// reuse the style via rule node identity.
- let may_reuse =
- !self.element.is_in_native_anonymous_subtree() &&
+ let may_reuse = !self.element.is_in_native_anonymous_subtree() &&
parent_style.is_some() &&
inputs.rules.is_some();
@@ -485,7 +484,8 @@ where
let stylist = &self.context.shared.stylist;
- if !self.element
+ if !self
+ .element
.may_generate_pseudo(pseudo_element, originating_element_style)
{
return None;
diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs
index a3b6e5cdc17..19790aba957 100644
--- a/components/style/stylesheet_set.rs
+++ b/components/style/stylesheet_set.rs
@@ -324,7 +324,8 @@ where
fn insert_before(&mut self, sheet: S, before_sheet: &S) {
debug_assert!(!self.contains(&sheet));
- let index = self.entries
+ let index = self
+ .entries
.iter()
.position(|entry| entry.sheet == *before_sheet)
.expect("`before_sheet` stylesheet not found");
diff --git a/components/style/stylesheets/document_rule.rs b/components/style/stylesheets/document_rule.rs
index 56750ae7b66..9598763e438 100644
--- a/components/style/stylesheets/document_rule.rs
+++ b/components/style/stylesheets/document_rule.rs
@@ -109,7 +109,7 @@ pub enum DocumentMatchingFunction {
Regexp(String),
/// Matching function for a media document.
#[css(function)]
- MediaDocument(MediaDocumentKind)
+ MediaDocument(MediaDocumentKind),
}
macro_rules! parse_quoted_or_unquoted_string {
@@ -120,8 +120,7 @@ macro_rules! parse_quoted_or_unquoted_string {
.parse_entirely(|input| {
let string = input.expect_string()?;
Ok($url_matching_function(string.as_ref().to_owned()))
- })
- .or_else(|_: ParseError| {
+ }).or_else(|_: ParseError| {
while let Ok(_) = input.next() {}
Ok($url_matching_function(input.slice_from(start).to_string()))
})
@@ -136,7 +135,7 @@ impl DocumentMatchingFunction {
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
if let Ok(url) = input.try(|input| CssUrl::parse(context, input)) {
- return Ok(DocumentMatchingFunction::Url(url))
+ return Ok(DocumentMatchingFunction::Url(url));
}
let location = input.current_source_location();
@@ -181,7 +180,9 @@ impl DocumentMatchingFunction {
DocumentMatchingFunction::UrlPrefix(_) => GeckoDocumentMatchingFunction::URLPrefix,
DocumentMatchingFunction::Domain(_) => GeckoDocumentMatchingFunction::Domain,
DocumentMatchingFunction::Regexp(_) => GeckoDocumentMatchingFunction::RegExp,
- DocumentMatchingFunction::MediaDocument(_) => GeckoDocumentMatchingFunction::MediaDocument,
+ DocumentMatchingFunction::MediaDocument(_) => {
+ GeckoDocumentMatchingFunction::MediaDocument
+ },
};
let pattern = nsCStr::from(match *self {
@@ -189,14 +190,12 @@ impl DocumentMatchingFunction {
DocumentMatchingFunction::UrlPrefix(ref pat) |
DocumentMatchingFunction::Domain(ref pat) |
DocumentMatchingFunction::Regexp(ref pat) => pat,
- DocumentMatchingFunction::MediaDocument(kind) => {
- match kind {
- MediaDocumentKind::All => "all",
- MediaDocumentKind::Image => "image",
- MediaDocumentKind::Plugin => "plugin",
- MediaDocumentKind::Video => "video",
- }
- }
+ DocumentMatchingFunction::MediaDocument(kind) => match kind {
+ MediaDocumentKind::All => "all",
+ MediaDocumentKind::Image => "image",
+ MediaDocumentKind::Plugin => "plugin",
+ MediaDocumentKind::Video => "video",
+ },
});
unsafe { Gecko_DocumentRule_UseForPresentation(device.pres_context(), &*pattern, func) }
}
diff --git a/components/style/stylesheets/font_feature_values_rule.rs b/components/style/stylesheets/font_feature_values_rule.rs
index c70a46c1c9d..76170151c67 100644
--- a/components/style/stylesheets/font_feature_values_rule.rs
+++ b/components/style/stylesheets/font_feature_values_rule.rs
@@ -70,7 +70,8 @@ impl Parse for SingleValue {
match *input.next()? {
Token::Number {
int_value: Some(v), ..
- } if v >= 0 =>
+ }
+ if v >= 0 =>
{
Ok(SingleValue(v as u32))
},
@@ -102,7 +103,8 @@ impl Parse for PairValues {
let first = match *input.next()? {
Token::Number {
int_value: Some(a), ..
- } if a >= 0 =>
+ }
+ if a >= 0 =>
{
a as u32
},
@@ -112,7 +114,8 @@ impl Parse for PairValues {
match input.next() {
Ok(&Token::Number {
int_value: Some(b), ..
- }) if b >= 0 =>
+ })
+ if b >= 0 =>
{
Ok(PairValues(first, Some(b as u32)))
},
@@ -154,7 +157,8 @@ impl Parse for VectorValues {
match input.next() {
Ok(&Token::Number {
int_value: Some(a), ..
- }) if a >= 0 =>
+ })
+ if a >= 0 =>
{
vec.push(a as u32);
}
diff --git a/components/style/stylesheets/keyframes_rule.rs b/components/style/stylesheets/keyframes_rule.rs
index 91bc14be5b5..50c61047e52 100644
--- a/components/style/stylesheets/keyframes_rule.rs
+++ b/components/style/stylesheets/keyframes_rule.rs
@@ -82,16 +82,14 @@ impl DeepCloneWithLock for KeyframesRule {
) -> Self {
KeyframesRule {
name: self.name.clone(),
- keyframes: self.keyframes
+ keyframes: self
+ .keyframes
.iter()
.map(|x| {
- Arc::new(lock.wrap(x.read_with(guard).deep_clone_with_lock(
- lock,
- guard,
- params,
- )))
- })
- .collect(),
+ Arc::new(
+ lock.wrap(x.read_with(guard).deep_clone_with_lock(lock, guard, params)),
+ )
+ }).collect(),
vendor_prefix: self.vendor_prefix.clone(),
source_location: self.source_location.clone(),
}
@@ -142,7 +140,8 @@ impl KeyframePercentage {
Token::Percentage {
unit_value: percentage,
..
- } if percentage >= 0. && percentage <= 1. =>
+ }
+ if percentage >= 0. && percentage <= 1. =>
{
Ok(KeyframePercentage::new(percentage))
},
@@ -219,6 +218,7 @@ impl Keyframe {
ParsingMode::DEFAULT,
parent_stylesheet_contents.quirks_mode,
None,
+ None,
);
context.namespaces = Some(&*namespaces);
let mut input = ParserInput::new(css);
@@ -260,8 +260,10 @@ pub enum KeyframesStepValue {
/// A step formed by a declaration block specified by the CSS.
Declarations {
/// The declaration block per se.
- #[cfg_attr(feature = "gecko",
- ignore_malloc_size_of = "XXX: Primary ref, measure if DMD says it's worthwhile")]
+ #[cfg_attr(
+ feature = "gecko",
+ ignore_malloc_size_of = "XXX: Primary ref, measure if DMD says it's worthwhile"
+ )]
#[cfg_attr(feature = "servo", ignore_malloc_size_of = "Arc")]
block: Arc<Locked<PropertyDeclarationBlock>>,
},
@@ -325,8 +327,7 @@ impl KeyframesStep {
let (declaration, _) = guard
.get(PropertyDeclarationId::Longhand(
LonghandId::AnimationTimingFunction,
- ))
- .unwrap();
+ )).unwrap();
match *declaration {
PropertyDeclaration::AnimationTimingFunction(ref value) => {
// Use the first value.
@@ -499,7 +500,7 @@ pub fn parse_keyframe_list(
declarations: &mut declarations,
},
).filter_map(Result::ok)
- .collect()
+ .collect()
}
impl<'a, 'i> AtRuleParser<'i> for KeyframeListParser<'a> {
@@ -524,7 +525,7 @@ impl<'a, 'i> QualifiedRuleParser<'i> for KeyframeListParser<'a> {
let error = ContextualParseError::InvalidKeyframeRule(
input.slice_from(start_position),
e.clone(),
- );
+ );
self.context.log_css_error(location, error);
e
})
@@ -551,10 +552,7 @@ impl<'a, 'i> QualifiedRuleParser<'i> for KeyframeListParser<'a> {
while let Some(declaration) = iter.next() {
match declaration {
Ok(()) => {
- block.extend(
- iter.parser.declarations.drain(),
- Importance::Normal,
- );
+ block.extend(iter.parser.declarations.drain(), Importance::Normal);
},
Err((error, slice)) => {
iter.parser.declarations.clear();
@@ -598,9 +596,9 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for KeyframeDeclarationParser<'a, 'b> {
) -> Result<(), ParseError<'i>> {
let id = match PropertyId::parse(&name, self.context) {
Ok(id) => id,
- Err(()) => return Err(input.new_custom_error(
- StyleParseErrorKind::UnknownProperty(name)
- )),
+ Err(()) => {
+ return Err(input.new_custom_error(StyleParseErrorKind::UnknownProperty(name)))
+ },
};
// TODO(emilio): Shouldn't this use parse_entirely?
diff --git a/components/style/stylesheets/mod.rs b/components/style/stylesheets/mod.rs
index e3641f3e515..5058ad94e80 100644
--- a/components/style/stylesheets/mod.rs
+++ b/components/style/stylesheets/mod.rs
@@ -63,7 +63,7 @@ pub type UrlExtraData = ::servo_url::ServoUrl;
#[cfg(feature = "gecko")]
#[derive(Clone, PartialEq)]
pub struct UrlExtraData(
- pub ::gecko_bindings::sugar::refptr::RefPtr<::gecko_bindings::structs::URLExtraData>
+ pub ::gecko_bindings::sugar::refptr::RefPtr<::gecko_bindings::structs::URLExtraData>,
);
#[cfg(feature = "gecko")]
@@ -102,11 +102,14 @@ impl fmt::Debug for UrlExtraData {
}
}
- formatter.debug_struct("URLExtraData")
+ formatter
+ .debug_struct("URLExtraData")
.field("is_chrome", &self.is_chrome())
.field("base", &DebugURI(self.0.mBaseURI.raw::<structs::nsIURI>()))
- .field("referrer", &DebugURI(self.0.mReferrer.raw::<structs::nsIURI>()))
- .finish()
+ .field(
+ "referrer",
+ &DebugURI(self.0.mReferrer.raw::<structs::nsIURI>()),
+ ).finish()
}
}
@@ -264,6 +267,7 @@ impl CssRule {
ParsingMode::DEFAULT,
parent_stylesheet_contents.quirks_mode,
None,
+ None,
);
let mut input = ParserInput::new(css);
@@ -284,9 +288,7 @@ impl CssRule {
};
parse_one_rule(&mut input, &mut rule_parser)
- .map_err(|_| {
- rule_parser.dom_error.unwrap_or(RulesMutateError::Syntax)
- })
+ .map_err(|_| rule_parser.dom_error.unwrap_or(RulesMutateError::Syntax))
}
}
@@ -304,25 +306,22 @@ impl DeepCloneWithLock for CssRule {
CssRule::Namespace(Arc::new(lock.wrap(rule.clone())))
},
CssRule::Import(ref arc) => {
- let rule = arc.read_with(guard)
+ let rule = arc
+ .read_with(guard)
.deep_clone_with_lock(lock, guard, params);
CssRule::Import(Arc::new(lock.wrap(rule)))
},
CssRule::Style(ref arc) => {
let rule = arc.read_with(guard);
- CssRule::Style(Arc::new(lock.wrap(rule.deep_clone_with_lock(
- lock,
- guard,
- params,
- ))))
+ CssRule::Style(Arc::new(
+ lock.wrap(rule.deep_clone_with_lock(lock, guard, params)),
+ ))
},
CssRule::Media(ref arc) => {
let rule = arc.read_with(guard);
- CssRule::Media(Arc::new(lock.wrap(rule.deep_clone_with_lock(
- lock,
- guard,
- params,
- ))))
+ CssRule::Media(Arc::new(
+ lock.wrap(rule.deep_clone_with_lock(lock, guard, params)),
+ ))
},
CssRule::FontFace(ref arc) => {
let rule = arc.read_with(guard);
@@ -342,35 +341,27 @@ impl DeepCloneWithLock for CssRule {
},
CssRule::Keyframes(ref arc) => {
let rule = arc.read_with(guard);
- CssRule::Keyframes(Arc::new(lock.wrap(rule.deep_clone_with_lock(
- lock,
- guard,
- params,
- ))))
+ CssRule::Keyframes(Arc::new(
+ lock.wrap(rule.deep_clone_with_lock(lock, guard, params)),
+ ))
},
CssRule::Supports(ref arc) => {
let rule = arc.read_with(guard);
- CssRule::Supports(Arc::new(lock.wrap(rule.deep_clone_with_lock(
- lock,
- guard,
- params,
- ))))
+ CssRule::Supports(Arc::new(
+ lock.wrap(rule.deep_clone_with_lock(lock, guard, params)),
+ ))
},
CssRule::Page(ref arc) => {
let rule = arc.read_with(guard);
- CssRule::Page(Arc::new(lock.wrap(rule.deep_clone_with_lock(
- lock,
- guard,
- params,
- ))))
+ CssRule::Page(Arc::new(
+ lock.wrap(rule.deep_clone_with_lock(lock, guard, params)),
+ ))
},
CssRule::Document(ref arc) => {
let rule = arc.read_with(guard);
- CssRule::Document(Arc::new(lock.wrap(rule.deep_clone_with_lock(
- lock,
- guard,
- params,
- ))))
+ CssRule::Document(Arc::new(
+ lock.wrap(rule.deep_clone_with_lock(lock, guard, params)),
+ ))
},
}
}
diff --git a/components/style/stylesheets/rule_list.rs b/components/style/stylesheets/rule_list.rs
index 35edc22b3da..cfbf62ea721 100644
--- a/components/style/stylesheets/rule_list.rs
+++ b/components/style/stylesheets/rule_list.rs
@@ -156,7 +156,11 @@ impl CssRulesHelpers for RawOffsetArc<Locked<CssRules>> {
} else if index == 0 {
State::Start
} else {
- rules.0.get(index - 1).map(CssRule::rule_state).unwrap_or(State::Body)
+ rules
+ .0
+ .get(index - 1)
+ .map(CssRule::rule_state)
+ .unwrap_or(State::Body)
};
let insert_rule_context = InsertRuleContext {
diff --git a/components/style/stylesheets/rule_parser.rs b/components/style/stylesheets/rule_parser.rs
index d2f9b691ad4..683378b9b96 100644
--- a/components/style/stylesheets/rule_parser.rs
+++ b/components/style/stylesheets/rule_parser.rs
@@ -110,8 +110,9 @@ impl<'b> TopLevelRuleParser<'b> {
// If there's anything that isn't a namespace rule (or import rule, but
// we checked that already at the beginning), reject with a
// StateError.
- if new_state == State::Namespaces &&
- ctx.rule_list[ctx.index..].iter().any(|r| !matches!(*r, CssRule::Namespace(..)))
+ if new_state == State::Namespaces && ctx.rule_list[ctx.index..]
+ .iter()
+ .any(|r| !matches!(*r, CssRule::Namespace(..)))
{
self.dom_error = Some(RulesMutateError::InvalidState);
return false;
@@ -227,7 +228,7 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
}
if !self.check_state(State::Body) {
- return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
+ return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
}
AtRuleParser::parse_prelude(&mut self.nested(), name, input)
@@ -254,7 +255,8 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
) -> CssRule {
match prelude {
AtRuleNonBlockPrelude::Import(url, media) => {
- let loader = self.loader
+ let loader = self
+ .loader
.expect("Expected a stylesheet loader for @import");
let import_rule = loader.request_stylesheet(
@@ -299,7 +301,7 @@ impl<'a, 'i> QualifiedRuleParser<'i> for TopLevelRuleParser<'a> {
input: &mut Parser<'i, 't>,
) -> Result<Self::Prelude, ParseError<'i>> {
if !self.check_state(State::Body) {
- return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
+ return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
}
QualifiedRuleParser::parse_prelude(&mut self.nested(), input)
@@ -312,15 +314,12 @@ impl<'a, 'i> QualifiedRuleParser<'i> for TopLevelRuleParser<'a> {
location: SourceLocation,
input: &mut Parser<'i, 't>,
) -> Result<CssRule, ParseError<'i>> {
- QualifiedRuleParser::parse_block(
- &mut self.nested(),
- prelude,
- location,
- input,
- ).map(|result| {
- self.state = State::Body;
- result
- })
+ QualifiedRuleParser::parse_block(&mut self.nested(), prelude, location, input).map(
+ |result| {
+ self.state = State::Body;
+ result
+ },
+ )
}
}
@@ -338,11 +337,7 @@ impl<'a, 'b> NestedRuleParser<'a, 'b> {
input: &mut Parser,
rule_type: CssRuleType,
) -> Arc<Locked<CssRules>> {
- let context = ParserContext::new_with_rule_type(
- self.context,
- rule_type,
- self.namespaces,
- );
+ let context = ParserContext::new_with_rule_type(self.context, rule_type, self.namespaces);
let nested_parser = NestedRuleParser {
stylesheet_origin: self.stylesheet_origin,
@@ -478,12 +473,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
);
Ok(CssRule::FontFeatureValues(Arc::new(self.shared_lock.wrap(
- FontFeatureValuesRule::parse(
- &context,
- input,
- family_names,
- source_location,
- ),
+ FontFeatureValuesRule::parse(&context, input, family_names, source_location),
))))
},
AtRuleBlockPrelude::CounterStyle(name) => {
@@ -493,16 +483,9 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
self.namespaces,
);
- Ok(CssRule::CounterStyle(Arc::new(
- self.shared_lock.wrap(
- parse_counter_style_body(
- name,
- &context,
- input,
- source_location,
- )?.into(),
- ),
- )))
+ Ok(CssRule::CounterStyle(Arc::new(self.shared_lock.wrap(
+ parse_counter_style_body(name, &context, input, source_location)?.into(),
+ ))))
},
AtRuleBlockPrelude::Media(media_queries) => {
Ok(CssRule::Media(Arc::new(self.shared_lock.wrap(MediaRule {
@@ -535,9 +518,9 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
self.namespaces,
);
- Ok(CssRule::Viewport(Arc::new(self.shared_lock.wrap(
- ViewportRule::parse(&context, input)?,
- ))))
+ Ok(CssRule::Viewport(Arc::new(
+ self.shared_lock.wrap(ViewportRule::parse(&context, input)?),
+ )))
},
AtRuleBlockPrelude::Keyframes(name, vendor_prefix) => {
let context = ParserContext::new_with_rule_type(
@@ -549,11 +532,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
Ok(CssRule::Keyframes(Arc::new(self.shared_lock.wrap(
KeyframesRule {
name,
- keyframes: parse_keyframe_list(
- &context,
- input,
- self.shared_lock,
- ),
+ keyframes: parse_keyframe_list(&context, input, self.shared_lock),
vendor_prefix,
source_location,
},
@@ -566,8 +545,7 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
self.namespaces,
);
- let declarations =
- parse_property_declaration_list(&context, input);
+ let declarations = parse_property_declaration_list(&context, input);
Ok(CssRule::Page(Arc::new(self.shared_lock.wrap(PageRule {
block: Arc::new(self.shared_lock.wrap(declarations)),
source_location,
diff --git a/components/style/stylesheets/rules_iterator.rs b/components/style/stylesheets/rules_iterator.rs
index b46e24c22c7..eac6d2084e2 100644
--- a/components/style/stylesheets/rules_iterator.rs
+++ b/components/style/stylesheets/rules_iterator.rs
@@ -100,10 +100,7 @@ where
) {
continue;
}
- import_rule
- .stylesheet
- .rules(self.guard)
- .iter()
+ import_rule.stylesheet.rules(self.guard).iter()
},
CssRule::Document(ref doc_rule) => {
let doc_rule = doc_rule.read_with(self.guard);
diff --git a/components/style/stylesheets/stylesheet.rs b/components/style/stylesheets/stylesheet.rs
index 02730f7090d..e1359cb3722 100644
--- a/components/style/stylesheets/stylesheet.rs
+++ b/components/style/stylesheets/stylesheet.rs
@@ -24,6 +24,7 @@ use stylesheets::loader::StylesheetLoader;
use stylesheets::rule_parser::{State, TopLevelRuleParser};
use stylesheets::rules_iterator::{EffectiveRules, EffectiveRulesIterator};
use stylesheets::rules_iterator::{NestedRuleIterationCondition, RulesIterator};
+use use_counters::UseCounters;
/// This structure holds the user-agent and user stylesheets.
pub struct UserAgentStylesheets {
@@ -78,6 +79,7 @@ impl StylesheetContents {
error_reporter: Option<&ParseErrorReporter>,
quirks_mode: QuirksMode,
line_number_offset: u32,
+ use_counters: Option<&UseCounters>,
) -> Self {
let namespaces = RwLock::new(Namespaces::default());
let (rules, source_map_url, source_url) = Stylesheet::parse_rules(
@@ -90,6 +92,7 @@ impl StylesheetContents {
error_reporter,
quirks_mode,
line_number_offset,
+ use_counters,
);
Self {
@@ -126,7 +129,8 @@ impl DeepCloneWithLock for StylesheetContents {
params: &DeepCloneParams,
) -> Self {
// Make a deep clone of the rules, using the new lock.
- let rules = self.rules
+ let rules = self
+ .rules
.read_with(guard)
.deep_clone_with_lock(lock, guard, params);
@@ -176,7 +180,7 @@ macro_rules! rule_filter {
}
/// A trait to represent a given stylesheet in a document.
-pub trait StylesheetInDocument : ::std::fmt::Debug {
+pub trait StylesheetInDocument: ::std::fmt::Debug {
/// Get the stylesheet origin.
fn origin(&self, guard: &SharedRwLockReadGuard) -> Origin;
@@ -315,6 +319,8 @@ impl Stylesheet {
line_number_offset: u32,
) {
let namespaces = RwLock::new(Namespaces::default());
+
+ // FIXME: Consider adding use counters to Servo?
let (rules, source_map_url, source_url) = Self::parse_rules(
css,
&url_data,
@@ -325,6 +331,7 @@ impl Stylesheet {
error_reporter,
existing.contents.quirks_mode,
line_number_offset,
+ /* use_counters = */ None,
);
*existing.contents.url_data.write() = url_data;
@@ -350,6 +357,7 @@ impl Stylesheet {
error_reporter: Option<&ParseErrorReporter>,
quirks_mode: QuirksMode,
line_number_offset: u32,
+ use_counters: Option<&UseCounters>,
) -> (Vec<CssRule>, Option<String>, Option<String>) {
let mut rules = Vec::new();
let mut input = ParserInput::new_with_line_number_offset(css, line_number_offset);
@@ -362,6 +370,7 @@ impl Stylesheet {
ParsingMode::DEFAULT,
quirks_mode,
error_reporter,
+ use_counters,
);
let rule_parser = TopLevelRuleParser {
@@ -391,10 +400,7 @@ impl Stylesheet {
Err((error, slice)) => {
let location = error.location;
let error = ContextualParseError::InvalidRule(slice, error);
- iter.parser.context.log_css_error(
- location,
- error,
- );
+ iter.parser.context.log_css_error(location, error);
},
}
}
@@ -421,6 +427,7 @@ impl Stylesheet {
quirks_mode: QuirksMode,
line_number_offset: u32,
) -> Self {
+ // FIXME: Consider adding use counters to Servo?
let contents = StylesheetContents::from_str(
css,
url_data,
@@ -430,6 +437,7 @@ impl Stylesheet {
error_reporter,
quirks_mode,
line_number_offset,
+ /* use_counters = */ None,
);
Stylesheet {
@@ -468,7 +476,8 @@ impl Clone for Stylesheet {
// Make a deep clone of the media, using the new lock.
let media = self.media.read_with(&guard).clone();
let media = Arc::new(lock.wrap(media));
- let contents = self.contents
+ let contents = self
+ .contents
.deep_clone_with_lock(&lock, &guard, &DeepCloneParams);
Stylesheet {
diff --git a/components/style/stylesheets/supports_rule.rs b/components/style/stylesheets/supports_rule.rs
index f8c3235f295..2851d8914dd 100644
--- a/components/style/stylesheets/supports_rule.rs
+++ b/components/style/stylesheets/supports_rule.rs
@@ -168,9 +168,7 @@ impl SupportsCondition {
i.expect_string()
.map(|s| s.to_string())
.map_err(CssParseError::<()>::from)
- }).and_then(|s| {
- CString::new(s).map_err(|_| location.new_custom_error(()))
- })
+ }).and_then(|s| CString::new(s).map_err(|_| location.new_custom_error(())))
}) {
return Ok(SupportsCondition::MozBoolPref(name));
}
@@ -315,24 +313,21 @@ impl Declaration {
let mut input = ParserInput::new(&self.0);
let mut input = Parser::new(&mut input);
- input.parse_entirely(|input| -> Result<(), CssParseError<()>> {
- let prop = input.expect_ident_cloned().unwrap();
- input.expect_colon().unwrap();
+ input
+ .parse_entirely(|input| -> Result<(), CssParseError<()>> {
+ let prop = input.expect_ident_cloned().unwrap();
+ input.expect_colon().unwrap();
- let id = PropertyId::parse(&prop, context)
- .map_err(|_| input.new_custom_error(()))?;
+ let id =
+ PropertyId::parse(&prop, context).map_err(|_| input.new_custom_error(()))?;
- let mut declarations = SourcePropertyDeclaration::new();
- input.parse_until_before(Delimiter::Bang, |input| {
- PropertyDeclaration::parse_into(
- &mut declarations,
- id,
- &context,
- input,
- ).map_err(|_| input.new_custom_error(()))
- })?;
- let _ = input.try(parse_important);
- Ok(())
- }).is_ok()
+ let mut declarations = SourcePropertyDeclaration::new();
+ input.parse_until_before(Delimiter::Bang, |input| {
+ PropertyDeclaration::parse_into(&mut declarations, id, &context, input)
+ .map_err(|_| input.new_custom_error(()))
+ })?;
+ let _ = input.try(parse_important);
+ Ok(())
+ }).is_ok()
}
}
diff --git a/components/style/stylesheets/viewport_rule.rs b/components/style/stylesheets/viewport_rule.rs
index 1fc6a988c7c..16bffd14ab2 100644
--- a/components/style/stylesheets/viewport_rule.rs
+++ b/components/style/stylesheets/viewport_rule.rs
@@ -375,8 +375,7 @@ impl ViewportRule {
Err((error, slice)) => {
let location = error.location;
let error = ContextualParseError::UnsupportedViewportDescriptorDeclaration(
- slice,
- error,
+ slice, error,
);
context.log_css_error(location, error);
},
@@ -760,9 +759,9 @@ impl MaybeNew for ViewportConstraints {
Some(initial_viewport.$dimension.scale_by(value.0))
},
LengthOrPercentageOrAuto::Auto => None,
- LengthOrPercentageOrAuto::Calc(ref calc) => calc.to_computed_value(
- &context,
- ).to_used_value(Some(initial_viewport.$dimension)),
+ LengthOrPercentageOrAuto::Calc(ref calc) => calc
+ .to_computed_value(&context)
+ .to_used_value(Some(initial_viewport.$dimension)),
},
ViewportLength::ExtendToZoom => {
// $extend_to will be 'None' if 'extend-to-zoom' is 'auto'
diff --git a/components/style/stylist.rs b/components/style/stylist.rs
index 1fbf493667f..c933897f858 100644
--- a/components/style/stylist.rs
+++ b/components/style/stylist.rs
@@ -24,11 +24,11 @@ use properties::{self, CascadeMode, ComputedValues};
use properties::{AnimationRules, PropertyDeclarationBlock};
use rule_cache::{RuleCache, RuleCacheConditions};
use rule_tree::{CascadeLevel, RuleTree, ShadowCascadeOrder, StrongRuleNode, StyleSource};
-use selector_map::{PrecomputedHashMap, SelectorMap, SelectorMapEntry};
+use selector_map::{PrecomputedHashMap, PrecomputedHashSet, SelectorMap, SelectorMapEntry};
use selector_parser::{PerPseudoElementMap, PseudoElement, SelectorImpl, SnapshotMap};
use selectors::NthIndexCache;
use selectors::attr::{CaseSensitivity, NamespaceConstraint};
-use selectors::bloom::{BloomFilter, NonCountingBloomFilter};
+use selectors::bloom::BloomFilter;
use selectors::matching::{matches_selector, ElementSelectorFlags, MatchingContext, MatchingMode};
use selectors::matching::VisitedHandlingMode;
use selectors::parser::{AncestorHashes, Combinator, Component, Selector};
@@ -184,8 +184,10 @@ impl UserAgentCascadeData {
#[derive(Default)]
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
struct DocumentCascadeData {
- #[cfg_attr(feature = "servo",
- ignore_malloc_size_of = "Arc, owned by UserAgentCascadeDataCache")]
+ #[cfg_attr(
+ feature = "servo",
+ ignore_malloc_size_of = "Arc, owned by UserAgentCascadeDataCache"
+ )]
user_agent: Arc<UserAgentCascadeData>,
user: CascadeData,
author: CascadeData,
@@ -350,7 +352,10 @@ pub struct Stylist {
stylesheets: StylistStylesheetSet,
/// If true, the quirks-mode stylesheet is applied.
- #[cfg_attr(feature = "servo", ignore_malloc_size_of = "defined in selectors")]
+ #[cfg_attr(
+ feature = "servo",
+ ignore_malloc_size_of = "defined in selectors"
+ )]
quirks_mode: QuirksMode,
/// Selector maps for all of the style sheets in the stylist, after
@@ -681,7 +686,8 @@ impl Stylist {
extra_declarations: Option<Vec<ApplicableDeclarationBlock>>,
) -> StrongRuleNode {
let mut decl;
- let declarations = match self.cascade_data
+ let declarations = match self
+ .cascade_data
.user_agent
.precomputed_pseudo_element_decls
.get(pseudo)
@@ -852,7 +858,7 @@ impl Stylist {
} else {
None
}
- }
+ },
};
// Read the comment on `precomputed_values_for_pseudo` to see why it's
@@ -1129,11 +1135,10 @@ impl Stylist {
let rule_hash_target = element.rule_hash_target();
let matches_user_rules = rule_hash_target.matches_user_and_author_rules();
- let matches_author_rules =
- matches_user_rules && self.author_styles_enabled == AuthorStylesEnabled::Yes;
// Normal user-agent rules.
- if let Some(map) = self.cascade_data
+ if let Some(map) = self
+ .cascade_data
.user_agent
.cascade_data
.normal_rules(pseudo_element)
@@ -1195,7 +1200,11 @@ impl Stylist {
}
}
- let mut match_document_author_rules = matches_author_rules;
+ if self.author_styles_enabled == AuthorStylesEnabled::No {
+ return;
+ }
+
+ let mut match_document_author_rules = matches_user_rules;
let mut shadow_cascade_order = 0;
// XBL / Shadow DOM rules, which are author rules too.
@@ -1204,95 +1213,107 @@ impl Stylist {
// particular, normally document rules override ::slotted() rules, but
// for !important it should be the other way around. So probably we need
// to add some sort of AuthorScoped cascade level or something.
- if matches_author_rules {
- if let Some(shadow) = rule_hash_target.shadow_root() {
- if let Some(map) = shadow.style_data().host_rules(pseudo_element) {
- context.with_shadow_host(Some(rule_hash_target), |context| {
- map.get_all_matching_rules(
- element,
- rule_hash_target,
- applicable_declarations,
- context,
- flags_setter,
- CascadeLevel::InnerShadowNormal,
- shadow_cascade_order,
- );
- });
- shadow_cascade_order += 1;
- }
+ if let Some(shadow) = rule_hash_target.shadow_root() {
+ if let Some(map) = shadow
+ .style_data()
+ .and_then(|data| data.host_rules(pseudo_element))
+ {
+ context.with_shadow_host(Some(rule_hash_target), |context| {
+ map.get_all_matching_rules(
+ element,
+ rule_hash_target,
+ applicable_declarations,
+ context,
+ flags_setter,
+ CascadeLevel::InnerShadowNormal,
+ shadow_cascade_order,
+ );
+ });
+ shadow_cascade_order += 1;
}
+ }
- // Match slotted rules in reverse order, so that the outer slotted
- // rules come before the inner rules (and thus have less priority).
- let mut slots = SmallVec::<[_; 3]>::new();
- let mut current = rule_hash_target.assigned_slot();
- while let Some(slot) = current {
- slots.push(slot);
- current = slot.assigned_slot();
- }
+ // Match slotted rules in reverse order, so that the outer slotted
+ // rules come before the inner rules (and thus have less priority).
+ let mut slots = SmallVec::<[_; 3]>::new();
+ let mut current = rule_hash_target.assigned_slot();
+ while let Some(slot) = current {
+ slots.push(slot);
+ current = slot.assigned_slot();
+ }
- for slot in slots.iter().rev() {
- let shadow = slot.containing_shadow().unwrap();
- let styles = shadow.style_data();
- if let Some(map) = styles.slotted_rules(pseudo_element) {
- context.with_shadow_host(Some(shadow.host()), |context| {
- map.get_all_matching_rules(
- element,
- rule_hash_target,
- applicable_declarations,
- context,
- flags_setter,
- CascadeLevel::InnerShadowNormal,
- shadow_cascade_order,
- );
- });
- shadow_cascade_order += 1;
- }
+ for slot in slots.iter().rev() {
+ let shadow = slot.containing_shadow().unwrap();
+ if let Some(map) = shadow
+ .style_data()
+ .and_then(|data| data.slotted_rules(pseudo_element))
+ {
+ context.with_shadow_host(Some(shadow.host()), |context| {
+ map.get_all_matching_rules(
+ element,
+ rule_hash_target,
+ applicable_declarations,
+ context,
+ flags_setter,
+ CascadeLevel::InnerShadowNormal,
+ shadow_cascade_order,
+ );
+ });
+ shadow_cascade_order += 1;
}
+ }
- if let Some(containing_shadow) = rule_hash_target.containing_shadow() {
- let cascade_data = containing_shadow.style_data();
- let host = containing_shadow.host();
- if let Some(map) = cascade_data.normal_rules(pseudo_element) {
- context.with_shadow_host(Some(host), |context| {
- map.get_all_matching_rules(
- element,
- rule_hash_target,
- applicable_declarations,
- context,
- flags_setter,
- CascadeLevel::SameTreeAuthorNormal,
- shadow_cascade_order,
- );
- });
- shadow_cascade_order += 1;
- }
+ let mut current_containing_shadow = rule_hash_target.containing_shadow();
+ while let Some(containing_shadow) = current_containing_shadow {
+ let cascade_data = containing_shadow.style_data();
+ let host = containing_shadow.host();
+ if let Some(map) = cascade_data.and_then(|data| data.normal_rules(pseudo_element)) {
+ context.with_shadow_host(Some(host), |context| {
+ map.get_all_matching_rules(
+ element,
+ rule_hash_target,
+ applicable_declarations,
+ context,
+ flags_setter,
+ CascadeLevel::SameTreeAuthorNormal,
+ shadow_cascade_order,
+ );
+ });
+ shadow_cascade_order += 1;
+ }
- // NOTE(emilio): Hack so <svg:use> matches document rules as
- // expected.
- //
- // This is not a problem for invalidation and that kind of stuff
- // because they still don't match rules based on elements
- // outside of the shadow tree, and because the <svg:use> subtree
- // is immutable and recreated each time the source tree changes.
- //
- // See: https://github.com/w3c/svgwg/issues/504
- //
- // Note that we always resolve URLs against the document, so we
- // can't get into a nested shadow situation here.
- //
- // See: https://github.com/w3c/svgwg/issues/505
- //
- let host_is_svg_use =
- host.is_svg_element() &&
- host.local_name() == &*local_name!("use");
+ let host_is_svg_use_element =
+ host.is_svg_element() && host.local_name() == &*local_name!("use");
- match_document_author_rules = host_is_svg_use;
+ if !host_is_svg_use_element {
+ match_document_author_rules = false;
+ break;
}
+
+ debug_assert!(
+ cascade_data.is_none(),
+ "We allow no stylesheets in <svg:use> subtrees"
+ );
+
+ // NOTE(emilio): Hack so <svg:use> matches the rules of the
+ // enclosing tree.
+ //
+ // This is not a problem for invalidation and that kind of stuff
+ // because they still don't match rules based on elements
+ // outside of the shadow tree, and because the <svg:use>
+ // subtrees are immutable and recreated each time the source
+ // tree changes.
+ //
+ // We historically allow cross-document <svg:use> to have these
+ // rules applied, but I think that's not great. Gecko is the
+ // only engine supporting that.
+ //
+ // See https://github.com/w3c/svgwg/issues/504 for the relevant
+ // spec discussion.
+ current_containing_shadow = host.containing_shadow();
+ match_document_author_rules = current_containing_shadow.is_none();
}
- // FIXME(emilio): This doesn't account for the author_styles_enabled
- // stuff...
let cut_xbl_binding_inheritance =
element.each_xbl_cascade_data(|cascade_data, quirks_mode| {
if let Some(map) = cascade_data.normal_rules(pseudo_element) {
@@ -1392,17 +1413,12 @@ impl Stylist {
CaseSensitivity::CaseSensitive => {},
}
- let hash = id.get_hash();
- self.any_applicable_rule_data(element, |data| data.mapped_ids.might_contain_hash(hash))
+ self.any_applicable_rule_data(element, |data| data.mapped_ids.contains(id))
}
/// Returns the registered `@keyframes` animation for the specified name.
#[inline]
- pub fn get_animation<'a, E>(
- &'a self,
- name: &Atom,
- element: E,
- ) -> Option<&'a KeyframesAnimation>
+ pub fn get_animation<'a, E>(&'a self, name: &Atom, element: E) -> Option<&'a KeyframesAnimation>
where
E: TElement + 'a,
{
@@ -1411,7 +1427,7 @@ impl Stylist {
if let Some(animation) = $data.animations.get(name) {
return Some(animation);
}
- }
+ };
}
// NOTE(emilio): We implement basically what Blink does for this case,
@@ -1431,11 +1447,15 @@ impl Stylist {
// [2]: https://github.com/w3c/csswg-drafts/issues/1995
// [3]: https://bugzil.la/1458189
if let Some(shadow) = element.shadow_root() {
- try_find_in!(shadow.style_data());
+ if let Some(data) = shadow.style_data() {
+ try_find_in!(data);
+ }
}
if let Some(shadow) = element.containing_shadow() {
- try_find_in!(shadow.style_data());
+ if let Some(data) = shadow.style_data() {
+ try_find_in!(data);
+ }
} else {
try_find_in!(self.cascade_data.author);
}
@@ -1535,10 +1555,12 @@ impl Stylist {
let block = declarations.read_with(guards.author);
let iter_declarations = || {
- block.declaration_importance_iter().map(|(declaration, importance)| {
- debug_assert!(!importance.important());
- (declaration, CascadeLevel::StyleAttributeNormal)
- })
+ block
+ .declaration_importance_iter()
+ .map(|(declaration, importance)| {
+ debug_assert!(!importance.important());
+ (declaration, CascadeLevel::StyleAttributeNormal)
+ })
};
let metrics = get_metrics_provider_for_product();
@@ -1555,7 +1577,9 @@ impl Stylist {
Some(parent_style),
Some(parent_style),
&metrics,
- CascadeMode::Unvisited { visited_rules: None },
+ CascadeMode::Unvisited {
+ visited_rules: None,
+ },
self.quirks_mode,
/* rule_cache = */ None,
&mut Default::default(),
@@ -1691,8 +1715,10 @@ impl MallocSizeOf for ExtraStyleData {
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[derive(Clone, Debug)]
struct RevalidationSelectorAndHashes {
- #[cfg_attr(feature = "gecko",
- ignore_malloc_size_of = "CssRules have primary refs, we measure there")]
+ #[cfg_attr(
+ feature = "gecko",
+ ignore_malloc_size_of = "CssRules have primary refs, we measure there"
+ )]
selector: Selector<SelectorImpl>,
selector_offset: usize,
hashes: AncestorHashes,
@@ -1745,11 +1771,9 @@ struct StylistSelectorVisitor<'a> {
passed_rightmost_selector: bool,
/// The filter with all the id's getting referenced from rightmost
/// selectors.
- mapped_ids: &'a mut NonCountingBloomFilter,
+ mapped_ids: &'a mut PrecomputedHashSet<Atom>,
/// The filter with the local names of attributes there are selectors for.
- attribute_dependencies: &'a mut NonCountingBloomFilter,
- /// Whether there's any attribute selector for the [style] attribute.
- style_attribute_dependency: &'a mut bool,
+ attribute_dependencies: &'a mut PrecomputedHashSet<LocalName>,
/// All the states selectors in the page reference.
state_dependencies: &'a mut ElementState,
/// All the document states selectors in the page reference.
@@ -1802,8 +1826,9 @@ impl<'a> SelectorVisitor for StylistSelectorVisitor<'a> {
// Also, note that this call happens before we visit any of the simple
// selectors in the next ComplexSelector, so we can use this to skip
// looking at them.
- self.passed_rightmost_selector = self.passed_rightmost_selector ||
- !matches!(combinator, None | Some(Combinator::PseudoElement));
+ self.passed_rightmost_selector =
+ self.passed_rightmost_selector ||
+ !matches!(combinator, None | Some(Combinator::PseudoElement));
true
}
@@ -1814,19 +1839,15 @@ impl<'a> SelectorVisitor for StylistSelectorVisitor<'a> {
name: &LocalName,
lower_name: &LocalName,
) -> bool {
- if *lower_name == local_name!("style") {
- *self.style_attribute_dependency = true;
- } else {
- self.attribute_dependencies.insert_hash(name.get_hash());
- self.attribute_dependencies
- .insert_hash(lower_name.get_hash());
- }
+ self.attribute_dependencies.insert(name.clone());
+ self.attribute_dependencies.insert(lower_name.clone());
true
}
fn visit_simple_selector(&mut self, s: &Component<SelectorImpl>) -> bool {
- self.needs_revalidation = self.needs_revalidation ||
- component_needs_revalidation(s, self.passed_rightmost_selector);
+ self.needs_revalidation =
+ self.needs_revalidation ||
+ component_needs_revalidation(s, self.passed_rightmost_selector);
match *s {
Component::NonTSPseudoClass(ref p) => {
@@ -1846,7 +1867,7 @@ impl<'a> SelectorVisitor for StylistSelectorVisitor<'a> {
//
// NOTE(emilio): See the comment regarding on when this may
// break in visit_complex_selector.
- self.mapped_ids.insert_hash(id.get_hash());
+ self.mapped_ids.insert(id.clone());
},
_ => {},
}
@@ -1878,11 +1899,15 @@ impl ElementAndPseudoRules {
pseudo_element: Option<&PseudoElement>,
quirks_mode: QuirksMode,
) -> Result<(), FailedAllocationError> {
- debug_assert!(pseudo_element.map_or(true, |pseudo| !pseudo.is_precomputed()));
+ debug_assert!(
+ pseudo_element.map_or(true, |pseudo| !pseudo.is_precomputed() &&
+ !pseudo.is_unknown_webkit_pseudo_element())
+ );
let map = match pseudo_element {
None => &mut self.element_map,
- Some(pseudo) => self.pseudos_map
+ Some(pseudo) => self
+ .pseudos_map
.get_or_insert_with(pseudo, || Box::new(SelectorMap::new())),
};
@@ -1944,18 +1969,9 @@ pub struct CascadeData {
/// The attribute local names that appear in attribute selectors. Used
/// to avoid taking element snapshots when an irrelevant attribute changes.
- /// (We don't bother storing the namespace, since namespaced attributes
- /// are rare.)
- #[ignore_malloc_size_of = "just an array"]
- attribute_dependencies: NonCountingBloomFilter,
-
- /// Whether `"style"` appears in an attribute selector. This is not common,
- /// and by tracking this explicitly, we can avoid taking an element snapshot
- /// in the common case of style=""` changing due to modifying
- /// `element.style`. (We could track this in `attribute_dependencies`, like
- /// all other attributes, but we should probably not risk incorrectly
- /// returning `true` for `"style"` just due to a hash collision.)
- style_attribute_dependency: bool,
+ /// (We don't bother storing the namespace, since namespaced attributes are
+ /// rare.)
+ attribute_dependencies: PrecomputedHashSet<LocalName>,
/// The element state bits that are relied on by selectors. Like
/// `attribute_dependencies`, this is used to avoid taking element snapshots
@@ -1971,8 +1987,7 @@ pub struct CascadeData {
/// hence in our selector maps). Used to determine when sharing styles is
/// safe: we disallow style sharing for elements whose id matches this
/// filter, and hence might be in one of our selector maps.
- #[ignore_malloc_size_of = "just an array"]
- mapped_ids: NonCountingBloomFilter,
+ mapped_ids: PrecomputedHashSet<Atom>,
/// Selectors that require explicit cache revalidation (i.e. which depend
/// on state that is not otherwise visible to the cache, like attributes or
@@ -2009,11 +2024,10 @@ impl CascadeData {
host_rules: None,
slotted_rules: None,
invalidation_map: InvalidationMap::new(),
- attribute_dependencies: NonCountingBloomFilter::new(),
- style_attribute_dependency: false,
+ attribute_dependencies: PrecomputedHashSet::default(),
state_dependencies: ElementState::empty(),
document_state_dependencies: DocumentState::empty(),
- mapped_ids: NonCountingBloomFilter::new(),
+ mapped_ids: PrecomputedHashSet::default(),
selectors_for_cache_revalidation: SelectorMap::new(),
animations: Default::default(),
extra_data: ExtraStyleData::default(),
@@ -2078,13 +2092,9 @@ impl CascadeData {
/// selector of some rule.
#[inline]
pub fn might_have_attribute_dependency(&self, local_name: &LocalName) -> bool {
- if *local_name == local_name!("style") {
- return self.style_attribute_dependency;
- }
-
- self.attribute_dependencies
- .might_contain_hash(local_name.get_hash())
+ self.attribute_dependencies.contains(local_name)
}
+
#[inline]
fn normal_rules(&self, pseudo: Option<&PseudoElement>) -> Option<&SelectorMap<Rule>> {
self.normal_rules.rules(pseudo)
@@ -2191,6 +2201,9 @@ impl CascadeData {
));
continue;
}
+ if pseudo.is_unknown_webkit_pseudo_element() {
+ continue;
+ }
}
let hashes = AncestorHashes::new(&selector, quirks_mode);
@@ -2208,7 +2221,6 @@ impl CascadeData {
needs_revalidation: false,
passed_rightmost_selector: false,
attribute_dependencies: &mut self.attribute_dependencies,
- style_attribute_dependency: &mut self.style_attribute_dependency,
state_dependencies: &mut self.state_dependencies,
document_state_dependencies: &mut self.document_state_dependencies,
mapped_ids: &mut self.mapped_ids,
@@ -2265,10 +2277,10 @@ impl CascadeData {
debug!("Found valid keyframes rule: {:?}", *keyframes_rule);
// Don't let a prefixed keyframes animation override a non-prefixed one.
- let needs_insertion = keyframes_rule.vendor_prefix.is_none() ||
- self.animations
- .get(keyframes_rule.name.as_atom())
- .map_or(true, |rule| rule.vendor_prefix.is_some());
+ let needs_insertion = keyframes_rule.vendor_prefix.is_none() || self
+ .animations
+ .get(keyframes_rule.name.as_atom())
+ .map_or(true, |rule| rule.vendor_prefix.is_some());
if needs_insertion {
let animation = KeyframesAnimation::from_keyframes(
&keyframes_rule.keyframes,
@@ -2358,7 +2370,8 @@ impl CascadeData {
let effective_now = import_rule
.stylesheet
.is_effective_for_device(&device, guard);
- let effective_then = self.effective_media_query_results
+ let effective_then = self
+ .effective_media_query_results
.was_effective(import_rule);
if effective_now != effective_then {
debug!(
@@ -2384,9 +2397,7 @@ impl CascadeData {
if effective_now != effective_then {
debug!(
" > @media rule {:?} changed {} -> {}",
- mq,
- effective_then,
- effective_now
+ mq, effective_then, effective_now
);
return false;
}
@@ -2418,7 +2429,6 @@ impl CascadeData {
self.clear_cascade_data();
self.invalidation_map.clear();
self.attribute_dependencies.clear();
- self.style_attribute_dependency = false;
self.state_dependencies = ElementState::empty();
self.document_state_dependencies = DocumentState::empty();
self.mapped_ids.clear();
@@ -2467,8 +2477,10 @@ pub struct Rule {
pub source_order: u32,
/// The actual style rule.
- #[cfg_attr(feature = "gecko",
- ignore_malloc_size_of = "Secondary ref. Primary ref is in StyleRule under Stylesheet.")]
+ #[cfg_attr(
+ feature = "gecko",
+ ignore_malloc_size_of = "Secondary ref. Primary ref is in StyleRule under Stylesheet."
+ )]
#[cfg_attr(feature = "servo", ignore_malloc_size_of = "Arc")]
pub style_rule: Arc<Locked<StyleRule>>,
}
@@ -2493,7 +2505,13 @@ impl Rule {
shadow_cascade_order: ShadowCascadeOrder,
) -> ApplicableDeclarationBlock {
let source = StyleSource::from_rule(self.style_rule.clone());
- ApplicableDeclarationBlock::new(source, self.source_order, level, self.specificity(), shadow_cascade_order)
+ ApplicableDeclarationBlock::new(
+ source,
+ self.source_order,
+ level,
+ self.specificity(),
+ shadow_cascade_order,
+ )
}
/// Creates a new Rule.
@@ -2514,16 +2532,14 @@ impl Rule {
/// A function to be able to test the revalidation stuff.
pub fn needs_revalidation_for_testing(s: &Selector<SelectorImpl>) -> bool {
- let mut attribute_dependencies = NonCountingBloomFilter::new();
- let mut mapped_ids = NonCountingBloomFilter::new();
- let mut style_attribute_dependency = false;
+ let mut attribute_dependencies = Default::default();
+ let mut mapped_ids = Default::default();
let mut state_dependencies = ElementState::empty();
let mut document_state_dependencies = DocumentState::empty();
let mut visitor = StylistSelectorVisitor {
needs_revalidation: false,
passed_rightmost_selector: false,
attribute_dependencies: &mut attribute_dependencies,
- style_attribute_dependency: &mut style_attribute_dependency,
state_dependencies: &mut state_dependencies,
document_state_dependencies: &mut document_state_dependencies,
mapped_ids: &mut mapped_ids,
diff --git a/components/style/traversal.rs b/components/style/traversal.rs
index 0bffd39819c..5f81f3544a9 100644
--- a/components/style/traversal.rs
+++ b/components/style/traversal.rs
@@ -208,11 +208,11 @@ pub trait DomTraversal<E: TElement>: Sync {
// animation-only restyle hint or recascade.
if traversal_flags.for_animation_only() {
return data.map_or(false, |d| d.has_styles()) &&
- (el.has_animation_only_dirty_descendants() ||
- data.as_ref()
- .unwrap()
- .hint
- .has_animation_hint_or_recascade());
+ (el.has_animation_only_dirty_descendants() || data
+ .as_ref()
+ .unwrap()
+ .hint
+ .has_animation_hint_or_recascade());
}
// Non-incremental layout visits every node.
@@ -279,7 +279,8 @@ pub trait DomTraversal<E: TElement>: Sync {
// likely to load valid bindings, we avoid wasted work here, which may
// be a very big perf hit when elements with bindings are nested
// heavily.
- if cfg!(feature = "gecko") && is_initial_style &&
+ if cfg!(feature = "gecko") &&
+ is_initial_style &&
parent_data.styles.primary().has_moz_binding()
{
debug!("Parent {:?} has XBL binding, deferring traversal", parent);
@@ -384,8 +385,7 @@ where
).resolve_style(
style.as_ref().map(|s| &**s),
layout_parent_style.as_ref().map(|s| &**s),
- )
- .into()
+ ).into()
}
/// Calculates the style for a single node.
@@ -411,7 +411,8 @@ pub fn recalc_style_at<E, D, F>(
context.thread_local.statistics.elements_traversed += 1;
debug_assert!(
- flags.intersects(TraversalFlags::AnimationOnly) || !element.has_snapshot() ||
+ flags.intersects(TraversalFlags::AnimationOnly) ||
+ !element.has_snapshot() ||
element.handled_snapshot(),
"Should've handled snapshots here already"
);
@@ -512,8 +513,9 @@ pub fn recalc_style_at<E, D, F>(
!child_cascade_requirement.can_skip_cascade() ||
is_servo_nonincremental_layout();
- traverse_children = traverse_children &&
- !traversal.should_cull_subtree(context, element, &data, is_initial_style);
+ traverse_children =
+ traverse_children &&
+ !traversal.should_cull_subtree(context, element, &data, is_initial_style);
// Examine our children, and enqueue the appropriate ones for traversal.
if traverse_children {
@@ -535,7 +537,8 @@ pub fn recalc_style_at<E, D, F>(
}
debug_assert!(
- flags.for_animation_only() || !flags.contains(TraversalFlags::ClearDirtyBits) ||
+ flags.for_animation_only() ||
+ !flags.contains(TraversalFlags::ClearDirtyBits) ||
!element.has_animation_only_dirty_descendants(),
"Should have cleared animation bits already"
);
diff --git a/components/style/use_counters/mod.rs b/components/style/use_counters/mod.rs
new file mode 100644
index 00000000000..49c77ae714d
--- /dev/null
+++ b/components/style/use_counters/mod.rs
@@ -0,0 +1,88 @@
+/* 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/. */
+
+//! Various stuff for CSS property use counters.
+
+#[cfg(feature = "gecko")]
+use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
+use properties::{NonCustomPropertyId, NON_CUSTOM_PROPERTY_ID_COUNT};
+use std::cell::Cell;
+
+#[cfg(target_pointer_width = "64")]
+const BITS_PER_ENTRY: usize = 64;
+
+#[cfg(target_pointer_width = "32")]
+const BITS_PER_ENTRY: usize = 32;
+
+/// One bit per each non-custom CSS property.
+#[derive(Default)]
+pub struct NonCustomPropertyUseCounters {
+ storage: [Cell<usize>; (NON_CUSTOM_PROPERTY_ID_COUNT - 1 + BITS_PER_ENTRY) / BITS_PER_ENTRY],
+}
+
+impl NonCustomPropertyUseCounters {
+ /// Returns the bucket a given property belongs in, and the bitmask for that
+ /// property.
+ #[inline(always)]
+ fn bucket_and_pattern(id: NonCustomPropertyId) -> (usize, usize) {
+ let bit = id.bit();
+ let bucket = bit / BITS_PER_ENTRY;
+ let bit_in_bucket = bit % BITS_PER_ENTRY;
+ (bucket, 1 << bit_in_bucket)
+ }
+
+ /// Record that a given non-custom property ID has been parsed.
+ #[inline]
+ pub fn record(&self, id: NonCustomPropertyId) {
+ let (bucket, pattern) = Self::bucket_and_pattern(id);
+ let bucket = &self.storage[bucket];
+ bucket.set(bucket.get() | pattern)
+ }
+
+ /// Returns whether a given non-custom property ID has been recorded
+ /// earlier.
+ #[inline]
+ pub fn recorded(&self, id: NonCustomPropertyId) -> bool {
+ let (bucket, pattern) = Self::bucket_and_pattern(id);
+ self.storage[bucket].get() & pattern != 0
+ }
+
+ /// Merge `other` into `self`.
+ #[inline]
+ fn merge(&self, other: &Self) {
+ for (bucket, other_bucket) in self.storage.iter().zip(other.storage.iter()) {
+ bucket.set(bucket.get() | other_bucket.get())
+ }
+ }
+}
+
+/// The use-counter data related to a given document we want to store.
+#[derive(Default)]
+pub struct UseCounters {
+ /// The counters for non-custom properties that have been parsed in the
+ /// document's stylesheets.
+ pub non_custom_properties: NonCustomPropertyUseCounters,
+}
+
+impl UseCounters {
+ /// Merge the use counters.
+ ///
+ /// Used for parallel parsing, where we parse off-main-thread.
+ #[inline]
+ pub fn merge(&self, other: &Self) {
+ self.non_custom_properties
+ .merge(&other.non_custom_properties)
+ }
+}
+
+#[cfg(feature = "gecko")]
+unsafe impl HasFFI for UseCounters {
+ type FFIType = ::gecko_bindings::structs::StyleUseCounters;
+}
+
+#[cfg(feature = "gecko")]
+unsafe impl HasSimpleFFI for UseCounters {}
+
+#[cfg(feature = "gecko")]
+unsafe impl HasBoxFFI for UseCounters {}
diff --git a/components/style/values/animated/color.rs b/components/style/values/animated/color.rs
index 4356c5a3d9b..afffce1c767 100644
--- a/components/style/values/animated/color.rs
+++ b/components/style/values/animated/color.rs
@@ -61,7 +61,8 @@ impl Animate for RGBA {
let red =
(self.red * self.alpha).animate(&(other.red * other.alpha), procedure)? * 1. / alpha;
let green = (self.green * self.alpha).animate(&(other.green * other.alpha), procedure)? *
- 1. / alpha;
+ 1. /
+ alpha;
let blue =
(self.blue * self.alpha).animate(&(other.blue * other.alpha), procedure)? * 1. / alpha;
@@ -223,7 +224,7 @@ impl Animate for Color {
let fg = fg1.animate(&fg2, procedure)?;
Self::with_ratios(bg_color, ComplexColorRatios { bg: 1., fg })
- }
+ },
})
}
}
@@ -239,19 +240,19 @@ impl ComputeSquaredDistance for Color {
(Numeric(c1), Numeric(c2)) => c1.compute_squared_distance(&c2)?,
(Foreground, Numeric(color)) | (Numeric(color), Foreground) => {
// `computed_squared_distance` is symmetric.
- color.compute_squared_distance(&RGBA::transparent())?
- + SquaredDistance::from_sqrt(1.)
- }
+ color.compute_squared_distance(&RGBA::transparent())? +
+ SquaredDistance::from_sqrt(1.)
+ },
(_, _) => {
let self_color = self.effective_intermediate_rgba();
let other_color = other.effective_intermediate_rgba();
let self_ratios = self.effective_ratios();
let other_ratios = other.effective_ratios();
- self_color.compute_squared_distance(&other_color)?
- + self_ratios.bg.compute_squared_distance(&other_ratios.bg)?
- + self_ratios.fg.compute_squared_distance(&other_ratios.fg)?
- }
+ self_color.compute_squared_distance(&other_color)? +
+ self_ratios.bg.compute_squared_distance(&other_ratios.bg)? +
+ self_ratios.fg.compute_squared_distance(&other_ratios.fg)?
+ },
})
}
}
diff --git a/components/style/values/animated/mod.rs b/components/style/values/animated/mod.rs
index 53d3719b021..b70ef7d6639 100644
--- a/components/style/values/animated/mod.rs
+++ b/components/style/values/animated/mod.rs
@@ -392,3 +392,17 @@ where
))
}
}
+
+impl<T> ToAnimatedZero for Box<[T]>
+where
+ T: ToAnimatedZero,
+{
+ #[inline]
+ fn to_animated_zero(&self) -> Result<Self, ()> {
+ let v = self
+ .iter()
+ .map(|v| v.to_animated_zero())
+ .collect::<Result<Vec<_>, _>>()?;
+ Ok(v.into_boxed_slice())
+ }
+}
diff --git a/components/style/values/computed/angle.rs b/components/style/values/computed/angle.rs
index 67ea5d1231b..e162b7a2499 100644
--- a/components/style/values/computed/angle.rs
+++ b/components/style/values/computed/angle.rs
@@ -15,7 +15,9 @@ use values::distance::{ComputeSquaredDistance, SquaredDistance};
/// A computed angle.
#[animate(fallback = "Self::animate_fallback")]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Animate, Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, ToAnimatedZero, ToCss)]
+#[derive(
+ Animate, Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, ToAnimatedZero, ToCss,
+)]
pub enum Angle {
/// An angle with degree unit.
#[css(dimension)]
@@ -73,7 +75,9 @@ impl Angle {
/// <https://drafts.csswg.org/css-transitions/#animtype-number>
#[inline]
fn animate_fallback(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
- Ok(Angle::from_radians(self.radians().animate(&other.radians(), procedure)?))
+ Ok(Angle::from_radians(
+ self.radians().animate(&other.radians(), procedure)?,
+ ))
}
}
diff --git a/components/style/values/computed/border.rs b/components/style/values/computed/border.rs
index cf97a96ad73..8c54aeba43b 100644
--- a/components/style/values/computed/border.rs
+++ b/components/style/values/computed/border.rs
@@ -81,3 +81,19 @@ impl ToAnimatedZero for BorderCornerRadius {
Err(())
}
}
+
+impl BorderRadius {
+ /// Returns whether all the values are `0px`.
+ pub fn all_zero(&self) -> bool {
+ fn all(corner: &BorderCornerRadius) -> bool {
+ fn is_zero(l: &LengthOrPercentage) -> bool {
+ *l == LengthOrPercentage::zero()
+ }
+ is_zero(corner.0.width()) && is_zero(corner.0.height())
+ }
+ all(&self.top_left) &&
+ all(&self.top_right) &&
+ all(&self.bottom_left) &&
+ all(&self.bottom_right)
+ }
+}
diff --git a/components/style/values/computed/box.rs b/components/style/values/computed/box.rs
index 15e447ea415..002583b2c21 100644
--- a/components/style/values/computed/box.rs
+++ b/components/style/values/computed/box.rs
@@ -34,13 +34,14 @@ pub type Perspective = GenericPerspective<NonNegativeLength>;
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToCss)]
+#[derive(
+ Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss,
+)]
/// A computed value for the `float` property.
pub enum Float {
Left,
Right,
- None
+ None,
}
impl ToComputedValue for SpecifiedFloat {
@@ -52,7 +53,9 @@ impl ToComputedValue for SpecifiedFloat {
// https://drafts.csswg.org/css-logical-props/#float-clear
match *self {
SpecifiedFloat::InlineStart => {
- context.rule_cache_conditions.borrow_mut()
+ context
+ .rule_cache_conditions
+ .borrow_mut()
.set_writing_mode_dependency(context.builder.writing_mode);
if ltr {
Float::Left
@@ -61,7 +64,9 @@ impl ToComputedValue for SpecifiedFloat {
}
},
SpecifiedFloat::InlineEnd => {
- context.rule_cache_conditions.borrow_mut()
+ context
+ .rule_cache_conditions
+ .borrow_mut()
.set_writing_mode_dependency(context.builder.writing_mode);
if ltr {
Float::Right
@@ -71,7 +76,7 @@ impl ToComputedValue for SpecifiedFloat {
},
SpecifiedFloat::Left => Float::Left,
SpecifiedFloat::Right => Float::Right,
- SpecifiedFloat::None => Float::None
+ SpecifiedFloat::None => Float::None,
}
}
@@ -80,21 +85,22 @@ impl ToComputedValue for SpecifiedFloat {
match *computed {
Float::Left => SpecifiedFloat::Left,
Float::Right => SpecifiedFloat::Right,
- Float::None => SpecifiedFloat::None
+ Float::None => SpecifiedFloat::None,
}
}
}
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
-SpecifiedValueInfo, ToCss)]
+#[derive(
+ Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss,
+)]
/// A computed value for the `clear` property.
pub enum Clear {
None,
Left,
Right,
- Both
+ Both,
}
impl ToComputedValue for SpecifiedClear {
@@ -106,7 +112,9 @@ impl ToComputedValue for SpecifiedClear {
// https://drafts.csswg.org/css-logical-props/#float-clear
match *self {
SpecifiedClear::InlineStart => {
- context.rule_cache_conditions.borrow_mut()
+ context
+ .rule_cache_conditions
+ .borrow_mut()
.set_writing_mode_dependency(context.builder.writing_mode);
if ltr {
Clear::Left
@@ -115,7 +123,9 @@ impl ToComputedValue for SpecifiedClear {
}
},
SpecifiedClear::InlineEnd => {
- context.rule_cache_conditions.borrow_mut()
+ context
+ .rule_cache_conditions
+ .borrow_mut()
.set_writing_mode_dependency(context.builder.writing_mode);
if ltr {
Clear::Right
@@ -126,7 +136,7 @@ impl ToComputedValue for SpecifiedClear {
SpecifiedClear::None => Clear::None,
SpecifiedClear::Left => Clear::Left,
SpecifiedClear::Right => Clear::Right,
- SpecifiedClear::Both => Clear::Both
+ SpecifiedClear::Both => Clear::Both,
}
}
@@ -160,23 +170,27 @@ impl ToComputedValue for specified::Resize {
let is_vertical = context.style().writing_mode.is_vertical();
match self {
specified::Resize::Inline => {
- context.rule_cache_conditions.borrow_mut()
+ context
+ .rule_cache_conditions
+ .borrow_mut()
.set_writing_mode_dependency(context.builder.writing_mode);
if is_vertical {
Resize::Vertical
} else {
Resize::Horizontal
}
- }
+ },
specified::Resize::Block => {
- context.rule_cache_conditions.borrow_mut()
+ context
+ .rule_cache_conditions
+ .borrow_mut()
.set_writing_mode_dependency(context.builder.writing_mode);
if is_vertical {
Resize::Horizontal
} else {
Resize::Vertical
}
- }
+ },
specified::Resize::None => Resize::None,
specified::Resize::Both => Resize::Both,
specified::Resize::Horizontal => Resize::Horizontal,
diff --git a/components/style/values/computed/counters.rs b/components/style/values/computed/counters.rs
index fd8d7763f1c..211ca6753e7 100644
--- a/components/style/values/computed/counters.rs
+++ b/components/style/values/computed/counters.rs
@@ -20,4 +20,3 @@ pub type Content = generics::Content<ComputedImageUrl>;
/// A computed content item.
pub type ContentItem = generics::ContentItem<ComputedImageUrl>;
-
diff --git a/components/style/values/computed/effects.rs b/components/style/values/computed/effects.rs
index 07ac6441b6c..b7e8315a6ac 100644
--- a/components/style/values/computed/effects.rs
+++ b/components/style/values/computed/effects.rs
@@ -20,11 +20,13 @@ pub type BoxShadow = GenericBoxShadow<Color, Length, NonNegativeLength, Length>;
/// A computed value for a single `filter`.
#[cfg(feature = "gecko")]
-pub type Filter = GenericFilter<Angle, NonNegativeNumber, NonNegativeLength, SimpleShadow, ComputedUrl>;
+pub type Filter =
+ GenericFilter<Angle, NonNegativeNumber, NonNegativeLength, SimpleShadow, ComputedUrl>;
/// A computed value for a single `filter`.
#[cfg(not(feature = "gecko"))]
-pub type Filter = GenericFilter<Angle, NonNegativeNumber, NonNegativeLength, Impossible, Impossible>;
+pub type Filter =
+ GenericFilter<Angle, NonNegativeNumber, NonNegativeLength, Impossible, Impossible>;
/// A computed value for the `drop-shadow()` filter.
pub type SimpleShadow = GenericSimpleShadow<Color, Length, NonNegativeLength>;
diff --git a/components/style/values/computed/font.rs b/components/style/values/computed/font.rs
index 8db4bd7e917..2c3d2853e5c 100644
--- a/components/style/values/computed/font.rs
+++ b/components/style/values/computed/font.rs
@@ -35,8 +35,7 @@ pub use values::specified::font::{FontSynthesis, MozScriptSizeMultiplier, XLang,
/// https://drafts.csswg.org/css-fonts-4/#propdef-font-weight
///
/// This is effectively just a `Number`.
-#[derive(Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq,
- ToCss)]
+#[derive(Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToCss)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
pub struct FontWeight(pub Number);
@@ -60,8 +59,17 @@ impl ToAnimatedValue for FontWeight {
}
}
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq,
- ToAnimatedZero, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ ToAnimatedZero,
+ ToCss,
+)]
/// The computed value of font-size
pub struct FontSize {
/// The size.
@@ -217,9 +225,9 @@ impl FontFamily {
#[inline]
/// Get default font family as `serif` which is a generic font-family
pub fn serif() -> Self {
- FontFamily(FontFamilyList::new(Box::new([
- SingleFontFamily::Generic(atom!("serif")),
- ])))
+ FontFamily(FontFamilyList::new(Box::new([SingleFontFamily::Generic(
+ atom!("serif"),
+ )])))
}
}
@@ -473,9 +481,7 @@ impl SingleFontFamily {
FontFamilyType::eFamily_monospace => SingleFontFamily::Generic(atom!("monospace")),
FontFamilyType::eFamily_cursive => SingleFontFamily::Generic(atom!("cursive")),
FontFamilyType::eFamily_fantasy => SingleFontFamily::Generic(atom!("fantasy")),
- FontFamilyType::eFamily_moz_fixed => {
- SingleFontFamily::Generic(atom!("-moz-fixed"))
- },
+ FontFamilyType::eFamily_moz_fixed => SingleFontFamily::Generic(atom!("-moz-fixed")),
FontFamilyType::eFamily_named => {
let name = Atom::from(&*family.mName);
SingleFontFamily::FamilyName(FamilyName {
@@ -851,9 +857,10 @@ impl ToAnimatedValue for FontStyleAngle {
#[inline]
fn from_animated_value(animated: Self::AnimatedValue) -> Self {
FontStyleAngle(Angle::Deg(
- animated.degrees()
+ animated
+ .degrees()
.min(specified::FONT_STYLE_OBLIQUE_MAX_ANGLE_DEGREES)
- .max(specified::FONT_STYLE_OBLIQUE_MIN_ANGLE_DEGREES)
+ .max(specified::FONT_STYLE_OBLIQUE_MIN_ANGLE_DEGREES),
))
}
}
@@ -882,10 +889,11 @@ impl FontStyle {
/// https://drafts.csswg.org/css-fonts-4/#valdef-font-style-oblique-angle
#[inline]
pub fn default_angle() -> FontStyleAngle {
- FontStyleAngle(Angle::Deg(specified::DEFAULT_FONT_STYLE_OBLIQUE_ANGLE_DEGREES))
+ FontStyleAngle(Angle::Deg(
+ specified::DEFAULT_FONT_STYLE_OBLIQUE_ANGLE_DEGREES,
+ ))
}
-
/// Get the font style from Gecko's nsFont struct.
#[cfg(feature = "gecko")]
pub fn from_gecko(style: structs::FontSlantStyle) -> Self {
@@ -923,7 +931,7 @@ impl ToCss for FontStyle {
angle.to_css(dest)?;
}
Ok(())
- }
+ },
}
}
}
diff --git a/components/style/values/computed/length.rs b/components/style/values/computed/length.rs
index 0ff99a08a3f..f2d43e2ada9 100644
--- a/components/style/values/computed/length.rs
+++ b/components/style/values/computed/length.rs
@@ -80,7 +80,8 @@ impl ComputeSquaredDistance for CalcLengthOrPercentage {
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
// FIXME(nox): This looks incorrect to me, to add a distance between lengths
// with a distance between percentages.
- Ok(self.unclamped_length()
+ Ok(self
+ .unclamped_length()
.compute_squared_distance(&other.unclamped_length())? +
self.percentage()
.compute_squared_distance(&other.percentage())?)
@@ -285,9 +286,15 @@ impl specified::CalcLengthOrPercentage {
/// Compute the value into pixel length as CSSFloat without context,
/// so it returns Err(()) if there is any non-absolute unit.
pub fn to_computed_pixel_length_without_context(&self) -> Result<CSSFloat, ()> {
- if self.vw.is_some() || self.vh.is_some() || self.vmin.is_some() || self.vmax.is_some() ||
- self.em.is_some() || self.ex.is_some() || self.ch.is_some() ||
- self.rem.is_some() || self.percentage.is_some()
+ if self.vw.is_some() ||
+ self.vh.is_some() ||
+ self.vmin.is_some() ||
+ self.vmax.is_some() ||
+ self.em.is_some() ||
+ self.ex.is_some() ||
+ self.ch.is_some() ||
+ self.rem.is_some() ||
+ self.percentage.is_some()
{
return Err(());
}
@@ -324,8 +331,17 @@ impl ToComputedValue for specified::CalcLengthOrPercentage {
#[allow(missing_docs)]
#[animate(fallback = "Self::animate_fallback")]
#[css(derive_debug)]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, MallocSizeOf, PartialEq,
- ToAnimatedValue, ToAnimatedZero, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ MallocSizeOf,
+ PartialEq,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToCss,
+)]
#[distance(fallback = "Self::compute_squared_distance_fallback")]
pub enum LengthOrPercentage {
Length(Length),
@@ -483,11 +499,9 @@ impl LengthOrPercentageOrAuto {
fn animate_fallback(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
let this = <Option<CalcLengthOrPercentage>>::from(*self);
let other = <Option<CalcLengthOrPercentage>>::from(*other);
- Ok(LengthOrPercentageOrAuto::Calc(this.animate(
- &other,
- procedure,
- )?
- .ok_or(())?))
+ Ok(LengthOrPercentageOrAuto::Calc(
+ this.animate(&other, procedure)?.ok_or(())?,
+ ))
}
#[inline]
@@ -602,11 +616,9 @@ impl LengthOrPercentageOrNone {
fn animate_fallback(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
let this = <Option<CalcLengthOrPercentage>>::from(*self);
let other = <Option<CalcLengthOrPercentage>>::from(*other);
- Ok(LengthOrPercentageOrNone::Calc(this.animate(
- &other,
- procedure,
- )?
- .ok_or(())?))
+ Ok(LengthOrPercentageOrNone::Calc(
+ this.animate(&other, procedure)?.ok_or(())?,
+ ))
}
fn compute_squared_distance_fallback(&self, other: &Self) -> Result<SquaredDistance, ()> {
@@ -727,8 +739,18 @@ impl NonNegativeLengthOrPercentage {
/// The computed `<length>` value.
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq,
- PartialOrd, ToAnimatedValue, ToAnimatedZero)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ PartialOrd,
+ ToAnimatedValue,
+ ToAnimatedZero,
+)]
pub struct CSSPixelLength(CSSFloat);
impl CSSPixelLength {
@@ -916,8 +938,7 @@ pub type NonNegativeLengthOrPercentageOrNormal = Either<NonNegativeLengthOrPerce
/// block-size, and inline-size.
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToCss)]
+#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss)]
pub enum ExtremumLength {
MozMaxContent,
MozMinContent,
diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs
index 9a6b5fd76b5..d8cc938c1f3 100644
--- a/components/style/values/computed/mod.rs
+++ b/components/style/values/computed/mod.rs
@@ -65,6 +65,7 @@ pub use self::length::{NonNegativeLengthOrPercentage, NonNegativeLengthOrPercent
pub use self::list::Quotes;
#[cfg(feature = "gecko")]
pub use self::list::ListStyleType;
+pub use self::motion::OffsetPath;
pub use self::outline::OutlineStyle;
pub use self::percentage::{Percentage, NonNegativePercentage};
pub use self::position::{GridAutoFlow, GridTemplateAreas, Position, ZIndex};
@@ -100,6 +101,7 @@ pub mod gecko;
pub mod image;
pub mod length;
pub mod list;
+pub mod motion;
pub mod outline;
pub mod percentage;
pub mod position;
diff --git a/components/style/values/computed/motion.rs b/components/style/values/computed/motion.rs
new file mode 100644
index 00000000000..352363ab491
--- /dev/null
+++ b/components/style/values/computed/motion.rs
@@ -0,0 +1,10 @@
+/* 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/. */
+
+//! Computed types for CSS values that are related to motion path.
+
+/// A computed offset-path. The computed value is as specified value.
+///
+/// https://drafts.fxtf.org/motion-1/#offset-path-property
+pub use values::specified::motion::OffsetPath;
diff --git a/components/style/values/computed/percentage.rs b/components/style/values/computed/percentage.rs
index 718d74335b7..4e9ae6172a9 100644
--- a/components/style/values/computed/percentage.rs
+++ b/components/style/values/computed/percentage.rs
@@ -12,9 +12,21 @@ use values::generics::NonNegative;
/// A computed percentage.
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, Default,
- MallocSizeOf, PartialEq, PartialOrd, SpecifiedValueInfo,
- ToAnimatedValue, ToAnimatedZero, ToComputedValue)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ Default,
+ MallocSizeOf,
+ PartialEq,
+ PartialOrd,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+)]
pub struct Percentage(pub CSSFloat);
impl Percentage {
diff --git a/components/style/values/computed/transform.rs b/components/style/values/computed/transform.rs
index bbf710c4295..a83495a09b5 100644
--- a/components/style/values/computed/transform.rs
+++ b/components/style/values/computed/transform.rs
@@ -42,6 +42,7 @@ impl TransformOrigin {
/// computed value of matrix3d()
pub type Matrix3D = generic::Matrix3D<Number>;
+
/// computed value of matrix()
pub type Matrix = generic::Matrix<Number>;
@@ -161,13 +162,13 @@ impl TransformOperation {
generic::TransformOperation::RotateZ(ref angle) |
generic::TransformOperation::Rotate(ref angle) => {
generic::TransformOperation::Rotate3D(0., 0., 1., angle.clone())
- }
+ },
generic::TransformOperation::RotateX(ref angle) => {
generic::TransformOperation::Rotate3D(1., 0., 0., angle.clone())
- }
+ },
generic::TransformOperation::RotateY(ref angle) => {
generic::TransformOperation::Rotate3D(0., 1., 0., angle.clone())
- }
+ },
_ => unreachable!(),
}
}
@@ -272,9 +273,9 @@ impl ToAnimatedZero for TransformOperation {
generic::TransformOperation::Rotate(_) => {
Ok(generic::TransformOperation::Rotate(Angle::zero()))
},
- generic::TransformOperation::Perspective(ref l) => {
- Ok(generic::TransformOperation::Perspective(l.to_animated_zero()?))
- },
+ generic::TransformOperation::Perspective(ref l) => Ok(
+ generic::TransformOperation::Perspective(l.to_animated_zero()?),
+ ),
generic::TransformOperation::AccumulateMatrix { .. } |
generic::TransformOperation::InterpolateMatrix { .. } => {
// AccumulateMatrix/InterpolateMatrix: We do interpolation on
@@ -292,10 +293,12 @@ impl ToAnimatedZero for TransformOperation {
impl ToAnimatedZero for Transform {
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> {
- Ok(generic::Transform(self.0
- .iter()
- .map(|op| op.to_animated_zero())
- .collect::<Result<Vec<_>, _>>()?))
+ Ok(generic::Transform(
+ self.0
+ .iter()
+ .map(|op| op.to_animated_zero())
+ .collect::<Result<Vec<_>, _>>()?,
+ ))
}
}
diff --git a/components/style/values/generics/background.rs b/components/style/values/generics/background.rs
index b25b00514d0..a4f4c58d8cd 100644
--- a/components/style/values/generics/background.rs
+++ b/components/style/values/generics/background.rs
@@ -5,9 +5,20 @@
//! Generic types for CSS values related to backgrounds.
/// A generic value for the `background-size` property.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero,
- ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum BackgroundSize<LengthOrPercentageOrAuto> {
/// `<width> <height>`
Explicit {
diff --git a/components/style/values/generics/basic_shape.rs b/components/style/values/generics/basic_shape.rs
index 3bad738c1e6..513e5de0e2b 100644
--- a/components/style/values/generics/basic_shape.rs
+++ b/components/style/values/generics/basic_shape.rs
@@ -12,14 +12,16 @@ use values::distance::{ComputeSquaredDistance, SquaredDistance};
use values::generics::border::BorderRadius;
use values::generics::position::Position;
use values::generics::rect::Rect;
+use values::specified::SVGPathData;
/// A clipping shape, for `clip-path`.
pub type ClippingShape<BasicShape, Url> = ShapeSource<BasicShape, GeometryBox, Url>;
/// <https://drafts.fxtf.org/css-masking-1/#typedef-geometry-box>
#[allow(missing_docs)]
-#[derive(Animate, Clone, Copy, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Animate, Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub enum GeometryBox {
FillBox,
StrokeBox,
@@ -33,8 +35,19 @@ pub type FloatAreaShape<BasicShape, Image> = ShapeSource<BasicShape, ShapeBox, I
/// https://drafts.csswg.org/css-shapes-1/#typedef-shape-box
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Animate, Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum ShapeBox {
MarginBox,
BorderBox,
@@ -45,21 +58,33 @@ pub enum ShapeBox {
/// A shape source, for some reference box.
#[allow(missing_docs)]
#[animation(no_bound(ImageOrUrl))]
-#[derive(Animate, Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Animate, Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub enum ShapeSource<BasicShape, ReferenceBox, ImageOrUrl> {
#[animation(error)]
ImageOrUrl(ImageOrUrl),
Shape(BasicShape, Option<ReferenceBox>),
#[animation(error)]
Box(ReferenceBox),
+ #[css(function)]
+ Path(Path),
#[animation(error)]
None,
}
#[allow(missing_docs)]
-#[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum BasicShape<H, V, LengthOrPercentage> {
Inset(#[css(field_bound)] InsetRect<LengthOrPercentage>),
Circle(#[css(field_bound)] Circle<H, V, LengthOrPercentage>),
@@ -70,8 +95,16 @@ pub enum BasicShape<H, V, LengthOrPercentage> {
/// <https://drafts.csswg.org/css-shapes/#funcdef-inset>
#[allow(missing_docs)]
#[css(function = "inset")]
-#[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToComputedValue)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+)]
pub struct InsetRect<LengthOrPercentage> {
pub rect: Rect<LengthOrPercentage>,
pub round: Option<BorderRadius<LengthOrPercentage>>,
@@ -80,8 +113,17 @@ pub struct InsetRect<LengthOrPercentage> {
/// <https://drafts.csswg.org/css-shapes/#funcdef-circle>
#[allow(missing_docs)]
#[css(function)]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToComputedValue)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+)]
pub struct Circle<H, V, LengthOrPercentage> {
pub position: Position<H, V>,
pub radius: ShapeRadius<LengthOrPercentage>,
@@ -90,8 +132,17 @@ pub struct Circle<H, V, LengthOrPercentage> {
/// <https://drafts.csswg.org/css-shapes/#funcdef-ellipse>
#[allow(missing_docs)]
#[css(function)]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToComputedValue)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+)]
pub struct Ellipse<H, V, LengthOrPercentage> {
pub position: Position<H, V>,
pub semiaxis_x: ShapeRadius<LengthOrPercentage>,
@@ -100,8 +151,18 @@ pub struct Ellipse<H, V, LengthOrPercentage> {
/// <https://drafts.csswg.org/css-shapes/#typedef-shape-radius>
#[allow(missing_docs)]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum ShapeRadius<LengthOrPercentage> {
Length(LengthOrPercentage),
#[animation(error)]
@@ -113,29 +174,61 @@ pub enum ShapeRadius<LengthOrPercentage> {
/// A generic type for representing the `polygon()` function
///
/// <https://drafts.csswg.org/css-shapes/#funcdef-polygon>
-#[css(function)]
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[css(comma, function)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub struct Polygon<LengthOrPercentage> {
/// The filling rule for a polygon.
+ #[css(skip_if = "fill_is_default")]
pub fill: FillRule,
/// A collection of (x, y) coordinates to draw the polygon.
- pub coordinates: Vec<(LengthOrPercentage, LengthOrPercentage)>,
+ #[css(iterable)]
+ pub coordinates: Vec<PolygonCoord<LengthOrPercentage>>,
}
+/// Coordinates for Polygon.
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
+pub struct PolygonCoord<LengthOrPercentage>(pub LengthOrPercentage, pub LengthOrPercentage);
+
// https://drafts.csswg.org/css-shapes/#typedef-fill-rule
// NOTE: Basic shapes spec says that these are the only two values, however
// https://www.w3.org/TR/SVG/painting.html#FillRuleProperty
// says that it can also be `inherit`
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
+#[repr(u8)]
pub enum FillRule {
Nonzero,
Evenodd,
}
+/// The path function defined in css-shape-2.
+///
+/// https://drafts.csswg.org/css-shapes-2/#funcdef-path
+#[css(comma)]
+#[derive(
+ Animate, Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
+pub struct Path {
+ /// The filling rule for the svg path.
+ #[css(skip_if = "fill_is_default")]
+ #[animation(constant)]
+ pub fill: FillRule,
+ /// The svg path data.
+ pub path: SVGPathData,
+}
+
// FIXME(nox): Implement ComputeSquaredDistance for T types and stop
// using PartialEq here, this will let us derive this impl.
impl<B, T, U> ComputeSquaredDistance for ShapeSource<B, T, U>
@@ -148,10 +241,16 @@ where
(
&ShapeSource::Shape(ref this, ref this_box),
&ShapeSource::Shape(ref other, ref other_box),
- ) if this_box == other_box =>
+ )
+ if this_box == other_box =>
{
this.compute_squared_distance(other)
},
+ (&ShapeSource::Path(ref this), &ShapeSource::Path(ref other))
+ if this.fill == other.fill =>
+ {
+ this.path.compute_squared_distance(&other.path)
+ },
_ => Err(()),
}
}
@@ -199,16 +298,16 @@ where
if self.coordinates.len() != other.coordinates.len() {
return Err(());
}
- let coordinates = self.coordinates
+ let coordinates = self
+ .coordinates
.iter()
.zip(other.coordinates.iter())
.map(|(this, other)| {
- Ok((
+ Ok(PolygonCoord(
this.0.animate(&other.0, procedure)?,
this.1.animate(&other.1, procedure)?,
))
- })
- .collect::<Result<Vec<_>, _>>()?;
+ }).collect::<Result<Vec<_>, _>>()?;
Ok(Polygon {
fill: self.fill,
coordinates,
@@ -234,33 +333,7 @@ where
let d1 = this.0.compute_squared_distance(&other.0)?;
let d2 = this.1.compute_squared_distance(&other.1)?;
Ok(d1 + d2)
- })
- .sum()
- }
-}
-
-impl<L: ToCss> ToCss for Polygon<L> {
- fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
- where
- W: Write,
- {
- dest.write_str("polygon(")?;
- if self.fill != FillRule::default() {
- self.fill.to_css(dest)?;
- dest.write_str(", ")?;
- }
-
- for (i, coord) in self.coordinates.iter().enumerate() {
- if i > 0 {
- dest.write_str(", ")?;
- }
-
- coord.0.to_css(dest)?;
- dest.write_str(" ")?;
- coord.1.to_css(dest)?;
- }
-
- dest.write_str(")")
+ }).sum()
}
}
@@ -270,3 +343,8 @@ impl Default for FillRule {
FillRule::Nonzero
}
}
+
+#[inline]
+fn fill_is_default(fill: &FillRule) -> bool {
+ *fill == FillRule::default()
+}
diff --git a/components/style/values/generics/border.rs b/components/style/values/generics/border.rs
index c25560ed0f1..4f40409843a 100644
--- a/components/style/values/generics/border.rs
+++ b/components/style/values/generics/border.rs
@@ -10,8 +10,9 @@ use values::generics::rect::Rect;
use values::generics::size::Size;
/// A generic value for a single side of a `border-image-width` property.
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub enum BorderImageSideWidth<LengthOrPercentage, Number> {
/// `<length-or-percentage>`
Length(LengthOrPercentage),
@@ -22,8 +23,9 @@ pub enum BorderImageSideWidth<LengthOrPercentage, Number> {
}
/// A generic value for the `border-image-slice` property.
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub struct BorderImageSlice<NumberOrPercentage> {
/// The offsets.
#[css(field_bound)]
@@ -34,8 +36,18 @@ pub struct BorderImageSlice<NumberOrPercentage> {
}
/// A generic value for the `border-*-radius` longhand properties.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub struct BorderCornerRadius<L>(#[css(field_bound)] pub Size<L>);
impl<L> BorderCornerRadius<L> {
@@ -46,9 +58,20 @@ impl<L> BorderCornerRadius<L> {
}
/// A generic value for the `border-spacing` property.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero,
- ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub struct BorderSpacing<L>(#[css(field_bound)] pub Size<L>);
impl<L> BorderSpacing<L> {
@@ -61,8 +84,17 @@ impl<L> BorderSpacing<L> {
/// A generic value for `border-radius`, `outline-radius` and `inset()`.
///
/// <https://drafts.csswg.org/css-backgrounds-3/#border-radius>
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToComputedValue)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+)]
pub struct BorderRadius<LengthOrPercentage> {
/// The top left radius.
pub top_left: BorderCornerRadius<LengthOrPercentage>,
@@ -120,7 +152,9 @@ where
W: Write,
{
widths.to_css(dest)?;
- if widths.0 != heights.0 || widths.1 != heights.1 || widths.2 != heights.2 ||
+ if widths.0 != heights.0 ||
+ widths.1 != heights.1 ||
+ widths.2 != heights.2 ||
widths.3 != heights.3
{
dest.write_str(" / ")?;
diff --git a/components/style/values/generics/box.rs b/components/style/values/generics/box.rs
index ea79e98eefb..0b525974288 100644
--- a/components/style/values/generics/box.rs
+++ b/components/style/values/generics/box.rs
@@ -7,8 +7,18 @@
use values::animated::ToAnimatedZero;
/// A generic value for the `vertical-align` property.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum VerticalAlign<LengthOrPercentage> {
/// `baseline`
Baseline,
@@ -48,8 +58,7 @@ impl<L> ToAnimatedZero for VerticalAlign<L> {
}
/// https://drafts.csswg.org/css-animations/#animation-iteration-count
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub enum AnimationIterationCount<Number> {
/// A `<number>` value.
Number(Number),
@@ -58,9 +67,20 @@ pub enum AnimationIterationCount<Number> {
}
/// A generic value for the `perspective` property.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero,
- ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum Perspective<NonNegativeLength> {
/// A non-negative length.
Length(NonNegativeLength),
diff --git a/components/style/values/generics/column.rs b/components/style/values/generics/column.rs
index 1d76f6cb552..5f96650d3e8 100644
--- a/components/style/values/generics/column.rs
+++ b/components/style/values/generics/column.rs
@@ -5,9 +5,20 @@
//! Generic types for the column properties.
/// A generic type for `column-count` values.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero,
- ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum ColumnCount<PositiveInteger> {
/// A positive integer.
Integer(PositiveInteger),
diff --git a/components/style/values/generics/counters.rs b/components/style/values/generics/counters.rs
index 779d56d65ee..4bbf728d457 100644
--- a/components/style/values/generics/counters.rs
+++ b/components/style/values/generics/counters.rs
@@ -14,8 +14,7 @@ use values::generics::CounterStyleOrNone;
use values::specified::Attr;
/// A name / value pair for counters.
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub struct CounterPair<Integer> {
/// The name of the counter.
pub name: CustomIdent,
@@ -24,8 +23,9 @@ pub struct CounterPair<Integer> {
}
/// A generic value for the `counter-increment` property.
-#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub struct CounterIncrement<I>(Counters<I>);
impl<I> CounterIncrement<I> {
@@ -46,8 +46,9 @@ impl<I> Deref for CounterIncrement<I> {
}
/// A generic value for the `counter-reset` property.
-#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub struct CounterReset<I>(Counters<I>);
impl<I> CounterReset<I> {
@@ -70,8 +71,7 @@ impl<I> Deref for CounterReset<I> {
/// A generic value for lists of counters.
///
/// Keyword `none` is represented by an empty vector.
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub struct Counters<I>(#[css(iterable, if_empty = "none")] Box<[CounterPair<I>]>);
impl<I> Default for Counters<I> {
@@ -102,8 +102,7 @@ fn is_decimal(counter_type: &CounterStyleType) -> bool {
/// The specified value for the `content` property.
///
/// https://drafts.csswg.org/css-content/#propdef-content
-#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub enum Content<ImageUrl> {
/// `normal` reserved keyword.
Normal,
@@ -125,8 +124,7 @@ impl<ImageUrl> Content<ImageUrl> {
}
/// Items for the `content` property.
-#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub enum ContentItem<ImageUrl> {
/// Literal string content.
String(Box<str>),
diff --git a/components/style/values/generics/effects.rs b/components/style/values/generics/effects.rs
index f05dfe82d66..7c7e3f4bef3 100644
--- a/components/style/values/generics/effects.rs
+++ b/components/style/values/generics/effects.rs
@@ -5,8 +5,17 @@
//! Generic types for CSS values related to effects.
/// A generic value for a single `box-shadow`.
-#[derive(Animate, Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToAnimatedValue, ToAnimatedZero, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToCss,
+)]
pub struct BoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> {
/// The base shadow.
pub base: SimpleShadow<Color, SizeLength, BlurShapeLength>,
@@ -21,8 +30,17 @@ pub struct BoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> {
/// A generic value for a single `filter`.
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[animation(no_bound(Url))]
-#[derive(Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ ComputeSquaredDistance,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToComputedValue,
+ ToCss,
+)]
pub enum Filter<Angle, Factor, Length, DropShadow, Url> {
/// `blur(<length>)`
#[css(function)]
@@ -63,8 +81,18 @@ pub enum Filter<Angle, Factor, Length, DropShadow, Url> {
///
/// Contrary to the canonical order from the spec, the color is serialised
/// first, like in Gecko and Webkit.
-#[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToCss,
+)]
pub struct SimpleShadow<Color, SizeLength, ShapeLength> {
/// Color.
pub color: Color,
diff --git a/components/style/values/generics/flex.rs b/components/style/values/generics/flex.rs
index 1ab53233c44..9cbece2e1bc 100644
--- a/components/style/values/generics/flex.rs
+++ b/components/style/values/generics/flex.rs
@@ -6,9 +6,19 @@
/// A generic value for the `flex-basis` property.
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, PartialEq,
- SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero, ToComputedValue,
- ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum FlexBasis<Width> {
/// `content`
Content,
diff --git a/components/style/values/generics/font.rs b/components/style/values/generics/font.rs
index 02df291065f..03a76c5a32d 100644
--- a/components/style/values/generics/font.rs
+++ b/components/style/values/generics/font.rs
@@ -16,8 +16,7 @@ use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
use values::distance::{ComputeSquaredDistance, SquaredDistance};
/// https://drafts.csswg.org/css-fonts-4/#feature-tag-value
-#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct FeatureTagValue<Integer> {
/// A four-character tag, packed into a u32 (one byte per character).
pub tag: FontTag,
@@ -47,8 +46,9 @@ where
/// Variation setting for a single feature, see:
///
/// https://drafts.csswg.org/css-fonts-4/#font-variation-settings-def
-#[derive(Animate, Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Animate, Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub struct VariationValue<Number> {
/// A four-character tag, packed into a u32 (one byte per character).
#[animation(constant)]
@@ -72,8 +72,7 @@ where
/// A value both for font-variation-settings and font-feature-settings.
#[css(comma)]
-#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub struct FontSettings<T>(#[css(if_empty = "normal", iterable)] pub Box<[T]>);
impl<T> FontSettings<T> {
@@ -109,8 +108,7 @@ impl<T: Parse> Parse for FontSettings<T> {
/// https://drafts.csswg.org/css-fonts-4/#font-variation-settings-def
/// https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-feature-settings
///
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct FontTag(pub u32);
impl ToCss for FontTag {
@@ -145,8 +143,18 @@ impl Parse for FontTag {
}
}
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq,
- ToAnimatedValue, ToAnimatedZero, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToCss,
+)]
/// Additional information for keyword-derived font sizes.
pub struct KeywordInfo<Length> {
/// The keyword used
@@ -189,9 +197,20 @@ impl<L> SpecifiedValueInfo for KeywordInfo<L> {
}
/// CSS font keywords
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero,
- ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToCss,
+)]
#[allow(missing_docs)]
pub enum KeywordSize {
#[css(keyword = "xx-small")]
@@ -228,8 +247,19 @@ impl Default for KeywordSize {
/// https://drafts.csswg.org/css-fonts-4/#font-style-prop
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, Hash, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ Hash,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+)]
pub enum FontStyle<Angle> {
#[animation(error)]
Normal,
diff --git a/components/style/values/generics/gecko.rs b/components/style/values/generics/gecko.rs
index 72a8b71d073..d56158750b6 100644
--- a/components/style/values/generics/gecko.rs
+++ b/components/style/values/generics/gecko.rs
@@ -7,8 +7,7 @@
/// A generic value for scroll snap points.
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
-#[derive(Clone, Copy, Debug, PartialEq, SpecifiedValueInfo, ToComputedValue,
- ToCss)]
+#[derive(Clone, Copy, Debug, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub enum ScrollSnapPoint<LengthOrPercentage> {
/// `none`
None,
diff --git a/components/style/values/generics/grid.rs b/components/style/values/generics/grid.rs
index b9ec85ace22..56b6f463691 100644
--- a/components/style/values/generics/grid.rs
+++ b/components/style/values/generics/grid.rs
@@ -18,8 +18,7 @@ use values::specified::grid::parse_line_names;
/// A `<grid-line>` type.
///
/// <https://drafts.csswg.org/css-grid/#typedef-grid-row-start-grid-line>
-#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct GridLine<Integer> {
/// Flag to check whether it's a `span` keyword.
pub is_span: bool,
@@ -149,8 +148,18 @@ impl Parse for GridLine<specified::Integer> {
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum TrackKeyword {
Auto,
MaxContent,
@@ -161,8 +170,7 @@ pub enum TrackKeyword {
/// avoid re-implementing it for the computed type.
///
/// <https://drafts.csswg.org/css-grid/#typedef-track-breadth>
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub enum TrackBreadth<L> {
/// The generic type is almost always a non-negative `<length-percentage>`
Breadth(L),
@@ -383,8 +391,7 @@ impl Parse for RepeatCount<specified::Integer> {
///
/// It can also hold `repeat()` function parameters, which expands into the respective
/// values in its computed form.
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
#[css(function = "repeat")]
pub struct TrackRepeat<L, I> {
/// The number of times for the value to be repeated (could also be `auto-fit` or `auto-fill`)
@@ -409,7 +416,8 @@ impl<L: ToCss, I: ToCss> ToCss for TrackRepeat<L, I> {
dest.write_str(", ")?;
let mut line_names_iter = self.line_names.iter();
- for (i, (ref size, ref names)) in self.track_sizes
+ for (i, (ref size, ref names)) in self
+ .track_sizes
.iter()
.zip(&mut line_names_iter)
.enumerate()
@@ -471,8 +479,7 @@ impl<L: Clone> TrackRepeat<L, specified::Integer> {
}
/// Track list values. Can be <track-size> or <track-repeat>
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub enum TrackListValue<LengthOrPercentage, Integer> {
/// A <track-size> value.
TrackSize(TrackSize<LengthOrPercentage>),
@@ -578,8 +585,7 @@ impl<L: ToCss, I: ToCss> ToCss for TrackList<L, I> {
///
/// `subgrid [ <line-names> | repeat(<positive-integer> | auto-fill, <line-names>+) ]+`
/// Old spec: https://www.w3.org/TR/2015/WD-css-grid-1-20150917/#typedef-line-name-list
-#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct LineNameList {
/// The optional `<line-name-list>`
pub names: Box<[Box<[CustomIdent]>]>,
@@ -624,7 +630,9 @@ impl Parse for LineNameList {
RepeatCount::AutoFill if fill_idx.is_none() => {
// `repeat(autof-fill, ..)` should have just one line name.
if names_list.len() != 1 {
- return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
+ return Err(
+ input.new_custom_error(StyleParseErrorKind::UnspecifiedError)
+ );
}
let names = names_list.pop().unwrap();
@@ -682,8 +690,7 @@ impl ToCss for LineNameList {
/// Variants for `<grid-template-rows> | <grid-template-columns>`
/// Subgrid deferred to Level 2 spec due to lack of implementation.
/// But it's implemented in gecko, so we have to as well.
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub enum GridTemplateComponent<L, I> {
/// `none` value.
None,
diff --git a/components/style/values/generics/image.rs b/components/style/values/generics/image.rs
index 2da4d290039..16d348ac47e 100644
--- a/components/style/values/generics/image.rs
+++ b/components/style/values/generics/image.rs
@@ -145,7 +145,7 @@ pub struct PaintWorklet {
pub arguments: Vec<Arc<custom_properties::SpecifiedValue>>,
}
-impl ::style_traits::SpecifiedValueInfo for PaintWorklet { }
+impl ::style_traits::SpecifiedValueInfo for PaintWorklet {}
impl ToCss for PaintWorklet {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
@@ -167,8 +167,7 @@ impl ToCss for PaintWorklet {
/// `-moz-image-rect(<uri>, top, right, bottom, left);`
#[allow(missing_docs)]
#[css(comma, function)]
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub struct MozImageRect<NumberOrPercentage, MozImageRectUrl> {
pub url: MozImageRectUrl,
pub top: NumberOrPercentage,
diff --git a/components/style/values/generics/mod.rs b/components/style/values/generics/mod.rs
index e6c1befea9f..32ea771cf15 100644
--- a/components/style/values/generics/mod.rs
+++ b/components/style/values/generics/mod.rs
@@ -157,14 +157,37 @@ impl SpecifiedValueInfo for CounterStyleOrNone {
/// A wrapper of Non-negative values.
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, Hash, MallocSizeOf,
- PartialEq, PartialOrd, SpecifiedValueInfo, ToAnimatedZero,
- ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ Hash,
+ MallocSizeOf,
+ PartialEq,
+ PartialOrd,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub struct NonNegative<T>(pub T);
/// A wrapper of greater-than-or-equal-to-one values.
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, PartialOrd, SpecifiedValueInfo, ToAnimatedZero,
- ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ PartialOrd,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub struct GreaterThanOrEqualToOne<T>(pub T);
diff --git a/components/style/values/generics/position.rs b/components/style/values/generics/position.rs
index 67c167c41ab..83dc48d0905 100644
--- a/components/style/values/generics/position.rs
+++ b/components/style/values/generics/position.rs
@@ -6,8 +6,18 @@
//! [`position`](https://drafts.csswg.org/css-backgrounds-3/#position)
/// A generic type for representing a CSS [position](https://drafts.csswg.org/css-values/#position).
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedZero, ToComputedValue)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+)]
pub struct Position<H, V> {
/// The horizontal component of position.
pub horizontal: H,
@@ -26,8 +36,19 @@ impl<H, V> Position<H, V> {
}
/// A generic value for the `z-index` property.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum ZIndex<Integer> {
/// An integer value.
Integer(Integer),
diff --git a/components/style/values/generics/rect.rs b/components/style/values/generics/rect.rs
index fb67e48a395..510cb75a6f8 100644
--- a/components/style/values/generics/rect.rs
+++ b/components/style/values/generics/rect.rs
@@ -11,8 +11,17 @@ use style_traits::{CssWriter, ParseError, ToCss};
/// A CSS value made of four components, where its `ToCss` impl will try to
/// serialize as few components as possible, like for example in `border-width`.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToComputedValue)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+)]
pub struct Rect<T>(pub T, pub T, pub T, pub T);
impl<T> Rect<T> {
diff --git a/components/style/values/generics/size.rs b/components/style/values/generics/size.rs
index ad93b94e65e..d7ef5810f05 100644
--- a/components/style/values/generics/size.rs
+++ b/components/style/values/generics/size.rs
@@ -13,8 +13,17 @@ use values::animated::ToAnimatedValue;
/// A generic size, for `border-*-radius` longhand properties, or
/// `border-spacing`.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq,
- ToAnimatedZero, ToComputedValue)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ ToAnimatedZero,
+ ToComputedValue,
+)]
pub struct Size<L>(pub Size2D<L>);
impl<L> Size<L> {
diff --git a/components/style/values/generics/svg.rs b/components/style/values/generics/svg.rs
index 0fbaacf2283..8b8fa786e8f 100644
--- a/components/style/values/generics/svg.rs
+++ b/components/style/values/generics/svg.rs
@@ -16,8 +16,18 @@ use values::distance::{ComputeSquaredDistance, SquaredDistance};
///
/// <https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint>
#[animation(no_bound(UrlPaintServer))]
-#[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToComputedValue,
+ ToCss,
+)]
pub struct SVGPaint<ColorType, UrlPaintServer> {
/// The paint source
pub kind: SVGPaintKind<ColorType, UrlPaintServer>,
@@ -31,9 +41,19 @@ pub struct SVGPaint<ColorType, UrlPaintServer> {
/// to have a fallback, Gecko lets the context
/// properties have a fallback as well.
#[animation(no_bound(UrlPaintServer))]
-#[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero, ToComputedValue,
- ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum SVGPaintKind<ColorType, UrlPaintServer> {
/// `none`
#[animation(error)]
@@ -113,8 +133,18 @@ impl<ColorType: Parse, UrlPaintServer: Parse> Parse for SVGPaint<ColorType, UrlP
/// A value of <length> | <percentage> | <number> for svg which allow unitless length.
/// <https://www.w3.org/TR/SVG11/painting.html#StrokeProperties>
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToAnimatedValue, ToAnimatedZero, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum SvgLengthOrPercentageOrNumber<LengthOrPercentage, Number> {
/// <length> | <percentage>
LengthOrPercentage(LengthOrPercentage),
@@ -191,9 +221,19 @@ impl<LengthOrPercentageType: Parse, NumberType: Parse> Parse
}
/// An SVG length value supports `context-value` in addition to length.
-#[derive(Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero, ToComputedValue,
- ToCss)]
+#[derive(
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum SVGLength<LengthType> {
/// `<length> | <percentage> | <number>`
Length(LengthType),
@@ -202,23 +242,38 @@ pub enum SVGLength<LengthType> {
}
/// Generic value for stroke-dasharray.
-#[derive(Clone, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToComputedValue,
+ ToCss,
+)]
pub enum SVGStrokeDashArray<LengthType> {
/// `[ <length> | <percentage> | <number> ]#`
#[css(comma)]
- Values(
- #[css(if_empty = "none", iterable)]
- Vec<LengthType>,
- ),
+ Values(#[css(if_empty = "none", iterable)] Vec<LengthType>),
/// `context-value`
ContextValue,
}
/// An SVG opacity value accepts `context-{fill,stroke}-opacity` in
/// addition to opacity value.
-#[derive(Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum SVGOpacity<OpacityType> {
/// `<opacity-value>`
Opacity(OpacityType),
diff --git a/components/style/values/generics/text.rs b/components/style/values/generics/text.rs
index 6cc5caaac77..e85c444a695 100644
--- a/components/style/values/generics/text.rs
+++ b/components/style/values/generics/text.rs
@@ -12,8 +12,9 @@ use values::animated::{Animate, Procedure, ToAnimatedZero};
use values::distance::{ComputeSquaredDistance, SquaredDistance};
/// A generic value for the `initial-letter` property.
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub enum InitialLetter<Number, Integer> {
/// `normal`
Normal,
@@ -30,8 +31,9 @@ impl<N, I> InitialLetter<N, I> {
}
/// A generic spacing value for the `letter-spacing` and `word-spacing` properties.
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub enum Spacing<Value> {
/// `normal`
Normal,
@@ -112,8 +114,18 @@ where
}
/// A generic value for the `line-height` property.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToCss,
+)]
pub enum LineHeight<Number, LengthOrPercentage> {
/// `normal`
Normal,
@@ -142,9 +154,20 @@ impl<N, L> LineHeight<N, L> {
}
/// A generic value for the `-moz-tab-size` property.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero,
- ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum MozTabSize<Number, Length> {
/// A number.
Number(Number),
diff --git a/components/style/values/generics/transform.rs b/components/style/values/generics/transform.rs
index a0cbc57d6b4..cce0464d2ac 100644
--- a/components/style/values/generics/transform.rs
+++ b/components/style/values/generics/transform.rs
@@ -15,8 +15,9 @@ use values::specified::length::LengthOrPercentage as SpecifiedLengthOrPercentage
/// A generic 2D transformation matrix.
#[allow(missing_docs)]
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
#[css(comma, function)]
pub struct Matrix<T> {
pub a: T,
@@ -66,8 +67,19 @@ impl<T: Into<f64>> From<Matrix3D<T>> for Transform3D<f64> {
}
/// A generic transform origin.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
- PartialEq, SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub struct TransformOrigin<H, V, Depth> {
/// The horizontal origin.
pub horizontal: H,
@@ -80,8 +92,7 @@ pub struct TransformOrigin<H, V, Depth> {
/// A generic timing function.
///
/// <https://drafts.csswg.org/css-timing-1/#single-timing-function-production>
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToCss)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss)]
#[value_info(ty = "TIMING_FUNCTION")]
pub enum TimingFunction<Integer, Number> {
/// `linear | ease | ease-in | ease-out | ease-in-out`
@@ -106,8 +117,18 @@ pub enum TimingFunction<Integer, Number> {
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum TimingKeyword {
Linear,
Ease,
@@ -163,8 +184,7 @@ impl TimingKeyword {
}
}
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
/// A single operation in the list of a `transform` value
pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage> {
/// Represents a 2D 2x3 matrix.
@@ -268,8 +288,7 @@ pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage>
},
}
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
/// A value of the `transform` property
pub struct Transform<T>(#[css(if_empty = "none", iterable)] pub Vec<T>);
@@ -281,11 +300,7 @@ impl<Angle, Number, Length, Integer, LengthOrPercentage>
use self::TransformOperation::*;
matches!(
*self,
- Rotate(..) |
- Rotate3D(..) |
- RotateX(..) |
- RotateY(..) |
- RotateZ(..)
+ Rotate(..) | Rotate3D(..) | RotateX(..) | RotateY(..) | RotateZ(..)
)
}
@@ -574,8 +589,18 @@ pub fn get_normalized_vector_and_angle<T: Zero>(
}
}
-#[derive(Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
/// A value of the `Rotate` property
///
/// <https://drafts.csswg.org/css-transforms-2/#individual-transforms>
@@ -588,8 +613,18 @@ pub enum Rotate<Number, Angle> {
Rotate3D(Number, Number, Number, Angle),
}
-#[derive(Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
/// A value of the `Scale` property
///
/// <https://drafts.csswg.org/css-transforms-2/#individual-transforms>
@@ -604,8 +639,17 @@ pub enum Scale<Number> {
Scale3D(Number, Number, Number),
}
-#[derive(Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedZero, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ ComputeSquaredDistance,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
/// A value of the `Translate` property
///
/// <https://drafts.csswg.org/css-transforms-2/#individual-transforms>
@@ -621,8 +665,9 @@ pub enum Translate<LengthOrPercentage, Length> {
}
#[allow(missing_docs)]
-#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub enum TransformStyle {
#[cfg(feature = "servo")]
Auto,
diff --git a/components/style/values/generics/ui.rs b/components/style/values/generics/ui.rs
index 9ccf1f80d53..bef1926bc90 100644
--- a/components/style/values/generics/ui.rs
+++ b/components/style/values/generics/ui.rs
@@ -11,8 +11,7 @@ use style_traits::cursor::CursorKind;
/// A generic value for the `cursor` property.
///
/// https://drafts.csswg.org/css-ui/#cursor
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct Cursor<Image> {
/// The parsed images for the cursor.
pub images: Box<[Image]>,
@@ -45,8 +44,7 @@ impl<Image: ToCss> ToCss for Cursor<Image> {
}
/// A generic value for item of `image cursors`.
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct CursorImage<ImageUrl, Number> {
/// The url to parse images from.
pub url: ImageUrl,
diff --git a/components/style/values/generics/url.rs b/components/style/values/generics/url.rs
index 5da74a7b087..ff9fa16d665 100644
--- a/components/style/values/generics/url.rs
+++ b/components/style/values/generics/url.rs
@@ -9,9 +9,19 @@ use parser::{Parse, ParserContext};
use style_traits::ParseError;
/// An image url or none, used for example in list-style-image
-#[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero, ToComputedValue,
- ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum UrlOrNone<Url> {
/// `none`
None,
diff --git a/components/style/values/mod.rs b/components/style/values/mod.rs
index a5f8d0abd32..d3ae6a83971 100644
--- a/components/style/values/mod.rs
+++ b/components/style/values/mod.rs
@@ -92,8 +92,13 @@ where
}
/// Convenience void type to disable some properties and values through types.
-#[cfg_attr(feature = "servo", derive(Deserialize, MallocSizeOf, Serialize))]
-#[derive(Clone, Copy, Debug, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss)]
+#[cfg_attr(
+ feature = "servo",
+ derive(Deserialize, MallocSizeOf, Serialize)
+)]
+#[derive(
+ Clone, Copy, Debug, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss,
+)]
pub enum Impossible {}
// FIXME(nox): This should be derived but the derive code cannot cope
@@ -115,9 +120,19 @@ impl Parse for Impossible {
}
/// A struct representing one of two kinds of values.
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, MallocSizeOf, PartialEq,
- SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero, ToComputedValue,
- ToCss)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedValue,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
pub enum Either<A, B> {
/// The first value.
First(A),
@@ -148,8 +163,7 @@ impl<A: Parse, B: Parse> Parse for Either<A, B> {
}
/// <https://drafts.csswg.org/css-values-4/#custom-idents>
-#[derive(Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct CustomIdent(pub Atom);
impl CustomIdent {
@@ -164,7 +178,9 @@ impl CustomIdent {
_ => true
};
if !valid {
- return Err(location.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone())));
+ return Err(
+ location.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone()))
+ );
}
if excluding.iter().any(|s| ident.eq_ignore_ascii_case(s)) {
Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError))
diff --git a/components/style/values/specified/align.rs b/components/style/values/specified/align.rs
index 731844bcb52..858ecce065d 100644
--- a/components/style/values/specified/align.rs
+++ b/components/style/values/specified/align.rs
@@ -683,8 +683,13 @@ fn parse_self_position<'i, 't>(
fn list_self_position_keywords(f: KeywordsCollectFn, axis: AxisDirection) {
f(&[
- "start", "end", "flex-start", "flex-end",
- "center", "self-start", "self-end",
+ "start",
+ "end",
+ "flex-start",
+ "flex-end",
+ "center",
+ "self-start",
+ "self-end",
]);
if axis == AxisDirection::Inline {
f(&["left", "right"]);
diff --git a/components/style/values/specified/background.rs b/components/style/values/specified/background.rs
index d7c4ec629ca..6c85d6ec5a6 100644
--- a/components/style/values/specified/background.rs
+++ b/components/style/values/specified/background.rs
@@ -43,8 +43,18 @@ impl BackgroundSize {
}
/// One of the keywords for `background-repeat`.
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
#[allow(missing_docs)]
pub enum BackgroundRepeatKeyword {
Repeat,
@@ -56,8 +66,7 @@ pub enum BackgroundRepeatKeyword {
/// The specified value for the `background-repeat` property.
///
/// https://drafts.csswg.org/css-backgrounds/#the-background-repeat
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToCss)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss)]
pub enum BackgroundRepeat {
/// `repeat-x`
RepeatX,
@@ -91,7 +100,9 @@ impl Parse for BackgroundRepeat {
let horizontal = match BackgroundRepeatKeyword::from_ident(&ident) {
Ok(h) => h,
Err(()) => {
- return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone())));
+ return Err(
+ input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone()))
+ );
},
};
diff --git a/components/style/values/specified/basic_shape.rs b/components/style/values/specified/basic_shape.rs
index 23ae91d564e..cdafbf14b37 100644
--- a/components/style/values/specified/basic_shape.rs
+++ b/components/style/values/specified/basic_shape.rs
@@ -14,9 +14,11 @@ use std::fmt::{self, Write};
use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
use values::computed::Percentage;
use values::generics::basic_shape as generic;
-use values::generics::basic_shape::{FillRule, GeometryBox, ShapeBox, ShapeSource};
+use values::generics::basic_shape::{FillRule, GeometryBox, Path, PolygonCoord};
+use values::generics::basic_shape::{ShapeBox, ShapeSource};
use values::generics::rect::Rect;
use values::specified::LengthOrPercentage;
+use values::specified::SVGPathData;
use values::specified::border::BorderRadius;
use values::specified::image::Image;
use values::specified::position::{HorizontalPosition, Position, PositionComponent};
@@ -47,12 +49,49 @@ pub type ShapeRadius = generic::ShapeRadius<LengthOrPercentage>;
/// The specified value of `Polygon`
pub type Polygon = generic::Polygon<LengthOrPercentage>;
-impl<ReferenceBox, ImageOrUrl> Parse for ShapeSource<BasicShape, ReferenceBox, ImageOrUrl>
+#[cfg(feature = "gecko")]
+fn is_clip_path_path_enabled(context: &ParserContext) -> bool {
+ use gecko_bindings::structs::mozilla;
+ context.chrome_rules_enabled() ||
+ unsafe { mozilla::StaticPrefs_sVarCache_layout_css_clip_path_path_enabled }
+}
+#[cfg(feature = "servo")]
+fn is_clip_path_path_enabled(_: &ParserContext) -> bool {
+ false
+}
+
+impl Parse for ClippingShape {
+ #[inline]
+ fn parse<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ if is_clip_path_path_enabled(context) {
+ if let Ok(p) = input.try(|i| Path::parse(context, i)) {
+ return Ok(ShapeSource::Path(p));
+ }
+ }
+ Self::parse_internal(context, input)
+ }
+}
+
+impl Parse for FloatAreaShape {
+ #[inline]
+ fn parse<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ Self::parse_internal(context, input)
+ }
+}
+
+impl<ReferenceBox, ImageOrUrl> ShapeSource<BasicShape, ReferenceBox, ImageOrUrl>
where
ReferenceBox: Parse,
ImageOrUrl: Parse,
{
- fn parse<'i, 't>(
+ /// The internal parser for ShapeSource.
+ fn parse_internal<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
@@ -229,8 +268,7 @@ impl Ellipse {
ShapeRadius::parse(context, i)?,
ShapeRadius::parse(context, i)?,
))
- })
- .unwrap_or_default();
+ }).unwrap_or_default();
let position = if input.try(|i| i.expect_ident_matching("at")).is_ok() {
Position::parse(context, input)?
} else {
@@ -377,11 +415,10 @@ impl Polygon {
let fill = FillRule::parse(i)?;
i.expect_comma()?; // only eat the comma if there is something before it
Ok(fill)
- })
- .unwrap_or_default();
+ }).unwrap_or_default();
let buf = input.parse_comma_separated(|i| {
- Ok((
+ Ok(PolygonCoord(
LengthOrPercentage::parse(context, i)?,
LengthOrPercentage::parse(context, i)?,
))
@@ -393,3 +430,30 @@ impl Polygon {
})
}
}
+
+impl Parse for Path {
+ fn parse<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ input.expect_function_matching("path")?;
+ input.parse_nested_block(|i| Self::parse_function_arguments(context, i))
+ }
+}
+
+impl Path {
+ /// Parse the inner arguments of a `path` function.
+ fn parse_function_arguments<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ let fill = input
+ .try(|i| -> Result<_, ParseError> {
+ let fill = FillRule::parse(i)?;
+ i.expect_comma()?;
+ Ok(fill)
+ }).unwrap_or_default();
+ let path = SVGPathData::parse(context, input)?;
+ Ok(Path { fill, path })
+ }
+}
diff --git a/components/style/values/specified/border.rs b/components/style/values/specified/border.rs
index 0713ed99eb9..7a681c2ef2c 100644
--- a/components/style/values/specified/border.rs
+++ b/components/style/values/specified/border.rs
@@ -189,8 +189,7 @@ impl Parse for BorderSpacing {
/// A single border-image-repeat keyword.
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToCss)]
+#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss)]
pub enum BorderImageRepeatKeyword {
Stretch,
Repeat,
@@ -201,8 +200,7 @@ pub enum BorderImageRepeatKeyword {
/// The specified value for the `border-image-repeat` property.
///
/// https://drafts.csswg.org/css-backgrounds/#the-border-image-repeat
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct BorderImageRepeat(pub BorderImageRepeatKeyword, pub BorderImageRepeatKeyword);
impl ToCss for BorderImageRepeat {
diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs
index 6b474689df3..e23ec4a745a 100644
--- a/components/style/values/specified/box.rs
+++ b/components/style/values/specified/box.rs
@@ -21,26 +21,23 @@ use values::specified::length::{LengthOrPercentage, NonNegativeLength};
fn in_ua_or_chrome_sheet(context: &ParserContext) -> bool {
use stylesheets::Origin;
- context.stylesheet_origin == Origin::UserAgent ||
- context.chrome_rules_enabled()
+ context.stylesheet_origin == Origin::UserAgent || context.chrome_rules_enabled()
}
#[cfg(feature = "gecko")]
fn moz_display_values_enabled(context: &ParserContext) -> bool {
use gecko_bindings::structs;
in_ua_or_chrome_sheet(context) ||
- unsafe {
- structs::StaticPrefs_sVarCache_layout_css_xul_display_values_content_enabled
- }
+ unsafe { structs::StaticPrefs_sVarCache_layout_css_xul_display_values_content_enabled }
}
#[cfg(feature = "gecko")]
fn moz_box_display_values_enabled(context: &ParserContext) -> bool {
use gecko_bindings::structs;
in_ua_or_chrome_sheet(context) ||
- unsafe {
- structs::StaticPrefs_sVarCache_layout_css_xul_box_display_values_content_enabled
- }
+ unsafe {
+ structs::StaticPrefs_sVarCache_layout_css_xul_box_display_values_content_enabled
+ }
}
/// Defines an element’s display type, which consists of
@@ -57,8 +54,20 @@ fn moz_box_display_values_enabled(context: &ParserContext) -> bool {
/// Also, when you change this from Gecko you may need to regenerate the
/// C++-side bindings (see components/style/cbindgen.toml).
#[allow(missing_docs)]
-#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ FromPrimitive,
+ Hash,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[repr(u8)]
pub enum Display {
@@ -200,7 +209,10 @@ impl Display {
pub fn is_ruby_type(&self) -> bool {
matches!(
*self,
- Display::Ruby | Display::RubyBase | Display::RubyText | Display::RubyBaseContainer |
+ Display::Ruby |
+ Display::RubyBase |
+ Display::RubyText |
+ Display::RubyBaseContainer |
Display::RubyTextContainer
)
}
@@ -346,8 +358,7 @@ impl AnimationIterationCount {
}
/// A value for the `animation-name` property.
-#[derive(Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
#[value_info(other_values = "none")]
pub struct AnimationName(pub Option<KeyframesName>);
@@ -391,8 +402,18 @@ impl Parse for AnimationName {
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum ScrollSnapType {
None,
Mandatory,
@@ -401,8 +422,18 @@ pub enum ScrollSnapType {
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum OverscrollBehavior {
Auto,
Contain,
@@ -411,15 +442,24 @@ pub enum OverscrollBehavior {
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum OverflowClipBox {
PaddingBox,
ContentBox,
}
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
/// Provides a rendering hint to the user agent,
/// stating what kinds of changes the author expects
/// to perform on the element
@@ -497,11 +537,11 @@ fn change_bits_for_maybe_property(ident: &str, context: &ParserContext) -> WillC
};
match id.as_shorthand() {
- Ok(shorthand) => {
- shorthand.longhands().fold(WillChangeBits::empty(), |flags, p| {
+ Ok(shorthand) => shorthand
+ .longhands()
+ .fold(WillChangeBits::empty(), |flags, p| {
flags | change_bits_for_longhand(p)
- })
- }
+ }),
Err(PropertyDeclarationId::Longhand(longhand)) => change_bits_for_longhand(longhand),
Err(PropertyDeclarationId::Custom(..)) => WillChangeBits::empty(),
}
@@ -581,9 +621,8 @@ impl ToCss for TouchAction {
TouchAction::TOUCH_ACTION_NONE => dest.write_str("none"),
TouchAction::TOUCH_ACTION_AUTO => dest.write_str("auto"),
TouchAction::TOUCH_ACTION_MANIPULATION => dest.write_str("manipulation"),
- _ if self.contains(
- TouchAction::TOUCH_ACTION_PAN_X | TouchAction::TOUCH_ACTION_PAN_Y,
- ) =>
+ _ if self
+ .contains(TouchAction::TOUCH_ACTION_PAN_X | TouchAction::TOUCH_ACTION_PAN_Y) =>
{
dest.write_str("pan-x pan-y")
},
@@ -756,8 +795,7 @@ impl Parse for Perspective {
return Ok(GenericPerspective::None);
}
Ok(GenericPerspective::Length(NonNegativeLength::parse(
- context,
- input,
+ context, input,
)?))
}
}
@@ -789,7 +827,7 @@ impl ToCss for TransitionProperty {
TransitionProperty::Custom(ref name) => {
dest.write_str("--")?;
serialize_atom_name(name, dest)
- }
+ },
TransitionProperty::Unsupported(ref i) => i.to_css(dest),
}
}
@@ -805,21 +843,21 @@ impl Parse for TransitionProperty {
let id = match PropertyId::parse_ignoring_rule_type(&ident, context) {
Ok(id) => id,
- Err(..) => return Ok(TransitionProperty::Unsupported(
- CustomIdent::from_ident(location, ident, &["none"])?,
- )),
+ Err(..) => {
+ return Ok(TransitionProperty::Unsupported(CustomIdent::from_ident(
+ location,
+ ident,
+ &["none"],
+ )?))
+ },
};
Ok(match id.as_shorthand() {
Ok(s) => TransitionProperty::Shorthand(s),
- Err(longhand_or_custom) => {
- match longhand_or_custom {
- PropertyDeclarationId::Longhand(id) => TransitionProperty::Longhand(id),
- PropertyDeclarationId::Custom(custom) => {
- TransitionProperty::Custom(custom.clone())
- }
- }
- }
+ Err(longhand_or_custom) => match longhand_or_custom {
+ PropertyDeclarationId::Longhand(id) => TransitionProperty::Longhand(id),
+ PropertyDeclarationId::Custom(custom) => TransitionProperty::Custom(custom.clone()),
+ },
})
}
}
@@ -846,19 +884,19 @@ impl TransitionProperty {
Ok(match *self {
TransitionProperty::Shorthand(ShorthandId::All) => {
::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_all_properties
- }
+ },
TransitionProperty::Shorthand(ref id) => id.to_nscsspropertyid(),
TransitionProperty::Longhand(ref id) => id.to_nscsspropertyid(),
- TransitionProperty::Custom(..) |
- TransitionProperty::Unsupported(..) => return Err(()),
+ TransitionProperty::Custom(..) | TransitionProperty::Unsupported(..) => return Err(()),
})
}
}
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToCss)]
+#[derive(
+ Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss,
+)]
/// https://drafts.csswg.org/css-box/#propdef-float
pub enum Float {
Left,
@@ -866,13 +904,14 @@ pub enum Float {
None,
// https://drafts.csswg.org/css-logical-props/#float-clear
InlineStart,
- InlineEnd
+ InlineEnd,
}
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToCss)]
+#[derive(
+ Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss,
+)]
/// https://drafts.csswg.org/css-box/#propdef-clear
pub enum Clear {
None,
@@ -881,14 +920,15 @@ pub enum Clear {
Both,
// https://drafts.csswg.org/css-logical-props/#float-clear
InlineStart,
- InlineEnd
+ InlineEnd,
}
/// https://drafts.csswg.org/css-ui/#propdef-resize
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToCss)]
+#[derive(
+ Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss,
+)]
pub enum Resize {
None,
Both,
@@ -906,8 +946,19 @@ pub enum Resize {
/// NOTE(emilio): When changing this you may want to regenerate the C++ bindings
/// (see components/style/cbindgen.toml)
#[allow(missing_docs)]
-#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToCss, ToComputedValue)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ Hash,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToCss,
+ ToComputedValue,
+)]
#[repr(u8)]
pub enum Appearance {
/// No appearance at all.
diff --git a/components/style/values/specified/color.rs b/components/style/values/specified/color.rs
index c05f0ddce0e..cce8f381806 100644
--- a/components/style/values/specified/color.rs
+++ b/components/style/values/specified/color.rs
@@ -89,11 +89,11 @@ impl<'a, 'b: 'a, 'i: 'a> ::cssparser::ColorComponentParser<'i> for ColorComponen
};
Ok(AngleOrNumber::Angle { degrees })
- }
+ },
Token::Number { value, .. } => Ok(AngleOrNumber::Number { value }),
Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
input.parse_nested_block(|i| CalcNode::parse_angle_or_number(self.0, i))
- }
+ },
t => return Err(location.new_unexpected_token_error(t)),
}
}
@@ -120,10 +120,10 @@ impl<'a, 'b: 'a, 'i: 'a> ::cssparser::ColorComponentParser<'i> for ColorComponen
Token::Number { value, .. } => Ok(NumberOrPercentage::Number { value }),
Token::Percentage { unit_value, .. } => {
Ok(NumberOrPercentage::Percentage { unit_value })
- }
+ },
Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
input.parse_nested_block(|i| CalcNode::parse_number_or_percentage(self.0, i))
- }
+ },
t => return Err(location.new_unexpected_token_error(t)),
}
}
@@ -169,10 +169,10 @@ impl Parse for Color {
Err(e.location.new_custom_error(StyleParseErrorKind::ValueError(
ValueParseErrorKind::InvalidColor(t),
)))
- }
+ },
_ => Err(e),
}
- }
+ },
}
}
}
@@ -276,10 +276,10 @@ impl Color {
}
return parse_hash_color(ident.as_bytes())
.map_err(|()| location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
- }
+ },
ref t => {
return Err(location.new_unexpected_token_error(t.clone()));
- }
+ },
};
if value < 0 {
return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
@@ -359,11 +359,11 @@ impl Color {
Keyword::MozVisitedhyperlinktext => pres_context.mVisitedLinkColor,
})
})
- }
+ },
#[cfg(feature = "gecko")]
Color::InheritFromBodyQuirk => {
_context.map(|context| ComputedColor::rgba(context.device().body_text_color()))
- }
+ },
}
}
}
diff --git a/components/style/values/specified/column.rs b/components/style/values/specified/column.rs
index d065835423d..4cd8ad0777f 100644
--- a/components/style/values/specified/column.rs
+++ b/components/style/values/specified/column.rs
@@ -22,8 +22,7 @@ impl Parse for ColumnCount {
return Ok(GenericColumnCount::Auto);
}
Ok(GenericColumnCount::Integer(PositiveInteger::parse(
- context,
- input,
+ context, input,
)?))
}
}
diff --git a/components/style/values/specified/counters.rs b/components/style/values/specified/counters.rs
index ea369f9dec7..ce7e3991227 100644
--- a/components/style/values/specified/counters.rs
+++ b/components/style/values/specified/counters.rs
@@ -93,8 +93,7 @@ impl Content {
.try(|input| {
input.expect_comma()?;
ListStyleType::parse(input)
- })
- .unwrap_or(ListStyleType::Decimal)
+ }).unwrap_or(ListStyleType::Decimal)
}
#[cfg(feature = "gecko")]
@@ -103,8 +102,7 @@ impl Content {
.try(|input| {
input.expect_comma()?;
CounterStyleOrNone::parse(context, input)
- })
- .unwrap_or(CounterStyleOrNone::decimal())
+ }).unwrap_or(CounterStyleOrNone::decimal())
}
}
diff --git a/components/style/values/specified/effects.rs b/components/style/values/specified/effects.rs
index c3304b05af0..861414ca756 100644
--- a/components/style/values/specified/effects.rs
+++ b/components/style/values/specified/effects.rs
@@ -118,9 +118,9 @@ impl Parse for BoxShadow {
let value = input.try::<_, _, ParseError>(|i| {
let horizontal = Length::parse(context, i)?;
let vertical = Length::parse(context, i)?;
- let (blur, spread) = match i.try::<_, _, ParseError>(|i| {
- Length::parse_non_negative(context, i)
- }) {
+ let (blur, spread) = match i
+ .try::<_, _, ParseError>(|i| Length::parse_non_negative(context, i))
+ {
Ok(blur) => {
let spread = i.try(|i| Length::parse(context, i)).ok();
(Some(blur.into()), spread)
@@ -143,7 +143,8 @@ impl Parse for BoxShadow {
break;
}
- let lengths = lengths.ok_or(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))?;
+ let lengths =
+ lengths.ok_or(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))?;
Ok(BoxShadow {
base: SimpleShadow {
color: color,
@@ -164,7 +165,8 @@ impl ToComputedValue for BoxShadow {
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue {
ComputedBoxShadow {
base: self.base.to_computed_value(context),
- spread: self.spread
+ spread: self
+ .spread
.as_ref()
.unwrap_or(&Length::zero())
.to_computed_value(context),
@@ -271,13 +273,15 @@ impl ToComputedValue for SimpleShadow {
#[inline]
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue {
ComputedSimpleShadow {
- color: self.color
+ 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
+ blur: self
+ .blur
.as_ref()
.unwrap_or(&NonNegativeLength::zero())
.to_computed_value(context),
diff --git a/components/style/values/specified/font.rs b/components/style/values/specified/font.rs
index 8d8355821e8..d9cf921bca5 100644
--- a/components/style/values/specified/font.rs
+++ b/components/style/values/specified/font.rs
@@ -148,9 +148,9 @@ impl ToComputedValue for FontWeight {
#[inline]
fn from_computed_value(computed: &computed::FontWeight) -> Self {
- FontWeight::Absolute(AbsoluteFontWeight::Weight(
- Number::from_computed_value(&computed.0)
- ))
+ FontWeight::Absolute(AbsoluteFontWeight::Weight(Number::from_computed_value(
+ &computed.0,
+ )))
}
}
@@ -174,9 +174,7 @@ impl AbsoluteFontWeight {
pub fn compute(&self) -> computed::FontWeight {
match *self {
AbsoluteFontWeight::Weight(weight) => {
- computed::FontWeight(
- weight.get().max(MIN_FONT_WEIGHT).min(MAX_FONT_WEIGHT)
- )
+ computed::FontWeight(weight.get().max(MIN_FONT_WEIGHT).min(MAX_FONT_WEIGHT))
},
AbsoluteFontWeight::Normal => computed::FontWeight::normal(),
AbsoluteFontWeight::Bold => computed::FontWeight::bold(),
@@ -194,12 +192,11 @@ impl Parse for AbsoluteFontWeight {
// seem worth it just for a single property with such a weird range,
// so we do the clamping here manually.
if !number.was_calc() &&
- (number.get() < MIN_FONT_WEIGHT || number.get() > MAX_FONT_WEIGHT) {
- return Err(input.new_custom_error(
- StyleParseErrorKind::UnspecifiedError
- ))
+ (number.get() < MIN_FONT_WEIGHT || number.get() > MAX_FONT_WEIGHT)
+ {
+ return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
}
- return Ok(AbsoluteFontWeight::Weight(number))
+ return Ok(AbsoluteFontWeight::Weight(number));
}
Ok(try_match_ident_ignore_ascii_case! { input,
@@ -228,7 +225,7 @@ impl ToCss for SpecifiedFontStyle {
angle.to_css(dest)?;
}
Ok(())
- }
+ },
}
}
}
@@ -260,7 +257,7 @@ impl ToComputedValue for SpecifiedFontStyle {
generics::FontStyle::Italic => generics::FontStyle::Italic,
generics::FontStyle::Oblique(ref angle) => {
generics::FontStyle::Oblique(FontStyleAngle(Self::compute_angle(angle)))
- }
+ },
}
}
@@ -270,12 +267,11 @@ impl ToComputedValue for SpecifiedFontStyle {
generics::FontStyle::Italic => generics::FontStyle::Italic,
generics::FontStyle::Oblique(ref angle) => {
generics::FontStyle::Oblique(Angle::from_computed_value(&angle.0))
- }
+ },
}
}
}
-
/// The default angle for `font-style: oblique`.
///
/// NOTE(emilio): As of right now this diverges from the spec, which specifies
@@ -299,9 +295,10 @@ impl SpecifiedFontStyle {
/// Gets a clamped angle from a specified Angle.
pub fn compute_angle(angle: &Angle) -> ComputedAngle {
ComputedAngle::Deg(
- angle.degrees()
+ angle
+ .degrees()
.max(FONT_STYLE_OBLIQUE_MIN_ANGLE_DEGREES)
- .min(FONT_STYLE_OBLIQUE_MAX_ANGLE_DEGREES)
+ .min(FONT_STYLE_OBLIQUE_MAX_ANGLE_DEGREES),
)
}
@@ -319,11 +316,9 @@ impl SpecifiedFontStyle {
if degrees < FONT_STYLE_OBLIQUE_MIN_ANGLE_DEGREES ||
degrees > FONT_STYLE_OBLIQUE_MAX_ANGLE_DEGREES
{
- return Err(input.new_custom_error(
- StyleParseErrorKind::UnspecifiedError
- ));
+ return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
}
- return Ok(angle)
+ return Ok(angle);
}
/// The default angle for `font-style: oblique`.
@@ -336,8 +331,7 @@ impl SpecifiedFontStyle {
}
/// The specified value of the `font-style` property.
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToCss)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss)]
#[allow(missing_docs)]
pub enum FontStyle {
Specified(SpecifiedFontStyle),
@@ -375,7 +369,9 @@ impl Parse for FontStyle {
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
- Ok(FontStyle::Specified(SpecifiedFontStyle::parse(context, input)?))
+ Ok(FontStyle::Specified(SpecifiedFontStyle::parse(
+ context, input,
+ )?))
}
}
@@ -383,8 +379,7 @@ impl Parse for FontStyle {
///
/// https://drafts.csswg.org/css-fonts-4/#font-stretch-prop
#[allow(missing_docs)]
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToCss)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss)]
pub enum FontStretch {
Stretch(Percentage),
Keyword(FontStretchKeyword),
@@ -393,8 +388,7 @@ pub enum FontStretch {
}
/// A keyword value for `font-stretch`.
-#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo,
- ToCss)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss)]
#[allow(missing_docs)]
pub enum FontStretchKeyword {
Normal,
@@ -497,9 +491,7 @@ impl ToComputedValue for FontStretch {
FontStretch::Stretch(ref percentage) => {
computed::FontStretch(NonNegative(percentage.to_computed_value(context)))
},
- FontStretch::Keyword(ref kw) => {
- computed::FontStretch(NonNegative(kw.compute()))
- },
+ FontStretch::Keyword(ref kw) => computed::FontStretch(NonNegative(kw.compute())),
FontStretch::System(_) => self.compute_system(context),
}
}
@@ -690,8 +682,7 @@ impl Parse for FontSizeAdjust {
}
Ok(FontSizeAdjust::Number(Number::parse_non_negative(
- context,
- input,
+ context, input,
)?))
}
}
@@ -906,10 +897,11 @@ impl FontSize {
// new ones.
//
// This is enough of an edge case to not really matter.
- let abs = calc.to_computed_value_zoomed(
- context,
- FontBaseSize::InheritedStyleButStripEmUnits,
- ).length_component();
+ let abs = calc
+ .to_computed_value_zoomed(
+ context,
+ FontBaseSize::InheritedStyleButStripEmUnits,
+ ).length_component();
info = parent.keyword_info.map(|i| i.compose(ratio, abs.into()));
}
@@ -1939,8 +1931,7 @@ impl Parse for FontFeatureSettings {
}
}
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
/// Whether user agents are allowed to synthesize bold or oblique font faces
/// when a font family lacks bold or italic faces
pub struct FontSynthesis {
@@ -2217,8 +2208,9 @@ impl Parse for VariationValue<Number> {
}
}
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
/// text-zoom. Enable if true, disable if false
pub struct XTextZoom(#[css(skip)] pub bool);
@@ -2235,8 +2227,7 @@ impl Parse for XTextZoom {
}
}
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
/// Internal property that reflects the lang attribute
pub struct XLang(#[css(skip)] pub Atom);
@@ -2324,8 +2315,7 @@ impl Parse for MozScriptLevel {
}
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
-#[derive(Clone, Copy, Debug, PartialEq, SpecifiedValueInfo, ToComputedValue,
- ToCss)]
+#[derive(Clone, Copy, Debug, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
/// Specifies the multiplier to be used to adjust font size
/// due to changes in scriptlevel.
///
diff --git a/components/style/values/specified/grid.rs b/components/style/values/specified/grid.rs
index 830cccaf2e2..ad95264c595 100644
--- a/components/style/values/specified/grid.rs
+++ b/components/style/values/specified/grid.rs
@@ -22,7 +22,8 @@ pub fn parse_flex<'i, 't>(input: &mut Parser<'i, 't>) -> Result<CSSFloat, ParseE
match *input.next()? {
Token::Dimension {
value, ref unit, ..
- } if unit.eq_ignore_ascii_case("fr") && value.is_sign_positive() =>
+ }
+ if unit.eq_ignore_ascii_case("fr") && value.is_sign_positive() =>
{
Ok(value)
},
@@ -76,7 +77,8 @@ impl Parse for TrackSize<LengthOrPercentage> {
}
input.expect_function_matching("fit-content")?;
- let lop = input.parse_nested_block(|i| LengthOrPercentage::parse_non_negative(context, i))?;
+ let lop =
+ input.parse_nested_block(|i| LengthOrPercentage::parse_non_negative(context, i))?;
Ok(TrackSize::FitContent(lop))
}
}
@@ -175,7 +177,9 @@ impl TrackRepeat<LengthOrPercentage, Integer> {
} else {
if values.is_empty() {
// expecting at least one <track-size>
- return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
+ return Err(
+ input.new_custom_error(StyleParseErrorKind::UnspecifiedError)
+ );
}
names.push(current_names); // final `<line-names>`
@@ -217,9 +221,11 @@ impl Parse for TrackList<LengthOrPercentage, Integer> {
// assume that everything is <fixed-size>. This flag is useful when we encounter <auto-repeat>
let mut atleast_one_not_fixed = false;
loop {
- current_names.extend_from_slice(&mut input
- .try(parse_line_names)
- .unwrap_or(vec![].into_boxed_slice()));
+ current_names.extend_from_slice(
+ &mut input
+ .try(parse_line_names)
+ .unwrap_or(vec![].into_boxed_slice()),
+ );
if let Ok(track_size) = input.try(|i| TrackSize::parse(context, i)) {
if !track_size.is_fixed() {
atleast_one_not_fixed = true;
@@ -244,13 +250,17 @@ impl Parse for TrackList<LengthOrPercentage, Integer> {
atleast_one_not_fixed = true;
if auto_repeat.is_some() {
// only <fixed-repeat>
- return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
+ return Err(
+ input.new_custom_error(StyleParseErrorKind::UnspecifiedError)
+ );
}
},
RepeatType::Auto => {
if auto_repeat.is_some() || atleast_one_not_fixed {
// We've either seen <auto-repeat> earlier, or there's at least one non-fixed value
- return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
+ return Err(
+ input.new_custom_error(StyleParseErrorKind::UnspecifiedError)
+ );
}
list_type = TrackListType::Auto(values.len() as u16 + auto_offset);
@@ -342,7 +352,8 @@ impl ToComputedValue for TrackList<LengthOrPercentage, Integer> {
list_type: self.list_type.to_computed_value(context),
values: values,
line_names: line_names.into_boxed_slice(),
- auto_repeat: self.auto_repeat
+ auto_repeat: self
+ .auto_repeat
.clone()
.map(|repeat| repeat.to_computed_value(context)),
}
diff --git a/components/style/values/specified/image.rs b/components/style/values/specified/image.rs
index 64d24573f4a..1c0a613e488 100644
--- a/components/style/values/specified/image.rs
+++ b/components/style/values/specified/image.rs
@@ -55,19 +55,19 @@ impl SpecifiedValueInfo for Gradient {
fn collect_completion_keywords(f: KeywordsCollectFn) {
// This list here should keep sync with that in Gradient::parse.
f(&[
- "linear-gradient",
- "-webkit-linear-gradient",
- "-moz-linear-gradient",
- "repeating-linear-gradient",
- "-webkit-repeating-linear-gradient",
- "-moz-repeating-linear-gradient",
- "radial-gradient",
- "-webkit-radial-gradient",
- "-moz-radial-gradient",
- "repeating-radial-gradient",
- "-webkit-repeating-radial-gradient",
- "-moz-repeating-radial-gradient",
- "-webkit-gradient",
+ "linear-gradient",
+ "-webkit-linear-gradient",
+ "-moz-linear-gradient",
+ "repeating-linear-gradient",
+ "-webkit-repeating-linear-gradient",
+ "-moz-repeating-linear-gradient",
+ "radial-gradient",
+ "-webkit-radial-gradient",
+ "-moz-radial-gradient",
+ "repeating-radial-gradient",
+ "-webkit-repeating-radial-gradient",
+ "-moz-repeating-radial-gradient",
+ "-webkit-gradient",
]);
}
}
@@ -239,9 +239,9 @@ impl Parse for Gradient {
#[cfg(feature = "gecko")]
{
use gecko_bindings::structs;
- if compat_mode == CompatMode::Moz && !unsafe {
- structs::StaticPrefs_sVarCache_layout_css_prefixes_gradients
- } {
+ if compat_mode == CompatMode::Moz &&
+ !unsafe { structs::StaticPrefs_sVarCache_layout_css_prefixes_gradients }
+ {
return Err(input.new_custom_error(StyleParseErrorKind::UnexpectedFunction(func)));
}
}
@@ -760,9 +760,9 @@ impl LineDirection {
// There is no `to` keyword in webkit prefixed syntax. If it's consumed,
// parsing should throw an error.
CompatMode::WebKit if to_ident.is_ok() => {
- return Err(i.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(
- "to".into(),
- )))
+ return Err(
+ i.new_custom_error(SelectorParseErrorKind::UnexpectedIdent("to".into()))
+ )
},
_ => {},
}
@@ -969,8 +969,7 @@ impl Parse for PaintWorklet {
.try(|input| {
input.expect_comma()?;
input.parse_comma_separated(|input| SpecifiedValue::parse(input))
- })
- .unwrap_or(vec![]);
+ }).unwrap_or(vec![]);
Ok(PaintWorklet { name, arguments })
})
}
diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs
index b6fe9bc2346..1b4efc4f00d 100644
--- a/components/style/values/specified/length.rs
+++ b/components/style/values/specified/length.rs
@@ -566,14 +566,16 @@ impl Length {
match *token {
Token::Dimension {
value, ref unit, ..
- } if num_context.is_ok(context.parsing_mode, value) =>
+ }
+ if num_context.is_ok(context.parsing_mode, value) =>
{
return NoCalcLength::parse_dimension(context, value, unit)
.map(Length::NoCalc)
.map_err(|()| location.new_unexpected_token_error(token.clone()))
},
Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
- if value != 0. && !context.parsing_mode.allows_unitless_lengths() &&
+ if value != 0. &&
+ !context.parsing_mode.allows_unitless_lengths() &&
!allow_quirks.allowed(context.quirks_mode)
{
return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
@@ -753,7 +755,8 @@ impl LengthOrPercentage {
match *token {
Token::Dimension {
value, ref unit, ..
- } if num_context.is_ok(context.parsing_mode, value) =>
+ }
+ if num_context.is_ok(context.parsing_mode, value) =>
{
return NoCalcLength::parse_dimension(context, value, unit)
.map(LengthOrPercentage::Length)
@@ -767,7 +770,8 @@ impl LengthOrPercentage {
)))
},
Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
- if value != 0. && !context.parsing_mode.allows_unitless_lengths() &&
+ if value != 0. &&
+ !context.parsing_mode.allows_unitless_lengths() &&
!allow_quirks.allowed(context.quirks_mode)
{
return Err(location.new_unexpected_token_error(token.clone()));
@@ -780,8 +784,9 @@ impl LengthOrPercentage {
}
}
- let calc = input
- .parse_nested_block(|i| CalcNode::parse_length_or_percentage(context, i, num_context))?;
+ let calc = input.parse_nested_block(|i| {
+ CalcNode::parse_length_or_percentage(context, i, num_context)
+ })?;
Ok(LengthOrPercentage::Calc(Box::new(calc)))
}
@@ -871,7 +876,8 @@ impl LengthOrPercentageOrAuto {
match *token {
Token::Dimension {
value, ref unit, ..
- } if num_context.is_ok(context.parsing_mode, value) =>
+ }
+ if num_context.is_ok(context.parsing_mode, value) =>
{
return NoCalcLength::parse_dimension(context, value, unit)
.map(LengthOrPercentageOrAuto::Length)
@@ -885,7 +891,8 @@ impl LengthOrPercentageOrAuto {
)))
},
Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
- if value != 0. && !context.parsing_mode.allows_unitless_lengths() &&
+ if value != 0. &&
+ !context.parsing_mode.allows_unitless_lengths() &&
!allow_quirks.allowed(context.quirks_mode)
{
return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
@@ -902,8 +909,9 @@ impl LengthOrPercentageOrAuto {
}
}
- let calc = input
- .parse_nested_block(|i| CalcNode::parse_length_or_percentage(context, i, num_context))?;
+ let calc = input.parse_nested_block(|i| {
+ CalcNode::parse_length_or_percentage(context, i, num_context)
+ })?;
Ok(LengthOrPercentageOrAuto::Calc(Box::new(calc)))
}
@@ -998,8 +1006,7 @@ impl Parse for NonNegativeLengthOrPercentageOrAuto {
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
Ok(NonNegative(LengthOrPercentageOrAuto::parse_non_negative(
- context,
- input,
+ context, input,
)?))
}
}
@@ -1028,7 +1035,8 @@ impl LengthOrPercentageOrNone {
match *token {
Token::Dimension {
value, ref unit, ..
- } if num_context.is_ok(context.parsing_mode, value) =>
+ }
+ if num_context.is_ok(context.parsing_mode, value) =>
{
return NoCalcLength::parse_dimension(context, value, unit)
.map(LengthOrPercentageOrNone::Length)
@@ -1042,7 +1050,8 @@ impl LengthOrPercentageOrNone {
)))
},
Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
- if value != 0. && !context.parsing_mode.allows_unitless_lengths() &&
+ if value != 0. &&
+ !context.parsing_mode.allows_unitless_lengths() &&
!allow_quirks.allowed(context.quirks_mode)
{
return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
@@ -1059,8 +1068,9 @@ impl LengthOrPercentageOrNone {
}
}
- let calc = input
- .parse_nested_block(|i| CalcNode::parse_length_or_percentage(context, i, num_context))?;
+ let calc = input.parse_nested_block(|i| {
+ CalcNode::parse_length_or_percentage(context, i, num_context)
+ })?;
Ok(LengthOrPercentageOrNone::Calc(Box::new(calc)))
}
diff --git a/components/style/values/specified/list.rs b/components/style/values/specified/list.rs
index ae61bb1ae9c..f1fba44b080 100644
--- a/components/style/values/specified/list.rs
+++ b/components/style/values/specified/list.rs
@@ -15,8 +15,7 @@ use values::generics::CounterStyleOrNone;
/// Specified and computed `list-style-type` property.
#[cfg(feature = "gecko")]
-#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub enum ListStyleType {
/// <counter-style> | none
CounterStyle(CounterStyleOrNone),
@@ -79,8 +78,7 @@ impl Parse for ListStyleType {
/// FIXME(emilio): It's a shame that this allocates all the time it's computed,
/// probably should just be refcounted.
/// FIXME This can probably derive ToCss.
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct Quotes(#[css(if_empty = "none")] pub Box<[(Box<str>, Box<str>)]>);
impl ToCss for Quotes {
diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs
index 2da4c7e93d3..b8c2cd01fe9 100644
--- a/components/style/values/specified/mod.rs
+++ b/components/style/values/specified/mod.rs
@@ -58,6 +58,7 @@ pub use self::length::{NonNegativeLengthOrPercentage, NonNegativeLengthOrPercent
pub use self::list::Quotes;
#[cfg(feature = "gecko")]
pub use self::list::ListStyleType;
+pub use self::motion::OffsetPath;
pub use self::outline::OutlineStyle;
pub use self::rect::LengthOrNumberRect;
pub use self::resolution::Resolution;
@@ -67,6 +68,7 @@ pub use self::position::{PositionComponent, ZIndex};
pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind};
pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
pub use self::svg::MozContextProperties;
+pub use self::svg_path::SVGPathData;
pub use self::table::XSpan;
pub use self::text::{InitialLetter, LetterSpacing, LineHeight, MozTabSize, TextAlign};
pub use self::text::{TextEmphasisPosition, TextEmphasisStyle};
@@ -100,6 +102,7 @@ pub mod grid;
pub mod image;
pub mod length;
pub mod list;
+pub mod motion;
pub mod outline;
pub mod percentage;
pub mod position;
@@ -107,6 +110,7 @@ pub mod rect;
pub mod resolution;
pub mod source_size_list;
pub mod svg;
+pub mod svg_path;
pub mod table;
pub mod text;
pub mod time;
@@ -147,8 +151,20 @@ fn parse_number_with_clamping_mode<'i, 't>(
// FIXME(emilio): Should move to border.rs
#[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Ord, Parse, PartialEq,
- PartialOrd, SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Ord,
+ Parse,
+ PartialEq,
+ PartialOrd,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum BorderStyle {
None = -1,
Solid = 6,
@@ -326,8 +342,7 @@ impl Parse for GreaterThanOrEqualToOneNumber {
///
/// FIXME(emilio): Should probably use Either.
#[allow(missing_docs)]
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToCss)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss)]
pub enum NumberOrPercentage {
Percentage(Percentage),
Number(Number),
@@ -365,8 +380,7 @@ impl Parse for NumberOrPercentage {
}
#[allow(missing_docs)]
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd,
- SpecifiedValueInfo, ToCss)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, SpecifiedValueInfo, ToCss)]
pub struct Opacity(Number);
impl Parse for Opacity {
@@ -626,13 +640,16 @@ impl ToComputedValue for ClipRect {
fn to_computed_value(&self, context: &Context) -> super::computed::ClipRect {
super::computed::ClipRect {
top: self.top.as_ref().map(|top| top.to_computed_value(context)),
- right: self.right
+ right: self
+ .right
.as_ref()
.map(|right| right.to_computed_value(context)),
- bottom: self.bottom
+ bottom: self
+ .bottom
.as_ref()
.map(|bottom| bottom.to_computed_value(context)),
- left: self.left
+ left: self
+ .left
.as_ref()
.map(|left| left.to_computed_value(context)),
}
@@ -756,8 +773,7 @@ impl AllowQuirks {
/// An attr(...) rule
///
/// `[namespace? `|`]? ident`
-#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
#[css(function)]
pub struct Attr {
/// Optional namespace prefix and URL.
@@ -810,7 +826,10 @@ impl Attr {
let prefix = Prefix::from(ns.as_ref());
let ns = match get_namespace_for_prefix(&prefix, context) {
Some(ns) => ns,
- None => return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError)),
+ None => {
+ return Err(location
+ .new_custom_error(StyleParseErrorKind::UnspecifiedError))
+ },
};
Some((prefix, ns))
} else {
diff --git a/components/style/values/specified/motion.rs b/components/style/values/specified/motion.rs
new file mode 100644
index 00000000000..b591d43a2bb
--- /dev/null
+++ b/components/style/values/specified/motion.rs
@@ -0,0 +1,73 @@
+/* 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/. */
+
+//! Specified types for CSS values that are related to motion path.
+
+use cssparser::Parser;
+use parser::{Parse, ParserContext};
+use style_traits::{ParseError, StyleParseErrorKind};
+use values::specified::SVGPathData;
+
+/// The offset-path value.
+///
+/// https://drafts.fxtf.org/motion-1/#offset-path-property
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToComputedValue,
+ ToCss,
+)]
+pub enum OffsetPath {
+ // We could merge SVGPathData into ShapeSource, so we could reuse them. However,
+ // we don't want to support other value for offset-path, so use SVGPathData only for now.
+ /// Path value for path(<string>).
+ #[css(function)]
+ Path(SVGPathData),
+ /// None value.
+ #[animation(error)]
+ None,
+ // Bug 1186329: Implement ray(), <basic-shape>, <geometry-box>, and <url>.
+}
+
+impl OffsetPath {
+ /// Return None.
+ #[inline]
+ pub fn none() -> Self {
+ OffsetPath::None
+ }
+}
+
+impl Parse for OffsetPath {
+ fn parse<'i, 't>(
+ context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ // Parse none.
+ if input.try(|i| i.expect_ident_matching("none")).is_ok() {
+ return Ok(OffsetPath::none());
+ }
+
+ // Parse possible functions.
+ let location = input.current_source_location();
+ let function = input.expect_function()?.clone();
+ input.parse_nested_block(move |i| {
+ match_ignore_ascii_case! { &function,
+ // Bug 1186329: Implement the parser for ray(), <basic-shape>, <geometry-box>,
+ // and <url>.
+ "path" => SVGPathData::parse(context, i).map(OffsetPath::Path),
+ _ => {
+ Err(location.new_custom_error(
+ StyleParseErrorKind::UnexpectedFunction(function.clone())
+ ))
+ },
+ }
+ })
+ }
+}
diff --git a/components/style/values/specified/outline.rs b/components/style/values/specified/outline.rs
index c3357f87ec2..afe74dc39f3 100644
--- a/components/style/values/specified/outline.rs
+++ b/components/style/values/specified/outline.rs
@@ -10,8 +10,19 @@ use selectors::parser::SelectorParseErrorKind;
use style_traits::ParseError;
use values::specified::BorderStyle;
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Ord, PartialEq, PartialOrd,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Ord,
+ PartialEq,
+ PartialOrd,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
/// <https://drafts.csswg.org/css-ui/#propdef-outline-style>
pub enum OutlineStyle {
/// auto
diff --git a/components/style/values/specified/position.rs b/components/style/values/specified/position.rs
index fcfa07ae1d8..6117436695f 100644
--- a/components/style/values/specified/position.rs
+++ b/components/style/values/specified/position.rs
@@ -45,8 +45,19 @@ pub enum PositionComponent<S> {
}
/// A keyword for the X direction.
-#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ Hash,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
#[allow(missing_docs)]
pub enum X {
Left,
@@ -54,8 +65,19 @@ pub enum X {
}
/// A keyword for the Y direction.
-#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ Hash,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
#[allow(missing_docs)]
pub enum Y {
Top,
@@ -128,10 +150,12 @@ impl Position {
}
let y_keyword = Y::parse(input)?;
let lop_and_x_pos: Result<_, ParseError> = input.try(|i| {
- let y_lop = i.try(|i| LengthOrPercentage::parse_quirky(context, i, allow_quirks))
+ let y_lop = i
+ .try(|i| LengthOrPercentage::parse_quirky(context, i, allow_quirks))
.ok();
if let Ok(x_keyword) = i.try(X::parse) {
- let x_lop = i.try(|i| LengthOrPercentage::parse_quirky(context, i, allow_quirks))
+ let x_lop = i
+ .try(|i| LengthOrPercentage::parse_quirky(context, i, allow_quirks))
.ok();
let x_pos = PositionComponent::Side(x_keyword, x_lop);
return Ok((y_lop, x_pos));
@@ -411,8 +435,9 @@ impl ToCss for LegacyPosition {
}
}
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
/// Auto-placement algorithm Option
pub enum AutoFlow {
/// The auto-placement algorithm places items by filling each row in turn,
@@ -423,8 +448,9 @@ pub enum AutoFlow {
Column,
}
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
/// Controls how the auto-placement algorithm works
/// specifying exactly how auto-placed items get flowed into the grid
pub struct GridAutoFlow {
@@ -630,8 +656,7 @@ impl Parse for TemplateAreas {
}
/// Arc type for `Arc<TemplateAreas>`
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub struct TemplateAreasArc(#[ignore_malloc_size_of = "Arc"] pub Arc<TemplateAreas>);
impl Parse for TemplateAreasArc {
@@ -685,8 +710,12 @@ impl<'a> Iterator for TemplateAreasTokenizer<'a> {
}
fn is_name_code_point(c: char) -> bool {
- c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || c >= '\u{80}' || c == '_' ||
- c >= '0' && c <= '9' || c == '-'
+ c >= 'A' && c <= 'Z' ||
+ c >= 'a' && c <= 'z' ||
+ c >= '\u{80}' ||
+ c == '_' ||
+ c >= '0' && c <= '9' ||
+ c == '-'
}
/// This property specifies named grid areas.
diff --git a/components/style/values/specified/resolution.rs b/components/style/values/specified/resolution.rs
index 77a269c251b..0878c776272 100644
--- a/components/style/values/specified/resolution.rs
+++ b/components/style/values/specified/resolution.rs
@@ -32,8 +32,7 @@ impl Resolution {
/// Convert this resolution value to dppx units.
pub fn to_dppx(&self) -> CSSFloat {
match *self {
- Resolution::X(f) |
- Resolution::Dppx(f) => f,
+ Resolution::X(f) | Resolution::Dppx(f) => f,
_ => self.to_dpi() / 96.0,
}
}
@@ -42,8 +41,7 @@ impl Resolution {
pub fn to_dpi(&self) -> CSSFloat {
match *self {
Resolution::Dpi(f) => f,
- Resolution::X(f) |
- Resolution::Dppx(f) => f * 96.0,
+ Resolution::X(f) | Resolution::Dppx(f) => f * 96.0,
Resolution::Dpcm(f) => f * 2.54,
}
}
diff --git a/components/style/values/specified/source_size_list.rs b/components/style/values/specified/source_size_list.rs
index 33078c06484..2d86d5a058f 100644
--- a/components/style/values/specified/source_size_list.rs
+++ b/components/style/values/specified/source_size_list.rs
@@ -61,7 +61,8 @@ impl SourceSizeList {
/// Evaluate this <source-size-list> to get the final viewport length.
pub fn evaluate(&self, device: &Device, quirks_mode: QuirksMode) -> Au {
- let matching_source_size = self.source_sizes
+ let matching_source_size = self
+ .source_sizes
.iter()
.find(|source_size| source_size.condition.matches(device, quirks_mode));
diff --git a/components/style/values/specified/svg.rs b/components/style/values/specified/svg.rs
index e55442d7da8..f91ac511af1 100644
--- a/components/style/values/specified/svg.rs
+++ b/components/style/values/specified/svg.rs
@@ -173,8 +173,7 @@ const PAINT_ORDER_MASK: u8 = 0b11;
///
/// Higher priority values, i.e. the values specified first,
/// will be painted first (and may be covered by paintings of lower priority)
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct SVGPaintOrder(pub u8);
impl SVGPaintOrder {
@@ -281,8 +280,7 @@ impl ToCss for SVGPaintOrder {
/// Specified MozContextProperties value.
/// Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-context-properties)
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
pub struct MozContextProperties(pub CustomIdent);
impl Parse for MozContextProperties {
diff --git a/components/style/values/specified/svg_path.rs b/components/style/values/specified/svg_path.rs
new file mode 100644
index 00000000000..f0973b545a5
--- /dev/null
+++ b/components/style/values/specified/svg_path.rs
@@ -0,0 +1,863 @@
+/* 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/. */
+
+//! Specified types for SVG Path.
+
+use cssparser::Parser;
+use parser::{Parse, ParserContext};
+use std::fmt::{self, Write};
+use std::iter::{Cloned, Peekable};
+use std::ops::AddAssign;
+use std::slice;
+use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
+use style_traits::values::SequenceWriter;
+use values::CSSFloat;
+use values::animated::{Animate, Procedure};
+use values::distance::{ComputeSquaredDistance, SquaredDistance};
+
+/// The SVG path data.
+///
+/// https://www.w3.org/TR/SVG11/paths.html#PathData
+#[derive(
+ Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToAnimatedZero, ToComputedValue,
+)]
+pub struct SVGPathData(Box<[PathCommand]>);
+
+impl SVGPathData {
+ /// Return SVGPathData by a slice of PathCommand.
+ #[inline]
+ pub fn new(cmd: Box<[PathCommand]>) -> Self {
+ debug_assert!(!cmd.is_empty());
+ SVGPathData(cmd)
+ }
+
+ /// Get the array of PathCommand.
+ #[inline]
+ pub fn commands(&self) -> &[PathCommand] {
+ debug_assert!(!self.0.is_empty());
+ &self.0
+ }
+
+ /// Create a normalized copy of this path by converting each relative command to an absolute
+ /// command.
+ fn normalize(&self) -> Self {
+ let mut state = PathTraversalState {
+ subpath_start: CoordPair::new(0.0, 0.0),
+ pos: CoordPair::new(0.0, 0.0),
+ };
+ let result = self
+ .0
+ .iter()
+ .map(|seg| seg.normalize(&mut state))
+ .collect::<Vec<_>>();
+ SVGPathData(result.into_boxed_slice())
+ }
+}
+
+impl ToCss for SVGPathData {
+ #[inline]
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: fmt::Write,
+ {
+ dest.write_char('"')?;
+ {
+ let mut writer = SequenceWriter::new(dest, " ");
+ for command in self.0.iter() {
+ writer.item(command)?;
+ }
+ }
+ dest.write_char('"')
+ }
+}
+
+impl Parse for SVGPathData {
+ // We cannot use cssparser::Parser to parse a SVG path string because the spec wants to make
+ // the SVG path string as compact as possible. (i.e. The whitespaces may be dropped.)
+ // e.g. "M100 200L100 200" is a valid SVG path string. If we use tokenizer, the first ident
+ // is "M100", instead of "M", and this is not correct. Therefore, we use a Peekable
+ // str::Char iterator to check each character.
+ fn parse<'i, 't>(
+ _context: &ParserContext,
+ input: &mut Parser<'i, 't>,
+ ) -> Result<Self, ParseError<'i>> {
+ let location = input.current_source_location();
+ let path_string = input.expect_string()?.as_ref();
+ if path_string.is_empty() {
+ // Treat an empty string as invalid, so we will not set it.
+ return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
+ }
+
+ // Parse the svg path string as multiple sub-paths.
+ let mut path_parser = PathParser::new(path_string);
+ while skip_wsp(&mut path_parser.chars) {
+ if path_parser.parse_subpath().is_err() {
+ return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
+ }
+ }
+
+ Ok(SVGPathData::new(path_parser.path.into_boxed_slice()))
+ }
+}
+
+impl Animate for SVGPathData {
+ fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
+ if self.0.len() != other.0.len() {
+ return Err(());
+ }
+
+ let result = self
+ .normalize()
+ .0
+ .iter()
+ .zip(other.normalize().0.iter())
+ .map(|(a, b)| a.animate(&b, procedure))
+ .collect::<Result<Vec<_>, _>>()?;
+ Ok(SVGPathData::new(result.into_boxed_slice()))
+ }
+}
+
+impl ComputeSquaredDistance for SVGPathData {
+ fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
+ if self.0.len() != other.0.len() {
+ return Err(());
+ }
+ self.normalize()
+ .0
+ .iter()
+ .zip(other.normalize().0.iter())
+ .map(|(this, other)| this.compute_squared_distance(&other))
+ .sum()
+ }
+}
+
+/// The SVG path command.
+/// The fields of these commands are self-explanatory, so we skip the documents.
+/// Note: the index of the control points, e.g. control1, control2, are mapping to the control
+/// points of the Bézier curve in the spec.
+///
+/// https://www.w3.org/TR/SVG11/paths.html#PathData
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+)]
+#[allow(missing_docs)]
+#[repr(C, u8)]
+pub enum PathCommand {
+ /// The unknown type.
+ /// https://www.w3.org/TR/SVG/paths.html#__svg__SVGPathSeg__PATHSEG_UNKNOWN
+ Unknown,
+ /// The "moveto" command.
+ MoveTo {
+ point: CoordPair,
+ absolute: IsAbsolute,
+ },
+ /// The "lineto" command.
+ LineTo {
+ point: CoordPair,
+ absolute: IsAbsolute,
+ },
+ /// The horizontal "lineto" command.
+ HorizontalLineTo { x: CSSFloat, absolute: IsAbsolute },
+ /// The vertical "lineto" command.
+ VerticalLineTo { y: CSSFloat, absolute: IsAbsolute },
+ /// The cubic Bézier curve command.
+ CurveTo {
+ control1: CoordPair,
+ control2: CoordPair,
+ point: CoordPair,
+ absolute: IsAbsolute,
+ },
+ /// The smooth curve command.
+ SmoothCurveTo {
+ control2: CoordPair,
+ point: CoordPair,
+ absolute: IsAbsolute,
+ },
+ /// The quadratic Bézier curve command.
+ QuadBezierCurveTo {
+ control1: CoordPair,
+ point: CoordPair,
+ absolute: IsAbsolute,
+ },
+ /// The smooth quadratic Bézier curve command.
+ SmoothQuadBezierCurveTo {
+ point: CoordPair,
+ absolute: IsAbsolute,
+ },
+ /// The elliptical arc curve command.
+ EllipticalArc {
+ rx: CSSFloat,
+ ry: CSSFloat,
+ angle: CSSFloat,
+ #[animation(constant)]
+ large_arc_flag: ArcFlag,
+ #[animation(constant)]
+ sweep_flag: ArcFlag,
+ point: CoordPair,
+ absolute: IsAbsolute,
+ },
+ /// The "closepath" command.
+ ClosePath,
+}
+
+/// For internal SVGPath normalization.
+#[allow(missing_docs)]
+struct PathTraversalState {
+ subpath_start: CoordPair,
+ pos: CoordPair,
+}
+
+impl PathCommand {
+ /// Create a normalized copy of this PathCommand. Absolute commands will be copied as-is while
+ /// for relative commands an equivalent absolute command will be returned.
+ ///
+ /// See discussion: https://github.com/w3c/svgwg/issues/321
+ fn normalize(&self, state: &mut PathTraversalState) -> Self {
+ use self::PathCommand::*;
+ match *self {
+ Unknown => Unknown,
+ ClosePath => {
+ state.pos = state.subpath_start;
+ ClosePath
+ },
+ MoveTo {
+ mut point,
+ absolute,
+ } => {
+ if !absolute.is_yes() {
+ point += state.pos;
+ }
+ state.pos = point;
+ state.subpath_start = point;
+ MoveTo {
+ point,
+ absolute: IsAbsolute::Yes,
+ }
+ },
+ LineTo {
+ mut point,
+ absolute,
+ } => {
+ if !absolute.is_yes() {
+ point += state.pos;
+ }
+ state.pos = point;
+ LineTo {
+ point,
+ absolute: IsAbsolute::Yes,
+ }
+ },
+ HorizontalLineTo { mut x, absolute } => {
+ if !absolute.is_yes() {
+ x += state.pos.0;
+ }
+ state.pos.0 = x;
+ HorizontalLineTo {
+ x,
+ absolute: IsAbsolute::Yes,
+ }
+ },
+ VerticalLineTo { mut y, absolute } => {
+ if !absolute.is_yes() {
+ y += state.pos.1;
+ }
+ state.pos.1 = y;
+ VerticalLineTo {
+ y,
+ absolute: IsAbsolute::Yes,
+ }
+ },
+ CurveTo {
+ mut control1,
+ mut control2,
+ mut point,
+ absolute,
+ } => {
+ if !absolute.is_yes() {
+ control1 += state.pos;
+ control2 += state.pos;
+ point += state.pos;
+ }
+ state.pos = point;
+ CurveTo {
+ control1,
+ control2,
+ point,
+ absolute: IsAbsolute::Yes,
+ }
+ },
+ SmoothCurveTo {
+ mut control2,
+ mut point,
+ absolute,
+ } => {
+ if !absolute.is_yes() {
+ control2 += state.pos;
+ point += state.pos;
+ }
+ state.pos = point;
+ SmoothCurveTo {
+ control2,
+ point,
+ absolute: IsAbsolute::Yes,
+ }
+ },
+ QuadBezierCurveTo {
+ mut control1,
+ mut point,
+ absolute,
+ } => {
+ if !absolute.is_yes() {
+ control1 += state.pos;
+ point += state.pos;
+ }
+ state.pos = point;
+ QuadBezierCurveTo {
+ control1,
+ point,
+ absolute: IsAbsolute::Yes,
+ }
+ },
+ SmoothQuadBezierCurveTo {
+ mut point,
+ absolute,
+ } => {
+ if !absolute.is_yes() {
+ point += state.pos;
+ }
+ state.pos = point;
+ SmoothQuadBezierCurveTo {
+ point,
+ absolute: IsAbsolute::Yes,
+ }
+ },
+ EllipticalArc {
+ rx,
+ ry,
+ angle,
+ large_arc_flag,
+ sweep_flag,
+ mut point,
+ absolute,
+ } => {
+ if !absolute.is_yes() {
+ point += state.pos;
+ }
+ state.pos = point;
+ EllipticalArc {
+ rx,
+ ry,
+ angle,
+ large_arc_flag,
+ sweep_flag,
+ point,
+ absolute: IsAbsolute::Yes,
+ }
+ },
+ }
+ }
+}
+
+impl ToCss for PathCommand {
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: fmt::Write,
+ {
+ use self::PathCommand::*;
+ match *self {
+ Unknown => dest.write_char('X'),
+ ClosePath => dest.write_char('Z'),
+ MoveTo { point, absolute } => {
+ dest.write_char(if absolute.is_yes() { 'M' } else { 'm' })?;
+ dest.write_char(' ')?;
+ point.to_css(dest)
+ },
+ LineTo { point, absolute } => {
+ dest.write_char(if absolute.is_yes() { 'L' } else { 'l' })?;
+ dest.write_char(' ')?;
+ point.to_css(dest)
+ },
+ CurveTo {
+ control1,
+ control2,
+ point,
+ absolute,
+ } => {
+ dest.write_char(if absolute.is_yes() { 'C' } else { 'c' })?;
+ dest.write_char(' ')?;
+ control1.to_css(dest)?;
+ dest.write_char(' ')?;
+ control2.to_css(dest)?;
+ dest.write_char(' ')?;
+ point.to_css(dest)
+ },
+ QuadBezierCurveTo {
+ control1,
+ point,
+ absolute,
+ } => {
+ dest.write_char(if absolute.is_yes() { 'Q' } else { 'q' })?;
+ dest.write_char(' ')?;
+ control1.to_css(dest)?;
+ dest.write_char(' ')?;
+ point.to_css(dest)
+ },
+ EllipticalArc {
+ rx,
+ ry,
+ angle,
+ large_arc_flag,
+ sweep_flag,
+ point,
+ absolute,
+ } => {
+ dest.write_char(if absolute.is_yes() { 'A' } else { 'a' })?;
+ dest.write_char(' ')?;
+ rx.to_css(dest)?;
+ dest.write_char(' ')?;
+ ry.to_css(dest)?;
+ dest.write_char(' ')?;
+ angle.to_css(dest)?;
+ dest.write_char(' ')?;
+ large_arc_flag.to_css(dest)?;
+ dest.write_char(' ')?;
+ sweep_flag.to_css(dest)?;
+ dest.write_char(' ')?;
+ point.to_css(dest)
+ },
+ HorizontalLineTo { x, absolute } => {
+ dest.write_char(if absolute.is_yes() { 'H' } else { 'h' })?;
+ dest.write_char(' ')?;
+ x.to_css(dest)
+ },
+ VerticalLineTo { y, absolute } => {
+ dest.write_char(if absolute.is_yes() { 'V' } else { 'v' })?;
+ dest.write_char(' ')?;
+ y.to_css(dest)
+ },
+ SmoothCurveTo {
+ control2,
+ point,
+ absolute,
+ } => {
+ dest.write_char(if absolute.is_yes() { 'S' } else { 's' })?;
+ dest.write_char(' ')?;
+ control2.to_css(dest)?;
+ dest.write_char(' ')?;
+ point.to_css(dest)
+ },
+ SmoothQuadBezierCurveTo { point, absolute } => {
+ dest.write_char(if absolute.is_yes() { 'T' } else { 't' })?;
+ dest.write_char(' ')?;
+ point.to_css(dest)
+ },
+ }
+ }
+}
+
+/// The path command absolute type.
+#[allow(missing_docs)]
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+)]
+#[repr(u8)]
+pub enum IsAbsolute {
+ Yes,
+ No,
+}
+
+impl IsAbsolute {
+ /// Return true if this is IsAbsolute::Yes.
+ #[inline]
+ pub fn is_yes(&self) -> bool {
+ *self == IsAbsolute::Yes
+ }
+}
+
+/// The path coord type.
+#[derive(
+ Animate,
+ Clone,
+ ComputeSquaredDistance,
+ Copy,
+ Debug,
+ MallocSizeOf,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToAnimatedZero,
+ ToCss,
+)]
+#[repr(C)]
+pub struct CoordPair(CSSFloat, CSSFloat);
+
+impl CoordPair {
+ /// Create a CoordPair.
+ #[inline]
+ pub fn new(x: CSSFloat, y: CSSFloat) -> Self {
+ CoordPair(x, y)
+ }
+}
+
+impl AddAssign for CoordPair {
+ #[inline]
+ fn add_assign(&mut self, other: Self) {
+ self.0 += other.0;
+ self.1 += other.1;
+ }
+}
+
+/// The EllipticalArc flag type.
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo)]
+#[repr(C)]
+pub struct ArcFlag(bool);
+
+impl ToCss for ArcFlag {
+ #[inline]
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: fmt::Write,
+ {
+ (self.0 as i32).to_css(dest)
+ }
+}
+
+impl ComputeSquaredDistance for ArcFlag {
+ #[inline]
+ fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
+ (self.0 as i32).compute_squared_distance(&(other.0 as i32))
+ }
+}
+
+/// SVG Path parser.
+struct PathParser<'a> {
+ chars: Peekable<Cloned<slice::Iter<'a, u8>>>,
+ path: Vec<PathCommand>,
+}
+
+macro_rules! parse_arguments {
+ (
+ $parser:ident,
+ $abs:ident,
+ $enum:ident,
+ [ $para:ident => $func:ident $(, $other_para:ident => $other_func:ident)* ]
+ ) => {
+ {
+ loop {
+ let $para = $func(&mut $parser.chars)?;
+ $(
+ skip_comma_wsp(&mut $parser.chars);
+ let $other_para = $other_func(&mut $parser.chars)?;
+ )*
+ $parser.path.push(PathCommand::$enum { $para $(, $other_para)*, $abs });
+
+ // End of string or the next character is a possible new command.
+ if !skip_wsp(&mut $parser.chars) ||
+ $parser.chars.peek().map_or(true, |c| c.is_ascii_alphabetic()) {
+ break;
+ }
+ skip_comma_wsp(&mut $parser.chars);
+ }
+ Ok(())
+ }
+ }
+}
+
+impl<'a> PathParser<'a> {
+ /// Return a PathParser.
+ #[inline]
+ fn new(string: &'a str) -> Self {
+ PathParser {
+ chars: string.as_bytes().iter().cloned().peekable(),
+ path: Vec::new(),
+ }
+ }
+
+ /// Parse a sub-path.
+ fn parse_subpath(&mut self) -> Result<(), ()> {
+ // Handle "moveto" Command first. If there is no "moveto", this is not a valid sub-path
+ // (i.e. not a valid moveto-drawto-command-group).
+ self.parse_moveto()?;
+
+ // Handle other commands.
+ loop {
+ skip_wsp(&mut self.chars);
+ if self.chars.peek().map_or(true, |&m| m == b'M' || m == b'm') {
+ break;
+ }
+
+ match self.chars.next() {
+ Some(command) => {
+ let abs = if command.is_ascii_uppercase() {
+ IsAbsolute::Yes
+ } else {
+ IsAbsolute::No
+ };
+ macro_rules! parse_command {
+ ( $($($p:pat)|+ => $parse_func:ident,)* ) => {
+ match command {
+ $(
+ $($p)|+ => {
+ skip_wsp(&mut self.chars);
+ self.$parse_func(abs)?;
+ },
+ )*
+ _ => return Err(()),
+ }
+ }
+ }
+ parse_command!(
+ b'Z' | b'z' => parse_closepath,
+ b'L' | b'l' => parse_lineto,
+ b'H' | b'h' => parse_h_lineto,
+ b'V' | b'v' => parse_v_lineto,
+ b'C' | b'c' => parse_curveto,
+ b'S' | b's' => parse_smooth_curveto,
+ b'Q' | b'q' => parse_quadratic_bezier_curveto,
+ b'T' | b't' => parse_smooth_quadratic_bezier_curveto,
+ b'A' | b'a' => parse_elliptical_arc,
+ );
+ },
+ _ => break, // no more commands.
+ }
+ }
+ Ok(())
+ }
+
+ /// Parse "moveto" command.
+ fn parse_moveto(&mut self) -> Result<(), ()> {
+ let command = match self.chars.next() {
+ Some(c) if c == b'M' || c == b'm' => c,
+ _ => return Err(()),
+ };
+
+ skip_wsp(&mut self.chars);
+ let point = parse_coord(&mut self.chars)?;
+ let absolute = if command == b'M' {
+ IsAbsolute::Yes
+ } else {
+ IsAbsolute::No
+ };
+ self.path.push(PathCommand::MoveTo { point, absolute });
+
+ // End of string or the next character is a possible new command.
+ if !skip_wsp(&mut self.chars) || self.chars.peek().map_or(true, |c| c.is_ascii_alphabetic())
+ {
+ return Ok(());
+ }
+ skip_comma_wsp(&mut self.chars);
+
+ // If a moveto is followed by multiple pairs of coordinates, the subsequent
+ // pairs are treated as implicit lineto commands.
+ self.parse_lineto(absolute)
+ }
+
+ /// Parse "closepath" command.
+ fn parse_closepath(&mut self, _absolute: IsAbsolute) -> Result<(), ()> {
+ self.path.push(PathCommand::ClosePath);
+ Ok(())
+ }
+
+ /// Parse "lineto" command.
+ fn parse_lineto(&mut self, absolute: IsAbsolute) -> Result<(), ()> {
+ parse_arguments!(self, absolute, LineTo, [ point => parse_coord ])
+ }
+
+ /// Parse horizontal "lineto" command.
+ fn parse_h_lineto(&mut self, absolute: IsAbsolute) -> Result<(), ()> {
+ parse_arguments!(self, absolute, HorizontalLineTo, [ x => parse_number ])
+ }
+
+ /// Parse vertical "lineto" command.
+ fn parse_v_lineto(&mut self, absolute: IsAbsolute) -> Result<(), ()> {
+ parse_arguments!(self, absolute, VerticalLineTo, [ y => parse_number ])
+ }
+
+ /// Parse cubic Bézier curve command.
+ fn parse_curveto(&mut self, absolute: IsAbsolute) -> Result<(), ()> {
+ parse_arguments!(self, absolute, CurveTo, [
+ control1 => parse_coord, control2 => parse_coord, point => parse_coord
+ ])
+ }
+
+ /// Parse smooth "curveto" command.
+ fn parse_smooth_curveto(&mut self, absolute: IsAbsolute) -> Result<(), ()> {
+ parse_arguments!(self, absolute, SmoothCurveTo, [
+ control2 => parse_coord, point => parse_coord
+ ])
+ }
+
+ /// Parse quadratic Bézier curve command.
+ fn parse_quadratic_bezier_curveto(&mut self, absolute: IsAbsolute) -> Result<(), ()> {
+ parse_arguments!(self, absolute, QuadBezierCurveTo, [
+ control1 => parse_coord, point => parse_coord
+ ])
+ }
+
+ /// Parse smooth quadratic Bézier curveto command.
+ fn parse_smooth_quadratic_bezier_curveto(&mut self, absolute: IsAbsolute) -> Result<(), ()> {
+ parse_arguments!(self, absolute, SmoothQuadBezierCurveTo, [ point => parse_coord ])
+ }
+
+ /// Parse elliptical arc curve command.
+ fn parse_elliptical_arc(&mut self, absolute: IsAbsolute) -> Result<(), ()> {
+ // Parse a flag whose value is '0' or '1'; otherwise, return Err(()).
+ let parse_flag = |iter: &mut Peekable<Cloned<slice::Iter<u8>>>| match iter.next() {
+ Some(c) if c == b'0' || c == b'1' => Ok(ArcFlag(c == b'1')),
+ _ => Err(()),
+ };
+ parse_arguments!(self, absolute, EllipticalArc, [
+ rx => parse_number,
+ ry => parse_number,
+ angle => parse_number,
+ large_arc_flag => parse_flag,
+ sweep_flag => parse_flag,
+ point => parse_coord
+ ])
+ }
+}
+
+/// Parse a pair of numbers into CoordPair.
+fn parse_coord(iter: &mut Peekable<Cloned<slice::Iter<u8>>>) -> Result<CoordPair, ()> {
+ let x = parse_number(iter)?;
+ skip_comma_wsp(iter);
+ let y = parse_number(iter)?;
+ Ok(CoordPair::new(x, y))
+}
+
+/// This is a special version which parses the number for SVG Path. e.g. "M 0.6.5" should be parsed
+/// as MoveTo with a coordinate of ("0.6", ".5"), instead of treating 0.6.5 as a non-valid floating
+/// point number. In other words, the logic here is similar with that of
+/// tokenizer::consume_numeric, which also consumes the number as many as possible, but here the
+/// input is a Peekable and we only accept an integer of a floating point number.
+///
+/// The "number" syntax in https://www.w3.org/TR/SVG/paths.html#PathDataBNF
+fn parse_number(iter: &mut Peekable<Cloned<slice::Iter<u8>>>) -> Result<CSSFloat, ()> {
+ // 1. Check optional sign.
+ let sign = if iter
+ .peek()
+ .map_or(false, |&sign| sign == b'+' || sign == b'-')
+ {
+ if iter.next().unwrap() == b'-' {
+ -1.
+ } else {
+ 1.
+ }
+ } else {
+ 1.
+ };
+
+ // 2. Check integer part.
+ let mut integral_part: f64 = 0.;
+ let got_dot = if !iter.peek().map_or(false, |&n| n == b'.') {
+ // If the first digit in integer part is neither a dot nor a digit, this is not a number.
+ if iter.peek().map_or(true, |n| !n.is_ascii_digit()) {
+ return Err(());
+ }
+
+ while iter.peek().map_or(false, |n| n.is_ascii_digit()) {
+ integral_part = integral_part * 10. + (iter.next().unwrap() - b'0') as f64;
+ }
+
+ iter.peek().map_or(false, |&n| n == b'.')
+ } else {
+ true
+ };
+
+ // 3. Check fractional part.
+ let mut fractional_part: f64 = 0.;
+ if got_dot {
+ // Consume '.'.
+ iter.next();
+ // If the first digit in fractional part is not a digit, this is not a number.
+ if iter.peek().map_or(true, |n| !n.is_ascii_digit()) {
+ return Err(());
+ }
+
+ let mut factor = 0.1;
+ while iter.peek().map_or(false, |n| n.is_ascii_digit()) {
+ fractional_part += (iter.next().unwrap() - b'0') as f64 * factor;
+ factor *= 0.1;
+ }
+ }
+
+ let mut value = sign * (integral_part + fractional_part);
+
+ // 4. Check exp part. The segment name of SVG Path doesn't include 'E' or 'e', so it's ok to
+ // treat the numbers after 'E' or 'e' are in the exponential part.
+ if iter.peek().map_or(false, |&exp| exp == b'E' || exp == b'e') {
+ // Consume 'E' or 'e'.
+ iter.next();
+ let exp_sign = if iter
+ .peek()
+ .map_or(false, |&sign| sign == b'+' || sign == b'-')
+ {
+ if iter.next().unwrap() == b'-' {
+ -1.
+ } else {
+ 1.
+ }
+ } else {
+ 1.
+ };
+
+ let mut exp: f64 = 0.;
+ while iter.peek().map_or(false, |n| n.is_ascii_digit()) {
+ exp = exp * 10. + (iter.next().unwrap() - b'0') as f64;
+ }
+
+ value *= f64::powf(10., exp * exp_sign);
+ }
+
+ if value.is_finite() {
+ Ok(value
+ .min(::std::f32::MAX as f64)
+ .max(::std::f32::MIN as f64) as CSSFloat)
+ } else {
+ Err(())
+ }
+}
+
+/// Skip all svg whitespaces, and return true if |iter| hasn't finished.
+#[inline]
+fn skip_wsp(iter: &mut Peekable<Cloned<slice::Iter<u8>>>) -> bool {
+ // Note: SVG 1.1 defines the whitespaces as \u{9}, \u{20}, \u{A}, \u{D}.
+ // However, SVG 2 has one extra whitespace: \u{C}.
+ // Therefore, we follow the newest spec for the definition of whitespace,
+ // i.e. \u{9}, \u{20}, \u{A}, \u{C}, \u{D}.
+ while iter.peek().map_or(false, |c| c.is_ascii_whitespace()) {
+ iter.next();
+ }
+ iter.peek().is_some()
+}
+
+/// Skip all svg whitespaces and one comma, and return true if |iter| hasn't finished.
+#[inline]
+fn skip_comma_wsp(iter: &mut Peekable<Cloned<slice::Iter<u8>>>) -> bool {
+ if !skip_wsp(iter) {
+ return false;
+ }
+
+ if *iter.peek().unwrap() != b',' {
+ return true;
+ }
+ iter.next();
+
+ skip_wsp(iter)
+}
diff --git a/components/style/values/specified/table.rs b/components/style/values/specified/table.rs
index 085c9adc9d8..0dd0755f95a 100644
--- a/components/style/values/specified/table.rs
+++ b/components/style/values/specified/table.rs
@@ -8,8 +8,9 @@ use cssparser::Parser;
use parser::{Parse, ParserContext};
use style_traits::{ParseError, StyleParseErrorKind};
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
/// span. for `<col span>` pres attr
pub struct XSpan(#[css(skip)] pub i32);
diff --git a/components/style/values/specified/text.rs b/components/style/values/specified/text.rs
index ae01040e45f..adeab96c984 100644
--- a/components/style/values/specified/text.rs
+++ b/components/style/values/specified/text.rs
@@ -94,7 +94,10 @@ impl Parse for LineHeight {
{
Ok(GenericLineHeight::MozBlockHeight)
},
- ident => Err(location.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone()))),
+ ident => {
+ Err(location
+ .new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone())))
+ },
}
}
}
@@ -587,8 +590,7 @@ impl TextEmphasisKeywordValue {
}
/// Fill mode for the text-emphasis-style property
-#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo,
- ToCss)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss)]
pub enum TextEmphasisFillMode {
/// `filled`
Filled,
@@ -597,8 +599,7 @@ pub enum TextEmphasisFillMode {
}
/// Shape keyword for the text-emphasis-style property
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToCss)]
+#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss)]
pub enum TextEmphasisShapeKeyword {
/// `dot`
Dot,
@@ -724,8 +725,18 @@ impl Parse for TextEmphasisStyle {
}
/// The allowed horizontal values for the `text-emphasis-position` property.
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum TextEmphasisHorizontalWritingModeValue {
/// Draw marks over the text in horizontal writing mode.
Over,
@@ -734,8 +745,18 @@ pub enum TextEmphasisHorizontalWritingModeValue {
}
/// The allowed vertical values for the `text-emphasis-position` property.
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
- SpecifiedValueInfo, ToComputedValue, ToCss)]
+#[derive(
+ Clone,
+ Copy,
+ Debug,
+ Eq,
+ MallocSizeOf,
+ Parse,
+ PartialEq,
+ SpecifiedValueInfo,
+ ToComputedValue,
+ ToCss,
+)]
pub enum TextEmphasisVerticalWritingModeValue {
/// Draws marks to the right of the text in vertical writing mode.
Right,
@@ -744,8 +765,9 @@ pub enum TextEmphasisVerticalWritingModeValue {
}
/// Specified value of `text-emphasis-position` property.
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue, ToCss)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
+)]
pub struct TextEmphasisPosition(
pub TextEmphasisHorizontalWritingModeValue,
pub TextEmphasisVerticalWritingModeValue,
@@ -846,8 +868,7 @@ impl Parse for MozTabSize {
return Ok(GenericMozTabSize::Number(number));
}
Ok(GenericMozTabSize::Length(NonNegativeLength::parse(
- context,
- input,
+ context, input,
)?))
}
}
diff --git a/components/style/values/specified/time.rs b/components/style/values/specified/time.rs
index 107c45b2d48..6895a918346 100644
--- a/components/style/values/specified/time.rs
+++ b/components/style/values/specified/time.rs
@@ -92,7 +92,8 @@ impl Time {
// ParsingMode::DEFAULT directly.
Ok(&Token::Dimension {
value, ref unit, ..
- }) if clamping_mode.is_ok(ParsingMode::DEFAULT, value) =>
+ })
+ if clamping_mode.is_ok(ParsingMode::DEFAULT, value) =>
{
return Time::parse_dimension(value, unit, /* from_calc = */ false)
.map_err(|()| location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
diff --git a/components/style/values/specified/ui.rs b/components/style/values/specified/ui.rs
index e912c24b808..7dc1e0fe1d3 100644
--- a/components/style/values/specified/ui.rs
+++ b/components/style/values/specified/ui.rs
@@ -52,9 +52,8 @@ impl Parse for CursorKind {
) -> Result<Self, ParseError<'i>> {
let location = input.current_source_location();
let ident = input.expect_ident()?;
- CursorKind::from_css_keyword(&ident).map_err(|_| {
- location.new_custom_error(StyleParseErrorKind::UnspecifiedError)
- })
+ CursorKind::from_css_keyword(&ident)
+ .map_err(|_| location.new_custom_error(StyleParseErrorKind::UnspecifiedError))
}
}
@@ -74,8 +73,7 @@ impl Parse for CursorImage {
}
/// Specified value of `-moz-force-broken-image-icon`
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
- ToComputedValue)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
pub struct MozForceBrokenImageIcon(pub bool);
impl MozForceBrokenImageIcon {
diff --git a/components/style_derive/animate.rs b/components/style_derive/animate.rs
index d591e3db108..0f76040156a 100644
--- a/components/style_derive/animate.rs
+++ b/components/style_derive/animate.rs
@@ -31,7 +31,7 @@ pub fn derive(mut input: DeriveInput) -> Tokens {
Err(()) => {
append_error_clause = true;
return body;
- }
+ },
};
quote! { #body #arm }
});
diff --git a/components/style_derive/cg.rs b/components/style_derive/cg.rs
index b370a5c55d4..6cc13c89497 100644
--- a/components/style_derive/cg.rs
+++ b/components/style_derive/cg.rs
@@ -11,23 +11,21 @@ use syn::{TypeParam, TypeParen, TypePath, TypeSlice, TypeTuple};
use syn::{Variant, WherePredicate};
use synstructure::{self, BindingInfo, BindStyle, VariantAst, VariantInfo};
-pub fn add_predicate(
- where_clause: &mut Option<syn::WhereClause>,
- pred: WherePredicate,
-) {
- where_clause.get_or_insert(parse_quote!(where)).predicates.push(pred);
+pub fn add_predicate(where_clause: &mut Option<syn::WhereClause>, pred: WherePredicate) {
+ where_clause
+ .get_or_insert(parse_quote!(where))
+ .predicates
+ .push(pred);
}
-pub fn fmap_match<F>(
- input: &DeriveInput,
- bind_style: BindStyle,
- mut f: F,
-) -> Tokens
+pub fn fmap_match<F>(input: &DeriveInput, bind_style: BindStyle, mut f: F) -> Tokens
where
F: FnMut(BindingInfo) -> Tokens,
{
let mut s = synstructure::Structure::new(input);
- s.variants_mut().iter_mut().for_each(|v| { v.bind_with(|_| bind_style); });
+ s.variants_mut().iter_mut().for_each(|v| {
+ v.bind_with(|_| bind_style);
+ });
s.each_variant(|variant| {
let (mapped, mapped_fields) = value(variant, "mapped");
let fields_pairs = variant.bindings().into_iter().zip(mapped_fields);
@@ -41,31 +39,30 @@ where
})
}
-pub fn fmap_trait_output(
- input: &DeriveInput,
- trait_path: &Path,
- trait_output: Ident,
-) -> Path {
+pub fn fmap_trait_output(input: &DeriveInput, trait_path: &Path, trait_output: Ident) -> Path {
let segment = PathSegment {
ident: input.ident.clone(),
arguments: PathArguments::AngleBracketed(AngleBracketedGenericArguments {
- args: input.generics.params.iter().map(|arg| {
- match arg {
- &GenericParam::Lifetime(ref data) => GenericArgument::Lifetime(data.lifetime.clone()),
+ args: input
+ .generics
+ .params
+ .iter()
+ .map(|arg| match arg {
+ &GenericParam::Lifetime(ref data) => {
+ GenericArgument::Lifetime(data.lifetime.clone())
+ },
&GenericParam::Type(ref data) => {
let ident = data.ident;
GenericArgument::Type(
parse_quote!(<#ident as ::#trait_path>::#trait_output),
)
},
- ref arg => panic!("arguments {:?} cannot be mapped yet", arg)
- }
- }).collect(),
+ ref arg => panic!("arguments {:?} cannot be mapped yet", arg),
+ }).collect(),
colon2_token: Default::default(),
gt_token: Default::default(),
lt_token: Default::default(),
-
- })
+ }),
};
segment.into()
}
@@ -75,44 +72,55 @@ where
F: FnMut(&Ident) -> Type,
{
match *ty {
- Type::Slice(ref inner) => {
- Type::from(TypeSlice { elem: Box::new(map_type_params(&inner.elem, params, f)), ..inner.clone() })
- },
- Type::Array(ref inner) => { //ref ty, ref expr) => {
- Type::from(TypeArray { elem: Box::new(map_type_params(&inner.elem, params, f)), ..inner.clone() })
+ Type::Slice(ref inner) => Type::from(TypeSlice {
+ elem: Box::new(map_type_params(&inner.elem, params, f)),
+ ..inner.clone()
+ }),
+ Type::Array(ref inner) => {
+ //ref ty, ref expr) => {
+ Type::from(TypeArray {
+ elem: Box::new(map_type_params(&inner.elem, params, f)),
+ ..inner.clone()
+ })
},
ref ty @ Type::Never(_) => ty.clone(),
- Type::Tuple(ref inner) => {
- Type::from(
- TypeTuple {
- elems: inner.elems.iter().map(|ty| map_type_params(&ty, params, f)).collect(),
- ..inner.clone()
- }
- )
- },
- Type::Path(TypePath { qself: None, ref path }) => {
+ Type::Tuple(ref inner) => Type::from(TypeTuple {
+ elems: inner
+ .elems
+ .iter()
+ .map(|ty| map_type_params(&ty, params, f))
+ .collect(),
+ ..inner.clone()
+ }),
+ Type::Path(TypePath {
+ qself: None,
+ ref path,
+ }) => {
if let Some(ident) = path_to_ident(path) {
if params.iter().any(|param| param.ident == ident) {
return f(ident);
}
}
- Type::from(TypePath { qself: None, path: map_type_params_in_path(path, params, f) })
- }
- Type::Path(TypePath { ref qself, ref path }) => {
Type::from(TypePath {
- qself: qself.as_ref().map(|qself| {
- QSelf {
- ty: Box::new(map_type_params(&qself.ty, params, f)),
- position: qself.position,
- ..qself.clone()
- }
- }),
+ qself: None,
path: map_type_params_in_path(path, params, f),
})
},
- Type::Paren(ref inner) => {
- Type::from(TypeParen { elem: Box::new(map_type_params(&inner.elem, params, f)), ..inner.clone() })
- },
+ Type::Path(TypePath {
+ ref qself,
+ ref path,
+ }) => Type::from(TypePath {
+ qself: qself.as_ref().map(|qself| QSelf {
+ ty: Box::new(map_type_params(&qself.ty, params, f)),
+ position: qself.position,
+ ..qself.clone()
+ }),
+ path: map_type_params_in_path(path, params, f),
+ }),
+ Type::Paren(ref inner) => Type::from(TypeParen {
+ elem: Box::new(map_type_params(&inner.elem, params, f)),
+ ..inner.clone()
+ }),
ref ty => panic!("type {:?} cannot be mapped yet", ty),
}
}
@@ -123,41 +131,48 @@ where
{
Path {
leading_colon: path.leading_colon,
- segments: path.segments.iter().map(|segment| {
- PathSegment {
+ segments: path
+ .segments
+ .iter()
+ .map(|segment| PathSegment {
ident: segment.ident.clone(),
arguments: match segment.arguments {
PathArguments::AngleBracketed(ref data) => {
PathArguments::AngleBracketed(AngleBracketedGenericArguments {
- args: data.args.iter().map(|arg| {
- match arg {
+ args: data
+ .args
+ .iter()
+ .map(|arg| match arg {
ty @ &GenericArgument::Lifetime(_) => ty.clone(),
&GenericArgument::Type(ref data) => {
GenericArgument::Type(map_type_params(data, params, f))
},
- &GenericArgument::Binding(ref data) => GenericArgument::Binding(Binding {
- ty: map_type_params(&data.ty, params, f),
- ..data.clone()
- }),
- ref arg => panic!("arguments {:?} cannot be mapped yet", arg)
- }
- }).collect(),
+ &GenericArgument::Binding(ref data) => {
+ GenericArgument::Binding(Binding {
+ ty: map_type_params(&data.ty, params, f),
+ ..data.clone()
+ })
+ },
+ ref arg => panic!("arguments {:?} cannot be mapped yet", arg),
+ }).collect(),
..data.clone()
})
},
ref arg @ PathArguments::None => arg.clone(),
- ref parameters => {
- panic!("parameters {:?} cannot be mapped yet", parameters)
- }
+ ref parameters => panic!("parameters {:?} cannot be mapped yet", parameters),
},
- }
- }).collect(),
+ }).collect(),
}
}
fn path_to_ident(path: &Path) -> Option<&Ident> {
match *path {
- Path { leading_colon: None, ref segments } if segments.len() == 1 => {
+ Path {
+ leading_colon: None,
+ ref segments,
+ }
+ if segments.len() == 1 =>
+ {
if segments[0].arguments.is_empty() {
Some(&segments[0].ident)
} else {
@@ -203,7 +218,7 @@ where
pub fn parse_variant_attrs<A>(variant: &Variant) -> A
where
- A: FromVariant
+ A: FromVariant,
{
match A::from_variant(variant) {
Ok(attrs) => attrs,
@@ -211,23 +226,20 @@ where
}
}
-
-pub fn ref_pattern<'a>(
- variant: &'a VariantInfo,
- prefix: &str,
-) -> (Tokens, Vec<BindingInfo<'a>>) {
+pub fn ref_pattern<'a>(variant: &'a VariantInfo, prefix: &str) -> (Tokens, Vec<BindingInfo<'a>>) {
let mut v = variant.clone();
v.bind_with(|_| BindStyle::Ref);
- v.bindings_mut().iter_mut().for_each(|b| { b.binding = Ident::from(format!("{}_{}", b.binding, prefix)) });
+ v.bindings_mut()
+ .iter_mut()
+ .for_each(|b| b.binding = Ident::from(format!("{}_{}", b.binding, prefix)));
(v.pat(), v.bindings().iter().cloned().collect())
}
-pub fn value<'a>(
- variant: &'a VariantInfo,
- prefix: &str,
-) -> (Tokens, Vec<BindingInfo<'a>>) {
+pub fn value<'a>(variant: &'a VariantInfo, prefix: &str) -> (Tokens, Vec<BindingInfo<'a>>) {
let mut v = variant.clone();
- v.bindings_mut().iter_mut().for_each(|b| { b.binding = Ident::from(format!("{}_{}", b.binding, prefix)) });
+ v.bindings_mut()
+ .iter_mut()
+ .for_each(|b| b.binding = Ident::from(format!("{}_{}", b.binding, prefix)));
v.bind_with(|_| BindStyle::Move);
(v.pat(), v.bindings().iter().cloned().collect())
}
diff --git a/components/style_derive/lib.rs b/components/style_derive/lib.rs
index 8c8c0705e8f..d437fb19900 100644
--- a/components/style_derive/lib.rs
+++ b/components/style_derive/lib.rs
@@ -4,10 +4,13 @@
#![recursion_limit = "128"]
-#[macro_use] extern crate darling;
+#[macro_use]
+extern crate darling;
extern crate proc_macro;
-#[macro_use] extern crate quote;
-#[macro_use] extern crate syn;
+#[macro_use]
+extern crate quote;
+#[macro_use]
+extern crate syn;
extern crate synstructure;
use proc_macro::TokenStream;
diff --git a/components/style_derive/parse.rs b/components/style_derive/parse.rs
index 13d8aa6f48b..76d2c8a82fc 100644
--- a/components/style_derive/parse.rs
+++ b/components/style_derive/parse.rs
@@ -27,23 +27,23 @@ pub fn derive(input: DeriveInput) -> Tokens {
"Parse is only supported for single-variant enums for now"
);
- let css_variant_attrs =
- cg::parse_variant_attrs_from_ast::<CssVariantAttrs>(&variant.ast());
- let parse_attrs =
- cg::parse_variant_attrs_from_ast::<ParseVariantAttrs>(&variant.ast());
+ let css_variant_attrs = cg::parse_variant_attrs_from_ast::<CssVariantAttrs>(&variant.ast());
+ let parse_attrs = cg::parse_variant_attrs_from_ast::<ParseVariantAttrs>(&variant.ast());
if css_variant_attrs.skip {
return match_body;
}
let identifier = cg::to_css_identifier(
- &css_variant_attrs.keyword.unwrap_or(variant.ast().ident.as_ref().into()),
+ &css_variant_attrs
+ .keyword
+ .unwrap_or(variant.ast().ident.as_ref().into()),
);
let ident = &variant.ast().ident;
saw_condition |= parse_attrs.condition.is_some();
let condition = match parse_attrs.condition {
Some(ref p) => quote! { if #p(context) },
- None => quote! { },
+ None => quote!{},
};
let mut body = quote! {
@@ -87,7 +87,6 @@ pub fn derive(input: DeriveInput) -> Tokens {
quote! { Self::parse(input) }
};
-
let parse_trait_impl = quote! {
impl ::parser::Parse for #name {
#[inline]
diff --git a/components/style_derive/specified_value_info.rs b/components/style_derive/specified_value_info.rs
index b707ec2c69f..ff264bf4251 100644
--- a/components/style_derive/specified_value_info.rs
+++ b/components/style_derive/specified_value_info.rs
@@ -17,8 +17,8 @@ pub fn derive(mut input: DeriveInput) -> Tokens {
let input_name = || cg::to_css_identifier(input_ident.as_ref());
if let Some(function) = css_attrs.function {
values.push(function.explicit().unwrap_or_else(input_name));
- // If the whole value is wrapped in a function, value types of
- // its fields should not be propagated.
+ // If the whole value is wrapped in a function, value types of
+ // its fields should not be propagated.
} else {
let mut where_clause = input.generics.where_clause.take();
for param in input.generics.type_params() {
@@ -66,12 +66,12 @@ pub fn derive(mut input: DeriveInput) -> Tokens {
}
}
}
- }
+ },
Data::Struct(ref s) => {
if !derive_struct_fields(&s.fields, &mut types, &mut values) {
values.push(input_name());
}
- }
+ },
Data::Union(_) => unreachable!("union is not supported"),
}
}
@@ -84,13 +84,17 @@ pub fn derive(mut input: DeriveInput) -> Tokens {
}
let mut types_value = quote!(0);
- types_value.append_all(types.iter().map(|ty| quote! {
- | <#ty as ::style_traits::SpecifiedValueInfo>::SUPPORTED_TYPES
+ types_value.append_all(types.iter().map(|ty| {
+ quote! {
+ | <#ty as ::style_traits::SpecifiedValueInfo>::SUPPORTED_TYPES
+ }
}));
let mut nested_collects = quote!();
- nested_collects.append_all(types.iter().map(|ty| quote! {
- <#ty as ::style_traits::SpecifiedValueInfo>::collect_completion_keywords(_f);
+ nested_collects.append_all(types.iter().map(|ty| {
+ quote! {
+ <#ty as ::style_traits::SpecifiedValueInfo>::collect_completion_keywords(_f);
+ }
}));
if let Some(ty) = info_attrs.ty {
@@ -144,7 +148,9 @@ fn derive_struct_fields<'a>(
}
let css_attrs = cg::parse_field_attrs::<CssFieldAttrs>(field);
if css_attrs.represents_keyword {
- let ident = field.ident.as_ref()
+ let ident = field
+ .ident
+ .as_ref()
.expect("only named field should use represents_keyword");
values.push(cg::to_css_identifier(ident.as_ref()));
return None;
diff --git a/components/style_derive/to_animated_value.rs b/components/style_derive/to_animated_value.rs
index a7378b70145..f9be9391ef6 100644
--- a/components/style_derive/to_animated_value.rs
+++ b/components/style_derive/to_animated_value.rs
@@ -16,12 +16,16 @@ pub fn derive(mut input: DeriveInput) -> quote::Tokens {
);
}
- let to_body = cg::fmap_match(&input, BindStyle::Move, |binding| {
- quote!(::values::animated::ToAnimatedValue::to_animated_value(#binding))
- });
- let from_body = cg::fmap_match(&input, BindStyle::Move, |binding| {
- quote!(::values::animated::ToAnimatedValue::from_animated_value(#binding))
- });
+ let to_body = cg::fmap_match(
+ &input,
+ BindStyle::Move,
+ |binding| quote!(::values::animated::ToAnimatedValue::to_animated_value(#binding)),
+ );
+ let from_body = cg::fmap_match(
+ &input,
+ BindStyle::Move,
+ |binding| quote!(::values::animated::ToAnimatedValue::from_animated_value(#binding)),
+ );
input.generics.where_clause = where_clause;
let name = &input.ident;
diff --git a/components/style_derive/to_computed_value.rs b/components/style_derive/to_computed_value.rs
index 9b7544ffbb8..e34690bc999 100644
--- a/components/style_derive/to_computed_value.rs
+++ b/components/style_derive/to_computed_value.rs
@@ -23,9 +23,11 @@ pub fn derive(mut input: DeriveInput) -> Tokens {
if attrs.field_bound {
let ty = &binding.ast().ty;
- let output_type = cg::map_type_params(ty, &params, &mut |ident| {
- parse_quote!(<#ident as ::values::computed::ToComputedValue>::ComputedValue)
- });
+ let output_type = cg::map_type_params(
+ ty,
+ &params,
+ &mut |ident| parse_quote!(<#ident as ::values::computed::ToComputedValue>::ComputedValue),
+ );
cg::add_predicate(
&mut where_clause,
@@ -71,7 +73,7 @@ pub fn derive(mut input: DeriveInput) -> Tokens {
::std::clone::Clone::clone(computed)
}
}
- }
+ };
}
let computed_value_type = cg::fmap_trait_output(
diff --git a/components/style_derive/to_css.rs b/components/style_derive/to_css.rs
index 83177f3c89f..a5811471cb1 100644
--- a/components/style_derive/to_css.rs
+++ b/components/style_derive/to_css.rs
@@ -19,15 +19,16 @@ pub fn derive(mut input: syn::DeriveInput) -> Tokens {
let input_attrs = cg::parse_input_attrs::<CssInputAttrs>(&input);
if let Data::Enum(_) = input.data {
- assert!(input_attrs.function.is_none(), "#[css(function)] is not allowed on enums");
+ assert!(
+ input_attrs.function.is_none(),
+ "#[css(function)] is not allowed on enums"
+ );
assert!(!input_attrs.comma, "#[css(comma)] is not allowed on enums");
}
let match_body = {
let s = Structure::new(&input);
- s.each_variant(|variant| {
- derive_variant_arm(variant, &mut where_clause)
- })
+ s.each_variant(|variant| derive_variant_arm(variant, &mut where_clause))
};
input.generics.where_clause = where_clause;
@@ -68,10 +69,7 @@ pub fn derive(mut input: syn::DeriveInput) -> Tokens {
impls
}
-fn derive_variant_arm(
- variant: &VariantInfo,
- generics: &mut Option<WhereClause>,
-) -> Tokens {
+fn derive_variant_arm(variant: &VariantInfo, generics: &mut Option<WhereClause>) -> Tokens {
let bindings = variant.bindings();
let identifier = cg::to_css_identifier(variant.ast().ident.as_ref());
let ast = variant.ast();
@@ -124,13 +122,15 @@ fn derive_variant_fields_expr(
where_clause: &mut Option<WhereClause>,
separator: &str,
) -> Tokens {
- let mut iter = bindings.iter().filter_map(|binding| {
- let attrs = cg::parse_field_attrs::<CssFieldAttrs>(&binding.ast());
- if attrs.skip {
- return None;
- }
- Some((binding, attrs))
- }).peekable();
+ let mut iter = bindings
+ .iter()
+ .filter_map(|binding| {
+ let attrs = cg::parse_field_attrs::<CssFieldAttrs>(&binding.ast());
+ if attrs.skip {
+ return None;
+ }
+ Some((binding, attrs))
+ }).peekable();
let (first, attrs) = match iter.next() {
Some(pair) => pair,
@@ -190,8 +190,11 @@ fn derive_single_field_expr(
}
}
} else if attrs.represents_keyword {
- let ident =
- field.ast().ident.as_ref().expect("Unnamed field with represents_keyword?");
+ let ident = field
+ .ast()
+ .ident
+ .as_ref()
+ .expect("Unnamed field with represents_keyword?");
let ident = cg::to_css_identifier(ident.as_ref());
quote! {
if *#field {
diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs
index 737450b5e05..fd80c648b31 100644
--- a/components/style_traits/lib.rs
+++ b/components/style_traits/lib.rs
@@ -8,27 +8,35 @@
#![crate_name = "style_traits"]
#![crate_type = "rlib"]
-
#![deny(unsafe_code, missing_docs)]
extern crate app_units;
-#[macro_use] extern crate bitflags;
-#[macro_use] extern crate cssparser;
+#[macro_use]
+extern crate bitflags;
+#[macro_use]
+extern crate cssparser;
extern crate euclid;
extern crate malloc_size_of;
-#[macro_use] extern crate malloc_size_of_derive;
+#[macro_use]
+extern crate malloc_size_of_derive;
extern crate selectors;
-#[cfg(feature = "servo")] #[macro_use] extern crate serde;
-#[cfg(feature = "servo")] extern crate webrender_api;
+#[cfg(feature = "servo")]
+#[macro_use]
+extern crate serde;
extern crate servo_arc;
-#[cfg(feature = "servo")] extern crate servo_atoms;
-#[cfg(feature = "servo")] extern crate servo_url;
-
-#[cfg(feature = "servo")] pub use webrender_api::DevicePixel;
+#[cfg(feature = "servo")]
+extern crate servo_atoms;
+#[cfg(feature = "servo")]
+extern crate servo_url;
+#[cfg(feature = "servo")]
+extern crate webrender_api;
+#[cfg(feature = "servo")]
+pub use webrender_api::DevicePixel;
use cssparser::{CowRcStr, Token};
use selectors::parser::SelectorParseErrorKind;
-#[cfg(feature = "servo")] use servo_atoms::Atom;
+#[cfg(feature = "servo")]
+use servo_atoms::Atom;
/// One hardware pixel.
///
@@ -40,7 +48,10 @@ pub enum DevicePixel {}
/// Represents a mobile style pinch zoom factor.
/// TODO(gw): Once WR supports pinch zoom, use a type directly from webrender_api.
#[derive(Clone, Copy, Debug, PartialEq)]
-#[cfg_attr(feature = "servo", derive(Deserialize, Serialize, MallocSizeOf))]
+#[cfg_attr(
+ feature = "servo",
+ derive(Deserialize, Serialize, MallocSizeOf)
+)]
pub struct PinchZoomFactor(f32);
impl PinchZoomFactor {
@@ -183,16 +194,14 @@ impl<'i> StyleParseErrorKind<'i> {
{
let name = name.into();
let variant = match value_error.kind {
- cssparser::ParseErrorKind::Custom(StyleParseErrorKind::ValueError(e)) => {
- match e {
- ValueParseErrorKind::InvalidColor(token) => {
- StyleParseErrorKind::InvalidColor(name, token)
- }
- ValueParseErrorKind::InvalidFilter(token) => {
- StyleParseErrorKind::InvalidFilter(name, token)
- }
- }
- }
+ cssparser::ParseErrorKind::Custom(StyleParseErrorKind::ValueError(e)) => match e {
+ ValueParseErrorKind::InvalidColor(token) => {
+ StyleParseErrorKind::InvalidColor(name, token)
+ },
+ ValueParseErrorKind::InvalidFilter(token) => {
+ StyleParseErrorKind::InvalidFilter(name, token)
+ },
+ },
_ => StyleParseErrorKind::OtherInvalidValue(name),
};
cssparser::ParseError {
@@ -236,5 +245,9 @@ impl ParsingMode {
/// Speculatively execute paint code in the worklet thread pool.
pub trait SpeculativePainter: Send + Sync {
/// <https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image>
- fn speculatively_draw_a_paint_image(&self, properties: Vec<(Atom, String)>, arguments: Vec<String>);
+ fn speculatively_draw_a_paint_image(
+ &self,
+ properties: Vec<(Atom, String)>,
+ arguments: Vec<String>,
+ );
}
diff --git a/components/style_traits/specified_value_info.rs b/components/style_traits/specified_value_info.rs
index e0dd5544d0a..d16d183a132 100644
--- a/components/style_traits/specified_value_info.rs
+++ b/components/style_traits/specified_value_info.rs
@@ -110,7 +110,7 @@ macro_rules! impl_generic_specified_value_info {
$param::collect_completion_keywords(f);
}
}
- }
+ };
}
impl_generic_specified_value_info!(Option<T>);
impl_generic_specified_value_info!(Vec<T>);
diff --git a/components/style_traits/values.rs b/components/style_traits/values.rs
index 8b3bd13dc20..e101dd41c3f 100644
--- a/components/style_traits/values.rs
+++ b/components/style_traits/values.rs
@@ -44,7 +44,9 @@ use std::fmt::{self, Write};
/// implement `Debug` by a single call to `ToCss::to_css`.
pub trait ToCss {
/// Serialize `self` in CSS syntax, writing to `dest`.
- fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: Write;
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: Write;
/// Serialize `self` in CSS syntax and return a string.
///
@@ -57,22 +59,34 @@ pub trait ToCss {
}
}
-impl<'a, T> ToCss for &'a T where T: ToCss + ?Sized {
- fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: Write {
+impl<'a, T> ToCss for &'a T
+where
+ T: ToCss + ?Sized,
+{
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: Write,
+ {
(*self).to_css(dest)
}
}
impl ToCss for str {
#[inline]
- fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: Write {
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: Write,
+ {
serialize_string(self, dest)
}
}
impl ToCss for String {
#[inline]
- fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: Write {
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: Write,
+ {
serialize_string(self, dest)
}
}
@@ -82,7 +96,10 @@ where
T: ToCss,
{
#[inline]
- fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: Write {
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: Write,
+ {
self.as_ref().map_or(Ok(()), |value| value.to_css(dest))
}
}
@@ -103,7 +120,10 @@ where
/// Creates a new `CssWriter`.
#[inline]
pub fn new(inner: &'w mut W) -> Self {
- Self { inner, prefix: Some("") }
+ Self {
+ inner,
+ prefix: Some(""),
+ }
}
}
@@ -179,7 +199,7 @@ where
#[inline]
fn write_item<F>(&mut self, f: F) -> fmt::Result
where
- F: FnOnce(&mut CssWriter<'b, W>) -> fmt::Result
+ F: FnOnce(&mut CssWriter<'b, W>) -> fmt::Result,
{
let old_prefix = self.inner.prefix;
if old_prefix.is_none() {
@@ -192,7 +212,7 @@ where
match (old_prefix, self.inner.prefix) {
(_, None) => {
// This call produced output and cleaned up after itself.
- }
+ },
(None, Some(p)) => {
// Some previous call to `item` produced output,
// but this one did not, prefix should be the same as
@@ -201,12 +221,12 @@ where
// We clean up here even though it's not necessary just
// to be able to do all these assertion checks.
self.inner.prefix = None;
- }
+ },
(Some(old), Some(new)) => {
// No previous call to `item` produced output, and this one
// either.
debug_assert_eq!(old, new);
- }
+ },
}
Ok(())
}
@@ -282,7 +302,7 @@ impl Separator for Comma {
parse_one: F,
) -> Result<Vec<T>, ParseError<'i, E>>
where
- F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result<T, ParseError<'i, E>>
+ F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result<T, ParseError<'i, E>>,
{
input.parse_comma_separated(parse_one)
}
@@ -298,16 +318,16 @@ impl Separator for Space {
mut parse_one: F,
) -> Result<Vec<T>, ParseError<'i, E>>
where
- F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result<T, ParseError<'i, E>>
+ F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result<T, ParseError<'i, E>>,
{
- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
+ input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
let mut results = vec![parse_one(input)?];
loop {
- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
+ input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
if let Ok(item) = input.try(&mut parse_one) {
results.push(item);
} else {
- return Ok(results)
+ return Ok(results);
}
}
}
@@ -323,15 +343,15 @@ impl Separator for CommaWithSpace {
mut parse_one: F,
) -> Result<Vec<T>, ParseError<'i, E>>
where
- F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result<T, ParseError<'i, E>>
+ F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result<T, ParseError<'i, E>>,
{
- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
+ input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
let mut results = vec![parse_one(input)?];
loop {
- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
+ input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
let comma_location = input.current_source_location();
let comma = input.try(|i| i.expect_comma()).is_ok();
- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
+ input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less.
if let Ok(item) = input.try(&mut parse_one) {
results.push(item);
} else if comma {
@@ -355,8 +375,14 @@ impl OneOrMoreSeparated for UnicodeRange {
type S = Comma;
}
-impl<T> ToCss for Vec<T> where T: ToCss + OneOrMoreSeparated {
- fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: Write {
+impl<T> ToCss for Vec<T>
+where
+ T: ToCss + OneOrMoreSeparated,
+{
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: Write,
+ {
let mut iter = self.iter();
iter.next().unwrap().to_css(dest)?;
for item in iter {
@@ -367,24 +393,35 @@ impl<T> ToCss for Vec<T> where T: ToCss + OneOrMoreSeparated {
}
}
-impl<T> ToCss for Box<T> where T: ?Sized + ToCss {
+impl<T> ToCss for Box<T>
+where
+ T: ?Sized + ToCss,
+{
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
- where W: Write,
+ where
+ W: Write,
{
(**self).to_css(dest)
}
}
-impl<T> ToCss for Arc<T> where T: ?Sized + ToCss {
+impl<T> ToCss for Arc<T>
+where
+ T: ?Sized + ToCss,
+{
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
- where W: Write,
+ where
+ W: Write,
{
(**self).to_css(dest)
}
}
impl ToCss for Au {
- fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: Write {
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: Write,
+ {
self.to_f64_px().to_css(dest)?;
dest.write_str("px")
}
@@ -393,7 +430,10 @@ impl ToCss for Au {
macro_rules! impl_to_css_for_predefined_type {
($name: ty) => {
impl<'a> ToCss for $name {
- fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: Write {
+ fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
+ where
+ W: Write,
+ {
::cssparser::ToCss::to_css(self, dest)
}
}
diff --git a/components/style_traits/viewport.rs b/components/style_traits/viewport.rs
index d961fa9e62e..5cf7bc95667 100644
--- a/components/style_traits/viewport.rs
+++ b/components/style_traits/viewport.rs
@@ -28,7 +28,10 @@ define_css_keyword_enum! {
///
/// <https://drafts.csswg.org/css-device-adapt/#viewport-desc>
#[derive(Clone, Debug, PartialEq)]
-#[cfg_attr(feature = "servo", derive(Deserialize, Serialize, MallocSizeOf))]
+#[cfg_attr(
+ feature = "servo",
+ derive(Deserialize, Serialize, MallocSizeOf)
+)]
pub struct ViewportConstraints {
/// Width and height:
/// * https://drafts.csswg.org/css-device-adapt/#width-desc
@@ -43,7 +46,7 @@ pub struct ViewportConstraints {
/// <https://drafts.csswg.org/css-device-adapt/#user-zoom-desc>
pub user_zoom: UserZoom,
/// <https://drafts.csswg.org/css-device-adapt/#orientation-desc>
- pub orientation: Orientation
+ pub orientation: Orientation,
}
impl ToCss for ViewportConstraints {
@@ -93,7 +96,8 @@ pub enum Zoom {
impl ToCss for Zoom {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
- where W: fmt::Write,
+ where
+ W: fmt::Write,
{
match *self {
Zoom::Number(number) => number.to_css(dest),
@@ -101,7 +105,7 @@ impl ToCss for Zoom {
Zoom::Percentage(percentage) => {
(percentage * 100.).to_css(dest)?;
dest.write_char('%')
- }
+ },
}
}
}
@@ -121,16 +125,16 @@ impl Zoom {
// argument, and pass ParsingMode owned by the ParserContext to
// is_ok() instead of using ParsingMode::DEFAULT directly.
// In order to do so, we might want to move these stuff into style::stylesheets::viewport_rule.
- Token::Percentage { unit_value, .. } if NonNegative.is_ok(ParsingMode::DEFAULT, unit_value) => {
+ Token::Percentage { unit_value, .. }
+ if NonNegative.is_ok(ParsingMode::DEFAULT, unit_value) =>
+ {
Ok(Zoom::Percentage(unit_value))
- }
+ },
Token::Number { value, .. } if NonNegative.is_ok(ParsingMode::DEFAULT, value) => {
Ok(Zoom::Number(value))
- }
- Token::Ident(ref value) if value.eq_ignore_ascii_case("auto") => {
- Ok(Zoom::Auto)
- }
- ref t => Err(location.new_unexpected_token_error(t.clone()))
+ },
+ Token::Ident(ref value) if value.eq_ignore_ascii_case("auto") => Ok(Zoom::Auto),
+ ref t => Err(location.new_unexpected_token_error(t.clone())),
}
}
@@ -141,7 +145,7 @@ impl Zoom {
match *self {
Zoom::Number(number) => Some(number as f32),
Zoom::Percentage(percentage) => Some(percentage as f32),
- Zoom::Auto => None
+ Zoom::Auto => None,
}
}
}
diff --git a/components/url/lib.rs b/components/url/lib.rs
index b7d61273370..db09987d44f 100644
--- a/components/url/lib.rs
+++ b/components/url/lib.rs
@@ -3,13 +3,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![deny(unsafe_code)]
-
#![crate_name = "servo_url"]
#![crate_type = "rlib"]
-#[macro_use] extern crate malloc_size_of;
-#[macro_use] extern crate malloc_size_of_derive;
-#[macro_use] extern crate serde;
+#[macro_use]
+extern crate malloc_size_of;
+#[macro_use]
+extern crate malloc_size_of_derive;
+#[macro_use]
+extern crate serde;
extern crate servo_rand;
extern crate url;
extern crate url_serde;
@@ -29,10 +31,7 @@ use url::{Url, Position};
pub use url::Host;
#[derive(Clone, Eq, Hash, MallocSizeOf, Ord, PartialEq, PartialOrd)]
-pub struct ServoUrl(
- #[ignore_malloc_size_of = "Arc"]
- Arc<Url>
-);
+pub struct ServoUrl(#[ignore_malloc_size_of = "Arc"] Arc<Url>);
impl ServoUrl {
pub fn from_url(url: Url) -> Self {
@@ -40,11 +39,16 @@ impl ServoUrl {
}
pub fn parse_with_base(base: Option<&Self>, input: &str) -> Result<Self, url::ParseError> {
- Url::options().base_url(base.map(|b| &*b.0)).parse(input).map(Self::from_url)
+ Url::options()
+ .base_url(base.map(|b| &*b.0))
+ .parse(input)
+ .map(Self::from_url)
}
pub fn into_string(self) -> String {
- Arc::try_unwrap(self.0).unwrap_or_else(|s| (*s).clone()).into_string()
+ Arc::try_unwrap(self.0)
+ .unwrap_or_else(|s| (*s).clone())
+ .into_string()
}
pub fn into_url(self) -> Url {
@@ -209,7 +213,8 @@ impl From<Url> for ServoUrl {
impl serde::Serialize for ServoUrl {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where S: serde::Serializer,
+ where
+ S: serde::Serializer,
{
url_serde::serialize(&*self.0, serializer)
}
@@ -217,7 +222,8 @@ impl serde::Serialize for ServoUrl {
impl<'de> serde::Deserialize<'de> for ServoUrl {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
- where D: serde::Deserializer<'de>,
+ where
+ D: serde::Deserializer<'de>,
{
url_serde::deserialize(deserializer).map(Self::from_url)
}
diff --git a/components/url/origin.rs b/components/url/origin.rs
index 14a1cb921e6..414f03ec6a7 100644
--- a/components/url/origin.rs
+++ b/components/url/origin.rs
@@ -18,10 +18,13 @@ pub enum ImmutableOrigin {
/// Consists of the URL's scheme, host and port
Tuple(
String,
- #[serde(deserialize_with = "url_serde::deserialize", serialize_with = "url_serde::serialize")]
+ #[serde(
+ deserialize_with = "url_serde::deserialize",
+ serialize_with = "url_serde::serialize"
+ )]
Host,
u16,
- )
+ ),
}
impl ImmutableOrigin {
@@ -160,7 +163,8 @@ impl MutableOrigin {
}
pub fn effective_domain(&self) -> Option<Host> {
- self.immutable().host()
+ self.immutable()
+ .host()
.map(|host| self.domain().unwrap_or_else(|| host.clone()))
}
}
diff --git a/components/webdriver_server/keys.rs b/components/webdriver_server/keys.rs
index d16f8232253..72fdb8b32ac 100644
--- a/components/webdriver_server/keys.rs
+++ b/components/webdriver_server/keys.rs
@@ -4,7 +4,6 @@
use msg::constellation_msg::{Key, KeyState, KeyModifiers};
-
/// Takes a character and returns an Option containing a tuple of the
/// corresponding keycode and whether shift is required. This is
/// currently pretty much ascii-only and the webdriver spec isn't
@@ -164,7 +163,7 @@ fn key_from_char(key_string: &char) -> Option<(Key, bool)> {
'\u{E03C}' => Some((Key::F12, false)),
'\u{E03D}' => None,
'\u{E040}' => None,
- _ => None
+ _ => None,
}
}
@@ -172,7 +171,8 @@ pub fn keycodes_to_keys(key_codes: &str) -> Result<Vec<(Key, KeyModifiers, KeySt
let mut rv = vec![];
for char_code in key_codes.chars() {
- let (key, with_shift) = key_from_char(&char_code).ok_or(format!("Unsupported character code {}", char_code))?;
+ let (key, with_shift) =
+ key_from_char(&char_code).ok_or(format!("Unsupported character code {}", char_code))?;
let modifiers = if with_shift {
KeyModifiers::SHIFT
} else {
@@ -180,6 +180,6 @@ pub fn keycodes_to_keys(key_codes: &str) -> Result<Vec<(Key, KeyModifiers, KeySt
};
rv.push((key, modifiers, KeyState::Pressed));
rv.push((key, modifiers, KeyState::Released));
- };
+ }
Ok(rv)
}
diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs
index 47390248dd3..4caf137d32f 100644
--- a/components/webdriver_server/lib.rs
+++ b/components/webdriver_server/lib.rs
@@ -4,7 +4,6 @@
#![crate_name = "webdriver_server"]
#![crate_type = "rlib"]
-
#![deny(unsafe_code)]
extern crate base64;
@@ -62,9 +61,23 @@ use webdriver::response::{WebDriverResponse, WindowRectResponse};
use webdriver::server::{self, Session, WebDriverHandler};
fn extension_routes() -> Vec<(Method, &'static str, ServoExtensionRoute)> {
- return vec![(Post, "/session/{sessionId}/servo/prefs/get", ServoExtensionRoute::GetPrefs),
- (Post, "/session/{sessionId}/servo/prefs/set", ServoExtensionRoute::SetPrefs),
- (Post, "/session/{sessionId}/servo/prefs/reset", ServoExtensionRoute::ResetPrefs)]
+ return vec![
+ (
+ Post,
+ "/session/{sessionId}/servo/prefs/get",
+ ServoExtensionRoute::GetPrefs,
+ ),
+ (
+ Post,
+ "/session/{sessionId}/servo/prefs/set",
+ ServoExtensionRoute::SetPrefs,
+ ),
+ (
+ Post,
+ "/session/{sessionId}/servo/prefs/reset",
+ ServoExtensionRoute::ResetPrefs,
+ ),
+ ];
}
fn cookie_msg_to_cookie(cookie: cookie_rs::Cookie) -> Cookie {
@@ -73,15 +86,15 @@ fn cookie_msg_to_cookie(cookie: cookie_rs::Cookie) -> Cookie {
value: cookie.value().to_owned(),
path: match cookie.path() {
Some(path) => Nullable::Value(path.to_string()),
- None => Nullable::Null
+ None => Nullable::Null,
},
domain: match cookie.domain() {
Some(domain) => Nullable::Value(domain.to_string()),
- None => Nullable::Null
+ None => Nullable::Null,
},
expiry: match cookie.expires() {
Some(time) => Nullable::Value(Date::new(time.to_timespec().sec as u64)),
- None => Nullable::Null
+ None => Nullable::Null,
},
secure: cookie.secure(),
httpOnly: cookie.http_only(),
@@ -90,13 +103,15 @@ fn cookie_msg_to_cookie(cookie: cookie_rs::Cookie) -> Cookie {
pub fn start_server(port: u16, constellation_chan: Sender<ConstellationMsg>) {
let handler = Handler::new(constellation_chan);
- thread::Builder::new().name("WebdriverHttpServer".to_owned()).spawn(move || {
- let address = SocketAddrV4::new("0.0.0.0".parse().unwrap(), port);
- match server::start(SocketAddr::V4(address), handler, &extension_routes()) {
- Ok(listening) => info!("WebDriver server listening on {}", listening.socket),
- Err(_) => panic!("Unable to start WebDriver HTTPD server"),
- }
- }).expect("Thread spawning failed");
+ thread::Builder::new()
+ .name("WebdriverHttpServer".to_owned())
+ .spawn(move || {
+ let address = SocketAddrV4::new("0.0.0.0".parse().unwrap(), port);
+ match server::start(SocketAddr::V4(address), handler, &extension_routes()) {
+ Ok(listening) => info!("WebDriver server listening on {}", listening.socket),
+ Err(_) => panic!("Unable to start WebDriver HTTPD server"),
+ }
+ }).expect("Thread spawning failed");
}
/// Represents the current WebDriver session and holds relevant session state.
@@ -118,10 +133,10 @@ struct WebDriverSession {
}
impl WebDriverSession {
- pub fn new(browsing_context_id: BrowsingContextId,
- top_level_browsing_context_id: TopLevelBrowsingContextId)
- -> WebDriverSession
- {
+ pub fn new(
+ browsing_context_id: BrowsingContextId,
+ top_level_browsing_context_id: TopLevelBrowsingContextId,
+ ) -> WebDriverSession {
WebDriverSession {
id: Uuid::new_v4(),
browsing_context_id: browsing_context_id,
@@ -150,22 +165,24 @@ enum ServoExtensionRoute {
impl WebDriverExtensionRoute for ServoExtensionRoute {
type Command = ServoExtensionCommand;
- fn command(&self,
- _captures: &Captures,
- body_data: &Json) -> WebDriverResult<WebDriverCommand<ServoExtensionCommand>> {
+ fn command(
+ &self,
+ _captures: &Captures,
+ body_data: &Json,
+ ) -> WebDriverResult<WebDriverCommand<ServoExtensionCommand>> {
let command = match *self {
ServoExtensionRoute::GetPrefs => {
let parameters: GetPrefsParameters = Parameters::from_json(&body_data)?;
ServoExtensionCommand::GetPrefs(parameters)
- }
+ },
ServoExtensionRoute::SetPrefs => {
let parameters: SetPrefsParameters = Parameters::from_json(&body_data)?;
ServoExtensionCommand::SetPrefs(parameters)
- }
+ },
ServoExtensionRoute::ResetPrefs => {
let parameters: GetPrefsParameters = Parameters::from_json(&body_data)?;
ServoExtensionCommand::ResetPrefs(parameters)
- }
+ },
};
Ok(WebDriverCommand::Extension(command))
}
@@ -190,27 +207,34 @@ impl WebDriverExtensionCommand for ServoExtensionCommand {
#[derive(Clone, Debug, PartialEq)]
struct GetPrefsParameters {
- prefs: Vec<String>
+ prefs: Vec<String>,
}
impl Parameters for GetPrefsParameters {
fn from_json(body: &Json) -> WebDriverResult<GetPrefsParameters> {
- let data = body.as_object().ok_or(
- WebDriverError::new(ErrorStatus::InvalidArgument,
- "Message body was not an object"))?;
- let prefs_value = data.get("prefs").ok_or(
- WebDriverError::new(ErrorStatus::InvalidArgument,
- "Missing prefs key"))?;
- let items = prefs_value.as_array().ok_or(
- WebDriverError::new(
- ErrorStatus::InvalidArgument,
- "prefs was not an array"))?;
- let params = items.iter().map(|x| x.as_string().map(|y| y.to_owned()).ok_or(
- WebDriverError::new(ErrorStatus::InvalidArgument,
- "Pref is not a string"))).collect::<Result<Vec<_>, _>>()?;
- Ok(GetPrefsParameters {
- prefs: params
- })
+ let data = body.as_object().ok_or(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "Message body was not an object",
+ ))?;
+ let prefs_value = data.get("prefs").ok_or(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "Missing prefs key",
+ ))?;
+ let items = prefs_value.as_array().ok_or(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "prefs was not an array",
+ ))?;
+ let params = items
+ .iter()
+ .map(|x| {
+ x.as_string()
+ .map(|y| y.to_owned())
+ .ok_or(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "Pref is not a string",
+ ))
+ }).collect::<Result<Vec<_>, _>>()?;
+ Ok(GetPrefsParameters { prefs: params })
}
}
@@ -224,31 +248,35 @@ impl ToJson for GetPrefsParameters {
#[derive(Clone, Debug, PartialEq)]
struct SetPrefsParameters {
- prefs: Vec<(String, PrefValue)>
+ prefs: Vec<(String, PrefValue)>,
}
impl Parameters for SetPrefsParameters {
fn from_json(body: &Json) -> WebDriverResult<SetPrefsParameters> {
- let data = body.as_object().ok_or(
- WebDriverError::new(ErrorStatus::InvalidArgument,
- "Message body was not an object"))?;
- let items = data.get("prefs").ok_or(
- WebDriverError::new(ErrorStatus::InvalidArgument,
- "Missing prefs key"))?.as_object().ok_or(
- WebDriverError::new(
+ let data = body.as_object().ok_or(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "Message body was not an object",
+ ))?;
+ let items = data
+ .get("prefs")
+ .ok_or(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "Missing prefs key",
+ ))?.as_object()
+ .ok_or(WebDriverError::new(
ErrorStatus::InvalidArgument,
- "prefs was not an array"))?;
+ "prefs was not an array",
+ ))?;
let mut params = Vec::with_capacity(items.len());
for (name, val) in items.iter() {
- let value = PrefValue::from_json(val.clone()).or(
- Err(WebDriverError::new(ErrorStatus::InvalidArgument,
- "Pref is not a boolean or string")))?;
+ let value = PrefValue::from_json(val.clone()).or(Err(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "Pref is not a boolean or string",
+ )))?;
let key = name.to_owned();
params.push((key, value));
}
- Ok(SetPrefsParameters {
- prefs: params
- })
+ Ok(SetPrefsParameters { prefs: params })
}
}
@@ -287,23 +315,29 @@ impl Handler {
}
debug!("Timed out getting focused context.");
- Err(WebDriverError::new(ErrorStatus::Timeout,
- "Failed to get window handle"))
+ Err(WebDriverError::new(
+ ErrorStatus::Timeout,
+ "Failed to get window handle",
+ ))
}
fn session(&self) -> WebDriverResult<&WebDriverSession> {
match self.session {
Some(ref x) => Ok(x),
- None => Err(WebDriverError::new(ErrorStatus::SessionNotCreated,
- "Session not created"))
+ None => Err(WebDriverError::new(
+ ErrorStatus::SessionNotCreated,
+ "Session not created",
+ )),
}
}
fn session_mut(&mut self) -> WebDriverResult<&mut WebDriverSession> {
match self.session {
Some(ref mut x) => Ok(x),
- None => Err(WebDriverError::new(ErrorStatus::SessionNotCreated,
- "Session not created"))
+ None => Err(WebDriverError::new(
+ ErrorStatus::SessionNotCreated,
+ "Session not created",
+ )),
}
}
@@ -317,14 +351,17 @@ impl Handler {
capabilities.insert("browserName".to_owned(), "servo".to_json());
capabilities.insert("browserVersion".to_owned(), "0.0.1".to_json());
capabilities.insert("acceptInsecureCerts".to_owned(), false.to_json());
- let response = NewSessionResponse::new(session.id.to_string(), Json::Object(capabilities));
+ let response =
+ NewSessionResponse::new(session.id.to_string(), Json::Object(capabilities));
debug!("new session created {}.", session.id);
self.session = Some(session);
Ok(WebDriverResponse::NewSession(response))
} else {
debug!("new session failed.");
- Err(WebDriverError::new(ErrorStatus::UnknownError,
- "Session already created"))
+ Err(WebDriverError::new(
+ ErrorStatus::UnknownError,
+ "Session already created",
+ ))
}
}
@@ -333,16 +370,26 @@ impl Handler {
Ok(WebDriverResponse::Void)
}
- fn browsing_context_script_command(&self, cmd_msg: WebDriverScriptCommand) -> WebDriverResult<()> {
+ fn browsing_context_script_command(
+ &self,
+ cmd_msg: WebDriverScriptCommand,
+ ) -> WebDriverResult<()> {
let browsing_context_id = self.session()?.browsing_context_id;
- let msg = ConstellationMsg::WebDriverCommand(WebDriverCommandMsg::ScriptCommand(browsing_context_id, cmd_msg));
+ let msg = ConstellationMsg::WebDriverCommand(WebDriverCommandMsg::ScriptCommand(
+ browsing_context_id,
+ cmd_msg,
+ ));
self.constellation_chan.send(msg).unwrap();
Ok(())
}
fn top_level_script_command(&self, cmd_msg: WebDriverScriptCommand) -> WebDriverResult<()> {
- let browsing_context_id = BrowsingContextId::from(self.session()?.top_level_browsing_context_id);
- let msg = ConstellationMsg::WebDriverCommand(WebDriverCommandMsg::ScriptCommand(browsing_context_id, cmd_msg));
+ let browsing_context_id =
+ BrowsingContextId::from(self.session()?.top_level_browsing_context_id);
+ let msg = ConstellationMsg::WebDriverCommand(WebDriverCommandMsg::ScriptCommand(
+ browsing_context_id,
+ cmd_msg,
+ ));
self.constellation_chan.send(msg).unwrap();
Ok(())
}
@@ -350,8 +397,12 @@ impl Handler {
fn handle_get(&self, parameters: &GetParameters) -> WebDriverResult<WebDriverResponse> {
let url = match ServoUrl::parse(&parameters.url[..]) {
Ok(url) => url,
- Err(_) => return Err(WebDriverError::new(ErrorStatus::InvalidArgument,
- "Invalid URL"))
+ Err(_) => {
+ return Err(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "Invalid URL",
+ ))
+ },
};
let top_level_browsing_context_id = self.session()?.top_level_browsing_context_id;
@@ -359,16 +410,20 @@ impl Handler {
let (sender, receiver) = ipc::channel().unwrap();
let load_data = LoadData::new(url, None, None, None);
- let cmd_msg = WebDriverCommandMsg::LoadUrl(top_level_browsing_context_id, load_data, sender.clone());
- self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
+ let cmd_msg =
+ WebDriverCommandMsg::LoadUrl(top_level_browsing_context_id, load_data, sender.clone());
+ self.constellation_chan
+ .send(ConstellationMsg::WebDriverCommand(cmd_msg))
+ .unwrap();
self.wait_for_load(sender, receiver)
}
- fn wait_for_load(&self,
- sender: IpcSender<LoadStatus>,
- receiver: IpcReceiver<LoadStatus>)
- -> WebDriverResult<WebDriverResponse> {
+ fn wait_for_load(
+ &self,
+ sender: IpcSender<LoadStatus>,
+ receiver: IpcReceiver<LoadStatus>,
+ ) -> WebDriverResult<WebDriverResponse> {
let timeout = self.session()?.load_timeout;
thread::spawn(move || {
thread::sleep(Duration::from_millis(timeout));
@@ -380,7 +435,7 @@ impl Handler {
LoadStatus::LoadComplete => Ok(WebDriverResponse::Void),
LoadStatus::LoadTimeout => {
Err(WebDriverError::new(ErrorStatus::Timeout, "Load timed out"))
- }
+ },
}
}
@@ -390,7 +445,9 @@ impl Handler {
let url = receiver.recv().unwrap();
- Ok(WebDriverResponse::Generic(ValueResponse::new(url.as_str().to_json())))
+ Ok(WebDriverResponse::Generic(ValueResponse::new(
+ url.as_str().to_json(),
+ )))
}
fn handle_window_size(&self) -> WebDriverResult<WebDriverResponse> {
@@ -398,17 +455,25 @@ impl Handler {
let top_level_browsing_context_id = self.session()?.top_level_browsing_context_id;
let cmd_msg = WebDriverCommandMsg::GetWindowSize(top_level_browsing_context_id, sender);
- self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
+ self.constellation_chan
+ .send(ConstellationMsg::WebDriverCommand(cmd_msg))
+ .unwrap();
let window_size = receiver.recv().unwrap();
let vp = window_size.initial_viewport;
let window_size_response = WindowRectResponse {
- x: 0, y: 0, width: vp.width as i32, height: vp.height as i32
+ x: 0,
+ y: 0,
+ width: vp.width as i32,
+ height: vp.height as i32,
};
Ok(WebDriverResponse::WindowRect(window_size_response))
}
- fn handle_set_window_size(&self, params: &WindowRectParameters) -> WebDriverResult<WebDriverResponse> {
+ fn handle_set_window_size(
+ &self,
+ params: &WindowRectParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
let (sender, receiver) = ipc::channel().unwrap();
let width = match params.width {
Nullable::Value(v) => v,
@@ -420,9 +485,12 @@ impl Handler {
};
let size = TypedSize2D::new(width as u32, height as u32);
let top_level_browsing_context_id = self.session()?.top_level_browsing_context_id;
- let cmd_msg = WebDriverCommandMsg::SetWindowSize(top_level_browsing_context_id, size, sender.clone());
+ let cmd_msg =
+ WebDriverCommandMsg::SetWindowSize(top_level_browsing_context_id, size, sender.clone());
- self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
+ self.constellation_chan
+ .send(ConstellationMsg::WebDriverCommand(cmd_msg))
+ .unwrap();
let timeout = self.resize_timeout;
let constellation_chan = self.constellation_chan.clone();
@@ -431,13 +499,18 @@ impl Handler {
// which will give the current window size.
thread::sleep(Duration::from_millis(timeout as u64));
let cmd_msg = WebDriverCommandMsg::GetWindowSize(top_level_browsing_context_id, sender);
- constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
+ constellation_chan
+ .send(ConstellationMsg::WebDriverCommand(cmd_msg))
+ .unwrap();
});
let window_size = receiver.recv().unwrap();
let vp = window_size.initial_viewport;
let window_size_response = WindowRectResponse {
- x: 0, y: 0, width: vp.width as i32, height: vp.height as i32
+ x: 0,
+ y: 0,
+ width: vp.width as i32,
+ height: vp.height as i32,
};
Ok(WebDriverResponse::WindowRect(window_size_response))
}
@@ -445,22 +518,38 @@ impl Handler {
fn handle_is_enabled(&self, element: &WebElement) -> WebDriverResult<WebDriverResponse> {
let (sender, receiver) = ipc::channel().unwrap();
- self.top_level_script_command(WebDriverScriptCommand::IsEnabled(element.id.clone(), sender))?;
+ self.top_level_script_command(WebDriverScriptCommand::IsEnabled(
+ element.id.clone(),
+ sender,
+ ))?;
match receiver.recv().unwrap() {
- Ok(is_enabled) => Ok(WebDriverResponse::Generic(ValueResponse::new(is_enabled.to_json()))),
- Err(_) => Err(WebDriverError::new(ErrorStatus::StaleElementReference, "Element not found"))
+ Ok(is_enabled) => Ok(WebDriverResponse::Generic(ValueResponse::new(
+ is_enabled.to_json(),
+ ))),
+ Err(_) => Err(WebDriverError::new(
+ ErrorStatus::StaleElementReference,
+ "Element not found",
+ )),
}
}
fn handle_is_selected(&self, element: &WebElement) -> WebDriverResult<WebDriverResponse> {
let (sender, receiver) = ipc::channel().unwrap();
- self.top_level_script_command(WebDriverScriptCommand::IsSelected(element.id.clone(), sender))?;
+ self.top_level_script_command(WebDriverScriptCommand::IsSelected(
+ element.id.clone(),
+ sender,
+ ))?;
match receiver.recv().unwrap() {
- Ok(is_selected) => Ok(WebDriverResponse::Generic(ValueResponse::new(is_selected.to_json()))),
- Err(_) => Err(WebDriverError::new(ErrorStatus::StaleElementReference, "Element not found"))
+ Ok(is_selected) => Ok(WebDriverResponse::Generic(ValueResponse::new(
+ is_selected.to_json(),
+ ))),
+ Err(_) => Err(WebDriverError::new(
+ ErrorStatus::StaleElementReference,
+ "Element not found",
+ )),
}
}
@@ -486,7 +575,9 @@ impl Handler {
let (sender, receiver) = ipc::channel().unwrap();
let cmd_msg = WebDriverCommandMsg::Refresh(top_level_browsing_context_id, sender.clone());
- self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
+ self.constellation_chan
+ .send(ConstellationMsg::WebDriverCommand(cmd_msg))
+ .unwrap();
self.wait_for_load(sender, receiver)
}
@@ -497,27 +588,38 @@ impl Handler {
self.top_level_script_command(WebDriverScriptCommand::GetTitle(sender))?;
let value = receiver.recv().unwrap();
- Ok(WebDriverResponse::Generic(ValueResponse::new(value.to_json())))
+ Ok(WebDriverResponse::Generic(ValueResponse::new(
+ value.to_json(),
+ )))
}
fn handle_window_handle(&self) -> WebDriverResult<WebDriverResponse> {
// For now we assume there's only one window so just use the session
// id as the window id
let handle = self.session.as_ref().unwrap().id.to_string();
- Ok(WebDriverResponse::Generic(ValueResponse::new(handle.to_json())))
+ Ok(WebDriverResponse::Generic(ValueResponse::new(
+ handle.to_json(),
+ )))
}
fn handle_window_handles(&self) -> WebDriverResult<WebDriverResponse> {
// For now we assume there's only one window so just use the session
// id as the window id
let handles = vec![self.session.as_ref().unwrap().id.to_string().to_json()];
- Ok(WebDriverResponse::Generic(ValueResponse::new(handles.to_json())))
+ Ok(WebDriverResponse::Generic(ValueResponse::new(
+ handles.to_json(),
+ )))
}
- fn handle_find_element(&self, parameters: &LocatorParameters) -> WebDriverResult<WebDriverResponse> {
+ fn handle_find_element(
+ &self,
+ parameters: &LocatorParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
if parameters.using != LocatorStrategy::CSSSelector {
- return Err(WebDriverError::new(ErrorStatus::UnsupportedOperation,
- "Unsupported locator strategy"))
+ return Err(WebDriverError::new(
+ ErrorStatus::UnsupportedOperation,
+ "Unsupported locator strategy",
+ ));
}
let (sender, receiver) = ipc::channel().unwrap();
@@ -529,54 +631,70 @@ impl Handler {
Ok(value) => {
let value_resp = value.map(|x| WebElement::new(x).to_json()).to_json();
Ok(WebDriverResponse::Generic(ValueResponse::new(value_resp)))
- }
- Err(_) => Err(WebDriverError::new(ErrorStatus::InvalidSelector,
- "Invalid selector"))
+ },
+ Err(_) => Err(WebDriverError::new(
+ ErrorStatus::InvalidSelector,
+ "Invalid selector",
+ )),
}
}
- fn handle_switch_to_frame(&mut self, parameters: &SwitchToFrameParameters) -> WebDriverResult<WebDriverResponse> {
+ fn handle_switch_to_frame(
+ &mut self,
+ parameters: &SwitchToFrameParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
use webdriver::common::FrameId;
let frame_id = match parameters.id {
FrameId::Null => {
let session = self.session_mut()?;
- session.browsing_context_id = BrowsingContextId::from(session.top_level_browsing_context_id);
+ session.browsing_context_id =
+ BrowsingContextId::from(session.top_level_browsing_context_id);
return Ok(WebDriverResponse::Void);
},
FrameId::Short(ref x) => WebDriverFrameId::Short(*x),
- FrameId::Element(ref x) => WebDriverFrameId::Element(x.id.clone())
+ FrameId::Element(ref x) => WebDriverFrameId::Element(x.id.clone()),
};
self.switch_to_frame(frame_id)
}
-
fn handle_switch_to_parent_frame(&mut self) -> WebDriverResult<WebDriverResponse> {
self.switch_to_frame(WebDriverFrameId::Parent)
}
- fn switch_to_frame(&mut self, frame_id: WebDriverFrameId) -> WebDriverResult<WebDriverResponse> {
+ fn switch_to_frame(
+ &mut self,
+ frame_id: WebDriverFrameId,
+ ) -> WebDriverResult<WebDriverResponse> {
if let WebDriverFrameId::Short(_) = frame_id {
- return Err(WebDriverError::new(ErrorStatus::UnsupportedOperation,
- "Selecting frame by id not supported"));
+ return Err(WebDriverError::new(
+ ErrorStatus::UnsupportedOperation,
+ "Selecting frame by id not supported",
+ ));
}
let (sender, receiver) = ipc::channel().unwrap();
let cmd = WebDriverScriptCommand::GetBrowsingContextId(frame_id, sender);
self.browsing_context_script_command(cmd)?;
- let browsing_context_id = receiver.recv().unwrap()
- .or(Err(WebDriverError::new(ErrorStatus::NoSuchFrame, "Frame does not exist")))?;
+ let browsing_context_id = receiver.recv().unwrap().or(Err(WebDriverError::new(
+ ErrorStatus::NoSuchFrame,
+ "Frame does not exist",
+ )))?;
self.session_mut()?.browsing_context_id = browsing_context_id;
Ok(WebDriverResponse::Void)
}
-
- fn handle_find_elements(&self, parameters: &LocatorParameters) -> WebDriverResult<WebDriverResponse> {
+ fn handle_find_elements(
+ &self,
+ parameters: &LocatorParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
if parameters.using != LocatorStrategy::CSSSelector {
- return Err(WebDriverError::new(ErrorStatus::UnsupportedOperation,
- "Unsupported locator strategy"))
+ return Err(WebDriverError::new(
+ ErrorStatus::UnsupportedOperation,
+ "Unsupported locator strategy",
+ ));
}
let (sender, receiver) = ipc::channel().unwrap();
@@ -584,12 +702,18 @@ impl Handler {
self.browsing_context_script_command(cmd)?;
match receiver.recv().unwrap() {
Ok(value) => {
- let resp_value: Vec<Json> = value.into_iter().map(
- |x| WebElement::new(x).to_json()).collect();
- Ok(WebDriverResponse::Generic(ValueResponse::new(resp_value.to_json())))
- }
- Err(_) => Err(WebDriverError::new(ErrorStatus::InvalidSelector,
- "Invalid selector"))
+ let resp_value: Vec<Json> = value
+ .into_iter()
+ .map(|x| WebElement::new(x).to_json())
+ .collect();
+ Ok(WebDriverResponse::Generic(ValueResponse::new(
+ resp_value.to_json(),
+ )))
+ },
+ Err(_) => Err(WebDriverError::new(
+ ErrorStatus::InvalidSelector,
+ "Invalid selector",
+ )),
}
}
@@ -601,13 +725,17 @@ impl Handler {
match receiver.recv().unwrap() {
Ok(rect) => {
let response = ElementRectResponse {
- x: rect.origin.x, y: rect.origin.y,
- width: rect.size.width, height: rect.size.height
+ x: rect.origin.x,
+ y: rect.origin.y,
+ width: rect.size.width,
+ height: rect.size.height,
};
Ok(WebDriverResponse::ElementRect(response))
},
- Err(_) => Err(WebDriverError::new(ErrorStatus::StaleElementReference,
- "Unable to find element in document"))
+ Err(_) => Err(WebDriverError::new(
+ ErrorStatus::StaleElementReference,
+ "Unable to find element in document",
+ )),
}
}
@@ -616,9 +744,13 @@ impl Handler {
let cmd = WebDriverScriptCommand::GetElementText(element.id.clone(), sender);
self.browsing_context_script_command(cmd)?;
match receiver.recv().unwrap() {
- Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(value.to_json()))),
- Err(_) => Err(WebDriverError::new(ErrorStatus::StaleElementReference,
- "Unable to find element in document"))
+ Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(
+ value.to_json(),
+ ))),
+ Err(_) => Err(WebDriverError::new(
+ ErrorStatus::StaleElementReference,
+ "Unable to find element in document",
+ )),
}
}
@@ -626,8 +758,13 @@ impl Handler {
let (sender, receiver) = ipc::channel().unwrap();
let cmd = WebDriverScriptCommand::GetActiveElement(sender);
self.browsing_context_script_command(cmd)?;
- let value = receiver.recv().unwrap().map(|x| WebElement::new(x).to_json());
- Ok(WebDriverResponse::Generic(ValueResponse::new(value.to_json())))
+ let value = receiver
+ .recv()
+ .unwrap()
+ .map(|x| WebElement::new(x).to_json());
+ Ok(WebDriverResponse::Generic(ValueResponse::new(
+ value.to_json(),
+ )))
}
fn handle_element_tag_name(&self, element: &WebElement) -> WebDriverResult<WebDriverResponse> {
@@ -635,31 +772,56 @@ impl Handler {
let cmd = WebDriverScriptCommand::GetElementTagName(element.id.clone(), sender);
self.browsing_context_script_command(cmd)?;
match receiver.recv().unwrap() {
- Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(value.to_json()))),
- Err(_) => Err(WebDriverError::new(ErrorStatus::StaleElementReference,
- "Unable to find element in document"))
+ Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(
+ value.to_json(),
+ ))),
+ Err(_) => Err(WebDriverError::new(
+ ErrorStatus::StaleElementReference,
+ "Unable to find element in document",
+ )),
}
}
- fn handle_element_attribute(&self, element: &WebElement, name: &str) -> WebDriverResult<WebDriverResponse> {
+ fn handle_element_attribute(
+ &self,
+ element: &WebElement,
+ name: &str,
+ ) -> WebDriverResult<WebDriverResponse> {
let (sender, receiver) = ipc::channel().unwrap();
- let cmd = WebDriverScriptCommand::GetElementAttribute(element.id.clone(), name.to_owned(), sender);
+ let cmd = WebDriverScriptCommand::GetElementAttribute(
+ element.id.clone(),
+ name.to_owned(),
+ sender,
+ );
self.browsing_context_script_command(cmd)?;
match receiver.recv().unwrap() {
- Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(value.to_json()))),
- Err(_) => Err(WebDriverError::new(ErrorStatus::StaleElementReference,
- "Unable to find element in document"))
+ Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(
+ value.to_json(),
+ ))),
+ Err(_) => Err(WebDriverError::new(
+ ErrorStatus::StaleElementReference,
+ "Unable to find element in document",
+ )),
}
}
- fn handle_element_css(&self, element: &WebElement, name: &str) -> WebDriverResult<WebDriverResponse> {
+ fn handle_element_css(
+ &self,
+ element: &WebElement,
+ name: &str,
+ ) -> WebDriverResult<WebDriverResponse> {
let (sender, receiver) = ipc::channel().unwrap();
- let cmd = WebDriverScriptCommand::GetElementCSS(element.id.clone(), name.to_owned(), sender);
+ let cmd =
+ WebDriverScriptCommand::GetElementCSS(element.id.clone(), name.to_owned(), sender);
self.browsing_context_script_command(cmd)?;
match receiver.recv().unwrap() {
- Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(value.to_json()))),
- Err(_) => Err(WebDriverError::new(ErrorStatus::StaleElementReference,
- "Unable to find element in document"))
+ Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(
+ value.to_json(),
+ ))),
+ Err(_) => Err(WebDriverError::new(
+ ErrorStatus::StaleElementReference,
+ "Unable to find element in document",
+ )),
}
}
@@ -668,10 +830,13 @@ impl Handler {
let cmd = WebDriverScriptCommand::GetCookies(sender);
self.browsing_context_script_command(cmd)?;
let cookies = receiver.recv().unwrap();
- let response = cookies.into_iter().map(|cookie| {
- cookie_msg_to_cookie(cookie.into_inner())
- }).collect::<Vec<Cookie>>();
- Ok(WebDriverResponse::Cookies(CookiesResponse { value: response }))
+ let response = cookies
+ .into_iter()
+ .map(|cookie| cookie_msg_to_cookie(cookie.into_inner()))
+ .collect::<Vec<Cookie>>();
+ Ok(WebDriverResponse::Cookies(CookiesResponse {
+ value: response,
+ }))
}
fn handle_get_cookie(&self, name: &str) -> WebDriverResult<WebDriverResponse> {
@@ -679,13 +844,20 @@ impl Handler {
let cmd = WebDriverScriptCommand::GetCookie(name.to_owned(), sender);
self.browsing_context_script_command(cmd)?;
let cookies = receiver.recv().unwrap();
- let response = cookies.into_iter().map(|cookie| {
- cookie_msg_to_cookie(cookie.into_inner())
- }).next().unwrap();
- Ok(WebDriverResponse::Cookie(CookieResponse { value: response }))
+ let response = cookies
+ .into_iter()
+ .map(|cookie| cookie_msg_to_cookie(cookie.into_inner()))
+ .next()
+ .unwrap();
+ Ok(WebDriverResponse::Cookie(CookieResponse {
+ value: response,
+ }))
}
- fn handle_add_cookie(&self, params: &AddCookieParameters) -> WebDriverResult<WebDriverResponse> {
+ fn handle_add_cookie(
+ &self,
+ params: &AddCookieParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
let (sender, receiver) = ipc::channel().unwrap();
let cookie = cookie_rs::Cookie::build(params.name.to_owned(), params.value.to_owned())
@@ -705,18 +877,24 @@ impl Handler {
match receiver.recv().unwrap() {
Ok(_) => Ok(WebDriverResponse::Void),
Err(response) => match response {
- WebDriverCookieError::InvalidDomain => Err(WebDriverError::new(ErrorStatus::InvalidCookieDomain,
- "Invalid cookie domain")),
- WebDriverCookieError::UnableToSetCookie => Err(WebDriverError::new(ErrorStatus::UnableToSetCookie,
- "Unable to set cookie"))
- }
+ WebDriverCookieError::InvalidDomain => Err(WebDriverError::new(
+ ErrorStatus::InvalidCookieDomain,
+ "Invalid cookie domain",
+ )),
+ WebDriverCookieError::UnableToSetCookie => Err(WebDriverError::new(
+ ErrorStatus::UnableToSetCookie,
+ "Unable to set cookie",
+ )),
+ },
}
}
- fn handle_set_timeouts(&mut self,
- parameters: &TimeoutsParameters)
- -> WebDriverResult<WebDriverResponse> {
- let session = self.session
+ fn handle_set_timeouts(
+ &mut self,
+ parameters: &TimeoutsParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
+ let session = self
+ .session
.as_mut()
.ok_or(WebDriverError::new(ErrorStatus::SessionNotCreated, ""))?;
@@ -733,8 +911,10 @@ impl Handler {
Ok(WebDriverResponse::Void)
}
- fn handle_execute_script(&self, parameters: &JavascriptCommandParameters)
- -> WebDriverResult<WebDriverResponse> {
+ fn handle_execute_script(
+ &self,
+ parameters: &JavascriptCommandParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
let func_body = &parameters.script;
let args_string = "";
@@ -750,16 +930,19 @@ impl Handler {
self.postprocess_js_result(result)
}
- fn handle_execute_async_script(&self,
- parameters: &JavascriptCommandParameters)
- -> WebDriverResult<WebDriverResponse> {
+ fn handle_execute_async_script(
+ &self,
+ parameters: &JavascriptCommandParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
let func_body = &parameters.script;
let args_string = "window.webdriverCallback";
- let script = format!("setTimeout(webdriverTimeout, {}); (function(callback) {{ {} }})({})",
- self.session()?.script_timeout,
- func_body,
- args_string);
+ let script = format!(
+ "setTimeout(webdriverTimeout, {}); (function(callback) {{ {} }})({})",
+ self.session()?.script_timeout,
+ func_body,
+ args_string
+ );
let (sender, receiver) = ipc::channel().unwrap();
let command = WebDriverScriptCommand::ExecuteAsyncScript(script, sender);
@@ -768,40 +951,63 @@ impl Handler {
self.postprocess_js_result(result)
}
- fn postprocess_js_result(&self, result: WebDriverJSResult) -> WebDriverResult<WebDriverResponse> {
+ fn postprocess_js_result(
+ &self,
+ result: WebDriverJSResult,
+ ) -> WebDriverResult<WebDriverResponse> {
match result {
- Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(value.to_json()))),
+ Ok(value) => Ok(WebDriverResponse::Generic(ValueResponse::new(
+ value.to_json(),
+ ))),
Err(WebDriverJSError::Timeout) => Err(WebDriverError::new(ErrorStatus::Timeout, "")),
Err(WebDriverJSError::UnknownType) => Err(WebDriverError::new(
- ErrorStatus::UnsupportedOperation, "Unsupported return type")),
+ ErrorStatus::UnsupportedOperation,
+ "Unsupported return type",
+ )),
Err(WebDriverJSError::BrowsingContextNotFound) => Err(WebDriverError::new(
- ErrorStatus::JavascriptError, "Pipeline id not found in browsing context"))
+ ErrorStatus::JavascriptError,
+ "Pipeline id not found in browsing context",
+ )),
}
}
- fn handle_element_send_keys(&self,
- element: &WebElement,
- keys: &SendKeysParameters) -> WebDriverResult<WebDriverResponse> {
+ fn handle_element_send_keys(
+ &self,
+ element: &WebElement,
+ keys: &SendKeysParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
let browsing_context_id = self.session()?.browsing_context_id;
let (sender, receiver) = ipc::channel().unwrap();
let cmd = WebDriverScriptCommand::FocusElement(element.id.clone(), sender);
let cmd_msg = WebDriverCommandMsg::ScriptCommand(browsing_context_id, cmd);
- self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
+ self.constellation_chan
+ .send(ConstellationMsg::WebDriverCommand(cmd_msg))
+ .unwrap();
// TODO: distinguish the not found and not focusable cases
- receiver.recv().unwrap().or_else(|_| Err(WebDriverError::new(
- ErrorStatus::StaleElementReference, "Element not found or not focusable")))?;
-
- let keys = keycodes_to_keys(&keys.text).or_else(|_|
- Err(WebDriverError::new(ErrorStatus::UnsupportedOperation, "Failed to convert keycodes")))?;
+ receiver.recv().unwrap().or_else(|_| {
+ Err(WebDriverError::new(
+ ErrorStatus::StaleElementReference,
+ "Element not found or not focusable",
+ ))
+ })?;
+
+ let keys = keycodes_to_keys(&keys.text).or_else(|_| {
+ Err(WebDriverError::new(
+ ErrorStatus::UnsupportedOperation,
+ "Failed to convert keycodes",
+ ))
+ })?;
// TODO: there's a race condition caused by the focus command and the
// send keys command being two separate messages,
// so the constellation may have changed state between them.
let cmd_msg = WebDriverCommandMsg::SendKeys(browsing_context_id, keys);
- self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
+ self.constellation_chan
+ .send(ConstellationMsg::WebDriverCommand(cmd_msg))
+ .unwrap();
Ok(WebDriverResponse::Void)
}
@@ -816,7 +1022,9 @@ impl Handler {
for _ in 0..iterations {
let (sender, receiver) = ipc::channel().unwrap();
let cmd_msg = WebDriverCommandMsg::TakeScreenshot(top_level_id, sender);
- self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
+ self.constellation_chan
+ .send(ConstellationMsg::WebDriverCommand(cmd_msg))
+ .unwrap();
if let Some(x) = receiver.recv().unwrap() {
img = Some(x);
@@ -828,65 +1036,91 @@ impl Handler {
let img = match img {
Some(img) => img,
- None => return Err(WebDriverError::new(ErrorStatus::Timeout,
- "Taking screenshot timed out")),
+ None => {
+ return Err(WebDriverError::new(
+ ErrorStatus::Timeout,
+ "Taking screenshot timed out",
+ ))
+ },
};
// The compositor always sends RGB pixels.
- assert_eq!(img.format, PixelFormat::RGB8, "Unexpected screenshot pixel format");
+ assert_eq!(
+ img.format,
+ PixelFormat::RGB8,
+ "Unexpected screenshot pixel format"
+ );
let rgb = RgbImage::from_raw(img.width, img.height, img.bytes.to_vec()).unwrap();
let mut png_data = Vec::new();
- DynamicImage::ImageRgb8(rgb).write_to(&mut png_data, ImageFormat::PNG).unwrap();
+ DynamicImage::ImageRgb8(rgb)
+ .write_to(&mut png_data, ImageFormat::PNG)
+ .unwrap();
let encoded = base64::encode(&png_data);
- Ok(WebDriverResponse::Generic(ValueResponse::new(encoded.to_json())))
+ Ok(WebDriverResponse::Generic(ValueResponse::new(
+ encoded.to_json(),
+ )))
}
- fn handle_get_prefs(&self,
- parameters: &GetPrefsParameters) -> WebDriverResult<WebDriverResponse> {
- let prefs = parameters.prefs
+ fn handle_get_prefs(
+ &self,
+ parameters: &GetPrefsParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
+ let prefs = parameters
+ .prefs
.iter()
.map(|item| (item.clone(), PREFS.get(item).to_json()))
.collect::<BTreeMap<_, _>>();
- Ok(WebDriverResponse::Generic(ValueResponse::new(prefs.to_json())))
+ Ok(WebDriverResponse::Generic(ValueResponse::new(
+ prefs.to_json(),
+ )))
}
- fn handle_set_prefs(&self,
- parameters: &SetPrefsParameters) -> WebDriverResult<WebDriverResponse> {
+ fn handle_set_prefs(
+ &self,
+ parameters: &SetPrefsParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
for &(ref key, ref value) in parameters.prefs.iter() {
PREFS.set(key, value.clone());
}
Ok(WebDriverResponse::Void)
}
- fn handle_reset_prefs(&self,
- parameters: &GetPrefsParameters) -> WebDriverResult<WebDriverResponse> {
+ fn handle_reset_prefs(
+ &self,
+ parameters: &GetPrefsParameters,
+ ) -> WebDriverResult<WebDriverResponse> {
let prefs = if parameters.prefs.len() == 0 {
PREFS.reset_all();
BTreeMap::new()
} else {
- parameters.prefs
+ parameters
+ .prefs
.iter()
.map(|item| (item.clone(), PREFS.reset(item).to_json()))
.collect::<BTreeMap<_, _>>()
};
- Ok(WebDriverResponse::Generic(ValueResponse::new(prefs.to_json())))
+ Ok(WebDriverResponse::Generic(ValueResponse::new(
+ prefs.to_json(),
+ )))
}
}
impl WebDriverHandler<ServoExtensionRoute> for Handler {
- fn handle_command(&mut self,
- _session: &Option<Session>,
- msg: WebDriverMessage<ServoExtensionRoute>) -> WebDriverResult<WebDriverResponse> {
+ fn handle_command(
+ &mut self,
+ _session: &Option<Session>,
+ msg: WebDriverMessage<ServoExtensionRoute>,
+ ) -> WebDriverResult<WebDriverResponse> {
// Unless we are trying to create a new session, we need to ensure that a
// session has previously been created
match msg.command {
WebDriverCommand::NewSession(_) => {},
_ => {
self.session()?;
- }
+ },
}
match msg.command {
@@ -905,7 +1139,9 @@ impl WebDriverHandler<ServoExtensionRoute> for Handler {
WebDriverCommand::GetTitle => self.handle_title(),
WebDriverCommand::GetWindowHandle => self.handle_window_handle(),
WebDriverCommand::GetWindowHandles => self.handle_window_handles(),
- WebDriverCommand::SwitchToFrame(ref parameters) => self.handle_switch_to_frame(parameters),
+ WebDriverCommand::SwitchToFrame(ref parameters) => {
+ self.handle_switch_to_frame(parameters)
+ },
WebDriverCommand::SwitchToParentFrame => self.handle_switch_to_parent_frame(),
WebDriverCommand::FindElement(ref parameters) => self.handle_find_element(parameters),
WebDriverCommand::FindElements(ref parameters) => self.handle_find_elements(parameters),
@@ -914,26 +1150,31 @@ impl WebDriverHandler<ServoExtensionRoute> for Handler {
WebDriverCommand::GetActiveElement => self.handle_active_element(),
WebDriverCommand::GetElementRect(ref element) => self.handle_element_rect(element),
WebDriverCommand::GetElementText(ref element) => self.handle_element_text(element),
- WebDriverCommand::GetElementTagName(ref element) => self.handle_element_tag_name(element),
- WebDriverCommand::GetElementAttribute(ref element, ref name) =>
- self.handle_element_attribute(element, name),
- WebDriverCommand::GetCSSValue(ref element, ref name) =>
- self.handle_element_css(element, name),
+ WebDriverCommand::GetElementTagName(ref element) => {
+ self.handle_element_tag_name(element)
+ },
+ WebDriverCommand::GetElementAttribute(ref element, ref name) => {
+ self.handle_element_attribute(element, name)
+ },
+ WebDriverCommand::GetCSSValue(ref element, ref name) => {
+ self.handle_element_css(element, name)
+ },
WebDriverCommand::ExecuteScript(ref x) => self.handle_execute_script(x),
WebDriverCommand::ExecuteAsyncScript(ref x) => self.handle_execute_async_script(x),
- WebDriverCommand::ElementSendKeys(ref element, ref keys) =>
- self.handle_element_send_keys(element, keys),
+ WebDriverCommand::ElementSendKeys(ref element, ref keys) => {
+ self.handle_element_send_keys(element, keys)
+ },
WebDriverCommand::SetTimeouts(ref x) => self.handle_set_timeouts(x),
WebDriverCommand::TakeScreenshot => self.handle_take_screenshot(),
- WebDriverCommand::Extension(ref extension) => {
- match *extension {
- ServoExtensionCommand::GetPrefs(ref x) => self.handle_get_prefs(x),
- ServoExtensionCommand::SetPrefs(ref x) => self.handle_set_prefs(x),
- ServoExtensionCommand::ResetPrefs(ref x) => self.handle_reset_prefs(x),
- }
- }
- _ => Err(WebDriverError::new(ErrorStatus::UnsupportedOperation,
- "Command not implemented"))
+ WebDriverCommand::Extension(ref extension) => match *extension {
+ ServoExtensionCommand::GetPrefs(ref x) => self.handle_get_prefs(x),
+ ServoExtensionCommand::SetPrefs(ref x) => self.handle_set_prefs(x),
+ ServoExtensionCommand::ResetPrefs(ref x) => self.handle_reset_prefs(x),
+ },
+ _ => Err(WebDriverError::new(
+ ErrorStatus::UnsupportedOperation,
+ "Command not implemented",
+ )),
}
}
diff --git a/components/webvr/webvr_thread.rs b/components/webvr/webvr_thread.rs
index 3b1bac07409..ac2d4671de6 100644
--- a/components/webvr/webvr_thread.rs
+++ b/components/webvr/webvr_thread.rs
@@ -44,15 +44,16 @@ pub struct WebVRThread {
constellation_chan: Sender<ConstellationMsg>,
vr_compositor_chan: WebVRCompositorSender,
polling_events: bool,
- presenting: HashMap<u32, PipelineId>
+ presenting: HashMap<u32, PipelineId>,
}
impl WebVRThread {
- fn new(receiver: IpcReceiver<WebVRMsg>,
- sender: IpcSender<WebVRMsg>,
- constellation_chan: Sender<ConstellationMsg>,
- vr_compositor_chan: WebVRCompositorSender)
- -> WebVRThread {
+ fn new(
+ receiver: IpcReceiver<WebVRMsg>,
+ sender: IpcSender<WebVRMsg>,
+ constellation_chan: Sender<ConstellationMsg>,
+ vr_compositor_chan: WebVRCompositorSender,
+ ) -> WebVRThread {
let mut service = VRServiceManager::new();
service.register_defaults();
WebVRThread {
@@ -63,19 +64,27 @@ impl WebVRThread {
constellation_chan: constellation_chan,
vr_compositor_chan: vr_compositor_chan,
polling_events: false,
- presenting: HashMap::new()
+ presenting: HashMap::new(),
}
}
- pub fn spawn(vr_compositor_chan: WebVRCompositorSender)
- -> (IpcSender<WebVRMsg>, Sender<Sender<ConstellationMsg>>) {
+ pub fn spawn(
+ vr_compositor_chan: WebVRCompositorSender,
+ ) -> (IpcSender<WebVRMsg>, Sender<Sender<ConstellationMsg>>) {
let (sender, receiver) = ipc::channel().unwrap();
let (constellation_sender, constellation_receiver) = mpsc::channel();
let sender_clone = sender.clone();
- thread::Builder::new().name("WebVRThread".into()).spawn(move || {
- let constellation_chan = constellation_receiver.recv().unwrap();
- WebVRThread::new(receiver, sender_clone, constellation_chan, vr_compositor_chan).start();
- }).expect("Thread spawning failed");
+ thread::Builder::new()
+ .name("WebVRThread".into())
+ .spawn(move || {
+ let constellation_chan = constellation_receiver.recv().unwrap();
+ WebVRThread::new(
+ receiver,
+ sender_clone,
+ constellation_chan,
+ vr_compositor_chan,
+ ).start();
+ }).expect("Thread spawning failed");
(sender, constellation_sender)
}
@@ -114,10 +123,8 @@ impl WebVRThread {
},
WebVRMsg::GetGamepads(synced_ids, sender) => {
self.handle_get_gamepads(synced_ids, sender);
- }
- WebVRMsg::Exit => {
- break
},
+ WebVRMsg::Exit => break,
}
}
}
@@ -139,32 +146,34 @@ impl WebVRThread {
sender.send(Ok(result)).unwrap();
}
- fn handle_framedata(&mut self,
- pipeline: PipelineId,
- display_id: u32,
- near: f64,
- far: f64,
- sender: IpcSender<WebVRResult<VRFrameData>>) {
- match self.access_check(pipeline, display_id) {
- Ok(display) => {
- sender.send(Ok(display.borrow().inmediate_frame_data(near, far))).unwrap()
- },
- Err(msg) => sender.send(Err(msg.into())).unwrap()
+ fn handle_framedata(
+ &mut self,
+ pipeline: PipelineId,
+ display_id: u32,
+ near: f64,
+ far: f64,
+ sender: IpcSender<WebVRResult<VRFrameData>>,
+ ) {
+ match self.access_check(pipeline, display_id) {
+ Ok(display) => sender
+ .send(Ok(display.borrow().inmediate_frame_data(near, far)))
+ .unwrap(),
+ Err(msg) => sender.send(Err(msg.into())).unwrap(),
}
}
- fn handle_reset_pose(&mut self,
- pipeline: PipelineId,
- display_id: u32,
- sender: IpcSender<WebVRResult<VRDisplayData>>) {
+ fn handle_reset_pose(
+ &mut self,
+ pipeline: PipelineId,
+ display_id: u32,
+ sender: IpcSender<WebVRResult<VRDisplayData>>,
+ ) {
match self.access_check(pipeline, display_id) {
Ok(display) => {
display.borrow_mut().reset_pose();
sender.send(Ok(display.borrow().data())).unwrap();
},
- Err(msg) => {
- sender.send(Err(msg.into())).unwrap()
- }
+ Err(msg) => sender.send(Err(msg.into())).unwrap(),
}
}
@@ -173,17 +182,27 @@ impl WebVRThread {
// while the user is having a VR experience in the current tab.
// These security rules also avoid multithreading race conditions between WebVRThread and
// Webrender thread. See WebVRCompositorHandler implementation notes for more details about this.
- fn access_check(&self, pipeline: PipelineId, display_id: u32) -> Result<&VRDisplayPtr, &'static str> {
+ fn access_check(
+ &self,
+ pipeline: PipelineId,
+ display_id: u32,
+ ) -> Result<&VRDisplayPtr, &'static str> {
if *self.presenting.get(&display_id).unwrap_or(&pipeline) != pipeline {
- return Err("No access granted to this Display because it's presenting on other JavaScript Tab");
+ return Err(
+ "No access granted to this Display because it's presenting on other JavaScript Tab",
+ );
}
- self.service.get_display(display_id).ok_or("Device not found")
+ self.service
+ .get_display(display_id)
+ .ok_or("Device not found")
}
- fn handle_request_present(&mut self,
- pipeline: PipelineId,
- display_id: u32,
- sender: IpcSender<WebVRResult<()>>) {
+ fn handle_request_present(
+ &mut self,
+ pipeline: PipelineId,
+ display_id: u32,
+ sender: IpcSender<WebVRResult<()>>,
+ ) {
match self.access_check(pipeline, display_id).map(|d| d.clone()) {
Ok(display) => {
self.presenting.insert(display_id, pipeline);
@@ -193,14 +212,16 @@ impl WebVRThread {
},
Err(msg) => {
sender.send(Err(msg.into())).unwrap();
- }
+ },
}
}
- fn handle_exit_present(&mut self,
- pipeline: PipelineId,
- display_id: u32,
- sender: Option<IpcSender<WebVRResult<()>>>) {
+ fn handle_exit_present(
+ &mut self,
+ pipeline: PipelineId,
+ display_id: u32,
+ sender: Option<IpcSender<WebVRResult<()>>>,
+ ) {
match self.access_check(pipeline, display_id).map(|d| d.clone()) {
Ok(display) => {
self.presenting.remove(&display_id);
@@ -214,29 +235,36 @@ impl WebVRThread {
if let Some(sender) = sender {
sender.send(Err(msg.into())).unwrap();
}
- }
+ },
}
}
fn handle_create_compositor(&mut self, display_id: u32) {
- let compositor = self.service.get_display(display_id).map(|d| WebVRCompositor(d.as_ptr()));
+ let compositor = self
+ .service
+ .get_display(display_id)
+ .map(|d| WebVRCompositor(d.as_ptr()));
self.vr_compositor_chan.send(compositor).unwrap();
}
- fn handle_get_gamepads(&mut self,
- synced_ids: Vec<u32>,
- sender: IpcSender<WebVRResult<Vec<(Option<VRGamepadData>, VRGamepadState)>>>) {
+ fn handle_get_gamepads(
+ &mut self,
+ synced_ids: Vec<u32>,
+ sender: IpcSender<WebVRResult<Vec<(Option<VRGamepadData>, VRGamepadState)>>>,
+ ) {
let gamepads = self.service.get_gamepads();
- let data = gamepads.iter().map(|g| {
- let g = g.borrow();
- // Optimization, don't fetch and send gamepad static data when the gamepad is already synced.
- let data = if synced_ids.iter().any(|v| *v == g.id()) {
- None
- } else {
- Some(g.data())
- };
- (data, g.state())
- }).collect();
+ let data = gamepads
+ .iter()
+ .map(|g| {
+ let g = g.borrow();
+ // Optimization, don't fetch and send gamepad static data when the gamepad is already synced.
+ let data = if synced_ids.iter().any(|v| *v == g.id()) {
+ None
+ } else {
+ Some(g.data())
+ };
+ (data, g.state())
+ }).collect();
sender.send(Ok(data)).unwrap();
}
@@ -256,7 +284,9 @@ impl WebVRThread {
fn notify_events(&self, events: Vec<VREvent>) {
let pipeline_ids: Vec<PipelineId> = self.contexts.iter().map(|c| *c).collect();
- self.constellation_chan.send(ConstellationMsg::WebVREvents(pipeline_ids.clone(), events)).unwrap();
+ self.constellation_chan
+ .send(ConstellationMsg::WebVREvents(pipeline_ids.clone(), events))
+ .unwrap();
}
#[inline]
@@ -273,21 +303,29 @@ impl WebVRThread {
let (sender, receiver) = ipc::channel().unwrap();
// Defines the polling interval time in ms for VR Events such as VRDisplay connected, disconnected, etc.
- let polling_interval: u64 = PREFS.get("dom.webvr.event_polling_interval").as_u64().unwrap_or(500);
-
- thread::Builder::new().name("WebVRPollEvents".into()).spawn(move || {
- loop {
- if webvr_thread.send(WebVRMsg::PollEvents(sender.clone())).is_err() {
- // WebVR Thread closed
- break;
- }
- if !receiver.recv().unwrap_or(false) {
- // WebVR Thread asked to unschedule this thread
- break;
+ let polling_interval: u64 = PREFS
+ .get("dom.webvr.event_polling_interval")
+ .as_u64()
+ .unwrap_or(500);
+
+ thread::Builder::new()
+ .name("WebVRPollEvents".into())
+ .spawn(move || {
+ loop {
+ if webvr_thread
+ .send(WebVRMsg::PollEvents(sender.clone()))
+ .is_err()
+ {
+ // WebVR Thread closed
+ break;
+ }
+ if !receiver.recv().unwrap_or(false) {
+ // WebVR Thread asked to unschedule this thread
+ break;
+ }
+ thread::sleep(time::Duration::from_millis(polling_interval));
}
- thread::sleep(time::Duration::from_millis(polling_interval));
- }
- }).expect("Thread spawning failed");
+ }).expect("Thread spawning failed");
}
}
@@ -310,7 +348,7 @@ pub struct WebVRCompositor(*mut VRDisplay);
pub struct WebVRCompositorHandler {
compositors: HashMap<webgl::WebVRDeviceId, WebVRCompositor>,
webvr_thread_receiver: Receiver<Option<WebVRCompositor>>,
- webvr_thread_sender: Option<IpcSender<WebVRMsg>>
+ webvr_thread_sender: Option<IpcSender<WebVRMsg>>,
}
#[allow(unsafe_code)]
@@ -324,7 +362,7 @@ impl WebVRCompositorHandler {
let instance = Box::new(WebVRCompositorHandler {
compositors: HashMap::new(),
webvr_thread_receiver: receiver,
- webvr_thread_sender: None
+ webvr_thread_sender: None,
});
(instance, sender)
@@ -337,7 +375,7 @@ impl webgl::WebVRRenderHandler for WebVRCompositorHandler {
match cmd {
webgl::WebVRCommand::Create(compositor_id) => {
self.create_compositor(compositor_id);
- }
+ },
webgl::WebVRCommand::SyncPoses(compositor_id, near, far, sender) => {
if let Some(compositor) = self.compositors.get(&compositor_id) {
let pose = unsafe {
@@ -348,7 +386,7 @@ impl webgl::WebVRRenderHandler for WebVRCompositorHandler {
} else {
let _ = sender.send(Err(()));
}
- }
+ },
webgl::WebVRCommand::SubmitFrame(compositor_id, left_bounds, right_bounds) => {
if let Some(compositor) = self.compositors.get(&compositor_id) {
if let Some((texture_id, size)) = texture {
@@ -356,7 +394,7 @@ impl webgl::WebVRRenderHandler for WebVRCompositorHandler {
texture_id: texture_id,
left_bounds: left_bounds,
right_bounds: right_bounds,
- texture_size: Some((size.width as u32, size.height as u32))
+ texture_size: Some((size.width as u32, size.height as u32)),
};
unsafe {
(*compositor.0).render_layer(&layer);
@@ -364,10 +402,10 @@ impl webgl::WebVRRenderHandler for WebVRCompositorHandler {
}
}
}
- }
+ },
webgl::WebVRCommand::Release(compositor_id) => {
self.compositors.remove(&compositor_id);
- }
+ },
}
}
}
@@ -380,7 +418,9 @@ impl WebVRCompositorHandler {
None => return,
};
- sender.send(WebVRMsg::CreateCompositor(display_id as u32)).unwrap();
+ sender
+ .send(WebVRMsg::CreateCompositor(display_id as u32))
+ .unwrap();
let display = self.webvr_thread_receiver.recv().unwrap();
match display {
@@ -389,7 +429,7 @@ impl WebVRCompositorHandler {
},
None => {
error!("VRDisplay not found when creating a new VRCompositor");
- }
+ },
};
}
diff --git a/components/webvr_traits/lib.rs b/components/webvr_traits/lib.rs
index 9fd8c85074b..baf4b20943e 100644
--- a/components/webvr_traits/lib.rs
+++ b/components/webvr_traits/lib.rs
@@ -6,7 +6,8 @@
extern crate ipc_channel;
extern crate msg;
-#[macro_use] extern crate serde;
+#[macro_use]
+extern crate serde;
pub extern crate rust_webvr_api as webvr;
mod webvr_traits;
diff --git a/components/webvr_traits/webvr_traits.rs b/components/webvr_traits/webvr_traits.rs
index 10fc9576b90..86c194fc404 100644
--- a/components/webvr_traits/webvr_traits.rs
+++ b/components/webvr_traits/webvr_traits.rs
@@ -15,11 +15,20 @@ pub enum WebVRMsg {
UnregisterContext(PipelineId),
PollEvents(IpcSender<bool>),
GetDisplays(IpcSender<WebVRResult<Vec<VRDisplayData>>>),
- GetFrameData(PipelineId, u32, f64, f64, IpcSender<WebVRResult<VRFrameData>>),
+ GetFrameData(
+ PipelineId,
+ u32,
+ f64,
+ f64,
+ IpcSender<WebVRResult<VRFrameData>>,
+ ),
ResetPose(PipelineId, u32, IpcSender<WebVRResult<VRDisplayData>>),
RequestPresent(PipelineId, u32, IpcSender<WebVRResult<()>>),
ExitPresent(PipelineId, u32, Option<IpcSender<WebVRResult<()>>>),
CreateCompositor(u32),
- GetGamepads(Vec<u32>, IpcSender<WebVRResult<Vec<(Option<VRGamepadData>, VRGamepadState)>>>),
+ GetGamepads(
+ Vec<u32>,
+ IpcSender<WebVRResult<Vec<(Option<VRGamepadData>, VRGamepadState)>>>,
+ ),
Exit,
}
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py
index 31bfc8f48bd..9852558bce6 100644
--- a/python/servo/devenv_commands.py
+++ b/python/servo/devenv_commands.py
@@ -255,6 +255,7 @@ class MachCommands(CommandBase):
return -1
env = self.build_env(target=target)
ndk_stack = path.join(env["ANDROID_NDK"], "ndk-stack")
+ self.handle_android_target(target)
sym_path = path.join(
"target",
target,
@@ -262,5 +263,5 @@ class MachCommands(CommandBase):
"apk",
"obj",
"local",
- "armeabi-v7a")
+ self.config["android"]["lib"])
print(subprocess.check_output([ndk_stack, "-sym", sym_path, "-dump", logfile]))
diff --git a/resources/cert-wpt-only b/resources/cert-wpt-only
new file mode 100644
index 00000000000..8d1bc0f7ca0
--- /dev/null
+++ b/resources/cert-wpt-only
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDUzCCAjugAwIBAgIDC3+YMA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNVBAMMEndl
+Yi1wbGF0Zm9ybS10ZXN0czAeFw0xODA3MTMxMjU5MTJaFw0yODA3MTAxMjU5MTJa
+MB0xGzAZBgNVBAMMEndlYi1wbGF0Zm9ybS10ZXN0czCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBANOUELdwzxsrHn9sIk8VvsmVA0XifCZ40ls8tTyGrKu6
+6cEokYOnKJImeQDCvebvu2vX+i45+hbI5SSObumxFYOrmFaZQklNXRY6KP5NLika
+PHh4CapzJmLCpSxIkmUScH4/fsfE6grIYO9qsGXc2hAxyYg6VjX9hb0RpFF9f3Ff
+FjhkBnglOxXhphkve/+SEa0OYBrUYY5GRQCbe8YfWw67nWz9eimWgiU91RmAtzBu
+YSofy1DcrPT/SwJnYFgEF7Zpk5PIkvigXvFW/egkIb30vtTuH99u001VG1jEZpuT
+trIQ6A77a5BP+V+ZWAqqjV85M3WDQUVxUwvwgXXcc20CAwEAAaOBmzCBmDAMBgNV
+HRMEBTADAQH/MB0GA1UdDgQWBBRb2sjBCfNNkjC870P7JpMerg2aDzBHBgNVHSME
+QDA+gBRb2sjBCfNNkjC870P7JpMerg2aD6EhpB8wHTEbMBkGA1UEAwwSd2ViLXBs
+YXRmb3JtLXRlc3RzggMLf5gwCwYDVR0PBAQDAgIEMBMGA1UdJQQMMAoGCCsGAQUF
+BwMBMA0GCSqGSIb3DQEBCwUAA4IBAQCX4/C5Ywfl3tkff96++OSY1iWX6dOtfG0w
+fQ2OxZvv66jFWbIscwhGIqv3YQEZngAMcrwqvYYRHz2AqhlYb80Ftlon/y45GkQI
+ouim4iwDUi9jazo7k8a4U8307GNcJFplpOOTnpbwAM+C/NwoGIbxon54gJ/0EbGO
+yBC1GJ39norLbY4VIjsfDXlTvSv30AkqpqnxPkzQqoGuKzSwUhbQeOIlweKSRxsv
+pqIpb4eaPF1EsI+VPOet0YMcOLc9hSu43EWBunGnHJabwTg+qabHOHFNN27KuOir
+zAdOIUOIIcBJEZ7WxBMsV3UdjlQfY5pGGVJAxR4sONK4YkOlhMjk
+-----END CERTIFICATE-----
diff --git a/rust-toolchain b/rust-toolchain
index c4773552808..8cf661266f8 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1 +1 @@
-nightly-2018-07-17
+nightly-2018-08-29
diff --git a/servo-tidy.toml b/servo-tidy.toml
index 0723999d448..46f4fa505c5 100644
--- a/servo-tidy.toml
+++ b/servo-tidy.toml
@@ -14,6 +14,7 @@ lint-scripts = [
# which are packages allowed to use the blocked package.
[blocked-packages]
rand = [
+ "crossbeam-channel",
"gaol",
"hashglobe", # only uses in tests
"ipc-channel",
@@ -35,10 +36,15 @@ num = [
# Ignored packages with duplicated versions
packages = [
"bitflags",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+ #TODO: remove ipc-channel when #21325 lands
+ "ipc-channel",
"log",
"rand",
"winapi",
-
+ # TODO: remove slab when #21426 lands
+ "slab",
"syn",
"quote",
"proc-macro2",
diff --git a/support/android/apk/servoview/src/main/java/com/mozilla/servoview/ServoSurface.java b/support/android/apk/servoview/src/main/java/com/mozilla/servoview/ServoSurface.java
index b2848e764fc..305dbb7a885 100644
--- a/support/android/apk/servoview/src/main/java/com/mozilla/servoview/ServoSurface.java
+++ b/support/android/apk/servoview/src/main/java/com/mozilla/servoview/ServoSurface.java
@@ -38,7 +38,7 @@ public class ServoSurface {
private Servo mServo;
private Client mClient = null;
private String mServoArgs = "";
- private Uri mInitialUri = null;
+ private String mInitialUri = null;
private Activity mActivity;
public ServoSurface(Surface surface, int width, int height) {
@@ -82,7 +82,15 @@ public class ServoSurface {
}
public void loadUri(String uri) {
- mServo.loadUri(uri);
+ if (mServo != null) {
+ mServo.loadUri(uri);
+ } else {
+ mInitialUri = uri;
+ }
+ }
+
+ public void loadUri(Uri uri) {
+ loadUri(uri.toString());
}
public void scrollStart(int dx, int dy, int x, int y) {
@@ -105,14 +113,6 @@ public class ServoSurface {
mServo.resize(width, height);
}
- public void loadUri(Uri uri) {
- if (mServo != null) {
- mServo.loadUri(uri.toString());
- } else {
- mInitialUri = uri;
- }
- }
-
static class GLSurface implements GfxCallbacks {
private EGLConfig[] mEGLConfigs;
private EGLDisplay mEglDisplay;
@@ -196,15 +196,14 @@ public class ServoSurface {
GLSurface surface = new GLSurface(mASurface);
- final boolean showLogs = true;
- String uri = mInitialUri == null ? null : mInitialUri.toString();
-
mGLLooperHandler = new Handler() {
public void handleMessage(Message msg) {
}
};
inUIThread(() -> {
+ final boolean showLogs = true;
+ String uri = mInitialUri == null ? null : mInitialUri;
mServo = new Servo(this, surface, mClient, mActivity, mServoArgs, uri, mWidth, mHeight, showLogs);
});
diff --git a/support/android/fakeld/fake-ld-arm64.sh b/support/android/fakeld/fake-ld-arm64.sh
index aad8ca0810b..2137a4492d0 100755
--- a/support/android/fakeld/fake-ld-arm64.sh
+++ b/support/android/fakeld/fake-ld-arm64.sh
@@ -11,4 +11,5 @@ set -o pipefail
source ./support/android/fakeld/fake-ld.sh
export _GCC_PARAMS="${@}"
-call_gcc "arch-arm64" "aarch64-linux-android" "android-21" "arm64-v8a"
+call_gcc "arch-arm64" "aarch64-linux-android" "android-21" "arm64-v8a" \
+ "aarch64-linux-android"
diff --git a/tests/unit/style/parsing/mod.rs b/tests/unit/style/parsing/mod.rs
index b75e3a7ce42..6f76b2efea6 100644
--- a/tests/unit/style/parsing/mod.rs
+++ b/tests/unit/style/parsing/mod.rs
@@ -19,9 +19,15 @@ where F: for<'t> Fn(&ParserContext, &mut Parser<'static, 't>) -> Result<T, Parse
fn parse_input<'i: 't, 't, T, F>(f: F, input: &'t mut ParserInput<'i>) -> Result<T, ParseError<'i>>
where F: Fn(&ParserContext, &mut Parser<'i, 't>) -> Result<T, ParseError<'i>> {
let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap();
- let context = ParserContext::new(Origin::Author, &url, Some(CssRuleType::Style),
- ParsingMode::DEFAULT,
- QuirksMode::NoQuirks, None);
+ let context = ParserContext::new(
+ Origin::Author,
+ &url,
+ Some(CssRuleType::Style),
+ ParsingMode::DEFAULT,
+ QuirksMode::NoQuirks,
+ None,
+ None,
+ );
let mut parser = Parser::new(input);
f(&context, &mut parser)
}
diff --git a/tests/unit/style/properties/mod.rs b/tests/unit/style/properties/mod.rs
index 725aabc42a4..5210b663168 100644
--- a/tests/unit/style/properties/mod.rs
+++ b/tests/unit/style/properties/mod.rs
@@ -24,9 +24,15 @@ where
F: Fn(&ParserContext, &mut Parser<'i, 't>) -> Result<T, ParseError<'i>>,
{
let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap();
- let context = ParserContext::new(Origin::Author, &url, Some(CssRuleType::Style),
- ParsingMode::DEFAULT,
- QuirksMode::NoQuirks, None);
+ let context = ParserContext::new(
+ Origin::Author,
+ &url,
+ Some(CssRuleType::Style),
+ ParsingMode::DEFAULT,
+ QuirksMode::NoQuirks,
+ None,
+ None,
+ );
let mut parser = Parser::new(input);
f(&context, &mut parser)
}
diff --git a/tests/unit/style/viewport.rs b/tests/unit/style/viewport.rs
index 9243dbcb403..a8d01651c3d 100644
--- a/tests/unit/style/viewport.rs
+++ b/tests/unit/style/viewport.rs
@@ -301,9 +301,15 @@ fn multiple_stylesheets_cascading() {
#[test]
fn constrain_viewport() {
let url = ServoUrl::parse("http://localhost").unwrap();
- let context = ParserContext::new(Origin::Author, &url, Some(CssRuleType::Viewport),
- ParsingMode::DEFAULT,
- QuirksMode::NoQuirks, None);
+ let context = ParserContext::new(
+ Origin::Author,
+ &url,
+ Some(CssRuleType::Viewport),
+ ParsingMode::DEFAULT,
+ QuirksMode::NoQuirks,
+ None,
+ None,
+ );
macro_rules! from_css {
($css:expr) => {
diff --git a/tests/wpt/README.md b/tests/wpt/README.md
index 26c9639d627..1c0434f494d 100644
--- a/tests/wpt/README.md
+++ b/tests/wpt/README.md
@@ -94,7 +94,11 @@ defaults at `config.default.json`) with the following contents:
}
Finally, you can run `python serve` from `tests/wpt/web-platform-tests`.
-Then navigate Servo to `http://web-platform.test:8000/path/to/test`.
+Then navigate Servo to `http://web-platform.test:8000/path/to/test` or
+`https://web-platform.test:8443/path/to/test`.
+
+To prevent browser SSL warnings when running HTTPS tests locally,
+you will need to run Servo with `--certificate-path resources/cert-wpt-only`.
[upstream-running]: https://github.com/w3c/web-platform-tests#running-the-tests
diff --git a/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html.ini b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html.ini
new file mode 100644
index 00000000000..93a00d9d776
--- /dev/null
+++ b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html.ini
@@ -0,0 +1,4 @@
+[2d.text.measure.actualBoundingBox.html]
+ [Testing actualBoundingBox]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html.ini b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html.ini
new file mode 100644
index 00000000000..c6ff9f76168
--- /dev/null
+++ b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html.ini
@@ -0,0 +1,4 @@
+[2d.text.measure.advances.html]
+ [Testing width advances]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html.ini b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html.ini
new file mode 100644
index 00000000000..9d0d26f9399
--- /dev/null
+++ b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html.ini
@@ -0,0 +1,4 @@
+[2d.text.measure.baselines.html]
+ [Testing baselines]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html.ini b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html.ini
new file mode 100644
index 00000000000..89c77c39bbb
--- /dev/null
+++ b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html.ini
@@ -0,0 +1,4 @@
+[2d.text.measure.emHeights.html]
+ [Testing emHeights]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html.ini b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html.ini
new file mode 100644
index 00000000000..ec57f1b22cd
--- /dev/null
+++ b/tests/wpt/metadata/2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html.ini
@@ -0,0 +1,4 @@
+[2d.text.measure.fontBoundingBox.html]
+ [Testing fontBoundingBox]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-drawImage.html.ini b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-drawImage.html.ini
index 1459e8d2f4f..9ea19f19432 100644
--- a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-drawImage.html.ini
+++ b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-drawImage.html.ini
@@ -1,5 +1,5 @@
[createImageBitmap-drawImage.html]
- type: testharness
+ bug: https://github.com/servo/servo/issues/12973
expected: TIMEOUT
[createImageBitmap from a HTMLImageElement, and drawImage on the created ImageBitmap]
expected: FAIL
diff --git a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-invalid-args.html.ini b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-invalid-args.html.ini
index f46fa170146..b251b32d8a2 100644
--- a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-invalid-args.html.ini
+++ b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-invalid-args.html.ini
@@ -1,5 +1,5 @@
[createImageBitmap-invalid-args.html]
- type: testharness
+ bug: https://github.com/servo/servo/issues/12973#issuecomment-241551718
expected: TIMEOUT
[createImageBitmap with a HTMLImageElement source and sw set to 0 rejects with a RangeError.]
expected: FAIL
diff --git a/tests/wpt/metadata/2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html.ini b/tests/wpt/metadata/2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html.ini
new file mode 100644
index 00000000000..93b0cf0b169
--- /dev/null
+++ b/tests/wpt/metadata/2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html.ini
@@ -0,0 +1,4 @@
+[2d.text.draw.baseline.alphabetic.html]
+ [Canvas test: 2d.text.draw.baseline.alphabetic]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini
index 20de0f22e82..3a3d15b8406 100644
--- a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini
+++ b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini
@@ -1,14 +1,19 @@
[url-with-fetch.any.worker.html]
[url-with-fetch]
expected: FAIL
+
[Only exact matches should revoke URLs, using fetch]
expected: FAIL
+
[Appending a query string should cause fetch to fail]
expected: FAIL
+
[Appending a path should cause fetch to fail]
expected: FAIL
+
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
+
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL
@@ -19,14 +24,19 @@
[url-with-fetch]
expected: FAIL
+
[Only exact matches should revoke URLs, using fetch]
expected: FAIL
+
[Appending a query string should cause fetch to fail]
expected: FAIL
+
[Appending a path should cause fetch to fail]
expected: FAIL
+
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
+
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json
index d798465afde..c281a65c1ff 100644
--- a/tests/wpt/metadata/MANIFEST.json
+++ b/tests/wpt/metadata/MANIFEST.json
@@ -10603,6 +10603,120 @@
{}
]
],
+ "css/selectors/old-tests/css3-modsel-159.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-159.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-16.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-16.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-161.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-161.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-17.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-17.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-177a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-177a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-18.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-18.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-18a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-18a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-18b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-18b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-18c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-18c.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-19.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-19.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-19b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-19b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-20.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-20.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-21.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-21.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-61.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-61.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-62.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-62.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-63.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-63.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-64.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-64.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-65.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-65.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-66.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-66.xml",
+ {}
+ ]
+ ],
"css/vendor-imports/mozilla/mozilla-central-reftests/css21/pagination/moz-css21-block-page-break-inside-avoid-1.html": [
[
"/css/vendor-imports/mozilla/mozilla-central-reftests/css21/pagination/moz-css21-block-page-break-inside-avoid-1.html",
@@ -11503,6 +11617,18 @@
{}
]
],
+ "fullscreen/rendering/fullscreen-root-block-scroll-manual.html": [
+ [
+ "/fullscreen/rendering/fullscreen-root-block-scroll-manual.html",
+ {}
+ ]
+ ],
+ "fullscreen/rendering/fullscreen-root-block-size-manual.html": [
+ [
+ "/fullscreen/rendering/fullscreen-root-block-size-manual.html",
+ {}
+ ]
+ ],
"fullscreen/rendering/ua-style-iframe-manual.html": [
[
"/fullscreen/rendering/ua-style-iframe-manual.html",
@@ -11605,6 +11731,12 @@
{}
]
],
+ "hr-time/unload-manual.html": [
+ [
+ "/hr-time/unload-manual.html",
+ {}
+ ]
+ ],
"html-longdesc/data-uri-image-data-uri-description-manual.html": [
[
"/html-longdesc/data-uri-image-data-uri-description-manual.html",
@@ -12877,6 +13009,54 @@
{}
]
],
+ "html/semantics/interactive-elements/commands/legend/first-input-after-legend-manual.html": [
+ [
+ "/html/semantics/interactive-elements/commands/legend/first-input-after-legend-manual.html",
+ {}
+ ]
+ ],
+ "html/semantics/interactive-elements/commands/legend/first-input-before-legend-manual.html": [
+ [
+ "/html/semantics/interactive-elements/commands/legend/first-input-before-legend-manual.html",
+ {}
+ ]
+ ],
+ "html/semantics/interactive-elements/commands/legend/first-input-inside-legend-manual.html": [
+ [
+ "/html/semantics/interactive-elements/commands/legend/first-input-inside-legend-manual.html",
+ {}
+ ]
+ ],
+ "html/semantics/interactive-elements/commands/legend/focusable-legend-manual.html": [
+ [
+ "/html/semantics/interactive-elements/commands/legend/focusable-legend-manual.html",
+ {}
+ ]
+ ],
+ "html/semantics/interactive-elements/commands/legend/focusable-legend-sibling-manual.html": [
+ [
+ "/html/semantics/interactive-elements/commands/legend/focusable-legend-sibling-manual.html",
+ {}
+ ]
+ ],
+ "html/semantics/interactive-elements/commands/legend/input-outside-fieldset-manual.html": [
+ [
+ "/html/semantics/interactive-elements/commands/legend/input-outside-fieldset-manual.html",
+ {}
+ ]
+ ],
+ "html/semantics/interactive-elements/commands/legend/label-sibling-manual.html": [
+ [
+ "/html/semantics/interactive-elements/commands/legend/label-sibling-manual.html",
+ {}
+ ]
+ ],
+ "html/semantics/interactive-elements/commands/legend/no-fieldset-parent-manual.html": [
+ [
+ "/html/semantics/interactive-elements/commands/legend/no-fieldset-parent-manual.html",
+ {}
+ ]
+ ],
"html/semantics/selectors/pseudo-classes/checked-001-manual.html": [
[
"/html/semantics/selectors/pseudo-classes/checked-001-manual.html",
@@ -13213,6 +13393,12 @@
{}
]
],
+ "payment-request/MerchantValidationEvent/complete-method-manual.https.html": [
+ [
+ "/payment-request/MerchantValidationEvent/complete-method-manual.https.html",
+ {}
+ ]
+ ],
"payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html": [
[
"/payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html",
@@ -13399,6 +13585,12 @@
{}
]
],
+ "pointerevents/extension/pointerevent_pointerrawmove-manual.html": [
+ [
+ "/pointerevents/extension/pointerevent_pointerrawmove-manual.html",
+ {}
+ ]
+ ],
"pointerevents/extension/pointerevent_touch-action-pan-down-css_touch-manual.html": [
[
"/pointerevents/extension/pointerevent_touch-action-pan-down-css_touch-manual.html",
@@ -19647,6 +19839,18 @@
{}
]
],
+ "css/CSS2/abspos/static-inside-table-cell.html": [
+ [
+ "/css/CSS2/abspos/static-inside-table-cell.html",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/abspos/table-caption-is-containing-block-001.html": [
[
"/css/CSS2/abspos/table-caption-is-containing-block-001.html",
@@ -39663,6 +39867,30 @@
{}
]
],
+ "css/CSS2/borders/groove-default.html": [
+ [
+ "/css/CSS2/borders/groove-default.html",
+ [
+ [
+ "/css/CSS2/borders/groove-ridge-default-notref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/CSS2/borders/ridge-default.html": [
+ [
+ "/css/CSS2/borders/ridge-default.html",
+ [
+ [
+ "/css/CSS2/borders/groove-ridge-default-notref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/borders/shand-border-000.xht": [
[
"/css/CSS2/borders/shand-border-000.xht",
@@ -47783,6 +48011,90 @@
{}
]
],
+ "css/CSS2/floats/float-nowrap-2.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-2.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-1.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-3.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-3.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-3-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-5.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-5.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-5-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-6.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-6.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-5-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-7.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-7.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-1.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-8.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-8.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-1.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-9.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-9.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-3-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/floats/floated-table-wider-than-specified.html": [
[
"/css/CSS2/floats/floated-table-wider-than-specified.html",
@@ -53103,6 +53415,18 @@
{}
]
],
+ "css/CSS2/linebox/anonymous-inline-inherit-001.html": [
+ [
+ "/css/CSS2/linebox/anonymous-inline-inherit-001.html",
+ [
+ [
+ "/css/CSS2/linebox/anonymous-inline-inherit-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/linebox/border-padding-bleed-001.xht": [
[
"/css/CSS2/linebox/border-padding-bleed-001.xht",
@@ -55227,6 +55551,18 @@
{}
]
],
+ "css/CSS2/linebox/vertical-align-nested-top-001.html": [
+ [
+ "/css/CSS2/linebox/vertical-align-nested-top-001.html",
+ [
+ [
+ "/css/CSS2/linebox/vertical-align-nested-top-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/linebox/vertical-align-sub-001.xht": [
[
"/css/CSS2/linebox/vertical-align-sub-001.xht",
@@ -66195,6 +66531,18 @@
{}
]
],
+ "css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html": [
+ [
+ "/css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square-only.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/normal-flow/height-001.xht": [
[
"/css/CSS2/normal-flow/height-001.xht",
@@ -75267,6 +75615,18 @@
{}
]
],
+ "css/CSS2/positioning/abspos-inline-008.xht": [
+ [
+ "/css/CSS2/positioning/abspos-inline-008.xht",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square-only.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/positioning/abspos-overflow-001.xht": [
[
"/css/CSS2/positioning/abspos-overflow-001.xht",
@@ -106975,6 +107335,54 @@
{}
]
],
+ "css/css-break/widows-orphans-001.html": [
+ [
+ "/css/css-break/widows-orphans-001.html",
+ [
+ [
+ "/css/css-break/reference/widows-orphans-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-break/widows-orphans-002.html": [
+ [
+ "/css/css-break/widows-orphans-002.html",
+ [
+ [
+ "/css/css-break/reference/widows-orphans-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-break/widows-orphans-003.html": [
+ [
+ "/css/css-break/widows-orphans-003.html",
+ [
+ [
+ "/css/css-break/reference/widows-orphans-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-break/widows-orphans-004.html": [
+ [
+ "/css/css-break/widows-orphans-004.html",
+ [
+ [
+ "/css/css-break/reference/widows-orphans-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-cascade/all-prop-001.html": [
[
"/css/css-cascade/all-prop-001.html",
@@ -109027,6 +109435,18 @@
{}
]
],
+ "css/css-contain/contain-animation-001.html": [
+ [
+ "/css/css-contain/contain-animation-001.html",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-contain/contain-layout-001.html": [
[
"/css/css-contain/contain-layout-001.html",
@@ -109231,6 +109651,30 @@
{}
]
],
+ "css/css-contain/contain-layout-018.html": [
+ [
+ "/css/css-contain/contain-layout-018.html",
+ [
+ [
+ "/css/reference/nothing.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-contain/contain-layout-baseline-001.html": [
+ [
+ "/css/css-contain/contain-layout-baseline-001.html",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-contain/contain-layout-breaks-001.html": [
[
"/css/css-contain/contain-layout-breaks-001.html",
@@ -109675,6 +110119,18 @@
{}
]
],
+ "css/css-contain/contain-paint-025.html": [
+ [
+ "/css/css-contain/contain-paint-025.html",
+ [
+ [
+ "/css/reference/nothing.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-contain/contain-paint-047.html": [
[
"/css/css-contain/contain-paint-047.html",
@@ -109699,6 +110155,18 @@
{}
]
],
+ "css/css-contain/contain-paint-baseline-001.html": [
+ [
+ "/css/css-contain/contain-paint-baseline-001.html",
+ [
+ [
+ "/css/css-contain/reference/contain-baseline-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-contain/contain-paint-cell-001.html": [
[
"/css/css-contain/contain-paint-cell-001.html",
@@ -110155,6 +110623,18 @@
{}
]
],
+ "css/css-contain/contain-size-baseline-001.html": [
+ [
+ "/css/css-contain/contain-size-baseline-001.html",
+ [
+ [
+ "/css/css-contain/reference/contain-baseline-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-contain/contain-size-borders.html": [
[
"/css/css-contain/contain-size-borders.html",
@@ -110215,6 +110695,18 @@
{}
]
],
+ "css/css-contain/contain-size-grid-002.html": [
+ [
+ "/css/css-contain/contain-size-grid-002.html",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-contain/contain-size-monolithic-001.html": [
[
"/css/css-contain/contain-size-monolithic-001.html",
@@ -110227,6 +110719,30 @@
{}
]
],
+ "css/css-contain/contain-size-multicol-001.html": [
+ [
+ "/css/css-contain/contain-size-multicol-001.html",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-contain/contain-size-scrollbars-001.html": [
+ [
+ "/css/css-contain/contain-size-scrollbars-001.html",
+ [
+ [
+ "/css/css-contain/reference/contain-size-scrollbars-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-contain/contain-strict-001.html": [
[
"/css/css-contain/contain-strict-001.html",
@@ -110263,6 +110779,18 @@
{}
]
],
+ "css/css-contain/contain-style-baseline-001.html": [
+ [
+ "/css/css-contain/contain-style-baseline-001.html",
+ [
+ [
+ "/css/css-contain/reference/contain-baseline-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-contain/contain-style-breaks-001.html": [
[
"/css/css-contain/contain-style-breaks-001.html",
@@ -112915,6 +113443,30 @@
{}
]
],
+ "css/css-filter/blur-clip-stacking-context-001.html": [
+ [
+ "/css/css-filter/blur-clip-stacking-context-001.html",
+ [
+ [
+ "/css/css-filter/blur-clip-stacking-context-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-filter/blur-clip-stacking-context-002.html": [
+ [
+ "/css/css-filter/blur-clip-stacking-context-002.html",
+ [
+ [
+ "/css/css-filter/blur-clip-stacking-context-ref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-filter/filtered-block-is-container.html": [
[
"/css/css-filter/filtered-block-is-container.html",
@@ -117199,6 +117751,18 @@
{}
]
],
+ "css/css-flexbox/percentage-heights-quirks-node.html": [
+ [
+ "/css/css-flexbox/percentage-heights-quirks-node.html",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square-only.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-flexbox/percentage-size-subitems-001.html": [
[
"/css/css-flexbox/percentage-size-subitems-001.html",
@@ -124659,6 +125223,30 @@
{}
]
],
+ "css/css-masking/clip-path/clip-path-path-001.html": [
+ [
+ "/css/css-masking/clip-path/clip-path-path-001.html",
+ [
+ [
+ "/css/css-masking/clip-path/reference/clip-path-path-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-masking/clip-path/clip-path-path-002.html": [
+ [
+ "/css/css-masking/clip-path/clip-path-path-002.html",
+ [
+ [
+ "/css/css-masking/clip-path/reference/clip-path-path-002-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-masking/clip-path/clip-path-polygon-001.html": [
[
"/css/css-masking/clip-path/clip-path-polygon-001.html",
@@ -125103,6 +125691,54 @@
{}
]
],
+ "css/css-masking/mask-image/mask-image-url-image-hash.html": [
+ [
+ "/css/css-masking/mask-image/mask-image-url-image-hash.html",
+ [
+ [
+ "/css/css-masking/mask-image/reference/mask-image-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-masking/mask-image/mask-image-url-image.html": [
+ [
+ "/css/css-masking/mask-image/mask-image-url-image.html",
+ [
+ [
+ "/css/css-masking/mask-image/reference/mask-image-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-masking/mask-image/mask-image-url-local-mask.html": [
+ [
+ "/css/css-masking/mask-image/mask-image-url-local-mask.html",
+ [
+ [
+ "/css/css-masking/mask-image/reference/mask-image-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-masking/mask-image/mask-image-url-remote-mask.html": [
+ [
+ "/css/css-masking/mask-image/mask-image-url-remote-mask.html",
+ [
+ [
+ "/css/css-masking/mask-image/reference/mask-image-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-masking/test-mask.html": [
[
"/css/css-masking/test-mask.html",
@@ -125139,6 +125775,30 @@
{}
]
],
+ "css/css-multicol/inline-block-and-column-span-all.html": [
+ [
+ "/css/css-multicol/inline-block-and-column-span-all.html",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-multicol/intrinsic-size-001.html": [
+ [
+ "/css/css-multicol/intrinsic-size-001.html",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-multicol/multicol-basic-001.html": [
[
"/css/css-multicol/multicol-basic-001.html",
@@ -127755,9 +128415,9 @@
{}
]
],
- "css/css-paint-api/registered-properties-in-custom-paint.https.html": [
+ "css/css-paint-api/registered-property-type.https.html": [
[
- "/css/css-paint-api/registered-properties-in-custom-paint.https.html",
+ "/css/css-paint-api/registered-property-type.https.html",
[
[
"/css/css-paint-api/parse-input-arguments-ref.html",
@@ -131407,6 +132067,18 @@
{}
]
],
+ "css/css-scrollbars/textarea-scrollbar-width-none.html": [
+ [
+ "/css/css-scrollbars/textarea-scrollbar-width-none.html",
+ [
+ [
+ "/css/css-scrollbars/textarea-scrollbar-width-none-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-scrollbars/viewport-scrollbar-body.html": [
[
"/css/css-scrollbars/viewport-scrollbar-body.html",
@@ -159419,6 +160091,30 @@
{}
]
],
+ "css/css-writing-modes/img-intrinsic-size-contribution-001.html": [
+ [
+ "/css/css-writing-modes/img-intrinsic-size-contribution-001.html",
+ [
+ [
+ "/css/css-writing-modes/img-intrinsic-size-contribution-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/css-writing-modes/img-intrinsic-size-contribution-002.html": [
+ [
+ "/css/css-writing-modes/img-intrinsic-size-contribution-002.html",
+ [
+ [
+ "/css/css-writing-modes/img-intrinsic-size-contribution-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/css-writing-modes/inline-block-alignment-002.xht": [
[
"/css/css-writing-modes/inline-block-alignment-002.xht",
@@ -164215,6 +164911,18 @@
{}
]
],
+ "css/cssom-view/cssom-getBoundingClientRect-vertical-rl.html": [
+ [
+ "/css/cssom-view/cssom-getBoundingClientRect-vertical-rl.html",
+ [
+ [
+ "/css/cssom-view/cssom-getBoundingClientRect-vertical-rl-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/cssom-view/scrollTop-display-change.html": [
[
"/css/cssom-view/scrollTop-display-change.html",
@@ -165355,6 +166063,18 @@
{}
]
],
+ "css/selectors/historical-xmlid.xht": [
+ [
+ "/css/selectors/historical-xmlid.xht",
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/selectors/invalidation/sheet-going-away-002.html": [
[
"/css/selectors/invalidation/sheet-going-away-002.html",
@@ -165379,6 +166099,1278 @@
{}
]
],
+ "css/selectors/old-tests/css3-modsel-101.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-101.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-101b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-101b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-102.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-102.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-103.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-103.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-103b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-103b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-105.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-105.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-105b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-105b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-106.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-106.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-106b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-106b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-108.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-108.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-108b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-108b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-109.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-109.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-109b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-109b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-110.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-110.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-110b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-110b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-112.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-112.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-112b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-112b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-115.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-115.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-115b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-115b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-116.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-116.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-116b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-116b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-117.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-117.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-117b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-117b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-122.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-122.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-address-p-p-p-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-125.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-125.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-125b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-125b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-126.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-126.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-126b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-126b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-127.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-127.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-127b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-127b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-128.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-128.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-128b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-128b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-129.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-129.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-129b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-129b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-134.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-134.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-134b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-134b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-135.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-135.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-135b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-135b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-136.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-136.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-136b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-136b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-141.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-141.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-141b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-141b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-142.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-142.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-142b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-142b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-143.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-143.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-143b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-143b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-148.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-148.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-149.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-149.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background-offset.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-149b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-149b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background-offset.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-14b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-14b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-151.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-151.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background-offset.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-152.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-152.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background-offset.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-154.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-154.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-155.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-155.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-155a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-155a.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-155b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-155b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-155c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-155c.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-155d.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-155d.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-156.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-156.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-156b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-156b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-156c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-156c.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-157.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-157.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-158.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-158.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-15b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-15b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-160.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-160.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-168.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-168.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-test-has-passed-desc.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-168a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-168a.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-test-has-passed-desc.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-169.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-169.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-test-has-passed-desc.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-169a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-169a.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-test-has-passed-desc.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-170.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-170.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-170a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-170a.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-170b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-170b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-170c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-170c.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-170d.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-170d.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-172a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-172a.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/seven-green-divs.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-172b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-172b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/seven-green-divs.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-173a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-173a.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/seven-green-divs.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-173b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-173b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/seven-green-divs.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-175a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-175a.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-175b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-175b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-175c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-175c.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-176.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-176.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-177b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-177b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-178.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-178.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-179.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-179.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-green-color.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-184a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-184a.xml",
+ [
+ [
+ "/css/selectors/old-tests/css3-modsel-184-ref.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-184b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-184b.xml",
+ [
+ [
+ "/css/selectors/old-tests/css3-modsel-184-ref.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-184c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-184c.xml",
+ [
+ [
+ "/css/selectors/old-tests/css3-modsel-184-ref.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-184d.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-184d.xml",
+ [
+ [
+ "/css/selectors/old-tests/css3-modsel-184-ref.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-184e.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-184e.xml",
+ [
+ [
+ "/css/selectors/old-tests/css3-modsel-184-ref.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-184f.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-184f.xml",
+ [
+ [
+ "/css/selectors/old-tests/css3-modsel-184-ref.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-48.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-48.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-address-p-p-p-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-49.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-49.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-address-p-p-p-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-54.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-54.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-paragraph-lime-characters.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-55.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-55.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-paragraph-lime-characters.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-56.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-56.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-paragraph-lime-characters.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-59.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-59.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-paragraph-lime-characters.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-60.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-60.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/three-paragraph-lime-characters.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-7b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-7b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/this-line-lime-background.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-83.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-83.xml",
+ [
+ [
+ "/css/selectors/old-tests/css3-modsel-83-ref.xml",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-87.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-87.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/bq-u-u-u-green.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-87b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-87b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/bq-u-u-u-green.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-90.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-90.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/bq-u-u-u-green.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-90b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-90b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/bq-u-u-u-green.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-99.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-99.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-99b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-99b.xml",
+ [
+ [
+ "/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/selectors/root-siblings.htm": [
[
"/css/selectors/root-siblings.htm",
@@ -183499,84 +185491,156 @@
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html",
+ [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html",
+ [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html",
[
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap-ref.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item-ref.html",
"=="
]
],
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html",
[
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block-ref.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden-ref.html",
"=="
]
],
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html",
[
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden-ref.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-ref.html",
"=="
]
],
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html",
[
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order-ref.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order-ref.html",
"=="
]
],
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html",
[
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez-ref.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez-ref.html",
"=="
]
],
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html",
[
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-ref.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical-ref.html",
"=="
]
],
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html",
[
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative-ref.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering.html",
+ [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float.html",
+ [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html",
+ [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html",
+ [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-ref.html",
"=="
]
],
@@ -184111,6 +186175,18 @@
{}
]
],
+ "html/rendering/the-details-element/details-display-property-is-ignored.html": [
+ [
+ "/html/rendering/the-details-element/details-display-property-is-ignored.html",
+ [
+ [
+ "/html/rendering/the-details-element/details-display-property-is-ignored-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"html/semantics/document-metadata/the-link-element/stylesheet-change-href.html": [
[
"/html/semantics/document-metadata/the-link-element/stylesheet-change-href.html",
@@ -185227,6 +187303,18 @@
{}
]
],
+ "infrastructure/reftest/reftest_and_mismatch.html": [
+ [
+ "/infrastructure/reftest/reftest_and_mismatch.html",
+ [
+ [
+ "/infrastructure/reftest/reftest_and_mismatch_0.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
"infrastructure/reftest/reftest_match.html": [
[
"/infrastructure/reftest/reftest_match.html",
@@ -189481,6 +191569,42 @@
]
},
"reftest_node": {
+ "css/CSS2/floats/float-nowrap-1.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-1.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-1-notref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-3-ref.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-3-ref.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-4.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-4.html": [
+ [
+ "/css/CSS2/floats/float-nowrap-4.html",
+ [
+ [
+ "/css/CSS2/floats/float-nowrap-4-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css/CSS2/floats/floats-placement-vertical-004-ref.xht": [
[
"/css/CSS2/floats/floats-placement-vertical-004-ref.xht",
@@ -190621,6 +192745,18 @@
{}
]
],
+ "infrastructure/reftest/reftest_and_mismatch_0.html": [
+ [
+ "/infrastructure/reftest/reftest_and_mismatch_0.html",
+ [
+ [
+ "/infrastructure/reftest/reftest_and_mismatch_1.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
"infrastructure/reftest/reftest_cycle.html": [
[
"/infrastructure/reftest/reftest_cycle.html",
@@ -196120,6 +198256,11 @@
{}
]
],
+ "common/slow.py": [
+ [
+ {}
+ ]
+ ],
"common/stringifiers.js": [
[
{}
@@ -218700,6 +220841,16 @@
{}
]
],
+ "content-security-policy/script-src-attr-elem/support/t_done.js": [
+ [
+ {}
+ ]
+ ],
+ "content-security-policy/script-src-attr-elem/support/t_fail.js": [
+ [
+ {}
+ ]
+ ],
"content-security-policy/script-src/10_1_support_1.js": [
[
{}
@@ -219270,6 +221421,11 @@
{}
]
],
+ "cookies/http-state/resources/all-tests.html.py-str": [
+ [
+ {}
+ ]
+ ],
"cookies/http-state/resources/cookie-http-state-template.js": [
[
{}
@@ -219835,6 +221991,1686 @@
{}
]
],
+ "cookies/http-state/resources/test-files/charset0001-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/charset0001-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/charset0002-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/charset0002-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/charset0003-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/charset0003-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/charset0004-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/charset0004-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0001-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0001-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0002-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0002-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0003-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0003-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0004-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0004-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0005-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0005-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0006-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0006-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0007-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0007-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0008-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0008-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0009-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0009-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0010-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0010-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0011-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0011-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0012-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0012-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0013-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0013-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0014-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0014-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0015-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0015-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0016-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0016-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0017-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0017-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0018-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0018-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0019-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0019-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0021-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/chromium0021-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0001-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0001-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0002-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0002-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0003-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0003-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0004-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0004-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0005-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0005-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0006-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0006-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0007-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/comma0007-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0020-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0020-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0022-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0022-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0023-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0023-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/disabled-path0029-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/disabled-path0029-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0001-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0001-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0002-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0002-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0003-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0003-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0004-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0004-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0005-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0005-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0006-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0006-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0007-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0007-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0008-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0008-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0009-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0009-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0010-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0010-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0011-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0011-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0012-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0012-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0013-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0013-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0014-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0014-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0015-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0015-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0016-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0016-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0017-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0017-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0018-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0018-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0019-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0019-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0020-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0020-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0021-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0021-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0022-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0022-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0023-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0023-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0024-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0024-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0025-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0025-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0026-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0026-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0027-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0027-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0028-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0028-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0029-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0029-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0031-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0031-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0033-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0033-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0034-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0034-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0035-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0035-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0036-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0036-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0037-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0037-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0038-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0038-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0039-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0039-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0040-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0040-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0041-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0041-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0042-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/domain0042-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0001-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0001-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0002-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0002-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0003-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0003-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0004-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0004-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0005-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0005-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0006-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0006-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0007-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0007-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0008-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0008-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0009-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0009-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0010-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0010-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0011-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0011-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0012-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0012-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0013-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0013-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0014-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0014-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0015-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0015-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0016-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0016-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0017-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/mozilla0017-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0001-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0001-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0002-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0002-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0003-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0003-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0004-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0004-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0005-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0005-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0006-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0006-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0007-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0007-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0008-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0008-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0009-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0009-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0010-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0010-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0011-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0011-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0012-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0012-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0013-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0013-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0014-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0014-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0015-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0015-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0016-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0016-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0017-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0017-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0018-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0018-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0019-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0019-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0020-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0020-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0021-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0021-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0022-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0022-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0023-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0023-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0024-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0024-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0025-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0025-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0026-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0026-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0027-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0027-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0028-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0028-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0029-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0029-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0030-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0030-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0031-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0031-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0032-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0032-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0033-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/name0033-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0030-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0030-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0041-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0041-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0042-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0042-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0043-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0043-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/ordering0001-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/ordering0001-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0001-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0001-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0002-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0002-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0003-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0003-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0004-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0004-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0005-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0005-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0006-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0006-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0007-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0007-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0008-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0008-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0009-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0009-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0010-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0010-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0011-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0011-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0012-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0012-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0013-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0013-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0014-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0014-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0015-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0015-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0016-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0016-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0017-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0017-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0018-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0018-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0019-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0019-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0020-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0020-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0021-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0021-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0022-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0022-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0023-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0023-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0024-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0024-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0025-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0025-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0026-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0026-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0027-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0027-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0028-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0028-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0029-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0029-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0030-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0030-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0031-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0031-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0032-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/path0032-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0001-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0001-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0002-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0002-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0003-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0003-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0004-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0004-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0005-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0005-test": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0006-expected": [
+ [
+ {}
+ ]
+ ],
+ "cookies/http-state/resources/test-files/value0006-test": [
+ [
+ {}
+ ]
+ ],
"cookies/resources/cookie-helper.sub.js": [
[
{}
@@ -222900,6 +226736,11 @@
{}
]
],
+ "css/CSS2/borders/groove-ridge-default-notref.html": [
+ [
+ {}
+ ]
+ ],
"css/CSS2/borders/shand-border-000-ref.xht": [
[
{}
@@ -227020,6 +230861,21 @@
{}
]
],
+ "css/CSS2/floats/float-nowrap-1-notref.html": [
+ [
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-4-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "css/CSS2/floats/float-nowrap-5-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/CSS2/floats/floats-in-table-caption-001-ref.html": [
[
{}
@@ -229210,6 +233066,11 @@
{}
]
],
+ "css/CSS2/linebox/anonymous-inline-inherit-001-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/CSS2/linebox/border-padding-bleed-001-ref.xht": [
[
{}
@@ -229525,6 +233386,11 @@
{}
]
],
+ "css/CSS2/linebox/vertical-align-nested-top-001-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/CSS2/linebox/vertical-align-sub-001-ref.xht": [
[
{}
@@ -241875,11 +245741,6 @@
{}
]
],
- "css/compositing/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/compositing/svg/reference/mix-blend-mode-svg-rectangle-ref.html": [
[
{}
@@ -242560,11 +246421,6 @@
{}
]
],
- "css/css-backgrounds/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/css-backgrounds/reference/60x60-green-background.html": [
[
{}
@@ -243230,12 +247086,12 @@
{}
]
],
- "css/css-box/parsing/support/parsing-testcommon.js": [
+ "css/css-break/META.yml": [
[
{}
]
],
- "css/css-break/META.yml": [
+ "css/css-break/reference/widows-orphans-001-ref.html": [
[
{}
]
@@ -243260,11 +247116,6 @@
{}
]
],
- "css/css-cascade/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/css-cascade/reference/ref-filled-green-100px-square.xht": [
[
{}
@@ -243330,11 +247181,6 @@
{}
]
],
- "css/css-color/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/css-color/rebeccapurple-ref.html": [
[
{}
@@ -243625,6 +247471,11 @@
{}
]
],
+ "css/css-contain/reference/contain-baseline-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/css-contain/reference/contain-layout-breaks-002-ref.html": [
[
{}
@@ -243780,6 +247631,11 @@
{}
]
],
+ "css/css-contain/reference/contain-size-scrollbars-001-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/css-contain/reference/contain-style-breaks-001-ref.html": [
[
{}
@@ -243835,11 +247691,6 @@
{}
]
],
- "css/css-contain/support/60x60-red.png": [
- [
- {}
- ]
- ],
"css/css-contain/support/blue-100x100.png": [
[
{}
@@ -244205,6 +248056,11 @@
{}
]
],
+ "css/css-filter/blur-clip-stacking-context-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/css-filter/filtered-block-is-container-ref.html": [
[
{}
@@ -254390,11 +258246,6 @@
{}
]
],
- "css/css-images/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/css-images/support/1x1-green.gif": [
[
{}
@@ -254970,6 +258821,16 @@
{}
]
],
+ "css/css-masking/clip-path/reference/clip-path-path-001-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "css/css-masking/clip-path/reference/clip-path-path-002-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/css-masking/clip-path/reference/clip-path-rectangle-border-ref.html": [
[
{}
@@ -255075,7 +258936,22 @@
{}
]
],
- "css/css-masking/parsing/support/parsing-testcommon.js": [
+ "css/css-masking/mask-image/reference/mask-image-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "css/css-masking/mask-image/support/image-with-ref.svg": [
+ [
+ {}
+ ]
+ ],
+ "css/css-masking/mask-image/support/image.svg": [
+ [
+ {}
+ ]
+ ],
+ "css/css-masking/mask-image/support/mask.svg": [
[
{}
]
@@ -257640,6 +261516,11 @@
{}
]
],
+ "css/css-scrollbars/textarea-scrollbar-width-none-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/css-scrollbars/viewport-scrollbar-body-ref.html": [
[
{}
@@ -257665,11 +261546,6 @@
{}
]
],
- "css/css-shapes/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/css-shapes/shape-outside/formatting-context/reference/shape-outside-formatting-context-ref.html": [
[
{}
@@ -260995,11 +264871,6 @@
{}
]
],
- "css/css-transforms/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/css-transforms/patternTransform/reference/svg-patternTransform-combination-ref.html": [
[
{}
@@ -262580,11 +266451,6 @@
{}
]
],
- "css/css-ui/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/css-ui/reference/box-sizing-001-ref.html": [
[
{}
@@ -264615,6 +268481,11 @@
{}
]
],
+ "css/css-writing-modes/img-intrinsic-size-contribution-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/css-writing-modes/inline-block-alignment-002-ref.xht": [
[
{}
@@ -264765,11 +268636,6 @@
{}
]
],
- "css/css-writing-modes/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/css-writing-modes/reference/available-size-001-ref.html": [
[
{}
@@ -266075,6 +269941,11 @@
{}
]
],
+ "css/css-writing-modes/support/blue-200x100.png": [
+ [
+ {}
+ ]
+ ],
"css/css-writing-modes/support/blue-horiz-line-220x1.png": [
[
{}
@@ -266995,6 +270866,11 @@
{}
]
],
+ "css/cssom-view/cssom-getBoundingClientRect-vertical-rl-ref.html": [
+ [
+ {}
+ ]
+ ],
"css/cssom-view/iframe.html": [
[
{}
@@ -267660,11 +271536,6 @@
{}
]
],
- "css/filter-effects/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/filter-effects/reference/filters-opacity-001-ref.html": [
[
{}
@@ -267980,11 +271851,6 @@
{}
]
],
- "css/motion/parsing/support/parsing-testcommon.js": [
- [
- {}
- ]
- ],
"css/reference/META.yml": [
[
{}
@@ -268075,31 +271941,11 @@
{}
]
],
- "css/selectors/CHANGES": [
- [
- {}
- ]
- ],
"css/selectors/META.yml": [
[
{}
]
],
- "css/selectors/Makefile": [
- [
- {}
- ]
- ],
- "css/selectors/README": [
- [
- {}
- ]
- ],
- "css/selectors/TODO": [
- [
- {}
- ]
- ],
"css/selectors/any-link-dynamic-001-ref.html": [
[
{}
@@ -268125,1647 +271971,132 @@
{}
]
],
- "css/selectors/css3-modsel-1.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-10.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-100.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-100b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-101.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-101b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-102.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-102b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-103.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-103b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-104.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-104b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-105.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-105b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-106.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-106b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-107.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-107b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-108.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-108b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-109.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-109b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-11.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-110.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-110b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-111.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-111b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-112.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-112b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-113.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-113b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-114.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-114b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-115.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-115b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-116.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-116b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-117.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-117b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-118.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-119.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-12.xml-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-120.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-121.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-122.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-123.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-123b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-124.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-124b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-125.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-125b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-126.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-126b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-127.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-127b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-128.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-128b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-129.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-129b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-13.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-130.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-130b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-131.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-131b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-132.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-132b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-133.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-133b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-134.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-134b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-135.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-135b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-136.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-136b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-137.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-137b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-138.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-138b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-139.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-139b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-14.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-140.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-140b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-141.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-141b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-142.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-142b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-143.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-143b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-144.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-145a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-145b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-146a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-146b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-147a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-147b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-148.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-149.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-149b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-14b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-14c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-14d.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-14e.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-15.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-150.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-151.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-152.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-153.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-154.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-155.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-155a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-155b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-155c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-155d.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-156.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-156b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-156c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-157.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-158.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-159.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-15b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-15c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-16.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-160.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-161.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-162.xml-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-163.xml-disabled-contains-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-164.xml-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-165.xml-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-166.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-166a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-167.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-167a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-168.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-168a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-169.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-169a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-17.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-170.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-170a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-170b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-170c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-170d.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-171.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-172a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-172b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-173a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-173b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-174a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-174b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-175a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-175b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-175c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-176.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-177a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-177b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-178.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-179.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-179a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-18.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-180.xml-disabled-because-we-want-to-allow-for-expansion": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-180a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-181.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-182.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-183.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-184a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-184b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-184c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-184d.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-184e.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-184f.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-18a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-18b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-18c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-19.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-19a.xml-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-19b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-2.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-20.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-21.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-21b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-21c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-22.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-23.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-24.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-25.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-27.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-27a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-27b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-28.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-28b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-28c.pl-draft": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-29.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-29b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-3.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-30.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-31.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-32.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-33.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-34.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-35.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-36.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-37.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-38.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-39.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-39a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-39b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-39c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-3a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-4.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-40.xml-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-41.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-41a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-42.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-42a.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-43.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-43b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-44.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-44b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-44c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-44d.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-45.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-45b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-45c.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-46.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-46b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-47.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-48.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-49.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-5.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-50.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-51.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-52.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-53.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-54.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-55.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-56.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-57.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-57b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-58.xml-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-59.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-6.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-60.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-61.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-62.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-63.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-64.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-65.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-66.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-66b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-67.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-68.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-69.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-7.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-70.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-72.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-72b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-73.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-73b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-74.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-74b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-75.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-75b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-76.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-76b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-77.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-77b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-78.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-78b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-79.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-7b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-7c.xml-disabled-due-to-limitations-in-the-build-system": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-7d.xml-disabled-due-to-limitations-in-the-build-system": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-8.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-80.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-81.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-81b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-82.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-82b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-83.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-84.xml-disabled-contains-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-84b.xml-disabled-contains-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-85.xml-disabled-contains-removed": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-86.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-87.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-87b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-88.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-88b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-89.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-9.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-90.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-90b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-91.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-92.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-93.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-94.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-94b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-95.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-96.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-96b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-97.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-97b.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-98.xml": [
- [
- {}
- ]
- ],
- "css/selectors/css3-modsel-98b.xml": [
+ "css/selectors/focus-within-001-ref.html": [
[
{}
]
],
- "css/selectors/css3-modsel-99.xml": [
+ "css/selectors/focus-within-006-ref.html": [
[
{}
]
],
- "css/selectors/css3-modsel-99b.xml": [
+ "css/selectors/focus-within-007-ref.html": [
[
{}
]
],
- "css/selectors/css3-modsel-d1.xml": [
+ "css/selectors/focus-within-shadow-001-ref.html": [
[
{}
]
],
- "css/selectors/css3-modsel-d1b.xml": [
+ "css/selectors/i18n/META.yml": [
[
{}
]
],
- "css/selectors/css3-modsel-d2.xml": [
+ "css/selectors/i18n/README": [
[
{}
]
],
- "css/selectors/css3-modsel-d3.xml": [
+ "css/selectors/invalidation/sheet-going-away-002-ref.html": [
[
{}
]
],
- "css/selectors/css3-modsel-d4.xml": [
+ "css/selectors/of-type-selectors-ref.xhtml": [
[
{}
]
],
- "css/selectors/css3-modsel-d5.xml-removed": [
+ "css/selectors/old-tests/css3-modsel-184-ref.xht": [
[
{}
]
],
- "css/selectors/css3-modsel-d5a.xml-removed": [
+ "css/selectors/old-tests/css3-modsel-83-ref.xml": [
[
{}
]
],
- "css/selectors/css3-modsel-d5b.xml-removed": [
+ "css/selectors/old-tests/reference/bq-u-u-u-green.xht": [
[
{}
]
],
- "css/selectors/css3-modsel-d5c.xml-removed": [
+ "css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht": [
[
{}
]
],
- "css/selectors/css3-modsel-d5d.xml-removed": [
+ "css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht": [
[
{}
]
],
- "css/selectors/css3-modsel-d5e.xml-removed": [
+ "css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht": [
[
{}
]
],
- "css/selectors/focus-within-001-ref.html": [
+ "css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht": [
[
{}
]
],
- "css/selectors/focus-within-006-ref.html": [
+ "css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht": [
[
{}
]
],
- "css/selectors/focus-within-007-ref.html": [
+ "css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht": [
[
{}
]
],
- "css/selectors/focus-within-shadow-001-ref.html": [
+ "css/selectors/old-tests/reference/seven-green-divs.xht": [
[
{}
]
],
- "css/selectors/generate.pl": [
+ "css/selectors/old-tests/reference/this-address-p-p-p-lime-background.xht": [
[
{}
]
],
- "css/selectors/htaccess": [
+ "css/selectors/old-tests/reference/this-line-green-background.xht": [
[
{}
]
],
- "css/selectors/html-full.css": [
+ "css/selectors/old-tests/reference/this-line-green-color.xht": [
[
{}
]
],
- "css/selectors/html-shell.css": [
+ "css/selectors/old-tests/reference/this-line-lime-background-offset.xht": [
[
{}
]
],
- "css/selectors/i18n/META.yml": [
+ "css/selectors/old-tests/reference/this-line-lime-background.xht": [
[
{}
]
],
- "css/selectors/i18n/README": [
+ "css/selectors/old-tests/reference/this-test-has-passed-desc.xht": [
[
{}
]
],
- "css/selectors/invalidation/sheet-going-away-002-ref.html": [
+ "css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht": [
[
{}
]
],
- "css/selectors/of-type-selectors-ref.xhtml": [
+ "css/selectors/old-tests/reference/three-paragraph-lime-characters.xht": [
[
{}
]
@@ -269835,46 +272166,6 @@
{}
]
],
- "css/selectors/tng.css": [
- [
- {}
- ]
- ],
- "css/selectors/utils/generators.pm": [
- [
- {}
- ]
- ],
- "css/selectors/utils/helpers.pm": [
- [
- {}
- ]
- ],
- "css/selectors/utils/parser.pm": [
- [
- {}
- ]
- ],
- "css/selectors/xhtml-full.css": [
- [
- {}
- ]
- ],
- "css/selectors/xhtml-shell.css": [
- [
- {}
- ]
- ],
- "css/selectors/xml-full.css": [
- [
- {}
- ]
- ],
- "css/selectors/xml-shell.css": [
- [
- {}
- ]
- ],
"css/support/1x1-green.png": [
[
{}
@@ -269980,6 +272271,11 @@
{}
]
],
+ "css/support/parsing-testcommon.js": [
+ [
+ {}
+ ]
+ ],
"css/support/pattern-grg-rgr-grg.png": [
[
{}
@@ -274880,6 +277176,11 @@
{}
]
],
+ "docs/_writing-tests/h2tests.md": [
+ [
+ {}
+ ]
+ ],
"docs/_writing-tests/idlharness.md": [
[
{}
@@ -276645,6 +278946,16 @@
{}
]
],
+ "encoding/streams/resources/readable-stream-from-array.js": [
+ [
+ {}
+ ]
+ ],
+ "encoding/streams/resources/readable-stream-to-array.js": [
+ [
+ {}
+ ]
+ ],
"encrypted-media/META.yml": [
[
{}
@@ -277170,12 +279481,7 @@
{}
]
],
- "feature-policy/autoplay-allowed-by-feature-policy.https.sub.html.headers": [
- [
- {}
- ]
- ],
- "feature-policy/autoplay-disabled-by-feature-policy.https.sub.html.headers": [
+ "feature-policy/experimental-features/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers": [
[
{}
]
@@ -277345,6 +279651,61 @@
{}
]
],
+ "feature-policy/reporting/camera-reporting.https.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/document-write-reporting.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/fullscreen-reporting.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/geolocation-reporting.https.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/image.jpg": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/microphone-reporting.https.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/midi-reporting.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/payment-reporting.https.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/sync-xhr-reporting.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/unsized-media-reporting.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "feature-policy/reporting/usb-reporting.https.html.headers": [
+ [
+ {}
+ ]
+ ],
"feature-policy/resources/autoplay.js": [
[
{}
@@ -279060,6 +281421,26 @@
{}
]
],
+ "hr-time/resources/unload-a.html": [
+ [
+ {}
+ ]
+ ],
+ "hr-time/resources/unload-b.html": [
+ [
+ {}
+ ]
+ ],
+ "hr-time/resources/unload-c.html": [
+ [
+ {}
+ ]
+ ],
+ "hr-time/resources/unload.js": [
+ [
+ {}
+ ]
+ ],
"html-longdesc/META.yml": [
[
{}
@@ -285370,16 +287751,6 @@
{}
]
],
- "html/editing/focus/document-level-focus-apis/test.html": [
- [
- {}
- ]
- ],
- "html/editing/focus/processing-model/support/preventScroll-helper.html": [
- [
- {}
- ]
- ],
"html/editing/the-hidden-attribute/hidden-1-ref.html": [
[
{}
@@ -285590,6 +287961,16 @@
{}
]
],
+ "html/interaction/focus/document-level-focus-apis/test.html": [
+ [
+ {}
+ ]
+ ],
+ "html/interaction/focus/processing-model/support/preventScroll-helper.html": [
+ [
+ {}
+ ]
+ ],
"html/obsolete/META.yml": [
[
{}
@@ -285745,52 +288126,97 @@
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/META.yml": [
+ [
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-div-display-contents.html": [
+ [
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-foo-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order-ref.html": [
[
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-shadow-dom.html": [
[
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-div-display-contents.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez-ref.html": [
[
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-foo-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical-ref.html": [
[
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins-ref.html": [
[
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering-ref.html": [
[
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-shadow-dom.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-dynamic-update.html": [
[
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-ref.html": [
[
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item-ref.html": [
[
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-ref.html": [
+ [
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/resources/fieldset-vertical.css": [
[
{}
]
@@ -285925,6 +288351,11 @@
{}
]
],
+ "html/rendering/the-details-element/details-display-property-is-ignored-ref.html": [
+ [
+ {}
+ ]
+ ],
"html/rendering/the-details-element/single-summary.html": [
[
{}
@@ -286130,6 +288561,16 @@
{}
]
],
+ "html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html.headers": [
+ [
+ {}
+ ]
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html.headers": [
+ [
+ {}
+ ]
+ ],
"html/semantics/embedded-content/media-elements/contains.json": [
[
{}
@@ -287440,6 +289881,11 @@
{}
]
],
+ "html/semantics/interactive-elements/commands/common/accesskey.js": [
+ [
+ {}
+ ]
+ ],
"html/semantics/interactive-elements/commands/contains.json": [
[
{}
@@ -287665,6 +290111,16 @@
{}
]
],
+ "html/semantics/scripting-1/the-script-element/is-module-goal.mjs": [
+ [
+ {}
+ ]
+ ],
+ "html/semantics/scripting-1/the-script-element/is-script-goal.js": [
+ [
+ {}
+ ]
+ ],
"html/semantics/scripting-1/the-script-element/log.py": [
[
{}
@@ -288330,11 +290786,6 @@
{}
]
],
- "html/semantics/scripting-1/the-script-element/resources/slow.py": [
- [
- {}
- ]
- ],
"html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown-child.html": [
[
{}
@@ -288975,16 +291426,6 @@
{}
]
],
- "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-1.html": [
- [
- {}
- ]
- ],
- "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-2.html": [
- [
- {}
- ]
- ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/011-1.html": [
[
{}
@@ -289075,11 +291516,41 @@
{}
]
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/history-frame.html": [
+ [
+ {}
+ ]
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/http-refresh.py": [
+ [
+ {}
+ ]
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/meta-refresh.py": [
+ [
+ {}
+ ]
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/page-with-frame.html": [
+ [
+ {}
+ ]
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/set-document-domain.html": [
[
{}
]
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py": [
+ [
+ {}
+ ]
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/url-frame.html": [
+ [
+ {}
+ ]
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/type-argument-plaintext-subframe.txt": [
[
{}
@@ -289590,6 +292061,11 @@
{}
]
],
+ "infrastructure/reftest/reftest_and_mismatch_1.html": [
+ [
+ {}
+ ]
+ ],
"infrastructure/reftest/reftest_ref_timeout-ref.html": [
[
{}
@@ -290185,6 +292661,11 @@
{}
]
],
+ "interfaces/trusted-types.tentative.idl": [
+ [
+ {}
+ ]
+ ],
"interfaces/uievents.idl": [
[
{}
@@ -290205,6 +292686,11 @@
{}
]
],
+ "interfaces/wai-aria.idl": [
+ [
+ {}
+ ]
+ ],
"interfaces/wake-lock.idl": [
[
{}
@@ -290265,6 +292751,11 @@
{}
]
],
+ "interfaces/webrtc-dscp.idl": [
+ [
+ {}
+ ]
+ ],
"interfaces/webrtc-stats.idl": [
[
{}
@@ -291155,6 +293646,11 @@
{}
]
],
+ "mediacapture-image/resources/imagecapture-helpers.js": [
+ [
+ {}
+ ]
+ ],
"mediacapture-record/META.yml": [
[
{}
@@ -295605,6 +298101,21 @@
{}
]
],
+ "resources/chromium/image_capture-mojom.js.headers": [
+ [
+ {}
+ ]
+ ],
+ "resources/chromium/image_capture.mojom.js": [
+ [
+ {}
+ ]
+ ],
+ "resources/chromium/mock-imagecapture.js": [
+ [
+ {}
+ ]
+ ],
"resources/chromium/mojo_bindings.js": [
[
{}
@@ -295675,6 +298186,16 @@
{}
]
],
+ "resources/chromium/webusb-child-test.js": [
+ [
+ {}
+ ]
+ ],
+ "resources/chromium/webusb-child-test.js.headers": [
+ [
+ {}
+ ]
+ ],
"resources/chromium/webusb-test.js": [
[
{}
@@ -299785,11 +302306,6 @@
{}
]
],
- "service-workers/service-worker/resources/update-top-level-worker.py": [
- [
- {}
- ]
- ],
"service-workers/service-worker/resources/update-worker.py": [
[
{}
@@ -299990,26 +302506,6 @@
{}
]
],
- "storage/resources/storagemanager-persist-worker.js": [
- [
- {}
- ]
- ],
- "storage/resources/storagemanager-persisted-worker.js": [
- [
- {}
- ]
- ],
- "storage/storage-estimate-indexeddb.js": [
- [
- {}
- ]
- ],
- "storage/storage-persisted.js": [
- [
- {}
- ]
- ],
"streams/META.yml": [
[
{}
@@ -301260,6 +303756,11 @@
{}
]
],
+ "tools/ci/tcdownload.py": [
+ [
+ {}
+ ]
+ ],
"tools/ci/tests/test_jobs.py": [
[
{}
@@ -302200,6 +304701,11 @@
{}
]
],
+ "tools/serve/test_functional.py": [
+ [
+ {}
+ ]
+ ],
"tools/serve/test_serve.py": [
[
{}
@@ -307190,6 +309696,11 @@
{}
]
],
+ "tools/wpt/tests/test_run.py": [
+ [
+ {}
+ ]
+ ],
"tools/wpt/tests/test_wpt.py": [
[
{}
@@ -307510,11 +310021,21 @@
{}
]
],
+ "tools/wptrunner/wptrunner/browsers/chrome_webdriver.py": [
+ [
+ {}
+ ]
+ ],
"tools/wptrunner/wptrunner/browsers/edge.py": [
[
{}
]
],
+ "tools/wptrunner/wptrunner/browsers/edge_webdriver.py": [
+ [
+ {}
+ ]
+ ],
"tools/wptrunner/wptrunner/browsers/fennec.py": [
[
{}
@@ -307540,6 +310061,11 @@
{}
]
],
+ "tools/wptrunner/wptrunner/browsers/safari_webdriver.py": [
+ [
+ {}
+ ]
+ ],
"tools/wptrunner/wptrunner/browsers/sauce.py": [
[
{}
@@ -307635,6 +310161,11 @@
{}
]
],
+ "tools/wptrunner/wptrunner/executors/executorwebdriver.py": [
+ [
+ {}
+ ]
+ ],
"tools/wptrunner/wptrunner/executors/executorwebkit.py": [
[
{}
@@ -309005,6 +311536,11 @@
{}
]
],
+ "wasm/jsapi/table/assertions.js": [
+ [
+ {}
+ ]
+ ],
"wasm/jsapi/wasm-constants.js": [
[
{}
@@ -309015,37 +311551,112 @@
{}
]
],
- "wasm/resources/blank.html": [
+ "wasm/resources/load_wasm.js": [
[
{}
]
],
- "wasm/resources/frame.html": [
+ "wasm/serialization/incrementer.wasm": [
[
{}
]
],
- "wasm/resources/incrementer.wasm": [
+ "wasm/serialization/resources/blank.html": [
[
{}
]
],
- "wasm/resources/load_wasm.js": [
+ "wasm/serialization/resources/broadcastchannel-iframe.html": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/broadcastchannel-sharedworker.js": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/broadcastchannel-worker.js": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/create-empty-wasm-module.js": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/echo-iframe.html": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/echo-worker.js": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/incrementer-iframe-domain.sub.html": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/incrementer-iframe.html": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/incrementer-popup.html": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/incrementer-worker-with-channel.js": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/incrementer-worker.js": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/incrementer.wasm": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/nested-iframe-1.html": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/nested-iframe-2.html": [
[
{}
]
],
- "wasm/resources/service-worker.js": [
+ "wasm/serialization/resources/nested-iframe-3.html": [
[
{}
]
],
- "wasm/wasm_serialization_tests.js": [
+ "wasm/serialization/resources/nested-iframe-4-incrementer.html": [
[
{}
]
],
- "wasm/wasm_serialization_worker.js": [
+ "wasm/serialization/resources/serviceworker-failure.js": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/sharedworker-failure.js": [
+ [
+ {}
+ ]
+ ],
+ "wasm/serialization/resources/test-incrementer.js": [
[
{}
]
@@ -309700,11 +312311,26 @@
{}
]
],
+ "webdriver/tests/get_element_attribute/__init__.py": [
+ [
+ {}
+ ]
+ ],
+ "webdriver/tests/get_element_css_value/__init__.py": [
+ [
+ {}
+ ]
+ ],
"webdriver/tests/get_element_property/__init__.py": [
[
{}
]
],
+ "webdriver/tests/get_element_rect/__init__.py": [
+ [
+ {}
+ ]
+ ],
"webdriver/tests/get_element_tag_name/__init__.py": [
[
{}
@@ -309745,6 +312371,11 @@
{}
]
],
+ "webdriver/tests/is_element_enabled/__init__.py": [
+ [
+ {}
+ ]
+ ],
"webdriver/tests/is_element_selected/__init__.py": [
[
{}
@@ -309825,7 +312456,12 @@
{}
]
],
- "webdriver/tests/support/fixtures.py": [
+ "webdriver/tests/support/defaults.py": [
+ [
+ {}
+ ]
+ ],
+ "webdriver/tests/support/helpers.py": [
[
{}
]
@@ -309865,6 +312501,16 @@
{}
]
],
+ "webdriver/tests/take_element_screenshot/__init__.py": [
+ [
+ {}
+ ]
+ ],
+ "webdriver/tests/take_screenshot/__init__.py": [
+ [
+ {}
+ ]
+ ],
"webgl/META.yml": [
[
{}
@@ -309980,6 +312626,11 @@
{}
]
],
+ "webrtc/RTCQuicTransport-helper.js": [
+ [
+ {}
+ ]
+ ],
"webrtc/RTCRtpCapabilities-helper.js": [
[
{}
@@ -310355,6 +313006,11 @@
{}
]
],
+ "webusb/resources/open-in-worker.js": [
+ [
+ {}
+ ]
+ ],
"webusb/resources/usb-allowed-by-feature-policy-worker.js": [
[
{}
@@ -313050,6 +315706,11 @@
{}
]
],
+ "workers/support/imported_script.py": [
+ [
+ {}
+ ]
+ ],
"workers/support/name-as-accidental-global.js": [
[
{}
@@ -314882,12 +317543,6 @@
{}
]
],
- "2dcontext/drawing-text-to-the-canvas/2d.text.draw.baseline.alphabetic.html": [
- [
- "/2dcontext/drawing-text-to-the-canvas/2d.text.draw.baseline.alphabetic.html",
- {}
- ]
- ],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html": [
[
"/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html",
@@ -314966,6 +317621,36 @@
{}
]
],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html": [
+ [
+ "/2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html",
+ {}
+ ]
+ ],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html": [
+ [
+ "/2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html",
+ {}
+ ]
+ ],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html": [
+ [
+ "/2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html",
+ {}
+ ]
+ ],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html": [
+ [
+ "/2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html",
+ {}
+ ]
+ ],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html": [
+ [
+ "/2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html",
+ {}
+ ]
+ ],
"2dcontext/drawing-text-to-the-canvas/2d.text.measure.width.basic.html": [
[
"/2dcontext/drawing-text-to-the-canvas/2d.text.measure.width.basic.html",
@@ -318176,6 +320861,12 @@
{}
]
],
+ "2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html": [
+ [
+ "/2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html",
+ {}
+ ]
+ ],
"2dcontext/text-styles/2d.text.draw.baseline.bottom.html": [
[
"/2dcontext/text-styles/2d.text.draw.baseline.bottom.html",
@@ -322384,6 +325075,12 @@
}
]
],
+ "beacon/beacon-readablestream.window.js": [
+ [
+ "/beacon/beacon-readablestream.window.html",
+ {}
+ ]
+ ],
"beacon/beacon-redirect.window.js": [
[
"/beacon/beacon-redirect.window.html",
@@ -323870,6 +326567,12 @@
{}
]
],
+ "compat/webkit-appearance.html": [
+ [
+ "/compat/webkit-appearance.html",
+ {}
+ ]
+ ],
"compat/webkit-text-fill-color-currentColor.html": [
[
"/compat/webkit-text-fill-color-currentColor.html",
@@ -325374,6 +328077,54 @@
{}
]
],
+ "content-security-policy/script-src-attr-elem/script-src-attr-allowed-src-blocked.html": [
+ [
+ "/content-security-policy/script-src-attr-elem/script-src-attr-allowed-src-blocked.html",
+ {}
+ ]
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-attr-blocked-src-allowed.html": [
+ [
+ "/content-security-policy/script-src-attr-elem/script-src-attr-blocked-src-allowed.html",
+ {}
+ ]
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-elem-allowed-attr-blocked.html": [
+ [
+ "/content-security-policy/script-src-attr-elem/script-src-elem-allowed-attr-blocked.html",
+ {}
+ ]
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-elem-allowed-src-blocked.html": [
+ [
+ "/content-security-policy/script-src-attr-elem/script-src-elem-allowed-src-blocked.html",
+ {}
+ ]
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-elem-blocked-attr-allowed.html": [
+ [
+ "/content-security-policy/script-src-attr-elem/script-src-elem-blocked-attr-allowed.html",
+ {}
+ ]
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-elem-blocked-src-allowed.html": [
+ [
+ "/content-security-policy/script-src-attr-elem/script-src-elem-blocked-src-allowed.html",
+ {}
+ ]
+ ],
+ "content-security-policy/script-src-attr-elem/strict-dynamic-elem-allowed-src-blocked.html": [
+ [
+ "/content-security-policy/script-src-attr-elem/strict-dynamic-elem-allowed-src-blocked.html",
+ {}
+ ]
+ ],
+ "content-security-policy/script-src-attr-elem/strict-dynamic-elem-blocked-src-allowed.sub.html": [
+ [
+ "/content-security-policy/script-src-attr-elem/strict-dynamic-elem-blocked-src-allowed.sub.html",
+ {}
+ ]
+ ],
"content-security-policy/script-src/injected-inline-script-allowed.sub.html": [
[
"/content-security-policy/script-src/injected-inline-script-allowed.sub.html",
@@ -325800,6 +328551,42 @@
{}
]
],
+ "content-security-policy/style-src-attr-elem/style-src-attr-allowed-src-blocked.html": [
+ [
+ "/content-security-policy/style-src-attr-elem/style-src-attr-allowed-src-blocked.html",
+ {}
+ ]
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html": [
+ [
+ "/content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html",
+ {}
+ ]
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html": [
+ [
+ "/content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html",
+ {}
+ ]
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked.html": [
+ [
+ "/content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked.html",
+ {}
+ ]
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-elem-blocked-attr-allowed.html": [
+ [
+ "/content-security-policy/style-src-attr-elem/style-src-elem-blocked-attr-allowed.html",
+ {}
+ ]
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-elem-blocked-src-allowed.html": [
+ [
+ "/content-security-policy/style-src-attr-elem/style-src-elem-blocked-src-allowed.html",
+ {}
+ ]
+ ],
"content-security-policy/style-src/injected-inline-style-allowed.sub.html": [
[
"/content-security-policy/style-src/injected-inline-style-allowed.sub.html",
@@ -326604,12 +329391,66 @@
{}
]
],
+ "cookies/http-state/charset-tests.html": [
+ [
+ "/cookies/http-state/charset-tests.html",
+ {}
+ ]
+ ],
+ "cookies/http-state/chromium-tests.html": [
+ [
+ "/cookies/http-state/chromium-tests.html",
+ {}
+ ]
+ ],
+ "cookies/http-state/comma-tests.html": [
+ [
+ "/cookies/http-state/comma-tests.html",
+ {}
+ ]
+ ],
+ "cookies/http-state/domain-tests.html": [
+ [
+ "/cookies/http-state/domain-tests.html",
+ {}
+ ]
+ ],
"cookies/http-state/general-tests.html": [
[
"/cookies/http-state/general-tests.html",
{}
]
],
+ "cookies/http-state/mozilla-tests.html": [
+ [
+ "/cookies/http-state/mozilla-tests.html",
+ {}
+ ]
+ ],
+ "cookies/http-state/name-tests.html": [
+ [
+ "/cookies/http-state/name-tests.html",
+ {}
+ ]
+ ],
+ "cookies/http-state/ordering-tests.html": [
+ [
+ "/cookies/http-state/ordering-tests.html",
+ {}
+ ]
+ ],
+ "cookies/http-state/path-tests.html": [
+ [
+ "/cookies/http-state/path-tests.html",
+ {}
+ ]
+ ],
+ "cookies/http-state/value-tests.html": [
+ [
+ "/cookies/http-state/value-tests.html",
+ {}
+ ]
+ ],
"cookies/meta-blocked.html": [
[
"/cookies/meta-blocked.html",
@@ -326736,12 +329577,6 @@
{}
]
],
- "cookies/secure/create-cookie-http.html": [
- [
- "/cookies/secure/create-cookie-http.html",
- {}
- ]
- ],
"cookies/secure/set-from-dom.https.sub.html": [
[
"/cookies/secure/set-from-dom.https.sub.html",
@@ -327586,6 +330421,102 @@
{}
]
],
+ "css/css-animations/parsing/animation-delay-invalid.html": [
+ [
+ "/css/css-animations/parsing/animation-delay-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-delay-valid.html": [
+ [
+ "/css/css-animations/parsing/animation-delay-valid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-direction-invalid.html": [
+ [
+ "/css/css-animations/parsing/animation-direction-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-direction-valid.html": [
+ [
+ "/css/css-animations/parsing/animation-direction-valid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-duration-invalid.html": [
+ [
+ "/css/css-animations/parsing/animation-duration-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-duration-valid.html": [
+ [
+ "/css/css-animations/parsing/animation-duration-valid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-fill-mode-invalid.html": [
+ [
+ "/css/css-animations/parsing/animation-fill-mode-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-fill-mode-valid.html": [
+ [
+ "/css/css-animations/parsing/animation-fill-mode-valid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-iteration-count-invalid.html": [
+ [
+ "/css/css-animations/parsing/animation-iteration-count-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-iteration-count-valid.html": [
+ [
+ "/css/css-animations/parsing/animation-iteration-count-valid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-name-invalid.html": [
+ [
+ "/css/css-animations/parsing/animation-name-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-name-valid.html": [
+ [
+ "/css/css-animations/parsing/animation-name-valid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-play-state-invalid.html": [
+ [
+ "/css/css-animations/parsing/animation-play-state-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-play-state-valid.html": [
+ [
+ "/css/css-animations/parsing/animation-play-state-valid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-timing-function-invalid.html": [
+ [
+ "/css/css-animations/parsing/animation-timing-function-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-animations/parsing/animation-timing-function-valid.html": [
+ [
+ "/css/css-animations/parsing/animation-timing-function-valid.html",
+ {}
+ ]
+ ],
"css/css-animations/pending-style-changes-001.html": [
[
"/css/css-animations/pending-style-changes-001.html",
@@ -328182,6 +331113,18 @@
{}
]
],
+ "css/css-display/parsing/display-invalid.html": [
+ [
+ "/css/css-display/parsing/display-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-display/parsing/display-valid.html": [
+ [
+ "/css/css-display/parsing/display-valid.html",
+ {}
+ ]
+ ],
"css/css-env/at-supports.tentative.html": [
[
"/css/css-env/at-supports.tentative.html",
@@ -330422,6 +333365,66 @@
{}
]
],
+ "css/css-grid/parsing/grid-area-invalid.html": [
+ [
+ "/css/css-grid/parsing/grid-area-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-grid/parsing/grid-area-valid.html": [
+ [
+ "/css/css-grid/parsing/grid-area-valid.html",
+ {}
+ ]
+ ],
+ "css/css-grid/parsing/grid-auto-columns-invalid.html": [
+ [
+ "/css/css-grid/parsing/grid-auto-columns-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-grid/parsing/grid-auto-columns-valid.html": [
+ [
+ "/css/css-grid/parsing/grid-auto-columns-valid.html",
+ {}
+ ]
+ ],
+ "css/css-grid/parsing/grid-auto-flow-invalid.html": [
+ [
+ "/css/css-grid/parsing/grid-auto-flow-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-grid/parsing/grid-auto-flow-valid.html": [
+ [
+ "/css/css-grid/parsing/grid-auto-flow-valid.html",
+ {}
+ ]
+ ],
+ "css/css-grid/parsing/grid-auto-rows-invalid.html": [
+ [
+ "/css/css-grid/parsing/grid-auto-rows-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-grid/parsing/grid-auto-rows-valid.html": [
+ [
+ "/css/css-grid/parsing/grid-auto-rows-valid.html",
+ {}
+ ]
+ ],
+ "css/css-grid/parsing/grid-template-areas-invalid.html": [
+ [
+ "/css/css-grid/parsing/grid-template-areas-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-grid/parsing/grid-template-areas-valid.html": [
+ [
+ "/css/css-grid/parsing/grid-template-areas-valid.html",
+ {}
+ ]
+ ],
"css/css-images/gradient/color-stops-parsing.html": [
[
"/css/css-images/gradient/color-stops-parsing.html",
@@ -330842,6 +333845,12 @@
{}
]
],
+ "css/css-position/position-sticky-overflow-hidden.html": [
+ [
+ "/css/css-position/position-sticky-overflow-hidden.html",
+ {}
+ ]
+ ],
"css/css-position/position-sticky-overflow-padding.html": [
[
"/css/css-position/position-sticky-overflow-padding.html",
@@ -333800,6 +336809,54 @@
{}
]
],
+ "css/css-transitions/parsing/transition-delay-invalid.html": [
+ [
+ "/css/css-transitions/parsing/transition-delay-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-transitions/parsing/transition-delay-valid.html": [
+ [
+ "/css/css-transitions/parsing/transition-delay-valid.html",
+ {}
+ ]
+ ],
+ "css/css-transitions/parsing/transition-duration-invalid.html": [
+ [
+ "/css/css-transitions/parsing/transition-duration-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-transitions/parsing/transition-duration-valid.html": [
+ [
+ "/css/css-transitions/parsing/transition-duration-valid.html",
+ {}
+ ]
+ ],
+ "css/css-transitions/parsing/transition-property-invalid.html": [
+ [
+ "/css/css-transitions/parsing/transition-property-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-transitions/parsing/transition-property-valid.html": [
+ [
+ "/css/css-transitions/parsing/transition-property-valid.html",
+ {}
+ ]
+ ],
+ "css/css-transitions/parsing/transition-timing-function-invalid.html": [
+ [
+ "/css/css-transitions/parsing/transition-timing-function-invalid.html",
+ {}
+ ]
+ ],
+ "css/css-transitions/parsing/transition-timing-function-valid.html": [
+ [
+ "/css/css-transitions/parsing/transition-timing-function-valid.html",
+ {}
+ ]
+ ],
"css/css-transitions/properties-value-001.html": [
[
"/css/css-transitions/properties-value-001.html",
@@ -333911,7 +336968,9 @@
"css/css-transitions/transitions-animatable-properties-01.html": [
[
"/css/css-transitions/transitions-animatable-properties-01.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"css/css-transitions/zero-duration-multiple-transition.html": [
@@ -338422,6 +341481,18 @@
{}
]
],
+ "css/selectors/webkit-pseudo-element.html": [
+ [
+ "/css/selectors/webkit-pseudo-element.html",
+ {}
+ ]
+ ],
+ "css/selectors/x-pseudo-element.html": [
+ [
+ "/css/selectors/x-pseudo-element.html",
+ {}
+ ]
+ ],
"custom-elements/CustomElementRegistry.html": [
[
"/custom-elements/CustomElementRegistry.html",
@@ -339154,12 +342225,6 @@
{}
]
],
- "dom/inert/inert-does-not-match-disabled-selector.html": [
- [
- "/dom/inert/inert-does-not-match-disabled-selector.html",
- {}
- ]
- ],
"dom/interface-objects.html": [
[
"/dom/interface-objects.html",
@@ -340893,273 +343958,387 @@
"editing/run/backcolor.html": [
[
"/editing/run/backcolor.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/bold.html": [
[
"/editing/run/bold.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/bold.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/bold.html?2001-3000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/bold.html?3001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/createlink.html": [
[
"/editing/run/createlink.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/delete-list-items-in-table-cell.html": [
[
"/editing/run/delete-list-items-in-table-cell.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/delete.html": [
[
"/editing/run/delete.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/delete.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/delete.html?2001-3000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/delete.html?3001-4000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/delete.html?4001-5000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/delete.html?5001-6000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/delete.html?6001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/fontname.html": [
[
"/editing/run/fontname.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/fontname.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/fontname.html?2001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/fontsize.html": [
[
"/editing/run/fontsize.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/fontsize.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/fontsize.html?2001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/forecolor.html": [
[
"/editing/run/forecolor.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/forecolor.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/forecolor.html?2001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/formatblock.html": [
[
"/editing/run/formatblock.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/formatblock.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/formatblock.html?2001-3000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/formatblock.html?3001-4000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/formatblock.html?4001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/forwarddelete.html": [
[
"/editing/run/forwarddelete.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/forwarddelete.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/forwarddelete.html?2001-3000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/forwarddelete.html?3001-4000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/forwarddelete.html?4001-5000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/forwarddelete.html?5001-6000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/forwarddelete.html?6001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/hilitecolor.html": [
[
"/editing/run/hilitecolor.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/indent.html": [
[
"/editing/run/indent.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/insert-list-items-in-table-cell.html": [
[
"/editing/run/insert-list-items-in-table-cell.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/inserthorizontalrule.html": [
[
"/editing/run/inserthorizontalrule.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/inserthtml.html": [
[
"/editing/run/inserthtml.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/insertimage.html": [
[
"/editing/run/insertimage.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/insertlinebreak.html": [
[
"/editing/run/insertlinebreak.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/insertorderedlist.html": [
[
"/editing/run/insertorderedlist.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/insertparagraph.html": [
[
"/editing/run/insertparagraph.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/insertparagraph.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/insertparagraph.html?2001-3000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/insertparagraph.html?3001-4000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/insertparagraph.html?4001-5000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/insertparagraph.html?5001-6000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/insertparagraph.html?6001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/inserttext.html": [
[
"/editing/run/inserttext.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/inserttext.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/inserttext.html?2001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/insertunorderedlist.html": [
[
"/editing/run/insertunorderedlist.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/italic.html": [
[
"/editing/run/italic.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/italic.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/italic.html?2001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/justifycenter.html": [
@@ -341209,65 +344388,93 @@
"editing/run/justifyfull.html": [
[
"/editing/run/justifyfull.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyfull.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyfull.html?2001-3000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyfull.html?3001-4000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyfull.html?4001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/justifyleft.html": [
[
"/editing/run/justifyleft.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyleft.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyleft.html?2001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/justifyright.html": [
[
"/editing/run/justifyright.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyright.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyright.html?2001-3000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyright.html?3001-4000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/justifyright.html?4001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/misc.html": [
[
"/editing/run/misc.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/multitest.html": [
@@ -341335,67 +344542,93 @@
"editing/run/outdent.html": [
[
"/editing/run/outdent.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/outdent.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/outdent.html?2001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/removeformat.html": [
[
"/editing/run/removeformat.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/strikethrough.html": [
[
"/editing/run/strikethrough.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/strikethrough.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/strikethrough.html?2001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/subscript.html": [
[
"/editing/run/subscript.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/superscript.html": [
[
"/editing/run/superscript.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/underline.html": [
[
"/editing/run/underline.html?1-1000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/underline.html?1001-2000",
- {}
+ {
+ "timeout": "long"
+ }
],
[
"/editing/run/underline.html?2001-last",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"editing/run/unlink.html": [
[
"/editing/run/unlink.html",
- {}
+ {
+ "timeout": "long"
+ }
]
],
"encoding/api-basics.any.js": [
@@ -348826,6 +352059,210 @@
}
]
],
+ "encoding/streams/backpressure.any.js": [
+ [
+ "/encoding/streams/backpressure.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/backpressure.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/backpressure.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/backpressure.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/decode-attributes.any.js": [
+ [
+ "/encoding/streams/decode-attributes.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-attributes.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-attributes.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-attributes.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/decode-bad-chunks.any.js": [
+ [
+ "/encoding/streams/decode-bad-chunks.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-bad-chunks.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-bad-chunks.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-bad-chunks.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/decode-ignore-bom.any.js": [
+ [
+ "/encoding/streams/decode-ignore-bom.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-ignore-bom.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-ignore-bom.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-ignore-bom.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/decode-incomplete-input.any.js": [
+ [
+ "/encoding/streams/decode-incomplete-input.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-incomplete-input.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-incomplete-input.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-incomplete-input.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/decode-non-utf8.any.js": [
+ [
+ "/encoding/streams/decode-non-utf8.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-non-utf8.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-non-utf8.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-non-utf8.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/decode-split-character.any.js": [
+ [
+ "/encoding/streams/decode-split-character.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-split-character.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-split-character.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-split-character.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/decode-utf8.any.js": [
+ [
+ "/encoding/streams/decode-utf8.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-utf8.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-utf8.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/decode-utf8.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/encode-bad-chunks.any.js": [
+ [
+ "/encoding/streams/encode-bad-chunks.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/encode-bad-chunks.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/encode-bad-chunks.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/encode-bad-chunks.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/encode-utf8.any.js": [
+ [
+ "/encoding/streams/encode-utf8.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/encode-utf8.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/encode-utf8.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/encode-utf8.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/readable-writable-properties.any.js": [
+ [
+ "/encoding/streams/readable-writable-properties.any.html",
+ {}
+ ],
+ [
+ "/encoding/streams/readable-writable-properties.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/readable-writable-properties.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/encoding/streams/readable-writable-properties.any.worker.html",
+ {}
+ ]
+ ],
+ "encoding/streams/realms.window.js": [
+ [
+ "/encoding/streams/realms.window.html",
+ {}
+ ]
+ ],
"encoding/textdecoder-byte-order-marks.any.js": [
[
"/encoding/textdecoder-byte-order-marks.any.html",
@@ -350024,49 +353461,21 @@
{}
]
],
- "feature-policy/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
- [
- "/feature-policy/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html",
- {
- "testdriver": true
- }
- ]
- ],
- "feature-policy/autoplay-allowed-by-feature-policy-attribute.https.sub.html": [
- [
- "/feature-policy/autoplay-allowed-by-feature-policy-attribute.https.sub.html",
- {
- "testdriver": true
- }
- ]
- ],
- "feature-policy/autoplay-allowed-by-feature-policy.https.sub.html": [
- [
- "/feature-policy/autoplay-allowed-by-feature-policy.https.sub.html",
- {
- "testdriver": true
- }
- ]
- ],
- "feature-policy/autoplay-default-feature-policy.https.sub.html": [
+ "feature-policy/experimental-features/document-write.tentative.html": [
[
- "/feature-policy/autoplay-default-feature-policy.https.sub.html",
- {
- "testdriver": true
- }
+ "/feature-policy/experimental-features/document-write.tentative.html",
+ {}
]
],
- "feature-policy/autoplay-disabled-by-feature-policy.https.sub.html": [
+ "feature-policy/experimental-features/intrinsicSize-with-responsive-images.tentative.https.sub.html": [
[
- "/feature-policy/autoplay-disabled-by-feature-policy.https.sub.html",
- {
- "testdriver": true
- }
+ "/feature-policy/experimental-features/intrinsicSize-with-responsive-images.tentative.https.sub.html",
+ {}
]
],
- "feature-policy/experimental-features/document-write.tentative.html": [
+ "feature-policy/experimental-features/intrinsicSize-without-unsized-media.tentative.https.sub.html": [
[
- "/feature-policy/experimental-features/document-write.tentative.html",
+ "/feature-policy/experimental-features/intrinsicSize-without-unsized-media.tentative.https.sub.html",
{}
]
],
@@ -350230,6 +353639,66 @@
}
]
],
+ "feature-policy/reporting/camera-reporting.https.html": [
+ [
+ "/feature-policy/reporting/camera-reporting.https.html",
+ {}
+ ]
+ ],
+ "feature-policy/reporting/document-write-reporting.html": [
+ [
+ "/feature-policy/reporting/document-write-reporting.html",
+ {}
+ ]
+ ],
+ "feature-policy/reporting/fullscreen-reporting.html": [
+ [
+ "/feature-policy/reporting/fullscreen-reporting.html",
+ {}
+ ]
+ ],
+ "feature-policy/reporting/geolocation-reporting.https.html": [
+ [
+ "/feature-policy/reporting/geolocation-reporting.https.html",
+ {}
+ ]
+ ],
+ "feature-policy/reporting/microphone-reporting.https.html": [
+ [
+ "/feature-policy/reporting/microphone-reporting.https.html",
+ {}
+ ]
+ ],
+ "feature-policy/reporting/midi-reporting.html": [
+ [
+ "/feature-policy/reporting/midi-reporting.html",
+ {}
+ ]
+ ],
+ "feature-policy/reporting/payment-reporting.https.html": [
+ [
+ "/feature-policy/reporting/payment-reporting.https.html",
+ {}
+ ]
+ ],
+ "feature-policy/reporting/sync-xhr-reporting.html": [
+ [
+ "/feature-policy/reporting/sync-xhr-reporting.html",
+ {}
+ ]
+ ],
+ "feature-policy/reporting/unsized-media-reporting.html": [
+ [
+ "/feature-policy/reporting/unsized-media-reporting.html",
+ {}
+ ]
+ ],
+ "feature-policy/reporting/usb-reporting.https.html": [
+ [
+ "/feature-policy/reporting/usb-reporting.https.html",
+ {}
+ ]
+ ],
"fetch/api/abort/cache.https.html": [
[
"/fetch/api/abort/cache.https.html",
@@ -350300,6 +353769,24 @@
{}
]
],
+ "fetch/api/basic/header-value-null-byte.any.js": [
+ [
+ "/fetch/api/basic/header-value-null-byte.any.html",
+ {}
+ ],
+ [
+ "/fetch/api/basic/header-value-null-byte.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/fetch/api/basic/header-value-null-byte.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/fetch/api/basic/header-value-null-byte.any.worker.html",
+ {}
+ ]
+ ],
"fetch/api/basic/integrity.sub.any.js": [
[
"/fetch/api/basic/integrity.sub.any.html",
@@ -351098,6 +354585,24 @@
{}
]
],
+ "fetch/api/request/request-init-stream.any.js": [
+ [
+ "/fetch/api/request/request-init-stream.any.html",
+ {}
+ ],
+ [
+ "/fetch/api/request/request-init-stream.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/fetch/api/request/request-init-stream.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/fetch/api/request/request-init-stream.any.worker.html",
+ {}
+ ]
+ ],
"fetch/api/request/request-keepalive-quota.html": [
[
"/fetch/api/request/request-keepalive-quota.html?include=fast",
@@ -351194,6 +354699,24 @@
{}
]
],
+ "fetch/api/response/response-from-stream.any.js": [
+ [
+ "/fetch/api/response/response-from-stream.any.html",
+ {}
+ ],
+ [
+ "/fetch/api/response/response-from-stream.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/fetch/api/response/response-from-stream.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/fetch/api/response/response-from-stream.any.worker.html",
+ {}
+ ]
+ ],
"fetch/api/response/response-init-001.html": [
[
"/fetch/api/response/response-init-001.html",
@@ -351622,57 +355145,33 @@
{}
]
],
- "fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html": [
- [
- "/fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html",
- {}
- ]
- ],
- "fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html": [
- [
- "/fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html",
- {}
- ]
- ],
- "fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html": [
- [
- "/fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html",
- {}
- ]
- ],
- "fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html": [
- [
- "/fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html",
- {}
- ]
- ],
- "fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html": [
+ "fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html": [
[
- "/fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html",
+ "/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html",
{}
]
],
- "fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html": [
+ "fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html": [
[
- "/fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html",
+ "/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html",
{}
]
],
- "fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html": [
+ "fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html": [
[
- "/fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html",
+ "/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html",
{}
]
],
- "fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html": [
+ "fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html": [
[
- "/fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html",
+ "/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html",
{}
]
],
- "fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html": [
+ "fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html": [
[
- "/fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html",
+ "/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html",
{}
]
],
@@ -354724,148 +358223,6 @@
{}
]
],
- "html/editing/focus/composed.window.js": [
- [
- "/html/editing/focus/composed.window.html",
- {}
- ]
- ],
- "html/editing/focus/document-level-focus-apis/document-level-apis.html": [
- [
- "/html/editing/focus/document-level-focus-apis/document-level-apis.html",
- {}
- ]
- ],
- "html/editing/focus/focus-01.html": [
- [
- "/html/editing/focus/focus-01.html",
- {
- "testdriver": true
- }
- ]
- ],
- "html/editing/focus/focus-02.html": [
- [
- "/html/editing/focus/focus-02.html",
- {
- "testdriver": true
- }
- ]
- ],
- "html/editing/focus/focus-management/focus-event-targets-simple.html": [
- [
- "/html/editing/focus/focus-management/focus-event-targets-simple.html",
- {}
- ]
- ],
- "html/editing/focus/focus-management/focus-events.html": [
- [
- "/html/editing/focus/focus-management/focus-events.html",
- {}
- ]
- ],
- "html/editing/focus/inert/inert-does-not-match-disabled-selector.html": [
- [
- "/html/editing/focus/inert/inert-does-not-match-disabled-selector.html",
- {}
- ]
- ],
- "html/editing/focus/inert/inert-in-shadow-dom.html": [
- [
- "/html/editing/focus/inert/inert-in-shadow-dom.html",
- {}
- ]
- ],
- "html/editing/focus/inert/inert-inlines.html": [
- [
- "/html/editing/focus/inert/inert-inlines.html",
- {
- "testdriver": true
- }
- ]
- ],
- "html/editing/focus/inert/inert-label-focus.html": [
- [
- "/html/editing/focus/inert/inert-label-focus.html",
- {
- "testdriver": true
- }
- ]
- ],
- "html/editing/focus/inert/inert-node-is-uneditable.html": [
- [
- "/html/editing/focus/inert/inert-node-is-uneditable.html",
- {}
- ]
- ],
- "html/editing/focus/inert/inert-node-is-unfocusable.html": [
- [
- "/html/editing/focus/inert/inert-node-is-unfocusable.html",
- {}
- ]
- ],
- "html/editing/focus/inert/inert-node-is-unselectable.html": [
- [
- "/html/editing/focus/inert/inert-node-is-unselectable.html",
- {}
- ]
- ],
- "html/editing/focus/processing-model/focus-fixup-rule-one-no-dialogs.html": [
- [
- "/html/editing/focus/processing-model/focus-fixup-rule-one-no-dialogs.html",
- {}
- ]
- ],
- "html/editing/focus/processing-model/preventScroll.html": [
- [
- "/html/editing/focus/processing-model/preventScroll.html",
- {}
- ]
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html": [
- [
- "/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html",
- {}
- ]
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html": [
- [
- "/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html",
- {
- "testdriver": true
- }
- ]
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html": [
- [
- "/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html",
- {
- "testdriver": true
- }
- ]
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html": [
- [
- "/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html",
- {
- "testdriver": true
- }
- ]
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html": [
- [
- "/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html",
- {
- "testdriver": true
- }
- ]
- ],
- "html/editing/focus/tabindex-focus-flag.html": [
- [
- "/html/editing/focus/tabindex-focus-flag.html",
- {}
- ]
- ],
"html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.html": [
[
"/html/infrastructure/common-dom-interfaces/collections/domstringlist-interface.html",
@@ -355146,6 +358503,114 @@
{}
]
],
+ "html/interaction/focus/composed.window.js": [
+ [
+ "/html/interaction/focus/composed.window.html",
+ {}
+ ]
+ ],
+ "html/interaction/focus/document-level-focus-apis/document-level-apis.html": [
+ [
+ "/html/interaction/focus/document-level-focus-apis/document-level-apis.html",
+ {}
+ ]
+ ],
+ "html/interaction/focus/focus-01.html": [
+ [
+ "/html/interaction/focus/focus-01.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/interaction/focus/focus-02.html": [
+ [
+ "/html/interaction/focus/focus-02.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/interaction/focus/focus-management/focus-event-targets-simple.html": [
+ [
+ "/html/interaction/focus/focus-management/focus-event-targets-simple.html",
+ {}
+ ]
+ ],
+ "html/interaction/focus/focus-management/focus-events.html": [
+ [
+ "/html/interaction/focus/focus-management/focus-events.html",
+ {}
+ ]
+ ],
+ "html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html": [
+ [
+ "/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html",
+ {}
+ ]
+ ],
+ "html/interaction/focus/processing-model/legend-focusable.html": [
+ [
+ "/html/interaction/focus/processing-model/legend-focusable.html",
+ {}
+ ]
+ ],
+ "html/interaction/focus/processing-model/legend.html": [
+ [
+ "/html/interaction/focus/processing-model/legend.html",
+ {}
+ ]
+ ],
+ "html/interaction/focus/processing-model/preventScroll.html": [
+ [
+ "/html/interaction/focus/processing-model/preventScroll.html",
+ {}
+ ]
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html": [
+ [
+ "/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html",
+ {}
+ ]
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html": [
+ [
+ "/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html": [
+ [
+ "/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html": [
+ [
+ "/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html": [
+ [
+ "/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/interaction/focus/tabindex-focus-flag.html": [
+ [
+ "/html/interaction/focus/tabindex-focus-flag.html",
+ {}
+ ]
+ ],
"html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-all.html": [
[
"/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-all.html",
@@ -355284,81 +358749,111 @@
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-block-formatting-context.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html",
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html",
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html",
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-block-formatting-context.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-display.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-display.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-flexbox.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-flexbox.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-grid.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-multicol.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-grid.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-multicol.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-multicol.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-multicol.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-display.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-display.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-abspos.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-abspos.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-grid-flex-multicol.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-grid-flex-multicol.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-sans-fieldset-display.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-sans-fieldset-display.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html",
{}
]
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/min-inline-size.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html": [
[
- "/html/rendering/non-replaced-elements/the-fieldset-element-0/min-inline-size.html",
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html",
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html",
+ {}
+ ]
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html": [
+ [
+ "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html",
{}
]
],
@@ -355786,6 +359281,46 @@
{}
]
],
+ "html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
+ [
+ "/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute.https.sub.html": [
+ [
+ "/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute.https.sub.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html": [
+ [
+ "/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-default-feature-policy.https.sub.html": [
+ [
+ "/html/semantics/embedded-content/media-elements/autoplay-default-feature-policy.https.sub.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html": [
+ [
+ "/html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
"html/semantics/embedded-content/media-elements/autoplay-with-broken-track.html": [
[
"/html/semantics/embedded-content/media-elements/autoplay-with-broken-track.html",
@@ -361190,6 +364725,12 @@
{}
]
],
+ "html/semantics/scripting-1/the-script-element/goal-parameter.htm": [
+ [
+ "/html/semantics/scripting-1/the-script-element/goal-parameter.htm",
+ {}
+ ]
+ ],
"html/semantics/scripting-1/the-script-element/historical.html": [
[
"/html/semantics/scripting-1/the-script-element/historical.html",
@@ -364336,12 +367877,6 @@
{}
]
],
- "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010.html": [
- [
- "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010.html",
- {}
- ]
- ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/011.html": [
[
"/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/011.html",
@@ -364378,12 +367913,48 @@
{}
]
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.html",
+ {}
+ ]
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.html",
+ {}
+ ]
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.html",
+ {}
+ ]
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.html",
+ {}
+ ]
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.html",
+ {}
+ ]
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window.js": [
[
"/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window.html",
{}
]
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.html",
+ {}
+ ]
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-origin.sub.window.js": [
[
"/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-origin.sub.window.html",
@@ -364468,6 +368039,12 @@
{}
]
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/history.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/history.window.html",
+ {}
+ ]
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js": [
[
"/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.html",
@@ -364480,6 +368057,12 @@
{}
]
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/mutation-observer.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/mutation-observer.window.html",
+ {}
+ ]
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js": [
[
"/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.html",
@@ -364498,6 +368081,18 @@
{}
]
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.html",
+ {}
+ ]
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.html",
+ {}
+ ]
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/reload.window.js": [
[
"/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/reload.window.html",
@@ -364528,6 +368123,12 @@
{}
]
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js": [
+ [
+ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.html",
+ {}
+ ]
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js": [
[
"/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.html",
@@ -365184,6 +368785,52 @@
{}
]
],
+ "inert/inert-does-not-match-disabled-selector.tentative.html": [
+ [
+ "/inert/inert-does-not-match-disabled-selector.tentative.html",
+ {}
+ ]
+ ],
+ "inert/inert-in-shadow-dom.tentative.html": [
+ [
+ "/inert/inert-in-shadow-dom.tentative.html",
+ {}
+ ]
+ ],
+ "inert/inert-inlines.tentative.html": [
+ [
+ "/inert/inert-inlines.tentative.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "inert/inert-label-focus.tentative.html": [
+ [
+ "/inert/inert-label-focus.tentative.html",
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "inert/inert-node-is-uneditable.tentative.html": [
+ [
+ "/inert/inert-node-is-uneditable.tentative.html",
+ {}
+ ]
+ ],
+ "inert/inert-node-is-unfocusable.tentative.html": [
+ [
+ "/inert/inert-node-is-unfocusable.tentative.html",
+ {}
+ ]
+ ],
+ "inert/inert-node-is-unselectable.tentative.html": [
+ [
+ "/inert/inert-node-is-unselectable.tentative.html",
+ {}
+ ]
+ ],
"infrastructure/assumptions/html-elements.html": [
[
"/infrastructure/assumptions/html-elements.html",
@@ -365332,9 +368979,9 @@
}
]
],
- "input-device-capabilities/interfaces.html": [
+ "input-device-capabilities/idlharness.window.js": [
[
- "/input-device-capabilities/interfaces.html",
+ "/input-device-capabilities/idlharness.window.html",
{}
]
],
@@ -366384,12 +370031,120 @@
{}
]
],
+ "mediacapture-image/ImageCapture-MediaTrackSupportedConstraints.html": [
+ [
+ "/mediacapture-image/ImageCapture-MediaTrackSupportedConstraints.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/ImageCapture-creation.https.html": [
+ [
+ "/mediacapture-image/ImageCapture-creation.https.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/ImageCapture-grabFrame.html": [
+ [
+ "/mediacapture-image/ImageCapture-grabFrame.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/MediaStreamTrack-applyConstraints-fast.html": [
+ [
+ "/mediacapture-image/MediaStreamTrack-applyConstraints-fast.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.html": [
+ [
+ "/mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/MediaStreamTrack-applyConstraints-reject.html": [
+ [
+ "/mediacapture-image/MediaStreamTrack-applyConstraints-reject.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/MediaStreamTrack-applyConstraints.html": [
+ [
+ "/mediacapture-image/MediaStreamTrack-applyConstraints.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/MediaStreamTrack-getCapabilities-fast.html": [
+ [
+ "/mediacapture-image/MediaStreamTrack-getCapabilities-fast.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/MediaStreamTrack-getCapabilities.html": [
+ [
+ "/mediacapture-image/MediaStreamTrack-getCapabilities.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/MediaStreamTrack-getConstraints-fast.html": [
+ [
+ "/mediacapture-image/MediaStreamTrack-getConstraints-fast.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/MediaStreamTrack-getSettings-fast.html": [
+ [
+ "/mediacapture-image/MediaStreamTrack-getSettings-fast.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/MediaStreamTrack-getSettings.html": [
+ [
+ "/mediacapture-image/MediaStreamTrack-getSettings.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/detached-HTMLCanvasElement.html": [
+ [
+ "/mediacapture-image/detached-HTMLCanvasElement.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/getPhotoCapabilities.html": [
+ [
+ "/mediacapture-image/getPhotoCapabilities.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/getPhotoSettings.html": [
+ [
+ "/mediacapture-image/getPhotoSettings.html",
+ {}
+ ]
+ ],
"mediacapture-image/idlharness.window.js": [
[
"/mediacapture-image/idlharness.window.html",
{}
]
],
+ "mediacapture-image/setOptions-reject.html": [
+ [
+ "/mediacapture-image/setOptions-reject.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/takePhoto-with-PhotoSettings.html": [
+ [
+ "/mediacapture-image/takePhoto-with-PhotoSettings.html",
+ {}
+ ]
+ ],
+ "mediacapture-image/takePhoto.html": [
+ [
+ "/mediacapture-image/takePhoto.html",
+ {}
+ ]
+ ],
"mediacapture-record/BlobEvent-constructor.html": [
[
"/mediacapture-record/BlobEvent-constructor.html",
@@ -378270,6 +382025,18 @@
{}
]
],
+ "payment-request/MerchantValidationEvent/constructor.http.html": [
+ [
+ "/payment-request/MerchantValidationEvent/constructor.http.html",
+ {}
+ ]
+ ],
+ "payment-request/MerchantValidationEvent/constructor.https.html": [
+ [
+ "/payment-request/MerchantValidationEvent/constructor.https.html",
+ {}
+ ]
+ ],
"payment-request/PaymentItem/type_member.https.html": [
[
"/payment-request/PaymentItem/type_member.https.html",
@@ -378378,6 +382145,12 @@
{}
]
],
+ "payment-request/onmerchantvalidation-attribute.https.html": [
+ [
+ "/payment-request/onmerchantvalidation-attribute.https.html",
+ {}
+ ]
+ ],
"payment-request/onpaymentmenthodchange-attribute.https.html": [
[
"/payment-request/onpaymentmenthodchange-attribute.https.html",
@@ -379118,9 +382891,15 @@
{}
]
],
- "quirks/unitless-length/excluded-properties.html": [
+ "quirks/unitless-length/excluded-properties-001.html": [
+ [
+ "/quirks/unitless-length/excluded-properties-001.html",
+ {}
+ ]
+ ],
+ "quirks/unitless-length/excluded-properties-002.html": [
[
- "/quirks/unitless-length/excluded-properties.html",
+ "/quirks/unitless-length/excluded-properties-002.html",
{}
]
],
@@ -390048,12 +393827,6 @@
{}
]
],
- "service-workers/service-worker/update-top-level.https.html": [
- [
- "/service-workers/service-worker/update-top-level.https.html",
- {}
- ]
- ],
"service-workers/service-worker/update.https.html": [
[
"/service-workers/service-worker/update.https.html",
@@ -390718,21 +394491,23 @@
{}
]
],
- "storage/estimate-indexeddb-worker.https.html": [
+ "storage/estimate-indexeddb.https.any.js": [
[
- "/storage/estimate-indexeddb-worker.https.html",
+ "/storage/estimate-indexeddb.https.any.html",
{}
- ]
- ],
- "storage/estimate-indexeddb.https.html": [
+ ],
[
- "/storage/estimate-indexeddb.https.html",
+ "/storage/estimate-indexeddb.https.any.worker.html",
{}
]
],
- "storage/estimate-parallel.https.html": [
+ "storage/estimate-parallel.https.any.js": [
[
- "/storage/estimate-parallel.https.html",
+ "/storage/estimate-parallel.https.any.html",
+ {}
+ ],
+ [
+ "/storage/estimate-parallel.https.any.worker.html",
{}
]
],
@@ -390746,51 +394521,61 @@
{}
]
],
- "storage/opaque-origin.https.html": [
+ "storage/opaque-origin.https.window.js": [
[
- "/storage/opaque-origin.https.html",
+ "/storage/opaque-origin.https.window.html",
{}
]
],
- "storage/persisted-worker.https.html": [
+ "storage/permission-query.https.any.js": [
[
- "/storage/persisted-worker.https.html",
+ "/storage/permission-query.https.any.html",
{}
- ]
- ],
- "storage/persisted.https.html": [
+ ],
[
- "/storage/persisted.https.html",
+ "/storage/permission-query.https.any.worker.html",
{}
]
],
- "storage/storagemanager-estimate.https.html": [
+ "storage/persisted.https.any.js": [
+ [
+ "/storage/persisted.https.any.html",
+ {}
+ ],
[
- "/storage/storagemanager-estimate.https.html",
+ "/storage/persisted.https.any.worker.html",
{}
]
],
- "storage/storagemanager-persist-worker.https.html": [
+ "storage/storagemanager-estimate.https.any.js": [
+ [
+ "/storage/storagemanager-estimate.https.any.html",
+ {}
+ ],
[
- "/storage/storagemanager-persist-worker.https.html",
+ "/storage/storagemanager-estimate.https.any.worker.html",
{}
]
],
- "storage/storagemanager-persist.https.html": [
+ "storage/storagemanager-persist.https.window.js": [
[
- "/storage/storagemanager-persist.https.html",
+ "/storage/storagemanager-persist.https.window.html",
{}
]
],
- "storage/storagemanager-persisted-worker.https.html": [
+ "storage/storagemanager-persist.https.worker.js": [
[
- "/storage/storagemanager-persisted-worker.https.html",
+ "/storage/storagemanager-persist.https.worker.html",
{}
]
],
- "storage/storagemanager-persisted.https.html": [
+ "storage/storagemanager-persisted.https.any.js": [
[
- "/storage/storagemanager-persisted.https.html",
+ "/storage/storagemanager-persisted.https.any.html",
+ {}
+ ],
+ [
+ "/storage/storagemanager-persisted.https.any.worker.html",
{}
]
],
@@ -392720,6 +396505,12 @@
{}
]
],
+ "trusted-types/Element-setAttribute.tentative.html": [
+ [
+ "/trusted-types/Element-setAttribute.tentative.html",
+ {}
+ ]
+ ],
"trusted-types/HTMLElement-generic.tentative.html": [
[
"/trusted-types/HTMLElement-generic.tentative.html",
@@ -392750,21 +396541,45 @@
{}
]
],
- "trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html": [
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html": [
[
- "/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html",
+ "/trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html",
{}
]
],
- "trusted-types/Window-open.tentative.html": [
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html": [
[
- "/trusted-types/Window-open.tentative.html",
+ "/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html",
+ {}
+ ]
+ ],
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html": [
+ [
+ "/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html",
+ {}
+ ]
+ ],
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-exposedTests.tentative.html": [
+ [
+ "/trusted-types/TrustedTypePolicyFactory-createPolicy-exposedTests.tentative.html",
+ {}
+ ]
+ ],
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html": [
+ [
+ "/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html",
+ {}
+ ]
+ ],
+ "trusted-types/Window-TrustedTypes.tentative.html": [
+ [
+ "/trusted-types/Window-TrustedTypes.tentative.html",
{}
]
],
- "trusted-types/Window-trustedTypes.tentative.html": [
+ "trusted-types/Window-open.tentative.html": [
[
- "/trusted-types/Window-trustedTypes.tentative.html",
+ "/trusted-types/Window-open.tentative.html",
{}
]
],
@@ -392792,6 +396607,12 @@
{}
]
],
+ "trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html": [
+ [
+ "/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html",
+ {}
+ ]
+ ],
"trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [
[
"/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html",
@@ -392828,6 +396649,12 @@
{}
]
],
+ "trusted-types/idlharness.window.js": [
+ [
+ "/trusted-types/idlharness.window.html",
+ {}
+ ]
+ ],
"uievents/constructors/inputevent-constructor.html": [
[
"/uievents/constructors/inputevent-constructor.html",
@@ -393448,6 +397275,12 @@
{}
]
],
+ "wai-aria/idlharness.window.js": [
+ [
+ "/wai-aria/idlharness.window.html",
+ {}
+ ]
+ ],
"wake-lock/idlharness.https.window.js": [
[
"/wake-lock/idlharness.https.window.html",
@@ -393554,6 +397387,22 @@
{}
]
],
+ "wasm/jsapi/constructor/compile.any.js": [
+ [
+ "/wasm/jsapi/constructor/compile.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/constructor/compile.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/constructor/compile.any.worker.html",
+ {}
+ ]
+ ],
"wasm/jsapi/constructor/instantiate-bad-imports.any.js": [
[
"/wasm/jsapi/constructor/instantiate-bad-imports.any.html",
@@ -393570,6 +397419,102 @@
{}
]
],
+ "wasm/jsapi/constructor/instantiate.any.js": [
+ [
+ "/wasm/jsapi/constructor/instantiate.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/constructor/instantiate.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/constructor/instantiate.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/jsapi/constructor/validate.any.js": [
+ [
+ "/wasm/jsapi/constructor/validate.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/constructor/validate.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/constructor/validate.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/jsapi/global/constructor.any.js": [
+ [
+ "/wasm/jsapi/global/constructor.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/global/constructor.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/global/constructor.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/jsapi/global/toString.any.js": [
+ [
+ "/wasm/jsapi/global/toString.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/global/toString.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/global/toString.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/jsapi/global/value-set.any.js": [
+ [
+ "/wasm/jsapi/global/value-set.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/global/value-set.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/global/value-set.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/jsapi/global/valueOf.any.js": [
+ [
+ "/wasm/jsapi/global/valueOf.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/global/valueOf.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/global/valueOf.any.worker.html",
+ {}
+ ]
+ ],
"wasm/jsapi/instance/constructor-bad-imports.any.js": [
[
"/wasm/jsapi/instance/constructor-bad-imports.any.html",
@@ -393602,6 +397547,38 @@
{}
]
],
+ "wasm/jsapi/instance/exports.any.js": [
+ [
+ "/wasm/jsapi/instance/exports.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/instance/exports.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/instance/exports.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/jsapi/instance/toString.any.js": [
+ [
+ "/wasm/jsapi/instance/toString.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/instance/toString.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/instance/toString.any.worker.html",
+ {}
+ ]
+ ],
"wasm/jsapi/interface.any.js": [
[
"/wasm/jsapi/interface.any.html",
@@ -393618,6 +397595,22 @@
{}
]
],
+ "wasm/jsapi/memory/buffer.any.js": [
+ [
+ "/wasm/jsapi/memory/buffer.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/memory/buffer.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/memory/buffer.any.worker.html",
+ {}
+ ]
+ ],
"wasm/jsapi/memory/constructor.any.js": [
[
"/wasm/jsapi/memory/constructor.any.html",
@@ -393634,6 +397627,38 @@
{}
]
],
+ "wasm/jsapi/memory/grow.any.js": [
+ [
+ "/wasm/jsapi/memory/grow.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/memory/grow.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/memory/grow.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/jsapi/memory/toString.any.js": [
+ [
+ "/wasm/jsapi/memory/toString.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/memory/toString.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/memory/toString.any.worker.html",
+ {}
+ ]
+ ],
"wasm/jsapi/module/constructor.any.js": [
[
"/wasm/jsapi/module/constructor.any.html",
@@ -393698,6 +397723,22 @@
{}
]
],
+ "wasm/jsapi/module/toString.any.js": [
+ [
+ "/wasm/jsapi/module/toString.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/module/toString.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/module/toString.any.worker.html",
+ {}
+ ]
+ ],
"wasm/jsapi/table/constructor.any.js": [
[
"/wasm/jsapi/table/constructor.any.html",
@@ -393714,21 +397755,163 @@
{}
]
],
- "wasm/wasm_local_iframe_test.html": [
+ "wasm/jsapi/table/get-set.any.js": [
+ [
+ "/wasm/jsapi/table/get-set.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/table/get-set.any.js",
+ {
+ "jsshell": true
+ }
+ ],
[
- "/wasm/wasm_local_iframe_test.html",
+ "/wasm/jsapi/table/get-set.any.worker.html",
{}
]
],
- "wasm/wasm_serialization_tests.html": [
+ "wasm/jsapi/table/grow.any.js": [
+ [
+ "/wasm/jsapi/table/grow.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/table/grow.any.js",
+ {
+ "jsshell": true
+ }
+ ],
[
- "/wasm/wasm_serialization_tests.html",
+ "/wasm/jsapi/table/grow.any.worker.html",
{}
]
],
- "wasm/wasm_service_worker_test.https.html": [
+ "wasm/jsapi/table/length.any.js": [
+ [
+ "/wasm/jsapi/table/length.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/table/length.any.js",
+ {
+ "jsshell": true
+ }
+ ],
[
- "/wasm/wasm_service_worker_test.https.html",
+ "/wasm/jsapi/table/length.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/jsapi/table/toString.any.js": [
+ [
+ "/wasm/jsapi/table/toString.any.html",
+ {}
+ ],
+ [
+ "/wasm/jsapi/table/toString.any.js",
+ {
+ "jsshell": true
+ }
+ ],
+ [
+ "/wasm/jsapi/table/toString.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/broadcastchannel-success-and-failure.html": [
+ [
+ "/wasm/serialization/broadcastchannel-success-and-failure.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/broadcastchannel-success.html": [
+ [
+ "/wasm/serialization/broadcastchannel-success.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/identity-not-preserved.html": [
+ [
+ "/wasm/serialization/identity-not-preserved.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/nested-worker-success.any.js": [
+ [
+ "/wasm/serialization/nested-worker-success.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/wasm/serialization/nested-worker-success.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/no-transferring.html": [
+ [
+ "/wasm/serialization/no-transferring.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/serialization-via-history.html": [
+ [
+ "/wasm/serialization/serialization-via-history.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/serialization-via-idb.any.js": [
+ [
+ "/wasm/serialization/serialization-via-idb.any.html",
+ {}
+ ],
+ [
+ "/wasm/serialization/serialization-via-idb.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/serialization-via-notifications-api.any.js": [
+ [
+ "/wasm/serialization/serialization-via-notifications-api.any.html",
+ {}
+ ],
+ [
+ "/wasm/serialization/serialization-via-notifications-api.any.worker.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/window-domain-success.sub.html": [
+ [
+ "/wasm/serialization/window-domain-success.sub.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/window-messagechannel-success.html": [
+ [
+ "/wasm/serialization/window-messagechannel-success.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/window-serviceworker-failure.https.html": [
+ [
+ "/wasm/serialization/window-serviceworker-failure.https.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/window-sharedworker-failure.html": [
+ [
+ "/wasm/serialization/window-sharedworker-failure.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/window-similar-but-cross-origin-success.sub.html": [
+ [
+ "/wasm/serialization/window-similar-but-cross-origin-success.sub.html",
+ {}
+ ]
+ ],
+ "wasm/serialization/window-simple-success.html": [
+ [
+ "/wasm/serialization/window-simple-success.html",
{}
]
],
@@ -394536,6 +398719,12 @@
{}
]
],
+ "webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html": [
+ [
+ "/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html",
+ {}
+ ]
+ ],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/ctor-audiobuffersource.html": [
[
"/webaudio/the-audio-api/the-audiobuffersourcenode-interface/ctor-audiobuffersource.html",
@@ -395250,6 +399439,12 @@
{}
]
],
+ "webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html": [
+ [
+ "/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html",
+ {}
+ ]
+ ],
"webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html": [
[
"/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html",
@@ -396580,6 +400775,18 @@
{}
]
],
+ "webrtc/RTCQuicStream.https.html": [
+ [
+ "/webrtc/RTCQuicStream.https.html",
+ {}
+ ]
+ ],
+ "webrtc/RTCQuicTransport.https.html": [
+ [
+ "/webrtc/RTCQuicTransport.https.html",
+ {}
+ ]
+ ],
"webrtc/RTCRtpParameters-codecs.html": [
[
"/webrtc/RTCRtpParameters-codecs.html",
@@ -397898,6 +402105,12 @@
{}
]
],
+ "websockets/cookies/006.https.html": [
+ [
+ "/websockets/cookies/006.https.html?wss",
+ {}
+ ]
+ ],
"websockets/cookies/007.html": [
[
"/websockets/cookies/007.html",
@@ -399166,6 +403379,26 @@
{}
]
],
+ "webusb/usbAlternateInterface.https.any.js": [
+ [
+ "/webusb/usbAlternateInterface.https.any.html",
+ {}
+ ],
+ [
+ "/webusb/usbAlternateInterface.https.any.worker.html",
+ {}
+ ]
+ ],
+ "webusb/usbConfiguration.https.any.js": [
+ [
+ "/webusb/usbConfiguration.https.any.html",
+ {}
+ ],
+ [
+ "/webusb/usbConfiguration.https.any.worker.html",
+ {}
+ ]
+ ],
"webusb/usbConnectionEvent.https.any.js": [
[
"/webusb/usbConnectionEvent.https.any.html",
@@ -399182,6 +403415,12 @@
{}
]
],
+ "webusb/usbDevice-worker.https.html": [
+ [
+ "/webusb/usbDevice-worker.https.html",
+ {}
+ ]
+ ],
"webusb/usbDevice.https.any.js": [
[
"/webusb/usbDevice.https.any.html",
@@ -399192,6 +403431,16 @@
{}
]
],
+ "webusb/usbEndpoint.https.any.js": [
+ [
+ "/webusb/usbEndpoint.https.any.html",
+ {}
+ ],
+ [
+ "/webusb/usbEndpoint.https.any.worker.html",
+ {}
+ ]
+ ],
"webusb/usbInTransferResult.https.any.js": [
[
"/webusb/usbInTransferResult.https.any.html",
@@ -399202,6 +403451,16 @@
{}
]
],
+ "webusb/usbInterface.https.any.js": [
+ [
+ "/webusb/usbInterface.https.any.html",
+ {}
+ ],
+ [
+ "/webusb/usbInterface.https.any.worker.html",
+ {}
+ ]
+ ],
"webusb/usbIsochronousInTransferPacket.https.any.js": [
[
"/webusb/usbIsochronousInTransferPacket.https.any.html",
@@ -400380,6 +404639,20 @@
{}
]
],
+ "workers/importscripts_mime.tentative.any.js": [
+ [
+ "/workers/importscripts_mime.tentative.any.serviceworker.html",
+ {}
+ ],
+ [
+ "/workers/importscripts_mime.tentative.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/workers/importscripts_mime.tentative.any.worker.html",
+ {}
+ ]
+ ],
"workers/interfaces.worker.js": [
[
"/workers/interfaces.worker.html",
@@ -401124,6 +405397,36 @@
{}
]
],
+ "worklets/audio-worklet-credentials.https.html": [
+ [
+ "/worklets/audio-worklet-credentials.https.html",
+ {}
+ ]
+ ],
+ "worklets/audio-worklet-csp.https.html": [
+ [
+ "/worklets/audio-worklet-csp.https.html",
+ {}
+ ]
+ ],
+ "worklets/audio-worklet-import.https.html": [
+ [
+ "/worklets/audio-worklet-import.https.html",
+ {}
+ ]
+ ],
+ "worklets/audio-worklet-referrer.https.html": [
+ [
+ "/worklets/audio-worklet-referrer.https.html",
+ {}
+ ]
+ ],
+ "worklets/audio-worklet-service-worker-interception.https.html": [
+ [
+ "/worklets/audio-worklet-service-worker-interception.https.html",
+ {}
+ ]
+ ],
"worklets/idlharness.worker.js": [
[
"/worklets/idlharness.worker.html",
@@ -401902,6 +406205,12 @@
{}
]
],
+ "xhr/open-after-stop.window.js": [
+ [
+ "/xhr/open-after-stop.window.html",
+ {}
+ ]
+ ],
"xhr/open-during-abort-event.htm": [
[
"/xhr/open-during-abort-event.htm",
@@ -402464,6 +406773,20 @@
{}
]
],
+ "xhr/send-data-readablestream.any.js": [
+ [
+ "/xhr/send-data-readablestream.any.html",
+ {}
+ ],
+ [
+ "/xhr/send-data-readablestream.any.sharedworker.html",
+ {}
+ ],
+ [
+ "/xhr/send-data-readablestream.any.worker.html",
+ {}
+ ]
+ ],
"xhr/send-data-unexpected-tostring.htm": [
[
"/xhr/send-data-unexpected-tostring.htm",
@@ -422166,6 +426489,1026 @@
{}
]
],
+ "css/selectors/old-tests/css3-modsel-1.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-1.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-10.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-10.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-100.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-100.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-100b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-100b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-102b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-102b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-104.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-104.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-104b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-104b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-107.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-107.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-107b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-107b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-11.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-11.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-111.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-111.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-111b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-111b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-113.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-113.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-113b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-113b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-114.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-114.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-114b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-114b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-118.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-118.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-119.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-119.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-120.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-120.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-121.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-121.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-123.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-123.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-123b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-123b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-124.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-124.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-124b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-124b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-13.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-13.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-130.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-130.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-130b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-130b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-131.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-131.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-131b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-131b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-132.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-132.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-132b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-132b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-133.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-133.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-133b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-133b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-137.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-137.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-137b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-137b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-138.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-138.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-138b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-138b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-139.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-139.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-139b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-139b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-14.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-14.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-140.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-140.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-140b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-140b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-144.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-144.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-145a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-145a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-145b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-145b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-146a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-146a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-146b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-146b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-147a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-147a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-147b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-147b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-14c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-14c.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-14d.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-14d.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-14e.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-14e.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-15.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-15.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-150.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-150.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-153.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-153.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-166.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-166.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-166a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-166a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-167.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-167.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-167a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-167a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-171.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-171.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-174a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-174a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-174b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-174b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-179a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-179a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-180a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-180a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-181.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-181.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-182.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-182.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-183.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-183.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-2.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-2.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-21b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-21b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-21c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-21c.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-22.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-22.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-23.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-23.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-24.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-24.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-25.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-25.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-27.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-27.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-27a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-27a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-27b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-27b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-28.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-28.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-28b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-28b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-29.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-29.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-29b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-29b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-3.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-3.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-30.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-30.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-31.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-31.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-32.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-32.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-33.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-33.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-34.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-34.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-35.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-35.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-36.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-36.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-37.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-37.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-38.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-38.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-39.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-39.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-39a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-39a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-39b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-39b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-39c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-39c.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-3a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-3a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-4.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-4.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-41.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-41.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-41a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-41a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-42.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-42.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-42a.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-42a.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-43.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-43.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-43b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-43b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-44.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-44.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-44b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-44b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-44c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-44c.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-44d.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-44d.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-45.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-45.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-45b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-45b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-45c.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-45c.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-46.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-46.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-46b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-46b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-47.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-47.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-5.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-5.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-50.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-50.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-51.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-51.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-52.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-52.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-53.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-53.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-57.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-57.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-57b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-57b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-6.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-6.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-66b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-66b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-67.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-67.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-68.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-68.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-69.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-69.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-7.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-7.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-70.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-70.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-72.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-72.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-72b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-72b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-73.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-73.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-73b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-73b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-74.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-74.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-74b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-74b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-75.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-75.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-75b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-75b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-76.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-76.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-76b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-76b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-77.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-77.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-77b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-77b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-78.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-78.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-78b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-78b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-79.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-79.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-8.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-8.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-80.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-80.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-81.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-81.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-81b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-81b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-82.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-82.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-82b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-82b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-86.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-86.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-88.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-88.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-88b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-88b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-89.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-89.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-9.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-9.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-91.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-91.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-92.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-92.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-93.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-93.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-94.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-94.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-94b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-94b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-95.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-95.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-96.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-96.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-96b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-96b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-97.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-97.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-97b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-97b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-98.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-98.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-98b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-98b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-d1.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-d1.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-d1b.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-d1b.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-d2.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-d2.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-d3.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-d3.xml",
+ {}
+ ]
+ ],
+ "css/selectors/old-tests/css3-modsel-d4.xml": [
+ [
+ "/css/selectors/old-tests/css3-modsel-d4.xml",
+ {}
+ ]
+ ],
"css/selectors/selection-image-001-no-selection-noref.html": [
[
"/css/selectors/selection-image-001-no-selection-noref.html",
@@ -422618,6 +427961,20 @@
{}
]
],
+ "webdriver/tests/get_element_css_value/get.py": [
+ [
+ "/webdriver/tests/get_element_css_value/get.py",
+ {}
+ ]
+ ],
+ "webdriver/tests/get_element_css_value/user_prompts.py": [
+ [
+ "/webdriver/tests/get_element_css_value/user_prompts.py",
+ {
+ "timeout": "long"
+ }
+ ]
+ ],
"webdriver/tests/get_element_property/get.py": [
[
"/webdriver/tests/get_element_property/get.py",
@@ -422632,6 +427989,20 @@
}
]
],
+ "webdriver/tests/get_element_rect/get.py": [
+ [
+ "/webdriver/tests/get_element_rect/get.py",
+ {}
+ ]
+ ],
+ "webdriver/tests/get_element_rect/user_prompts.py": [
+ [
+ "/webdriver/tests/get_element_rect/user_prompts.py",
+ {
+ "timeout": "long"
+ }
+ ]
+ ],
"webdriver/tests/get_element_tag_name/get.py": [
[
"/webdriver/tests/get_element_tag_name/get.py",
@@ -422720,6 +428091,20 @@
}
]
],
+ "webdriver/tests/is_element_enabled/enabled.py": [
+ [
+ "/webdriver/tests/is_element_enabled/enabled.py",
+ {}
+ ]
+ ],
+ "webdriver/tests/is_element_enabled/user_prompts.py": [
+ [
+ "/webdriver/tests/is_element_enabled/user_prompts.py",
+ {
+ "timeout": "long"
+ }
+ ]
+ ],
"webdriver/tests/is_element_selected/selected.py": [
[
"/webdriver/tests/is_element_selected/selected.py",
@@ -422862,6 +428247,14 @@
{}
]
],
+ "webdriver/tests/set_timeouts/user_prompts.py": [
+ [
+ "/webdriver/tests/set_timeouts/user_prompts.py",
+ {
+ "timeout": "long"
+ }
+ ]
+ ],
"webdriver/tests/set_window_rect/set.py": [
[
"/webdriver/tests/set_window_rect/set.py",
@@ -422901,6 +428294,34 @@
"/webdriver/tests/switch_to_window/switch.py",
{}
]
+ ],
+ "webdriver/tests/take_element_screenshot/screenshot.py": [
+ [
+ "/webdriver/tests/take_element_screenshot/screenshot.py",
+ {}
+ ]
+ ],
+ "webdriver/tests/take_element_screenshot/user_prompts.py": [
+ [
+ "/webdriver/tests/take_element_screenshot/user_prompts.py",
+ {
+ "timeout": "long"
+ }
+ ]
+ ],
+ "webdriver/tests/take_screenshot/screenshot.py": [
+ [
+ "/webdriver/tests/take_screenshot/screenshot.py",
+ {}
+ ]
+ ],
+ "webdriver/tests/take_screenshot/user_prompts.py": [
+ [
+ "/webdriver/tests/take_screenshot/user_prompts.py",
+ {
+ "timeout": "long"
+ }
+ ]
]
}
},
@@ -422922,7 +428343,7 @@
"support"
],
".taskcluster.yml": [
- "70bde33c354105834431f3fb867bc383bd89343f",
+ "b6d21a17ab5016627041dcd8262573f41c964eaa",
"support"
],
".travis.yml": [
@@ -424001,16 +429422,12 @@
"b087a2f9b71f95a461bafc292a896fe5b50622eb",
"testharness"
],
- "2dcontext/drawing-text-to-the-canvas/2d.text.draw.baseline.alphabetic.html": [
- "f070d0d5b7f3255802df2932716b40de46ec63e7",
- "testharness"
- ],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.basic-manual.html": [
"5a4be6d371474e3113a6e927f2f950f31c12031c",
"manual"
],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.basic.png": [
- "1e313371d828e9f5edf61480e64ea5c689653fca",
+ "70d7b046cb226cfcb2bfeebe3477d3b580d8270a",
"support"
],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html": [
@@ -424030,7 +429447,7 @@
"manual"
],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.png": [
- "1e313371d828e9f5edf61480e64ea5c689653fca",
+ "70d7b046cb226cfcb2bfeebe3477d3b580d8270a",
"support"
],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.negative.html": [
@@ -424050,7 +429467,7 @@
"manual"
],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.png": [
- "1e313371d828e9f5edf61480e64ea5c689653fca",
+ "70d7b046cb226cfcb2bfeebe3477d3b580d8270a",
"support"
],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.unaffected.html": [
@@ -424086,13 +429503,33 @@
"manual"
],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.png": [
- "b04566f5c66e5816afdf094c1441d8a483297420",
+ "fb3b5b830d345d2aa858e41673e08f99977baf08",
"support"
],
"2dcontext/drawing-text-to-the-canvas/2d.text.draw.stroke.unaffected.html": [
"1da4d927706b4f074eb912e04bc4f7af23e1e87b",
"testharness"
],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html": [
+ "484af7c239935c073f29df8fe517000af183cc71",
+ "testharness"
+ ],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html": [
+ "ed8c04d0ab791b2aba4b58fdc42935fb936f0bc5",
+ "testharness"
+ ],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html": [
+ "2472889a607f5a39e10d18f9a53d9addb6ddb9c2",
+ "testharness"
+ ],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html": [
+ "36087e7b035020c51504f9efddb130fda66f4ebd",
+ "testharness"
+ ],
+ "2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html": [
+ "1c9bfc492c1d1e57e857cf92ff3cf0172b8b464a",
+ "testharness"
+ ],
"2dcontext/drawing-text-to-the-canvas/2d.text.measure.width.basic.html": [
"1cfe16438f4910db4b03e40a00ca8a31e0d9fe85",
"testharness"
@@ -426661,6 +432098,10 @@
"e2a37b4ed09d1ef25118ffa05f78619642a66c95",
"testharness"
],
+ "2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html": [
+ "f070d0d5b7f3255802df2932716b40de46ec63e7",
+ "testharness"
+ ],
"2dcontext/text-styles/2d.text.draw.baseline.bottom.html": [
"3cff44d7a0c90c8ae01d367b66cbdc426cf86dde",
"testharness"
@@ -426866,7 +432307,7 @@
"support"
],
"2dcontext/tools/name2dir.yaml": [
- "479c171810cf82be78cd25f653a1b25db21f1724",
+ "40a04057881fe4e2609e7a4f48c37ce52650272d",
"support"
],
"2dcontext/tools/spec.yaml": [
@@ -426890,7 +432331,7 @@
"support"
],
"2dcontext/tools/tests2dtext.yaml": [
- "336e3cf38b496f77ab52ea8df76555ca10b32c64",
+ "f89d6d48a4f0e364086414d5869565b9358967c4",
"support"
],
"2dcontext/transformations/2d.transformation.order.html": [
@@ -432594,7 +438035,7 @@
"testharness"
],
"background-fetch/fetch.https.window.js": [
- "33c8124ffa4569c905e9243703cb245ef3f81ca3",
+ "f2cffd0b8cfc569ff1ad23bf1ac86596dcde6603",
"testharness"
],
"background-fetch/get-ids.https.window.js": [
@@ -432602,7 +438043,7 @@
"testharness"
],
"background-fetch/get.https.window.js": [
- "a0b2acd4a6955274e3e05e9666f0c6182f07404f",
+ "5f249663fda2f02e3457d49226e8efd1754f49a3",
"testharness"
],
"background-fetch/idlharness.https.any.js": [
@@ -432626,7 +438067,7 @@
"support"
],
"background-fetch/service_workers/sw-helpers.js": [
- "ff51f22a2b950f25ff5668a20868a5e03cb13b4c",
+ "e4c772135dba2610fc8a17119cf73b42aaba6746",
"support"
],
"background-fetch/service_workers/sw-update-ui.js": [
@@ -432634,7 +438075,7 @@
"support"
],
"background-fetch/service_workers/sw.js": [
- "10e17f5874f2c76eaff7116107fa5896e31095a0",
+ "ab2445d18b09735321fc8c85a2eb2382e44cc5f5",
"support"
],
"background-fetch/update-ui.https.window.js": [
@@ -432745,6 +438186,10 @@
"5df13905978dad65dea1f42606317897061d4aa4",
"testharness"
],
+ "beacon/beacon-readablestream.window.js": [
+ "fc7f81f884bdf47b6eb76f6d9b237bc38556efa4",
+ "testharness"
+ ],
"beacon/beacon-redirect.window.js": [
"659759baa3f5c58b26b9ed042047348b67a23e44",
"testharness"
@@ -433937,6 +439382,10 @@
"6805c323df5a975231648b830e33ce183c3cbbd3",
"support"
],
+ "common/slow.py": [
+ "f3b1c7e2ea61b571bd56cc1c70c5f89bb8e7e4dc",
+ "support"
+ ],
"common/stringifiers.js": [
"b59ca9c246f75a72d532d58ef628824f8905ff7a",
"support"
@@ -433982,7 +439431,7 @@
"support"
],
"compat/css-style-declaration-alias-enumeration.html": [
- "4608af9d5fc7d382c0bbb20e513f6f1e318fa11e",
+ "cdd9cc8eaefb94218118d9e6a74727bf5c716c17",
"testharness"
],
"compat/green-ref.html": [
@@ -433997,6 +439446,10 @@
"91793af71e741ef6546d1eca37e93338ab2779f7",
"testharness"
],
+ "compat/webkit-appearance.html": [
+ "210944522a9a7dd6797d8b01f33c76e19b0b320b",
+ "testharness"
+ ],
"compat/webkit-background-origin-text-ref.html": [
"d1f183874c09d7984d461e577151008e5b363b2c",
"support"
@@ -451698,7 +457151,7 @@
"support"
],
"content-security-policy/blob/blob-urls-do-not-match-self.sub.html": [
- "1bf96df17c0ed1af565a6765c72ec9e6ec5752a9",
+ "cafa1e366026c2b079aff2ef7b4e34541f8349b6",
"testharness"
],
"content-security-policy/blob/blob-urls-match-blob.sub.html": [
@@ -451850,7 +457303,7 @@
"testharness"
],
"content-security-policy/default-src/default-src-inline-blocked.sub.html": [
- "86873553c6bd8f4f323e8c05084ca2469ed7cc3d",
+ "0cb4ca55387990c0631f29c3b56712e8c540b3b1",
"testharness"
],
"content-security-policy/embedded-enforcement/allow_csp_from-header.html": [
@@ -452218,7 +457671,7 @@
"support"
],
"content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html": [
- "401b65a898dd1cb21130833d7ebe6bf374ac1c8f",
+ "afb272cf36adbf3af72a6882b9280f0c9443454b",
"testharness"
],
"content-security-policy/generic/filesystem-urls-match-filesystem.sub.html": [
@@ -452230,7 +457683,7 @@
"testharness"
],
"content-security-policy/generic/generic-0_1-script-src.html": [
- "d27b922565b84ec2d620374f205178961a517948",
+ "35033c3899f78e1f176f34977e4e069d935ff1b3",
"testharness"
],
"content-security-policy/generic/generic-0_10.html": [
@@ -452238,7 +457691,7 @@
"testharness"
],
"content-security-policy/generic/generic-0_10_1.sub.html": [
- "107ab905bcfc1262b17f869733c107606ad23b74",
+ "f48c1e3c56ffdeb5fceec5b392c384b9a67295db",
"testharness"
],
"content-security-policy/generic/generic-0_2.html": [
@@ -452246,11 +457699,11 @@
"testharness"
],
"content-security-policy/generic/generic-0_2_2.sub.html": [
- "cdb6238e4e0df6aa3168bf71f1817f4874ba1fcc",
+ "6cb75e31ae3138e02ed409ebd5a8d1998331f1eb",
"testharness"
],
"content-security-policy/generic/generic-0_2_3.html": [
- "754c9a3288f88585caeb59e611b7a7be26aaa097",
+ "d9c230d2a5c16c86d746f62bc340fb3df3ca4302",
"testharness"
],
"content-security-policy/generic/generic-0_8.sub.html": [
@@ -452258,7 +457711,7 @@
"testharness"
],
"content-security-policy/generic/generic-0_8_1.sub.html": [
- "c2d968b3664739d5373c572566b415b4efd04763",
+ "e8ce23415f7aca1a3b5ccfc6fc637730eee8d835",
"testharness"
],
"content-security-policy/generic/generic-0_9.sub.html": [
@@ -452450,7 +457903,7 @@
"testharness"
],
"content-security-policy/meta/combine-header-and-meta-policies.sub.html": [
- "6e9e71dd921a8d2646ecef1f52a45100d6c8cf09",
+ "70bfeb6b3bbe86a2cbb97dd78552c4bd42e7acdb",
"testharness"
],
"content-security-policy/meta/combine-header-and-meta-policies.sub.html.sub.headers": [
@@ -452702,7 +458155,7 @@
"testharness"
],
"content-security-policy/navigation/to-javascript-url-script-src.html": [
- "6c120adac20297ef6b31d52ed9b05049db332473",
+ "70dea1f985e6b7642b5bfd194c34f1d8c8dcaa74",
"testharness"
],
"content-security-policy/nonce-hiding/script-nonces-hidden-meta.tentative.sub.html": [
@@ -453069,6 +458522,46 @@
"dd69c41354b583e427d4e12a060f1b6f71eb2c86",
"testharness"
],
+ "content-security-policy/script-src-attr-elem/script-src-attr-allowed-src-blocked.html": [
+ "d4c19c546676d031e4e8aa9e2e3bd59c7ae898d1",
+ "testharness"
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-attr-blocked-src-allowed.html": [
+ "199726e212d93b769aa128992ead4ef95d1d3453",
+ "testharness"
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-elem-allowed-attr-blocked.html": [
+ "c21898377e5cea61af577060aa7c47320a60aa8f",
+ "testharness"
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-elem-allowed-src-blocked.html": [
+ "c7954613c78999631e932c89f2ad46b85f470fe6",
+ "testharness"
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-elem-blocked-attr-allowed.html": [
+ "4a85c15376c93a27d0026d6f46172dc22929765c",
+ "testharness"
+ ],
+ "content-security-policy/script-src-attr-elem/script-src-elem-blocked-src-allowed.html": [
+ "ac4726f9f4bcf93c0500ba374b5218c1959435f1",
+ "testharness"
+ ],
+ "content-security-policy/script-src-attr-elem/strict-dynamic-elem-allowed-src-blocked.html": [
+ "b6543778230247f758773f667915fdad0ebfa901",
+ "testharness"
+ ],
+ "content-security-policy/script-src-attr-elem/strict-dynamic-elem-blocked-src-allowed.sub.html": [
+ "04394dc33ac17c024fa448046ab7725c17061766",
+ "testharness"
+ ],
+ "content-security-policy/script-src-attr-elem/support/t_done.js": [
+ "e31eb1d95927d6f9132d127796861de23c8df719",
+ "support"
+ ],
+ "content-security-policy/script-src-attr-elem/support/t_fail.js": [
+ "fa48d6e2c5dda3fe0521f4cc5ceb2104ff467ea7",
+ "support"
+ ],
"content-security-policy/script-src/10_1_support_1.js": [
"9bfe201711a0b4f3201700261fe13135cf4e8d02",
"support"
@@ -453078,7 +458571,7 @@
"support"
],
"content-security-policy/script-src/addInlineTestsWithDOMManipulation.js": [
- "a5d91dcab0fe3886454e9de92007983c90025a3c",
+ "02c8c8cdd421dd3db80929d57e34325ab834e84b",
"support"
],
"content-security-policy/script-src/buildInlineWorker.js": [
@@ -453102,7 +458595,7 @@
"testharness"
],
"content-security-policy/script-src/injected-inline-script-blocked.sub.html": [
- "07e2ae2871c7e07538fd02685ebf35779afa8164",
+ "45c389f7f1e930927bc951f2373dd3dd3c6758c4",
"testharness"
],
"content-security-policy/script-src/inlineSuccessTest.js": [
@@ -453110,11 +458603,11 @@
"support"
],
"content-security-policy/script-src/inlineTests.js": [
- "0c6e5446041dee68d844989256af3d48a1be6406",
+ "3c0712b4499019372223bf7c36ec51548cfb6c79",
"support"
],
"content-security-policy/script-src/javascript-window-open-blocked.html": [
- "e02d66ae9c9c8da6f7e15329d5f9d12f91024b3b",
+ "ae4d8227edc83cb238fda810268a73278ab31bfd",
"testharness"
],
"content-security-policy/script-src/javascript-window-open-blocked.html.sub.headers": [
@@ -453182,7 +458675,7 @@
"testharness"
],
"content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy.html": [
- "16428b1a4de67f73e7186ec84d32f11564c57ba0",
+ "3c4e39e8250287adb729ea3ceab5e2fb6943cf7d",
"testharness"
],
"content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy.html.sub.headers": [
@@ -453190,7 +458683,7 @@
"support"
],
"content-security-policy/script-src/script-src-report-only-policy-works-with-hash-policy.html": [
- "9ae66611ea52e0bbd1e29a5e5072bb7254afdd51",
+ "850f4b2c2eed88876d8da2fa866aa513469fc462",
"testharness"
],
"content-security-policy/script-src/script-src-report-only-policy-works-with-hash-policy.html.sub.headers": [
@@ -453222,7 +458715,7 @@
"support"
],
"content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html": [
- "4e1944683046de49c0fedc7896d34a83cf0caf30",
+ "51b0b7971a09f550cd89070db74ec47d9d9c0a90",
"testharness"
],
"content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html.headers": [
@@ -453230,7 +458723,7 @@
"support"
],
"content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html": [
- "cd2ae8c16c0f4fa37a591c8b40451f707d08c22c",
+ "91d12ed7bd33a81d670526a4a8d8583897466821",
"testharness"
],
"content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html.headers": [
@@ -453238,7 +458731,7 @@
"support"
],
"content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_whitelist.sub.html": [
- "94490de1b465cfa683ee560147c4f80426d8bec4",
+ "314ed91e5d30e26b3e9d05f9618f06deadf9fbb3",
"testharness"
],
"content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_whitelist.sub.html.headers": [
@@ -453246,7 +458739,7 @@
"support"
],
"content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html": [
- "1e057ba947ebfabf38df89948cffedfd9f5762e0",
+ "1ceb74c63d1392672a36a2506b63c50199aa39fd",
"testharness"
],
"content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html.headers": [
@@ -453278,7 +458771,7 @@
"support"
],
"content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html": [
- "3a6151b10f3897eaacf1414757431693242240a5",
+ "f7625afdaf9056274c607ed9b209ea976d013459",
"testharness"
],
"content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html.headers": [
@@ -453310,7 +458803,7 @@
"support"
],
"content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html": [
- "19d2ae1acc7a0c0323c5bba51e16e06dea576427",
+ "ac180d23f50981737ea66b2b63cce0c3fa3c9b50",
"testharness"
],
"content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html.headers": [
@@ -453318,7 +458811,7 @@
"support"
],
"content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html": [
- "c167e5ef625961bd21eaf3eb6f8510ef8b2ad41f",
+ "c5e33dc4253dbf3ce2b0c6cb2fca4b0306d68244",
"testharness"
],
"content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html.headers": [
@@ -453362,7 +458855,7 @@
"testharness"
],
"content-security-policy/script-src/scripthash-unicode-normalization.sub.html": [
- "0c303630331cdbd6ebeb79a0aa088832e1817708",
+ "4212297c68399ad32038f5e7bad2f8c8e4aa3120",
"testharness"
],
"content-security-policy/script-src/scriptnonce-allowed.sub.html": [
@@ -453370,15 +458863,15 @@
"testharness"
],
"content-security-policy/script-src/scriptnonce-and-scripthash.sub.html": [
- "94a39973af274382f22096f8131cdb0e0443051b",
+ "8f1f596bd0039c4eadcdc8f2b84a54f8785262a0",
"testharness"
],
"content-security-policy/script-src/scriptnonce-basic-blocked.sub.html": [
- "db94c1c5f4bb8bd4053ade5cb7e42d62f93fc5e7",
+ "2001afcd9cac51a007569bf8ea0642dc905b5422",
"testharness"
],
"content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html": [
- "18a6899a5cd160b95cace980168efc4e54d79474",
+ "b595b76389ffce3e8ee642e9581073f4dbbe04a1",
"testharness"
],
"content-security-policy/script-src/scriptnonce-redirect.sub.html": [
@@ -453390,7 +458883,7 @@
"support"
],
"content-security-policy/script-src/srcdoc-doesnt-bypass-script-src.sub.html": [
- "eea201865aa42d9f7827203baeaaf5b1783095cd",
+ "2cae85ec301fa2cd15005468b7efab6440ec2f17",
"testharness"
],
"content-security-policy/script-src/support/inject-script.js": [
@@ -453541,12 +459034,36 @@
"b8bec0b95e3955cada8d5ddbd8af354cc60026f0",
"support"
],
+ "content-security-policy/style-src-attr-elem/style-src-attr-allowed-src-blocked.html": [
+ "567e22496ccbd15df87a44b602461a221639204c",
+ "testharness"
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html": [
+ "622c3bf76486cee122f317d9096eb4ce0455696a",
+ "testharness"
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html": [
+ "279600ea2e18a56d0c429bccd0c19d311e932387",
+ "testharness"
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked.html": [
+ "c15cf0bcf64cb535de38235bf1971cd7e4e7f1d0",
+ "testharness"
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-elem-blocked-attr-allowed.html": [
+ "a42c9de9b84d2a30669742c3a1e7a423a572ac53",
+ "testharness"
+ ],
+ "content-security-policy/style-src-attr-elem/style-src-elem-blocked-src-allowed.html": [
+ "bf5014a45842f6d7e8ef888c5049a1c139fa5c69",
+ "testharness"
+ ],
"content-security-policy/style-src/injected-inline-style-allowed.sub.html": [
"e91c4e46ac7df40e98791155d53e9f3a947b45cd",
"testharness"
],
"content-security-policy/style-src/injected-inline-style-blocked.sub.html": [
- "d7e7de22cf601f732a938512fa0144d76ae7bbeb",
+ "978671223e85996112fd5429969eb35e7eda09d5",
"testharness"
],
"content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html": [
@@ -453562,7 +459079,7 @@
"testharness"
],
"content-security-policy/style-src/inline-style-attribute-blocked.sub.html": [
- "e2d84915cf0e45781e975ea1fc0711f08f53d84d",
+ "71e5a88b7a554a9c99caad4d00b944f1c4bd915f",
"testharness"
],
"content-security-policy/style-src/inline-style-attribute-on-html.sub.html": [
@@ -453606,7 +459123,7 @@
"testharness"
],
"content-security-policy/style-src/style-src-hash-blocked.html": [
- "b5d94040ed662920f725aa400a938c799e4320fc",
+ "dec3b6e853b2a95dfad499a824f41bb529440075",
"testharness"
],
"content-security-policy/style-src/style-src-hash-default-src-allowed.html": [
@@ -453618,7 +459135,7 @@
"testharness"
],
"content-security-policy/style-src/style-src-imported-style-blocked.html": [
- "a00888098a5bc6eb6701fa3b788beef989611478",
+ "e5016c2382f461cddc21c585bb5b49f2ecaedd7d",
"testharness"
],
"content-security-policy/style-src/style-src-injected-inline-style-allowed.html": [
@@ -453626,7 +459143,7 @@
"testharness"
],
"content-security-policy/style-src/style-src-injected-inline-style-blocked.html": [
- "797cb13e70b54fba71026fd80aed071beb9733fd",
+ "fd27938f0674270f0f0d489204c21215777ac85c",
"testharness"
],
"content-security-policy/style-src/style-src-injected-stylesheet-allowed.sub.html": [
@@ -453634,7 +459151,7 @@
"testharness"
],
"content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html": [
- "a2c8e722795e223ecb6b914f81601f5d2ab15a7b",
+ "6191bb2d555dc130747c84d51993193d16eae2a9",
"testharness"
],
"content-security-policy/style-src/style-src-inline-style-allowed.html": [
@@ -453646,11 +459163,11 @@
"testharness"
],
"content-security-policy/style-src/style-src-inline-style-attribute-blocked.html": [
- "66b8f545c770deabc90dd3e5b081fefbb7bd3767",
+ "5072a2c8e2b2db1709afa2b108c085724110c597",
"testharness"
],
"content-security-policy/style-src/style-src-inline-style-blocked.html": [
- "7374e44902f18b575f1e27d947d5afe64b25c9f6",
+ "1baff387ae8f0734b95e00a1dad41162dfdf70f8",
"testharness"
],
"content-security-policy/style-src/style-src-inline-style-nonce-allowed.html": [
@@ -453658,11 +459175,11 @@
"testharness"
],
"content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html": [
- "53b1b0131573d4faf52bb117f5670f935381658f",
+ "83eaabaa9b15a4295b0b19220586806fbd65ca1b",
"testharness"
],
"content-security-policy/style-src/style-src-inline-style-nonce-blocked.html": [
- "f2cb2f2a775a3031635bfaab4fbed7f8c6d67b17",
+ "016b4ebdc4939562e819fd2d3d70e1e6c7208501",
"testharness"
],
"content-security-policy/style-src/style-src-multiple-policies-multiple-hashing-algorithms.html": [
@@ -453674,7 +459191,7 @@
"support"
],
"content-security-policy/style-src/style-src-none-blocked.html": [
- "35696ade7f5e7f610b86a606bdcdb913d37a0a1c",
+ "2a80b827c8c32e594ce0b5cf3f8f02f0b3b0813e",
"testharness"
],
"content-security-policy/style-src/style-src-star-allowed.html": [
@@ -453686,7 +459203,7 @@
"testharness"
],
"content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html": [
- "8095da54d32a13e8a355aa7af1d8ba59fc74972a",
+ "a076eafd559c80bb510aa3c43669be563646adb8",
"testharness"
],
"content-security-policy/style-src/stylehash-allowed.sub.html": [
@@ -453694,7 +459211,7 @@
"testharness"
],
"content-security-policy/style-src/stylehash-basic-blocked.sub.html": [
- "d9f0fbf653eac2b58568a1d4c992c898965f1d7a",
+ "6bfd5019e1bd92f48ac55ece5f6353caf00b8bcd",
"testharness"
],
"content-security-policy/style-src/stylehash-default-src.sub.html": [
@@ -453702,11 +459219,11 @@
"testharness"
],
"content-security-policy/style-src/stylenonce-allowed.sub.html": [
- "c5ffdba6de475e8afcc6b162ee5ddfc692ad6064",
+ "e190b84e8579caad5b9fa61b60ee241e65cbe7f1",
"testharness"
],
"content-security-policy/style-src/stylenonce-blocked.sub.html": [
- "609e45abdc7bde205332122be869f579c4cb2437",
+ "4b2381fc33d5a80c8d1affd6bec6dae14896a6f4",
"testharness"
],
"content-security-policy/style-src/support/inject-style.js": [
@@ -453882,7 +459399,7 @@
"testharness"
],
"content-security-policy/svg/svg-inline.sub.html": [
- "3377f5dca6d92a4249fa212b7a069eedac11480b",
+ "16d03407fd9eb5831b6cb17fa718875450c498dd",
"testharness"
],
"content-security-policy/svg/svg-policy-resource-doc-includes.html": [
@@ -453950,11 +459467,11 @@
"testharness"
],
"content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href.html": [
- "f53a2e924c345e99cf0ae9bfc71b1eaf5666563b",
+ "991200ac0daaa047a7637753b31d38ca7d99320b",
"testharness"
],
"content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href_blank.html": [
- "6b9f60ce368d11adce252fe29df6de5d59e6305f",
+ "66ec9e1678c6ac5dc34f962bee2830d67853d763",
"testharness"
],
"content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_location.html": [
@@ -453962,15 +459479,15 @@
"testharness"
],
"content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_open.html": [
- "3667f8016fa9aeba5e2fdee9d370f41bcb7e3d1c",
+ "12c9b099857294e85cbe2efe2d4a3b7d60836cda",
"testharness"
],
"content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href.html": [
- "adae81b0c061075583650d5b4b55583c7e03f3dc",
+ "944b72774c8b15870f403941a38c705075046c16",
"testharness"
],
"content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href_blank.html": [
- "470283e10be3b5b28ce034d95e404add05515dfe",
+ "84491f83fbb1f3f5908fce22afad6a6370379ac5",
"testharness"
],
"content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_location.html": [
@@ -453978,7 +459495,7 @@
"testharness"
],
"content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_open.html": [
- "8314e6ab911e755fac8bdcc63117709f14d528b5",
+ "c653d4f617e3c3519e73de560f27c555db649730",
"testharness"
],
"content-security-policy/unsafe-hashes/script_event_handlers_allowed.html": [
@@ -453986,11 +459503,11 @@
"testharness"
],
"content-security-policy/unsafe-hashes/script_event_handlers_denied_missing_unsafe_hashes.html": [
- "0323dda50b7be93ffd7b77d401cd2b40f39d6cfe",
+ "7ba9d30bcfd8d1d35426ca8abc3ab42018bb9c3c",
"testharness"
],
"content-security-policy/unsafe-hashes/script_event_handlers_denied_wrong_hash.html": [
- "b9b13572c3ba89738142ff54baf43541eb035071",
+ "2de6a48eb219df9230e4ba5e6523bbd549d53676",
"testharness"
],
"content-security-policy/unsafe-hashes/style_attribute_allowed.html": [
@@ -453998,11 +459515,11 @@
"testharness"
],
"content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes.html": [
- "66be2c3d80728f47758f08a01283df28120912dd",
+ "e8070acba90bfff548d971375f3061a62bd1432c",
"testharness"
],
"content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash.html": [
- "32ca66a8a8b8ac2c775289e07ae0f34fc55c5078",
+ "be27637224249d99c28c214c2af9e65a07f27dfd",
"testharness"
],
"content-security-policy/unsafe-hashes/support/child_window_location_navigate.sub.html": [
@@ -454342,23 +459859,59 @@
"support"
],
"cookies/http-state/attribute-tests.html": [
- "6e7d5feabb2722d895590cdb66ee552d78a3add7",
+ "1d2141d38c48d13e0f9da0937920c49f6d88a915",
+ "testharness"
+ ],
+ "cookies/http-state/charset-tests.html": [
+ "9d9ef1bb08790ea6fec389325bfcd4607064f98c",
+ "testharness"
+ ],
+ "cookies/http-state/chromium-tests.html": [
+ "e5d745e03909d0595a69c9849d1bf39ba15f4e8e",
+ "testharness"
+ ],
+ "cookies/http-state/comma-tests.html": [
+ "f71bb8d9610439b26339ea8dc7460ff0ceb7fb85",
+ "testharness"
+ ],
+ "cookies/http-state/domain-tests.html": [
+ "85c8cd00a447cbd653869af9922caf858d4b058a",
"testharness"
],
"cookies/http-state/general-tests.html": [
- "169984de6ac54913a8f7a7598301b3b474e6e2c8",
+ "1e63043ae1111a7a4791d28d7d1d6675f7e9fefd",
"testharness"
],
+ "cookies/http-state/mozilla-tests.html": [
+ "01a5645b140282dec33c67e78aa2519037b5b45c",
+ "testharness"
+ ],
+ "cookies/http-state/name-tests.html": [
+ "9dd2781f2357c53c59ebdee2c5973d068ecf40e3",
+ "testharness"
+ ],
+ "cookies/http-state/ordering-tests.html": [
+ "53cfae452be37c3383501341f912946ce9e8774c",
+ "testharness"
+ ],
+ "cookies/http-state/path-tests.html": [
+ "464f39becd9e6b00e7a90dc89064d160f1e8b789",
+ "testharness"
+ ],
+ "cookies/http-state/resources/all-tests.html.py-str": [
+ "37d630fef4fadf1f20289ca64d3f93dd4f5f2404",
+ "support"
+ ],
"cookies/http-state/resources/cookie-http-state-template.js": [
- "470d46ebc438376788b145a9fde5e41a1e5985d9",
+ "d737b38c520b83a8f9788b4c625021337fed2f12",
"support"
],
"cookies/http-state/resources/cookie-setter.py": [
- "0418f4b7630d7520c93850609249eada0e65c2b3",
+ "758b1429f7233dda535a30be5085a3c01591dabd",
"support"
],
"cookies/http-state/resources/debugging-single-test.html.py-str": [
- "d34ff872c1df48458118f5ab184ad5395bda4e90",
+ "40d9809a4bc1815b2603a117554221fa446a7782",
"support"
],
"cookies/http-state/resources/iframe-content-pushing.js": [
@@ -454801,6 +460354,1354 @@
"7f68322ee2e3710a12f3238ce2af834d1fe15164",
"support"
],
+ "cookies/http-state/resources/test-files/charset0001-expected": [
+ "8646afc636624f223fe79296a6d2b49747258d52",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/charset0001-test": [
+ "e89a36dd89ec806738ef8615db4de0fae323cf7b",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/charset0002-expected": [
+ "fc7d2561017e86fde51bc774ce0bc07d1184e0f6",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/charset0002-test": [
+ "70ce472afa608b17e8830e6b76dd3e76f0af04d9",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/charset0003-expected": [
+ "1969bc86b97615eaeaeaa05705f556fb730cd679",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/charset0003-test": [
+ "446e2fd29f211471cd7b090fc9660b013f030d02",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/charset0004-expected": [
+ "1d6d952989ef943a37f92b0403024bc2802e0842",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/charset0004-test": [
+ "1564ba4fc921f2ec9f6686e90a91c2468f351ab0",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0001-expected": [
+ "1022f64a2906dd854109026bbc6c3d286a5a5283",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0001-test": [
+ "4635f0e7e378a507384407cbf93197933b1f7775",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0002-expected": [
+ "64932dcffb4fe41532ab9d10ceedb4ce9ad26ad8",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0002-test": [
+ "24ab0d2da56451e882799e04a629c29997e0d0d7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0003-expected": [
+ "64932dcffb4fe41532ab9d10ceedb4ce9ad26ad8",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0003-test": [
+ "bac41f9928847c9d93bb08710572f5b4f0d967c8",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0004-expected": [
+ "9be3e8f6435f85b7751dc6f49a3c68e18d234511",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0004-test": [
+ "45cab2f409daada7d1a4b34b64741b98258284c8",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0005-expected": [
+ "9be3e8f6435f85b7751dc6f49a3c68e18d234511",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0005-test": [
+ "c2dfebd3c4431774f06cdaaf3292d7a5f6742471",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0006-expected": [
+ "8121145c18bf7aafcb53af2a18e13f0176c871b7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0006-test": [
+ "a9da26811a4ed6a05f64b0625060076984e60670",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0007-expected": [
+ "8121145c18bf7aafcb53af2a18e13f0176c871b7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0007-test": [
+ "dca20b8e7df62c2a5423c5860823a6714c6fa1ab",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0008-expected": [
+ "602c0e017c4f477bc26f449f124c807d4461b7f0",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0008-test": [
+ "ece6c66f0b1169a705a55556ff8c2799427cebb0",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0009-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0009-test": [
+ "eecdae60cc4cea7dd7213bb23b81a9f022bbd6eb",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0010-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0010-test": [
+ "17a18ea9272814a1f036d9f927e2380d5218f51b",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0011-expected": [
+ "2062e2315564cd319d99f1b103555a9c6018ea0d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0011-test": [
+ "4000f269a495455b2f4f00925eb927759e3c9b6a",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0012-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0012-test": [
+ "b33a4e7427b99a689c4d1bade576df7c7246c2ab",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0013-expected": [
+ "5d2d06092c4fec724b7a1c257ca026b953066ea1",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0013-test": [
+ "f61a087bb8fd7ef9c84329f86be8b21fb3972f04",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0014-expected": [
+ "21bfd134e54a3b488793fe8e0c159c0f27f1a687",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0014-test": [
+ "edbb7931a38048004ed83d9682c737a98d64c752",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0015-expected": [
+ "b968e7427a0711ddd3c85dee8480487ade9cf038",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0015-test": [
+ "80d32366b5d9ed794b812ed2bfafabeba75c5b25",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0016-expected": [
+ "11d8efaea2aca277e07a2030cb646cdbe09b6851",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0016-test": [
+ "8abf12026c7ec2932f0a967501a4063968554d88",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0017-expected": [
+ "6bb84483a05f5697a7d4aed4cbb7a68161114207",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0017-test": [
+ "94cce02078bec0a3b37809e7e04e0a99e03549cf",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0018-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0018-test": [
+ "145ad2c5defddcd9a19f7f44b07e302bce643635",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0019-expected": [
+ "b6df50eef282f6e6bf501259b913f35284f0f323",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0019-test": [
+ "e3bcc4a18c3da79b304ab738f445de1e1ef11732",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0021-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/chromium0021-test": [
+ "145ad2c5defddcd9a19f7f44b07e302bce643635",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0001-expected": [
+ "ab55cea018a3ced1b77c914e7a1c8e7872a9ab0f",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0001-test": [
+ "5b3678de3966c455497af5034c66a68e95d6f83e",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0002-expected": [
+ "33590a084863fe7216fe1ea0f1ce7e98672de339",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0002-test": [
+ "164c0a93bfcdba58d3a84ec7c816b7ba2edc1806",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0003-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0003-test": [
+ "213d3a5f2675e83f1a5256cd9a66e56efc7da959",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0004-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0004-test": [
+ "e93f6f4062c9cacd56b40abbe88783783943a478",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0005-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0005-test": [
+ "eeb040d0a31acfe14ee7db331968ba3d1d8df75f",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0006-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0006-test": [
+ "a3eaff03ba38303a243a964f2e3bfbeb53533a92",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0007-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/comma0007-test": [
+ "29fb0a2695d4fb71115ac1fc6a220216243f8dec",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0020-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0020-test": [
+ "67cefa339efce135a669e4b69cd98e867ed5b47c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0022-expected": [
+ "8ac13216032b9cafd3efede3d47b9f9747047759",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0022-test": [
+ "1a8f35ffbd849ebd836c4b41a97a9f6fa4113d4b",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0023-expected": [
+ "8ac13216032b9cafd3efede3d47b9f9747047759",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/disabled-chromium0023-test": [
+ "76a8ed4e9b8725200a3e282eeac1062ce3b9c570",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/disabled-path0029-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/disabled-path0029-test": [
+ "d7219d590c6f13b8ef8aef2e5951cadab16ff17e",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0001-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0001-test": [
+ "fd8926d7b4fc22c84aa0bb247e3e50632ef71ff3",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0002-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0002-test": [
+ "a6ad2a80856c6eca623560ce640ee47ecc3777da",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0003-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0003-test": [
+ "ff051f4806c94b1e45dd58dab8f819965b4bd74c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0004-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0004-test": [
+ "f05029bb5a74f2d2b982ff5abf88c3a38e1200b6",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0005-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0005-test": [
+ "697ab186fcde49bf34cf169db27ae8d0ae4927f2",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0006-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0006-test": [
+ "fe5f90df9dc00b989a4456700677573bbb6aebe4",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0007-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0007-test": [
+ "1d2c6fcec6270b002960a719cdff5db8a549d675",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0008-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0008-test": [
+ "491c52de9da50c6f668007c0e6a367d049b3c019",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0009-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0009-test": [
+ "736e69fe8e5a8498c1f69fd504358c18913ab8e5",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0010-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0010-test": [
+ "5bf212f27d8e6312cad86941177a4d5e53a5eff1",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0011-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0011-test": [
+ "e1c54db25eda8ba96a7adfd40ea316e1bff4aa85",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0012-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0012-test": [
+ "a189f38087a66eefba14ad25b86d6e9135f53ef6",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0013-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0013-test": [
+ "8493146e767a9f57eb6ad29a8be2cbd19ca956d7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0014-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0014-test": [
+ "adccd0d3205c71ec3c6b4e8810f80595cff26033",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0015-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0015-test": [
+ "c123ba940d31f5e01322579ddd7473b72d9844a6",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0016-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0016-test": [
+ "9136ac4d86a80bef4ad4b461d36b9b5a8704911d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0017-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0017-test": [
+ "8e876b8d687072ffb127d6e89b725076b41c38c6",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0018-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0018-test": [
+ "3763f9625ef867ad4218de70b5ea06ecae87d0e4",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0019-expected": [
+ "1f359c4850bae230784cda7633e3db91ff0f0ee0",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0019-test": [
+ "f5aebfd0e10e1b4d39740d1cec7d98a6a757fd7c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0020-expected": [
+ "5eb3ac42d41ac5d9e78a50c6f9f6065651cddac6",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0020-test": [
+ "1c7a61c85f6ed7d652b42c3ed23980648bf081ea",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0021-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0021-test": [
+ "895744eac5da0a574381b8be74ad96298cc47567",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0022-expected": [
+ "1f359c4850bae230784cda7633e3db91ff0f0ee0",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0022-test": [
+ "6eeae00159fa2c7350427da96ffbb7b7a46ae7a4",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0023-expected": [
+ "5eb3ac42d41ac5d9e78a50c6f9f6065651cddac6",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0023-test": [
+ "91a81ed003c55f597dbd15ad7cacc44e22215a67",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0024-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0024-test": [
+ "63157b9b4575bc24f424c07ce3b721a8c16ab328",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0025-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0025-test": [
+ "353c3bb63461a3599b1c630fada4b3b9173136f2",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0026-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0026-test": [
+ "3b14e3075468947ccd7ac5af4aba7c49b8725f78",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0027-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0027-test": [
+ "8b7adbd17a17717b7987be1bbc5756dd75050e0d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0028-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0028-test": [
+ "ab8f2c401ebefc02538ec906ec53ee9e29d4ce65",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0029-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0029-test": [
+ "cfab57a6e497b65866525e7adbc58c27418288ba",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0031-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0031-test": [
+ "6eccb78b8b83ff1d10c1c54ff3f64d87095d63e1",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0033-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0033-test": [
+ "7fdcc8356a11456b095e7dcf230373c665b399e1",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0034-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0034-test": [
+ "d3f4723fd08ee9502047190ece283fd5f173b78e",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0035-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0035-test": [
+ "967d248c25663a97f3f824c5f6b792abee88b28c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0036-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0036-test": [
+ "a618ec4dd203bb73d32ccf357aadcd96d93271e9",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0037-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0037-test": [
+ "c61fe8f27629bd8dbefa8c69252ebca22d6bca76",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0038-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0038-test": [
+ "2d8fcca573141f8a08cc94f40d03fe1bef615467",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0039-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0039-test": [
+ "3225b28baacb8ebce7bbdb1a437da7b3ea4c7fa5",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0040-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0040-test": [
+ "3e32fa895c357326a566bbb2643069a09ec29f38",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0041-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0041-test": [
+ "6fbc4ad1141721adacaaaafac1083f7d68552aff",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0042-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/domain0042-test": [
+ "9258624cc56f45f386609c7244e27847e15673ce",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0001-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0001-test": [
+ "53f98e23b2a8f4f922dd379e9088851bf91d386c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0002-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0002-test": [
+ "a79c5be41f4097f08586ae1418dff94c1bab5530",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0003-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0003-test": [
+ "785c326fae4353fe09ebebb52a13643ec9b887e7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0004-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0004-test": [
+ "567134f5d3ab9f9abe16203693a08bc6f7935c5d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0005-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0005-test": [
+ "0fa350adc36062b61daf8a4e07b7e0c76849bc13",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0006-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0006-test": [
+ "567134f5d3ab9f9abe16203693a08bc6f7935c5d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0007-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0007-test": [
+ "785c326fae4353fe09ebebb52a13643ec9b887e7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0008-expected": [
+ "0f62babd8b06933069cb30ae6f44d54b73c8c534",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0008-test": [
+ "d6350d6c7b52c5c716342593fb6b94b0907ee795",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0009-expected": [
+ "555fbaf54711a5d25d5a27fc2d5c776e1da09963",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0009-test": [
+ "84944d4d50b6e492ccd12bae964920159badeaca",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0010-expected": [
+ "555fbaf54711a5d25d5a27fc2d5c776e1da09963",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0010-test": [
+ "13477a47c26834f0689da05cb7db3fa14b07ae48",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0011-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0011-test": [
+ "bba20536edd738acdc0d7fa8e5f0cf30050c961f",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0012-expected": [
+ "10e669a013455bde2ae2778d138b08904764c3d9",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0012-test": [
+ "9ba773f5c7457f790262d36674a8c2fd401edaf5",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0013-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0013-test": [
+ "d491267e4aa7e0f6d96b8d22de326128d0861d2d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0014-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0014-test": [
+ "4cc1f45075607181db5c693b89ffe81dbc83de21",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0015-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0015-test": [
+ "13254db6886be51c92ca8a3e2fd4149fb419d425",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0016-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0016-test": [
+ "6aab3e80d6f85043e69a2f4aae633a7e56a92288",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0017-expected": [
+ "fc9a2496c60e5c1d132f3ea17dee95e92d1d010a",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/mozilla0017-test": [
+ "b6c297cc77ddef6c4b0eae5c94a07d0827de89c7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0001-expected": [
+ "96527926e107477e66ab0386dea671d8973de695",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0001-test": [
+ "3ce5f5f9824b95711aa93a82c45e39250aa225ed",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0002-expected": [
+ "d4d3cda811bd744d741d883675d789e124c32449",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0002-test": [
+ "d6eac8a757af54e177a04bf7d3b15e14080cdc5a",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0003-expected": [
+ "0c00f45c4a479545f1272b6c7d3312f7b48d658a",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0003-test": [
+ "7ea96155bd7752a8abffb7a85093fdd3fa19fc93",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0004-expected": [
+ "b079529aa249748cdf1ada8ce4b99d12952745a7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0004-test": [
+ "99f0e61801a92ddc2034fec94fc61b02f1b2baf1",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0005-expected": [
+ "a0f031bb34ed2284c99cab25c4864f7e55af6522",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0005-test": [
+ "9e33e0c8e476c24b698b7c8061ea42a585b9ed73",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0006-expected": [
+ "ee0e7d7c335d08c78793167fd581458b15e6a3ec",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0006-test": [
+ "fbd03632c61b3df902d75dd8f11dcde5a7cf8634",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0007-expected": [
+ "6d6e56ebe59b54fc030d7c88c72a142d1e5f7486",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0007-test": [
+ "d41e64b87ec3d1e45cf0a9020c2a093063f8844f",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0008-expected": [
+ "a4b8c2428258033c534e7ff05ac967dbe24ed9e9",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0008-test": [
+ "7afcf700376b02f3a38c12752b0067cc66f3e190",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0009-expected": [
+ "49506acc24893411e24dd9c63ed25f2b5945052d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0009-test": [
+ "f40d2c4d6b9e06be56505acb73594718724e5254",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0010-expected": [
+ "1e72557892b01144f0cd3051a9a079fcc2253e46",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0010-test": [
+ "fb4fd921be31471edd70aa0399c011aea48ee36d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0011-expected": [
+ "260d7028a0195e1c93da4cb10cac211016856e60",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0011-test": [
+ "b36b72388f2b3dc6480dd798f57d8ed5624b5ae4",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0012-expected": [
+ "0a2686a15257f03f02af93c39d410cc070e408fd",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0012-test": [
+ "6927aac6fa061ad0e0be4f13f4d7c686602aef25",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0013-expected": [
+ "87dec78b62265dd3dfd115e68ce526aef5213353",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0013-test": [
+ "59ada98321c69945673b94c2504f81408224325b",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0014-expected": [
+ "82bfe0e60acd0c9194bbbb5c33a0a4e95686d5fa",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0014-test": [
+ "a113e99be5e27dd6186d247d5f1fe0f197f1349f",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0015-expected": [
+ "390b77b30c40d33180bbe2026b052dadd44af527",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0015-test": [
+ "60fc0746ba258f0b2ea7d20e32625d70f1ea481b",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0016-expected": [
+ "7d4d9e330792bf536a304785940f865d9cd20aa3",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0016-test": [
+ "371dbcde6cab2545f54b15d3f797936d39fae3d3",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0017-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0017-test": [
+ "056143166bd1c31df501c74d13425656a744884c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0018-expected": [
+ "96527926e107477e66ab0386dea671d8973de695",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0018-test": [
+ "e86a48360cf5735c3b0389d0f2d2507ec6c44b43",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0019-expected": [
+ "8d0bc2d07d699558f0dc68690af76bd9b7f4e430",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0019-test": [
+ "d48e3f6954a690c35628e3665fa329a67fb76452",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0020-expected": [
+ "aa9cd6d435cfdb9bd2180bd163e1f1503e6deca0",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0020-test": [
+ "b84f64d17981f59c5b1e557ba33362e38594e8b8",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0021-expected": [
+ "206ff76e3e324b0c652024962dce34dd7e4dcf93",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0021-test": [
+ "56b319e9d491dc99a1434b157803249fe7b4acbb",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0022-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0022-test": [
+ "cc59ff17edabb8466b416dda9b4ed3c2f42a0b80",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0023-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0023-test": [
+ "b7f9cc257d20fbc98b5c12125ee9dde8e4ae9436",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0024-expected": [
+ "5ac4f2535c81810f380414f3e72ac8d35bfa76b7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0024-test": [
+ "da7b696da9129d5762468c0ba2b98d30974664ee",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0025-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0025-test": [
+ "708f006b9c0777592199ec0e8b333f44894e90fb",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0026-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0026-test": [
+ "bbeb77a029c18442c90d81cd96a3b1eb1aa72170",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0027-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0027-test": [
+ "d222227e6de7ded31c0be0e212f4611035c7ba79",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0028-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0028-test": [
+ "1c197e3324c87aa5364224ecaf029dbf5ae0a7a4",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0029-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0029-test": [
+ "44212468d449cf18fac8987c1f0ba4127e1483ee",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0030-expected": [
+ "a391380fb666180af1950103f50f584207c75138",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0030-test": [
+ "cf3ff160f451ac4f53a847942df1b7a3f29861eb",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0031-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0031-test": [
+ "9394184904027da428e718414c5ce19d0c17a6c1",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0032-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0032-test": [
+ "93fc9752333920c9b70236d7e53dd82199404811",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0033-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/name0033-test": [
+ "7bbdd89566a0a01d97df5d16b34a9822abeed6e9",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0030-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0030-test": [
+ "3ab75aa3a07894934f9df01f448dee383a629acb",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0041-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0041-test": [
+ "b85a6c9e43cbed1899cff10c6ca53916176d98db",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0042-expected": [
+ "8b137891791fe96927ad78e64b0aad7bded08bdc",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0042-test": [
+ "524d192b6e7e3a4ef89669267f0451ab0066d18c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0043-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/optional-domain0043-test": [
+ "506cdc46e521578b6c6ba491b499779bf05f55fc",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/ordering0001-expected": [
+ "3d819593f5365165bfa02550e48084f37c81c33f",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/ordering0001-test": [
+ "ba6e85c44cdea2aa269ef170fe2d3a4c3a14e1ce",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0001-expected": [
+ "785d0a2f5f78a5bbf63c3b00c530cc60262598a5",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0001-test": [
+ "ed81cb955f7950fd77566362f7f8af6814b66653",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0002-expected": [
+ "2314ba0d4959934a91914ba987571706a5c9aacc",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0002-test": [
+ "224932851853336d065676fc736076da634d9fd3",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0003-expected": [
+ "2314ba0d4959934a91914ba987571706a5c9aacc",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0003-test": [
+ "e4b5a4b256507b53e1c31a9a20f7e9f345dabee2",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0004-expected": [
+ "785d0a2f5f78a5bbf63c3b00c530cc60262598a5",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0004-test": [
+ "a80ea6ec01587765bfdb02381887052568091c65",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0005-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0005-test": [
+ "6447c9164f9cfdb0a6fc8f65169a74221a779e94",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0006-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0006-test": [
+ "07ecf27b82b009bdd73e37f68f48732cb106655b",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0007-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0007-test": [
+ "66a54de7420a6e0dadb5bd8400b25b3455eb5be1",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0008-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0008-test": [
+ "b10012d30960832f462b18b01221ffae2a1c5c69",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0009-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0009-test": [
+ "874f21bad97d24903535b08c524fb2184982e6ea",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0010-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0010-test": [
+ "0ea62fd5ec5384c3d97a4908eff138c0a5befe99",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0011-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0011-test": [
+ "35ea0620495bb1f12f2df12c7eda5e545bbac41c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0012-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0012-test": [
+ "4c0577897bd90ba6b2c9c0bf37fa83e6265ae5c4",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0013-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0013-test": [
+ "d17b99b6b4365aae60f4aba2904e371a08a57e70",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0014-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0014-test": [
+ "a953e707b3b22b9b708b89f8e9ec36a2f807544c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0015-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0015-test": [
+ "253a9bb2fcdd16aabbe3e4fdedf49ae2e4371f7d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0016-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0016-test": [
+ "433faeb9120496a97b7b6e703b2c92280824a79d",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0017-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0017-test": [
+ "a602d7ca6fe9199ce50b6fc380a76bda5d348ca9",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0018-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0018-test": [
+ "37040dac5d32aef12ad7bd4b1facda7789f70b4e",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0019-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0019-test": [
+ "6d498600a2f4ea0268cb4af4a238b315940c0768",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0020-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0020-test": [
+ "603eded7ebd2198e5664d7c18e24540148c70526",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0021-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0021-test": [
+ "4577c510a42d8d118ca53d9b67e4176dae960e44",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0022-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0022-test": [
+ "4aade9e0145d5e71acea9ff937f65efbcfa4f970",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0023-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0023-test": [
+ "f14d683df977e47efa74bd6941e9d9d7452e6bea",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0024-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0024-test": [
+ "18a71c875b4adf92c91ad5bb538d6135fd1667a7",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0025-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0025-test": [
+ "b6c497b97158481e5da1a5b08f4cd2aa393b7e16",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0026-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0026-test": [
+ "ffc3b7a54fa34bdc163267fa86b3ebd3ca3cfc45",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0027-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0027-test": [
+ "bd021f33e2c0819a8afd2c9eb9279e8e067ecf6e",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0028-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0028-test": [
+ "3bcd6a5c657b3c39225d0d566717ac5aeddfa153",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0029-expected": [
+ "1022f64a2906dd854109026bbc6c3d286a5a5283",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0029-test": [
+ "17bd42f4212539fea41d5d402a23115bb26b1127",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0030-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0030-test": [
+ "e17a2d490b7871eb1d46d69d4dcafa19248c8100",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0031-expected": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0031-test": [
+ "3b24090b33841dd5b0ef6a3ce9770a1bdbe3dc86",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0032-expected": [
+ "e7403c4aadce372524b3ba71e480db4b6d28aa61",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/path0032-test": [
+ "db6ceb2ea0678332b9d9a9854463680f89f86e6b",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0001-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0001-test": [
+ "38b7dd296e613e2d659a7516f56ea6e00e80a507",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0002-expected": [
+ "9e96a81e3b4f787a158cd20a10e9defee7446948",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0002-test": [
+ "bed691f1809cf37eb44c8a1083e9544bf333c03a",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0003-expected": [
+ "5cc2d467ef724279da03a2af49535aa58382ee40",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0003-test": [
+ "ce1d455201dbef9b08ff18315d2cceef569d0346",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0004-expected": [
+ "400030f6f1d38f1833f1d8c960941f842b12a9e8",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0004-test": [
+ "c569216520ca270f46741ec3ad0acd20bdd77887",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0005-expected": [
+ "cad285f70867f41fdb4e4439d389b1f8171ee6ce",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0005-test": [
+ "514c0f125f1f4d9d116d5ccfef3a44998b340869",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0006-expected": [
+ "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c",
+ "support"
+ ],
+ "cookies/http-state/resources/test-files/value0006-test": [
+ "a939a8229149c1d2311379d1632b47dd184affd8",
+ "support"
+ ],
+ "cookies/http-state/value-tests.html": [
+ "cb09034ae8500ecf54294a0f4e58ee3c26af68bb",
+ "testharness"
+ ],
"cookies/meta-blocked.html": [
"1b86e65c87c65a78a31e0b8a1d6bfdbe333e08f6",
"testharness"
@@ -454818,11 +461719,11 @@
"testharness"
],
"cookies/prefix/__host.header.html": [
- "5a522cbaa018aa607628070ab79278dd855735bd",
+ "de46485e44c1d349143a9ec7681aea82d1561ee2",
"testharness"
],
"cookies/prefix/__host.header.https.html": [
- "53d0dba65989164f5fcb77becd021f264822ebf7",
+ "a71f75ef41bbcda09ed1dd4a6c666cb51f876fdd",
"testharness"
],
"cookies/prefix/__secure.document-cookie.html": [
@@ -454834,19 +461735,19 @@
"testharness"
],
"cookies/prefix/__secure.header.html": [
- "431e0e1ec98923feae1f1f6948c7728e5e80b007",
+ "fb369b62a3bb2e5526a28351813af162a31b4323",
"testharness"
],
"cookies/prefix/__secure.header.https.html": [
- "d912babc239acfecef7afb6f7deac9fbfeaf50bd",
+ "8753a320b4e5925bc2acb88861ee24c4cebe79af",
"testharness"
],
"cookies/prefix/document-cookie.non-secure.html": [
- "1b5edf76a298a18e40b3b4c3cb256b29b65f1a9a",
+ "dbf92207a136e5749f8afb100cbebd2113f9959e",
"testharness"
],
"cookies/resources/cookie-helper.sub.js": [
- "49cf0b1fdbf46dc0b045d35abf32e16dcb40d184",
+ "2974da9af069d0fa82779c7c250eb467283f558a",
"support"
],
"cookies/resources/drop.py": [
@@ -454894,7 +461795,7 @@
"support"
],
"cookies/resources/set.py": [
- "abfb8c8d40d2466759bb423bc8e7fdfc5d72b1fb",
+ "5b6d0b9a2cc4d233d101441bb10f47418da9b63d",
"support"
],
"cookies/resources/setSameSite.py": [
@@ -454942,17 +461843,13 @@
"testharness"
],
"cookies/samesite/window-open-reload.html": [
- "b37cff8286a17b14f8a07c4786a100cce7bb05b6",
+ "fd9c7a6d5a8c2ca8ac184dadf72b8d397e8af8cb",
"testharness"
],
"cookies/samesite/window-open.html": [
"1aa8e5e80bbf4319bb3903b228416a994723b4db",
"testharness"
],
- "cookies/secure/create-cookie-http.html": [
- "425f66fde5cbdc231c0c96b2e2b1d4fb3f9571ba",
- "testharness"
- ],
"cookies/secure/set-from-dom.https.sub.html": [
"46997db18ac738b5c3041e0010c0562db3813616",
"testharness"
@@ -456022,7 +462919,7 @@
"testharness"
],
"cors/simple-requests.htm": [
- "77ed8ee22e70d12471c9878caba9325ec0c6a026",
+ "be4b53495c61a61517a7a3699b9b01be194624c4",
"testharness"
],
"cors/status-async.htm": [
@@ -456078,7 +462975,7 @@
"support"
],
"css/.gitignore": [
- "3ed165f4bd692f6866a08fa094e2a6d73595e02a",
+ "7b1bd439b774021cdf9b79e6a12eee9c65ff74a1",
"support"
],
"css/.htaccess": [
@@ -456225,6 +463122,10 @@
"977f063bcaf6a6f8c013dbd31de597dbacde5e9f",
"reftest"
],
+ "css/CSS2/abspos/static-inside-table-cell.html": [
+ "712bfbaf1e8f2d6a7a8fdd8dfa65792770f004e3",
+ "reftest"
+ ],
"css/CSS2/abspos/table-caption-is-containing-block-001.html": [
"32ac681781c640bfc5bf498361520623197dc7ed",
"reftest"
@@ -467309,10 +474210,22 @@
"31d6fe104d7a41e1bdd3ce9e396bd02f6edef726",
"visual"
],
+ "css/CSS2/borders/groove-default.html": [
+ "c9028b9a2f4ce57857335862e1f81a30f8f1e535",
+ "reftest"
+ ],
+ "css/CSS2/borders/groove-ridge-default-notref.html": [
+ "5ead6432ccd2cbbfa412dd562faac03d4711c2c8",
+ "support"
+ ],
"css/CSS2/borders/ltr-borders-001.xht": [
"e46f42fd96ba305f9699fa6f270a70289d16c50d",
"visual"
],
+ "css/CSS2/borders/ridge-default.html": [
+ "4bd0bdf3aef8137b2a14e16ea2461c85b61fe4a6",
+ "reftest"
+ ],
"css/CSS2/borders/rtl-borders-001.xht": [
"3139fef544276525bd46f07f6c321e15eabec24b",
"visual"
@@ -474257,6 +481170,58 @@
"59843ae54b64f6ce4f7e616d4be491c911ea84cf",
"support"
],
+ "css/CSS2/floats/float-nowrap-1-notref.html": [
+ "540c8048af61a2c7804d99ff14c3a2bf1f87e6ad",
+ "support"
+ ],
+ "css/CSS2/floats/float-nowrap-1.html": [
+ "656b9398e6b771b5cf0545a1a40bcb36a115301b",
+ "reftest_node"
+ ],
+ "css/CSS2/floats/float-nowrap-2.html": [
+ "fc8e11fadc5e66bc49bbddea99aeed0c4019bec0",
+ "reftest"
+ ],
+ "css/CSS2/floats/float-nowrap-3-ref.html": [
+ "e7556a213662453f22cdcbee2adf3b21e00d6ce6",
+ "reftest_node"
+ ],
+ "css/CSS2/floats/float-nowrap-3.html": [
+ "dbc643c8ca97230ab252769b4278065aec844160",
+ "reftest"
+ ],
+ "css/CSS2/floats/float-nowrap-4-ref.html": [
+ "a8c7b060819839dd1e7107a327dfbf32fb1ea794",
+ "support"
+ ],
+ "css/CSS2/floats/float-nowrap-4.html": [
+ "bf11e6e31c416e85580bc4792b2b3503dd87f99b",
+ "reftest_node"
+ ],
+ "css/CSS2/floats/float-nowrap-5-ref.html": [
+ "7f400841037cfb79bafa2c41d3834cdd942445f4",
+ "support"
+ ],
+ "css/CSS2/floats/float-nowrap-5.html": [
+ "f4403cfb838126b726ef70906d2f8df7bb733f48",
+ "reftest"
+ ],
+ "css/CSS2/floats/float-nowrap-6.html": [
+ "7c6bf9c0db6a112e364760b3320dcff3265be5c8",
+ "reftest"
+ ],
+ "css/CSS2/floats/float-nowrap-7.html": [
+ "bef462d995608e13ae943329022220c55a1f315e",
+ "reftest"
+ ],
+ "css/CSS2/floats/float-nowrap-8.html": [
+ "8c2653193d643a452a416f9e41eb8d8397ab0058",
+ "reftest"
+ ],
+ "css/CSS2/floats/float-nowrap-9.html": [
+ "b4a6b2923097f9f9957d940db42d335b22e73def",
+ "reftest"
+ ],
"css/CSS2/floats/floated-table-wider-than-specified.html": [
"f93d50e43dd3eb49d5c8964200b7fe4ebb5bd6c8",
"reftest"
@@ -479121,6 +486086,14 @@
"4a3318f1cdc7c7cf3edb8bcab8cfdaef655bf765",
"reftest"
],
+ "css/CSS2/linebox/anonymous-inline-inherit-001-ref.html": [
+ "e97da2169d55e5dec9a2888cb534bc7321a1c5e1",
+ "support"
+ ],
+ "css/CSS2/linebox/anonymous-inline-inherit-001.html": [
+ "77904d80e459037e029467479db2c101f0d383b8",
+ "reftest"
+ ],
"css/CSS2/linebox/border-padding-bleed-001-ref.xht": [
"10fe3e08b45a5722b27e2a16bf806b116958d9c2",
"support"
@@ -480285,6 +487258,14 @@
"6d1d7411b8efb9b04a73cf27fb1d3b0abcff733d",
"visual"
],
+ "css/CSS2/linebox/vertical-align-nested-top-001-ref.html": [
+ "1fd155e38013e555c140908310c36b1416ac2ded",
+ "support"
+ ],
+ "css/CSS2/linebox/vertical-align-nested-top-001.html": [
+ "3667ced2ca39adfdb1d90fa843ebce6249eecb4e",
+ "reftest"
+ ],
"css/CSS2/linebox/vertical-align-sub-001-ref.xht": [
"9167843266f8ba8954df276e537100fe0ac42a44",
"support"
@@ -486093,6 +493074,10 @@
"b3a7420c630ad4c84e5593ad48f48f3072a88b98",
"visual"
],
+ "css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html": [
+ "a3794579f0ea242f9e7faaffcc16de5a3a69cf7c",
+ "reftest"
+ ],
"css/CSS2/normal-flow/height-001-ref.xht": [
"6d9a9e39bad87e33d33252aae31e85cb5b47f877",
"support"
@@ -490853,6 +497838,10 @@
"7e5880b10637e39055b428c3411d86b2c6dc0daa",
"reftest"
],
+ "css/CSS2/positioning/abspos-inline-008.xht": [
+ "9233b4373e5e4dc5beb6713a9af1de861c5cf4d9",
+ "reftest"
+ ],
"css/CSS2/positioning/abspos-overflow-001-ref.xht": [
"ba7e87c6a7c18a9335b51e07052ab47631299c9b",
"support"
@@ -514630,33 +521619,29 @@
"support"
],
"css/compositing/parsing/background-blend-mode-invalid.html": [
- "f939195f3e5cced1a5a71271b69aae00f60a451c",
+ "4fdd3d36ed96fede6396f3ed5db7fbb7115fee7e",
"testharness"
],
"css/compositing/parsing/background-blend-mode-valid.html": [
- "4f1cfb8dcafdeeed5f78e3768463238d4e7d449c",
+ "151a01c75a5a769cc745d3b15937fe3ce40ec388",
"testharness"
],
"css/compositing/parsing/isolation-invalid.html": [
- "8278431ad8a9883d8279576e79e6cd5daa37e30a",
+ "d5b8f49c61374e05b8afd396c5503a00d5b2f361",
"testharness"
],
"css/compositing/parsing/isolation-valid.html": [
- "430533858ebdc2f952876fc3658e5fe1bb7d6b30",
+ "252ff138e0f29d34569665eb63eb3fe800edd4b7",
"testharness"
],
"css/compositing/parsing/mix-blend-mode-invalid.html": [
- "c62ef1369dfedaba2305b6f12b8ea5a4c2aff0eb",
+ "e73d28e585a930c5ec933f60124b08702926d971",
"testharness"
],
"css/compositing/parsing/mix-blend-mode-valid.html": [
- "324961499742adfb8c4dc84b5e939f22377ad624",
+ "c6393343dff89a6e5a5a5087675145cb1ec1de83",
"testharness"
],
- "css/compositing/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/compositing/svg/mix-blend-mode-in-svg-image.html": [
"658e0275d70b357b210ae70243a2f58b9752910c",
"reftest"
@@ -515393,6 +522378,70 @@
"1d3ed2b9b806792c7efaeeee9ab264101dd222bc",
"testharness"
],
+ "css/css-animations/parsing/animation-delay-invalid.html": [
+ "a58d2cd11bc572d3a7899fb70b8b04adbd76a713",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-delay-valid.html": [
+ "5ff0416cc64241f81025f39af20d186042d49a30",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-direction-invalid.html": [
+ "0b48d97f0a1bb670daec7335049aa486810a2cde",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-direction-valid.html": [
+ "bcc9acc3428cfcdadc6d48fc0fa01d51eb747452",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-duration-invalid.html": [
+ "5edacd3735e4f3ac0c0724415b3ca0052f10d33b",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-duration-valid.html": [
+ "e65a1a707246eb2c1773da17c355d71118fd0db4",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-fill-mode-invalid.html": [
+ "dda2221f4746a64778ea4c5a82fa42c35243a342",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-fill-mode-valid.html": [
+ "1f73a821d15119d6a8fc2720d53f6cefdd29fb5d",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-iteration-count-invalid.html": [
+ "ff1e8e23a08cf58c08922eb40145e916852c0562",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-iteration-count-valid.html": [
+ "be8a83798908a6771b935e38fe7a8608be9821ed",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-name-invalid.html": [
+ "77d53f990b1607c07a07648b5f0283f9fb5e4fbf",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-name-valid.html": [
+ "9ed73d4d15ff615c4318719bc8802796a88149c8",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-play-state-invalid.html": [
+ "f47a2f75ddfc35a279037ada8df34077bd1308ab",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-play-state-valid.html": [
+ "ce6d053ec2736ec8d5e8420b3d1a1e4f07fd04ed",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-timing-function-invalid.html": [
+ "adc1cc10e39d09df78c4398ffca008739d751076",
+ "testharness"
+ ],
+ "css/css-animations/parsing/animation-timing-function-valid.html": [
+ "63e2805485bfb1f8db9dfe3ad70979ade7e11cd4",
+ "testharness"
+ ],
"css/css-animations/pending-style-changes-001.html": [
"fb74d7fa7d062d60153d47913df9eb2b0c7267c8",
"testharness"
@@ -518102,177 +525151,173 @@
"visual"
],
"css/css-backgrounds/parsing/background-attachment-invalid.html": [
- "68b18dcc2d06de654ca34042f67e5182a9ea1ff5",
+ "30757f3a4d02a9b1d1fc82c19255804ee2b20ae9",
"testharness"
],
"css/css-backgrounds/parsing/background-attachment-valid.html": [
- "600f310b4628c9f1f83c89edc42bd96f084b5aff",
+ "14d72c606ba52e85d296a5404c2546486765cd42",
"testharness"
],
"css/css-backgrounds/parsing/background-clip-invalid.html": [
- "c2492a2a94a937dd0e526dd06065c4564605e0d9",
+ "96831e06fc9cce1c9c45e4d44c83f04d2350d0ab",
"testharness"
],
"css/css-backgrounds/parsing/background-clip-valid.html": [
- "5350a17cbec0a698574b018feb6ef0c6a6164153",
+ "e262a788bd0296deb0429fd4fc4257390776680a",
"testharness"
],
"css/css-backgrounds/parsing/background-color-invalid.html": [
- "d7c688d6b6a68aae309d5dd4fc63709adb76d901",
+ "b94875402d89839fdb717883f11eff7f880036bf",
"testharness"
],
"css/css-backgrounds/parsing/background-color-valid.html": [
- "d7e864c29b9304907b46cb7e7f973f965726ff8f",
+ "3859b932c82287c0e103f1a7aebb1ed190b735a0",
"testharness"
],
"css/css-backgrounds/parsing/background-image-invalid.html": [
- "43d7f67b3e9124bfcb53e4efd508f644c9f7874d",
+ "eaba64a715ce71a9f828569a24df51f1476664dd",
"testharness"
],
"css/css-backgrounds/parsing/background-image-valid.html": [
- "ffbf33b6d6497d77f02eb5a4e14204ea4d2f642c",
+ "51c67b96ccb52ac09ef6d78e598506317ff784ab",
"testharness"
],
"css/css-backgrounds/parsing/background-invalid.html": [
- "c3deef9bc90abc28e5f4c2fb72c0eea922c94399",
+ "4ea58da801961ba9c8a315ebb0b1de846e16f889",
"testharness"
],
"css/css-backgrounds/parsing/background-origin-invalid.html": [
- "9eead06baebb98ab560b0012d9e8dbb9b1d74be5",
+ "5da00dabe33473254830990c43375ac349eea330",
"testharness"
],
"css/css-backgrounds/parsing/background-origin-valid.html": [
- "1c19b96ec430c210ca74ed0686a43ebfa5f142f0",
+ "7e3b0fffcad133948567c5a31b9dcb232891e610",
"testharness"
],
"css/css-backgrounds/parsing/background-position-invalid.html": [
- "583606e14d28ea1e2782e12e382d72be51a2467d",
+ "bb974afd9f41d8ca4f0ac82db10e57e4bf6d74b7",
"testharness"
],
"css/css-backgrounds/parsing/background-position-valid.html": [
- "dbb97406a5a0492fee2f7fbe16e790736b717e20",
+ "1c05517c62aeee4f2d4837a3a9cf7b8880bd6e19",
"testharness"
],
"css/css-backgrounds/parsing/background-repeat-invalid.html": [
- "3ae01662d08caa6695c607e882a9eb57c3257eac",
+ "abb153378f4ce02507d39c5a5a979689df58c8ba",
"testharness"
],
"css/css-backgrounds/parsing/background-repeat-valid.html": [
- "b69eb5ff03001d0fa68cb52b0883122f11b349f9",
+ "2f72e03c73332dcf4356796ea3164fe170a21620",
"testharness"
],
"css/css-backgrounds/parsing/background-size-invalid.html": [
- "cfb9a1c077cd282b63a160da6b0377b3e6587771",
+ "01a0322002bc4fecc9c48d2266e39d1c2da3e500",
"testharness"
],
"css/css-backgrounds/parsing/background-size-valid.html": [
- "224421177467c40821e34c537c166e724f0ec7a7",
+ "c169232cb32757d477612f064ebfd028b6c49009",
"testharness"
],
"css/css-backgrounds/parsing/background-valid.html": [
- "96529e5604a60595ab01e5d86e6679397a534d9b",
+ "41a334598f21ed9ac70a73c0307d7607039e5fe8",
"testharness"
],
"css/css-backgrounds/parsing/border-color-invalid.html": [
- "3916c4f2ecbdc92f282628923f87f485ee5b838f",
+ "6e4d28e7983d62979f4dad843c007b964db00706",
"testharness"
],
"css/css-backgrounds/parsing/border-color-valid.html": [
- "63532a99a4b0310c1cf5a4d260bc9876c0dcb6c7",
+ "a4cd7748ac207427812235e9868012b1a193641c",
"testharness"
],
"css/css-backgrounds/parsing/border-image-invalid.html": [
- "08c61dfb5549b4fe0f702a222ec0e6810bab9145",
+ "273fc0a7bf706151fcfe11199cbb7c5aff771100",
"testharness"
],
"css/css-backgrounds/parsing/border-image-outset-invalid.html": [
- "4faaa3ca0d977e2abaf57cd4fa394ddc1c7d6029",
+ "4102f603424d4673fe1432fcf7784fa285fbd9b9",
"testharness"
],
"css/css-backgrounds/parsing/border-image-outset-valid.html": [
- "781a6e0a8abe8da4fb32ed4ff812e5f7c1daebe7",
+ "ee85af87677f97d9e6263fade32e4beafe913009",
"testharness"
],
"css/css-backgrounds/parsing/border-image-repeat-invalid.html": [
- "962ab22fbf003d46b1f0747e2546410402f8c007",
+ "de0998dcc5bf85a650560c8a97266159c2bffb26",
"testharness"
],
"css/css-backgrounds/parsing/border-image-repeat-valid.html": [
- "381b059523555db30c3eaef03748e92812b0071c",
+ "f90ef71191e48ee399eac37cea9c356faaa486f5",
"testharness"
],
"css/css-backgrounds/parsing/border-image-slice-invalid.html": [
- "4ccf441f75aa7c14fec8277644faf2db38d30eaf",
+ "c62a43d6b37422ae8ae3ea86b630bf3a38317a2e",
"testharness"
],
"css/css-backgrounds/parsing/border-image-slice-valid.html": [
- "297319442383e83356902e512299cfeea4a1b22c",
+ "671120b41b7e55bddd2c286dc7ce4807ce9c3665",
"testharness"
],
"css/css-backgrounds/parsing/border-image-source-invalid.html": [
- "28edd7855df021804834a78cfd522e457268917e",
+ "8b1240a0d95296168cb1b7274a3ce3b8503a9341",
"testharness"
],
"css/css-backgrounds/parsing/border-image-source-valid.html": [
- "c080d395078e41871a050a9893a05bd788ad477a",
+ "7fbbbd9e95d434375ca7322f88fe7e56016210bf",
"testharness"
],
"css/css-backgrounds/parsing/border-image-valid.html": [
- "8bf9cd51fcd3eda774c309c875f9fb72fce3bfc4",
+ "67d22c18e2c6538a885b50ed6e65f56c1d146952",
"testharness"
],
"css/css-backgrounds/parsing/border-image-width-invalid.html": [
- "445972353775d44df07c5d15f1e56c5c1f26ea7f",
+ "b3e9359749b00825c581040d06415d8f2efd7445",
"testharness"
],
"css/css-backgrounds/parsing/border-image-width-valid.html": [
- "e1316c337087947407677e563c3c665b5afc9747",
+ "ce8b9a9455ec587c645d659b4788b4d97582c6a3",
"testharness"
],
"css/css-backgrounds/parsing/border-invalid.html": [
- "a3d28dfbac05749156734f8877119d408535e506",
+ "71404f2ce3e18fe336f076ce72ad028c4f665861",
"testharness"
],
"css/css-backgrounds/parsing/border-radius-invalid.html": [
- "9d767a961ea67c2e01290b2eb6cc1436894e0579",
+ "4e004af8f36beb4651a8069e38f246136bb35451",
"testharness"
],
"css/css-backgrounds/parsing/border-radius-valid.html": [
- "40a9d9e8e4083675eaf8c0445ac2f79416adf117",
+ "317803bf8819b2147390434e78d4efdcdc6d906b",
"testharness"
],
"css/css-backgrounds/parsing/border-style-invalid.html": [
- "42bd61ad1e91905f765a75ab8213451113f9ba5c",
+ "27fa45116fd150d69a77850f837ee43f7032c601",
"testharness"
],
"css/css-backgrounds/parsing/border-style-valid.html": [
- "10fa39bbf6cdd67ba7828db90e266753b09351c4",
+ "0b592180280ce6c8eb87567e1c39f197353365c3",
"testharness"
],
"css/css-backgrounds/parsing/border-valid.html": [
- "5ca8bbdc43ec9a38c1495e308495287338913ef2",
+ "37b876ce4e97b2aa2ae08cb3447d42a658fcf56d",
"testharness"
],
"css/css-backgrounds/parsing/border-width-invalid.html": [
- "2edd05ea42b8b4b00a121d50b219da7d446297db",
+ "ec7eb72a9ac404a59390b9c89f7ae710f6620412",
"testharness"
],
"css/css-backgrounds/parsing/border-width-valid.html": [
- "5a9b174c91531af56b5e42bda2b9df813629464e",
+ "552416df3d2fe1a08aeb8145c5d263770543aa5e",
"testharness"
],
"css/css-backgrounds/parsing/box-shadow-invalid.html": [
- "a38ae2fce74292e537cdaed849c939df6921c060",
+ "44f074d05a85fbdf183544da5c6fb5af075ea8da",
"testharness"
],
"css/css-backgrounds/parsing/box-shadow-valid.html": [
- "be72b78cbbe42898a8693706d57852fd71cdb4d0",
+ "a3b172e1bab552d86acce7ab924a2a9111507da5",
"testharness"
],
- "css/css-backgrounds/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-backgrounds/reference/60x60-green-background.html": [
"d19ed4ea2678a45bbe53838d6eebf61ab641bcdd",
"support"
@@ -518858,103 +525903,99 @@
"support"
],
"css/css-box/parsing/clear-invalid.html": [
- "636704330e3c36608d925d370a5e8f056031fbb7",
+ "38d1821bc8189a5b42c4c0fa75b0195d69b5a91f",
"testharness"
],
"css/css-box/parsing/clear-valid.html": [
- "a849f6c06de9e519c91e83b0fc4e1798cbb88ee9",
+ "b27350e1791adf0318c556b77c12386c328fef9a",
"testharness"
],
"css/css-box/parsing/float-invalid.html": [
- "8c3d28f578a62c18a9ae276a52cef2a52360170d",
+ "c11f4e2e66cc291e100419e1b1d0224604c0e7fd",
"testharness"
],
"css/css-box/parsing/float-valid.html": [
- "9ff6ef43a22fd8a3c55fa2a5fdcac2b114c8bd42",
+ "a8fc605325ff0dcd027110aecd42bf35f90d316c",
"testharness"
],
"css/css-box/parsing/height-invalid.html": [
- "f15bd27de808fbec41df51fe3c884437873ce22f",
+ "dcd4d1afbe176689b999a80cbb8df80d1aa971bf",
"testharness"
],
"css/css-box/parsing/height-valid.html": [
- "a89ec6b5502928fddd8eb62002489d61fbdc1b81",
+ "7cc09a594ed17648ec29b9bdc2615fa6dbcbd3a7",
"testharness"
],
"css/css-box/parsing/margin-invalid.html": [
- "917fc927e9dd8d21c3900ede47b8e2a789651527",
+ "77009170938d9634497f73bc21501ced502c7008",
"testharness"
],
"css/css-box/parsing/margin-valid.html": [
- "1715a9c924e702768bae5f7b55b942bf6824d7e1",
+ "154aa2de7cb16ca0845f8368e731ec5c941108cb",
"testharness"
],
"css/css-box/parsing/max-height-invalid.html": [
- "61c85d129102fd96e57970e165164944ad8e2102",
+ "aeb6e6480811b7c9f9805b9b8fc1215e973028e0",
"testharness"
],
"css/css-box/parsing/max-height-valid.html": [
- "ca58cec3a9cdff2952f9770ae4df8f939c22a8a4",
+ "04880c4903ce34458fb462b0718aa6eb475f4143",
"testharness"
],
"css/css-box/parsing/max-width-invalid.html": [
- "57bcbbf168c88324ac2919f063701ffcb7a37a85",
+ "03db7e26578583625db56b1e400be58705937745",
"testharness"
],
"css/css-box/parsing/max-width-valid.html": [
- "e098b804c08bd86f228a0f3d3be4c02c111f17ed",
+ "1e08a820d9dd1dc98f2bd0ada5550e32081d2e75",
"testharness"
],
"css/css-box/parsing/min-height-invalid.html": [
- "26a1e10a34c5e8a5f1c2df7a89b08b25341dc132",
+ "edc480e1e897e1a46edf8e8aa64d1b4486f96fde",
"testharness"
],
"css/css-box/parsing/min-height-valid.html": [
- "576a5c07989ef187008545000148747032f8d2fb",
+ "0154c02b7b913681515878471553791d9e8a7d45",
"testharness"
],
"css/css-box/parsing/min-width-invalid.html": [
- "d71777fea6c2de47fc0f2243b4af1c21b15c6509",
+ "e89826fb05694890f3469291316db1e2f4a569b9",
"testharness"
],
"css/css-box/parsing/min-width-valid.html": [
- "406452dd583f40532ce6f904785264d9a16ed366",
+ "f745b66bd43e24460548b9d5fd3a6d0e46bf4284",
"testharness"
],
"css/css-box/parsing/overflow-invalid.html": [
- "bf3ee3d72ba35abe941a6e298a43939107db0a10",
+ "4747764fb6a4ddd6fadf08d970753923d4afb42b",
"testharness"
],
"css/css-box/parsing/overflow-valid.html": [
- "6bef585856c3d038e63f9d24a06b75d3b5f2a7db",
+ "1bfeec236460ff47ccbea842ceffd3abe733a61b",
"testharness"
],
"css/css-box/parsing/padding-invalid.html": [
- "7e172efed30f45166747ccedd45d22bbf904ba6b",
+ "e995ac616a1dca834cbe53c91e02052047e32f4a",
"testharness"
],
"css/css-box/parsing/padding-valid.html": [
- "e5a932e1417400947c07ab5150297da174c2c354",
+ "ba3c3a7fd4aabdf998fbc39bbd9aee429d9ac564",
"testharness"
],
- "css/css-box/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-box/parsing/visibility-invalid.html": [
- "892ca54815f67f029bb3c7c2aefb48dacd8a0851",
+ "73e611b2b80bc8645fd057d8922663573daf6978",
"testharness"
],
"css/css-box/parsing/visibility-valid.html": [
- "2c1143dfa5c320a5270e47adc36b0a3ced979976",
+ "2ab2f49660759ad2f49521e7bd78d80ac2adb45b",
"testharness"
],
"css/css-box/parsing/width-invalid.html": [
- "bcbb3d663ae3190ca33ea7cef3b8176b3e50ea9b",
+ "5a0145fe1d10e3cfa9e2defdf721d5bb8f3d8168",
"testharness"
],
"css/css-box/parsing/width-valid.html": [
- "653b11e993cf99c4196582440cb45bd144c4f38b",
+ "93059bd2d3aa1ad4cf43e020450e8253f0563fe6",
"testharness"
],
"css/css-break/META.yml": [
@@ -518969,6 +526010,26 @@
"4d0fc7eccc45e44480b4305632ceac2068c59919",
"testharness"
],
+ "css/css-break/reference/widows-orphans-001-ref.html": [
+ "06108ac800c19c68841f2a0e8867fb05e868c1ab",
+ "support"
+ ],
+ "css/css-break/widows-orphans-001.html": [
+ "8da27f0b6594fc7ddd90bdb160be8f80a9479038",
+ "reftest"
+ ],
+ "css/css-break/widows-orphans-002.html": [
+ "cf9afe7c033438162bcfc15f527f73ae370652b4",
+ "reftest"
+ ],
+ "css/css-break/widows-orphans-003.html": [
+ "311148409267e02ccd9b8819883ac05c2e82d407",
+ "reftest"
+ ],
+ "css/css-break/widows-orphans-004.html": [
+ "3e226d9e41e42fc79a9a3ac967fc935f68f7e061",
+ "reftest"
+ ],
"css/css-cascade/META.yml": [
"96467729fe91cef54b0bf5cc82d83e9f2a5c01ed",
"support"
@@ -519010,17 +526071,13 @@
"reftest"
],
"css/css-cascade/parsing/all-invalid.html": [
- "8b7c044a0341ad732640b7a827c9f24a9c1d4f5f",
+ "4a1d045ecc84806fb3cf2f14a344d27c40e5bfd8",
"testharness"
],
"css/css-cascade/parsing/all-valid.html": [
- "668a6c2424125c8d84de85ec6dee694e7cc4799f",
+ "3a9e5922de5e289b60d1b6220301f1f9a6bfb49f",
"testharness"
],
- "css/css-cascade/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-cascade/reference/ref-filled-green-100px-square.xht": [
"05a13794482a94f6c10bd9d4c98704e63ef60331",
"support"
@@ -519278,25 +526335,21 @@
"reftest"
],
"css/css-color/parsing/color-invalid.html": [
- "fe44aad6fc6a3d9805f2f29ce84970468224e6d1",
+ "676ffb315a98c1ba686bf237e2fdc82e1b0ba691",
"testharness"
],
"css/css-color/parsing/color-valid.html": [
- "fb240182c31a2d3056aa68a52cdc04cdbbbe421a",
+ "70e2450c77f26391ddea1c42dbed4de5d0f817b5",
"testharness"
],
"css/css-color/parsing/opacity-invalid.html": [
- "d9b9cc86abb0de9c55336b3872a7a61d25f228b8",
+ "1bcf4c5b64b07dd0f2097329631cff92c92dd292",
"testharness"
],
"css/css-color/parsing/opacity-valid.html": [
- "8ae302e09f34c5593f58f352adab88fccc906b97",
+ "f9bb9b65014d86c97f0072de68de9581e87ed8d1",
"testharness"
],
- "css/css-color/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-color/rebeccapurple-ref.html": [
"8c15364f38e53cc1651f2f6c115c7b2fca3f4ba9",
"support"
@@ -520041,6 +527094,10 @@
"259c00b2a587c9aa2d07de97fb547b32f9772b92",
"support"
],
+ "css/css-contain/contain-animation-001.html": [
+ "449221428c3d76d31ff84a5792c7578c36cbebed",
+ "reftest"
+ ],
"css/css-contain/contain-layout-001.html": [
"85b959da2b9a151c13be3dc83485646341752915",
"reftest"
@@ -520109,6 +527166,14 @@
"c8118ad974844cd807e0dfbcc07a9a06469a308c",
"reftest"
],
+ "css/css-contain/contain-layout-018.html": [
+ "5d7ebc0195cbbb7bc303784ab05296885c323f40",
+ "reftest"
+ ],
+ "css/css-contain/contain-layout-baseline-001.html": [
+ "ed2471a62614bf961cf2cd9441256ac02d3d6f6b",
+ "reftest"
+ ],
"css/css-contain/contain-layout-breaks-001.html": [
"a85cf2c6c8e00f1d21fa5a63da81eff8148f3d71",
"reftest"
@@ -520257,6 +527322,10 @@
"79ef8a7cc0841ab96b1650cb2e78d210a9432180",
"reftest"
],
+ "css/css-contain/contain-paint-025.html": [
+ "0a41b62b2c169d2a5e571bde059a78ad2d5c2a16",
+ "reftest"
+ ],
"css/css-contain/contain-paint-047.html": [
"e4a0b28457c752232f4314175ffdf1840f7e336a",
"reftest"
@@ -520265,6 +527334,10 @@
"e48fcb64a4acbb8683730c58577ba530487a5ad9",
"reftest"
],
+ "css/css-contain/contain-paint-baseline-001.html": [
+ "3f84a3003a2a991a745198e2ad97938754462ef7",
+ "reftest"
+ ],
"css/css-contain/contain-paint-cell-001.html": [
"d66a16944ecadca57a585a4514024b198c19478f",
"reftest"
@@ -520417,6 +527490,10 @@
"60cb194242894b540aaa50c6990e7cbcb491e27e",
"reftest"
],
+ "css/css-contain/contain-size-baseline-001.html": [
+ "0ffed1b3b6a08831792b0a5ac40d1340c142c48d",
+ "reftest"
+ ],
"css/css-contain/contain-size-borders.html": [
"16b5b06295fcc0b44944b1b92afa3ee42271b68f",
"reftest"
@@ -520437,10 +527514,22 @@
"f67f0e118e00b3426986b39226310c59b14a3755",
"reftest"
],
+ "css/css-contain/contain-size-grid-002.html": [
+ "1e7771e7c12b9c5c879e52071f9f566bd6e2b7d7",
+ "reftest"
+ ],
"css/css-contain/contain-size-monolithic-001.html": [
"30f19b6cbbd6f6737d5175b1946c17805e0568d6",
"reftest"
],
+ "css/css-contain/contain-size-multicol-001.html": [
+ "5c0dba9b7bb56792542decc9abd8fcebd8ab967a",
+ "reftest"
+ ],
+ "css/css-contain/contain-size-scrollbars-001.html": [
+ "304e81e5c98c0ded48c9c498e451dd6c0041566b",
+ "reftest"
+ ],
"css/css-contain/contain-strict-001.html": [
"142730c5cd3a0048027e5bf41cca397e3facad60",
"reftest"
@@ -520453,6 +527542,10 @@
"792710cd87d8ee0813838dd39847f9dd2db2e2a9",
"reftest"
],
+ "css/css-contain/contain-style-baseline-001.html": [
+ "f05d20982833077d53ecad3340065aee7e0ca8cd",
+ "reftest"
+ ],
"css/css-contain/contain-style-breaks-001.html": [
"9e5c27a075eddb80dfd9305abcba50aeefec5088",
"reftest"
@@ -520521,6 +527614,10 @@
"d86382be08532323baad174808181e338adbc932",
"reftest"
],
+ "css/css-contain/reference/contain-baseline-ref.html": [
+ "1fdecb1c33149af52c48c105bce8ad91904bad44",
+ "support"
+ ],
"css/css-contain/reference/contain-layout-breaks-002-ref.html": [
"c68bee1d0aa4f9201fb6e48cc25199f373128ca8",
"support"
@@ -520645,6 +527742,10 @@
"2e8f1ba70aae799b64d0917b1a5e3b70c595ac69",
"support"
],
+ "css/css-contain/reference/contain-size-scrollbars-001-ref.html": [
+ "402ff6c95e14c7c6dbe6e91cd779937bf6c4caa8",
+ "support"
+ ],
"css/css-contain/reference/contain-style-breaks-001-ref.html": [
"2c0b758e6bf83ab83444422d39535e14af8c1ab1",
"support"
@@ -520658,7 +527759,7 @@
"support"
],
"css/css-contain/reference/contain-style-counters-003-ref.html": [
- "8eb67b5943fa41db2320d51e92277dced3029f6e",
+ "12f9b989fd2402d5e8af279cd03f03931856270e",
"support"
],
"css/css-contain/reference/counter-scoping-001-ref.html": [
@@ -520689,10 +527790,6 @@
"a5b4e9f47a8e60ad0bede1ac81e02b3542c80f3b",
"support"
],
- "css/css-contain/support/60x60-red.png": [
- "823f125b8e4a60f780f00443c9c9a10b9fa1f447",
- "support"
- ],
"css/css-contain/support/blue-100x100.png": [
"3b72d5ce53c07b68fe508bb57aa61a933dbda768",
"support"
@@ -521578,7 +528675,7 @@
"reftest"
],
"css/css-display/display-contents-fieldset-nested-legend-ref.html": [
- "6f547b3201c3b3c2521102ecbcf144df28447f7a",
+ "c4afe0e53ba02d47bc0704eb71801aec602759be",
"support"
],
"css/css-display/display-contents-fieldset-nested-legend.html": [
@@ -521793,6 +528890,14 @@
"f8d6e85cee2325f3ae51a950a276430d26c04189",
"testharness"
],
+ "css/css-display/parsing/display-invalid.html": [
+ "70516ad4901f684b9d0ecd49a82671172fbc8f14",
+ "testharness"
+ ],
+ "css/css-display/parsing/display-valid.html": [
+ "efa48350a62dd0210009069475ac9243bba51104",
+ "testharness"
+ ],
"css/css-display/run-in/META.yml": [
"ad40907fb0382fb83be02ad10e05031e284f3b9f",
"support"
@@ -522885,6 +529990,18 @@
"8d0683319b0fbbd1262cbdd12cdbcb727b2aa9a0",
"support"
],
+ "css/css-filter/blur-clip-stacking-context-001.html": [
+ "a96994a8afe126e474f9ee015338749f0015dc1f",
+ "reftest"
+ ],
+ "css/css-filter/blur-clip-stacking-context-002.html": [
+ "0473f12949446da04849386ffea69e7436703010",
+ "reftest"
+ ],
+ "css/css-filter/blur-clip-stacking-context-ref.html": [
+ "82b907334fd71791cd2f6530e2e85169e29afa41",
+ "support"
+ ],
"css/css-filter/filtered-block-is-container-ref.html": [
"fc9467f8717dfc722dcb6dbbbb31bfd8c2baee3b",
"support"
@@ -525577,6 +532694,10 @@
"4f162487a711c78f48bf457d3fb0764bb5f2b746",
"reftest"
],
+ "css/css-flexbox/percentage-heights-quirks-node.html": [
+ "4b254b46467d6abff049090d5f37b1f3b3f6178e",
+ "reftest"
+ ],
"css/css-flexbox/percentage-size-subitems-001.html": [
"70f3953052a3a770c6cd15ee169607a00fc452b0",
"reftest"
@@ -533294,7 +540415,7 @@
"support"
],
"css/css-fonts/variations/at-font-face-descriptors.html": [
- "ece5b4be9b93622346e43fc79915f8f9cc8c48c1",
+ "942686c4a1fd0f3d3807f5fdb114e3e154b1577e",
"testharness"
],
"css/css-fonts/variations/at-font-face-font-matching.html": [
@@ -534918,11 +542039,11 @@
"testharness"
],
"css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html": [
- "b35b16d648da2868808213c2d16ef58c53c500a6",
+ "79dd1d4350678da4ea99cf9fdf9c965db659a897",
"testharness"
],
"css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-002.html": [
- "4d0f506c7b6514c1e610f630309c6bf201f59427",
+ "3232913cb1328c0367f09ca8996b8c22e09cc2e0",
"testharness"
],
"css/css-grid/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-001.html": [
@@ -535769,6 +542890,46 @@
"29eca9dbc6f5738f7d6f929385453d64dcdf0aea",
"reftest"
],
+ "css/css-grid/parsing/grid-area-invalid.html": [
+ "b989322775eb7dbf273a3dc3fbb3d1af31f524ba",
+ "testharness"
+ ],
+ "css/css-grid/parsing/grid-area-valid.html": [
+ "8e7d0d43d1cfac44935593892b67fdb40b179791",
+ "testharness"
+ ],
+ "css/css-grid/parsing/grid-auto-columns-invalid.html": [
+ "e7a965f34ad35f32589b6fc895d65946812e0749",
+ "testharness"
+ ],
+ "css/css-grid/parsing/grid-auto-columns-valid.html": [
+ "ba1f5f60d657ebd2629c94b90c971bb081ea7917",
+ "testharness"
+ ],
+ "css/css-grid/parsing/grid-auto-flow-invalid.html": [
+ "a261e8eba11fd295eb33c9288a7e30f589374331",
+ "testharness"
+ ],
+ "css/css-grid/parsing/grid-auto-flow-valid.html": [
+ "4270a3df933f372792139cae7c39344ff69482dc",
+ "testharness"
+ ],
+ "css/css-grid/parsing/grid-auto-rows-invalid.html": [
+ "7fceaa0f1639494847cc06a7f93876992d620b3c",
+ "testharness"
+ ],
+ "css/css-grid/parsing/grid-auto-rows-valid.html": [
+ "cf63e2b7d52a6fffc5577bc55e37dfd6aa0cd5b8",
+ "testharness"
+ ],
+ "css/css-grid/parsing/grid-template-areas-invalid.html": [
+ "5bc70c5697a2a642ce80b902851f3687eba901d7",
+ "testharness"
+ ],
+ "css/css-grid/parsing/grid-template-areas-valid.html": [
+ "8d8f6823267eea15e987ea89e992f1ed0b2f7726",
+ "testharness"
+ ],
"css/css-grid/placement/grid-layout-grid-span.html": [
"21aad99708c96942c196ada03beaded1d73a1078",
"reftest"
@@ -535978,57 +543139,53 @@
"support"
],
"css/css-images/parsing/gradient-position-invalid.html": [
- "626b9f130724b028eaebc96c9b49a241042f78e6",
+ "63ac09fc17ede201f4008f68d5b6c626bbe5f238",
"testharness"
],
"css/css-images/parsing/gradient-position-valid.html": [
- "382fc61636061bfc9ad0d3e357dac83c27c297f1",
+ "9857496fe4407fb0b9b4d6fe32ef9ed982c9cc88",
"testharness"
],
"css/css-images/parsing/image-orientation-invalid.html": [
- "f2a53fe5f262852626e7aaac8f14ea5451ac9360",
+ "72e32eba1d9cce6dac7f013c1e726b4eea39ea1b",
"testharness"
],
"css/css-images/parsing/image-orientation-valid.html": [
- "ea2ec1e699ab9587e496f44e235c1f73a57b0e25",
+ "e40517bdc89125283b20411eb4937530c82bf681",
"testharness"
],
"css/css-images/parsing/image-rendering-invalid.html": [
- "9c54c5d7f1598bfd35dd010298d78dc0c480309b",
+ "febb0555ecd886c549c2133869c63ce46fe37058",
"testharness"
],
"css/css-images/parsing/image-rendering-valid.html": [
- "b3b73edfde919d7666fcd669d9c8b1db31c1624d",
+ "bf06b6f7985759227018cf8d9be3fbd52d7ed768",
"testharness"
],
"css/css-images/parsing/image-resolution-invalid.html": [
- "e45ed73e23cd814872afabdd43db4b081fe5e29d",
+ "bc92a7b501090809f3c179744937af550c119abf",
"testharness"
],
"css/css-images/parsing/image-resolution-valid.html": [
- "7345227fcafce45f5ca12c91523622349c07964a",
+ "e04d1120ee400b43f225ffcf386bcecbf6d2b5bb",
"testharness"
],
"css/css-images/parsing/object-fit-invalid.html": [
- "574573c8015f8fbc120779a9361169ded1ed21f1",
+ "f76460f56da89bfe1c94ef884f9d981869bf04cd",
"testharness"
],
"css/css-images/parsing/object-fit-valid.html": [
- "8b531abad20e69c905650f34ec4cd26417381e01",
+ "3b5ac61617c72fc09f56ccd348b278db473ff989",
"testharness"
],
"css/css-images/parsing/object-position-invalid.html": [
- "346b79a841aa6016b78d427f18f402b771368640",
+ "63e47cf17a6590d4d26fa111897547a8e9883fb9",
"testharness"
],
"css/css-images/parsing/object-position-valid.html": [
- "b7be35ccd74f01a0b966426bc5876afd35a1248d",
+ "b9dab78b518138272a1e29a6a2690d13f3e208e1",
"testharness"
],
- "css/css-images/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-images/support/1x1-green.gif": [
"e023d92c7ad04264d06196d47a5edd828a7f71db",
"support"
@@ -537441,6 +544598,14 @@
"12df558fd2c2fa64783720cb9d1be07fa7f85572",
"reftest"
],
+ "css/css-masking/clip-path/clip-path-path-001.html": [
+ "ebdfc2297bbcc8225f92ba9dfa2ed33819f2f9a9",
+ "reftest"
+ ],
+ "css/css-masking/clip-path/clip-path-path-002.html": [
+ "e3049922ebdec9a0ee9be2f8c5cff97e2ec25e94",
+ "reftest"
+ ],
"css/css-masking/clip-path/clip-path-polygon-001.html": [
"954f0ba8d91de74cb36b834f06db5a00ad59b194",
"reftest"
@@ -537509,6 +544674,14 @@
"5adc91a5c00f27f0d3225c99a6c2534b5b868a8d",
"support"
],
+ "css/css-masking/clip-path/reference/clip-path-path-001-ref.html": [
+ "afc1d18f204e9fd9a26f35711bb3e04ac4473d67",
+ "support"
+ ],
+ "css/css-masking/clip-path/reference/clip-path-path-002-ref.html": [
+ "d9ea5183fb1e6aa745c01f02e702df065d4945e6",
+ "support"
+ ],
"css/css-masking/clip-path/reference/clip-path-rectangle-border-ref.html": [
"9a61c7690248f48ba123535524bf1bff60b4016c",
"support"
@@ -537693,34 +544866,62 @@
"c415eaaa67a2bc9a4b621700049eb0c0b60ec0a3",
"testharness"
],
+ "css/css-masking/mask-image/mask-image-url-image-hash.html": [
+ "b1efc90818bec85d5022a9b908a14c2e0c35ff3b",
+ "reftest"
+ ],
+ "css/css-masking/mask-image/mask-image-url-image.html": [
+ "40a1ff9b281647a03cd90046cb62a088c0ed7081",
+ "reftest"
+ ],
+ "css/css-masking/mask-image/mask-image-url-local-mask.html": [
+ "18abc54f85eb4bfd93962dbef92dd5cffe5ba62b",
+ "reftest"
+ ],
+ "css/css-masking/mask-image/mask-image-url-remote-mask.html": [
+ "f3f2eefaa92df83296379efd861b39e2ab65f78e",
+ "reftest"
+ ],
+ "css/css-masking/mask-image/reference/mask-image-ref.html": [
+ "4e121163f9d093b468e710882cb164bb965d9aa8",
+ "support"
+ ],
+ "css/css-masking/mask-image/support/image-with-ref.svg": [
+ "fe77fb37ac60a8a503d849d019c9ca391d9cf523",
+ "support"
+ ],
+ "css/css-masking/mask-image/support/image.svg": [
+ "28dbaa0238353b47b0d7877cac054d002352078a",
+ "support"
+ ],
+ "css/css-masking/mask-image/support/mask.svg": [
+ "cab55923d32ddb9525cb81a12d8035b1bf51bb4c",
+ "support"
+ ],
"css/css-masking/parsing/clip-invalid.html": [
- "18ae8b552a5904097a4b9f0f639b3d0ca123242b",
+ "852612027840e24673432bcdcf6abaa33f422631",
"testharness"
],
"css/css-masking/parsing/clip-path-invalid.html": [
- "3d33de251f6c046a6cd15a6cb84416563e2dc293",
+ "2672d486d3e8341cf2bd4e62af047e05ca4bf711",
"testharness"
],
"css/css-masking/parsing/clip-path-valid.html": [
- "1d55ed785533df06ca250a341022ffcfaaa2027c",
+ "83c76fb9ff5289250c1920f7c2e59b240991cf31",
"testharness"
],
"css/css-masking/parsing/clip-rule-invalid.html": [
- "3088d07af8e30788b3454c1923d50a2071ef768c",
+ "4f4883e8a092e287df0cccae5b5d5d32ac92432d",
"testharness"
],
"css/css-masking/parsing/clip-rule-valid.html": [
- "2fb19073a3e64e941d975f6a60305f97bbc8ab00",
+ "fe94f8f6c5e1b09349f24347480a376edeaa87a4",
"testharness"
],
"css/css-masking/parsing/clip-valid.html": [
- "a21e90178b708a52f397fd890db25477708fb16c",
+ "bd14dfd1b5c9acb697dc4f7afc21e1fb656a377a",
"testharness"
],
- "css/css-masking/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-masking/test-mask-ref.html": [
"938235acbd36309fb969c55f161239bcd5ab969e",
"support"
@@ -537753,6 +544954,14 @@
"2433864333967f26a2354b791cd7b153d26e44f4",
"testharness"
],
+ "css/css-multicol/inline-block-and-column-span-all.html": [
+ "c968a0875cd7cc41c3c1dd83abee425ba0e639bb",
+ "reftest"
+ ],
+ "css/css-multicol/intrinsic-size-001.html": [
+ "ce8011b17f82407599ea28a2eaf543ec9d45a98b",
+ "reftest"
+ ],
"css/css-multicol/multicol-basic-001.html": [
"fca3ef47b7e4cbef7dfad8772d1d01cf67e86801",
"reftest"
@@ -538498,11 +545707,11 @@
"reftest"
],
"css/css-multicol/multicol-rule-shorthand-2-ref.xht": [
- "757283350f5b03e61919be735c5397aeb512679d",
+ "b49e941337e31c675fa76f51574750e7023a28a6",
"support"
],
"css/css-multicol/multicol-rule-shorthand-2.xht": [
- "ab7d75644d8a74982d7b0c30f9f29a065c899231",
+ "4e4d94f8e83bf18b4d1cd112755abf7827167565",
"reftest"
],
"css/css-multicol/multicol-rule-solid-000-ref.xht": [
@@ -538650,67 +545859,67 @@
"support"
],
"css/css-multicol/multicol-width-001-ref.xht": [
- "926bb66423e1597529f22a316bdde16319aa75ae",
+ "dddb96880af819d730b83604a487c4938fda4933",
"support"
],
"css/css-multicol/multicol-width-001.xht": [
- "84cf1ff893cc05bbe9e278b4667731bac7e6130f",
+ "02cbf9b4f262dee4f07050ccf1f44eef118daf02",
"reftest"
],
"css/css-multicol/multicol-width-002-ref.xht": [
- "59d54cadccdd86461e4cff388704dd8c88f672c0",
+ "68e10339a1c0acade42890c78d59ab437b22d3d8",
"support"
],
"css/css-multicol/multicol-width-002.xht": [
- "f838020e427c502b466ae62b20e1e2574f215b4b",
+ "78a149590580d8275e53425fa46cae79dbf2e55f",
"reftest"
],
"css/css-multicol/multicol-width-003.xht": [
- "a05a32d8bbb0ac5fb8ab18c2f4f2278e9a446112",
+ "0e91866163b2b7d7da9a3810a8dc7b622cbcbf56",
"reftest"
],
"css/css-multicol/multicol-width-ch-001.xht": [
- "c3e3b353028087d96bb5328cb3342cdd3deb17b3",
+ "8983e00fff0efb4c9a8e89182b0d193b2293d50b",
"reftest"
],
"css/css-multicol/multicol-width-ch-ref.xht": [
- "133ad3e4b24b02cbf1bc5325dd789a90e0bd0706",
+ "8adefc11e76800c076e8e888e3a21129ef17b10d",
"support"
],
"css/css-multicol/multicol-width-count-001.xht": [
- "eeec2dc3e66f7d492d95555a9dd10057f19c490b",
+ "3fde0610ac6efb0dc159ebde7f98efc723fca5e5",
"reftest"
],
"css/css-multicol/multicol-width-count-002.xht": [
- "9b9bffc8484286d26a6c0c15fb36dc7378c4b601",
+ "6de99956e3be9b90c339b0bde4d77b6b9050b9d8",
"reftest"
],
"css/css-multicol/multicol-width-invalid-001-ref.xht": [
- "a583e30f3d79ffeb766c78f1f54c3c911248471e",
+ "8664fc38253abbae3339a867e0e1c7085afb4a04",
"support"
],
"css/css-multicol/multicol-width-invalid-001.xht": [
- "76c9a57774cfc4c162dad3d24b161d40e5d3db1b",
+ "83128b1f33b625734290fa654cec222245e67310",
"reftest"
],
"css/css-multicol/multicol-width-large-001.xht": [
- "cb943a7fad3c60ea0e4016b614c3df70a56001df",
+ "04530e93d7ca342f5cbb3f9bb5eccc1e90a33855",
"reftest"
],
"css/css-multicol/multicol-width-large-002.xht": [
- "60528159db7db0e77d02870bbf9593cc64da125e",
+ "2efa3941d8fe326739d44c2e755960fa6984d1ad",
"reftest"
],
"css/css-multicol/multicol-width-negative-001.xht": [
- "5370b8033bcaeefc2a98f978707513440ffc8f12",
+ "dd7d515499df5e68031d66bffcdedf2f15dee359",
"reftest"
],
"css/css-multicol/multicol-width-small-001-ref.xht": [
- "eb427d1da4a2ff4d6410a0b1d295143f31e7d55e",
+ "a862607a6ba0db977dec90f7beaad30e1a8d6fc6",
"support"
],
"css/css-multicol/multicol-width-small-001.xht": [
- "c034815060b3a461deedb08ac376ebc1d87fb825",
+ "8ef3bfa6ac0dc331e3398b3f751e6edae5375030",
"reftest"
],
"css/css-multicol/multicol-zero-height-001-ref.xht": [
@@ -539629,8 +546838,8 @@
"086bc7b27ee79caab2c2e433da4ff00ba1bace9b",
"support"
],
- "css/css-paint-api/registered-properties-in-custom-paint.https.html": [
- "d9a63da144d9c08b3912064b78b86a16d44f6918",
+ "css/css-paint-api/registered-property-type.https.html": [
+ "6ff7ce4e0af6b290ea269573c596caa364a5c1c8",
"reftest"
],
"css/css-paint-api/resources/html5.png": [
@@ -539885,6 +547094,10 @@
"ade9e108cf45039173066cedec39462fa37e5d95",
"testharness"
],
+ "css/css-position/position-sticky-overflow-hidden.html": [
+ "b1dc49f34fe0cd5386e41acedc179e9d1af90ecb",
+ "testharness"
+ ],
"css/css-position/position-sticky-overflow-padding.html": [
"fab6f2f731a5ac4acf13fff10b3d47470e7a7d05",
"testharness"
@@ -540022,7 +547235,7 @@
"testharness"
],
"css/css-properties-values-api/property-cascade.html": [
- "97c1975cf134d45e2317f7400b15c20641d50448",
+ "5f0b7eb50c21397e0fe2995dd242fa454f78ca7c",
"testharness"
],
"css/css-properties-values-api/register-property-syntax-parsing.html": [
@@ -540070,15 +547283,15 @@
"support"
],
"css/css-properties-values-api/typedom.tentative.html": [
- "69ebf7a13d8cf3d71413259db68336368e5032e7",
+ "98150558dae5020333dbf0bc7b8cecdbe83dfc36",
"testharness"
],
"css/css-properties-values-api/unit-cycles.html": [
- "c242640f2b93e7820b9d016b53f5f2279ec18eca",
+ "b5c996a442984ee8f2b8fd9a61e41bf7d194799a",
"testharness"
],
"css/css-properties-values-api/url-resolution.html": [
- "6e7c008a58c311aeb18e89edd4dd29e8a3e6c1ed",
+ "d9327896496a1f170570b132dc7797aaea5e2b1f",
"testharness"
],
"css/css-properties-values-api/var-reference-registered-properties-cycles.html": [
@@ -542730,7 +549943,7 @@
"testharness"
],
"css/css-scroll-snap/scrollTo-scrollBy-snaps.html": [
- "58807a6836f7366d8ccc69c56bb63ad022b877ef",
+ "3e022f0a12147fc29dbf45905e36c74e5d221f0a",
"testharness"
],
"css/css-scroll-snap/snap-at-user-scroll-end-manual.html": [
@@ -542761,6 +549974,14 @@
"95101024b4f27e93eb2c61c52df70845ae5842bf",
"support"
],
+ "css/css-scrollbars/textarea-scrollbar-width-none-ref.html": [
+ "9f505dd7f1d121c0bd0af0131b51f536225326b1",
+ "support"
+ ],
+ "css/css-scrollbars/textarea-scrollbar-width-none.html": [
+ "dcfaf5b6270ee0e0092dc795d33bb01af0b9a695",
+ "reftest"
+ ],
"css/css-scrollbars/viewport-scrollbar-body-ref.html": [
"4e07903e2ca1e5d0378845c8cc4754dc82b1ebf8",
"support"
@@ -542834,41 +550055,37 @@
"testharness"
],
"css/css-shapes/parsing/shape-image-threshold-invalid.html": [
- "eb60a2e44289dba4075cc6ae61d6e0a94a520da9",
+ "6299e2ecaad8247affa1e54ace4aea276322c114",
"testharness"
],
"css/css-shapes/parsing/shape-image-threshold-valid.html": [
- "4fe1efceb03e593b8010252a9201d7c2d3a64313",
+ "914abd02210d4db881017c9453d3bcb68fd8e9f2",
"testharness"
],
"css/css-shapes/parsing/shape-margin-invalid.html": [
- "cdaea05039527134af6de034674f8d95dc0e4e64",
+ "2255982ef97c9853253283fcd1ae6037fa8fd51e",
"testharness"
],
"css/css-shapes/parsing/shape-margin-valid.html": [
- "28f094b6abb05bc751f7508ec29b7bc4fe701eae",
+ "e4a3a89108738ed76751ea47dd22b7b8eaf174de",
"testharness"
],
"css/css-shapes/parsing/shape-outside-invalid-position.html": [
- "3bca706b153dd62267ea767742a50784367261aa",
+ "e61c7071f9180bcbf127e09b3b8edef5401e09d9",
"testharness"
],
"css/css-shapes/parsing/shape-outside-invalid.html": [
- "57ce32e7fe6922f9378501f355183addeaa3101a",
+ "484bafe4b5f8527076636a7495f10148ab0fe299",
"testharness"
],
"css/css-shapes/parsing/shape-outside-valid-position.html": [
- "ec0a16d568d5ac0b1ce6dac907c7eecd907f5ab8",
+ "cd13c25ba38a18489c8d02ae553cc36a38214127",
"testharness"
],
"css/css-shapes/parsing/shape-outside-valid.html": [
- "1a70d10f831fb6a451149769a54cdd1839b1d8d3",
+ "d52eb9ada0a5e91f4e78f3b669b683b4c1e6f054",
"testharness"
],
- "css/css-shapes/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-shapes/shape-outside-invalid-001.html": [
"c6c7400f7d177bde46ad1a35a6bd77f6ff27d71b",
"testharness"
@@ -550534,63 +557751,59 @@
"reftest"
],
"css/css-transforms/parsing/perspective-origin-parsing-invalid.html": [
- "24976fc2609e28bde89b4f1b6f0c21f64377a8ee",
+ "2ed6721e091702a436217086eebd81172f359339",
"testharness"
],
"css/css-transforms/parsing/perspective-origin-parsing-valid.html": [
- "d8ac4ccb50a1539a5c23d829c0493b669e8cb827",
+ "79f4e0df12e84e880e8c501856a977e1a2c468b8",
"testharness"
],
"css/css-transforms/parsing/rotate-parsing-invalid.html": [
- "a3f625f6ab6823528ba3aa16ce53cb648908c8fc",
+ "9eef999716da1025b1c8595f60e52ff2cdb7715e",
"testharness"
],
"css/css-transforms/parsing/rotate-parsing-valid.html": [
- "33e44e3361ddecf19ae86fb873cd59c375d7227d",
+ "c82f6be8c5d75e4c323c0f2701cfa9d0a0540b4b",
"testharness"
],
"css/css-transforms/parsing/scale-parsing-invalid.html": [
- "ddc2cade2bcedcd59af8e3f40a9a510f7c521639",
+ "1072d1d6b1ecc46142ffbdd2ad62b87079651672",
"testharness"
],
"css/css-transforms/parsing/scale-parsing-valid.html": [
- "2b99d249aaf6a3dfa253aa9d922698903d20ef98",
+ "89f79e2e85d35f1306577acfede9585b703a6c8f",
"testharness"
],
- "css/css-transforms/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-transforms/parsing/transform-box-invalid.html": [
- "415dc0720146b1041739e8bb346038212965e168",
+ "781601cd26aa43430272011d67447a9079015659",
"testharness"
],
"css/css-transforms/parsing/transform-box-valid.html": [
- "c2e7a5bc90479ebee991c7b0cb2cf0054c17f1e2",
+ "0754a5c9aeea70b07c9bb7bc1b2d20494f07a060",
"testharness"
],
"css/css-transforms/parsing/transform-invalid.html": [
- "bff9d7b723a58b610a7e71d6849cc2b36cda077c",
+ "7fb8367ecb2f6e2f151a1ee6afaab9896f07f8c8",
"testharness"
],
"css/css-transforms/parsing/transform-origin-invalid.html": [
- "0a8ef52f0ec2bdaec7d9098c4f0603c34d4358b3",
+ "19a7c963a708912d347a4c708dc848a7e580966b",
"testharness"
],
"css/css-transforms/parsing/transform-origin-valid.html": [
- "c9f1d73c29ec6fc737afd461a47be788d2b9931c",
+ "f76a0b407e16e3b98c7bac0c4149725deb02ea98",
"testharness"
],
"css/css-transforms/parsing/transform-valid.html": [
- "62ad8e920f3a3ef237c375a4b08343359fda0750",
+ "fbde8eaf2d23306b34125eeeafc66a692eaad301",
"testharness"
],
"css/css-transforms/parsing/translate-parsing-invalid.html": [
- "8aa6de5e2810287c4cac9f7e7f3d7586d43b526d",
+ "9064586bdaab692334594a1cc17f24d639aab93c",
"testharness"
],
"css/css-transforms/parsing/translate-parsing-valid.html": [
- "86b4deb489b29183617a47a845677a02e49781c4",
+ "fe16d545e1f92f0086aa5bba0dd221c591696255",
"testharness"
],
"css/css-transforms/patternTransform/reference/svg-patternTransform-combination-ref.html": [
@@ -554945,6 +562158,38 @@
"4cc7ee50eb4915fcf95843f7eeee266abfa7b81a",
"testharness"
],
+ "css/css-transitions/parsing/transition-delay-invalid.html": [
+ "b34d50551ce433ebe672c7fddb4a549582c754db",
+ "testharness"
+ ],
+ "css/css-transitions/parsing/transition-delay-valid.html": [
+ "d6b42b9c059456f10c425f7217ade6b2cd84c1f4",
+ "testharness"
+ ],
+ "css/css-transitions/parsing/transition-duration-invalid.html": [
+ "fd0f341f4071b53561cf8b072bb105d3bd1a4563",
+ "testharness"
+ ],
+ "css/css-transitions/parsing/transition-duration-valid.html": [
+ "311ca086695151747559a0995b61c7fe4c755592",
+ "testharness"
+ ],
+ "css/css-transitions/parsing/transition-property-invalid.html": [
+ "903a206eac13688a51ff2ba88552de67efa2e9cb",
+ "testharness"
+ ],
+ "css/css-transitions/parsing/transition-property-valid.html": [
+ "4e3894f5aa94e00aa59406ee1aab92b9226483af",
+ "testharness"
+ ],
+ "css/css-transitions/parsing/transition-timing-function-invalid.html": [
+ "936defa6cce5dd7b69bf9344c60add178de6589a",
+ "testharness"
+ ],
+ "css/css-transitions/parsing/transition-timing-function-valid.html": [
+ "e11ef0002e43b65e06c8aec7dffab2fe7d48377f",
+ "testharness"
+ ],
"css/css-transitions/properties-value-001.html": [
"9182930ed78f9ff2adbc4754a8613fc0316b868a",
"testharness"
@@ -555474,7 +562719,7 @@
"testharness"
],
"css/css-transitions/transitions-animatable-properties-01.html": [
- "06143d3061da89a148adda0e6bf2cf8f968f0f89",
+ "534f81839ac875ff6b5c5c7b17784258d7a8932c",
"testharness"
],
"css/css-transitions/zero-duration-multiple-transition.html": [
@@ -556078,7 +563323,7 @@
"testharness"
],
"css/css-typed-om/the-stylepropertymap/properties/color-interpolation.html": [
- "4713d90621d35ce990ddb18ea217e6a467effd0c",
+ "d8324db22e217d0805c847b83b4b841bbcbe84b1",
"testharness"
],
"css/css-typed-om/the-stylepropertymap/properties/color-rendering.html": [
@@ -557886,95 +565131,91 @@
"reftest"
],
"css/css-ui/parsing/box-sizing-invalid.html": [
- "4ced38240f29163814f1d57a9923af8962d06c06",
+ "984475450a3abc0ce640d25b5659eb427c210dd8",
"testharness"
],
"css/css-ui/parsing/box-sizing-valid.html": [
- "fb60ac23bb8d2a509d1bdede4069cb09a52ae415",
+ "3dfa4f979419af8ced63af5aa73c32ea68d11095",
"testharness"
],
"css/css-ui/parsing/caret-color-invalid.html": [
- "b4c9cb71e038b81ed2dfa582cb579395ae060aa0",
+ "a59b01ec2bb6d2ada5acef7ac7ec68417d79fa03",
"testharness"
],
"css/css-ui/parsing/caret-color-valid.html": [
- "41cc70654dade5dccfab56b0c1b18c8dba50344a",
+ "dd35cf8e903f544b284ebd2b7d83fb6b5e989274",
"testharness"
],
"css/css-ui/parsing/cursor-invalid.html": [
- "dda8031d3090699885bbe896ad77158046b87bcd",
+ "b7928c85d3ccb696039792b4576ee81cfd1b738c",
"testharness"
],
"css/css-ui/parsing/cursor-valid.html": [
- "e33b82e2ddc54455f7da26728e457b1821dec2ea",
+ "285c16a4ee513b898d9d1c2852ae40897bb12545",
"testharness"
],
"css/css-ui/parsing/outline-color-invalid.html": [
- "195f55dc72bd3a943f457f700677484e94fc5ba1",
+ "2b910e803038e3c9892a7e3ee09473a410d84465",
"testharness"
],
"css/css-ui/parsing/outline-color-valid-mandatory.html": [
- "fbe730bdae37d0148d767d8745589e363f98938d",
+ "2af06658241a407ff0472b80ee052f072fd844f1",
"testharness"
],
"css/css-ui/parsing/outline-color-valid-optional.html": [
- "bf12b87f2193bcd11e4a382ffb94073300b47eaf",
+ "79932990988d18dd76129989a8bddb8cb8e5e1ad",
"testharness"
],
"css/css-ui/parsing/outline-invalid.html": [
- "c56a579452fb78daf9f48bd45cd996a1f2697b25",
+ "c43cc3c6434ca4097acb040d7d1f1e9ae652ec4a",
"testharness"
],
"css/css-ui/parsing/outline-offset-invalid.html": [
- "1ee9477a1118f7f262d7e7b1c29f2978c8b80092",
+ "3ff26e35ae0195a65f77f872da88ec4f6da6df6b",
"testharness"
],
"css/css-ui/parsing/outline-offset-valid.html": [
- "c5e023b8e9607dd38bd0bd33cd52244e25a9b0fb",
+ "75fc7e60bd9dc3f249b8340cf342b68fa45b7d68",
"testharness"
],
"css/css-ui/parsing/outline-style-invalid.html": [
- "2340c62d90299a636abbaf9973ed08e55c9d9d66",
+ "a659b68a55b596c73348d89533a800fd6bbacf01",
"testharness"
],
"css/css-ui/parsing/outline-style-valid.html": [
- "5adcfda7ec75dadb3b87475cd6e0009c8aaa94ff",
+ "98e139539f3bcf67a0b82439fe7f98b63c2876b3",
"testharness"
],
"css/css-ui/parsing/outline-valid-mandatory.html": [
- "a296c989bce262b620a8acc028cfa79d513a8acb",
+ "c5217185eb1293e0c922f0c3068277aaa00911cf",
"testharness"
],
"css/css-ui/parsing/outline-valid-optional.html": [
- "e179406cafb53cefc35fdc69b46b0530233dafc2",
+ "8150ffa208eb8f4ee55508f3524e814cc6806dd6",
"testharness"
],
"css/css-ui/parsing/outline-width-invalid.html": [
- "07012fef225859ae8f4194f19795c24363685108",
+ "6008fffd94b2626ac5984f07cee59fb41588bc46",
"testharness"
],
"css/css-ui/parsing/outline-width-valid.html": [
- "050371246ce4006b922e1ab2d69255d1cf454d5d",
+ "2415e005dee6f50b4205cde247800bbd85780970",
"testharness"
],
"css/css-ui/parsing/resize-invalid.html": [
- "a56a1dbc6e24e851e9055513c7ebe86e1c847760",
+ "7f9698f7aadd91cb4f44e44ad01a6a7c79f519ee",
"testharness"
],
"css/css-ui/parsing/resize-valid.html": [
- "025b0e447bb66d8daf828dccf009fcc039fa0b53",
+ "d50df443e0508991c0fd324d72e06ee78e0671a6",
"testharness"
],
- "css/css-ui/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-ui/parsing/text-overflow-invalid.html": [
- "f3945a162ec4c67fdf36753a270b3c2e350726a4",
+ "aa4169c1462bdab7e2674d72b64e8ab5592e79a1",
"testharness"
],
"css/css-ui/parsing/text-overflow-valid.html": [
- "3f0aaa60938ff98e8d0f10d201d6e05d79d2771d",
+ "5d40b6839def0f4ace52ab0a8af818dcf2b3ea8e",
"testharness"
],
"css/css-ui/reference/box-sizing-001-ref.html": [
@@ -559470,7 +566711,7 @@
"support"
],
"css/css-values/reference/vh_not_refreshing_on_chrome-ref.html": [
- "32ce9ada155649e9a4935e1abdddc3d3aadfca73",
+ "279d1c69b9f7fbe60edb55b7e8a5d507eda24936",
"support"
],
"css/css-values/reference/vh_not_refreshing_on_chrome_iframe-ref.html": [
@@ -559662,7 +566903,7 @@
"support"
],
"css/css-values/support/vh_not_refreshing_on_chrome_iframe.html": [
- "c58ec57a58f29d4774b199ca82dd6d16607d4735",
+ "8d8e9b49d4aa3d9804a176852288e32ccaaa47d8",
"support"
],
"css/css-values/unset-value-storage.html": [
@@ -559730,7 +566971,7 @@
"support"
],
"css/css-values/vh_not_refreshing_on_chrome.html": [
- "b4e0a413ab975dea429ca35642dc075a54127117",
+ "52a45a114c85bf96a175ca583d8a2b6f54b9ab6c",
"reftest"
],
"css/css-values/viewport-relative-lengths-scaled-viewport.html": [
@@ -562006,35 +569247,35 @@
"reftest"
],
"css/css-writing-modes/ch-units-vrl-001.html": [
- "5591465b0a7951ade61653b20b8866fad56cf27d",
+ "7f887e771e83f9ea0ee26fafe97b4e025e275b19",
"reftest"
],
"css/css-writing-modes/ch-units-vrl-002.html": [
- "d1ff259c58875e9b460eff5a9d34d21493c06887",
+ "129d0eca5fd6782e5f215dfb6d4fa003397f7cec",
"reftest"
],
"css/css-writing-modes/ch-units-vrl-003.html": [
- "5f7de3c96de9214195a9e189365035f1759358e2",
+ "3ed08c4787582a087c3cdc3c7159f4db0d179925",
"reftest"
],
"css/css-writing-modes/ch-units-vrl-004.html": [
- "4264afd718224da10fdb67af480b46f379c4750b",
+ "8005db198c31b1fd7e5df02e6f2cd658268fc07b",
"reftest"
],
"css/css-writing-modes/ch-units-vrl-005.html": [
- "6348b0099bec36e62b10a3f5a84c36f48789eea0",
+ "436bb3df2367a60f7bf3e69c5748f4cb87fcdc50",
"reftest"
],
"css/css-writing-modes/ch-units-vrl-006.html": [
- "1395606be49ead33db02448d1de5385d38c60bca",
+ "cbe1dee6847fb7c4899d0878ac4c52f217f26e1b",
"reftest"
],
"css/css-writing-modes/ch-units-vrl-007.html": [
- "978e5ba3c20af64c9ed0b6050b8f3c3747491452",
+ "59aecf55a40d95f8efd44f4328996d8b96214130",
"reftest"
],
"css/css-writing-modes/ch-units-vrl-008.html": [
- "eece5974bfb60f57690371998b6be32965bdb292",
+ "b0d09cef5862333c141f537b3b1832e0f2947be6",
"reftest"
],
"css/css-writing-modes/clearance-calculations-vrl-002-ref.xht": [
@@ -562597,6 +569838,18 @@
"d33fb6f6d119443f41217c2ac1b808cb3eb79b7f",
"reftest"
],
+ "css/css-writing-modes/img-intrinsic-size-contribution-001.html": [
+ "08500537f87cdccc1e0736bbaea483b61b690630",
+ "reftest"
+ ],
+ "css/css-writing-modes/img-intrinsic-size-contribution-002.html": [
+ "df0ccf2093bf878200e719cc4f66c70d9832a8a0",
+ "reftest"
+ ],
+ "css/css-writing-modes/img-intrinsic-size-contribution-ref.html": [
+ "ffda7d62ba963ed693e14547adce6592a11f5657",
+ "support"
+ ],
"css/css-writing-modes/inline-block-alignment-002-ref.xht": [
"ce478e7499247e6277482b9c16c9dd2b1b76f275",
"support"
@@ -562950,19 +570203,19 @@
"reftest"
],
"css/css-writing-modes/logical-props-001.html": [
- "599c80edc90edb9d16f08adfa0115727b1054593",
+ "5eea84d536252b949dfe107923a4704453ab9d9f",
"reftest"
],
"css/css-writing-modes/logical-props-002.html": [
- "a018e59853d386d3ed801a0e57e9283c1d221015",
+ "96295d09dda700b7ef778da6e27e7f714c9c3819",
"reftest"
],
"css/css-writing-modes/logical-props-003.html": [
- "64e272d4514cc5350e8bcb4b202159f6df2be0a2",
+ "f40c9fc9ef08769a14058d61c19e6d9139cf9b4f",
"reftest"
],
"css/css-writing-modes/logical-props-004.html": [
- "556794d7fa89f92618ba260bc435f722e2a883ec",
+ "e5b23679e62309162fe1bd0ae90b4d3d08c446cd",
"reftest"
],
"css/css-writing-modes/margin-collapse-vlr-003.xht": [
@@ -563342,47 +570595,43 @@
"manual"
],
"css/css-writing-modes/parsing/direction-invalid.html": [
- "7181dbe675d1183d7271cd9d7aebf699ec837872",
+ "cb282f0b723ecda78dfe6a803b0b8932518afeed",
"testharness"
],
"css/css-writing-modes/parsing/direction-valid.html": [
- "11585cf9e43952a56f96a80bb3566b3d6a5fb8fd",
+ "f8b9fa808b9d21ddcdf4623076f7c293ab5df410",
"testharness"
],
- "css/css-writing-modes/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/css-writing-modes/parsing/text-combine-upright-invalid.html": [
- "b8a0c14b56b7a43fce53626dcbad17997fc779bc",
+ "c3401ea7d246e7fa486478e04c006aea37aef0ac",
"testharness"
],
"css/css-writing-modes/parsing/text-combine-upright-valid.html": [
- "2b15840cd7cfaefa80b61b3f175afe4774f364e0",
+ "dada1f97e2feb6d45b7b0b3e1f6c3c36f2dca45e",
"testharness"
],
"css/css-writing-modes/parsing/text-orientation-invalid.html": [
- "cc9c051049bc07ff977d08fcd796b8f31c13f5af",
+ "ceb9cf78cc3b69ec86707a8f3bed24dbdb028d88",
"testharness"
],
"css/css-writing-modes/parsing/text-orientation-valid.html": [
- "06049c28a0aac6d2d8f3e538d3ad63aa8d68c4e3",
+ "36f2d367015639d206574c2fe71f45a282119cbb",
"testharness"
],
"css/css-writing-modes/parsing/unicode-bidi-invalid.html": [
- "1e5f2a1f62a8ea8ffc6b9994bb7a5f8887f7624b",
+ "f1a2b730b48ff19833a287420b4ca9c671afddf8",
"testharness"
],
"css/css-writing-modes/parsing/unicode-bidi-valid.html": [
- "087c026adcec3172f96c171b83a2c7efbb91be60",
+ "38911df2d349aec02aefaf956935c33bbf37e905",
"testharness"
],
"css/css-writing-modes/parsing/writing-mode-invalid.html": [
- "50e42f73c6d14bbcc19737c17547a178c9cfb870",
+ "a2010d40d2e22208a933f6fac2cbccdb48024c51",
"testharness"
],
"css/css-writing-modes/parsing/writing-mode-valid.html": [
- "6f525109fe1bdbc1118f33f9c38ec39a8cc8b6fe",
+ "6f79a36a4dc2564ca6a478d03a29e015c2376a2d",
"testharness"
],
"css/css-writing-modes/percent-margin-vlr-003.xht": [
@@ -565025,6 +572274,10 @@
"d325b15a4cf3f12e54adf85c3691de11bebac057",
"support"
],
+ "css/css-writing-modes/support/blue-200x100.png": [
+ "e32c47dd1ee8f250025b930a78ce076889af942d",
+ "support"
+ ],
"css/css-writing-modes/support/blue-horiz-line-220x1.png": [
"3898d5a2d9eb14ad80343ecbcd9d8216d2e2f755",
"support"
@@ -565506,7 +572759,7 @@
"support"
],
"css/css-writing-modes/svg-aliasing-001.html": [
- "bc32f202e2b17878c6f3e6c1938676a92c6338c4",
+ "3979459838ee19b78655073122afd0cb92f8b357",
"reftest"
],
"css/css-writing-modes/svg-aliasing-002.html": [
@@ -566653,6 +573906,14 @@
"a7c3568969a77903d9b49f6b09d70046ba2b98b7",
"testharness"
],
+ "css/cssom-view/cssom-getBoundingClientRect-vertical-rl-ref.html": [
+ "1ee4fe2652ff56655c20963f90810de6a979462f",
+ "support"
+ ],
+ "css/cssom-view/cssom-getBoundingClientRect-vertical-rl.html": [
+ "85ac2a9665953aeb961f12a30dd4d82082d8273a",
+ "reftest"
+ ],
"css/cssom-view/cssom-getBoxQuads-001.html": [
"813c245c7bef7cc726c843445378fb640044e574",
"testharness"
@@ -567166,7 +574427,7 @@
"testharness"
],
"css/cssom/computed-style-set-property.html": [
- "6567852681781fce5edcb078fcf86f9110c4ea1e",
+ "0a5e4cb0589799e19fe9fc91f134d03e42d73206",
"testharness"
],
"css/cssom/css-style-attr-decl-block.html": [
@@ -567386,7 +574647,7 @@
"testharness"
],
"css/cssom/shorthand-serialization.html": [
- "2178ba37a959fc56537c7cc164d423d14563881f",
+ "44af6737e3ef3b3c71ccd259b1d75104c4a92061",
"testharness"
],
"css/cssom/shorthand-values.html": [
@@ -567902,33 +575163,29 @@
"testharness"
],
"css/filter-effects/parsing/color-interpolation-filters-parsing-invalid.html": [
- "0cec437c627675b296b2ee0659ea18d886765952",
+ "6fdf647a43d0deed2da93239e4e4b0fc3b66a16a",
"testharness"
],
"css/filter-effects/parsing/color-interpolation-filters-parsing-valid.html": [
- "5f7a6e653595a2b6d597dc77f81c08e3d076be09",
+ "58539b015fd13ef923e50f0d9f077f537ec88f56",
"testharness"
],
"css/filter-effects/parsing/filter-parsing-invalid.html": [
- "06cb30c8c3c1f5a64ab8a5b93e81926ce6210714",
+ "b1e089758d47704d01d9424d872a5cf62d771595",
"testharness"
],
"css/filter-effects/parsing/filter-parsing-valid.html": [
- "266fee237bad690a5eef67bbb486eb737566c4aa",
+ "e2dd7036a24cd79aee057e0537ff43070ad59073",
"testharness"
],
"css/filter-effects/parsing/lighting-color-parsing-invalid.html": [
- "3d8207bd55c598e9a303d615f0c7c457bac1dfa2",
+ "4310330af8395e20f9b05b8e054699cff0149ee8",
"testharness"
],
"css/filter-effects/parsing/lighting-color-parsing-valid.html": [
- "89b189a7f9a4a2ac4ae41c84a50d1f73e1dfc1b3",
+ "01c8c0fc995ecffb27914973eff869e31a44803c",
"testharness"
],
- "css/filter-effects/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/filter-effects/reference/filters-opacity-001-ref.html": [
"17d891ee707c36b7d404d9836060d7bb9275e841",
"support"
@@ -568478,57 +575735,53 @@
"testharness"
],
"css/motion/parsing/offset-anchor-parsing-invalid.html": [
- "817c2684bbcb95f097dee0541d1e314aec2b15af",
+ "af32ae2c5a588131d2404836af50cd114030c5b3",
"testharness"
],
"css/motion/parsing/offset-anchor-parsing-valid.html": [
- "d354763b4e705c5bf18493055c9acb68606c1298",
+ "a69a5ce9f8117262db576430ea9c840b958a14fa",
"testharness"
],
"css/motion/parsing/offset-distance-parsing-invalid.html": [
- "7eec1270ab8884afc2a37dfe6ee31e4f96aaf52a",
+ "2d0be83e03b455813bc3107ba758d9108081e935",
"testharness"
],
"css/motion/parsing/offset-distance-parsing-valid.html": [
- "b699ecea5a1a0f3c59b0ea23c542caa1b25800d9",
+ "5b081bcaab7e9d6a72842c4f8f0a504816672b92",
"testharness"
],
"css/motion/parsing/offset-parsing-invalid.html": [
- "23475f8d513211338c2239cbc0f26c6a1cf08c79",
+ "cc2eb500eb88d24055dfe84e0c052546d90e9a29",
"testharness"
],
"css/motion/parsing/offset-parsing-valid.html": [
- "4cdb2b193891ffe12e15aff072906cae808201f0",
+ "b93091b2088987cb402c364e0d3794d847522a16",
"testharness"
],
"css/motion/parsing/offset-path-parsing-invalid.html": [
- "67c1099ba73b26812b86f0c1bf9dca9baa2ff225",
+ "c69f7c81a9d479c2334769b85d0553f659b8bd83",
"testharness"
],
"css/motion/parsing/offset-path-parsing-valid.html": [
- "d57b465ada6743e76e3e99e78a89e628815dc9ee",
+ "bda82928726dc8c3a30207f9871a4883e2db5376",
"testharness"
],
"css/motion/parsing/offset-position-parsing-invalid.html": [
- "6565fa5cdd7e16a442338be282472dca8f1d54be",
+ "5e749e5b4ec5fe9bb39d1135a9ae74c524677e26",
"testharness"
],
"css/motion/parsing/offset-position-parsing-valid.html": [
- "565abffbdeeba7b553d4dea8468c23282f32ccd4",
+ "d40f70e8c0010cf3f860b3ad760dea5d7b64efdd",
"testharness"
],
"css/motion/parsing/offset-rotate-parsing-invalid.html": [
- "a649fb4aabb28eb9218b2d3fe68b9effe8bc3b93",
+ "4e5a9229a0c85b3a2e5bfe59719bad88245d65c5",
"testharness"
],
"css/motion/parsing/offset-rotate-parsing-valid.html": [
- "38e9ff1ba45ed2cd54b8d55670086f34236b742a",
+ "71978d33b120f4ed353820f3f08ff4290c070eb7",
"testharness"
],
- "css/motion/parsing/support/parsing-testcommon.js": [
- "b075882f89aae49b419220b234534241cde5fd42",
- "support"
- ],
"css/reference/META.yml": [
"0f0f7aa96a3d8d59be0a26eaf5c706ae82faf4e4",
"support"
@@ -568613,26 +575866,10 @@
"416628d8cc5c6dcc9f8fab9236efe8097f11f1e2",
"support"
],
- "css/selectors/CHANGES": [
- "681a56f9158803526ff6f1f672b2f466d311829f",
- "support"
- ],
"css/selectors/META.yml": [
"3f86842591ed35be1b36757e58e900899e8e0627",
"support"
],
- "css/selectors/Makefile": [
- "210118befd5f2bbae42bfe3f5d0a3f81d57ccb72",
- "support"
- ],
- "css/selectors/README": [
- "06016f638ba053c6c4ac7a04c3fb37995b80c4a9",
- "support"
- ],
- "css/selectors/TODO": [
- "f504110bf143df8b2de742cbf8356b4093481581",
- "support"
- ],
"css/selectors/anplusb-selector-parsing.html": [
"b7cfd293515b67d5aa66bfe7b62262e1b64c0942",
"testharness"
@@ -568677,1649 +575914,1621 @@
"2e496d854184796be55d66566af8739fd4a7f776",
"testharness"
],
- "css/selectors/css3-modsel-1.xml": [
- "54b2ad93f71cbe73e0478888e650406ffd6676d0",
- "support"
- ],
- "css/selectors/css3-modsel-10.xml": [
- "e6a028b472cef064489e9c7758b6b0353c057874",
- "support"
- ],
- "css/selectors/css3-modsel-100.xml": [
- "44910f25d1a885066ac91074e5d94dd2e38c1d93",
- "support"
- ],
- "css/selectors/css3-modsel-100b.xml": [
- "7e58b62fc1c2b5643a72ff1457d42ae359353535",
- "support"
- ],
- "css/selectors/css3-modsel-101.xml": [
- "bb8e1639aa0127bd152a96737ae7c33d4eec5893",
- "support"
- ],
- "css/selectors/css3-modsel-101b.xml": [
- "e71226d5d124f68e16d13e3abb6f7cb3fe6b1a6e",
- "support"
- ],
- "css/selectors/css3-modsel-102.xml": [
- "c331c591a47f8069dc6ecbbb432f218890fea32b",
- "support"
- ],
- "css/selectors/css3-modsel-102b.xml": [
- "ed37bf7a6496abf663fd860d8245e19645712e09",
- "support"
- ],
- "css/selectors/css3-modsel-103.xml": [
- "d0581121a11c84c2964a567b1bd67c5e7d27305b",
- "support"
+ "css/selectors/focus-display-none-001.html": [
+ "fe5716cc41c4a622159395ba26da3a7598cfcec8",
+ "testharness"
],
- "css/selectors/css3-modsel-103b.xml": [
- "ef1e8557bccbc86855b44b583b4506046013c5f7",
- "support"
+ "css/selectors/focus-visible-001-manual.html": [
+ "3475ba6cac8af1fcb2095aeaae13a0db76ccc7b2",
+ "manual"
],
- "css/selectors/css3-modsel-104.xml": [
- "a7919bbb27ce359989e4570e07cbea49a2be8262",
- "support"
+ "css/selectors/focus-visible-002-manual.html": [
+ "663b79b4b177101eed0e5c10be186bf5aa2472e9",
+ "manual"
],
- "css/selectors/css3-modsel-104b.xml": [
- "2147452f3f82fbaede1c1db5e242c5e61f4f5211",
- "support"
+ "css/selectors/focus-visible-003-manual.html": [
+ "eeb2904d7d33ebab283c37925db90f6fab7c1328",
+ "manual"
],
- "css/selectors/css3-modsel-105.xml": [
- "12946be512a4ccfc9b5f7210fe3dedc8de6b53ae",
- "support"
+ "css/selectors/focus-visible-004-manual.html": [
+ "dba057cc9c8641a96c65b0bb90cccbdd3d596dc3",
+ "manual"
],
- "css/selectors/css3-modsel-105b.xml": [
- "47c4d987c08419809b2df76b87e1ff7eec939370",
- "support"
+ "css/selectors/focus-visible-005.html": [
+ "b5d58435db1c6d37881bbcd4c856e8abab03aada",
+ "testharness"
],
- "css/selectors/css3-modsel-106.xml": [
- "13e1f5d3fd621e0212f2ab2593e5ff425ef21ea0",
- "support"
+ "css/selectors/focus-visible-006-manual.html": [
+ "974abc0024e3153008e944ff706156efcb9948e2",
+ "manual"
],
- "css/selectors/css3-modsel-106b.xml": [
- "e990b19905262376a65a4a44170a4b4a5476c9da",
- "support"
+ "css/selectors/focus-visible-007.html": [
+ "2dcb3e34b21fb7251d5df0a85b00e9ca77f872f1",
+ "testharness"
],
- "css/selectors/css3-modsel-107.xml": [
- "3782017361d0449de9936dcc27801e63271b533d",
- "support"
+ "css/selectors/focus-visible-008.html": [
+ "b7f61d2fa804f801abcc59f81645e07431de3463",
+ "testharness"
],
- "css/selectors/css3-modsel-107b.xml": [
- "fb8d7c82e91569add8bc9d862238bcd5751f85df",
- "support"
+ "css/selectors/focus-visible-009.html": [
+ "c7d682baa4377fd9ccb5857437f172d782d90824",
+ "testharness"
],
- "css/selectors/css3-modsel-108.xml": [
- "790435a2d5d75a6d448e99459963089fd7b37127",
- "support"
+ "css/selectors/focus-visible-010.html": [
+ "eb01204b29c8e30b651b083459c01983b99dd70d",
+ "testharness"
],
- "css/selectors/css3-modsel-108b.xml": [
- "cea8ca41d22b52cf5ad18834b02e49b28cd58467",
+ "css/selectors/focus-within-001-ref.html": [
+ "2913775a2204eb173ba45251a84ab2c01cda35bc",
"support"
],
- "css/selectors/css3-modsel-109.xml": [
- "da0cdb5c06bca3cb5a443b60224441787a423dce",
- "support"
+ "css/selectors/focus-within-001.html": [
+ "fcf8a379c87c364be31f945ae34ca672736e4710",
+ "reftest"
],
- "css/selectors/css3-modsel-109b.xml": [
- "41914e08b8e90ec6ff0d14bad7f7cc5b370c0108",
- "support"
+ "css/selectors/focus-within-002.html": [
+ "e483833febc101ef05fa6327500054249ae7dc42",
+ "reftest"
],
- "css/selectors/css3-modsel-11.xml": [
- "6a8ef38babf7ce61cbc185f77b25cc1e58626b56",
- "support"
+ "css/selectors/focus-within-003.html": [
+ "b399c4f0cf3ebaffb5e6efa43f5243ffe6df58f8",
+ "reftest"
],
- "css/selectors/css3-modsel-110.xml": [
- "a6c13036a2ff4647a5980ac36064f6fe89e4c059",
- "support"
+ "css/selectors/focus-within-004.html": [
+ "169af9e0706aa993a64ce64d6b198679e2e5dcdf",
+ "reftest"
],
- "css/selectors/css3-modsel-110b.xml": [
- "07b5bd816de7a872cd486e57ba57aba2f73aa820",
- "support"
+ "css/selectors/focus-within-005.html": [
+ "03f927d1b40cf3725c38f5b2d5b7528783a92eac",
+ "reftest"
],
- "css/selectors/css3-modsel-111.xml": [
- "4d22762c22c56a1ad45058122d3dd528cf9abc03",
+ "css/selectors/focus-within-006-ref.html": [
+ "b93c156876a6ae243630252ce66499b530052c5d",
"support"
],
- "css/selectors/css3-modsel-111b.xml": [
- "530c32ae77271894c47b3bf9fb48ebb11e14bcc7",
- "support"
+ "css/selectors/focus-within-006.html": [
+ "ff63cceb6e7bed5f3299a39e9842bb9ccd0a7bf9",
+ "reftest"
],
- "css/selectors/css3-modsel-112.xml": [
- "d8976209589a8732acf392d1523a0ae5f29f001e",
+ "css/selectors/focus-within-007-ref.html": [
+ "6ecc21536a404b25290dc2456093c9b3ada5a420",
"support"
],
- "css/selectors/css3-modsel-112b.xml": [
- "e4ad26641ef880417320164563d8de3c591d7425",
- "support"
+ "css/selectors/focus-within-007.html": [
+ "f23fe87643fa7e8f9550c1ca96ad09045519e129",
+ "reftest"
],
- "css/selectors/css3-modsel-113.xml": [
- "cc6d62375b258589f04e1fd83094e1dd628b069e",
- "support"
+ "css/selectors/focus-within-008.html": [
+ "19deff212a38bd5ce8fe3079fedf705dd3e24137",
+ "reftest"
],
- "css/selectors/css3-modsel-113b.xml": [
- "5c345804b2a4a783d4426ac67d1503225b83f9a6",
- "support"
+ "css/selectors/focus-within-009.html": [
+ "c8d47d2df0aa350aaedbc77f9d70db5a5aa893e8",
+ "testharness"
],
- "css/selectors/css3-modsel-114.xml": [
- "0524450449c23d0df7ea749de79047d4d01eeb3b",
- "support"
+ "css/selectors/focus-within-010.html": [
+ "2476e03dba6736b2b6a0165c0ba9cd5fca386b3b",
+ "reftest"
],
- "css/selectors/css3-modsel-114b.xml": [
- "15eb9a5670241029ffca6f22a4bfcaf7c1ba2cae",
- "support"
+ "css/selectors/focus-within-display-none-001.html": [
+ "a15f031fa2c0587bb6fc78ce3d70cf1742566d2d",
+ "testharness"
],
- "css/selectors/css3-modsel-115.xml": [
- "fc7c1ddcbce883f2e13321ad75a448216d2dce78",
+ "css/selectors/focus-within-shadow-001-ref.html": [
+ "6ab36318796dfebc78b62b258e261282fc6c9b98",
"support"
],
- "css/selectors/css3-modsel-115b.xml": [
- "9d35f3a9123d182b18b64ecf55593052943e7b12",
- "support"
+ "css/selectors/focus-within-shadow-001.html": [
+ "012a774129266bca769619e6e1bc39d721e9e8c1",
+ "reftest"
],
- "css/selectors/css3-modsel-116.xml": [
- "6cb57a475b03b06a6449be0d75cc5178f63722b1",
- "support"
+ "css/selectors/focus-within-shadow-002.html": [
+ "50b30df424e2266993f582ec18efb444d0569e59",
+ "reftest"
],
- "css/selectors/css3-modsel-116b.xml": [
- "c6ee055bd3fa944e35e508e2946e5c593b378cfa",
- "support"
+ "css/selectors/focus-within-shadow-003.html": [
+ "48901b215b561acd28b106db3e833e93f443f83e",
+ "reftest"
],
- "css/selectors/css3-modsel-117.xml": [
- "162692dbd8a318e6eb7647944d47a0f233e07f24",
- "support"
+ "css/selectors/focus-within-shadow-004.html": [
+ "6beed1fc131a924c22672db706c2690f1e1715de",
+ "reftest"
],
- "css/selectors/css3-modsel-117b.xml": [
- "18b49772a59dc11dda0a2b6458bc01dee3adea2b",
- "support"
+ "css/selectors/focus-within-shadow-005.html": [
+ "c645d62f7604ee3e8664bc553eba1ac2e22c6db6",
+ "reftest"
],
- "css/selectors/css3-modsel-118.xml": [
- "9179fc63b7e5ea2dc63ccc1a33e88e16ba4d02b2",
- "support"
+ "css/selectors/focus-within-shadow-006.html": [
+ "39a2f706102db918b6a45b2f10e1d58861676413",
+ "reftest"
],
- "css/selectors/css3-modsel-119.xml": [
- "17ca9382442e7ea13d206a3a6ca5ea4a602959df",
- "support"
+ "css/selectors/historical-xmlid.xht": [
+ "7916d9c1203376188e9aa57ed7d9353906d3d9ca",
+ "reftest"
],
- "css/selectors/css3-modsel-12.xml-removed": [
- "7e5efa12b08afbb1d99d4e1faa575681c4dbbcbd",
- "support"
+ "css/selectors/hover-001-manual.html": [
+ "87d7af91b6994371b72ff33923ea1cacc65c8b5b",
+ "manual"
],
- "css/selectors/css3-modsel-120.xml": [
- "536153b5624ea2495e1139101bde4979980d6bdd",
- "support"
+ "css/selectors/hover-002-manual.html": [
+ "50859c5cfb80f1f82c453adad72643009347d7c2",
+ "manual"
],
- "css/selectors/css3-modsel-121.xml": [
- "28705a986a4946f75df10e1f0914ae8d6f23837d",
+ "css/selectors/i18n/META.yml": [
+ "9fa8c3b6c9bdbfa2b9731c89b23ffc6f47ceba2b",
"support"
],
- "css/selectors/css3-modsel-122.xml": [
- "648983399be313b5ced0ef674adac08ba811c5d7",
+ "css/selectors/i18n/README": [
+ "df60c5800acbc449917b82504fe6a8c44649ec66",
"support"
],
- "css/selectors/css3-modsel-123.xml": [
- "e9f541cf368f2092221f15641d6083aa2d40ca9d",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-001.html": [
+ "e88f20a02471e324ee5d5900add484142cbf5ce8",
+ "testharness"
],
- "css/selectors/css3-modsel-123b.xml": [
- "1cd2ae359aee66802cc26d91b625facc947aa700",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-002.html": [
+ "71ae3d46f686c6e6b6d030f492072f48e46faa1e",
+ "testharness"
],
- "css/selectors/css3-modsel-124.xml": [
- "6d7fc65024ba152de0ea88cb77ff7d397536176d",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-004.html": [
+ "cbf4813e42bb1a6886df1dddbebd5d2a61eb92ca",
+ "testharness"
],
- "css/selectors/css3-modsel-124b.xml": [
- "1a4f8633896cd3fffe29187545fe1e145d50e5ee",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-005.html": [
+ "1c46c450f2fb9cd4e4c8b0cb0c7512d689dd2706",
+ "testharness"
],
- "css/selectors/css3-modsel-125.xml": [
- "0365c2a4421cc625c6e71b5bec53ed7cef81b71c",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-006.html": [
+ "2eb9dd68ea335c9881a70d3a9f33bfa660d1f034",
+ "testharness"
],
- "css/selectors/css3-modsel-125b.xml": [
- "25cf9336304377c21470604cc1cc097ff35612ad",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-007.html": [
+ "491697a385b537a3b4ed01441335211f2ec55569",
+ "testharness"
],
- "css/selectors/css3-modsel-126.xml": [
- "57bfd40d6cbbefae7136c069bf16ad1f8037b354",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-008.html": [
+ "64724fcb4e4511757e6b98040f6cbf8cbbf67353",
+ "testharness"
],
- "css/selectors/css3-modsel-126b.xml": [
- "3d200684d4ed3cdbbc2674725eb7a7e4a427ed23",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-009.html": [
+ "3d89b2aacffa84b1ae253d2f1582720c86828eb2",
+ "testharness"
],
- "css/selectors/css3-modsel-127.xml": [
- "b9d4d717c472511aedd6bae6f23ceee40881449f",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-010.html": [
+ "c77bc61aed77b6fdaa0ed64ba45a135831402d17",
+ "testharness"
],
- "css/selectors/css3-modsel-127b.xml": [
- "aeed223c2b305697e94de8fb9201b0af0facdd1a",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-011.html": [
+ "648e937e9797f8711caa7e7299a764c4a1925e1b",
+ "testharness"
],
- "css/selectors/css3-modsel-128.xml": [
- "b7095d1ff83d7b648541c062b9344379b777924e",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-012.html": [
+ "36f4aad20210f236b91f77be3261cb9092d3b6f5",
+ "testharness"
],
- "css/selectors/css3-modsel-128b.xml": [
- "ec336c02bda17c68e5d813087d4b073d7e9f4984",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-014.html": [
+ "5e68d50d5a07211dcc1cb70235da5efa96e38759",
+ "testharness"
],
- "css/selectors/css3-modsel-129.xml": [
- "7b035992d3f7a8a38a0d851ef3a28d9a2cba1fec",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-015.html": [
+ "ac91535d874f2e50e6799628b978a418700094ed",
+ "testharness"
],
- "css/selectors/css3-modsel-129b.xml": [
- "80ea9377d0c88df80733b7ccdc4bc9e1d41376f7",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-016.html": [
+ "6d1ac018750fd18d5614dfa0d8fddf02ad330215",
+ "testharness"
],
- "css/selectors/css3-modsel-13.xml": [
- "9fbd1d596ad150d18f5e3b65a8525e50da1130da",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-021.html": [
+ "04cc4431b81526240e042e9b4269633b2d1475fd",
+ "testharness"
],
- "css/selectors/css3-modsel-130.xml": [
- "89758646f3fea2d98e58871a121870d19a5ea4ae",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-022.html": [
+ "b4ed986971f10efd6e96f70c88bbfc4da956bc93",
+ "testharness"
],
- "css/selectors/css3-modsel-130b.xml": [
- "cbbc27506ef1944613a929520713315855b45d85",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-024.html": [
+ "5b1847dd78d19e66180c5f2b3385796a51c1a123",
+ "testharness"
],
- "css/selectors/css3-modsel-131.xml": [
- "7796e77ab18e33cf80776b92a168ceac095a86ca",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-025.html": [
+ "2e2f0c3e5f27d6892fcaf9ef39a6dad7f80c24e7",
+ "testharness"
],
- "css/selectors/css3-modsel-131b.xml": [
- "20bebae23f7b49873fd4b5f13123552296647b69",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-026.html": [
+ "2deb49a3fc0520485d5f08b26b8c7e02084ea74a",
+ "testharness"
],
- "css/selectors/css3-modsel-132.xml": [
- "93b657592a9c5e601e3528afdb8b288e50e02ece",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-027.html": [
+ "b8af60ea2371afc447e39225b9a534e4120b14fa",
+ "testharness"
],
- "css/selectors/css3-modsel-132b.xml": [
- "bdfc4b01162daeb51ede62b815d0ef4103810669",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-028.html": [
+ "ea6a509d6aaef78a02872d6695780590c8cb222c",
+ "testharness"
],
- "css/selectors/css3-modsel-133.xml": [
- "aac7b33aababc354bb0ad93efb928f18b9ba7b68",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-029.html": [
+ "1abf1ad49095736b35c63f82ad3d4564080031d2",
+ "testharness"
],
- "css/selectors/css3-modsel-133b.xml": [
- "bbee1b9fdd4e4ea42c1b19aef40c9bcd49d1a5a9",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-030.html": [
+ "8bac2befb331fbf7819f7151b85481a8e3cf53a3",
+ "testharness"
],
- "css/selectors/css3-modsel-134.xml": [
- "0786e24af6601e9be0ecb71a58d58c5f6e157c9c",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-031.html": [
+ "5baedd284604a969554903d84fde3b35ba1e152e",
+ "testharness"
],
- "css/selectors/css3-modsel-134b.xml": [
- "e526178e31225a4ee49cbe777180023a40575e65",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-032.html": [
+ "4d19ef9537bf156eaa20e9a0f6b980a0b0bdc40c",
+ "testharness"
],
- "css/selectors/css3-modsel-135.xml": [
- "6f07a3f05727a1e43772f590777dbfb260abf392",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-034.html": [
+ "aa7b5821003327ae3402cd5246d1b88e73d1ca6f",
+ "testharness"
],
- "css/selectors/css3-modsel-135b.xml": [
- "be2ffab1605a5590bbe25e829c04e844496384d1",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-035.html": [
+ "8c00b6a62cd9da8a7d44149eaf3534e43c980770",
+ "testharness"
],
- "css/selectors/css3-modsel-136.xml": [
- "e5b9be82129590a8c444503cd2c600ac70c1f7c2",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-036.html": [
+ "61ba345383ac2bde74fc83adcac0306baa4a1ce1",
+ "testharness"
],
- "css/selectors/css3-modsel-136b.xml": [
- "df0a18c7c2280de9efab9620d05294be4c37f105",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-041.html": [
+ "1de94e2b92fa1a25335129c526162aecada6bbbc",
+ "testharness"
],
- "css/selectors/css3-modsel-137.xml": [
- "449365b2f0291e9913e792c6a9e3223e1074ed76",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-042.html": [
+ "5f8d799c7013dbd377d6e98f309dbda465bf4e04",
+ "testharness"
],
- "css/selectors/css3-modsel-137b.xml": [
- "01570504e4ee0e1940aee34ab1170761ecf2b887",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-044.html": [
+ "bab7033cecc45757e0b41355c9e690ac78cb250e",
+ "testharness"
],
- "css/selectors/css3-modsel-138.xml": [
- "ef64af1ce58ed747b0e381d1c70df4a01acbfd95",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-045.html": [
+ "96941e91abfc0213748e9f335d27559082b9fb22",
+ "testharness"
],
- "css/selectors/css3-modsel-138b.xml": [
- "1723302997b5394fa5ff694a50419740a151f49f",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-046.html": [
+ "07af0a228531462714c0f462a8cf476fb3d2754a",
+ "testharness"
],
- "css/selectors/css3-modsel-139.xml": [
- "e06aa60f5573b9f6839256a2cdafd6c38d6a40f8",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-047.html": [
+ "a56364395c0654f3925b0ebfdadefb543a843df6",
+ "testharness"
],
- "css/selectors/css3-modsel-139b.xml": [
- "d60f718048986c8766b8e4f0de16bcf455b4cd22",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-048.html": [
+ "4c8f297f7f0bd4ea1050c0b82399d5323f9d0b1e",
+ "testharness"
],
- "css/selectors/css3-modsel-14.xml": [
- "d570a2e50e253219fc6f4783c2688f7f2199d355",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-049.html": [
+ "b7d1a7ebf6b32f050912c8b3649319d9c17866e4",
+ "testharness"
],
- "css/selectors/css3-modsel-140.xml": [
- "5dc99e07ce189d0f06b8e8f254dec2c867c7904d",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-050.html": [
+ "52d7bf1c173e862387fcaac45e0a143ad95bd55a",
+ "testharness"
],
- "css/selectors/css3-modsel-140b.xml": [
- "93b811a004d3cd0285aee609fe85bb5ba06a92a6",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-051.html": [
+ "7881d532569db18ce7fc5f24694cef19fe8c0f7b",
+ "testharness"
],
- "css/selectors/css3-modsel-141.xml": [
- "def596ab199e4bde245217f305a7b83c2da6b081",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-052.html": [
+ "386a717cb3cd74dd038073f7132ff86d937aaabb",
+ "testharness"
],
- "css/selectors/css3-modsel-141b.xml": [
- "cc310d5135ae58d0862b480cef1bc47bdc0342c8",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-054.html": [
+ "8732daf05e1187fed72d6ed62a94b2f619498243",
+ "testharness"
],
- "css/selectors/css3-modsel-142.xml": [
- "49bf0b7c588713b95038123d55ca3799192476d1",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-055.html": [
+ "388a287ae9e83bc3dbb77b8f9011a8da2b05a765",
+ "testharness"
],
- "css/selectors/css3-modsel-142b.xml": [
- "861e3f58a681ec2a73df99d180970ce3644586bd",
- "support"
+ "css/selectors/i18n/css3-selectors-lang-056.html": [
+ "8bec0fab08bf28d584054546fed0312156116526",
+ "testharness"
],
- "css/selectors/css3-modsel-143.xml": [
- "b9bddae77d6609c2f242aac16b5cf1109c49b3f5",
- "support"
+ "css/selectors/invalidation/any-link-pseudo.html": [
+ "9792fd0ebe1c77307ec1cfb6f572fc5d8e139e6a",
+ "testharness"
],
- "css/selectors/css3-modsel-143b.xml": [
- "b81f992559c67b877f9785106eea14517f3a7158",
- "support"
+ "css/selectors/invalidation/matches.html": [
+ "634ded3c7d760f6dccb2c14e87cf67f1c1320da5",
+ "testharness"
],
- "css/selectors/css3-modsel-144.xml": [
- "790d05f61ae31cac24e268fc7814eed5f4d598e5",
- "support"
+ "css/selectors/invalidation/quirks-mode-stylesheet-dynamic-add-001.html": [
+ "3d7be982378fe2414f818d1682eca8f38f3575ac",
+ "testharness"
],
- "css/selectors/css3-modsel-145a.xml": [
- "7ad7011c1d3e745830becf997899d679a90470e6",
- "support"
+ "css/selectors/invalidation/selectorText-dynamic-001.html": [
+ "c705c2b3e85f591076f34e202c9a41b1ae0ff271",
+ "testharness"
],
- "css/selectors/css3-modsel-145b.xml": [
- "d55730b065283b08d0a264c2b3f66c4e611eaeca",
- "support"
+ "css/selectors/invalidation/sheet-going-away-001.html": [
+ "7b704eca97ff5bf725379692174e1d1b2fb3f425",
+ "testharness"
],
- "css/selectors/css3-modsel-146a.xml": [
- "2e2f822568c921716503394ccddd422df87daf50",
+ "css/selectors/invalidation/sheet-going-away-002-ref.html": [
+ "67841617736730e588f5659fd485fb09a159bd33",
"support"
],
- "css/selectors/css3-modsel-146b.xml": [
- "b8ac824396903475d2a6ac4b0903b62b15c2c2e8",
- "support"
+ "css/selectors/invalidation/sheet-going-away-002.html": [
+ "41778239518d4d9b602f7fc18ee3ea5c910da85b",
+ "reftest"
],
- "css/selectors/css3-modsel-147a.xml": [
- "70bab9788b93df417c8c5f03b6d39305cf0049ab",
- "support"
+ "css/selectors/matches-nested.html": [
+ "b82d43d09017955af2904f6362e858929a6d4399",
+ "testharness"
],
- "css/selectors/css3-modsel-147b.xml": [
- "3791bdd4a7e6f6e9eb232a05eb6fb1863aa1a257",
- "support"
+ "css/selectors/matches-specificity.html": [
+ "41d7251a3d74efbdf69407889418797a80289316",
+ "testharness"
],
- "css/selectors/css3-modsel-148.xml": [
- "da1756f509c12bd1198ab385090ef7c7dece721f",
- "support"
+ "css/selectors/missing-right-token.html": [
+ "8fe33a95795354117177f78eae7f1081ef0b1947",
+ "testharness"
],
- "css/selectors/css3-modsel-149.xml": [
- "1c20641cd2deced3c4224fcf585a2a7285710217",
+ "css/selectors/of-type-selectors-ref.xhtml": [
+ "af883c97ecf1a968edcdcd5cc5d2f7d6fba71212",
"support"
],
- "css/selectors/css3-modsel-149b.xml": [
- "c883ff0d5460f3e7f190afd3f3516322c0981a8d",
- "support"
+ "css/selectors/of-type-selectors.xhtml": [
+ "18fead9b1cc452059ad74f9cc3154d663e5f8d4b",
+ "reftest"
],
- "css/selectors/css3-modsel-14b.xml": [
- "fd9801f55c735cdbfd0b2d7177fa608f58aa1dd6",
- "support"
+ "css/selectors/old-tests/css3-modsel-1.xml": [
+ "0ce55a4d99e7d9f00a5b4e5de233efc95fdf8e40",
+ "visual"
],
- "css/selectors/css3-modsel-14c.xml": [
- "7e0946dcb8f74eb1cd424c3aebfd900962f389fc",
- "support"
+ "css/selectors/old-tests/css3-modsel-10.xml": [
+ "bb2f40f492ec8d97d25c52ec1504e4560b4bbbb2",
+ "visual"
],
- "css/selectors/css3-modsel-14d.xml": [
- "2623cc919ae17cc3f84839a2f088b5acd72e6c21",
- "support"
+ "css/selectors/old-tests/css3-modsel-100.xml": [
+ "57658b7013a4f2f81cd6eb5b8df4ec00abe5bc22",
+ "visual"
],
- "css/selectors/css3-modsel-14e.xml": [
- "3cd4f29bc8954815c9951e6c1d7a2b110a9f3a29",
- "support"
+ "css/selectors/old-tests/css3-modsel-100b.xml": [
+ "8519170f151463ad6785395e082dcf2c5556c3f6",
+ "visual"
],
- "css/selectors/css3-modsel-15.xml": [
- "2821ea2ccdbafa9db7b8ea88d8d9c3e5a508c7d5",
- "support"
+ "css/selectors/old-tests/css3-modsel-101.xml": [
+ "4d17096f436d05b6f6fd09f0c5115c00f29d8b2a",
+ "reftest"
],
- "css/selectors/css3-modsel-150.xml": [
- "79455907d525c2a9c49dffc1bbd5a941c66fbedf",
- "support"
+ "css/selectors/old-tests/css3-modsel-101b.xml": [
+ "23fc37b86ab289f5a44feb71694a49ef91e6a972",
+ "reftest"
],
- "css/selectors/css3-modsel-151.xml": [
- "dee60a2045dedef271004825aa948b837536f6ca",
- "support"
+ "css/selectors/old-tests/css3-modsel-102.xml": [
+ "de5978185190d295804663577265daa27b853cd6",
+ "reftest"
],
- "css/selectors/css3-modsel-152.xml": [
- "77d8ee55b29d03be56e70a576cb95be3a1d9a121",
- "support"
+ "css/selectors/old-tests/css3-modsel-102b.xml": [
+ "cfd121ab71b45752bd129624c7b4689e12c70eb2",
+ "visual"
],
- "css/selectors/css3-modsel-153.xml": [
- "b822c6acd848b90f9316b620549fc3fdb505079d",
- "support"
+ "css/selectors/old-tests/css3-modsel-103.xml": [
+ "191533a5d388dba8737e890b16dc4e2158dde5d6",
+ "reftest"
],
- "css/selectors/css3-modsel-154.xml": [
- "0f822776af5572bc89c329c81a170b51a0b70506",
- "support"
+ "css/selectors/old-tests/css3-modsel-103b.xml": [
+ "4cdd208fa478fd247dff4a06a7cf5315e343694f",
+ "reftest"
],
- "css/selectors/css3-modsel-155.xml": [
- "cf9a62869767cd2b61afa322f626f9c6b194f824",
- "support"
+ "css/selectors/old-tests/css3-modsel-104.xml": [
+ "beed75ddaafe7396d525b18a6ec0c7ac28cc0552",
+ "visual"
],
- "css/selectors/css3-modsel-155a.xml": [
- "4c7f3531b0bce6608ece8ee0c189cc4a66761cf8",
- "support"
+ "css/selectors/old-tests/css3-modsel-104b.xml": [
+ "9a87d41fa3a0b9a5049e32fff3dc41ea77156759",
+ "visual"
],
- "css/selectors/css3-modsel-155b.xml": [
- "36ea99926b0d93102f2d963bc3609b4d09703822",
- "support"
+ "css/selectors/old-tests/css3-modsel-105.xml": [
+ "51d511ee988a5618a84695a6a319f0545d59f311",
+ "reftest"
],
- "css/selectors/css3-modsel-155c.xml": [
- "ba42bf6b2b5efa882e20ea507ea9b7c7af308f58",
- "support"
+ "css/selectors/old-tests/css3-modsel-105b.xml": [
+ "3c3cd2ce4c7987250974a981606bfcf6ed65ff40",
+ "reftest"
],
- "css/selectors/css3-modsel-155d.xml": [
- "f604ceafac273d51a3a53c4c430a9bd9913301f9",
- "support"
+ "css/selectors/old-tests/css3-modsel-106.xml": [
+ "c806d6bf56cf3fd2a87badd1e3cec8f71a790b99",
+ "reftest"
],
- "css/selectors/css3-modsel-156.xml": [
- "9233997880e981958c31e509f5fbd978582c2dff",
- "support"
+ "css/selectors/old-tests/css3-modsel-106b.xml": [
+ "a76ec5a05fe1c80947b1b39e10fa5d1b60e5a1c6",
+ "reftest"
],
- "css/selectors/css3-modsel-156b.xml": [
- "149e6d0bcc262ea4c7c257215ec15a1f468dfdb2",
- "support"
+ "css/selectors/old-tests/css3-modsel-107.xml": [
+ "260bdd40c60ca6f44b6d583c8b012ac36aee7f8c",
+ "visual"
],
- "css/selectors/css3-modsel-156c.xml": [
- "c5796d2930eb21a762b31fba60cde7229ec30afa",
- "support"
+ "css/selectors/old-tests/css3-modsel-107b.xml": [
+ "ebdd2e009bd55fbccaad419bec12fd8719b78e31",
+ "visual"
],
- "css/selectors/css3-modsel-157.xml": [
- "241b1d1aac50e1681d1d9cfb4bb8052df2bf051f",
- "support"
+ "css/selectors/old-tests/css3-modsel-108.xml": [
+ "30e354522d98b24cf7ef248013b3e6129086e3d5",
+ "reftest"
],
- "css/selectors/css3-modsel-158.xml": [
- "e8b37afa4b242e92db37fa095b090f813325cd5f",
- "support"
+ "css/selectors/old-tests/css3-modsel-108b.xml": [
+ "933aee9c141222bf3626bd756c05e6457cc9065c",
+ "reftest"
],
- "css/selectors/css3-modsel-159.xml": [
- "19d1de75ff22d250c31a28708403919604f0fd8d",
- "support"
+ "css/selectors/old-tests/css3-modsel-109.xml": [
+ "9f8cee6a73809b9c2411a29f7c46a0981f9657a5",
+ "reftest"
],
- "css/selectors/css3-modsel-15b.xml": [
- "07f9bc5e63020d3904c0d8974eb4336f1d4e29fb",
- "support"
+ "css/selectors/old-tests/css3-modsel-109b.xml": [
+ "5e242f5d73ec9dbc34831051cb1e8bc3397d253a",
+ "reftest"
],
- "css/selectors/css3-modsel-15c.xml": [
- "f5fd8ad6d57ec4b1680e9c5a95c5d409530dc75b",
- "support"
+ "css/selectors/old-tests/css3-modsel-11.xml": [
+ "5e4d827e4cc0ccd6c12ade6875f62cc35656e4a4",
+ "visual"
],
- "css/selectors/css3-modsel-16.xml": [
- "ea4c9849b8a86c0db23b83ac280f1efb8707e69e",
- "support"
+ "css/selectors/old-tests/css3-modsel-110.xml": [
+ "8760fac79abae06cbb5e455c9e47d331986ea4a8",
+ "reftest"
],
- "css/selectors/css3-modsel-160.xml": [
- "721d60af63fdd27527a7b6472fb7e2c9e0543f46",
- "support"
+ "css/selectors/old-tests/css3-modsel-110b.xml": [
+ "a20984ac4120e79d5c4c4dfe1f377ed5c9f12ad4",
+ "reftest"
],
- "css/selectors/css3-modsel-161.xml": [
- "285b4d2938eeac473c60c194ee7f0e46fd6691f0",
- "support"
+ "css/selectors/old-tests/css3-modsel-111.xml": [
+ "f834da54858926844094281607d6a7b402f403d0",
+ "visual"
],
- "css/selectors/css3-modsel-162.xml-removed": [
- "b81ef952c64ff305d6389ac4063502bb69f49d82",
- "support"
+ "css/selectors/old-tests/css3-modsel-111b.xml": [
+ "8d55801a2440717ef903eea1188c7c6682afa5c3",
+ "visual"
],
- "css/selectors/css3-modsel-163.xml-disabled-contains-removed": [
- "88deffac63ec72b3d19c72a892d41fc10a922b18",
- "support"
+ "css/selectors/old-tests/css3-modsel-112.xml": [
+ "f335eff311e4264c770c16a7f32a595b4bc6f156",
+ "reftest"
],
- "css/selectors/css3-modsel-164.xml-removed": [
- "2c26d874176852561f13b049b300fe4d7136f23a",
- "support"
+ "css/selectors/old-tests/css3-modsel-112b.xml": [
+ "0b5b174b3a726eee51c51511731e28d285b7dee0",
+ "reftest"
],
- "css/selectors/css3-modsel-165.xml-removed": [
- "c2d16df2d79345c01ef0322a52b3c45ea6c7b2ef",
- "support"
+ "css/selectors/old-tests/css3-modsel-113.xml": [
+ "c779e14650e33063a2a8c936d9d72ec1ba72ea20",
+ "visual"
],
- "css/selectors/css3-modsel-166.xml": [
- "2b5ede8f529a13c1656d0cccad2e758056b52911",
- "support"
+ "css/selectors/old-tests/css3-modsel-113b.xml": [
+ "4cbfc6dfeed849b6d0c10c9a2f73ca3fcf15d6ad",
+ "visual"
],
- "css/selectors/css3-modsel-166a.xml": [
- "141d6cfa09ff897250b9be83fb5290a437379e70",
- "support"
+ "css/selectors/old-tests/css3-modsel-114.xml": [
+ "9a7f451ee8f30b9d2d176fabdad808adce483c8d",
+ "visual"
],
- "css/selectors/css3-modsel-167.xml": [
- "28809de1351181c453b0af8d0dbe568debef1909",
- "support"
+ "css/selectors/old-tests/css3-modsel-114b.xml": [
+ "b5aab0d17d44f148760cac91719a28f9ac021a8b",
+ "visual"
],
- "css/selectors/css3-modsel-167a.xml": [
- "1bff3b132ea852b96a1c6bc65f8e07961740e375",
- "support"
+ "css/selectors/old-tests/css3-modsel-115.xml": [
+ "4c2492bd1b6b0faa661bcf99521e868d50b0b2f7",
+ "reftest"
],
- "css/selectors/css3-modsel-168.xml": [
- "9cc9bbebb13a9c835626910e7a0b6283eecfcbfc",
- "support"
+ "css/selectors/old-tests/css3-modsel-115b.xml": [
+ "9b37ed1ab8a630e9424e1e6577698e7d26016e57",
+ "reftest"
],
- "css/selectors/css3-modsel-168a.xml": [
- "8332c3345c514fa144b1d60e738843ad1826638d",
- "support"
+ "css/selectors/old-tests/css3-modsel-116.xml": [
+ "e73d83db14f5c6c2339e09b3b313fadfa56b58a3",
+ "reftest"
],
- "css/selectors/css3-modsel-169.xml": [
- "0579bc96e6029e409b73a03d2084c6dfdf99678e",
- "support"
+ "css/selectors/old-tests/css3-modsel-116b.xml": [
+ "59a46a6362c7fae514d8907ae7fa18854c8459ed",
+ "reftest"
],
- "css/selectors/css3-modsel-169a.xml": [
- "f39e6b530bc2f786a6876b1cc191fddd41c16343",
- "support"
+ "css/selectors/old-tests/css3-modsel-117.xml": [
+ "5381cec147babd4d5e6fcee0a6de5d1611d1e172",
+ "reftest"
],
- "css/selectors/css3-modsel-17.xml": [
- "8203771cf1cb1afb05ee385555c7607bc9a72052",
- "support"
+ "css/selectors/old-tests/css3-modsel-117b.xml": [
+ "b88ac99a653d13f9e479e1a77ea39115d24d5ff6",
+ "reftest"
],
- "css/selectors/css3-modsel-170.xml": [
- "2feb3cf9c49c27a03e239df16dd4e336d6d41e80",
- "support"
+ "css/selectors/old-tests/css3-modsel-118.xml": [
+ "823c577031d79160a46bf748c36c2efb49fea5f3",
+ "visual"
],
- "css/selectors/css3-modsel-170a.xml": [
- "749bb0709cdb2ee988169527d24dbd5abe997f2b",
- "support"
+ "css/selectors/old-tests/css3-modsel-119.xml": [
+ "8a4eda34b41b6ecb30ee6e226baa5673d82fbb86",
+ "visual"
],
- "css/selectors/css3-modsel-170b.xml": [
- "c0f6887cf09acb28b1e74a3c84d75241228f6c85",
- "support"
+ "css/selectors/old-tests/css3-modsel-120.xml": [
+ "4f233426b2fdcf2aee867e49514ead1db1b93073",
+ "visual"
],
- "css/selectors/css3-modsel-170c.xml": [
- "b8c68bd6135a7fdf09c0945a190d5299814f99ed",
- "support"
+ "css/selectors/old-tests/css3-modsel-121.xml": [
+ "4d666876cc89c324743a9d5534a18008a717d520",
+ "visual"
],
- "css/selectors/css3-modsel-170d.xml": [
- "5d79d1ff45e0df916a589d26a9e25b63faf737d7",
- "support"
+ "css/selectors/old-tests/css3-modsel-122.xml": [
+ "23538313056aa97bcf3f7beb8b3424108bef32b9",
+ "reftest"
],
- "css/selectors/css3-modsel-171.xml": [
- "df876299aa35317c29a741689ff2c37079ae454e",
- "support"
+ "css/selectors/old-tests/css3-modsel-123.xml": [
+ "b9e577a059375f9adc415c1cad0f5dc75dd79268",
+ "visual"
],
- "css/selectors/css3-modsel-172a.xml": [
- "a936ab7fdf0c48ef02becc2f2624706fbe222512",
- "support"
+ "css/selectors/old-tests/css3-modsel-123b.xml": [
+ "b6dcd3a97ee3dfb4f8474d340b69ebcf21c80451",
+ "visual"
],
- "css/selectors/css3-modsel-172b.xml": [
- "ea3f3b54ad520b053bb1a11618f049ca66bbe262",
- "support"
+ "css/selectors/old-tests/css3-modsel-124.xml": [
+ "6c487f8af8cb8ca1326635eb8f64b16f3d615f4a",
+ "visual"
],
- "css/selectors/css3-modsel-173a.xml": [
- "ee0c48cc4b4ea2c3ccdd935840caebb4e18bbbc5",
- "support"
+ "css/selectors/old-tests/css3-modsel-124b.xml": [
+ "a6fba323d2996b501b745fe4963e00f076dcbbbf",
+ "visual"
],
- "css/selectors/css3-modsel-173b.xml": [
- "4520c7c8f60717b9830ffae3a74d26ad6a348166",
- "support"
+ "css/selectors/old-tests/css3-modsel-125.xml": [
+ "10e3ec1d8445d53f67fe74e626e544e182b282e0",
+ "reftest"
],
- "css/selectors/css3-modsel-174a.xml": [
- "2593661e45d83ef1b0c0c70cc60b92c6df1a7950",
- "support"
+ "css/selectors/old-tests/css3-modsel-125b.xml": [
+ "032a0eab06f417cb2a9ce1721b0f438033b904c2",
+ "reftest"
],
- "css/selectors/css3-modsel-174b.xml": [
- "a8dddce2b5207b959446a324da89d942de76353a",
- "support"
+ "css/selectors/old-tests/css3-modsel-126.xml": [
+ "dca13bdbf7032a8809954584ec9c8887dc28b867",
+ "reftest"
],
- "css/selectors/css3-modsel-175a.xml": [
- "6d74fd27a9de4585a82a774a37a60fb72a2daf55",
- "support"
+ "css/selectors/old-tests/css3-modsel-126b.xml": [
+ "9dba3b1c7250da97c10c88966dc9cb2e4b5e308e",
+ "reftest"
],
- "css/selectors/css3-modsel-175b.xml": [
- "ea136a0cef352a267ea7b376f130e7886e9cedcc",
- "support"
+ "css/selectors/old-tests/css3-modsel-127.xml": [
+ "9ef8cd77a74e13da2ac4bd9e40a3dab931222f86",
+ "reftest"
],
- "css/selectors/css3-modsel-175c.xml": [
- "dabde06c883570ad02cc6d9ba25dbc85fd88553d",
- "support"
+ "css/selectors/old-tests/css3-modsel-127b.xml": [
+ "41e88ecf652f99ce3bbb4d68ee6d7e5192d5991a",
+ "reftest"
],
- "css/selectors/css3-modsel-176.xml": [
- "b56202954fdaca943b1bbe7b56c574e2930779ea",
- "support"
+ "css/selectors/old-tests/css3-modsel-128.xml": [
+ "cb192739debbe010cade14d030d7724ffc826923",
+ "reftest"
],
- "css/selectors/css3-modsel-177a.xml": [
- "27b39e8f06d618dffb29e2ede9df98e153d5dba2",
- "support"
+ "css/selectors/old-tests/css3-modsel-128b.xml": [
+ "26dbce728c1d6bb8fbad170520d80ff9a45ee0d0",
+ "reftest"
],
- "css/selectors/css3-modsel-177b.xml": [
- "fc78911553f0cd3ed1e99f4afc909d22d06a7f2a",
- "support"
+ "css/selectors/old-tests/css3-modsel-129.xml": [
+ "c3dbdbaf6dab721951bc3d1407ca8e79b85d754e",
+ "reftest"
],
- "css/selectors/css3-modsel-178.xml": [
- "fc37aedc7612b2c521934f612bc5e4fe410f55bd",
- "support"
+ "css/selectors/old-tests/css3-modsel-129b.xml": [
+ "407d6a91c53a897e91a79bba158f885c89cd2bf3",
+ "reftest"
],
- "css/selectors/css3-modsel-179.xml": [
- "d18dbbfc40d989e6cc36838cc07c64daa7104f26",
- "support"
+ "css/selectors/old-tests/css3-modsel-13.xml": [
+ "826e576ad41565bce2280e4ad4eea241021016dc",
+ "visual"
],
- "css/selectors/css3-modsel-179a.xml": [
- "ff4361ab1adaeba3b17009bd3f8a35f12cd8ab27",
- "support"
+ "css/selectors/old-tests/css3-modsel-130.xml": [
+ "e9a7672c53e69ad2e3e9118bbeda1cbd7bb54f8e",
+ "visual"
],
- "css/selectors/css3-modsel-18.xml": [
- "72e8b4456cf6ccb15f780107a7c517b4ed9783a4",
- "support"
+ "css/selectors/old-tests/css3-modsel-130b.xml": [
+ "54c6c6a9c2c867f223d93d04e62589025cfed356",
+ "visual"
],
- "css/selectors/css3-modsel-180.xml-disabled-because-we-want-to-allow-for-expansion": [
- "713e761b82f957db8996111fa0a6bd24a646bf79",
- "support"
+ "css/selectors/old-tests/css3-modsel-131.xml": [
+ "f937a8094ad91d261f47c0297017d871f946cffe",
+ "visual"
],
- "css/selectors/css3-modsel-180a.xml": [
- "e76bb43776e2cfdf8e96e184bf825105f32b1d25",
- "support"
+ "css/selectors/old-tests/css3-modsel-131b.xml": [
+ "05a7753eac6f5024133220612b3f82c18165a6ff",
+ "visual"
],
- "css/selectors/css3-modsel-181.xml": [
- "3eca72a32ed305f7795e954196adeeb492d3f64f",
- "support"
+ "css/selectors/old-tests/css3-modsel-132.xml": [
+ "f7080850ff9e895124aeeacbd75bf7c816616adb",
+ "visual"
],
- "css/selectors/css3-modsel-182.xml": [
- "f8212bf1cca73e4fd33340691c742f3c56e2c669",
- "support"
+ "css/selectors/old-tests/css3-modsel-132b.xml": [
+ "8270be88dedf4fd9396c8e27c61c2d8891c80749",
+ "visual"
],
- "css/selectors/css3-modsel-183.xml": [
- "03de4bcaec54f24b024f214812ba384ecd0d34e5",
- "support"
+ "css/selectors/old-tests/css3-modsel-133.xml": [
+ "1c1b5baf5756e0b258c4e6855d8a0e911a977186",
+ "visual"
],
- "css/selectors/css3-modsel-184a.xml": [
- "e6da5a1a98457fb4a97e29bd75c4368a1f5161fc",
- "support"
+ "css/selectors/old-tests/css3-modsel-133b.xml": [
+ "6f67b88a179295d665dff1efe6b177a05d77e4b6",
+ "visual"
],
- "css/selectors/css3-modsel-184b.xml": [
- "b2230ede04ea29dbbeaa1e62c638246bf0aa1ed8",
- "support"
+ "css/selectors/old-tests/css3-modsel-134.xml": [
+ "20f42fda6095fcff3755cf449282d55dea322351",
+ "reftest"
],
- "css/selectors/css3-modsel-184c.xml": [
- "b04d44185108b37aa718c639b717c24dbb9c2188",
- "support"
+ "css/selectors/old-tests/css3-modsel-134b.xml": [
+ "5a14b8f7334bc241da90318a14b3bc8d03196125",
+ "reftest"
],
- "css/selectors/css3-modsel-184d.xml": [
- "4e38023ea429d22dd9c39a4819e79026ece67e37",
- "support"
+ "css/selectors/old-tests/css3-modsel-135.xml": [
+ "842ff6573ae9ea1ce1b15cc29f28669b14431751",
+ "reftest"
],
- "css/selectors/css3-modsel-184e.xml": [
- "6f96b7f77651f293ee32eea3ab23fd826c3be29f",
- "support"
+ "css/selectors/old-tests/css3-modsel-135b.xml": [
+ "9658c29253af7fcfdcff67c2df081c95068b5ca7",
+ "reftest"
],
- "css/selectors/css3-modsel-184f.xml": [
- "a9593f8dc4fa23a85308fab561bb7759d818561b",
- "support"
+ "css/selectors/old-tests/css3-modsel-136.xml": [
+ "ca2a6ca22de1474a9502c4cda3bd12bbb5ad75b5",
+ "reftest"
],
- "css/selectors/css3-modsel-18a.xml": [
- "70b168a3a5b66c5aa5388c7d84e1bcfccf556393",
- "support"
+ "css/selectors/old-tests/css3-modsel-136b.xml": [
+ "94e8cb03d23c7c8cdfe96ec3dddc67cbcd383bce",
+ "reftest"
],
- "css/selectors/css3-modsel-18b.xml": [
- "b57cbfb25d0107c553779d796530cdfd7b773762",
- "support"
+ "css/selectors/old-tests/css3-modsel-137.xml": [
+ "fd17088d3839a3e637d2ac41bb33bc0faba18d69",
+ "visual"
],
- "css/selectors/css3-modsel-18c.xml": [
- "3d28e24bfa2ef5996b4a8ed2a495ff3a85601325",
- "support"
+ "css/selectors/old-tests/css3-modsel-137b.xml": [
+ "47d5dc7b200540e47d836bf1dd1887237ba16fb6",
+ "visual"
],
- "css/selectors/css3-modsel-19.xml": [
- "5f348f242aaa29323867cb0a74fdd01bd195a2cc",
- "support"
+ "css/selectors/old-tests/css3-modsel-138.xml": [
+ "9e8f8c0e2ef1bfa1434340006a3196aaa52efc7b",
+ "visual"
],
- "css/selectors/css3-modsel-19a.xml-removed": [
- "138c1fab50891745607c430300c89aadac0b54c6",
- "support"
+ "css/selectors/old-tests/css3-modsel-138b.xml": [
+ "7cc16fd3c39991e9c433c3ea0569db52130d57ed",
+ "visual"
],
- "css/selectors/css3-modsel-19b.xml": [
- "9c3683c327cc453eaecaf4ceab0daf06b58bf4af",
- "support"
+ "css/selectors/old-tests/css3-modsel-139.xml": [
+ "ceebe6640b993d44aca1fd3b835e1e43d5118156",
+ "visual"
],
- "css/selectors/css3-modsel-2.xml": [
- "e06740a7d53c272d5ea29357c98ebca235653599",
- "support"
+ "css/selectors/old-tests/css3-modsel-139b.xml": [
+ "4e727ea9c95de1ef0b1863a6ac4a9e0d156610cd",
+ "visual"
],
- "css/selectors/css3-modsel-20.xml": [
- "d6204affe156c4ff9b87e0d8448a203932f06c96",
- "support"
+ "css/selectors/old-tests/css3-modsel-14.xml": [
+ "5074fe0249c19e1cb8291ef69fbc04361ddb3386",
+ "visual"
],
- "css/selectors/css3-modsel-21.xml": [
- "56b1a5f185ea009e504f6a808d74c51a656e24c1",
- "support"
+ "css/selectors/old-tests/css3-modsel-140.xml": [
+ "49c9e4bf743d81d1c1e90f1ea61cb5f2372bae62",
+ "visual"
],
- "css/selectors/css3-modsel-21b.xml": [
- "fde26af08ac9634ee4655a22df68709965c70c7f",
- "support"
+ "css/selectors/old-tests/css3-modsel-140b.xml": [
+ "a39bd7d7730e03d3349756ddd959d326e3af5207",
+ "visual"
],
- "css/selectors/css3-modsel-21c.xml": [
- "a62a1518b126478164fe98b3340d0d504f06f341",
- "support"
+ "css/selectors/old-tests/css3-modsel-141.xml": [
+ "d69a2722fc6e5c1561479cd3a77a4ff2349aaace",
+ "reftest"
],
- "css/selectors/css3-modsel-22.xml": [
- "5996160912dea2c114a46a0b7b544fa9871ce686",
- "support"
+ "css/selectors/old-tests/css3-modsel-141b.xml": [
+ "184cb4e9dad8fa8c8a6e19e0019e35cf021f545f",
+ "reftest"
],
- "css/selectors/css3-modsel-23.xml": [
- "9c10294fa6d0b6437ad19f6fe505e8f92b14fd09",
- "support"
+ "css/selectors/old-tests/css3-modsel-142.xml": [
+ "230f49032d01f0aec8592b45af1a114ee659660f",
+ "reftest"
],
- "css/selectors/css3-modsel-24.xml": [
- "cd109dfea19a14f5a59d29c7bdc99834ec1893ee",
- "support"
+ "css/selectors/old-tests/css3-modsel-142b.xml": [
+ "a107e2a4eac8eafac08a935d18a794218f401fda",
+ "reftest"
],
- "css/selectors/css3-modsel-25.xml": [
- "aea599d761b8606702cb56e4d1f9914f073b5b66",
- "support"
+ "css/selectors/old-tests/css3-modsel-143.xml": [
+ "3bcd4f23c7f6cb4d95920d0628af5cb059e7fc08",
+ "reftest"
],
- "css/selectors/css3-modsel-27.xml": [
- "3d9f31b6f4d269199c724e112a03d7b80bcfc380",
- "support"
+ "css/selectors/old-tests/css3-modsel-143b.xml": [
+ "3c867296568e7407cc697a65df2d3ac659d74146",
+ "reftest"
],
- "css/selectors/css3-modsel-27a.xml": [
- "9c8cad695b2f8902a338abe5e66c1ad11b3eb6cf",
- "support"
+ "css/selectors/old-tests/css3-modsel-144.xml": [
+ "7efde113c565ca4041f3e2099fe585b59a016d0b",
+ "visual"
],
- "css/selectors/css3-modsel-27b.xml": [
- "7045d492b7d0e24c53fb74ed98965626a07c005c",
- "support"
+ "css/selectors/old-tests/css3-modsel-145a.xml": [
+ "ff15de6779a40b17fb7daf60f74be1ab1edf6e6d",
+ "visual"
],
- "css/selectors/css3-modsel-28.xml": [
- "7972d5dfc0c8c69887e614ff722cb3459bbc4ade",
- "support"
+ "css/selectors/old-tests/css3-modsel-145b.xml": [
+ "fb57366b69649307d2135dad023117c7558da0a3",
+ "visual"
],
- "css/selectors/css3-modsel-28b.xml": [
- "21a5a5479e00c6fd844da18e5cff4986cf1ba0e0",
- "support"
+ "css/selectors/old-tests/css3-modsel-146a.xml": [
+ "8704f09e6dcf2bf6006826d36a4a5ed345212126",
+ "visual"
],
- "css/selectors/css3-modsel-28c.pl-draft": [
- "f8601068c0190271e60bc05062f77733cb9c34b5",
- "support"
+ "css/selectors/old-tests/css3-modsel-146b.xml": [
+ "a7b28b4e5c5f6952150b9c5eece6ffb7968edc84",
+ "visual"
],
- "css/selectors/css3-modsel-29.xml": [
- "f98b97fd105f90f0379b2f82d0a0bbee5ac690a0",
- "support"
+ "css/selectors/old-tests/css3-modsel-147a.xml": [
+ "dcf600bf8056ca9550f7d1ed18d2e408f5cfeb4a",
+ "visual"
],
- "css/selectors/css3-modsel-29b.xml": [
- "31e75b5b42bffaf380d07cad8c790f39fbdea645",
- "support"
+ "css/selectors/old-tests/css3-modsel-147b.xml": [
+ "fdea6da42506613addd49fb055c0907889cb25d0",
+ "visual"
],
- "css/selectors/css3-modsel-3.xml": [
- "7dd22bd1f36dfd653e97c3c0ab6ec456f66ad915",
- "support"
+ "css/selectors/old-tests/css3-modsel-148.xml": [
+ "217ba53bbd0980a20cdf141383066cbb9f1fc67b",
+ "reftest"
],
- "css/selectors/css3-modsel-30.xml": [
- "67ed015543ff148ea25905903298778ce0eb96d7",
- "support"
+ "css/selectors/old-tests/css3-modsel-149.xml": [
+ "98fce81fac67dfebb3263a643006459e0478c274",
+ "reftest"
],
- "css/selectors/css3-modsel-31.xml": [
- "e8b9e373430b07ab5077f8f14f827d312cc08fce",
- "support"
+ "css/selectors/old-tests/css3-modsel-149b.xml": [
+ "98fce81fac67dfebb3263a643006459e0478c274",
+ "reftest"
],
- "css/selectors/css3-modsel-32.xml": [
- "362a42a5da9e2662c7586d7478e816d246104e1c",
- "support"
+ "css/selectors/old-tests/css3-modsel-14b.xml": [
+ "0be061ee973ee170c7f6b3fb60583e5abddde337",
+ "reftest"
],
- "css/selectors/css3-modsel-33.xml": [
- "62b2398034b046f486e2b91f7619b963b43700ed",
- "support"
+ "css/selectors/old-tests/css3-modsel-14c.xml": [
+ "0384f33280eb5b6b00f8c1a9014ef8ea0b2ad0c6",
+ "visual"
],
- "css/selectors/css3-modsel-34.xml": [
- "1fe467a4e03788db95191db35bfa5ecaadc6cf09",
- "support"
+ "css/selectors/old-tests/css3-modsel-14d.xml": [
+ "37e057b517fb02238505af7fc650e8d94428dc68",
+ "visual"
],
- "css/selectors/css3-modsel-35.xml": [
- "91eba66224543238695e8d0c0f9678c4a0f8bbf7",
- "support"
+ "css/selectors/old-tests/css3-modsel-14e.xml": [
+ "a8f8d75621512741eadcdfa3344013f5c3424c24",
+ "visual"
],
- "css/selectors/css3-modsel-36.xml": [
- "4873f20937833224b7eb1806697d4e82eb583c8a",
- "support"
+ "css/selectors/old-tests/css3-modsel-15.xml": [
+ "f3aa372602f9c34c9d8b0548ba89bb4f735f7007",
+ "visual"
],
- "css/selectors/css3-modsel-37.xml": [
- "c660db6b789b5e2ec900346a75429a8af5178c38",
- "support"
+ "css/selectors/old-tests/css3-modsel-150.xml": [
+ "b9fdca487eabf508b7436d84c2c0216137e74232",
+ "visual"
],
- "css/selectors/css3-modsel-38.xml": [
- "ad0515a1628368a54fcdc68dcb2c18af2ec112b2",
- "support"
+ "css/selectors/old-tests/css3-modsel-151.xml": [
+ "a4bb1dd2017678d8438cf2c81794bdacb1708994",
+ "reftest"
],
- "css/selectors/css3-modsel-39.xml": [
- "a262929ac20fe7a50bd1846ed47f42b0829877c6",
- "support"
+ "css/selectors/old-tests/css3-modsel-152.xml": [
+ "b39d57346347b05d2c41d8b97b9532b31c247580",
+ "reftest"
],
- "css/selectors/css3-modsel-39a.xml": [
- "dcc1730d0ca9257f7173ae1f6893fa0899c45101",
- "support"
+ "css/selectors/old-tests/css3-modsel-153.xml": [
+ "45f65fb5988c809769d73f0bab7051c5c2eb38e8",
+ "visual"
],
- "css/selectors/css3-modsel-39b.xml": [
- "fd1a787ce2978d3b3ac1ca30f39668b57d6d8245",
- "support"
+ "css/selectors/old-tests/css3-modsel-154.xml": [
+ "f5f029542b708880d3a88504b00af6ece58a432f",
+ "reftest"
],
- "css/selectors/css3-modsel-39c.xml": [
- "5832c074e542fbeb556e0f5cfe122a647e948dc1",
- "support"
+ "css/selectors/old-tests/css3-modsel-155.xml": [
+ "961374d6994ce566e9fe5bd86ac41b0e0d195f35",
+ "reftest"
],
- "css/selectors/css3-modsel-3a.xml": [
- "2737ccc6dbc5ff12e7e1d2f02be1e10d4deb8e3f",
- "support"
+ "css/selectors/old-tests/css3-modsel-155a.xml": [
+ "1fca1916e4fe244bdd0b0fae823cfb263435de5c",
+ "reftest"
],
- "css/selectors/css3-modsel-4.xml": [
- "1f8c1187b735f9282972e3e4c1f7945f06429a43",
- "support"
+ "css/selectors/old-tests/css3-modsel-155b.xml": [
+ "168f86523ee78cce5eecb489e7c2605e284784a9",
+ "reftest"
],
- "css/selectors/css3-modsel-40.xml-removed": [
- "6422bfa4d3323baf9f4cf1aeacc4ef1603403566",
- "support"
+ "css/selectors/old-tests/css3-modsel-155c.xml": [
+ "4fd0b48d6b7deb06e85c6086a3d9a501fe50a236",
+ "reftest"
],
- "css/selectors/css3-modsel-41.xml": [
- "1b54a0ad824370cbb273f33647f02bc6f7303450",
- "support"
+ "css/selectors/old-tests/css3-modsel-155d.xml": [
+ "0c21d5f12ec39474bba65c9e9876840d53b25a3e",
+ "reftest"
],
- "css/selectors/css3-modsel-41a.xml": [
- "9dda3c76ea1fb13e0bcc7dcf6ccaec577596a3ef",
- "support"
+ "css/selectors/old-tests/css3-modsel-156.xml": [
+ "fa0483e6455794ce3d29a0bfe6064bab37f97cff",
+ "reftest"
],
- "css/selectors/css3-modsel-42.xml": [
- "226b3d9d33ec82d8036dcd7826a64b2356a9b3d0",
- "support"
+ "css/selectors/old-tests/css3-modsel-156b.xml": [
+ "59d9f3b65c8e623755c6bc3368b28aba5b2dec4a",
+ "reftest"
],
- "css/selectors/css3-modsel-42a.xml": [
- "b7b68750ad59b3cbc93248d5314416780d2cc8d9",
- "support"
+ "css/selectors/old-tests/css3-modsel-156c.xml": [
+ "2b9d445924cdc9fada0c1370378722c2ee886cad",
+ "reftest"
],
- "css/selectors/css3-modsel-43.xml": [
- "8453553fb9b37de031f2dd7ba0c68c4f286a6a87",
- "support"
+ "css/selectors/old-tests/css3-modsel-157.xml": [
+ "6a7e1d85ffde2f75d28d6cf2086b6e11577a9dc5",
+ "reftest"
],
- "css/selectors/css3-modsel-43b.xml": [
- "5707a2bb4399a2ce9daf3becb28e1e2667306429",
- "support"
+ "css/selectors/old-tests/css3-modsel-158.xml": [
+ "9595b90793656620828f6b82daf9f0aed5c66ae8",
+ "reftest"
],
- "css/selectors/css3-modsel-44.xml": [
- "bedc9840168780b6ac7561613e9ae1da1349d35f",
- "support"
+ "css/selectors/old-tests/css3-modsel-159.xml": [
+ "3504398dbcf20f70f35c2842b75922cc8e6d7056",
+ "manual"
],
- "css/selectors/css3-modsel-44b.xml": [
- "d4df889b06d73534dd467af1ff626431c05dbf2c",
- "support"
+ "css/selectors/old-tests/css3-modsel-15b.xml": [
+ "b7e4205e0d4e6f1593d444234147a1173236c675",
+ "reftest"
],
- "css/selectors/css3-modsel-44c.xml": [
- "90bc43abf7de99ec43b109f7a27bc6dbf9d72799",
- "support"
+ "css/selectors/old-tests/css3-modsel-16.xml": [
+ "48122c26d8a51c1db54adf374cb31a2aa388aad8",
+ "manual"
],
- "css/selectors/css3-modsel-44d.xml": [
- "882f74a48dda75da465bcd90b3bf65ba52be8e51",
- "support"
+ "css/selectors/old-tests/css3-modsel-160.xml": [
+ "ec1de24cb28d58ac9e1bce40d2504e71960a1cc5",
+ "reftest"
],
- "css/selectors/css3-modsel-45.xml": [
- "ed406c223ceee8f80077843cede8ae21f82b4e5c",
- "support"
+ "css/selectors/old-tests/css3-modsel-161.xml": [
+ "888c6f436b52655f1b86804726d2b6a5a75c1573",
+ "manual"
],
- "css/selectors/css3-modsel-45b.xml": [
- "b1cc9bba4bce0cd3d2f977ac6dd1bd84b533fca0",
- "support"
+ "css/selectors/old-tests/css3-modsel-166.xml": [
+ "5d4e31f9a5ca8fb83347a611afed749f282d0145",
+ "visual"
],
- "css/selectors/css3-modsel-45c.xml": [
- "47ec8819a41527a9ef0470a59ff15530ced1a9e5",
- "support"
+ "css/selectors/old-tests/css3-modsel-166a.xml": [
+ "55d36bb68c90da1cdb8d03f83b22a6d7f0e05ecb",
+ "visual"
],
- "css/selectors/css3-modsel-46.xml": [
- "15c8ae2370f224dadb9c16b1a3e083f375297c01",
- "support"
+ "css/selectors/old-tests/css3-modsel-167.xml": [
+ "0fa9e6cdbb9acff6cfa0942cf4cbcdf43d0c227e",
+ "visual"
],
- "css/selectors/css3-modsel-46b.xml": [
- "da34d40f623da70d1967fb0a249e408e107c685d",
- "support"
+ "css/selectors/old-tests/css3-modsel-167a.xml": [
+ "6dd9d8faac2ded7e8f4692b5c8ef126b09c58d7e",
+ "visual"
],
- "css/selectors/css3-modsel-47.xml": [
- "b3a30d36daa4d6a71d89ca433584b893321e128a",
- "support"
+ "css/selectors/old-tests/css3-modsel-168.xml": [
+ "431a41b159f908d1a99c6eb73da63748ddb74a99",
+ "reftest"
],
- "css/selectors/css3-modsel-48.xml": [
- "eff468f1532a2a8e29899f8e6517de5ba43aeb7a",
- "support"
+ "css/selectors/old-tests/css3-modsel-168a.xml": [
+ "d5ddad42b1d17c5abcd893274829dcd6b758d4b8",
+ "reftest"
],
- "css/selectors/css3-modsel-49.xml": [
- "d55fbfc02a8eb073e6d7cbd36d0d42225b5c8c65",
- "support"
+ "css/selectors/old-tests/css3-modsel-169.xml": [
+ "eee2bef3573a461682be7bfccfc2efd9efefbbdb",
+ "reftest"
],
- "css/selectors/css3-modsel-5.xml": [
- "69153646c0187e936105f5ac9f5a064b1caa369b",
- "support"
+ "css/selectors/old-tests/css3-modsel-169a.xml": [
+ "6254a520c3139e0e2c6a928164298b7ad02ae4de",
+ "reftest"
],
- "css/selectors/css3-modsel-50.xml": [
- "e437ecc6a2d2810188ff2824038703b850e475f7",
- "support"
+ "css/selectors/old-tests/css3-modsel-17.xml": [
+ "e06fb70d5887257672a7abe7bfee45a4f11e0939",
+ "manual"
],
- "css/selectors/css3-modsel-51.xml": [
- "c2476d13b9441f795538d2ebb38e6a483ba51742",
- "support"
+ "css/selectors/old-tests/css3-modsel-170.xml": [
+ "c56ae2ac295c3e080715582b3b59b0a295b391ab",
+ "reftest"
],
- "css/selectors/css3-modsel-52.xml": [
- "ef1ae777bb056d4d70a1a4ae328ba801d247ec02",
- "support"
+ "css/selectors/old-tests/css3-modsel-170a.xml": [
+ "1cde707145710f39a93ccb0575c205d694496986",
+ "reftest"
],
- "css/selectors/css3-modsel-53.xml": [
- "fa5ea77a07b2b1f9e88b545bb78c8e9b49b6f4fa",
- "support"
+ "css/selectors/old-tests/css3-modsel-170b.xml": [
+ "50b4fc0825b2baba1cdff400c7833cf1ba39419b",
+ "reftest"
],
- "css/selectors/css3-modsel-54.xml": [
- "09fba60bf87bb2d53148074bd6f29c8e58c3bb0c",
- "support"
+ "css/selectors/old-tests/css3-modsel-170c.xml": [
+ "9e5cf375d6f595f06a6d78ee84605087d0e6e43b",
+ "reftest"
],
- "css/selectors/css3-modsel-55.xml": [
- "947352d7784579a6927509287cf8417a2762be4e",
- "support"
+ "css/selectors/old-tests/css3-modsel-170d.xml": [
+ "371945a439f4a7723b9522c87be71ea94161d603",
+ "reftest"
],
- "css/selectors/css3-modsel-56.xml": [
- "34e3c8456729bd1869e7d37a2e0481ef332fedb0",
- "support"
+ "css/selectors/old-tests/css3-modsel-171.xml": [
+ "aa3b86e82fa96169b523f50d6da4722b42ae3a3c",
+ "visual"
],
- "css/selectors/css3-modsel-57.xml": [
- "89b824672b3369bd40df17b3e3586d95dd45f24e",
- "support"
+ "css/selectors/old-tests/css3-modsel-172a.xml": [
+ "fca9c6d4b7d294353df42fe5b9bdb70ef079e702",
+ "reftest"
],
- "css/selectors/css3-modsel-57b.xml": [
- "9f0e3f38d348aa4ce7304245b7844fd57886c893",
- "support"
+ "css/selectors/old-tests/css3-modsel-172b.xml": [
+ "ec93920fbb7618473719cce9d0fd1bad43e224d8",
+ "reftest"
],
- "css/selectors/css3-modsel-58.xml-removed": [
- "5e147c80a73fa7df51b4a5c8e7f607eda64510b9",
- "support"
+ "css/selectors/old-tests/css3-modsel-173a.xml": [
+ "b75f8309c7d638d13ccdc8b76d82263ae6a3e7c7",
+ "reftest"
],
- "css/selectors/css3-modsel-59.xml": [
- "b0aa032a2a915d5af66d719ab32df85f5d084c42",
- "support"
+ "css/selectors/old-tests/css3-modsel-173b.xml": [
+ "7769701a9bd1d51c660fe9261a4e0a10537ff6b8",
+ "reftest"
],
- "css/selectors/css3-modsel-6.xml": [
- "9a386de0297aee8c2688bad7f34cc16529436ff1",
- "support"
+ "css/selectors/old-tests/css3-modsel-174a.xml": [
+ "25e23c5272ca95baad046a0a786f3c08fb89c82c",
+ "visual"
],
- "css/selectors/css3-modsel-60.xml": [
- "882156d32230069c1b9193ac508de56fe935607f",
- "support"
+ "css/selectors/old-tests/css3-modsel-174b.xml": [
+ "3a4d0a5e3a23941bed2d8a924ea22d59135f2b49",
+ "visual"
],
- "css/selectors/css3-modsel-61.xml": [
- "aee3da868ca811c55dfa979ef8c332448e11eb51",
- "support"
+ "css/selectors/old-tests/css3-modsel-175a.xml": [
+ "ca91d681235fc5de046ff14f7a804a78378bd56e",
+ "reftest"
],
- "css/selectors/css3-modsel-62.xml": [
- "26e175951588b21ed03be40b14468827d9ec8e12",
- "support"
+ "css/selectors/old-tests/css3-modsel-175b.xml": [
+ "135b84102794194b0005bd00fc50bab0533540e5",
+ "reftest"
],
- "css/selectors/css3-modsel-63.xml": [
- "1215c119d662329999f480db100e9bc9f48c03ee",
- "support"
+ "css/selectors/old-tests/css3-modsel-175c.xml": [
+ "7a93313e7731be409e4f3b2c12ffe484c30f0380",
+ "reftest"
],
- "css/selectors/css3-modsel-64.xml": [
- "87eb45bce9ee6a1d39e6fa171d14278e9c0c9bf7",
- "support"
+ "css/selectors/old-tests/css3-modsel-176.xml": [
+ "31482f08983793f5d025d10bf821c2f407e23b30",
+ "reftest"
],
- "css/selectors/css3-modsel-65.xml": [
- "8fc8e954b360309cef7de1aad6d63c3440a93100",
- "support"
+ "css/selectors/old-tests/css3-modsel-177a.xml": [
+ "09ea141d6475bff966c3029250b3e40b5debd981",
+ "manual"
],
- "css/selectors/css3-modsel-66.xml": [
- "7d17bf525dd6ad7eb0a2c23b0d49e3baa58b2c9b",
- "support"
+ "css/selectors/old-tests/css3-modsel-177b.xml": [
+ "1205619970a213268025265a1aba5edb5e72dd28",
+ "reftest"
],
- "css/selectors/css3-modsel-66b.xml": [
- "c3b4070773367dea07d795076f19a503e08a3870",
- "support"
+ "css/selectors/old-tests/css3-modsel-178.xml": [
+ "00f25827619825e9bcae9ddb2587982727495227",
+ "reftest"
],
- "css/selectors/css3-modsel-67.xml": [
- "533498fd9044e5b33e543d3906a9cb45e4bec2ea",
- "support"
+ "css/selectors/old-tests/css3-modsel-179.xml": [
+ "d58cbe961d0c2432672d385ee555e01f6b8d84d2",
+ "reftest"
],
- "css/selectors/css3-modsel-68.xml": [
- "7c8afe60230237d7ca47b147d821b28a4443ec9f",
- "support"
+ "css/selectors/old-tests/css3-modsel-179a.xml": [
+ "184365703d38ba3de9d8a221997346a7c565cc2a",
+ "visual"
],
- "css/selectors/css3-modsel-69.xml": [
- "8915eb2839e36bb70cb97a493bc014edb3505502",
- "support"
+ "css/selectors/old-tests/css3-modsel-18.xml": [
+ "97443c66cfb836db5cf2dd8ff70e456a0f23d975",
+ "manual"
],
- "css/selectors/css3-modsel-7.xml": [
- "bd5199ddffaeeb43040d023c17dc1e1e10ad5caa",
- "support"
+ "css/selectors/old-tests/css3-modsel-180a.xml": [
+ "3661eb9c1f0cfff486716e547f7b9529f2ded2a5",
+ "visual"
],
- "css/selectors/css3-modsel-70.xml": [
- "cce76420397231835a2111a2652184a5361aebe1",
- "support"
+ "css/selectors/old-tests/css3-modsel-181.xml": [
+ "62465e4be5499590dacbf43639109c32dc516ac6",
+ "visual"
],
- "css/selectors/css3-modsel-72.xml": [
- "cdf956b89c7526e3b9e797dab15d84a9e3931ec5",
- "support"
+ "css/selectors/old-tests/css3-modsel-182.xml": [
+ "293c11b780faa869fcbf99ea926a179b7fdcf2f9",
+ "visual"
],
- "css/selectors/css3-modsel-72b.xml": [
- "0d1f0d1a515dbc73dd1c3036888b0ed21964662d",
- "support"
+ "css/selectors/old-tests/css3-modsel-183.xml": [
+ "97412ddef6ea254c1b0fbe35703b47f623124eb1",
+ "visual"
],
- "css/selectors/css3-modsel-73.xml": [
- "54dafec9b36e394043fa6816d951a9737a8f4c92",
+ "css/selectors/old-tests/css3-modsel-184-ref.xht": [
+ "8ffc002f9b055338da4cb0d6af1a6a2e11fa2f4a",
"support"
],
- "css/selectors/css3-modsel-73b.xml": [
- "b5657a1189b42cf823d3bc9d1c09b2a9e927c8f4",
- "support"
+ "css/selectors/old-tests/css3-modsel-184a.xml": [
+ "9777db1410e8b3bba30b797c32bc52f38f0e330c",
+ "reftest"
],
- "css/selectors/css3-modsel-74.xml": [
- "cb3efc99cd86c617e749e2ef3a87227ff23c0be7",
- "support"
+ "css/selectors/old-tests/css3-modsel-184b.xml": [
+ "2ea9ad9816de8e1db0aac4f8d1f73d616a6b7ffb",
+ "reftest"
],
- "css/selectors/css3-modsel-74b.xml": [
- "ed7f208684686b8df954ac3af90c6c4cfa67a049",
- "support"
+ "css/selectors/old-tests/css3-modsel-184c.xml": [
+ "4e945506ce2e2bf3c858d458f43a8346d0d8c27a",
+ "reftest"
],
- "css/selectors/css3-modsel-75.xml": [
- "996af7b18f719db9193725c1aa6166cca12264aa",
- "support"
+ "css/selectors/old-tests/css3-modsel-184d.xml": [
+ "73402386ae077956ec4b2a6765f37c1ce45bd9c8",
+ "reftest"
],
- "css/selectors/css3-modsel-75b.xml": [
- "fae417ee01377f919ba0b2bb0b6eab45b8b7642f",
- "support"
+ "css/selectors/old-tests/css3-modsel-184e.xml": [
+ "418169b8cd05ddc68ac137f9a0f0b1cb662edac4",
+ "reftest"
],
- "css/selectors/css3-modsel-76.xml": [
- "4c1caa7abe2cf183151ffa5fa3aa4b5500d3e4f5",
- "support"
+ "css/selectors/old-tests/css3-modsel-184f.xml": [
+ "c28b61dabfb2fd0e1788f926d7997e7081f30d5d",
+ "reftest"
],
- "css/selectors/css3-modsel-76b.xml": [
- "089f673ecf4a4e79cff2073c5de210ee5bda0752",
- "support"
+ "css/selectors/old-tests/css3-modsel-18a.xml": [
+ "da5d12dc881c792b6f19eb27e71a7196d934e9ad",
+ "manual"
],
- "css/selectors/css3-modsel-77.xml": [
- "e204565968d130953eea208bbb50c5e54d5296be",
- "support"
+ "css/selectors/old-tests/css3-modsel-18b.xml": [
+ "b8dc445f98eb9dc3330309ba56d2eaa7d8d69396",
+ "manual"
],
- "css/selectors/css3-modsel-77b.xml": [
- "77a6f9b7efd68e9bb1901d290214e0ba2545bd62",
- "support"
+ "css/selectors/old-tests/css3-modsel-18c.xml": [
+ "77fba265b980085b37f2cb7bd46ecb38a28f95f3",
+ "manual"
],
- "css/selectors/css3-modsel-78.xml": [
- "42dd9ccaf3dce5a238d11aa4a397dbf6c153a953",
- "support"
+ "css/selectors/old-tests/css3-modsel-19.xml": [
+ "79f23a5084a6a44e79f8b076358e3d5b58b48880",
+ "manual"
],
- "css/selectors/css3-modsel-78b.xml": [
- "491dcaa7e99a1fb7090c418a9369ed9c08b13c96",
- "support"
+ "css/selectors/old-tests/css3-modsel-19b.xml": [
+ "48ae456ca3734dc4791698010abd900e7b4dd0de",
+ "manual"
],
- "css/selectors/css3-modsel-79.xml": [
- "e0f664373a22e65a6f3d123cca473f76dcf98b12",
- "support"
+ "css/selectors/old-tests/css3-modsel-2.xml": [
+ "09f84d60e98f5a151a5435d9a4b046a74b21bda0",
+ "visual"
],
- "css/selectors/css3-modsel-7b.xml": [
- "51fcccb0ada583ce9f264787ffa005dc0d7a75ac",
- "support"
+ "css/selectors/old-tests/css3-modsel-20.xml": [
+ "7d1288c9f24c525e967b285485d77e1cdc1d9197",
+ "manual"
],
- "css/selectors/css3-modsel-7c.xml-disabled-due-to-limitations-in-the-build-system": [
- "68c5a9fe804445e6834ce14052723869d49d6814",
- "support"
+ "css/selectors/old-tests/css3-modsel-21.xml": [
+ "5c530922475e345d606d2f2dce89d1f6924f400e",
+ "manual"
],
- "css/selectors/css3-modsel-7d.xml-disabled-due-to-limitations-in-the-build-system": [
- "61faff542740738ede1d480d5d6a986af7e72775",
- "support"
+ "css/selectors/old-tests/css3-modsel-21b.xml": [
+ "d97181d47dcdf74eb031d7e761896f60bf2831b8",
+ "visual"
],
- "css/selectors/css3-modsel-8.xml": [
- "8ad15c3ed3f1676bab51ff027ed6b33c49bb61bd",
- "support"
+ "css/selectors/old-tests/css3-modsel-21c.xml": [
+ "e45074c9a09faceadeb89280e3105d381a5416f0",
+ "visual"
],
- "css/selectors/css3-modsel-80.xml": [
- "9199f4b5bd0f899e88bef788f5397050bac8c540",
- "support"
+ "css/selectors/old-tests/css3-modsel-22.xml": [
+ "098679c368958d6371b56e7956759b038699ff24",
+ "visual"
],
- "css/selectors/css3-modsel-81.xml": [
- "2e16fdb3b900f7ddb1988abab15e4b6e294af10f",
- "support"
+ "css/selectors/old-tests/css3-modsel-23.xml": [
+ "663ec09ef2c4db8ae168553bdc99c27748ec6cd8",
+ "visual"
],
- "css/selectors/css3-modsel-81b.xml": [
- "3d70619eb954b2d5a7d6fe5b62d1a1dac6b107e0",
- "support"
+ "css/selectors/old-tests/css3-modsel-24.xml": [
+ "d20a0116f74ff10e119a6035f1b1bc97eb291223",
+ "visual"
],
- "css/selectors/css3-modsel-82.xml": [
- "180aa135583a1fcc0e808874fd6b36d3668dadb8",
- "support"
+ "css/selectors/old-tests/css3-modsel-25.xml": [
+ "ef1875fc89e68906ae1a8ad949e931005c81b964",
+ "visual"
],
- "css/selectors/css3-modsel-82b.xml": [
- "388a7e0dbd526740efbfb6691c3ba4e4fc265e87",
- "support"
+ "css/selectors/old-tests/css3-modsel-27.xml": [
+ "e20227755cb29c46d4991b779bb524613cd7ef95",
+ "visual"
],
- "css/selectors/css3-modsel-83.xml": [
- "07f6c1211b72fc125fedcf5095c3466b3a139d0a",
- "support"
+ "css/selectors/old-tests/css3-modsel-27a.xml": [
+ "42736a3909547ef0680d3bdd576640046d74b79c",
+ "visual"
],
- "css/selectors/css3-modsel-84.xml-disabled-contains-removed": [
- "9a19e01f486cf0136ea44f21173275ffd1693fd2",
- "support"
+ "css/selectors/old-tests/css3-modsel-27b.xml": [
+ "8bfb356e50d963ccb8868436f67585529de4e964",
+ "visual"
],
- "css/selectors/css3-modsel-84b.xml-disabled-contains-removed": [
- "fbb0f06a69828fd85ed8a79224320c3e43d57718",
- "support"
+ "css/selectors/old-tests/css3-modsel-28.xml": [
+ "f73184d1cac2f6687ed4f9666449862ddb6aecaf",
+ "visual"
],
- "css/selectors/css3-modsel-85.xml-disabled-contains-removed": [
- "2021bd8fba63cb5a885deeda32d803222ce07154",
- "support"
+ "css/selectors/old-tests/css3-modsel-28b.xml": [
+ "dd3944a92880914accadc94f8f87a49027cbd19a",
+ "visual"
],
- "css/selectors/css3-modsel-86.xml": [
- "cb55d9fca491f8d791a8f698b7d29ab1d3831b85",
- "support"
+ "css/selectors/old-tests/css3-modsel-29.xml": [
+ "cfa23b50c5427dd3a11ff23bc0df9ceb05910250",
+ "visual"
],
- "css/selectors/css3-modsel-87.xml": [
- "377fbb601c49a1a9ca0cb70a4ee5411412aefa8a",
- "support"
+ "css/selectors/old-tests/css3-modsel-29b.xml": [
+ "39227d21895c502d1105c0ffa73905b4f67db16e",
+ "visual"
],
- "css/selectors/css3-modsel-87b.xml": [
- "0e0861f17e14e6d6ce77379194e0e418573e5c25",
- "support"
+ "css/selectors/old-tests/css3-modsel-3.xml": [
+ "7bcc09b947fdca2add8d8a92ae6a40771eece7ab",
+ "visual"
],
- "css/selectors/css3-modsel-88.xml": [
- "f9795eabf91d5ac8ed9f0a3422c4a2bd10fd230d",
- "support"
+ "css/selectors/old-tests/css3-modsel-30.xml": [
+ "facd83b7116ad906408dfb3ff523fae802711b6e",
+ "visual"
],
- "css/selectors/css3-modsel-88b.xml": [
- "97a8a654d9382ebe98f32da18a5a5f10dfd55266",
- "support"
+ "css/selectors/old-tests/css3-modsel-31.xml": [
+ "dbf672bda0594b29f7e21b08cf5ae0105220d7bb",
+ "visual"
],
- "css/selectors/css3-modsel-89.xml": [
- "48aca00df9ef61d7c3ab233bf658225208a3cc40",
- "support"
+ "css/selectors/old-tests/css3-modsel-32.xml": [
+ "a5551b33f5f1eca3a6072d478a10d9452f9fbb59",
+ "visual"
],
- "css/selectors/css3-modsel-9.xml": [
- "17c5faa589ec21365d9bfb0b61d66d5126a9665c",
- "support"
+ "css/selectors/old-tests/css3-modsel-33.xml": [
+ "c3fc2731a93f92dd1151839b682351ea32a4e3d3",
+ "visual"
],
- "css/selectors/css3-modsel-90.xml": [
- "3269a9c9397fac6819f2703572417653e73ff091",
- "support"
+ "css/selectors/old-tests/css3-modsel-34.xml": [
+ "6ea08bbae2fd5ef53eec579d4490b515b5bd42a4",
+ "visual"
],
- "css/selectors/css3-modsel-90b.xml": [
- "cc6303e0e5b514eb848c51533808bf7f849c6849",
- "support"
+ "css/selectors/old-tests/css3-modsel-35.xml": [
+ "ac53300ad1187613ed6a956a618a3947edaef181",
+ "visual"
],
- "css/selectors/css3-modsel-91.xml": [
- "64db9e8fd074b41b1fc592d26839828e918f631a",
- "support"
+ "css/selectors/old-tests/css3-modsel-36.xml": [
+ "393073a4be976d225d3586dfd620287ac0f02053",
+ "visual"
],
- "css/selectors/css3-modsel-92.xml": [
- "66995165f768dd92ecb4ef46b846b178998443a7",
- "support"
+ "css/selectors/old-tests/css3-modsel-37.xml": [
+ "2c805492f7eb9d5846d9cfa5c2e060db616d74e2",
+ "visual"
],
- "css/selectors/css3-modsel-93.xml": [
- "d27bc7646487b65c091277e92193c63f8c2fcce3",
- "support"
+ "css/selectors/old-tests/css3-modsel-38.xml": [
+ "ff60e4290d875fd6c76ab0b5214f60fcefe3363e",
+ "visual"
],
- "css/selectors/css3-modsel-94.xml": [
- "3182eedd5b963d245582a62c4769ceddb78fc704",
- "support"
+ "css/selectors/old-tests/css3-modsel-39.xml": [
+ "bd0207a8f8bd9e6ecddfd5d5649b9ab424569bbe",
+ "visual"
],
- "css/selectors/css3-modsel-94b.xml": [
- "683af54fd62e3586f5e401b38cff2609b688eb0b",
- "support"
+ "css/selectors/old-tests/css3-modsel-39a.xml": [
+ "70746c18572c6b721ff47f9008e8264fc6241816",
+ "visual"
],
- "css/selectors/css3-modsel-95.xml": [
- "c501fecd1106bb232f247633acf79908736b5dac",
- "support"
+ "css/selectors/old-tests/css3-modsel-39b.xml": [
+ "95b85d5efe3339b07461a7cbdb59b91793627814",
+ "visual"
],
- "css/selectors/css3-modsel-96.xml": [
- "3675657022f8c21a18477694655d048d9629e722",
- "support"
+ "css/selectors/old-tests/css3-modsel-39c.xml": [
+ "4401b78fb6e59d37670db1ce0236f2eb9fda6164",
+ "visual"
],
- "css/selectors/css3-modsel-96b.xml": [
- "415115970c032bfcb79c1e342098ebb52e2a8c67",
- "support"
+ "css/selectors/old-tests/css3-modsel-3a.xml": [
+ "8ee5d04a9941f5df96fddeb75cf638ee85c113d9",
+ "visual"
],
- "css/selectors/css3-modsel-97.xml": [
- "bcfddc6ff3484a9ed883b17df36eb12a40fdb110",
- "support"
+ "css/selectors/old-tests/css3-modsel-4.xml": [
+ "4d38e6c2d510ad2811e30957768747b44f02e77e",
+ "visual"
],
- "css/selectors/css3-modsel-97b.xml": [
- "684b97e470c99f3ce41dec2dd4cadf0308edded2",
- "support"
+ "css/selectors/old-tests/css3-modsel-41.xml": [
+ "8d0caef31129fe31efcb2335bf7fdd0ea3984164",
+ "visual"
],
- "css/selectors/css3-modsel-98.xml": [
- "f8a7ea055f51e73ed01c49509a972e7ec0d86d70",
- "support"
+ "css/selectors/old-tests/css3-modsel-41a.xml": [
+ "a010e28af7345dfd9d21ffa8d1b2fb763454affc",
+ "visual"
],
- "css/selectors/css3-modsel-98b.xml": [
- "b9ac686f2d25b9abff18d51cdb4b2e8110277628",
- "support"
+ "css/selectors/old-tests/css3-modsel-42.xml": [
+ "32617aee70b4abe4f9ebd3c1f036790a487ad76b",
+ "visual"
],
- "css/selectors/css3-modsel-99.xml": [
- "f5e88ecb5438fefce58c4efbbd909b15784faa32",
- "support"
+ "css/selectors/old-tests/css3-modsel-42a.xml": [
+ "600e68138e334de0396f0a046c2a15847300f07e",
+ "visual"
],
- "css/selectors/css3-modsel-99b.xml": [
- "30fb0021bc13761bd974d4ac3360d6719d970d4f",
- "support"
+ "css/selectors/old-tests/css3-modsel-43.xml": [
+ "312c185510bb99dcef41f6a8a841dac9b248a034",
+ "visual"
],
- "css/selectors/css3-modsel-d1.xml": [
- "06b98529876db7d19e830866afc9a0840240eae8",
- "support"
+ "css/selectors/old-tests/css3-modsel-43b.xml": [
+ "386b5994c78860d7e5324bfba1abdd44c1147a3a",
+ "visual"
],
- "css/selectors/css3-modsel-d1b.xml": [
- "caf7ae8a8aded385820ca1427014a218b3f9284b",
- "support"
+ "css/selectors/old-tests/css3-modsel-44.xml": [
+ "3ba816eba4d3a303251f965d84672914e98bd3a7",
+ "visual"
],
- "css/selectors/css3-modsel-d2.xml": [
- "927c92c51eac158abd7a285e541551648c629be3",
- "support"
+ "css/selectors/old-tests/css3-modsel-44b.xml": [
+ "cdbf452c925f400ffb7ec1d9073a786d058a869d",
+ "visual"
],
- "css/selectors/css3-modsel-d3.xml": [
- "ba8956cc82c888c39028281ceec2d29dabd846cd",
- "support"
+ "css/selectors/old-tests/css3-modsel-44c.xml": [
+ "9f5c8d25c1730ac6d6039bf21441182acf741824",
+ "visual"
],
- "css/selectors/css3-modsel-d4.xml": [
- "4d1050a423188794b344f928172a3617a5b57557",
- "support"
+ "css/selectors/old-tests/css3-modsel-44d.xml": [
+ "8f448aba1bcd3e1e1ce1b779fd2de8b5707d00be",
+ "visual"
],
- "css/selectors/css3-modsel-d5.xml-removed": [
- "70c9e12009100898b6e19672c70349c8c9136944",
- "support"
+ "css/selectors/old-tests/css3-modsel-45.xml": [
+ "7d29eeaab2b01950c66cdeb834b30dfb7f890ee1",
+ "visual"
],
- "css/selectors/css3-modsel-d5a.xml-removed": [
- "e57f5e67914b413da605cedfac49526fc258db31",
- "support"
+ "css/selectors/old-tests/css3-modsel-45b.xml": [
+ "7aa209e96f8033b4b5108229a589e2adb6836474",
+ "visual"
],
- "css/selectors/css3-modsel-d5b.xml-removed": [
- "b8114fabca6ee30af649290b8fe05dee92a88a2f",
- "support"
+ "css/selectors/old-tests/css3-modsel-45c.xml": [
+ "4e139447cf7149b75ad0172719961f60c47cac8e",
+ "visual"
],
- "css/selectors/css3-modsel-d5c.xml-removed": [
- "a568e301d510d2a31707af366d3cee2a953a1b1e",
- "support"
+ "css/selectors/old-tests/css3-modsel-46.xml": [
+ "c826cc9675e0819b4f22b5abd3e04a8bcb7b1fad",
+ "visual"
],
- "css/selectors/css3-modsel-d5d.xml-removed": [
- "a8343d6ab833ed0a5b8e2061f3d2e4fdbb0bf2d1",
- "support"
+ "css/selectors/old-tests/css3-modsel-46b.xml": [
+ "35b47b898a75d3ff261061acca4f0526c34bbceb",
+ "visual"
],
- "css/selectors/css3-modsel-d5e.xml-removed": [
- "ffe1b1a019bc9dbc5f5feb04d438a806d44d7cda",
- "support"
+ "css/selectors/old-tests/css3-modsel-47.xml": [
+ "320490f2112bf99a9588af4c9e09ef6c7dc294b9",
+ "visual"
],
- "css/selectors/focus-display-none-001.html": [
- "fe5716cc41c4a622159395ba26da3a7598cfcec8",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-48.xml": [
+ "51484c8eac603100c26cb9e56446ecff7f098f4f",
+ "reftest"
],
- "css/selectors/focus-visible-001-manual.html": [
- "3475ba6cac8af1fcb2095aeaae13a0db76ccc7b2",
- "manual"
+ "css/selectors/old-tests/css3-modsel-49.xml": [
+ "40aa8315ce04adffc46756bc397fa0a3978566c6",
+ "reftest"
],
- "css/selectors/focus-visible-002-manual.html": [
- "663b79b4b177101eed0e5c10be186bf5aa2472e9",
- "manual"
+ "css/selectors/old-tests/css3-modsel-5.xml": [
+ "cd559508ec44264ad229cfc8505580132e294eb0",
+ "visual"
],
- "css/selectors/focus-visible-003-manual.html": [
- "eeb2904d7d33ebab283c37925db90f6fab7c1328",
- "manual"
+ "css/selectors/old-tests/css3-modsel-50.xml": [
+ "7b81eaec828a8ab8075f903d93b2bc876d9a2350",
+ "visual"
],
- "css/selectors/focus-visible-004-manual.html": [
- "dba057cc9c8641a96c65b0bb90cccbdd3d596dc3",
- "manual"
+ "css/selectors/old-tests/css3-modsel-51.xml": [
+ "327bdca14d8d45cd9ef0548651486e6668208c62",
+ "visual"
],
- "css/selectors/focus-visible-005.html": [
- "b5d58435db1c6d37881bbcd4c856e8abab03aada",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-52.xml": [
+ "3320e3d2c0a1dca95c1fceb3c7511f6c1575965e",
+ "visual"
],
- "css/selectors/focus-visible-006-manual.html": [
- "974abc0024e3153008e944ff706156efcb9948e2",
- "manual"
+ "css/selectors/old-tests/css3-modsel-53.xml": [
+ "bb9118688b63cd0121fb7f552345fa06296bb63a",
+ "visual"
],
- "css/selectors/focus-visible-007.html": [
- "2dcb3e34b21fb7251d5df0a85b00e9ca77f872f1",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-54.xml": [
+ "6e5327a9c262c4d18248a880a1cce5dabad2b1f8",
+ "reftest"
],
- "css/selectors/focus-visible-008.html": [
- "b7f61d2fa804f801abcc59f81645e07431de3463",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-55.xml": [
+ "acc6dcd7290ec278380ac577924d8f653c31eb64",
+ "reftest"
],
- "css/selectors/focus-visible-009.html": [
- "c7d682baa4377fd9ccb5857437f172d782d90824",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-56.xml": [
+ "27ae88d296b2f488a6b15c0ad9bd65d73f5cfe6a",
+ "reftest"
],
- "css/selectors/focus-visible-010.html": [
- "eb01204b29c8e30b651b083459c01983b99dd70d",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-57.xml": [
+ "4539b0a9ec20f94dfbca2ca10b7faa89f90ed9a2",
+ "visual"
],
- "css/selectors/focus-within-001-ref.html": [
- "2913775a2204eb173ba45251a84ab2c01cda35bc",
- "support"
+ "css/selectors/old-tests/css3-modsel-57b.xml": [
+ "baf4a38b2ec6a2bc140ea085c018d38463f1d616",
+ "visual"
],
- "css/selectors/focus-within-001.html": [
- "fcf8a379c87c364be31f945ae34ca672736e4710",
+ "css/selectors/old-tests/css3-modsel-59.xml": [
+ "543123eba56a463b0760ffebab7bea2558d2e6c3",
"reftest"
],
- "css/selectors/focus-within-002.html": [
- "e483833febc101ef05fa6327500054249ae7dc42",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-6.xml": [
+ "98c8722892637d54803cb4e2cf76fc8d286cef21",
+ "visual"
],
- "css/selectors/focus-within-003.html": [
- "b399c4f0cf3ebaffb5e6efa43f5243ffe6df58f8",
+ "css/selectors/old-tests/css3-modsel-60.xml": [
+ "eec66ac79aae406f2f9d42744d23fc8a82d9c5ec",
"reftest"
],
- "css/selectors/focus-within-004.html": [
- "169af9e0706aa993a64ce64d6b198679e2e5dcdf",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-61.xml": [
+ "cb3c2df6fcdc87a28114a5c07bae1e89ab9e2e2c",
+ "manual"
],
- "css/selectors/focus-within-005.html": [
- "03f927d1b40cf3725c38f5b2d5b7528783a92eac",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-62.xml": [
+ "ffaea5d44a6ebc8e8175cb58e5cc9a2336c23f20",
+ "manual"
],
- "css/selectors/focus-within-006-ref.html": [
- "b93c156876a6ae243630252ce66499b530052c5d",
- "support"
+ "css/selectors/old-tests/css3-modsel-63.xml": [
+ "7c4a34a9b297c3f3818cf339e55fabf91a5dbe1e",
+ "manual"
],
- "css/selectors/focus-within-006.html": [
- "ff63cceb6e7bed5f3299a39e9842bb9ccd0a7bf9",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-64.xml": [
+ "b1f00e49095f527f5c47e0a2b989212c546c7b79",
+ "manual"
],
- "css/selectors/focus-within-007-ref.html": [
- "6ecc21536a404b25290dc2456093c9b3ada5a420",
- "support"
+ "css/selectors/old-tests/css3-modsel-65.xml": [
+ "384c6bcd18bc0d50c0f0644a7e312f48e36641fb",
+ "manual"
],
- "css/selectors/focus-within-007.html": [
- "f23fe87643fa7e8f9550c1ca96ad09045519e129",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-66.xml": [
+ "e7b9562ea353f077d317d1bd1796605293898896",
+ "manual"
],
- "css/selectors/focus-within-008.html": [
- "19deff212a38bd5ce8fe3079fedf705dd3e24137",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-66b.xml": [
+ "91fc0d324f9d578c334a3a2bdd05caf878f8abe6",
+ "visual"
],
- "css/selectors/focus-within-009.html": [
- "c8d47d2df0aa350aaedbc77f9d70db5a5aa893e8",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-67.xml": [
+ "4fbffc211f12f66d73173fea9857cbe0398d272d",
+ "visual"
],
- "css/selectors/focus-within-010.html": [
- "2476e03dba6736b2b6a0165c0ba9cd5fca386b3b",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-68.xml": [
+ "99c28261381b13ff28c907f2ae161b018beb7c32",
+ "visual"
],
- "css/selectors/focus-within-display-none-001.html": [
- "a15f031fa2c0587bb6fc78ce3d70cf1742566d2d",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-69.xml": [
+ "3da2a7f43c55620fdf19c3d8788b64895fd18d91",
+ "visual"
],
- "css/selectors/focus-within-shadow-001-ref.html": [
- "6ab36318796dfebc78b62b258e261282fc6c9b98",
- "support"
+ "css/selectors/old-tests/css3-modsel-7.xml": [
+ "a464ccdb771462e68ee22bd3fc2f6e0dd05215d2",
+ "visual"
],
- "css/selectors/focus-within-shadow-001.html": [
- "012a774129266bca769619e6e1bc39d721e9e8c1",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-70.xml": [
+ "1c18a1e9526089724cab19fe45114a24b2e6b490",
+ "visual"
],
- "css/selectors/focus-within-shadow-002.html": [
- "50b30df424e2266993f582ec18efb444d0569e59",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-72.xml": [
+ "72bf8bc10779ce09fa43b39bf112fc24d8bdfc77",
+ "visual"
],
- "css/selectors/focus-within-shadow-003.html": [
- "48901b215b561acd28b106db3e833e93f443f83e",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-72b.xml": [
+ "ce912f0b701bd216f2c4ce8618439033e0f46622",
+ "visual"
],
- "css/selectors/focus-within-shadow-004.html": [
- "6beed1fc131a924c22672db706c2690f1e1715de",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-73.xml": [
+ "84954c80f19c7cb541cad2e3d4a15909d933da53",
+ "visual"
],
- "css/selectors/focus-within-shadow-005.html": [
- "c645d62f7604ee3e8664bc553eba1ac2e22c6db6",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-73b.xml": [
+ "d7e476c916cb144a665881993cbffeed56c6cf4d",
+ "visual"
],
- "css/selectors/focus-within-shadow-006.html": [
- "39a2f706102db918b6a45b2f10e1d58861676413",
- "reftest"
+ "css/selectors/old-tests/css3-modsel-74.xml": [
+ "aff2e9b33c769d95e7af77cb2791da79450b8923",
+ "visual"
],
- "css/selectors/generate.pl": [
- "812dd7a1126cce89fcdaba09fdacbcdf704206cb",
- "support"
+ "css/selectors/old-tests/css3-modsel-74b.xml": [
+ "82cf0051f963381a739b627e30d7fa7097186edc",
+ "visual"
],
- "css/selectors/hover-001-manual.html": [
- "87d7af91b6994371b72ff33923ea1cacc65c8b5b",
- "manual"
+ "css/selectors/old-tests/css3-modsel-75.xml": [
+ "235183445ac58d304e5396c09f3ca199ca1a1949",
+ "visual"
],
- "css/selectors/hover-002-manual.html": [
- "50859c5cfb80f1f82c453adad72643009347d7c2",
- "manual"
+ "css/selectors/old-tests/css3-modsel-75b.xml": [
+ "6d6345e6543be855ea70ae0fac72b83599a89ef1",
+ "visual"
],
- "css/selectors/htaccess": [
- "c91ca1c3e52ffa387276decc32558c195f94c8d4",
- "support"
+ "css/selectors/old-tests/css3-modsel-76.xml": [
+ "d1181a4aaee24520a49a0d6fd0b4338f2cb89eb7",
+ "visual"
],
- "css/selectors/html-full.css": [
- "fa306e5c535ad6277cdc5b51171273c732ce1087",
- "support"
+ "css/selectors/old-tests/css3-modsel-76b.xml": [
+ "7ba99cc2ce0d480bbe0b8fc8b48f9ee4c4907f5a",
+ "visual"
],
- "css/selectors/html-shell.css": [
- "1c23986cc7b21ee9b935607134c6835a15760feb",
- "support"
+ "css/selectors/old-tests/css3-modsel-77.xml": [
+ "c99fa70543a19f2329b37aafc44a4d9a173500fd",
+ "visual"
],
- "css/selectors/i18n/META.yml": [
- "9fa8c3b6c9bdbfa2b9731c89b23ffc6f47ceba2b",
- "support"
+ "css/selectors/old-tests/css3-modsel-77b.xml": [
+ "073579042b6714fc31b35cfbdc2a4503a1c84c5d",
+ "visual"
],
- "css/selectors/i18n/README": [
- "df60c5800acbc449917b82504fe6a8c44649ec66",
- "support"
+ "css/selectors/old-tests/css3-modsel-78.xml": [
+ "8e265200c653d83ba5165b11063dc681495b2df6",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-001.html": [
- "e88f20a02471e324ee5d5900add484142cbf5ce8",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-78b.xml": [
+ "2983d0ee2ac87e99b31f5a891fa03c11399e46bc",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-002.html": [
- "71ae3d46f686c6e6b6d030f492072f48e46faa1e",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-79.xml": [
+ "4edac8d622bea66cbe507a88950079ac7e09dfb9",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-004.html": [
- "cbf4813e42bb1a6886df1dddbebd5d2a61eb92ca",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-7b.xml": [
+ "e1ad8d766d58f91ff344b0f467f9222ee2a1b160",
+ "reftest"
],
- "css/selectors/i18n/css3-selectors-lang-005.html": [
- "1c46c450f2fb9cd4e4c8b0cb0c7512d689dd2706",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-8.xml": [
+ "ce5a68ffec64d157f5788a57a34cf21e0fd9a1c6",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-006.html": [
- "2eb9dd68ea335c9881a70d3a9f33bfa660d1f034",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-80.xml": [
+ "b7c08e54cf14061499add3b03e28bf6311f69d68",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-007.html": [
- "491697a385b537a3b4ed01441335211f2ec55569",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-81.xml": [
+ "d27e3161095a628d96d28572a829216e455279ef",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-008.html": [
- "64724fcb4e4511757e6b98040f6cbf8cbbf67353",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-81b.xml": [
+ "305cf9b63f791aff7499a38ab34e96481fde3a79",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-009.html": [
- "3d89b2aacffa84b1ae253d2f1582720c86828eb2",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-82.xml": [
+ "5b2202696a34729f330538807911aa814f260b8a",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-010.html": [
- "c77bc61aed77b6fdaa0ed64ba45a135831402d17",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-82b.xml": [
+ "1aafc549ea7e334f177dab560f16e9e7f0a16554",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-011.html": [
- "648e937e9797f8711caa7e7299a764c4a1925e1b",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-83-ref.xml": [
+ "6ab85b3239ef81c930779b7484176519ff587344",
+ "support"
],
- "css/selectors/i18n/css3-selectors-lang-012.html": [
- "36f4aad20210f236b91f77be3261cb9092d3b6f5",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-83.xml": [
+ "b5f101226248e1db21485f720e510e0250c4f842",
+ "reftest"
],
- "css/selectors/i18n/css3-selectors-lang-014.html": [
- "5e68d50d5a07211dcc1cb70235da5efa96e38759",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-86.xml": [
+ "5d2355f7f707313e2dd749f5d1f0c931c34c49d9",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-015.html": [
- "ac91535d874f2e50e6799628b978a418700094ed",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-87.xml": [
+ "da5adca13adaa707518dce6d57aecb1491a97563",
+ "reftest"
],
- "css/selectors/i18n/css3-selectors-lang-016.html": [
- "6d1ac018750fd18d5614dfa0d8fddf02ad330215",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-87b.xml": [
+ "efdcb019b00556581814fb8c8e487173db42c794",
+ "reftest"
],
- "css/selectors/i18n/css3-selectors-lang-021.html": [
- "04cc4431b81526240e042e9b4269633b2d1475fd",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-88.xml": [
+ "f354cf21a3dcc0bea6f5f538fec5d8d110d3f115",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-022.html": [
- "b4ed986971f10efd6e96f70c88bbfc4da956bc93",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-88b.xml": [
+ "2c10a61fd4892a1d53cc20b4a6e1d02008ff4b59",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-024.html": [
- "5b1847dd78d19e66180c5f2b3385796a51c1a123",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-89.xml": [
+ "22ac828a8273eb7f6bbbbad1875c64e60129a873",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-025.html": [
- "2e2f0c3e5f27d6892fcaf9ef39a6dad7f80c24e7",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-9.xml": [
+ "e7eeba381c8cd44505aea6b26d05620b6c034e3d",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-026.html": [
- "2deb49a3fc0520485d5f08b26b8c7e02084ea74a",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-90.xml": [
+ "03973b90c43c246e2325e7691495d8396479dffd",
+ "reftest"
],
- "css/selectors/i18n/css3-selectors-lang-027.html": [
- "b8af60ea2371afc447e39225b9a534e4120b14fa",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-90b.xml": [
+ "15e06bcfa40c8e29b2ef50128537d1cde7ecc07c",
+ "reftest"
],
- "css/selectors/i18n/css3-selectors-lang-028.html": [
- "ea6a509d6aaef78a02872d6695780590c8cb222c",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-91.xml": [
+ "2fc2ed6d730c8556299aa0c615408ec81b34c364",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-029.html": [
- "1abf1ad49095736b35c63f82ad3d4564080031d2",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-92.xml": [
+ "16883a4a42358381ee75613c1b12ca31143a6f97",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-030.html": [
- "8bac2befb331fbf7819f7151b85481a8e3cf53a3",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-93.xml": [
+ "47f802396c3a9d667eed67fd598adc4d6b3fe696",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-031.html": [
- "5baedd284604a969554903d84fde3b35ba1e152e",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-94.xml": [
+ "4bebf5303c5e2487f4aa532616b42f181ac4d019",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-032.html": [
- "4d19ef9537bf156eaa20e9a0f6b980a0b0bdc40c",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-94b.xml": [
+ "d2ab44d297a3b56543812958b3b093794b3d0e1c",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-034.html": [
- "aa7b5821003327ae3402cd5246d1b88e73d1ca6f",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-95.xml": [
+ "9ba5dd0e8f049cb96e776854c68a8d86f0764982",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-035.html": [
- "8c00b6a62cd9da8a7d44149eaf3534e43c980770",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-96.xml": [
+ "8d62a81ea8c71cd4e0b9784a0c7d274bfe5f6807",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-036.html": [
- "61ba345383ac2bde74fc83adcac0306baa4a1ce1",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-96b.xml": [
+ "5c85d67f15b7871fd305089d7e83c00cb47227f1",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-041.html": [
- "1de94e2b92fa1a25335129c526162aecada6bbbc",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-97.xml": [
+ "a254bafb5555a71c5c105a91e4990c86e2ebfe29",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-042.html": [
- "5f8d799c7013dbd377d6e98f309dbda465bf4e04",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-97b.xml": [
+ "71e3467f27cc37e48bbcf907cdb412bf6aec81df",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-044.html": [
- "bab7033cecc45757e0b41355c9e690ac78cb250e",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-98.xml": [
+ "9d68a22d6b548d5d7d66843b732dfa3241532a41",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-045.html": [
- "96941e91abfc0213748e9f335d27559082b9fb22",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-98b.xml": [
+ "bf416abf82a9e07de56004bd02e901d0cca29411",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-046.html": [
- "07af0a228531462714c0f462a8cf476fb3d2754a",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-99.xml": [
+ "2d385fe6f474d0de8d667e1569da0026e9db1610",
+ "reftest"
],
- "css/selectors/i18n/css3-selectors-lang-047.html": [
- "a56364395c0654f3925b0ebfdadefb543a843df6",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-99b.xml": [
+ "f8aff417ef0c0d408378f5db8eb551d6c88cba2d",
+ "reftest"
],
- "css/selectors/i18n/css3-selectors-lang-048.html": [
- "4c8f297f7f0bd4ea1050c0b82399d5323f9d0b1e",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-d1.xml": [
+ "144cf0e0fd86ac7773d335bd6ed9ee5b118653b8",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-049.html": [
- "b7d1a7ebf6b32f050912c8b3649319d9c17866e4",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-d1b.xml": [
+ "f4583f843cac71690e15c370a2dd05529717c423",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-050.html": [
- "52d7bf1c173e862387fcaac45e0a143ad95bd55a",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-d2.xml": [
+ "aa24e9599919753b804a4f2c41e00d67e3b77349",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-051.html": [
- "7881d532569db18ce7fc5f24694cef19fe8c0f7b",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-d3.xml": [
+ "e8b15e96143cbd473cbd1c9d39db5e4ddb83669d",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-052.html": [
- "386a717cb3cd74dd038073f7132ff86d937aaabb",
- "testharness"
+ "css/selectors/old-tests/css3-modsel-d4.xml": [
+ "73fe3a7384965668f8416f439dbb79d7fd6949fb",
+ "visual"
],
- "css/selectors/i18n/css3-selectors-lang-054.html": [
- "8732daf05e1187fed72d6ed62a94b2f619498243",
- "testharness"
+ "css/selectors/old-tests/reference/bq-u-u-u-green.xht": [
+ "17c893cd49f67a92bc58ec1fb4826c6976ea78dc",
+ "support"
],
- "css/selectors/i18n/css3-selectors-lang-055.html": [
- "388a287ae9e83bc3dbb77b8f9011a8da2b05a765",
- "testharness"
+ "css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht": [
+ "aedd173524cec26f77da51b9d83b5eca6999e6db",
+ "support"
],
- "css/selectors/i18n/css3-selectors-lang-056.html": [
- "8bec0fab08bf28d584054546fed0312156116526",
- "testharness"
+ "css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht": [
+ "2782cfc86033958d68ace387beea3f3fe9582b26",
+ "support"
],
- "css/selectors/invalidation/any-link-pseudo.html": [
- "9792fd0ebe1c77307ec1cfb6f572fc5d8e139e6a",
- "testharness"
+ "css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht": [
+ "ee174e00e646ca657767f00684c63322fc8a2f03",
+ "support"
],
- "css/selectors/invalidation/matches.html": [
- "634ded3c7d760f6dccb2c14e87cf67f1c1320da5",
- "testharness"
+ "css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht": [
+ "8d236dfc600e7a402d28ba2e1f58c3dfb9814bd7",
+ "support"
],
- "css/selectors/invalidation/quirks-mode-stylesheet-dynamic-add-001.html": [
- "3d7be982378fe2414f818d1682eca8f38f3575ac",
- "testharness"
+ "css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht": [
+ "1768b0ed27aeb4191ddccb4958a0fdf73d836105",
+ "support"
],
- "css/selectors/invalidation/selectorText-dynamic-001.html": [
- "c705c2b3e85f591076f34e202c9a41b1ae0ff271",
- "testharness"
+ "css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht": [
+ "d565fc0e2295e568d24e8efbc06a0ca63fb00070",
+ "support"
],
- "css/selectors/invalidation/sheet-going-away-001.html": [
- "7b704eca97ff5bf725379692174e1d1b2fb3f425",
- "testharness"
+ "css/selectors/old-tests/reference/seven-green-divs.xht": [
+ "8daf648750093837d966d8d2ecb2c3b5dbf9fdc5",
+ "support"
],
- "css/selectors/invalidation/sheet-going-away-002-ref.html": [
- "67841617736730e588f5659fd485fb09a159bd33",
+ "css/selectors/old-tests/reference/this-address-p-p-p-lime-background.xht": [
+ "17f9b8c83d22e407d108b1f9ac6dfb8c68f388ea",
"support"
],
- "css/selectors/invalidation/sheet-going-away-002.html": [
- "41778239518d4d9b602f7fc18ee3ea5c910da85b",
- "reftest"
+ "css/selectors/old-tests/reference/this-line-green-background.xht": [
+ "35c264e14977b7f3445bcdcb8c507687f25dbe51",
+ "support"
],
- "css/selectors/matches-nested.html": [
- "b82d43d09017955af2904f6362e858929a6d4399",
- "testharness"
+ "css/selectors/old-tests/reference/this-line-green-color.xht": [
+ "4ae49b1dca7dda197ab378b7958eb7c1cb5c4ffe",
+ "support"
],
- "css/selectors/matches-specificity.html": [
- "41d7251a3d74efbdf69407889418797a80289316",
- "testharness"
+ "css/selectors/old-tests/reference/this-line-lime-background-offset.xht": [
+ "9fd7a450dfac3a00b00c99ef4c9319a0592b39ee",
+ "support"
],
- "css/selectors/missing-right-token.html": [
- "8fe33a95795354117177f78eae7f1081ef0b1947",
- "testharness"
+ "css/selectors/old-tests/reference/this-line-lime-background.xht": [
+ "72fd9d88277d3bb9181c42eabfad778b6ecc6275",
+ "support"
],
- "css/selectors/of-type-selectors-ref.xhtml": [
- "af883c97ecf1a968edcdcd5cc5d2f7d6fba71212",
+ "css/selectors/old-tests/reference/this-test-has-passed-desc.xht": [
+ "1688ca623795de567d2b1bd6961aeb22ea1b6929",
"support"
],
- "css/selectors/of-type-selectors.xhtml": [
- "18fead9b1cc452059ad74f9cc3154d663e5f8d4b",
- "reftest"
+ "css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht": [
+ "278fa2b749019cffd0ff404a57c7e9b111b53e1e",
+ "support"
+ ],
+ "css/selectors/old-tests/reference/three-paragraph-lime-characters.xht": [
+ "46bfede1a5ba155f4c1d6750d1bc941909522b1a",
+ "support"
],
"css/selectors/resources/blue15x15.png": [
"89de32fdb8a4e48b1320f40f5a75352773077cee",
@@ -570457,41 +577666,17 @@
"d46f13413346098dbd65b1e9ceff5fb8368e863e",
"reftest"
],
- "css/selectors/tng.css": [
- "3f44bc7342634a743ceabdbabfb09fcb998db6ae",
- "support"
- ],
"css/selectors/user-invalid.html": [
"f0c3d93cbea2430a98e1c524910ded94567a70d7",
"testharness"
],
- "css/selectors/utils/generators.pm": [
- "987fcddd10134164c128479811a09cb8b7117351",
- "support"
- ],
- "css/selectors/utils/helpers.pm": [
- "30c35d3425a07eed916f09db972a5743c8aa94e7",
- "support"
- ],
- "css/selectors/utils/parser.pm": [
- "5ae4a740ed8b61f0c78c9c52551ed62969fe6a03",
- "support"
- ],
- "css/selectors/xhtml-full.css": [
- "6d9654867924389a7abbb5d44336950dc1473df0",
- "support"
- ],
- "css/selectors/xhtml-shell.css": [
- "957da843bb826122aff0c7e0b6d2653707b0716b",
- "support"
- ],
- "css/selectors/xml-full.css": [
- "b4176074f4bdc3cdd0e6e8f92bee0d502440afd6",
- "support"
+ "css/selectors/webkit-pseudo-element.html": [
+ "8b4adddba8f2797512791421910ded22c00c8be2",
+ "testharness"
],
- "css/selectors/xml-shell.css": [
- "b4176074f4bdc3cdd0e6e8f92bee0d502440afd6",
- "support"
+ "css/selectors/x-pseudo-element.html": [
+ "80ec44f9def9e15162e8cd06c96927d13efb0eaa",
+ "testharness"
],
"css/support/1x1-green.png": [
"b98ca0ba0a03c580ac339e4a3653539cfa8edc71",
@@ -570577,6 +577762,10 @@
"9945ef47114c2841a746c99a2fb1e93e050aac8b",
"support"
],
+ "css/support/parsing-testcommon.js": [
+ "b075882f89aae49b419220b234534241cde5fd42",
+ "support"
+ ],
"css/support/pattern-grg-rgr-grg.png": [
"9b88fbd81149891234185f54f8b4a0431759f181",
"support"
@@ -580261,6 +587450,10 @@
"a07d55b9e1ba751852709f31e3c58c10545aba03",
"support"
],
+ "docs/_writing-tests/h2tests.md": [
+ "0d19f7de19ca32543e575998d92c53a325f72d21",
+ "support"
+ ],
"docs/_writing-tests/idlharness.md": [
"dfa46d3efdfb5ad8b3074ffca4ca75a3c2b7e77f",
"support"
@@ -580286,7 +587479,7 @@
"support"
],
"docs/_writing-tests/server-features.md": [
- "a3cd4174d2719feaf1268912ac9c2b4b6e2a081e",
+ "8798c2e6bdd5d907436d7f9b0f3546572edc754d",
"support"
],
"docs/_writing-tests/submission-process.md": [
@@ -580298,15 +587491,15 @@
"support"
],
"docs/_writing-tests/testdriver.md": [
- "a934e3278f1e2ea3b105b392cdac0e6a895e1b86",
+ "eb9b9fb0413862ab41c2064dec88fc10e3f7611a",
"support"
],
"docs/_writing-tests/testharness-api.md": [
- "bb5524532915a58e4fab3c3bb89a41bbe2a46b4a",
+ "952c8365fb7028c00eeca7ee5949310ecce95913",
"support"
],
"docs/_writing-tests/testharness.md": [
- "e91302f1d214fb7fd05a9dce2676569321fc2206",
+ "9c21452607e8f3f9e5bbf3ef2fb7771441f4a680",
"support"
],
"docs/_writing-tests/visual.md": [
@@ -580633,10 +587826,6 @@
"921fa07b3f6de0f9a579b75b14d6509039765205",
"testharness"
],
- "dom/inert/inert-does-not-match-disabled-selector.html": [
- "74b8ac3f7dd5c3447bf47fd732fade9220497c93",
- "testharness"
- ],
"dom/interface-objects.html": [
"936d63517eada5521f814fabdbd785a57b9640b2",
"testharness"
@@ -581742,7 +588931,7 @@
"testharness"
],
"dom/nodes/selectors.js": [
- "587779b7da0e35f63ad94309f5e9b173adcf1cee",
+ "c4e87330b44d0db9c862d4e59323d0d15256d4cb",
"support"
],
"dom/ranges/Range-attributes.html": [
@@ -582502,143 +589691,143 @@
"testharness"
],
"editing/run/backcolor.html": [
- "3d337785efe13eea7d258c2b7c23f4f1a4170203",
+ "5911de309d02193573f58b6257f3fb6dc28f58c7",
"testharness"
],
"editing/run/bold.html": [
- "b439a11fdd8e1d4afedc625eeb1c8a4e7eece080",
+ "390d6810d857addb514c510086807223ac01e758",
"testharness"
],
"editing/run/createlink.html": [
- "98261697b354a48f5b0a547eea65a437adb548a8",
+ "b67357e684a4894abf8d050419d622db658d601b",
"testharness"
],
"editing/run/delete-list-items-in-table-cell.html": [
- "409a844fc9605311216883fd0cfeb6f279722c67",
+ "b765bc4b9776dc382b18a618ba003c5e5d31c464",
"testharness"
],
"editing/run/delete.html": [
- "592c7bb997424c9e36b96cfd980f6bb0e4aeb190",
+ "6d7a7c8f0c5a88cba7a23815cc9da44aca032d0c",
"testharness"
],
"editing/run/fontname.html": [
- "491fbe5501564534581291a2b763f1df3eb6949c",
+ "53800c540c4c100aac5758a8a1d48b162b1a1d67",
"testharness"
],
"editing/run/fontsize.html": [
- "35ef70156647931b52b293547fadad7fc69a88b1",
+ "66ae99ebc100eb21219ea7d26fa5ef77ac48bbde",
"testharness"
],
"editing/run/forecolor.html": [
- "4dd42bf67621cff95aa6b518ad0109ac269823c4",
+ "8594e061c1452d90b314c4d6d4e4e5836f5998be",
"testharness"
],
"editing/run/formatblock.html": [
- "f117e77d7bf353e4ab520e8ed79440300537215e",
+ "5c97c08e7327cb8b8c00c820b21741c444f19a28",
"testharness"
],
"editing/run/forwarddelete.html": [
- "50850d130776eb839f15b3618452af267f3b9d65",
+ "e17190053ac2df075fbcfe37e824b732793907e6",
"testharness"
],
"editing/run/hilitecolor.html": [
- "e2de0d960ff5c53f81cd24010b2e6a869cb57eb0",
+ "cd9e5528e5613e788d36e926ac41b913ee52b2c6",
"testharness"
],
"editing/run/indent.html": [
- "bf753e6efa2e974241fe9fdb1a109e552302e10e",
+ "13e98f5ea647df90245e52e83a32299b1e71beaf",
"testharness"
],
"editing/run/insert-list-items-in-table-cell.html": [
- "60b396dd347385af5767df0eafef13bc06032b19",
+ "8d08f8c3eb9c434b91d64281e418aedd9877af88",
"testharness"
],
"editing/run/inserthorizontalrule.html": [
- "5569e8f9a6bab1719d7cc6d286217db752da4b4c",
+ "6e3e5490a60324dc060bb81e3be2c1a8217e7acf",
"testharness"
],
"editing/run/inserthtml.html": [
- "59eaf4c59f19eb06e8a4609c0ab462142a83b263",
+ "f83102e6a9b37ace62b44fd774d13219ad9d1021",
"testharness"
],
"editing/run/insertimage.html": [
- "f34cad0d1f1a0d61a04ba079e2092e59ebe17280",
+ "7a1f7b922665cd357418ad2ff343d7559155b7fd",
"testharness"
],
"editing/run/insertlinebreak.html": [
- "eb3df9dc52306288bcf31a0c694893a0aeca37e2",
+ "ddab665084b141561aa319a17f0a8f0aa5f228e4",
"testharness"
],
"editing/run/insertorderedlist.html": [
- "53a9ababb237dbd826ed858746ce5494e1d034bd",
+ "68772355c24d2b8388e9379cf8c0b587b216e233",
"testharness"
],
"editing/run/insertparagraph.html": [
- "549878a08a56f8f02f3cc98befb5659d8f019f87",
+ "173c5aea40b460594ab0206c1c4400a26f3c219b",
"testharness"
],
"editing/run/inserttext.html": [
- "1a13919124e72c3b8ce13bc4db56ed2505d7988c",
+ "a01293fcae034da36beebd4a64f7c29152f1597a",
"testharness"
],
"editing/run/insertunorderedlist.html": [
- "24e4d00e3fb56fa8e01f01b7ff5040cfbf6de3dc",
+ "b1f636b10959971843ee9c106f7c2ee71f8f1a42",
"testharness"
],
"editing/run/italic.html": [
- "1b363c280038362a7b999d815f40b9516c3158f5",
+ "6185d553d0218e150795027ca3cabd598c07b7d9",
"testharness"
],
"editing/run/justifycenter.html": [
- "68ade6b6e3544659a9c3574141c093536439ba0c",
+ "4902a302cca15b24aacdba3473836739186bc0fb",
"testharness"
],
"editing/run/justifyfull.html": [
- "5d2dad5e68eaa7f0dcf992c62f755dbaecbc67cc",
+ "c11befaf8939e88877a3011e7c190679a1c97984",
"testharness"
],
"editing/run/justifyleft.html": [
- "37554844fec7c5d88cbdd8ba0cb9ba3680cc6572",
+ "f6b2818538937f2c51b2d55dd4e4013872fb6d13",
"testharness"
],
"editing/run/justifyright.html": [
- "ca69e328762059d73e3455715899b28e9a3b73d8",
+ "edd30b7f5f034b9046ab981ef34ffbba7f61fd50",
"testharness"
],
"editing/run/misc.html": [
- "2ebd68cda6eba2dd9312442b0f9b5e6af0bff5fa",
+ "5bf52682292c96c50d4c45d4ea4c138a625c99d4",
"testharness"
],
"editing/run/multitest.html": [
- "2c4b66116875f72834d401c448e8a126269533b6",
+ "813b9edc034addf8f9c2270c567b74dc45263b37",
"testharness"
],
"editing/run/outdent.html": [
- "0329b6eb44ae2ba9f0dbf4a3c9aaf2ed4f294bb8",
+ "f1f9fb491aa940b65ce7010370c2b4d3258a9cf4",
"testharness"
],
"editing/run/removeformat.html": [
- "fb38a4457e84471d2167b8eff87aacc8d917b3f0",
+ "0c38ff915fb0e85f8edb2de3581b86ec53c483eb",
"testharness"
],
"editing/run/strikethrough.html": [
- "ed0781fd16ef5513e84cd0ef9d9b4bab0f94afdf",
+ "cb06c10d0c26d51f40ff2edcd64d897f618ca890",
"testharness"
],
"editing/run/subscript.html": [
- "1655a822fdf804dc21d27ec1ffa8386e388fc6fe",
+ "e0071d7a08043da296cbf2c0b1061fc00de544e0",
"testharness"
],
"editing/run/superscript.html": [
- "4c1f04763b6089e1b7e7a62a410842ef46bd7ac3",
+ "0c3519b288e4ce7524fdce0d432dbf495cbb837b",
"testharness"
],
"editing/run/underline.html": [
- "61f85a1fa820894c24b1232d8d3ac6e82d84cf93",
+ "f53add984bde3e3c9f1846bf656d49627d6220f8",
"testharness"
],
"editing/run/unlink.html": [
- "26d6e2d83ec7b1e0d8a0a061c5e517f42dda97b8",
+ "7cd0be939f16e8aea7b00ff2b13a06102e26cc4d",
"testharness"
],
"encoding/META.yml": [
@@ -583797,6 +590986,62 @@
"70d8fb73eadb81bdade8e4bdcefe46491cd05b96",
"testharness"
],
+ "encoding/streams/backpressure.any.js": [
+ "f17e149ed9e5b949d8b3d6a54b48093232e7da52",
+ "testharness"
+ ],
+ "encoding/streams/decode-attributes.any.js": [
+ "21b70201271a206e7652bcc93ca1de927a318d0f",
+ "testharness"
+ ],
+ "encoding/streams/decode-bad-chunks.any.js": [
+ "101fb3aeb614cf66d82fb33f2c27989de3850061",
+ "testharness"
+ ],
+ "encoding/streams/decode-ignore-bom.any.js": [
+ "cbe26d71b13557285040a7e2934010e7195d27ec",
+ "testharness"
+ ],
+ "encoding/streams/decode-incomplete-input.any.js": [
+ "80dd016d4918daaa49da5b24efbcead17be03e88",
+ "testharness"
+ ],
+ "encoding/streams/decode-non-utf8.any.js": [
+ "7f39cdc04ca76b7071d3321ac068f9216b365002",
+ "testharness"
+ ],
+ "encoding/streams/decode-split-character.any.js": [
+ "6c022697da65ea10ee72da38609e8edbf695edab",
+ "testharness"
+ ],
+ "encoding/streams/decode-utf8.any.js": [
+ "34fa764bf0a682d1052550b406e8ad8dcec92825",
+ "testharness"
+ ],
+ "encoding/streams/encode-bad-chunks.any.js": [
+ "868e34b7342969b20145af44fd1d606499ec9ad1",
+ "testharness"
+ ],
+ "encoding/streams/encode-utf8.any.js": [
+ "74d1860e82b18535deb21238217c0e817bb9cc5d",
+ "testharness"
+ ],
+ "encoding/streams/readable-writable-properties.any.js": [
+ "ad7cde32f6889200e44ab840d3814f985778026d",
+ "testharness"
+ ],
+ "encoding/streams/realms.window.js": [
+ "b1cc13e0b80653161bf0e7c9a99325feab45d5c0",
+ "testharness"
+ ],
+ "encoding/streams/resources/readable-stream-from-array.js": [
+ "5c12ba8c8bba60ef52a689abae17d1f1e0bfc458",
+ "support"
+ ],
+ "encoding/streams/resources/readable-stream-to-array.js": [
+ "fda03e2264492296d9b26986d15211384a6a8b16",
+ "support"
+ ],
"encoding/textdecoder-byte-order-marks.any.js": [
"9ef0d73141a0e0ceaafba61cc101986afa32477d",
"testharness"
@@ -584442,7 +591687,7 @@
"support"
],
"encrypted-media/scripts/playback-temporary-expired.js": [
- "5144ef967f78fef82aee7821a091c876b48f441c",
+ "3d1bd9591db309deb64df8765f5a7fd6fb5c4791",
"support"
],
"encrypted-media/scripts/playback-temporary-multikey-sequential.js": [
@@ -584985,38 +592230,22 @@
"48cb95ebf749d67b4965f5e24f20e36ede749600",
"support"
],
- "feature-policy/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
- "6f11f8995b1e5c1cebd123219f9c8d34d4b108a5",
- "testharness"
- ],
- "feature-policy/autoplay-allowed-by-feature-policy-attribute.https.sub.html": [
- "59b33d7c4d2bd2c712c73ad7ff4e7c1003c244a2",
- "testharness"
- ],
- "feature-policy/autoplay-allowed-by-feature-policy.https.sub.html": [
- "63479c0cb6f8c6c8241cc5c4a33e167b13a3888b",
+ "feature-policy/experimental-features/document-write.tentative.html": [
+ "f0148783f1246b6bd60dabd837c64fc6d903e542",
"testharness"
],
- "feature-policy/autoplay-allowed-by-feature-policy.https.sub.html.headers": [
- "08461fadc2888cbcdfcda533f2928f14a52ab44e",
- "support"
- ],
- "feature-policy/autoplay-default-feature-policy.https.sub.html": [
- "763073e437d009b99a1d372c19bc1907f97e6776",
+ "feature-policy/experimental-features/intrinsicSize-with-responsive-images.tentative.https.sub.html": [
+ "60bc00ddc3ece7f3bb1c0d6e07ffbe9be735188d",
"testharness"
],
- "feature-policy/autoplay-disabled-by-feature-policy.https.sub.html": [
- "3dd3afbf771d5384b02bad0701aaae9224fb6399",
+ "feature-policy/experimental-features/intrinsicSize-without-unsized-media.tentative.https.sub.html": [
+ "4a3526425d7add2eb9b144ac3f8498bcbcf7890e",
"testharness"
],
- "feature-policy/autoplay-disabled-by-feature-policy.https.sub.html.headers": [
- "69ce436270a8715da3e7e4cea125824c2bbf57dc",
+ "feature-policy/experimental-features/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers": [
+ "4fbf3f5adddbcb8ec95fc0e2192f4da841e93b8c",
"support"
],
- "feature-policy/experimental-features/document-write.tentative.html": [
- "f0148783f1246b6bd60dabd837c64fc6d903e542",
- "testharness"
- ],
"feature-policy/experimental-features/resources/async-script.js": [
"3c0ee6d02343891b0234f31c0fb229929ae1b24b",
"support"
@@ -585261,6 +592490,90 @@
"1759381fdc4141302f1b95868550ead76d9f5ca7",
"support"
],
+ "feature-policy/reporting/camera-reporting.https.html": [
+ "14b2ed1d37c6d79c9e011a35b9fece0cddc0ac76",
+ "testharness"
+ ],
+ "feature-policy/reporting/camera-reporting.https.html.headers": [
+ "2adc5e237fcec874767ff8f5ab38e3456c02cbf0",
+ "support"
+ ],
+ "feature-policy/reporting/document-write-reporting.html": [
+ "cb08b8d72d1851ca02c51abf5713519d52f1ecf4",
+ "testharness"
+ ],
+ "feature-policy/reporting/document-write-reporting.html.headers": [
+ "57102d5ee7c072e433fa44c0c13521573b32f469",
+ "support"
+ ],
+ "feature-policy/reporting/fullscreen-reporting.html": [
+ "83d97c91fab60e593cf3bf0cceff4db80552ef02",
+ "testharness"
+ ],
+ "feature-policy/reporting/fullscreen-reporting.html.headers": [
+ "d35e48ba40dc65a3b043a3e41a11332c42bfdba9",
+ "support"
+ ],
+ "feature-policy/reporting/geolocation-reporting.https.html": [
+ "22e258563b799c7d48db2452f15eb6124d1f2d0e",
+ "testharness"
+ ],
+ "feature-policy/reporting/geolocation-reporting.https.html.headers": [
+ "7e75481ea6d71080aaef8b43e774f5da9c9741e5",
+ "support"
+ ],
+ "feature-policy/reporting/image.jpg": [
+ "c059b96d97fc3701ce4325165b79948f69189135",
+ "support"
+ ],
+ "feature-policy/reporting/microphone-reporting.https.html": [
+ "7347a2332bc8184b2437a965e95b54ff5fcac22f",
+ "testharness"
+ ],
+ "feature-policy/reporting/microphone-reporting.https.html.headers": [
+ "a86e0a077851a84f704e2aa4df1d526ecd9a55b2",
+ "support"
+ ],
+ "feature-policy/reporting/midi-reporting.html": [
+ "8303b7adce4de654e3a846bbbe1cba035ac9a284",
+ "testharness"
+ ],
+ "feature-policy/reporting/midi-reporting.html.headers": [
+ "0e145978a014f08fb5faff42750e9338da0f9ede",
+ "support"
+ ],
+ "feature-policy/reporting/payment-reporting.https.html": [
+ "03eaebea58fb603f5121f6836c85c2c6773c3a5d",
+ "testharness"
+ ],
+ "feature-policy/reporting/payment-reporting.https.html.headers": [
+ "a2836778bc5389fdb65e9f6d5f83c7967200866f",
+ "support"
+ ],
+ "feature-policy/reporting/sync-xhr-reporting.html": [
+ "2c76390847be29c5bb2f3ec8605d1cb746c33e00",
+ "testharness"
+ ],
+ "feature-policy/reporting/sync-xhr-reporting.html.headers": [
+ "21a909e1fb6d84f066f42c09488f1bef032171c9",
+ "support"
+ ],
+ "feature-policy/reporting/unsized-media-reporting.html": [
+ "8bd793189501a94564044a3c2fa3757a69f13085",
+ "testharness"
+ ],
+ "feature-policy/reporting/unsized-media-reporting.html.headers": [
+ "db2dcbc1929b9e1264855e9b80f77dfbda5d4f38",
+ "support"
+ ],
+ "feature-policy/reporting/usb-reporting.https.html": [
+ "f90c602e449bd00e1d773edbce01e4fab63341e2",
+ "testharness"
+ ],
+ "feature-policy/reporting/usb-reporting.https.html.headers": [
+ "4fd1e269362c43d282ca8e3c5c35a5d648f0666b",
+ "support"
+ ],
"feature-policy/resources/autoplay.js": [
"56780cf6dc05879731bff0bbb1486c51b0b4141b",
"support"
@@ -585365,6 +592678,10 @@
"5701d6d7866b575dc162b27f70a336967c70911f",
"testharness"
],
+ "fetch/api/basic/header-value-null-byte.any.js": [
+ "9c223740c7807b43a6595ba81ef4f5b3c74c60b4",
+ "testharness"
+ ],
"fetch/api/basic/integrity.sub.any.js": [
"d487c3738ac498f4b936e269c093ca2bad581cb0",
"testharness"
@@ -585913,6 +593230,10 @@
"79c91cdfe82af4723707822be204b32941a118ca",
"testharness"
],
+ "fetch/api/request/request-init-stream.any.js": [
+ "22e3f41bc2d8a38dd097e61145e213e3febbd108",
+ "testharness"
+ ],
"fetch/api/request/request-keepalive-quota.html": [
"f71b1b2996a388367a4c89d7613f788f57376c4a",
"testharness"
@@ -586097,6 +593418,10 @@
"1e68f6d01c6c763fa46427e31c6f1229ed000ccc",
"testharness"
],
+ "fetch/api/response/response-from-stream.any.js": [
+ "93b29b42867f47f4472c6820ff9d4a1a343e84cf",
+ "testharness"
+ ],
"fetch/api/response/response-init-001.html": [
"cd89448bbbef388e69a2ef4b2aecf04bafb728f2",
"testharness"
@@ -586594,7 +593919,7 @@
"testharness"
],
"fetch/sec-metadata/font.tentative.https.sub.html": [
- "65432b5bacf3bddf8d5cbaad74bdbaf5e63fb44e",
+ "0a75531c405fc6db3320caec5567bec1ac38c763",
"testharness"
],
"fetch/sec-metadata/iframe.tentative.https.sub.html": [
@@ -586609,40 +593934,24 @@
"e1ac53157e023a9c6bc4806feda2e782ef4eefa5",
"testharness"
],
- "fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html": [
- "e25fd3f61d5487de6026a0204f107201f491afad",
+ "fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html": [
+ "9f497a9b62b80da4eff2e35220c1d6317e0e2817",
"testharness"
],
- "fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html": [
- "ac5982d8956c96cd638c2464ec9f8cce3f7e3a34",
+ "fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html": [
+ "fdd8733ba6d682b1f6b55fb4e3738d03a1fbbb50",
"testharness"
],
- "fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html": [
- "5b3b965f5e96d75f93796e55e77cfac94de18a52",
+ "fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html": [
+ "8fdc943f4c96c0616778c3316587f3cc598606eb",
"testharness"
],
- "fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html": [
- "ea6b167673f5e64396db4690abde56253e8af914",
+ "fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html": [
+ "dea71c3f67dca694e05f3c00db1d2d7aea5f3744",
"testharness"
],
- "fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html": [
- "430990a57c48b858fdc509653c0b689abcedcc6d",
- "testharness"
- ],
- "fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html": [
- "591cf67d18111592a5e696e346371a88770bdb32",
- "testharness"
- ],
- "fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html": [
- "8592d02c269b6afc4193f4323238b68d8fc26979",
- "testharness"
- ],
- "fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html": [
- "191dbaa7f77a3ac569b37e95e2db9f2ac4985a3e",
- "testharness"
- ],
- "fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html": [
- "11d60473981cf056ebc56b15905f27c070dad9c8",
+ "fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html": [
+ "a71163a1bfcb09196083dd1a38f4a6863f46eca8",
"testharness"
],
"fetch/sec-metadata/report.tentative.https.sub.html": [
@@ -586666,15 +593975,15 @@
"support"
],
"fetch/sec-metadata/resources/helper.js": [
- "cbd96d06863427f34d75d0621839bcfe76c7ad96",
+ "55e36d49fac39e814e10df1629e8b8fec0c8ebef",
"support"
],
"fetch/sec-metadata/resources/post-to-owner.py": [
- "fe08cd1cbcaa4585fb3be0ce0ee33e7d75759129",
+ "5472aa5b47e424bb6590d6c757df635eb4b6dd1f",
"support"
],
"fetch/sec-metadata/resources/record-header.py": [
- "06157e4cd8bd35e54b99c04f09a995185ba5686c",
+ "4c30d1e52ac8bfb24c890f790df154ea17947043",
"support"
],
"fetch/sec-metadata/resources/sharedWorker.js": [
@@ -586690,15 +593999,15 @@
"testharness"
],
"fetch/sec-metadata/serviceworker.tentative.https.sub.html": [
- "9d1fe2a3449da49b3b4e167f74e63e815ef5cf6c",
+ "cefabb20aaa40c91f5d90d180f52d596086a55cd",
"testharness"
],
"fetch/sec-metadata/sharedworker.tentative.https.sub.html": [
- "aa118e04239691f5488c4d62f3f1cf0ae59e8f1d",
+ "09017ccbb3a2b1b878d15e4199d59cad29a2277a",
"testharness"
],
"fetch/sec-metadata/style.tentative.https.sub.html": [
- "78fac567b43f3c48c81897b44237d820a6209d8a",
+ "609d5764f08ca5b3242692f4bdd94f2b364481b3",
"testharness"
],
"fetch/sec-metadata/track.tentative.https.sub.html": [
@@ -587422,11 +594731,11 @@
"manual"
],
"fullscreen/api/element-ready-check-containing-iframe-manual.html": [
- "66f99688f144779321ca511295c97b6883495ba8",
+ "8ba2ab71b158603e1af466d69b91412626ff8722",
"manual"
],
"fullscreen/api/element-ready-check-fullscreen-element-sibling-manual.html": [
- "dc0c28c78e18d7b5be3efe460802a7e1d1cf7d4e",
+ "f800093ec8ec8d6818a107dfc19a053c10583b36",
"manual"
],
"fullscreen/api/element-ready-check-fullscreen-iframe-child-manual.html": [
@@ -587482,7 +594791,7 @@
"manual"
],
"fullscreen/api/element-request-fullscreen-non-top-manual.html": [
- "06c4c1b036713cbf0c9c12a4d595525930006bd4",
+ "0764e9c8423a2f528dbfa12d4e57614d7128b4a0",
"manual"
],
"fullscreen/api/element-request-fullscreen-not-allowed.html": [
@@ -587518,11 +594827,11 @@
"manual"
],
"fullscreen/api/element-request-fullscreen-two-elements-manual.html": [
- "9611c8165663f8e633be20c2e34fb8b04378a44e",
+ "3291664c63ab4880dd844e5f75046d2f93c8f92f",
"manual"
],
"fullscreen/api/element-request-fullscreen-two-iframes-manual.html": [
- "99a7672e71c9617f1b73c87d6dcfe694f23563a4",
+ "94b38c0302a5fa32f72dd63c505cf0b73d7e6a73",
"manual"
],
"fullscreen/api/historical.html": [
@@ -587589,6 +594898,14 @@
"ccd3f0e22be91def3e2117a567c4245a7fea5720",
"support"
],
+ "fullscreen/rendering/fullscreen-root-block-scroll-manual.html": [
+ "ae57d8a9f238c0b1014a256de7f0ea814120b06b",
+ "manual"
+ ],
+ "fullscreen/rendering/fullscreen-root-block-size-manual.html": [
+ "989a85d91c4e17c6f5fd307d2fcfc810c3246738",
+ "manual"
+ ],
"fullscreen/rendering/ua-style-iframe-manual.html": [
"bf93aa28c3f10e65cf975f5a14833eff7b9ee688",
"manual"
@@ -587881,6 +595198,22 @@
"5bec688af9cd3c02ef00055d5bf4642841c04951",
"support"
],
+ "hr-time/resources/unload-a.html": [
+ "40c1d061830e6fd36d740ba49f5252b8b00bc813",
+ "support"
+ ],
+ "hr-time/resources/unload-b.html": [
+ "7c2d90df275fbc15f79d71fa2c57131fb7f99a5d",
+ "support"
+ ],
+ "hr-time/resources/unload-c.html": [
+ "731da9db758ba52a2d0f67222e41dc8cff76071b",
+ "support"
+ ],
+ "hr-time/resources/unload.js": [
+ "ab6b121c2b5cedd5f79015f3f1aa3ef1fddd7fb0",
+ "support"
+ ],
"hr-time/test_cross_frame_start.html": [
"30e804bd7350315497115b75929a52ac1d82d3cb",
"testharness"
@@ -587893,6 +595226,10 @@
"71ade4a8c48ce2d0df59537d1a6d48a4ada08b8a",
"testharness"
],
+ "hr-time/unload-manual.html": [
+ "18c4e0dc327919361af8bdd730ba25904263ff97",
+ "manual"
+ ],
"hr-time/window-worker-timeOrigin.window.js": [
"1e5ef1cdffecf639363aa06b72665f54ccce1156",
"testharness"
@@ -588094,7 +595431,7 @@
"support"
],
"html/META.yml": [
- "d491c94e30c344f248a21da5c9605760921aa0c7",
+ "636b42b68c1046421f743b07a6764a715cabcb64",
"support"
],
"html/README.md": [
@@ -595641,98 +602978,6 @@
"c8bdaafdb89555c6708f0d84c3d41e437840be5b",
"testharness"
],
- "html/editing/focus/composed.window.js": [
- "8951afc4e0ce643752754e67243532ae8e0fa9ae",
- "testharness"
- ],
- "html/editing/focus/document-level-focus-apis/document-level-apis.html": [
- "2d8c49c7f6127fdca7e29800dde3c3096be44aca",
- "testharness"
- ],
- "html/editing/focus/document-level-focus-apis/test.html": [
- "90d63e51e931b147b23e8e1941324f8fb4237c94",
- "support"
- ],
- "html/editing/focus/focus-01.html": [
- "9d1bf1b6c7d3f3b714b72cb3371f35c222fe5a74",
- "testharness"
- ],
- "html/editing/focus/focus-02.html": [
- "1858d6a21d2c97b2bd8706592c08fad748a37330",
- "testharness"
- ],
- "html/editing/focus/focus-management/focus-event-targets-simple.html": [
- "ab7bcfe6d0e636552746def160715bc47e63fb85",
- "testharness"
- ],
- "html/editing/focus/focus-management/focus-events.html": [
- "d63362aaa1828f35de410b56c1ccc2d7869a111e",
- "testharness"
- ],
- "html/editing/focus/inert/inert-does-not-match-disabled-selector.html": [
- "defc7cd6c49da58e49bff8e59a79f4a7dd4ff2c6",
- "testharness"
- ],
- "html/editing/focus/inert/inert-in-shadow-dom.html": [
- "36c962b1fc7d50cb6cb46e7d79d9435323e64ad9",
- "testharness"
- ],
- "html/editing/focus/inert/inert-inlines.html": [
- "b056c6495d2c54733bee6ab796332ba89f01b379",
- "testharness"
- ],
- "html/editing/focus/inert/inert-label-focus.html": [
- "8bbe1eca15c7d8f2f9fd5ea48c33cd0a5d5098e0",
- "testharness"
- ],
- "html/editing/focus/inert/inert-node-is-uneditable.html": [
- "b18d9912eb2d06cd072b79aa6f94002a3c209d1a",
- "testharness"
- ],
- "html/editing/focus/inert/inert-node-is-unfocusable.html": [
- "8b5de37fdcadedb9d98ec44c9c3c20aea52a0400",
- "testharness"
- ],
- "html/editing/focus/inert/inert-node-is-unselectable.html": [
- "7d5e90821bb0bd0d83711685853c78ff9fee6c4f",
- "testharness"
- ],
- "html/editing/focus/processing-model/focus-fixup-rule-one-no-dialogs.html": [
- "d8171abc715990a9e752c2d974acdfd7ecd34fc2",
- "testharness"
- ],
- "html/editing/focus/processing-model/preventScroll.html": [
- "97d341b30ec849fefc13adb8b3376307fea58b69",
- "testharness"
- ],
- "html/editing/focus/processing-model/support/preventScroll-helper.html": [
- "43c6d86a578bedaaf52027d9131bee82bf16fe42",
- "support"
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html": [
- "25e359c2a25826aae29f88c834d2965e6ae81516",
- "testharness"
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html": [
- "92bf1743142a906fe1d8092527517cd238e02c2e",
- "testharness"
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html": [
- "45429cc1a72c65198c46d400d68be6636b5e36a4",
- "testharness"
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html": [
- "9a131847703970aff25163a8c78c39e5d1a3a1a3",
- "testharness"
- ],
- "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html": [
- "c46acd0a41358e4a0b61e3abde4bb9b39ab6a422",
- "testharness"
- ],
- "html/editing/focus/tabindex-focus-flag.html": [
- "e40bc077594351019591de8cbfae8fb0d6af13fe",
- "testharness"
- ],
"html/editing/the-hidden-attribute/hidden-1-ref.html": [
"7346ce919d210a740104ca5e82264bed8377c2d0",
"support"
@@ -595954,7 +603199,7 @@
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/sharedworker-failure.js": [
- "a11ccbc1f3099a6be7b4d538bcbe40292eac3ea0",
+ "8472318abd53207ec56b3f5988fb0a49d0c006a4",
"support"
],
"html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/test-incrementer.js": [
@@ -596121,6 +603366,78 @@
"2d7102bd4acd6a29a650f6e11479d7226f4c4327",
"reftest"
],
+ "html/interaction/focus/composed.window.js": [
+ "8951afc4e0ce643752754e67243532ae8e0fa9ae",
+ "testharness"
+ ],
+ "html/interaction/focus/document-level-focus-apis/document-level-apis.html": [
+ "2d8c49c7f6127fdca7e29800dde3c3096be44aca",
+ "testharness"
+ ],
+ "html/interaction/focus/document-level-focus-apis/test.html": [
+ "90d63e51e931b147b23e8e1941324f8fb4237c94",
+ "support"
+ ],
+ "html/interaction/focus/focus-01.html": [
+ "9d1bf1b6c7d3f3b714b72cb3371f35c222fe5a74",
+ "testharness"
+ ],
+ "html/interaction/focus/focus-02.html": [
+ "1858d6a21d2c97b2bd8706592c08fad748a37330",
+ "testharness"
+ ],
+ "html/interaction/focus/focus-management/focus-event-targets-simple.html": [
+ "ab7bcfe6d0e636552746def160715bc47e63fb85",
+ "testharness"
+ ],
+ "html/interaction/focus/focus-management/focus-events.html": [
+ "d63362aaa1828f35de410b56c1ccc2d7869a111e",
+ "testharness"
+ ],
+ "html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html": [
+ "d8171abc715990a9e752c2d974acdfd7ecd34fc2",
+ "testharness"
+ ],
+ "html/interaction/focus/processing-model/legend-focusable.html": [
+ "c9209d3cf62d467ad1eb7a13c51fa45d55c19fb3",
+ "testharness"
+ ],
+ "html/interaction/focus/processing-model/legend.html": [
+ "b53839374dfd17a4121124f54b6ae9f840808530",
+ "testharness"
+ ],
+ "html/interaction/focus/processing-model/preventScroll.html": [
+ "97d341b30ec849fefc13adb8b3376307fea58b69",
+ "testharness"
+ ],
+ "html/interaction/focus/processing-model/support/preventScroll-helper.html": [
+ "43c6d86a578bedaaf52027d9131bee82bf16fe42",
+ "support"
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html": [
+ "25e359c2a25826aae29f88c834d2965e6ae81516",
+ "testharness"
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html": [
+ "92bf1743142a906fe1d8092527517cd238e02c2e",
+ "testharness"
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html": [
+ "45429cc1a72c65198c46d400d68be6636b5e36a4",
+ "testharness"
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html": [
+ "9a131847703970aff25163a8c78c39e5d1a3a1a3",
+ "testharness"
+ ],
+ "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html": [
+ "c46acd0a41358e4a0b61e3abde4bb9b39ab6a422",
+ "testharness"
+ ],
+ "html/interaction/focus/tabindex-focus-flag.html": [
+ "e40bc077594351019591de8cbfae8fb0d6af13fe",
+ "testharness"
+ ],
"html/obsolete/META.yml": [
"c1dd8dddf9eec3ab3fb58df01c549c251f3a3fdf",
"support"
@@ -596573,126 +603890,206 @@
"59c5ca70d41cc969aed7ac6a531c1ca9a5f82f0f",
"reftest"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-block-formatting-context.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/META.yml": [
+ "f5b533c377160c77541187a301647e174069bd6d",
+ "support"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html": [
"c38944ae795807628ce1c5cd114e5832263b2ff2",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap-ref.html": [
"95e2347121e26ec7cc7d080caf9db6ff253231c6",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html": [
"4d2269632c0eeeaf057b2008351ae98d4ddbdbca",
"reftest"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html": [
+ "9ab10159d8c0b3e23d73c5094961873dd837df7d",
+ "testharness"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block-ref.html": [
"ccb755b347cbf926163e7dfaaa37c590942ca6c9",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html": [
"e7529946a49c0da964dae79831047e4a0507f119",
"reftest"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html": [
+ "4abd9ce533d7740e906a83a0e8cbc67c8613bf52",
+ "testharness"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html": [
"f07c84f406cefc7054e8a13c2796d3d82673bdf7",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-display.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html": [
"953328982032dae2d508619b90188534179a26a8",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-div-display-contents.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-div-display-contents.html": [
"5d17b91290f41db86147dcd80385aecbf19c14c7",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-flexbox.html": [
- "d2b1d30d8cc828496fa76cc887e01149f2a44809",
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html": [
+ "07c73554e59ccb576e590192e923de6b7100e1ae",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-foo-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-foo-ref.html": [
"cace814a8ce9f51ee4eaa1626b6e5377f528f22a",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-grid.html": [
- "7e9cf3643d00c59caa5bb37682a2fc8fa9ddee89",
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html": [
+ "bbb71dfa7027aad90392ec39112eafe1dc9abf65",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-multicol.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item-ref.html": [
+ "05b8ca4770b18a91aaf2d9f3038d6fe4162f289f",
+ "support"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html": [
+ "7726947beca45ef3207a12fa63c63241f8183138",
+ "reftest"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-multicol.html": [
"bdb2c2fd94686b502ed5a663b1026180283af22f",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden-ref.html": [
"9fe632f7c209c42d9f24358ad6a2a56abddf97a3",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html": [
"cacbdbae00d0f7d6067323c68fc460149c524f35",
"reftest"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-ref.html": [
+ "d9b36e530b4f95bdfc636050905e6bfd5d8af690",
+ "support"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html": [
+ "2599f2f0fa201c94234d172d06700c1a8ec19a65",
+ "reftest"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order-ref.html": [
"13b262a804ab781905b3e4d3483554d9dd95b4d8",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html": [
"7bd2cedb1b6771398c808d1b7c8f68840bfb9b6f",
"reftest"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-shadow-dom.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-shadow-dom.html": [
"3b46eb03c6c41bc616ebcc85bc6d635496e5eeed",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez-ref.html": [
- "c0db2d7c71aaf07bfc91577c94b0cc4fb8352054",
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez-ref.html": [
+ "8200e671944bc74644b1d9d540f9ce7496f86a63",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html": [
"df30468b0041323667946739369ec7d42bf47742",
"reftest"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical-ref.html": [
+ "29c28ea5f89f49cbf8d35961cd29580a0bd42256",
+ "support"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html": [
+ "c11b466669665a29fc4f33b4bbc14c6b5598d545",
+ "reftest"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html": [
+ "01483bf8ad3cee01272ba36bc0ffaf73c1b12cad",
+ "testharness"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align.html": [
+ "e7745998194730d11840664b61afc6efe0c8039d",
+ "testharness"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins-ref.html": [
+ "8b1258727fce344978609a1b033389edce7b20be",
+ "support"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html": [
+ "dd1964ba25133850b764c29037fb1113a7c6736f",
+ "reftest"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html": [
"4e9539179739a3690aab276f2ba98c25bd4dfe9b",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-display.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering-ref.html": [
+ "e6eff47e53c7a40e973b7f9dc298af2343f59941",
+ "support"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering.html": [
+ "abf3c45df71ee6617ddb8b6d402a103f54624820",
+ "reftest"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none.html": [
+ "689454ac493a05b28658edf549d71c6aa1c7be0e",
+ "testharness"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html": [
"914547fc6cdde3e464b28eb7cc9737d17305f9af",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-abspos.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-dynamic-update.html": [
+ "5dc68244fe0f896388ce7a0ff9d8f49397395078",
+ "support"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html": [
"7979e1d03ece2575ef9ec7a2a8cba96df3705d78",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-ref.html": [
"c51bca231e158db109774b6ca70cdedb9d099b3a",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float.html": [
"f70e952ed06c7bf07eaaaaccea251d3e54267ec3",
"reftest"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-grid-flex-multicol.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html": [
"edd2600d4a0749d281e7ed1b4da4aefbd7c686ba",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative-ref.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item-ref.html": [
+ "ee76e93b64e1da9ab5883c328d9fff1eb865acb1",
+ "support"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html": [
+ "c26b50ce662cbea50a69e8e718b9b2b889568f64",
+ "reftest"
+ ],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-ref.html": [
"fd6c11a00566759fbf1e749d49ad396cf1a7ee08",
"support"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative.html": [
- "efd55ab22db75f8195a8d15161995311abf5b735",
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html": [
+ "993836126143a8921e31bc8e61bef955eb302503",
"reftest"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend-sans-fieldset-display.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html": [
"5f27ca5c299de72c6e8aab9275fcf70b3c4246a3",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html": [
"1cda91f32baf119b8dd827275a3ba8b10c484084",
"testharness"
],
- "html/rendering/non-replaced-elements/the-fieldset-element-0/min-inline-size.html": [
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html": [
"92c33029701b41678f4f514d28c6260338bd8e77",
"testharness"
],
+ "html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/resources/fieldset-vertical.css": [
+ "b358d925a76fb571eda42292e2abbf7c1c75062f",
+ "support"
+ ],
"html/rendering/non-replaced-elements/the-hr-element-0/align-ref.html": [
"9e4283e208e17e4f2cfed05882bb1aff276028ad",
"support"
@@ -597033,6 +604430,14 @@
"3dd95e311aed7fc642e9370dad7cfee5a1eeac1c",
"reftest"
],
+ "html/rendering/the-details-element/details-display-property-is-ignored-ref.html": [
+ "6ebed6075de1e8cf62db7bee756b05d3e425e0ab",
+ "support"
+ ],
+ "html/rendering/the-details-element/details-display-property-is-ignored.html": [
+ "445b4e483d00c8aabfa76a946d8cb0871e479c7d",
+ "reftest"
+ ],
"html/rendering/the-details-element/single-summary.html": [
"1f09e7e75f9126982a07902ae0693f9ea2fd5823",
"support"
@@ -597413,6 +604818,34 @@
"257bd46289d7b62869bd2b1f31206d81b98d97c2",
"manual"
],
+ "html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
+ "6f11f8995b1e5c1cebd123219f9c8d34d4b108a5",
+ "testharness"
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute.https.sub.html": [
+ "59b33d7c4d2bd2c712c73ad7ff4e7c1003c244a2",
+ "testharness"
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html": [
+ "63479c0cb6f8c6c8241cc5c4a33e167b13a3888b",
+ "testharness"
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html.headers": [
+ "08461fadc2888cbcdfcda533f2928f14a52ab44e",
+ "support"
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-default-feature-policy.https.sub.html": [
+ "763073e437d009b99a1d372c19bc1907f97e6776",
+ "testharness"
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html": [
+ "3dd3afbf771d5384b02bad0701aaae9224fb6399",
+ "testharness"
+ ],
+ "html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html.headers": [
+ "69ce436270a8715da3e7e4cea125824c2bbf57dc",
+ "support"
+ ],
"html/semantics/embedded-content/media-elements/autoplay-with-broken-track.html": [
"f687edf198dbb65064d90d4c3fc8baf4d684cde7",
"testharness"
@@ -600242,7 +607675,7 @@
"support"
],
"html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html": [
- "21624712cf919d9163d399807d37a1b0b4b0e3ac",
+ "f6ae65708c661c5ff1a957c3a8606d75a44827fb",
"testharness"
],
"html/semantics/embedded-content/the-img-element/image-1.jpg": [
@@ -600254,7 +607687,7 @@
"support"
],
"html/semantics/embedded-content/the-img-element/img.complete.html": [
- "771b8e1b80e6ad41b5cf703b5a1e99bd23b35416",
+ "4be8d4db848ad259a508e1a8091feaae7733e784",
"testharness"
],
"html/semantics/embedded-content/the-img-element/invalid-src.html": [
@@ -601661,10 +609094,46 @@
"c1dd8dddf9eec3ab3fb58df01c549c251f3a3fdf",
"support"
],
+ "html/semantics/interactive-elements/commands/common/accesskey.js": [
+ "f08761be8c1fc618e42369a3358c0dbf8a848bea",
+ "support"
+ ],
"html/semantics/interactive-elements/commands/contains.json": [
"b2ca2e771bd9f7c82c2e955a88ac6fc6010c48a7",
"support"
],
+ "html/semantics/interactive-elements/commands/legend/first-input-after-legend-manual.html": [
+ "521b4bb975530880caac863d96b167cd08abc7a0",
+ "manual"
+ ],
+ "html/semantics/interactive-elements/commands/legend/first-input-before-legend-manual.html": [
+ "1c40cc7b81e9a866df97f7d386c688de8f1b3bc7",
+ "manual"
+ ],
+ "html/semantics/interactive-elements/commands/legend/first-input-inside-legend-manual.html": [
+ "abd3a3b2dfe36cab4b267273b6616d60eab07046",
+ "manual"
+ ],
+ "html/semantics/interactive-elements/commands/legend/focusable-legend-manual.html": [
+ "e2880a77bf9592776ce58bb0fbbfcd1df2581b5a",
+ "manual"
+ ],
+ "html/semantics/interactive-elements/commands/legend/focusable-legend-sibling-manual.html": [
+ "49dcaaf7d54e15ee6e2d6e893e5f4be55d4d96e5",
+ "manual"
+ ],
+ "html/semantics/interactive-elements/commands/legend/input-outside-fieldset-manual.html": [
+ "dc6af48323e49c85b9f09d335f9d8dd19979d17c",
+ "manual"
+ ],
+ "html/semantics/interactive-elements/commands/legend/label-sibling-manual.html": [
+ "8a7b20565f77e3e55600b698ef0780d762fa7ebb",
+ "manual"
+ ],
+ "html/semantics/interactive-elements/commands/legend/no-fieldset-parent-manual.html": [
+ "e7abb71454a43ce226b2cc5da496889635b33ab8",
+ "manual"
+ ],
"html/semantics/interactive-elements/contextmenu-historical.html": [
"f723d3a92aab226fd82295a81209c3e25882bcb1",
"testharness"
@@ -602605,20 +610074,32 @@
"ca7fdba71f164c0a1e7c195675497b02f2e0a0a5",
"support"
],
+ "html/semantics/scripting-1/the-script-element/goal-parameter.htm": [
+ "fe4d6759b91b09da5a6c7bb0b53095315d10d4a9",
+ "testharness"
+ ],
"html/semantics/scripting-1/the-script-element/historical.html": [
"1f1a91228c2174773243163e5b588e56c2c74fc1",
"testharness"
],
+ "html/semantics/scripting-1/the-script-element/is-module-goal.mjs": [
+ "b533fc2e906b4b9a0a912044b19ee523ae5eef7a",
+ "support"
+ ],
+ "html/semantics/scripting-1/the-script-element/is-script-goal.js": [
+ "069363dd400da159b74847a3ea4299292a92d4f5",
+ "support"
+ ],
"html/semantics/scripting-1/the-script-element/load-error-events-1.html": [
"45571550e1cc29bfaa218ad06f7c7b20b903a53b",
"testharness"
],
"html/semantics/scripting-1/the-script-element/load-error-events-2.html": [
- "cefa053e754335e4a84424422a8bfaa9bc72ba75",
+ "0748b459092089e12743df4ccb458c6edf770515",
"testharness"
],
"html/semantics/scripting-1/the-script-element/load-error-events-3.html": [
- "c2cf0dbdd988507047184bff3489caeb167f6c88",
+ "83a752ce2cd860ffb4354a540e5b553d720eb4e9",
"testharness"
],
"html/semantics/scripting-1/the-script-element/log.py": [
@@ -603485,10 +610966,6 @@
"a6095097dd7e17b1e5370b739b31d361f8fdaf7b",
"support"
],
- "html/semantics/scripting-1/the-script-element/resources/slow.py": [
- "f3b1c7e2ea61b571bd56cc1c70c5f89bb8e7e4dc",
- "support"
- ],
"html/semantics/scripting-1/the-script-element/script-charset-01.html": [
"c5ac0d0a62a048a55d091935cb6ea733e52a5b82",
"testharness"
@@ -603566,7 +611043,7 @@
"testharness"
],
"html/semantics/scripting-1/the-script-element/script-text-modifications.html": [
- "7278182e171947bbb546e655de84815ff6cacd83",
+ "0066d3f4260d92b0f541624062269d13fdbd763d",
"testharness"
],
"html/semantics/scripting-1/the-script-element/script-text-xhtml.xhtml": [
@@ -605369,18 +612846,6 @@
"1dcb92615d085b28d3c9d2a22d744be849158d18",
"testharness"
],
- "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-1.html": [
- "317e13691d4a94e5861bbb85d7367591d7d1c624",
- "support"
- ],
- "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-2.html": [
- "ea537fcd6018fab07cb58132a2523d82cb8783de",
- "support"
- ],
- "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010.html": [
- "d83d24f2414b7f08229662694a7fd475560e2858",
- "testharness"
- ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/011-1.html": [
"37973fd52ec8c3b8091683e4726058ad2513c053",
"support"
@@ -605422,17 +612887,41 @@
"testharness"
],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016-1.html": [
- "12990a560703a5fec869674b4a12027cb07292cc",
+ "ceeeb64df63ccb6d56cd46a93c6ec6c476573a6b",
"support"
],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016.html": [
"1c70fce591a38dd7917e1fffbd1d9ebab46e8b7f",
"testharness"
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js": [
+ "8d045b9e0ab56874c5eb32367ed56274e0e94a22",
+ "testharness"
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js": [
+ "8c6c1267c4e899a78bd3ad0e67fd8491fd139606",
+ "testharness"
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js": [
+ "2895f959e55dc3cf2fdfc933c751699b09438b50",
+ "testharness"
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js": [
+ "e3efeffb8b3af56d365336dba357e0d76f7295aa",
+ "testharness"
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js": [
+ "b2f05cf056d54a0602a55a8dda7c67cb94883055",
+ "testharness"
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window.js": [
"1d94de8a7c9f28dfab32111deb664d9921437e46",
"testharness"
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js": [
+ "f96710999adedff334a656cacdde0fa8d561fd0c",
+ "testharness"
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-origin.sub.window.js": [
"0e1c54b683257aea8fd58c893957acd794cc1ab1",
"testharness"
@@ -605486,13 +612975,17 @@
"testharness"
],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js": [
- "58ec08f9ff110a458f02660ba18e97513f569173",
+ "df07124d811135cafcfa9908ece9410f19ccdefa",
"testharness"
],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/history-state.window.js": [
"7fb172a141cf93330d6ec718d200e5845cd32f39",
"testharness"
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/history.window.js": [
+ "0134da24f07bb4d653703d2d3d0c3575a32e8f34",
+ "testharness"
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js": [
"43506a22a46da53885a2b5a0888095bc52b460ca",
"testharness"
@@ -605501,6 +612994,10 @@
"4efbb863c6372a3ee04d11f38d7ee56a44a2ac7d",
"testharness"
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/mutation-observer.window.js": [
+ "34e73146a9d8e4ecab1e74a0079cd721e7306e59",
+ "testharness"
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js": [
"d4a9296fca66d3017c267a8d8951bef2dcbee238",
"testharness"
@@ -605513,8 +613010,16 @@
"5e5ca80781809cc509a8eade7ea91e74de92f9a8",
"testharness"
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js": [
+ "0ff0bb99443677b8f8844c8ecedef22c408f2bac",
+ "testharness"
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js": [
+ "729a958700bb8d5e5f9d8717287ea114badbb662",
+ "testharness"
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/reload.window.js": [
- "d6ff9dc7a45425cb688ed4b6c9ea2ab5c1c3ae5c",
+ "279020f64da8421e118a447bae1373da2e98d9c1",
"testharness"
],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/aborted-parser-async-frame.html": [
@@ -605561,10 +613066,34 @@
"0fe189914c3727f8071c4eaaa6cc740aeb7aab93",
"support"
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/history-frame.html": [
+ "2404105b09a7724cf8cc5e2cf6d7bf7a8fb6f39b",
+ "support"
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/http-refresh.py": [
+ "d2acd4361f92fe286ab13688a9174ce7c5465755",
+ "support"
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/meta-refresh.py": [
+ "dd3cef44b44252beb3c7729271c51490a475a660",
+ "support"
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/page-with-frame.html": [
+ "a1ab01e072b038cd0ec46a8497650845aca83062",
+ "support"
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/set-document-domain.html": [
"a92a7ae39f8351f97cd865dca5ebe8d4260aa229",
"support"
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py": [
+ "5fa2fd9a9d850a8a0708985034b89aecf4a51654",
+ "support"
+ ],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/url-frame.html": [
+ "be483ff0aea456c3bc7f2e62d863e7f981453203",
+ "support"
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/tasks.window.js": [
"1588f2f889227f68acba9fb1f02494ba0f80a4bd",
"testharness"
@@ -605585,8 +613114,12 @@
"e275a4987a0859b160a0f91de6c8896b90bdab31",
"testharness"
],
+ "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js": [
+ "0c528935b52db9f2bc85cdd52659c300bfda5f5a",
+ "testharness"
+ ],
"html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js": [
- "282e58e9c380fc214365522163c8bc09a67afc3b",
+ "4e7c649f4533958112e6bd1dd59537619d7cc62d",
"testharness"
],
"html/webappapis/microtask-queuing/queue-microtask-exceptions.any.js": [
@@ -606329,8 +613862,36 @@
"2bb82c9834790bfeb1a65cf2ef202dc63d2ebac4",
"support"
],
+ "inert/inert-does-not-match-disabled-selector.tentative.html": [
+ "74b8ac3f7dd5c3447bf47fd732fade9220497c93",
+ "testharness"
+ ],
+ "inert/inert-in-shadow-dom.tentative.html": [
+ "36c962b1fc7d50cb6cb46e7d79d9435323e64ad9",
+ "testharness"
+ ],
+ "inert/inert-inlines.tentative.html": [
+ "b056c6495d2c54733bee6ab796332ba89f01b379",
+ "testharness"
+ ],
+ "inert/inert-label-focus.tentative.html": [
+ "8bbe1eca15c7d8f2f9fd5ea48c33cd0a5d5098e0",
+ "testharness"
+ ],
+ "inert/inert-node-is-uneditable.tentative.html": [
+ "b18d9912eb2d06cd072b79aa6f94002a3c209d1a",
+ "testharness"
+ ],
+ "inert/inert-node-is-unfocusable.tentative.html": [
+ "8b5de37fdcadedb9d98ec44c9c3c20aea52a0400",
+ "testharness"
+ ],
+ "inert/inert-node-is-unselectable.tentative.html": [
+ "7d5e90821bb0bd0d83711685853c78ff9fee6c4f",
+ "testharness"
+ ],
"infrastructure/META.yml": [
- "59b44af3351e0610586709c033b15f15e1c46857",
+ "c1d3b0c9ec4c3f6458597d8596cc3213866598df",
"support"
],
"infrastructure/README.md": [
@@ -606485,6 +614046,18 @@
"04fb9aa15176e6191ded5eccf442fcfd6cdcf566",
"reftest_node"
],
+ "infrastructure/reftest/reftest_and_mismatch.html": [
+ "b6b4847473dd548209de63e6f1f24a213411caf6",
+ "reftest"
+ ],
+ "infrastructure/reftest/reftest_and_mismatch_0.html": [
+ "f84ce6a13aa3dc9909405bb01eaccd820523f0ab",
+ "reftest_node"
+ ],
+ "infrastructure/reftest/reftest_and_mismatch_1.html": [
+ "05e905adafc06405b4f824ae720305735277790d",
+ "support"
+ ],
"infrastructure/reftest/reftest_cycle.html": [
"4a84a3b6741ee41fe6187a9bdc766d749206c83a",
"reftest_node"
@@ -606605,8 +614178,8 @@
"f7b8c74fa40203b5778f23cfde71f74a435e308d",
"support"
],
- "input-device-capabilities/interfaces.html": [
- "178ce5aa892bcd466b849b5a4f99e844314c69b1",
+ "input-device-capabilities/idlharness.window.js": [
+ "a57ae82993697695e4d05142c124ad36882becb1",
"testharness"
],
"input-events/META.yml": [
@@ -606710,7 +614283,7 @@
"support"
],
"interfaces/background-fetch.idl": [
- "6957604e7df5bed1c6ec0351ebe838d28773e3fe",
+ "130d5d825a5bef49fd651c0cb326b9b40a7fa2c7",
"support"
],
"interfaces/battery-status.idl": [
@@ -606734,7 +614307,7 @@
"support"
],
"interfaces/cookie-store.idl": [
- "454da38b18240e6e5e98a92cd2c9d129ee71d4a0",
+ "d872b7aadb25b4720e78d98f3bf04c0c15151084",
"support"
],
"interfaces/cors-rfc1918.idl": [
@@ -606802,7 +614375,7 @@
"support"
],
"interfaces/cssom-view.idl": [
- "0213a4090c717812b7e4a1c81b8558d3bebfd287",
+ "2b5b381dfa4af736d96a3c2e0bb0db372846f3dd",
"support"
],
"interfaces/cssom.idl": [
@@ -606818,7 +614391,7 @@
"support"
],
"interfaces/encoding.idl": [
- "7d55ce7e190a6944f0dbbf8194daee64224c8ec5",
+ "b805363c534feafcb606dd13701736f13497ef99",
"support"
],
"interfaces/encrypted-media.idl": [
@@ -606890,7 +614463,7 @@
"support"
],
"interfaces/intersection-observer.idl": [
- "b48e1cbab37fef9b9c8dd5efb03fc6c222a3e856",
+ "ffda8f5c64dba8d225cc7126371b73980f4ce48e",
"support"
],
"interfaces/keyboard-lock.idl": [
@@ -606970,7 +614543,7 @@
"support"
],
"interfaces/payment-handler.idl": [
- "9f10d7e70194cb83dc59055006d96426f5669536",
+ "b19a7302dbacaf8ef425e568d5d5409b4b2811d5",
"support"
],
"interfaces/payment-method-basic-card.idl": [
@@ -606978,7 +614551,7 @@
"support"
],
"interfaces/payment-request.idl": [
- "3717d79476dc406639a4b339c0ae75824b01560d",
+ "05790c7d76d6e5f36b47fbf23615822b4a68c18a",
"support"
],
"interfaces/performance-timeline.idl": [
@@ -607081,6 +614654,10 @@
"0bedbf89964f12b55feae4d5e4c9512f71a841cd",
"support"
],
+ "interfaces/trusted-types.tentative.idl": [
+ "a3a635b99270381643f16e13ff47facb85cbfb07",
+ "support"
+ ],
"interfaces/uievents.idl": [
"ba618d7c373bf80c108f4c02996ad0db454f1236",
"support"
@@ -607097,12 +614674,16 @@
"f4191d91d36fbed1544b49298a74105859073628",
"support"
],
+ "interfaces/wai-aria.idl": [
+ "c6ea9591f8d7fb5b0a1651a6d1d5c8c6cab7b0ae",
+ "support"
+ ],
"interfaces/wake-lock.idl": [
"ac8b70c157a2b42876b55b8ab67873d4a483c54d",
"support"
],
"interfaces/wasm-js-api.idl": [
- "04c817dcb11ad906d61c5576e43df1fcdf168860",
+ "6de14fb8f0895a72b69f37b9dd8b72e2ab1604e0",
"support"
],
"interfaces/web-animations.idl": [
@@ -607145,6 +614726,10 @@
"769433b19b31e5c534f19d82810635e2e22d38e9",
"support"
],
+ "interfaces/webrtc-dscp.idl": [
+ "718447bbf4a3ed92ac853ba2075a24ba41d3049d",
+ "support"
+ ],
"interfaces/webrtc-stats.idl": [
"ee5cce403f8d325b73661f45b65bd09f5faae861",
"support"
@@ -607162,7 +614747,7 @@
"support"
],
"interfaces/webxr.idl": [
- "00839eed1a2ab59842acd8ce5c873b8a57a765cd",
+ "ffa9ed4e91abde01ef1b442d2e8c5daa8a40305d",
"support"
],
"interfaces/worklets.idl": [
@@ -607470,7 +615055,7 @@
"support"
],
"lint.whitelist": [
- "5e4d06c4a6bf96314738929f2d78d34f20a3af1a",
+ "7d579b6b343a23e6c039f309f362354c5aa5ba62",
"support"
],
"longtask-timing/META.yml": [
@@ -608681,14 +616266,90 @@
"c58e63ff12acefc73fc3cfa2f35836778696c827",
"testharness"
],
+ "mediacapture-image/ImageCapture-MediaTrackSupportedConstraints.html": [
+ "59a54f51d600fa5c8ee1c092afa5a07f6ae2ae3f",
+ "testharness"
+ ],
+ "mediacapture-image/ImageCapture-creation.https.html": [
+ "9e8b5feeeb5cdf5686c36e3972fc9a1a8961de95",
+ "testharness"
+ ],
+ "mediacapture-image/ImageCapture-grabFrame.html": [
+ "bf5e9400a038f2432ce1bee3a3b345f3c82e5ea5",
+ "testharness"
+ ],
"mediacapture-image/META.yml": [
"1b4fef5e5a19ed3d7e61320bfa752a19da1f595a",
"support"
],
+ "mediacapture-image/MediaStreamTrack-applyConstraints-fast.html": [
+ "75ed17a9e3302b0cb2b388846ad73d55c6d9c166",
+ "testharness"
+ ],
+ "mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.html": [
+ "1a1b58e5415f9e04ddeb8d1874448c3b98af35e3",
+ "testharness"
+ ],
+ "mediacapture-image/MediaStreamTrack-applyConstraints-reject.html": [
+ "8f08d250fd1a569d84ecd4ce36fe5ffa29f583f7",
+ "testharness"
+ ],
+ "mediacapture-image/MediaStreamTrack-applyConstraints.html": [
+ "8dcff926173266c9e5f14c37ff408832a8a07d7e",
+ "testharness"
+ ],
+ "mediacapture-image/MediaStreamTrack-getCapabilities-fast.html": [
+ "55272d1499517a6fda0b7e06068928b4e1127b27",
+ "testharness"
+ ],
+ "mediacapture-image/MediaStreamTrack-getCapabilities.html": [
+ "eceaf5b1a8665211e42094730619d38143782fdc",
+ "testharness"
+ ],
+ "mediacapture-image/MediaStreamTrack-getConstraints-fast.html": [
+ "5a5ce5f2dad58cb47e8b4215bc563e24b34b3119",
+ "testharness"
+ ],
+ "mediacapture-image/MediaStreamTrack-getSettings-fast.html": [
+ "a4ecbe61181640f7f993f7f5c9cd3fd4e992f72c",
+ "testharness"
+ ],
+ "mediacapture-image/MediaStreamTrack-getSettings.html": [
+ "5e9256eeb740663675ea93d692481556efd97628",
+ "testharness"
+ ],
+ "mediacapture-image/detached-HTMLCanvasElement.html": [
+ "e27950fc5edfea8357344f91198f0105775fef2c",
+ "testharness"
+ ],
+ "mediacapture-image/getPhotoCapabilities.html": [
+ "83329fcac4ad37bea6dd13930103c2fd689a77fd",
+ "testharness"
+ ],
+ "mediacapture-image/getPhotoSettings.html": [
+ "6a6184f17cb2f92c01d7bf784047ae17b1e8be66",
+ "testharness"
+ ],
"mediacapture-image/idlharness.window.js": [
"9d8f7eefb84dcc16534f1311c3b3c3d68e84572d",
"testharness"
],
+ "mediacapture-image/resources/imagecapture-helpers.js": [
+ "6d5ffa1695d807a05edeb75a21d472856bdda252",
+ "support"
+ ],
+ "mediacapture-image/setOptions-reject.html": [
+ "4deee97d7bc77859602aa25d51e547bd0290409b",
+ "testharness"
+ ],
+ "mediacapture-image/takePhoto-with-PhotoSettings.html": [
+ "58708612456fc669c5a445b76ad110fcbb0bb27d",
+ "testharness"
+ ],
+ "mediacapture-image/takePhoto.html": [
+ "49926db1cde6ee6b3e703e920e0812232eac0835",
+ "testharness"
+ ],
"mediacapture-record/BlobEvent-constructor.html": [
"3bcf4296e68aea1a7b167e570c0dcec148cc95e4",
"testharness"
@@ -608762,7 +616423,7 @@
"testharness"
],
"mediacapture-streams/MediaStream-default-feature-policy.https.html": [
- "f0f07da21228e7f8d752257e08eb6e22f084c7a5",
+ "0b45ac6f594a695b28545ee3a99c0c6a7f8bbc12",
"testharness"
],
"mediacapture-streams/MediaStream-finished-add.https.html": [
@@ -610666,7 +618327,7 @@
"support"
],
"network-error-logging/support/lock.py": [
- "8c88250bde00b4a62cc99131fdaa09e97f716369",
+ "d87b3aef0fb09a1063eb55b6f391f965833ac5a6",
"support"
],
"network-error-logging/support/nel.sub.js": [
@@ -617634,9 +625295,21 @@
"support"
],
"payment-request/META.yml": [
- "74a165b1392d256d2006ae2680f12e34c0c4bdff",
+ "f8460d403ffa42d9dfc1bae6e0c3e500f7742fc9",
"support"
],
+ "payment-request/MerchantValidationEvent/complete-method-manual.https.html": [
+ "99a10e9dc79bd957a030f26c114f3ee51bb190d8",
+ "manual"
+ ],
+ "payment-request/MerchantValidationEvent/constructor.http.html": [
+ "8368c79a3b1dea2df26bbc804208002ec97fbf09",
+ "testharness"
+ ],
+ "payment-request/MerchantValidationEvent/constructor.https.html": [
+ "952c0f734a30f170964053bb00e55225d57cce0b",
+ "testharness"
+ ],
"payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html": [
"65d56e7490111f6fc9e91f4470379fc89ae42972",
"manual"
@@ -617722,11 +625395,11 @@
"testharness"
],
"payment-request/allowpaymentrequest/common.sub.js": [
- "85a08461fcb0197ed2259d77035e696c1c69d6d8",
+ "a94bac064c9432980d437a98b72d4843f1b40bbe",
"support"
],
"payment-request/allowpaymentrequest/echo-PaymentRequest.html": [
- "f18b16ee31bf7e3eb868d073ab5e0fb0061bbd88",
+ "5211c7e5ce78c0621036578fef79aeb2c98f2a27",
"support"
],
"payment-request/allowpaymentrequest/no-attribute-cross-origin-bc-containers.https.html": [
@@ -617762,7 +625435,11 @@
"testharness"
],
"payment-request/idlharness.https.window.js": [
- "9a068c6d27f86a63d160b47b09a2116d5479ac72",
+ "53ae47e892104a08e3de4f4483b7442dec2e7043",
+ "testharness"
+ ],
+ "payment-request/onmerchantvalidation-attribute.https.html": [
+ "c0ed23167ed9378ec32e769bd4f3e3afaef5040c",
"testharness"
],
"payment-request/onpaymentmenthodchange-attribute.https.html": [
@@ -617846,7 +625523,7 @@
"testharness"
],
"payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html": [
- "9f92d284063fcec7c0ffefb09a076a285cd4b766",
+ "c8dd92636c6392b2436c8235340355c4529e12c1",
"testharness"
],
"payment-request/payment-response/payerEmail-attribute-manual.https.html": [
@@ -618085,6 +625762,10 @@
"43d0aa5d38b2ac65b5100c9ba8fa2b794ffd03ee",
"testharness"
],
+ "pointerevents/extension/pointerevent_pointerrawmove-manual.html": [
+ "0c4ccf9ad48d49c62b3d138845dfa3ac631a8e4e",
+ "manual"
+ ],
"pointerevents/extension/pointerevent_touch-action-pan-down-css_touch-manual.html": [
"592139f9f41abb2a3fe6bf1b99af87d1c5e651f3",
"manual"
@@ -618562,7 +626243,7 @@
"testharness"
],
"preload/preload-strict-dynamic.html": [
- "5e473a1c89448c046bef9a4fa5b09daa55c1d748",
+ "76395656f9b359e05ae1aeace5ad05a6f338cb5e",
"testharness"
],
"preload/preload-with-type.html": [
@@ -619037,8 +626718,12 @@
"6b1c8a72751a6233eb0a07a8bb7df5e116fac724",
"reftest"
],
- "quirks/unitless-length/excluded-properties.html": [
- "a1de182770aafaab2ee4a8a335b34870388abacc",
+ "quirks/unitless-length/excluded-properties-001.html": [
+ "2e33cec0b33644576fb81e6fd9dbaf42bb02cf92",
+ "testharness"
+ ],
+ "quirks/unitless-length/excluded-properties-002.html": [
+ "5f98bc283ebc2b5d719815c59c3d1cd53acd2ed9",
"testharness"
],
"quirks/unitless-length/limited-quirks.html": [
@@ -627438,13 +635123,25 @@
"support"
],
"resources/chromium/generic_sensor_mocks.js": [
- "24a469199ff1e4eae40d693feff4eb220e80b2cf",
+ "d9a23f447140047a1343f855dfdf5a773ce1b269",
"support"
],
"resources/chromium/generic_sensor_mocks.js.headers": [
"6805c323df5a975231648b830e33ce183c3cbbd3",
"support"
],
+ "resources/chromium/image_capture-mojom.js.headers": [
+ "6c61a34a4ec2e75096db0eb9f7748b142f0db7bb",
+ "support"
+ ],
+ "resources/chromium/image_capture.mojom.js": [
+ "11123feb87d06d53f8e933aa18fad118ae6c8737",
+ "support"
+ ],
+ "resources/chromium/mock-imagecapture.js": [
+ "878f59eb0095b65cabffe95c5538bcb79fa97b0d",
+ "support"
+ ],
"resources/chromium/mojo_bindings.js": [
"67d6a8828551c1f703ef29831592f2e4d8a42485",
"support"
@@ -627462,7 +635159,7 @@
"support"
],
"resources/chromium/sensor.mojom.js": [
- "daa99217335fc4dec9c28119935acc28afe58dd8",
+ "ffbd25b57df58e69476edcce2561e25dde424d5c",
"support"
],
"resources/chromium/sensor_provider.mojom.js": [
@@ -627501,8 +635198,16 @@
"6805c323df5a975231648b830e33ce183c3cbbd3",
"support"
],
+ "resources/chromium/webusb-child-test.js": [
+ "add04fa58250d58d56759d242663a6510d306090",
+ "support"
+ ],
+ "resources/chromium/webusb-child-test.js.headers": [
+ "6805c323df5a975231648b830e33ce183c3cbbd3",
+ "support"
+ ],
"resources/chromium/webusb-test.js": [
- "9037a109c91610957091f73752074faa031e497b",
+ "5f9262655f3fca5ac225e2788723cc4cd05ca916",
"support"
],
"resources/chromium/webusb-test.js.headers": [
@@ -627518,7 +635223,7 @@
"support"
],
"resources/idlharness.js": [
- "368c96d70cff25f305e891d3d8e19b34c935c441",
+ "746f3e65503fe8587e6f7d01e593cbdccd7ab425",
"support"
],
"resources/idlharness.js.headers": [
@@ -627674,7 +635379,7 @@
"support"
],
"resources/test/tests/functional/promise.html": [
- "bdf6dc3ec2af07a9799243cbc7b15da939961363",
+ "9db1dec0f9e3e973e57d08f2ebed256b82bbd0ab",
"support"
],
"resources/test/tests/functional/queue.html": [
@@ -627830,7 +635535,7 @@
"support"
],
"resources/testharness.js": [
- "f0c24635017dad6275c99dc149ab1739470eeb36",
+ "85e211ff60ae559d7ff39994c33a2f05056e1ef2",
"support"
],
"resources/testharness.js.headers": [
@@ -628678,7 +636383,7 @@
"support"
],
"screen-capture/getdisplaymedia.https.html": [
- "3a0444733b51bca1df22d67cd962ea350a8006ce",
+ "9b66419cb0a1eb149294419ddd3549e4ba032de5",
"testharness"
],
"screen-capture/idlharness.window.js": [
@@ -630298,7 +638003,7 @@
"testharness"
],
"service-workers/service-worker/fetch-event-referrer-policy.https.html": [
- "9b67faccac8baff81bbffd95e3c335d02ccdf216",
+ "73ae123ae4e73b46cd63b3bb199b3d8758264fc5",
"testharness"
],
"service-workers/service-worker/fetch-event-respond-with-argument.https.html": [
@@ -630642,7 +638347,7 @@
"testharness"
],
"service-workers/service-worker/navigation-redirect.https.html": [
- "ed300faf8e6d0c65cada04a019328d1cf08e194d",
+ "0490f2b4058ce808115442b09859fe7a350b2303",
"testharness"
],
"service-workers/service-worker/navigation-timing.https.html": [
@@ -630690,7 +638395,7 @@
"testharness"
],
"service-workers/service-worker/redirected-response.https.html": [
- "f7370e023b1ab4454b839bc6daa432cf539e1d7f",
+ "05a94e2fd1dd13bc49dd34c00e0c1e5c110723a5",
"testharness"
],
"service-workers/service-worker/referer.https.html": [
@@ -631438,7 +639143,7 @@
"support"
],
"service-workers/service-worker/resources/navigation-redirect-other-origin.html": [
- "a9483c6534579ac2f3549d79c7488feef11a5c69",
+ "0d2825f31093f8959b45712eff247a0a21c7c8cd",
"support"
],
"service-workers/service-worker/resources/navigation-redirect-out-scope.py": [
@@ -631590,7 +639295,7 @@
"support"
],
"service-workers/service-worker/resources/redirect-worker.js": [
- "7e5ead19419e2c9bdf6bf223ec84e692e57c8fe2",
+ "5258c5e7be4578a4c783ccc659976acd399c6bf3",
"support"
],
"service-workers/service-worker/resources/redirect.py": [
@@ -631821,10 +639526,6 @@
"8aaa5ca934457714ee0e529ad4b2b1740d9758dd",
"support"
],
- "service-workers/service-worker/resources/update-top-level-worker.py": [
- "f77ef284ac0745bd6d31e642742438766f14e32e",
- "support"
- ],
"service-workers/service-worker/resources/update-worker.py": [
"bc9b32ad3e68870d9f540524e70cd7947346e5c8",
"support"
@@ -632005,10 +639706,6 @@
"d8ed94f776650c8a40ba82df9ca5e909b460bb79",
"testharness"
],
- "service-workers/service-worker/update-top-level.https.html": [
- "e382028b44a9d19b26b3c15a3bba17fa6a0d9bcb",
- "testharness"
- ],
"service-workers/service-worker/update.https.html": [
"6717d4d7ac289c8a18b1500e21795fd16c5321e7",
"testharness"
@@ -632026,7 +639723,7 @@
"testharness"
],
"service-workers/service-worker/webvtt-cross-origin.https.html": [
- "637f494e4c1e69dac48535a14128b9bc0d5615b6",
+ "9394ff75c4a5f395d287ce7c57a13522efce9aee",
"testharness"
],
"service-workers/service-worker/windowclient-navigate.https.html": [
@@ -632286,7 +639983,7 @@
"testharness"
],
"shadow-dom/Extensions-to-Event-Interface.html": [
- "52cda0b6bb863cf5f09d9752874165656bfc3fe3",
+ "806d539cad45d55d635ee55637be2c8b5c014b55",
"testharness"
],
"shadow-dom/HTMLSlotElement-interface.html": [
@@ -632382,7 +640079,7 @@
"reftest"
],
"shadow-dom/leaktests/get-elements.html": [
- "2ce916a650ed3749e18b6fd1abe488a562b0faaf",
+ "40fa9b69314a9cd9f1eee777ce4120440d7801df",
"testharness"
],
"shadow-dom/leaktests/html-collection.html": [
@@ -632793,72 +640490,48 @@
"d95c3ce8cff5d5f5428ee14c555c556c68f7f2a4",
"support"
],
- "storage/estimate-indexeddb-worker.https.html": [
- "2366760bdbed833b382a1adad350771bf3da7bb7",
- "testharness"
- ],
- "storage/estimate-indexeddb.https.html": [
- "3f5e1589d346e075e93fb08f5edf1b64d23643ec",
+ "storage/estimate-indexeddb.https.any.js": [
+ "3e34ad19babf53da04974ceafe0fd4cb7be33621",
"testharness"
],
- "storage/estimate-parallel.https.html": [
- "571b08cd5e211424035ec4fd7632d07548e4261c",
+ "storage/estimate-parallel.https.any.js": [
+ "090f004b8514bc9c99e8f85f9e8f9073dff2a263",
"testharness"
],
"storage/idlharness.https.any.js": [
"0ce4d5a0c8fccf07f6908a7a9ac9ac5ab5df6624",
"testharness"
],
- "storage/opaque-origin.https.html": [
- "563f2fea3c51627d919451cde1664703e4e87fe4",
+ "storage/opaque-origin.https.window.js": [
+ "3e101dde6759b2b8c379d6adc95190742328630f",
+ "testharness"
+ ],
+ "storage/permission-query.https.any.js": [
+ "9984bdab793219bf8b77748304f539f027a1e84f",
"testharness"
],
"storage/persist-permission-manual.https.html": [
"aa49900d69562284e35d8d1a4c4d5946586464ac",
"manual"
],
- "storage/persisted-worker.https.html": [
- "21f5c8bd92d849851994267c3d3459237f4bfa5c",
- "testharness"
- ],
- "storage/persisted.https.html": [
- "a5a91ff0b2632d07d9b5ae681f1f9786afa686e6",
- "testharness"
- ],
- "storage/resources/storagemanager-persist-worker.js": [
- "1152e4ec7349b5cfccb2cad5d267c910c85632d2",
- "support"
- ],
- "storage/resources/storagemanager-persisted-worker.js": [
- "979c8be3cd39377df9ef4e4a42a8601612a471e3",
- "support"
- ],
- "storage/storage-estimate-indexeddb.js": [
- "5f7895350ef5235099d9d0fd343578b30b47883e",
- "support"
- ],
- "storage/storage-persisted.js": [
- "5bc86fea951973180570434b572604c0fcc2eb22",
- "support"
- ],
- "storage/storagemanager-estimate.https.html": [
- "08a699adfb001a7cfded79f462d2f0261c2f5149",
+ "storage/persisted.https.any.js": [
+ "57e15f0e811de3e94652b2f16c5482a94be63c24",
"testharness"
],
- "storage/storagemanager-persist-worker.https.html": [
- "9c89a2f6712575001da0a4758d25ca6716bae3ae",
+ "storage/storagemanager-estimate.https.any.js": [
+ "d1d2e21924cd016165b02436dea994f44c193cd9",
"testharness"
],
- "storage/storagemanager-persist.https.html": [
- "61624fe272a610d3454ea2e245cdc6dbf6f59647",
+ "storage/storagemanager-persist.https.window.js": [
+ "13e17a16e14198e21b0b5984ed46c93a50daed41",
"testharness"
],
- "storage/storagemanager-persisted-worker.https.html": [
- "75004946164d59032228861cb854ae3e470723a0",
+ "storage/storagemanager-persist.https.worker.js": [
+ "fcf8175f706fe131c84ed2ac2a022e676d618c40",
"testharness"
],
- "storage/storagemanager-persisted.https.html": [
- "1d88c11bd8aace12223fb94845f1fb270a7b8877",
+ "storage/storagemanager-persisted.https.any.js": [
+ "70999406690fb26b7bc154093d826d7c0b8cf72c",
"testharness"
],
"streams/META.yml": [
@@ -633442,7 +641115,7 @@
"testharness"
],
"streams/readable-streams/patched-global.js": [
- "e8117c480484a3b6a83ecf10d1b9c8c61c5d02ca",
+ "c75b21e8c38573e6ce70b71ce6887a21f2d853e2",
"support"
],
"streams/readable-streams/patched-global.serviceworker.https.html": [
@@ -633682,7 +641355,7 @@
"testharness"
],
"streams/transform-streams/patched-global.js": [
- "d27b9cdd119edad098120f2b867cf9229f575af5",
+ "f5d32c08ea730044436d40fa500c425e422d6f25",
"support"
],
"streams/transform-streams/patched-global.serviceworker.https.html": [
@@ -636814,19 +644487,19 @@
"testharness"
],
"svg/path/property/d-interpolation-discrete.svg": [
- "aa9087395fb5f00083630f859c0049247f71a530",
+ "5b20a589bb54e0ed985b91e11258e10ff44ef66c",
"testharness"
],
"svg/path/property/d-interpolation-relative-absolute.svg": [
- "65d2f3b2eb6e54253166a29754338b930267953d",
+ "09d4c70712f8f4cbb37e8dd6d075529500a68179",
"testharness"
],
"svg/path/property/d-interpolation-single.svg": [
- "25c523168a7a274511f490eac8831798c19f9798",
+ "107b607beca6056bf7fc21f0b0e954bb37da5c03",
"testharness"
],
"svg/path/property/getComputedStyle.svg": [
- "af30862781a59ad64e51264ccaac989856f5a8a7",
+ "5830191931fb4f7dd0d4e929333248b8d3019e79",
"testharness"
],
"svg/path/property/priority-ref.svg": [
@@ -637458,7 +645131,7 @@
"support"
],
"tools/ci/check_stability.py": [
- "3235cee5ac6806f8f912507a7ec99e52c73d7c9a",
+ "2b32eb50c0f62448fed0417d1fe0f7882bf64f14",
"support"
],
"tools/ci/ci_built_diff.sh": [
@@ -637474,7 +645147,7 @@
"support"
],
"tools/ci/ci_resources_unittest.sh": [
- "78868b93433e801f98782f605eb9f666c6efe9cd",
+ "a13c60fbd8c0749395a6827babcdf72e97c4fa63",
"support"
],
"tools/ci/ci_stability.sh": [
@@ -637482,7 +645155,7 @@
"support"
],
"tools/ci/ci_taskcluster.sh": [
- "118243881a938b9d2cae0ebce2662c8ed416eaa4",
+ "901ae520c7fe932f9dacf6a5234034b130659ea0",
"support"
],
"tools/ci/ci_tools_unittest.sh": [
@@ -637494,11 +645167,11 @@
"support"
],
"tools/ci/ci_wptrunner_infrastructure.sh": [
- "d6d6803974fb058e11aebb65f12752e4824a571d",
+ "c32c943870366223ca42cf76b11853946e847b6a",
"support"
],
"tools/ci/commands.json": [
- "0f8f5823699890e4352016885d2e7fbfc1a9af08",
+ "361c9e4f3de88b89019481af17875979dc532e5b",
"support"
],
"tools/ci/install.sh": [
@@ -637525,6 +645198,10 @@
"f049671c313b18200232f27d1abc75789a2e619d",
"support"
],
+ "tools/ci/tcdownload.py": [
+ "8813dccc888881ac8e96a05b22b113d887de0463",
+ "support"
+ ],
"tools/ci/tests/test_jobs.py": [
"e888ad884a18f257008fe860f31f7892b3bd39a3",
"support"
@@ -637542,7 +645219,7 @@
"support"
],
"tools/docker/start.sh": [
- "3325bb24f587df72f77c93f01ae447713cd64781",
+ "c2fd91d96d4dd1a42b72c48e5b477ec5c78174fd",
"support"
],
"tools/flake8.ini": [
@@ -637578,7 +645255,7 @@
"support"
],
"tools/lint/lint.py": [
- "3f43b373abe793e8854baa80d4ac127ed66d0d95",
+ "cf668faea6f5403ad7b8d67a191c918cb48c8c0e",
"support"
],
"tools/lint/tests/__init__.py": [
@@ -637754,7 +645431,7 @@
"support"
],
"tools/manifest/item.py": [
- "61919fcc31e9c7afa8c1d5733a2723fc41bd326d",
+ "ddf046a68fa88da2f9e5ccad37dd26ec5fc7ac78",
"support"
],
"tools/manifest/log.py": [
@@ -637762,11 +645439,11 @@
"support"
],
"tools/manifest/manifest.py": [
- "42a8e1ceb23693a3e139cf6129bc82327b765182",
+ "9b2f0a18a569d0aac248487a0aa4743ee5caeed1",
"support"
],
"tools/manifest/sourcefile.py": [
- "133f8b59828dafd016df95429fe5286562b4733c",
+ "9be0d8966ece1bf56fd93e3fd606ac08c4bb1a76",
"support"
],
"tools/manifest/tests/__init__.py": [
@@ -637782,7 +645459,7 @@
"support"
],
"tools/manifest/tests/test_manifest.py": [
- "8bf7ef96c5f51248c76254af302ad6391bb2d903",
+ "f1241e044066d218f73fe806de4dcfa8a448c515",
"support"
],
"tools/manifest/tests/test_sourcefile.py": [
@@ -638274,7 +645951,11 @@
"support"
],
"tools/serve/serve.py": [
- "97a5063c1b9a3e831f6c22ac53a81f3f449a699f",
+ "e66d38b3daece0e963be4959aabd2e588ffeab6e",
+ "support"
+ ],
+ "tools/serve/test_functional.py": [
+ "87268ffc00d45f8bc57dc0fdd1e784eec745d288",
"support"
],
"tools/serve/test_serve.py": [
@@ -642218,7 +649899,7 @@
"support"
],
"tools/webdriver/webdriver/error.py": [
- "b2337ff3b38f57828c72d76e49ef8893d30b578c",
+ "23ffc40b31ffc97439ee02b240df5b47ca685b3d",
"support"
],
"tools/webdriver/webdriver/protocol.py": [
@@ -642234,7 +649915,7 @@
"support"
],
"tools/wpt/browser.py": [
- "9834e5d53f3ab7522f61b12d14aa273ad89ad438",
+ "7b943c2e73ccbb57f55304a167904efe089b4713",
"support"
],
"tools/wpt/commands.json": [
@@ -642242,7 +649923,7 @@
"support"
],
"tools/wpt/install.py": [
- "d779651c990e2b7ba798f086e80f6dc8beac525d",
+ "62c833aa3f0c707e659f691be7a166d8f7ec43d8",
"support"
],
"tools/wpt/markdown.py": [
@@ -642258,7 +649939,7 @@
"support"
],
"tools/wpt/run.py": [
- "6b098b41f702e0742df4a2f801eaaad3dc810ce9",
+ "a1e5637bf1dede2abc0d46814746281b0bbea35e",
"support"
],
"tools/wpt/testfiles.py": [
@@ -642269,12 +649950,16 @@
"7078a36b0c5bd5b4fe6f55f2ecf5fcbc2c535b4f",
"support"
],
+ "tools/wpt/tests/test_run.py": [
+ "097131d7ba5e9ac9c1995921c3f2702785f97096",
+ "support"
+ ],
"tools/wpt/tests/test_wpt.py": [
- "b39173e64f23ea4484f75cab219e72e8c2d279d7",
+ "8f8e5186c7cf508f3ceb5f88a353f85f22f3ad27",
"support"
],
"tools/wpt/tox.ini": [
- "e486bb221d72900b103fa56fbf18175afc5560c8",
+ "cd45a76e179861bb18adb231e86e2a74b2de972c",
"support"
],
"tools/wpt/update.py": [
@@ -642290,7 +649975,7 @@
"support"
],
"tools/wpt/wpt.py": [
- "f4eecce22cf915049f481049903a7c53a2a8eff7",
+ "55802461553abe63655a359393cfac2fbf174df1",
"support"
],
"tools/wptrunner/.gitignore": [
@@ -642510,11 +650195,11 @@
"support"
],
"tools/wptrunner/wptrunner/browsers/__init__.py": [
- "d8682e16a551e5ecb409a5f2d3df444d1cab4b7c",
+ "08949f794834fd9e163a6b60bdcef6b9722316b5",
"support"
],
"tools/wptrunner/wptrunner/browsers/base.py": [
- "dc03ef711b6014e7f3d8a45ef7c9098890bb0505",
+ "70324bec31f23da78b1c5d04168d29778e0bf5bc",
"support"
],
"tools/wptrunner/wptrunner/browsers/chrome.py": [
@@ -642525,10 +650210,18 @@
"c96cf5634f3d76a79b4cfd20429f6622e496d6a0",
"support"
],
+ "tools/wptrunner/wptrunner/browsers/chrome_webdriver.py": [
+ "a63460f4544af67ccef3800ddfb64bc654868832",
+ "support"
+ ],
"tools/wptrunner/wptrunner/browsers/edge.py": [
"ad2bb513a6a801b29a791a6d65b7b730b86e9a64",
"support"
],
+ "tools/wptrunner/wptrunner/browsers/edge_webdriver.py": [
+ "c2545de46f0b5def00c273ecfb5a57f0d4029531",
+ "support"
+ ],
"tools/wptrunner/wptrunner/browsers/fennec.py": [
"db271acc50ea08e61efd09848a9ff78b53b8ed1e",
"support"
@@ -642549,8 +650242,12 @@
"670098ea22216b3558ec2d50fc6f190b0b2dfe97",
"support"
],
+ "tools/wptrunner/wptrunner/browsers/safari_webdriver.py": [
+ "12735c141b3ad82551730dcbfa865f5b83085409",
+ "support"
+ ],
"tools/wptrunner/wptrunner/browsers/sauce.py": [
- "9aa484accd47d0d4cd864b19491174a775421d7a",
+ "02cc322aa35efb8db6c7a29ce5b95080f482124e",
"support"
],
"tools/wptrunner/wptrunner/browsers/sauce_setup/edge-prerun.bat": [
@@ -642614,7 +650311,7 @@
"support"
],
"tools/wptrunner/wptrunner/executors/executorselenium.py": [
- "d9b67968ddf66e044fce5b976b8e8d664c076889",
+ "0675461d5d8758260a02a20b40698255a7dcd048",
"support"
],
"tools/wptrunner/wptrunner/executors/executorservo.py": [
@@ -642625,6 +650322,10 @@
"d015e77b8c72b4f7d1dcc32f6d1c5613f90b959b",
"support"
],
+ "tools/wptrunner/wptrunner/executors/executorwebdriver.py": [
+ "127c909e810a26f5d16b268061981c63ee837bb6",
+ "support"
+ ],
"tools/wptrunner/wptrunner/executors/executorwebkit.py": [
"c728ae18e03b09f6c690be82efc78bd0c2ff7347",
"support"
@@ -642702,7 +650403,7 @@
"support"
],
"tools/wptrunner/wptrunner/stability.py": [
- "859f01444d34acdedbcc339d8783122a7f5ad9d2",
+ "e684bf68076752d50b3271c1d4c74ef45aad4242",
"support"
],
"tools/wptrunner/wptrunner/testdriver-extra.js": [
@@ -642730,11 +650431,11 @@
"support"
],
"tools/wptrunner/wptrunner/testloader.py": [
- "018dc103983dfef222ed7cc6a4f8fe5288add256",
+ "2313a80c745bfac9946119926411234c506c6654",
"support"
],
"tools/wptrunner/wptrunner/testrunner.py": [
- "46d67e3c9823b1445ee472aa62ba93dcadf621a7",
+ "b4ce4381257121b4bb4850f46dcb447d3a81fac5",
"support"
],
"tools/wptrunner/wptrunner/tests/__init__.py": [
@@ -642742,7 +650443,7 @@
"support"
],
"tools/wptrunner/wptrunner/tests/base.py": [
- "b5173f3b513ea4f0a37db2ccdc0a948893c4fe45",
+ "84dc4f2e7f82ee2e3a2aa6f4d8bdda76b1581da1",
"support"
],
"tools/wptrunner/wptrunner/tests/browsers/__init__.py": [
@@ -642766,7 +650467,7 @@
"support"
],
"tools/wptrunner/wptrunner/tests/test_stability.py": [
- "72cff21016a8e51036bb99e46b27cb70bbf044b9",
+ "5a051b6c8998682e69d9c74bd4e5458986731b1f",
"support"
],
"tools/wptrunner/wptrunner/tests/test_testloader.py": [
@@ -642774,7 +650475,7 @@
"support"
],
"tools/wptrunner/wptrunner/tests/test_update.py": [
- "5c654c99a481c8709176ea9210508bc2388d2b2c",
+ "f8790815cf064e09926caca65c5ac1d15671be95",
"support"
],
"tools/wptrunner/wptrunner/tests/test_wpttest.py": [
@@ -642806,7 +650507,7 @@
"support"
],
"tools/wptrunner/wptrunner/update/update.py": [
- "5685f840670cdb82d04e5c4a97985ac33fc87aa9",
+ "e5678be4f5467be2c542af5160b512a574fd7a36",
"support"
],
"tools/wptrunner/wptrunner/vcs.py": [
@@ -642818,7 +650519,7 @@
"support"
],
"tools/wptrunner/wptrunner/wptcommandline.py": [
- "7e18a8b4379b338e7b6db65b17ca363a83cb1c89",
+ "0075ad9096201a04c5342ad92aab59ab8dcf434e",
"support"
],
"tools/wptrunner/wptrunner/wptlogging.py": [
@@ -642878,11 +650579,11 @@
"support"
],
"tools/wptrunner/wptrunner/wptrunner.py": [
- "02420826d8a0bfcb785213150e7e54a291297c05",
+ "a6a29724ad71794b8e1492d1c1ba792dfdfcacd4",
"support"
],
"tools/wptrunner/wptrunner/wpttest.py": [
- "c29ba974a99786f687f2aead1ba14045c12fb643",
+ "4086a89e4cfd4a246c19722e9a86f7c8a2896af3",
"support"
],
"tools/wptserve/.coveragerc": [
@@ -643242,35 +650943,39 @@
"testharness"
],
"trusted-types/DOMParser-parseFromString.tentative.html": [
- "2fe9b31b787e1fb458a3ed8996b2d79f7e14aa35",
+ "2dfc37686bca15431c216a50d29f9f9eed2782e0",
"testharness"
],
"trusted-types/Document-write.tentative.html": [
- "3a63e923543b999b05d1fab926ad33d7d2719dfa",
+ "79247fb4d68e6724b98c62d3b62a0e6b20784f4d",
"testharness"
],
"trusted-types/Element-insertAdjacentHTML.tentative.html": [
- "599ade44ec117ecb429659a9f969a2767bd95cbb",
+ "d5db7936b1f98012ee3750f6d3056f4a5b172615",
"testharness"
],
"trusted-types/Element-outerHTML.tentative.html": [
- "a0bb6c1a5e3fef47e4351353befbfc8eb105652f",
+ "c8daddfe9955196bf0b69410263cb7c01e473e5e",
+ "testharness"
+ ],
+ "trusted-types/Element-setAttribute.tentative.html": [
+ "a284b2f83550b1b0e4cf7c79e7a200791ae8c70a",
"testharness"
],
"trusted-types/HTMLElement-generic.tentative.html": [
- "cea32a5a2df1d9b255f5aaf85ac5a694fdb3a618",
+ "2d38104511879943a4d538c9dc5b0031d7596b23",
"testharness"
],
"trusted-types/Location-assign.tentative.html": [
- "13cca5679488d0b3e12631d5f70408565ea1b065",
+ "62f98e96d7febe6c744b882f8d196d1686fe9166",
"testharness"
],
"trusted-types/Location-href.tentative.html": [
- "d759d28593e67f25d8bc28d36cf0ff4912460dc0",
+ "bacadf6a91b1c0bc5c76293aab38f9d503cfa2b7",
"testharness"
],
"trusted-types/Location-replace.tentative.html": [
- "7d84905d19878d57634a8497b81ef86d8114b72e",
+ "4fb53d0260973ed5d714540a448909488b6e2465",
"testharness"
],
"trusted-types/META.yml": [
@@ -643278,63 +650983,87 @@
"support"
],
"trusted-types/Range-createContextualFragment.tentative.html": [
- "3d45b33486d3971c0c58180fa4034dbfae18f135",
+ "3a880a53778acb165fd5d957eeaca22685baf2b5",
"testharness"
],
- "trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html": [
- "76e6d130b05dfba00911ad42eb7a162cd29b222e",
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html": [
+ "b20fcf2436eac17f9f558cab0c80d1eced6bb1be",
"testharness"
],
- "trusted-types/Window-open.tentative.html": [
- "c005fbba143f66a9540deebba7988fdea9661558",
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html": [
+ "49a9506b5a7910bf1ee7e98dcbe2fbdbecacb000",
+ "testharness"
+ ],
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html": [
+ "9daf20ec1869919603965942fa6a4c99925ac8e9",
+ "testharness"
+ ],
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-exposedTests.tentative.html": [
+ "af6e04941c3b6206602bc7f547a3b0c9ef555a11",
"testharness"
],
- "trusted-types/Window-trustedTypes.tentative.html": [
- "ef4487749dd0c12a00bd3ab42c1353467a6eeb8f",
+ "trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html": [
+ "6d43e0bafc61f34c17d7d7b751bf69f12d035adf",
+ "testharness"
+ ],
+ "trusted-types/Window-TrustedTypes.tentative.html": [
+ "8e20e492e6a8484e386d1a08f854bd9b162bd6be",
+ "testharness"
+ ],
+ "trusted-types/Window-open.tentative.html": [
+ "172d566e57fc635b551b5d355661db690869b220",
"testharness"
],
"trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html": [
- "cc575dc0085bce3aa1370fb528e28003ad3c1c2b",
+ "366bdd2ab6d2d3c24d89cfba2eeea17c045d0a24",
"testharness"
],
"trusted-types/block-string-assignment-to-Document-write.tentative.html": [
- "28813d72e0e1833e25658e2210abb9b0a30b2137",
+ "ce530d49bb6072dc64d9399abc833b7f54d94741",
"testharness"
],
"trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html": [
- "ad94b44e8fb7621ba4693ad65377872281f3e9a6",
+ "593d6c64a7c466395972251f5ae0c1ac8a7e1998",
"testharness"
],
"trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html": [
- "47f1165b1a69366848dd5dd21a2ad2199b9c2e81",
+ "c9bde5eb6d5b64046f64c102b441b0990a934b9e",
+ "testharness"
+ ],
+ "trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html": [
+ "52e317083316435ec4b1dcc7331f1216c2a32d9a",
"testharness"
],
"trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [
- "eae52626190746ad0a8b436f74981009e400232b",
+ "f31fce629bccd342ff5e8dfacd43e13faac6fced",
"testharness"
],
"trusted-types/block-string-assignment-to-Location-assign.tentative.html": [
- "8079335bc5861fa723691a0f884cf249e6f63e24",
+ "5de5fecda0b2db6af2a87e888ebaca22db72223f",
"testharness"
],
"trusted-types/block-string-assignment-to-Location-href.tentative.html": [
- "4e393f92506e00276a4440e1023ac23e7a6138e8",
+ "24312617892de90eb6caee32fac81c18ae909147",
"testharness"
],
"trusted-types/block-string-assignment-to-Location-replace.tentative.html": [
- "872f14e144830ed87b51e352f93c32ce85438bfe",
+ "407521570596e05a7e9a4ac3cb9b795244c43ebc",
"testharness"
],
"trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html": [
- "2afa2572c350071b791ee280bce0a1e5135dc2aa",
+ "1cae5c74e96588eb9999767abab45921fe7414ae",
"testharness"
],
"trusted-types/block-string-assignment-to-Window-open.tentative.html": [
- "f5712295d30d7b1d680ad6753dd401d21c0409f9",
+ "8070b4a4896d9adc60346fccb5fa96b997ef597a",
+ "testharness"
+ ],
+ "trusted-types/idlharness.window.js": [
+ "de13697764ed487060de3dd425cd39cba73ff13b",
"testharness"
],
"trusted-types/support/helper.sub.js": [
- "b5435917bec607c97eaa5d75ee7fa2752999cb0a",
+ "1ad5b4ef0c68a1ffde111db62c5e2aa4957732b6",
"support"
],
"uievents/META.yml": [
@@ -644713,6 +652442,10 @@
"819bc7b60c6d42df7fb94b46f1249f9591359e23",
"manual"
],
+ "wai-aria/idlharness.window.js": [
+ "590bf9e2e9fec8773a4ba01fd34bb71250a58c33",
+ "testharness"
+ ],
"wai-aria/keyshortcuts_multiple_shortcuts-manual.html": [
"ce4074a4f2cdefb01a6686fea3c9a4c2cf5861e5",
"manual"
@@ -645334,51 +653067,123 @@
"support"
],
"wasm/jsapi/assertions.js": [
- "151a406655cb5094625122bdbd359d1ff91d8fbd",
+ "bda3ae7bc3c8dc5020a50c645b8dba2aaeb44591",
"support"
],
"wasm/jsapi/bad-imports.js": [
"f076baacca8b3e6addf49f6841874d11bfcfe5a2",
"support"
],
+ "wasm/jsapi/constructor/compile.any.js": [
+ "0139a18fda3f928dc0eed0bef86098dcbabf5979",
+ "testharness"
+ ],
"wasm/jsapi/constructor/instantiate-bad-imports.any.js": [
"86700298dfae66de6f4d026baa29e6e3584320f7",
"testharness"
],
+ "wasm/jsapi/constructor/instantiate.any.js": [
+ "e90f21e28ebf478c7af7d40c8744fba9e5f48720",
+ "testharness"
+ ],
+ "wasm/jsapi/constructor/validate.any.js": [
+ "70bd9f7022ad616c2d5e0be636f6935923e19173",
+ "testharness"
+ ],
+ "wasm/jsapi/global/constructor.any.js": [
+ "7a45cc4191c55684cde187fc73fb9741d6f5c2c5",
+ "testharness"
+ ],
+ "wasm/jsapi/global/toString.any.js": [
+ "ca025576c2b49604f053c83002f3a9cc8ef41a7b",
+ "testharness"
+ ],
+ "wasm/jsapi/global/value-set.any.js": [
+ "b4e6770f10ed9e3ad55b9ae18ee96deda3ff171e",
+ "testharness"
+ ],
+ "wasm/jsapi/global/valueOf.any.js": [
+ "176c5a784698399351eedeaac0ec305aa8ab7b81",
+ "testharness"
+ ],
"wasm/jsapi/instance/constructor-bad-imports.any.js": [
"24c51c10dc5df9d52c06bfb0715e435b17f24f7a",
"testharness"
],
"wasm/jsapi/instance/constructor.any.js": [
- "93a3ffda033729d64562a583e823fab05f35f6fe",
+ "f9bd06ac8e95e0f4dc2ce96560529fad9bf2095b",
+ "testharness"
+ ],
+ "wasm/jsapi/instance/exports.any.js": [
+ "31423918720543da2ba25e392267bf541b756242",
+ "testharness"
+ ],
+ "wasm/jsapi/instance/toString.any.js": [
+ "08dcb14a50d04f6db196626ddb93f2b50da8f055",
"testharness"
],
"wasm/jsapi/interface.any.js": [
- "64c1f60da1c7888be994f222af69f401402ae5f4",
+ "5d76ac56ec5fafde8dde3924df863a2694bd6691",
+ "testharness"
+ ],
+ "wasm/jsapi/memory/buffer.any.js": [
+ "b04460b6c5e56cf1fe990e3107aa9efcb4964ed5",
"testharness"
],
"wasm/jsapi/memory/constructor.any.js": [
- "33256f85e45749cc46842dccbd1ee7c40db41ae5",
+ "f9907ca6104d8ec76861e43b6b981042d86fb865",
+ "testharness"
+ ],
+ "wasm/jsapi/memory/grow.any.js": [
+ "95300399f192b7eab70dd8f07c43f4db37eebe01",
+ "testharness"
+ ],
+ "wasm/jsapi/memory/toString.any.js": [
+ "4e15d75ea20f1ebfeba5dc7c8a9a52c253dd01bf",
"testharness"
],
"wasm/jsapi/module/constructor.any.js": [
- "0f5eecf957e8ca6af851ce12f5c18266a2eb0460",
+ "32f183fac8738d30cc8a432768da315949320257",
"testharness"
],
"wasm/jsapi/module/customSections.any.js": [
- "146aa7fd332ca9b061fef51a7378d29f8c9c165e",
+ "58ac63b61c93a015bfa9d5daab39f8d5b48548da",
"testharness"
],
"wasm/jsapi/module/exports.any.js": [
- "c7ecdcf6b619b4ab93cf4e878addeb9bed736d4e",
+ "e63a885a4c34add0f6787d3642de83d9766568d1",
"testharness"
],
"wasm/jsapi/module/imports.any.js": [
- "522b262f549b9a07c0a426cd474151d3d3e02749",
+ "640da591d21d8924d261fdc58b8e7cc762187a11",
"testharness"
],
+ "wasm/jsapi/module/toString.any.js": [
+ "d9231a132ca8bf965f69c3cc81070a2ffe179efa",
+ "testharness"
+ ],
+ "wasm/jsapi/table/assertions.js": [
+ "dde2fd770904207a1f9f287fa48d82954a418f2e",
+ "support"
+ ],
"wasm/jsapi/table/constructor.any.js": [
- "4aeac10f7adc6e0ec0abc56fa66c0259102798e2",
+ "e924bdb2ba42c67bcc6d4a949c2eeb50eac63e31",
+ "testharness"
+ ],
+ "wasm/jsapi/table/get-set.any.js": [
+ "2bb43a9308d732b5b6fa689c181ac411880c3733",
+ "testharness"
+ ],
+ "wasm/jsapi/table/grow.any.js": [
+ "d3efb511e4b1db1efa089322c0a3079705dfbdbd",
+ "testharness"
+ ],
+ "wasm/jsapi/table/length.any.js": [
+ "a6a9661dbaddc800cb99b7b8e2b804cb0c8e3c62",
+ "testharness"
+ ],
+ "wasm/jsapi/table/toString.any.js": [
+ "e576477910ad3198b446b4addf89ba9a571d020b",
"testharness"
],
"wasm/jsapi/wasm-constants.js": [
@@ -645389,44 +653194,148 @@
"6e9284e773105db5751c5483ed9333a45272b180",
"support"
],
- "wasm/resources/blank.html": [
+ "wasm/resources/load_wasm.js": [
+ "512324639059da8a9d76e9d740d97fc56ebdebc4",
+ "support"
+ ],
+ "wasm/serialization/broadcastchannel-success-and-failure.html": [
+ "0d11cc595be2d16ad795be8199ed2ae7abe79974",
+ "testharness"
+ ],
+ "wasm/serialization/broadcastchannel-success.html": [
+ "cd5f8d0b56a19148dbd01b4218869f1f0c3526fd",
+ "testharness"
+ ],
+ "wasm/serialization/identity-not-preserved.html": [
+ "24bb3b16d8c50600a634d62d4c48c49dfb3b120e",
+ "testharness"
+ ],
+ "wasm/serialization/incrementer.wasm": [
+ "47afcdef2a2812acccecd0f203d30d3023593f3d",
+ "support"
+ ],
+ "wasm/serialization/nested-worker-success.any.js": [
+ "5388ebcc39b22946957250004577a1966c264a5a",
+ "testharness"
+ ],
+ "wasm/serialization/no-transferring.html": [
+ "a0bf11f01dd459b2e3abeb249f725e1e05d1532f",
+ "testharness"
+ ],
+ "wasm/serialization/resources/blank.html": [
"a3c3a4689a62b45b1e429f6b7a94690e556a1259",
"support"
],
- "wasm/resources/frame.html": [
- "d1c83e114a039a7aeefa8914340911eb2301b5e4",
+ "wasm/serialization/resources/broadcastchannel-iframe.html": [
+ "83e347b5cb35c92aa3cd96263a68b56af366f0e3",
+ "support"
+ ],
+ "wasm/serialization/resources/broadcastchannel-sharedworker.js": [
+ "310e0e9358446acaec0f13d8e2fb4437316953c2",
+ "support"
+ ],
+ "wasm/serialization/resources/broadcastchannel-worker.js": [
+ "76a8177060498547ab1661319c20d5d5288cd96f",
+ "support"
+ ],
+ "wasm/serialization/resources/create-empty-wasm-module.js": [
+ "7326710c9e47d756bbdab1ead2303b108b8f04db",
+ "support"
+ ],
+ "wasm/serialization/resources/echo-iframe.html": [
+ "c4fd5824a1c617c21fe8b92483b388d586edf06e",
+ "support"
+ ],
+ "wasm/serialization/resources/echo-worker.js": [
+ "cbbde8a73c8c2a63cc97cbe2b6cd7c6d81585b5c",
+ "support"
+ ],
+ "wasm/serialization/resources/incrementer-iframe-domain.sub.html": [
+ "d2d18de49950c2508a69545ad95a937898b04532",
+ "support"
+ ],
+ "wasm/serialization/resources/incrementer-iframe.html": [
+ "5c8bc0735e207a7c18f12d578276ae3c3b999da5",
+ "support"
+ ],
+ "wasm/serialization/resources/incrementer-popup.html": [
+ "660e472b27c086068edeb7fd2bcade536c4bd5e9",
"support"
],
- "wasm/resources/incrementer.wasm": [
+ "wasm/serialization/resources/incrementer-worker-with-channel.js": [
+ "0323b3e52e75e894ae40ffc68e904ffc81ded024",
+ "support"
+ ],
+ "wasm/serialization/resources/incrementer-worker.js": [
+ "1779ceea520ccfd07da6d595d8a34be62de89428",
+ "support"
+ ],
+ "wasm/serialization/resources/incrementer.wasm": [
"47afcdef2a2812acccecd0f203d30d3023593f3d",
"support"
],
- "wasm/resources/load_wasm.js": [
- "512324639059da8a9d76e9d740d97fc56ebdebc4",
+ "wasm/serialization/resources/nested-iframe-1.html": [
+ "fe93cc0c4b0fe5b86bf1a12de84fb3fc48ea08a5",
"support"
],
- "wasm/resources/service-worker.js": [
- "684eaf64878c22afc9ac877b79db7d26f14a3670",
+ "wasm/serialization/resources/nested-iframe-2.html": [
+ "fad52ce9de3977c077b5a22e72ee7b23837ea302",
"support"
],
- "wasm/wasm_local_iframe_test.html": [
- "0f4fbd0c7191ece3a901b0a065f147c03431a2d4",
- "testharness"
+ "wasm/serialization/resources/nested-iframe-3.html": [
+ "7971022b2cdc315d598761a3694838494c2884a8",
+ "support"
],
- "wasm/wasm_serialization_tests.html": [
- "49766c770525bcef9d66ee0b735e410bc5a7ebb8",
- "testharness"
+ "wasm/serialization/resources/nested-iframe-4-incrementer.html": [
+ "f419f4bc36cdffafa665e333a7e7bced3d153585",
+ "support"
+ ],
+ "wasm/serialization/resources/serviceworker-failure.js": [
+ "39796f9d94a39d2a13ed832544ce781373a20655",
+ "support"
],
- "wasm/wasm_serialization_tests.js": [
- "3cc4166168b08f46ce54511b6364d01f7b8cbeb9",
+ "wasm/serialization/resources/sharedworker-failure.js": [
+ "854c70b9e84e6e6fb1c59f64a06a79646a122576",
"support"
],
- "wasm/wasm_serialization_worker.js": [
- "3361ed73951770b2a6e881ef093a116d10676939",
+ "wasm/serialization/resources/test-incrementer.js": [
+ "65cb33227a37376c1a0134275d5079d442b443a9",
"support"
],
- "wasm/wasm_service_worker_test.https.html": [
- "cced4b8f6ecdaa03c6d80793c2f3650b217452a5",
+ "wasm/serialization/serialization-via-history.html": [
+ "35dc17b6701fadf920ce251ec6c63da1c26b6570",
+ "testharness"
+ ],
+ "wasm/serialization/serialization-via-idb.any.js": [
+ "1d861c3d3aa1072b1c90332fec7ac993d3b59552",
+ "testharness"
+ ],
+ "wasm/serialization/serialization-via-notifications-api.any.js": [
+ "84105651d3b53192f453b9f16bb85163165495cb",
+ "testharness"
+ ],
+ "wasm/serialization/window-domain-success.sub.html": [
+ "51d4c5cb0ea0c0c5cf69530876c2f7c19bb3830a",
+ "testharness"
+ ],
+ "wasm/serialization/window-messagechannel-success.html": [
+ "e686c8113561d94e860a774771aa69b974696716",
+ "testharness"
+ ],
+ "wasm/serialization/window-serviceworker-failure.https.html": [
+ "97c5a1decdb85317930508ece8f306fb80880ca2",
+ "testharness"
+ ],
+ "wasm/serialization/window-sharedworker-failure.html": [
+ "667e985a30b53c0ecadfd4c68f6217b87a7a5b98",
+ "testharness"
+ ],
+ "wasm/serialization/window-similar-but-cross-origin-success.sub.html": [
+ "070cf0a49a8f0c0ede81b6751e727b44f36c0043",
+ "testharness"
+ ],
+ "wasm/serialization/window-simple-success.html": [
+ "6f2ccf465e93a160c73df548fc58774a5040f0e6",
"testharness"
],
"web-animations/META.yml": [
@@ -645454,11 +653363,11 @@
"testharness"
],
"web-animations/animation-model/animation-types/property-list.js": [
- "8d02717835175c186e96779949af2f6d892125ca",
+ "e2f3adcd7affcdc382fb038eb4e9a5ca80d5b1ee",
"support"
],
"web-animations/animation-model/animation-types/property-types.js": [
- "5bafb20dfcfafb34464fe387457f06c434c7c188",
+ "232a508e07cb3db2eb9d9094a6e9fd8a1e63e4a0",
"support"
],
"web-animations/animation-model/animation-types/visibility.html": [
@@ -646050,7 +653959,7 @@
"support"
],
"webaudio/resources/audionodeoptions.js": [
- "0d90a9c630013b9b46ba49c106e0daa89da7032e",
+ "df0090c6d605fc0ea5fca224de83e0f472618f9a",
"support"
],
"webaudio/resources/audioparam-testing.js": [
@@ -646062,7 +653971,7 @@
"support"
],
"webaudio/resources/audit.js": [
- "7ffa4392b05a15dfacafa7d89c902d977ed23266",
+ "b7ca020161071437087c349c0e8b59dbf132f764",
"support"
],
"webaudio/resources/biquad-filters.js": [
@@ -646114,7 +654023,7 @@
"support"
],
"webaudio/resources/start-stop-exceptions.js": [
- "9a77e67ed8634ca53237edcdbf71ca26866b23f9",
+ "0d2ea12f6db8257878087646157242cce37ed507",
"support"
],
"webaudio/resources/stereopanner-testing.js": [
@@ -646126,7 +654035,7 @@
"support"
],
"webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html": [
- "2112edeeffcf5688357d98b5161e6c3ab2d761ad",
+ "4e27f842ddeda3e2bdd78da7b8ee3f67062d1a9f",
"testharness"
],
"webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-basic.html": [
@@ -646138,7 +654047,7 @@
"testharness"
],
"webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-sizing.html": [
- "b3de37f119f167469a4337d520345f820a6c4165",
+ "7ee6a2237edd209256ac2d46be6893a5305383a0",
"testharness"
],
"webaudio/the-audio-api/the-analysernode-interface/test-analyser-gain.html": [
@@ -646166,7 +654075,7 @@
"support"
],
"webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html": [
- "b71078d8f8094cdc43ba3adfc33d0f6f15931b33",
+ "e0359953d2e909f69066885515f4a3f3cc00ff02",
"testharness"
],
"webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-getChannelData.html": [
@@ -646174,11 +654083,11 @@
"testharness"
],
"webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html": [
- "07a34f07c185f4bc9dcf1b325bb51067610b430a",
+ "a2c4581c4e80069f227fe29078bc3eb6409c8b4e",
"testharness"
],
"webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html": [
- "c5aae1ad53235f7b0f10bc3535d9a3fe5150760f",
+ "9845d5eaba384cced3c63ddbf4df1400b31f4994",
"testharness"
],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/.gitkeep": [
@@ -646190,7 +654099,7 @@
"testharness"
],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html": [
- "5527f44cc9c93e72214ca228fa53e830a8cfcead",
+ "f3f16c4c648166dfdb394a41881d4a515d097e86",
"testharness"
],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-ended.html": [
@@ -646229,6 +654138,10 @@
"3ac9c05938c2cac600f548ee796aedc48d470e63",
"testharness"
],
+ "webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html": [
+ "c181ceb8e0fad83067e11ec8aefe70f79ccf071c",
+ "testharness"
+ ],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/ctor-audiobuffersource.html": [
"c1c3203451e62587b1aa864e85c63617c36c2a3d",
"testharness"
@@ -646278,7 +654191,7 @@
"testharness"
],
"webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining.html": [
- "0a8c73160e543d6f9d382b536e5c41f7d29c6e9a",
+ "4163a8439cd08c1f8cdcb587c569653c2618e021",
"testharness"
],
"webaudio/the-audio-api/the-audionode-interface/audionode-connect-order.html": [
@@ -646290,15 +654203,15 @@
"testharness"
],
"webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html": [
- "c3d3fae2155602bbae7494e0e1439ea1a477b054",
+ "386614ff2e20e7abd4e511bf5e9d7d492cddfeb3",
"testharness"
],
"webaudio/the-audio-api/the-audionode-interface/audionode-disconnect.html": [
- "b29c09d395fc2815ee5441fdb06320ad02f2f3f5",
+ "65b93222d1002e227ab1ad2e29b6e140b65bd9e4",
"testharness"
],
"webaudio/the-audio-api/the-audionode-interface/audionode.html": [
- "14cfbff7e2754c4ee028c7ead599e87849a60922",
+ "0b57d27e8e1a7b7339d0e47641cbba27ab419612",
"testharness"
],
"webaudio/the-audio-api/the-audionode-interface/channel-mode-interp-basic.html": [
@@ -646314,7 +654227,7 @@
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html": [
- "c928b3dc165a298dc5ddfd9b7b885c2e7b9c501d",
+ "982731d33843544d2f70af72a51e9bd878bbf486",
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/audioparam-exponentialRampToValueAtTime.html": [
@@ -646342,7 +654255,7 @@
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html": [
- "31405ebfcd2aa90bc8be13bd3fe856b1f6e60601",
+ "37062993f9dc8d90e2d418c842b30e20517bd21d",
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurveAtTime.html": [
@@ -646358,11 +654271,11 @@
"support"
],
"webaudio/the-audio-api/the-audioparam-interface/automation-rate.html": [
- "a3c789e2f2cbdb31e540bf5cc58850786b4ed73b",
+ "a3c11994bbe37f26aa1c2eafbb4f287d559fae34",
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/event-insertion.html": [
- "eab77c494d1161083f1fe73376492b177355995f",
+ "688d0478235e202859c7939eef65ad383f7a4f36",
"testharness"
],
"webaudio/the-audio-api/the-audioparam-interface/k-rate-audioworklet.https.html": [
@@ -646466,11 +654379,11 @@
"testharness"
],
"webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-construction.https.html": [
- "7cfd423c071b9a8283e291f200615b2e0a69c797",
+ "8b7704a781b712c0129b650da898ed79baad794c",
"testharness"
],
"webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html": [
- "31e204cdc8d53bfaf0226c34a0e5daf42c813b61",
+ "cee9ec82c20f42a5941698fc394e6babb639ace9",
"testharness"
],
"webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-disconnected-input.https.html": [
@@ -646546,7 +654459,7 @@
"testharness"
],
"webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html": [
- "83f53aafb1980bf991f4d12c3a3a472b82df61a6",
+ "441e98a251187c3cc600299681306d29df11e618",
"testharness"
],
"webaudio/the-audio-api/the-biquadfilternode-interface/biquad-getFrequencyResponse.html": [
@@ -646598,7 +654511,7 @@
"support"
],
"webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html": [
- "f967f0699a321783fe832464b6e72a2a12021746",
+ "71a62f176f8eefd9b9168b2c222cc6d1c752d3a5",
"testharness"
],
"webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-disconnect.html": [
@@ -646614,7 +654527,7 @@
"testharness"
],
"webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html": [
- "115bd9943490ab09efbff70239167911eb83d933",
+ "0d6b45c56df0f43a0eac3f364cadca2e4669c6ed",
"testharness"
],
"webaudio/the-audio-api/the-channelsplitternode-interface/.gitkeep": [
@@ -646622,11 +654535,11 @@
"support"
],
"webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html": [
- "e0449919ad5e744065bb0257dddfe9b488511812",
+ "954c71a96b288530e6c22878fed7a91f42091dc2",
"testharness"
],
"webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html": [
- "7fa9d6fa5466d2fbfeec8bbcf0718b80b52d2298",
+ "9cbb46b6d969a6440fc5b29ee1a20d607912fc83",
"testharness"
],
"webaudio/the-audio-api/the-constantsourcenode-interface/constant-source-basic.html": [
@@ -646662,7 +654575,7 @@
"testharness"
],
"webaudio/the-audio-api/the-convolvernode-interface/convolver-channels.html": [
- "11d6f332a1bbc943bec1ad7391610ffe776b955c",
+ "ac4f198d7c1449f38ca14963f73b0d3d90b40b5b",
"testharness"
],
"webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html": [
@@ -646678,7 +654591,7 @@
"testharness"
],
"webaudio/the-audio-api/the-convolvernode-interface/convolver-setBuffer-already-has-value.html": [
- "31f115da5321ef52be0ee1ba078b726473694b9c",
+ "c8dbeb941bc48f4f3a92907cb140a29f96567057",
"testharness"
],
"webaudio/the-audio-api/the-convolvernode-interface/convolver-setBuffer-null.html": [
@@ -646690,7 +654603,7 @@
"testharness"
],
"webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html": [
- "cf818330060143078cacbecf77724244eee55cf8",
+ "935ceeb715edd2ffdeb7979d6824736fa82b6d2f",
"testharness"
],
"webaudio/the-audio-api/the-delaynode-interface/.gitkeep": [
@@ -646718,7 +654631,7 @@
"testharness"
],
"webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html": [
- "7bbff410650c3bd234c47f080697705b088bd6a4",
+ "caf2f85dfd459b2d48526b8f4c13b37b2bceaddb",
"testharness"
],
"webaudio/the-audio-api/the-delaynode-interface/delaynode-scheduling.html": [
@@ -646738,7 +654651,7 @@
"support"
],
"webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html": [
- "98d5dbfded1e2f10e32b14444279760fa2cdeec1",
+ "c2460dfa1ddd26a5c2e199873c0b28189275ff83",
"testharness"
],
"webaudio/the-audio-api/the-dynamicscompressornode-interface/dynamicscompressor-basic.html": [
@@ -646778,7 +654691,7 @@
"testharness"
],
"webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html": [
- "79c40dc084753d48970212eafd97ef531c0ae402",
+ "7828f05226151ebf7d6c7ec984cae1f90ef848d2",
"testharness"
],
"webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse.html": [
@@ -646814,7 +654727,7 @@
"support"
],
"webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html": [
- "f480ec8ce51f929417b922adf60a2f9ede800fcd",
+ "4b6863103622c5fb248dee3e3eb20d955275d037",
"testharness"
],
"webaudio/the-audio-api/the-offlineaudiocontext-interface/current-time-block-size.html": [
@@ -646826,7 +654739,11 @@
"support"
],
"webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html": [
- "aaf77aec555b720b343a9e63adae924c730510dc",
+ "36bf604b296c63b213d99408ab38937c62a755dc",
+ "testharness"
+ ],
+ "webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html": [
+ "81a1293d0355ed448e60c0e31ad4435ea708e224",
"testharness"
],
"webaudio/the-audio-api/the-pannernode-interface/.gitkeep": [
@@ -646834,7 +654751,7 @@
"support"
],
"webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html": [
- "5475a6210b724ab2d6a0cefedee9c5432953c61f",
+ "d330c9c3de4482ee70c036e0ab7ff8feb1fd5a36",
"testharness"
],
"webaudio/the-audio-api/the-pannernode-interface/distance-exponential.html": [
@@ -646874,7 +654791,7 @@
"testharness"
],
"webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html": [
- "e1519f8c3027b3e38004e54ba6088ae819bedff1",
+ "387f87301092ebd725ed240cc70f0df7ec69a5ab",
"testharness"
],
"webaudio/the-audio-api/the-pannernode-interface/pannernode-basic.html": [
@@ -646894,7 +654811,7 @@
"support"
],
"webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html": [
- "caa99aa4031a22f8c538e5622470560a50c4d5bc",
+ "9409f1ffce2110c177332388988d7ddb559d3ae2",
"testharness"
],
"webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html": [
@@ -647086,11 +655003,11 @@
"wdspec"
],
"webdriver/tests/actions/sequence.py": [
- "426dbe82f48e265d77a60382a89aa80f466ce631",
+ "b62d00c3e9b82d6200b3f6a0cd99d8a208281601",
"wdspec"
],
"webdriver/tests/actions/special_keys.py": [
- "d2a44229ce06cb63fc386221c4870d7e1f6eda1c",
+ "416cbdcf20fc9e964aefd9683098d90289f3705c",
"wdspec"
],
"webdriver/tests/actions/support/__init__.py": [
@@ -647118,7 +655035,7 @@
"support"
],
"webdriver/tests/add_cookie/add.py": [
- "48fdf64f2f9523979a7a79ca3f9541603c0e1d60",
+ "24ac645029e0dc57327b62ad3d24fbab1640ad2c",
"wdspec"
],
"webdriver/tests/back/__init__.py": [
@@ -647150,7 +655067,7 @@
"wdspec"
],
"webdriver/tests/conftest.py": [
- "c39671797f6bdf176d6b5d20b13412ee3a92cee4",
+ "7e72eb9ca5874b6a782cc745adcf622c6034d6a2",
"support"
],
"webdriver/tests/delete_all_cookies/__init__.py": [
@@ -647270,7 +655187,7 @@
"wdspec"
],
"webdriver/tests/element_send_keys/scroll_into_view.py": [
- "9ff0a9e25788921eb6d01add0e279c50d7de6134",
+ "18f87ffaaec6dfcecacff42b8af0ad187f29f953",
"wdspec"
],
"webdriver/tests/element_send_keys/send_keys.py": [
@@ -647310,7 +655227,7 @@
"wdspec"
],
"webdriver/tests/execute_script/execute.py": [
- "9e220d02687e885ebcd682606f7a673cf36b6db1",
+ "2af16c1e5e8a3bed01c5703db24a1d399a0e2270",
"wdspec"
],
"webdriver/tests/execute_script/json_serialize_windowproxy.py": [
@@ -647409,10 +655326,26 @@
"f0e95d12f14e2fb4337476a8ccf883a06c0e5c5d",
"wdspec"
],
+ "webdriver/tests/get_element_attribute/__init__.py": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
"webdriver/tests/get_element_attribute/get.py": [
"02a155bcee6626037f424fbf387458ea46e6c206",
"wdspec"
],
+ "webdriver/tests/get_element_css_value/__init__.py": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "webdriver/tests/get_element_css_value/get.py": [
+ "88a56e1ad45f906f7e1b255350eada15bd549bfc",
+ "wdspec"
+ ],
+ "webdriver/tests/get_element_css_value/user_prompts.py": [
+ "529b6ae9183d3c7a343521e739cfe0b788c4b290",
+ "wdspec"
+ ],
"webdriver/tests/get_element_property/__init__.py": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"support"
@@ -647425,6 +655358,18 @@
"16a098536fde814b5ac8bcb35dac01ac38649d2e",
"wdspec"
],
+ "webdriver/tests/get_element_rect/__init__.py": [
+ "abf1a91367517107b3b690466a4b570c0a3b7cab",
+ "support"
+ ],
+ "webdriver/tests/get_element_rect/get.py": [
+ "433e2f6bf8b428136a36b81138386e62eb257daf",
+ "wdspec"
+ ],
+ "webdriver/tests/get_element_rect/user_prompts.py": [
+ "ec1047bd3893d51f4b2be9597d87ba4a63b6a353",
+ "wdspec"
+ ],
"webdriver/tests/get_element_tag_name/__init__.py": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"support"
@@ -647450,7 +655395,7 @@
"support"
],
"webdriver/tests/get_named_cookie/get.py": [
- "915f26c801b5a69e1ed2a2d9f73fe0d862bf525a",
+ "50a465191687fe1c79a910cdd6fed376fb001184",
"wdspec"
],
"webdriver/tests/get_timeouts/__init__.py": [
@@ -647513,6 +655458,18 @@
"d049d835f2fc60df7296da08a013793ae7e398ca",
"testharness"
],
+ "webdriver/tests/is_element_enabled/__init__.py": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "webdriver/tests/is_element_enabled/enabled.py": [
+ "dd56084d8d0eca15b7b6d46491bbd9f0a64cef40",
+ "wdspec"
+ ],
+ "webdriver/tests/is_element_enabled/user_prompts.py": [
+ "bd8bc81bdfcce13e5cdbfec336749cd668bd68ef",
+ "wdspec"
+ ],
"webdriver/tests/is_element_selected/__init__.py": [
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"support"
@@ -647578,7 +655535,7 @@
"wdspec"
],
"webdriver/tests/new_session/invalid_capabilities.py": [
- "83f93ea22f7ed28fa28ab05d36387df828716026",
+ "f31ce3b8b6fd5f8e4a9ff4d0137debdb7dacdea4",
"wdspec"
],
"webdriver/tests/new_session/merge.py": [
@@ -647602,7 +655559,7 @@
"support"
],
"webdriver/tests/new_session/support/create.py": [
- "85ae1cd4ea85e0a1e0d712b1a7803d6066ab8739",
+ "475fe5a424fe609f0a7e55164e56378e229e4885",
"support"
],
"webdriver/tests/new_session/timeouts.py": [
@@ -647634,7 +655591,7 @@
"support"
],
"webdriver/tests/send_alert_text/send.py": [
- "edc37d6edb483c232401676f6c11ab7512774605",
+ "6dbc03f94019abf6fc467ae2baf8fb9d21823e64",
"wdspec"
],
"webdriver/tests/set_timeouts/__init__.py": [
@@ -647642,7 +655599,11 @@
"support"
],
"webdriver/tests/set_timeouts/set.py": [
- "e603e217ec7d73bf7bc59f1d2e8687a89c818c47",
+ "a78ab2e68e82ba28c15748bb98239b3d232dc9f1",
+ "wdspec"
+ ],
+ "webdriver/tests/set_timeouts/user_prompts.py": [
+ "a98d87e9b2e2ca252a3ed7cf215a20bd1c299818",
"wdspec"
],
"webdriver/tests/set_window_rect/__init__.py": [
@@ -647670,11 +655631,15 @@
"support"
],
"webdriver/tests/support/asserts.py": [
- "44c76a96b0997100a0201a5ffafd20e9967758ec",
+ "2d305a0f3bec08d6b773541e556258416e737f7f",
"support"
],
- "webdriver/tests/support/fixtures.py": [
- "64427b4670f72c9ea069d0f008d93ad63a9781c0",
+ "webdriver/tests/support/defaults.py": [
+ "c2020527a6f38a628b2c1a4199caaff46cf0c36b",
+ "support"
+ ],
+ "webdriver/tests/support/helpers.py": [
+ "b2db3e7b0d338f1325214cd8019b7cac613dd8b1",
"support"
],
"webdriver/tests/support/http_request.py": [
@@ -647682,7 +655647,7 @@
"support"
],
"webdriver/tests/support/inline.py": [
- "2f8fe9b79e3bacf1fb3bd9bcd981c8d8389fcd08",
+ "3bf56c84bedb47e024a88983fa15c232ddba7899",
"support"
],
"webdriver/tests/support/merge_dictionaries.py": [
@@ -647717,6 +655682,30 @@
"907be66a149e8196c87760544140636d9625bbb9",
"wdspec"
],
+ "webdriver/tests/take_element_screenshot/__init__.py": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "webdriver/tests/take_element_screenshot/screenshot.py": [
+ "e4d2869af4f3a50aa4da87b499d84b75254967a7",
+ "wdspec"
+ ],
+ "webdriver/tests/take_element_screenshot/user_prompts.py": [
+ "fa239999e4f3479526423498f5718a455ffde53f",
+ "wdspec"
+ ],
+ "webdriver/tests/take_screenshot/__init__.py": [
+ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
+ "support"
+ ],
+ "webdriver/tests/take_screenshot/screenshot.py": [
+ "d3153710f7b108f167a4ff82b9ef288bcfa9440c",
+ "wdspec"
+ ],
+ "webdriver/tests/take_screenshot/user_prompts.py": [
+ "4d4840f08ba6f57f3e22bda72a0071128bea9be0",
+ "wdspec"
+ ],
"webgl/META.yml": [
"8e6b680d91c9b81b85e3ce010c5fb9fe338f37bf",
"support"
@@ -648298,7 +656287,7 @@
"testharness"
],
"webrtc/RTCConfiguration-iceServers.html": [
- "42bc896349ccf4f81384d16d7d465d0aa90aa489",
+ "6069c25af4accf7334f25f1bd30b687c2022aa6c",
"testharness"
],
"webrtc/RTCConfiguration-iceTransportPolicy.html": [
@@ -648350,7 +656339,7 @@
"testharness"
],
"webrtc/RTCIceTransport-extension.https.html": [
- "88a10bb464e5259899c777bb3608b77e4e4141d7",
+ "9c6cec7e1e4994ee58f6822d77048eca8e8af569",
"testharness"
],
"webrtc/RTCIceTransport.html": [
@@ -648517,6 +656506,18 @@
"07e9736441285536e0549c55b110a562b49276cc",
"testharness"
],
+ "webrtc/RTCQuicStream.https.html": [
+ "1e08016d75af57307d922b9876605e8152f92768",
+ "testharness"
+ ],
+ "webrtc/RTCQuicTransport-helper.js": [
+ "50d9e6666a2d3bf8b3128f94b3c902579fabc0f5",
+ "support"
+ ],
+ "webrtc/RTCQuicTransport.https.html": [
+ "703f424a63851996b3708fe66caff63c7e0f5502",
+ "testharness"
+ ],
"webrtc/RTCRtpCapabilities-helper.js": [
"fb297c35fb1126e8985ff2f2a0dd1dd824ca5c1d",
"support"
@@ -648650,7 +656651,7 @@
"testharness"
],
"webrtc/no-media-call.html": [
- "c4979e8521478a0f8175a5f945cd217f8c60d548",
+ "8f4f5962d4af9de8fd25b9a64aedb49c7b0a0824",
"testharness"
],
"webrtc/promises-call.html": [
@@ -648666,7 +656667,7 @@
"testharness"
],
"webrtc/simplecall.https.html": [
- "6adefe774923472f1fb1ddc4f952f44dd4247f1f",
+ "681c42d4cd855dcf53543a7add231d2665c381a9",
"testharness"
],
"webrtc/tools/.eslintrc.js": [
@@ -649146,7 +657147,11 @@
"testharness"
],
"websockets/cookies/006.html": [
- "7e975879a3512c6024eec4532f783c295a043ffc",
+ "0e958d25e5d276cc78b6394a1332ea42a510e3f4",
+ "testharness"
+ ],
+ "websockets/cookies/006.https.html": [
+ "015eeb22f07a1d744c490248633eae9953ba5e6d",
"testharness"
],
"websockets/cookies/007.html": [
@@ -649934,7 +657939,11 @@
"support"
],
"webusb/resources/open-in-iframe.html": [
- "0b04a3e03aaa5e18574a56ad4959e1601f1ef432",
+ "ec80bff3c234495112d780ac975288727965021e",
+ "support"
+ ],
+ "webusb/resources/open-in-worker.js": [
+ "b715184e04dd575e1e1d5a9bb4731e58ed6eecb5",
"support"
],
"webusb/resources/usb-allowed-by-feature-policy-worker.js": [
@@ -649946,7 +657955,7 @@
"support"
],
"webusb/resources/usb-helpers.js": [
- "93740920dee8f259fc266cd4927b5972985df77e",
+ "a3a4a31ba889f719c68cd2ca4f263bc56d67b7a6",
"support"
],
"webusb/usb-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
@@ -649970,7 +657979,7 @@
"testharness"
],
"webusb/usb-disabled-by-feature-policy.https.sub.html": [
- "3a8a9183591605a69081e0e29beb7a2358def75b",
+ "97e66b2a373f73de5fd705cdaabb60d5625127f5",
"testharness"
],
"webusb/usb-disabled-by-feature-policy.https.sub.html.headers": [
@@ -649982,7 +657991,7 @@
"testharness"
],
"webusb/usb.https.window.js": [
- "ee26619cf2224a31e32a393b7edb0869a0598704",
+ "8c9e676cdfc3346ec8f057f99355fb75b708e3c1",
"testharness"
],
"webusb/usb.serviceworker.https.html": [
@@ -649993,22 +658002,42 @@
"c509adfef0d4c0cd3e68cc84467ac7db1140d643",
"support"
],
+ "webusb/usbAlternateInterface.https.any.js": [
+ "e5ef3844ae44008db5424275c760572a0147a518",
+ "testharness"
+ ],
+ "webusb/usbConfiguration.https.any.js": [
+ "e7d1c7fb146dcd7b50dab6088f8a0e1f14259c99",
+ "testharness"
+ ],
"webusb/usbConnectionEvent.https.any.js": [
"9d4f60abc48733da6bf06ed7673228fb4a31d628",
"testharness"
],
"webusb/usbDevice-iframe.https.html": [
- "02b2c5010fb566a485bf6887295a05cae3822e37",
+ "75bad9e0c9f5223fe9b6427db1ea7afdb23dd727",
+ "testharness"
+ ],
+ "webusb/usbDevice-worker.https.html": [
+ "119f5d6688235e396db1d118cec8b61324e46d8a",
"testharness"
],
"webusb/usbDevice.https.any.js": [
- "da7df081b8b16c61eff714bd4302c21123d0ddc5",
+ "046de82b1bd8be1fc620535615fd7f1483653f78",
+ "testharness"
+ ],
+ "webusb/usbEndpoint.https.any.js": [
+ "e57639c3d4b9e40606978fbb17bf9d604e65337b",
"testharness"
],
"webusb/usbInTransferResult.https.any.js": [
"4cdb58e467b5770f5a08329ac59c209bde56fa60",
"testharness"
],
+ "webusb/usbInterface.https.any.js": [
+ "7fbf660bbce014f3ba2595382749ebaafef284aa",
+ "testharness"
+ ],
"webusb/usbIsochronousInTransferPacket.https.any.js": [
"ee992f998b6078d6d65dfcfd4b5e33a31dcae10f",
"testharness"
@@ -653481,6 +661510,10 @@
"f8fe65e520c4ed9dd0c8779fe55b76459571ec94",
"testharness"
],
+ "workers/importscripts_mime.tentative.any.js": [
+ "04c63a3a5f6d9bd3b71d94142f65a1825358b8ed",
+ "testharness"
+ ],
"workers/interfaces.worker.js": [
"fc9f3606faee5aa65ceeae002e2c8398a4092109",
"testharness"
@@ -654265,6 +662298,10 @@
"0fb0ec228079de8dd15626fb3161b53d48c68112",
"support"
],
+ "workers/support/imported_script.py": [
+ "88cd2285e82162679c0bcbcc1ff756c91c12a5a0",
+ "support"
+ ],
"workers/support/name-as-accidental-global.js": [
"f2c39ea715aa64a990eda923931969a890ce336d",
"support"
@@ -654333,6 +662370,26 @@
"33000ee860c358700a108ac98663c40a99229438",
"testharness"
],
+ "worklets/audio-worklet-credentials.https.html": [
+ "9d867db7ce0a672c3ee016937a610fb1cdbc011c",
+ "testharness"
+ ],
+ "worklets/audio-worklet-csp.https.html": [
+ "ef148a4a098472b7a76bac9ad99fb52f964b2ace",
+ "testharness"
+ ],
+ "worklets/audio-worklet-import.https.html": [
+ "cff063a4361bd0244ee7a7a352be849f1b7118a6",
+ "testharness"
+ ],
+ "worklets/audio-worklet-referrer.https.html": [
+ "f258cd5a452d57002d041211cb44ee6f27f0b3aa",
+ "testharness"
+ ],
+ "worklets/audio-worklet-service-worker-interception.https.html": [
+ "479ae176f9d4a2ff52d7a643a4943df2ef72453d",
+ "testharness"
+ ],
"worklets/idlharness.worker.js": [
"827dd02c4c53292b534677454c11264f415678a5",
"testharness"
@@ -654494,7 +662551,7 @@
"support"
],
"worklets/resources/worklet-test-utils.js": [
- "499999f22df3aad2053b7da6852f8e7aeea2bde8",
+ "797edc9e563a7e089379d6bb0947da06f205ddc7",
"support"
],
"wpt": [
@@ -654574,7 +662631,7 @@
"testharness"
],
"xhr/abort-after-stop.htm": [
- "7c5060fa4c60978d6ef850b99153b78176e002b6",
+ "d28d046fa9896ca50a98efc39a4b70a05ae586ff",
"testharness"
],
"xhr/abort-after-timeout.htm": [
@@ -654978,7 +663035,7 @@
"testharness"
],
"xhr/headers-normalize-response.htm": [
- "466b0d977cc6cdba12190a27dfe42e6452ea98d8",
+ "84f2fc8582127b9a8e271887d420b3ea7a87696a",
"testharness"
],
"xhr/historical.html": [
@@ -654998,13 +663055,17 @@
"testharness"
],
"xhr/open-after-abort.htm": [
- "c9c6304422805fc3a137d0a05701af46e6884b5e",
+ "c9ef6e7ac94ec536d08fc021091f6facf7fb71b5",
"testharness"
],
"xhr/open-after-setrequestheader.htm": [
"ca1ae25946f0ef00074d7884cdbe28bf753bc2a2",
"testharness"
],
+ "xhr/open-after-stop.window.js": [
+ "e836a523f86e56e37fc83e5c357392581fb31d20",
+ "testharness"
+ ],
"xhr/open-during-abort-event.htm": [
"22c3be9bc44c59fb297581bee3cac390d9a68b3d",
"testharness"
@@ -655773,6 +663834,10 @@
"9456aa77c53585f0c13bac628770521428e6022a",
"testharness"
],
+ "xhr/send-data-readablestream.any.js": [
+ "cca6e76a042cc8a5b55e1ead306ddaf9467b8c09",
+ "testharness"
+ ],
"xhr/send-data-unexpected-tostring.htm": [
"b8a3b4ae6902357cfe392c484e8413bff1729061",
"testharness"
@@ -655994,7 +664059,7 @@
"testharness"
],
"xhr/timeout-multiple-fetches.html": [
- "30d6b736c56d5576483c12a7413dd809d27d89e8",
+ "4f4998c4285222bf4bdf41c3e0c1c27e913d2149",
"testharness"
],
"xhr/timeout-sync.htm": [
diff --git a/tests/wpt/metadata/cors/remote-origin.htm.ini b/tests/wpt/metadata/cors/remote-origin.htm.ini
index e9a518810d1..71490850fc9 100644
--- a/tests/wpt/metadata/cors/remote-origin.htm.ini
+++ b/tests/wpt/metadata/cors/remote-origin.htm.ini
@@ -1,5 +1,5 @@
[remote-origin.htm]
- type: testharness
+ bug: https://github.com/servo/servo/issues/21563
expected: TIMEOUT
[Allow origin: *]
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/CSS2/borders/groove-default.html.ini b/tests/wpt/metadata/css/CSS2/borders/groove-default.html.ini
new file mode 100644
index 00000000000..4fad9155e45
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/borders/groove-default.html.ini
@@ -0,0 +1,2 @@
+[groove-default.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/borders/ridge-default.html.ini b/tests/wpt/metadata/css/CSS2/borders/ridge-default.html.ini
new file mode 100644
index 00000000000..706fdcd9585
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/borders/ridge-default.html.ini
@@ -0,0 +1,2 @@
+[ridge-default.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/box-display/root-box-003.xht.ini b/tests/wpt/metadata/css/CSS2/box-display/root-box-003.xht.ini
index 67e82579400..885ef9be34e 100644
--- a/tests/wpt/metadata/css/CSS2/box-display/root-box-003.xht.ini
+++ b/tests/wpt/metadata/css/CSS2/box-display/root-box-003.xht.ini
@@ -1,3 +1,3 @@
[root-box-003.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21577
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/CSS2/floats/float-nowrap-2.html.ini b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-2.html.ini
new file mode 100644
index 00000000000..7d7dc81b6bd
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-2.html.ini
@@ -0,0 +1,2 @@
+[float-nowrap-2.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/floats/float-nowrap-3.html.ini b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-3.html.ini
new file mode 100644
index 00000000000..36f0336a409
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-3.html.ini
@@ -0,0 +1,2 @@
+[float-nowrap-3.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/floats/float-nowrap-5.html.ini b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-5.html.ini
new file mode 100644
index 00000000000..1fee92769c9
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-5.html.ini
@@ -0,0 +1,2 @@
+[float-nowrap-5.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/floats/float-nowrap-7.html.ini b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-7.html.ini
new file mode 100644
index 00000000000..d3a5d2cbe02
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-7.html.ini
@@ -0,0 +1,2 @@
+[float-nowrap-7.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/floats/float-nowrap-8.html.ini b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-8.html.ini
new file mode 100644
index 00000000000..8e07c478055
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-8.html.ini
@@ -0,0 +1,2 @@
+[float-nowrap-8.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/floats/float-nowrap-9.html.ini b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-9.html.ini
new file mode 100644
index 00000000000..8eab0f65aff
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/floats/float-nowrap-9.html.ini
@@ -0,0 +1,2 @@
+[float-nowrap-9.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/linebox/anonymous-inline-inherit-001.html.ini b/tests/wpt/metadata/css/CSS2/linebox/anonymous-inline-inherit-001.html.ini
new file mode 100644
index 00000000000..98fac618bce
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/linebox/anonymous-inline-inherit-001.html.ini
@@ -0,0 +1,2 @@
+[anonymous-inline-inherit-001.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html.ini b/tests/wpt/metadata/css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html.ini
new file mode 100644
index 00000000000..0f0d8404e60
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html.ini
@@ -0,0 +1,2 @@
+[float-percentage-resolution-quirks-mode.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-animations/Element-getAnimations.tentative.html.ini b/tests/wpt/metadata/css/css-animations/Element-getAnimations.tentative.html.ini
index 1e8cee3b263..bf27b93175b 100644
--- a/tests/wpt/metadata/css/css-animations/Element-getAnimations.tentative.html.ini
+++ b/tests/wpt/metadata/css/css-animations/Element-getAnimations.tentative.html.ini
@@ -1,4 +1,5 @@
[Element-getAnimations.tentative.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[getAnimations for CSS Animations with animation-name: none]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-animations/animation-delay-008.html.ini b/tests/wpt/metadata/css/css-animations/animation-delay-008.html.ini
index 9daaa6465b7..8c73595a2bc 100644
--- a/tests/wpt/metadata/css/css-animations/animation-delay-008.html.ini
+++ b/tests/wpt/metadata/css/css-animations/animation-delay-008.html.ini
@@ -1,2 +1,3 @@
[animation-delay-008.html]
+ bug: https://github.com/servo/servo/issues/17335
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-animations/animation-delay-009.html.ini b/tests/wpt/metadata/css/css-animations/animation-delay-009.html.ini
index 6b52057e84c..f6b5b3a2227 100644
--- a/tests/wpt/metadata/css/css-animations/animation-delay-009.html.ini
+++ b/tests/wpt/metadata/css/css-animations/animation-delay-009.html.ini
@@ -1,2 +1,3 @@
[animation-delay-009.html]
+ bug: https://github.com/servo/servo/issues/17335
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-animations/animation-delay-010.html.ini b/tests/wpt/metadata/css/css-animations/animation-delay-010.html.ini
index e163339dcde..8f275c978f4 100644
--- a/tests/wpt/metadata/css/css-animations/animation-delay-010.html.ini
+++ b/tests/wpt/metadata/css/css-animations/animation-delay-010.html.ini
@@ -1,2 +1,3 @@
[animation-delay-010.html]
+ bug: https://github.com/servo/servo/issues/17335
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-animations/animationevent-pseudoelement.html.ini b/tests/wpt/metadata/css/css-animations/animationevent-pseudoelement.html.ini
index fa19a3fabd9..69cb0d12c27 100644
--- a/tests/wpt/metadata/css/css-animations/animationevent-pseudoelement.html.ini
+++ b/tests/wpt/metadata/css/css-animations/animationevent-pseudoelement.html.ini
@@ -1,4 +1,5 @@
[animationevent-pseudoelement.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[AnimationEvent should have the correct pseudoElement memeber]
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-animations/animationevent-types.html.ini b/tests/wpt/metadata/css/css-animations/animationevent-types.html.ini
index ef3058d091b..9a5d66fd1ef 100644
--- a/tests/wpt/metadata/css/css-animations/animationevent-types.html.ini
+++ b/tests/wpt/metadata/css/css-animations/animationevent-types.html.ini
@@ -1,4 +1,5 @@
[animationevent-types.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[animationiteration event is instanceof AnimationEvent]
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-animations/parsing/animation-timing-function-valid.html.ini b/tests/wpt/metadata/css/css-animations/parsing/animation-timing-function-valid.html.ini
new file mode 100644
index 00000000000..5b628b31463
--- /dev/null
+++ b/tests/wpt/metadata/css/css-animations/parsing/animation-timing-function-valid.html.ini
@@ -0,0 +1,4 @@
+[animation-timing-function-valid.html]
+ [e.style['animation-timing-function'\] = "steps(2, end)" should set the property value]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/css/css-backgrounds/background-clip-color-repaint.html.ini b/tests/wpt/metadata/css/css-backgrounds/background-clip-color-repaint.html.ini
index 8006908e63f..625620c95fe 100644
--- a/tests/wpt/metadata/css/css-backgrounds/background-clip-color-repaint.html.ini
+++ b/tests/wpt/metadata/css/css-backgrounds/background-clip-color-repaint.html.ini
@@ -1,2 +1,3 @@
[background-clip-color-repaint.html]
+ bug: https://github.com/servo/servo/issues/8984
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-backgrounds/background-image-none-gradient-repaint.html.ini b/tests/wpt/metadata/css/css-backgrounds/background-image-none-gradient-repaint.html.ini
index edbd34d5956..d279b5501ce 100644
--- a/tests/wpt/metadata/css/css-backgrounds/background-image-none-gradient-repaint.html.ini
+++ b/tests/wpt/metadata/css/css-backgrounds/background-image-none-gradient-repaint.html.ini
@@ -1,2 +1,3 @@
[background-image-none-gradient-repaint.html]
+ bug: https://github.com/servo/servo/issues/8984
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-flexbox/css-flexbox-height-animation-stretch.html.ini b/tests/wpt/metadata/css/css-flexbox/css-flexbox-height-animation-stretch.html.ini
index 867e439d513..a1ae32d8665 100644
--- a/tests/wpt/metadata/css/css-flexbox/css-flexbox-height-animation-stretch.html.ini
+++ b/tests/wpt/metadata/css/css-flexbox/css-flexbox-height-animation-stretch.html.ini
@@ -1,4 +1,3 @@
[css-flexbox-height-animation-stretch.html]
- type: reftest
- expected: TIMEOUT
bug: https://github.com/servo/servo/issues/12328
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-flexbox/percentage-heights-quirks-node.html.ini b/tests/wpt/metadata/css/css-flexbox/percentage-heights-quirks-node.html.ini
new file mode 100644
index 00000000000..93d9378dbbd
--- /dev/null
+++ b/tests/wpt/metadata/css/css-flexbox/percentage-heights-quirks-node.html.ini
@@ -0,0 +1,2 @@
+[percentage-heights-quirks-node.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-fonts/font-display/font-display-change.html.ini b/tests/wpt/metadata/css/css-fonts/font-display/font-display-change.html.ini
index 8643675f6b3..91a16f6e00f 100644
--- a/tests/wpt/metadata/css/css-fonts/font-display/font-display-change.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/font-display/font-display-change.html.ini
@@ -1,2 +1,3 @@
[font-display-change.html]
+ bug: https://github.com/servo/servo/issues/21565
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-fonts/font-display/font-display-preload.html.ini b/tests/wpt/metadata/css/css-fonts/font-display/font-display-preload.html.ini
index c48b125c49d..e3d080a6d44 100644
--- a/tests/wpt/metadata/css/css-fonts/font-display/font-display-preload.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/font-display/font-display-preload.html.ini
@@ -1,2 +1,3 @@
[font-display-preload.html]
+ bug: https://github.com/servo/servo/issues/21566
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-fonts/matching/fixed-stretch-style-over-weight.html.ini b/tests/wpt/metadata/css/css-fonts/matching/fixed-stretch-style-over-weight.html.ini
index f250fcdd5c5..e312e61375b 100644
--- a/tests/wpt/metadata/css/css-fonts/matching/fixed-stretch-style-over-weight.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/matching/fixed-stretch-style-over-weight.html.ini
@@ -1,2 +1,3 @@
[fixed-stretch-style-over-weight.html]
+ bug: https://github.com/servo/servo/issues/21565
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-fonts/matching/stretch-distance-over-weight-distance.html.ini b/tests/wpt/metadata/css/css-fonts/matching/stretch-distance-over-weight-distance.html.ini
index ebffcd24301..a294317d66c 100644
--- a/tests/wpt/metadata/css/css-fonts/matching/stretch-distance-over-weight-distance.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/matching/stretch-distance-over-weight-distance.html.ini
@@ -1,2 +1,3 @@
[stretch-distance-over-weight-distance.html]
+ bug: https://github.com/servo/servo/issues/21565
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-fonts/matching/style-ranges-over-weight-direction.html.ini b/tests/wpt/metadata/css/css-fonts/matching/style-ranges-over-weight-direction.html.ini
index 0c0bc477b0b..86fe3cb5e66 100644
--- a/tests/wpt/metadata/css/css-fonts/matching/style-ranges-over-weight-direction.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/matching/style-ranges-over-weight-direction.html.ini
@@ -1,2 +1,3 @@
[style-ranges-over-weight-direction.html]
+ bug: https://github.com/servo/servo/issues/21565
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-descriptors.html.ini b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-descriptors.html.ini
index 9e3503f9bb5..2b3a4401d40 100644
--- a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-descriptors.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-descriptors.html.ini
@@ -251,3 +251,9 @@
[font-stretch(valid): Negative calc expression (to be clamped): calc(50% - 50%*2)]
expected: FAIL
+ [font-weight(valid): Valid calc expression with out-of-range value (should be clamped): calc(100.5*3 + 800)]
+ expected: FAIL
+
+ [font-weight(valid): Out-of-range simple calc value (should be clamped): calc(1001)]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini
index 04cfbdc7eee..2ebb4ee549a 100644
--- a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini
@@ -41,9 +41,6 @@
[Matching font-weight: '430' should prefer '340 398' over '501 550']
expected: FAIL
- [Matching font-weight: '430' should prefer '501 550' over '502 560']
- expected: FAIL
-
[Matching font-weight: '500' should prefer '500' over '450 460']
expected: FAIL
@@ -335,3 +332,6 @@
[Descriptor matching priority: Style has higher priority than weight]
expected: FAIL
+ [Matching font-weight: '430' should prefer '501 550' over '502 560']
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/css/css-fonts/variations/font-style-interpolation.html.ini b/tests/wpt/metadata/css/css-fonts/variations/font-style-interpolation.html.ini
index fd9f8617078..21acb456b9f 100644
--- a/tests/wpt/metadata/css/css-fonts/variations/font-style-interpolation.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/variations/font-style-interpolation.html.ini
@@ -1,4 +1,5 @@
[font-style-interpolation.html]
+ bug: https://github.com/servo/servo/issues/21570
expected: TIMEOUT
[font-style animation]
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-fonts/variations/font-weight-interpolation.html.ini b/tests/wpt/metadata/css/css-fonts/variations/font-weight-interpolation.html.ini
index 194408cdd9a..128acd80d67 100644
--- a/tests/wpt/metadata/css/css-fonts/variations/font-weight-interpolation.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/variations/font-weight-interpolation.html.ini
@@ -1,4 +1,5 @@
[font-weight-interpolation.html]
+ bug: https://github.com/servo/servo/issues/21570
expected: TIMEOUT
[font-weight animation]
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-fonts/variations/variable-box-font.html.ini b/tests/wpt/metadata/css/css-fonts/variations/variable-box-font.html.ini
index 0752f997a84..ca0288ff93a 100644
--- a/tests/wpt/metadata/css/css-fonts/variations/variable-box-font.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/variations/variable-box-font.html.ini
@@ -1,2 +1,3 @@
[variable-box-font.html]
+ bug: https://github.com/servo/servo/issues/21565
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-fonts/variations/variable-gpos-m2b.html.ini b/tests/wpt/metadata/css/css-fonts/variations/variable-gpos-m2b.html.ini
index 25b5f4f981c..1724e7d70a7 100644
--- a/tests/wpt/metadata/css/css-fonts/variations/variable-gpos-m2b.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/variations/variable-gpos-m2b.html.ini
@@ -1,2 +1,3 @@
[variable-gpos-m2b.html]
+ bug: https://github.com/servo/servo/issues/21565
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-fonts/variations/variable-gsub.html.ini b/tests/wpt/metadata/css/css-fonts/variations/variable-gsub.html.ini
index fb47910bae1..981f720e07f 100644
--- a/tests/wpt/metadata/css/css-fonts/variations/variable-gsub.html.ini
+++ b/tests/wpt/metadata/css/css-fonts/variations/variable-gsub.html.ini
@@ -1,2 +1,3 @@
[variable-gsub.html]
+ bug: https://github.com/servo/servo/issues/21565
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-br-inside-avoidcolumn-001.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-br-inside-avoidcolumn-001.xht.ini
index d3d0f1e64e9..a3c26e00475 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-br-inside-avoidcolumn-001.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-br-inside-avoidcolumn-001.xht.ini
@@ -1,5 +1,5 @@
[multicol-br-inside-avoidcolumn-001.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21571
expected:
if os == "linux": FAIL
TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-containing-002.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-containing-002.xht.ini
index 24654e4c083..925a9394034 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-containing-002.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-containing-002.xht.ini
@@ -1,3 +1,3 @@
[multicol-containing-002.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21572
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-002.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-002.xht.ini
index 046685a3504..effc9f5ac8f 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-002.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-002.xht.ini
@@ -1,3 +1,3 @@
[multicol-fill-auto-002.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21572
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-001.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-001.xht.ini
index 5a8fc8a25bb..bbb505e8137 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-001.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-001.xht.ini
@@ -1,3 +1,3 @@
[multicol-fill-auto-block-children-001.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21571
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-002.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-002.xht.ini
index c694742d4a9..e754da5cdde 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-002.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-fill-auto-block-children-002.xht.ini
@@ -1,3 +1,3 @@
[multicol-fill-auto-block-children-002.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21571
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-fill-balance-001.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-fill-balance-001.xht.ini
index c26b201d783..1cf953802f8 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-fill-balance-001.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-fill-balance-001.xht.ini
@@ -1,3 +1,3 @@
[multicol-fill-balance-001.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21572
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-height-block-child-001.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-height-block-child-001.xht.ini
index 578863aca89..c14e757153c 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-height-block-child-001.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-height-block-child-001.xht.ini
@@ -1,3 +1,3 @@
[multicol-height-block-child-001.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21571
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-inherit-003.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-inherit-003.xht.ini
index c0dcc16ba96..59d901c56c3 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-inherit-003.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-inherit-003.xht.ini
@@ -1,3 +1,3 @@
[multicol-inherit-003.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21571
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-margin-001.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-margin-001.xht.ini
index d6718bbc9c6..fec32229660 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-margin-001.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-margin-001.xht.ini
@@ -1,2 +1,3 @@
[multicol-margin-001.xht]
+ bug: https://github.com/servo/servo/issues/21571
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-overflowing-001.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-overflowing-001.xht.ini
index 82afb15f78c..09833763ef7 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-overflowing-001.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-overflowing-001.xht.ini
@@ -1,3 +1,3 @@
[multicol-overflowing-001.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21571
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-rule-002.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-rule-002.xht.ini
index 25a29b02d37..2d5aafaa40b 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-rule-002.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-rule-002.xht.ini
@@ -1,3 +1,3 @@
[multicol-rule-002.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21572
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-rule-fraction-003.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-rule-fraction-003.xht.ini
index c69e747d468..64b49c6de18 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-rule-fraction-003.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-rule-fraction-003.xht.ini
@@ -1,3 +1,3 @@
[multicol-rule-fraction-003.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21572
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-span-all-003.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-span-all-003.xht.ini
index 538a4924253..4a9b03f67f7 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-span-all-003.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-span-all-003.xht.ini
@@ -1,3 +1,3 @@
[multicol-span-all-003.xht]
- type: reftest
+ bug: https://github.com/servo/servo/issues/21571
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-multicol/multicol-width-003.xht.ini b/tests/wpt/metadata/css/css-multicol/multicol-width-003.xht.ini
index 76fb1e7ffd7..43fd7103515 100644
--- a/tests/wpt/metadata/css/css-multicol/multicol-width-003.xht.ini
+++ b/tests/wpt/metadata/css/css-multicol/multicol-width-003.xht.ini
@@ -1,2 +1,3 @@
[multicol-width-003.xht]
+ bug: https://github.com/servo/servo/issues/21572
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-paint-api/registered-property-type.https.html.ini b/tests/wpt/metadata/css/css-paint-api/registered-property-type.https.html.ini
new file mode 100644
index 00000000000..f1625f98a22
--- /dev/null
+++ b/tests/wpt/metadata/css/css-paint-api/registered-property-type.https.html.ini
@@ -0,0 +1,2 @@
+[registered-property-type.https.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-transforms/transform-box/value-changed.html.ini b/tests/wpt/metadata/css/css-transforms/transform-box/value-changed.html.ini
index 0067c94bc23..5abf664f2d3 100644
--- a/tests/wpt/metadata/css/css-transforms/transform-box/value-changed.html.ini
+++ b/tests/wpt/metadata/css/css-transforms/transform-box/value-changed.html.ini
@@ -1,2 +1,3 @@
[value-changed.html]
+ bug: https://github.com/servo/servo/issues/12973
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-transitions/events-006.html.ini b/tests/wpt/metadata/css/css-transitions/events-006.html.ini
index 2fc7af21dd4..a884e8df574 100644
--- a/tests/wpt/metadata/css/css-transitions/events-006.html.ini
+++ b/tests/wpt/metadata/css/css-transitions/events-006.html.ini
@@ -1,4 +1,5 @@
[events-006.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[transition padding-left on ::after]
expected: NOTRUN
diff --git a/tests/wpt/metadata/css/css-transitions/parsing/transition-timing-function-valid.html.ini b/tests/wpt/metadata/css/css-transitions/parsing/transition-timing-function-valid.html.ini
new file mode 100644
index 00000000000..8ee362d5563
--- /dev/null
+++ b/tests/wpt/metadata/css/css-transitions/parsing/transition-timing-function-valid.html.ini
@@ -0,0 +1,4 @@
+[transition-timing-function-valid.html]
+ [e.style['transition-timing-function'\] = "steps(2, end)" should set the property value]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini b/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini
index fc4e1b87fbd..d53af6b3960 100644
--- a/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini
+++ b/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini
@@ -23,9 +23,6 @@
[word-spacing length(mm) / values]
expected: FAIL
- [text-indent length(pc) / values]
- expected: FAIL
-
[opacity number[0,1\](zero-to-one) / values]
expected: FAIL
@@ -95,9 +92,6 @@
[font-size length(in) / values]
expected: FAIL
- [text-indent length(ex) / values]
- expected: FAIL
-
[font-size length(em) / values]
expected: FAIL
@@ -107,9 +101,6 @@
[vertical-align length(em) / values]
expected: FAIL
- [text-indent length(px) / values]
- expected: FAIL
-
[clip rectangle(rectangle) / values]
expected: FAIL
@@ -257,9 +248,6 @@
[max-width length(px) / values]
expected: FAIL
- [text-indent length(mm) / values]
- expected: FAIL
-
[font-size length(mm) / values]
expected: FAIL
@@ -284,9 +272,6 @@
[outline-offset length(in) / values]
expected: FAIL
- [word-spacing length(in) / values]
- expected: FAIL
-
[outline-width length(pt) / values]
expected: FAIL
@@ -311,9 +296,6 @@
[word-spacing length(pt) / values]
expected: FAIL
- [text-indent length(cm) / values]
- expected: FAIL
-
[border-right-width length(mm) / values]
expected: FAIL
@@ -326,18 +308,12 @@
[background-position length(ex) / events]
expected: FAIL
- [text-indent length(pt) / values]
- expected: FAIL
-
[border-right-width length(pt) / values]
expected: FAIL
[border-left-width length(in) / values]
expected: FAIL
- [text-shadow shadow(shadow) / values]
- expected: FAIL
-
[background-position length(pc) / events]
expected: FAIL
@@ -386,9 +362,6 @@
[outline-width length(pc) / values]
expected: FAIL
- [word-spacing percentage(%) / values]
- expected: FAIL
-
[font-weight font-weight(numeric) / values]
expected: FAIL
@@ -404,12 +377,6 @@
[line-height percentage(%) / values]
expected: FAIL
- [text-indent length(in) / values]
- expected: FAIL
-
- [text-indent length(em) / values]
- expected: FAIL
-
[border-top-width length(pt) / values]
expected: FAIL
@@ -464,9 +431,6 @@
[border-bottom-width length(pc) / values]
expected: FAIL
- [text-indent percentage(%) / values]
- expected: FAIL
-
[line-height length(pc) / values]
expected: FAIL
@@ -509,3 +473,39 @@
[min-width length(ex) / values]
expected: FAIL
+ [text-indent length(pc) / values]
+ expected: FAIL
+
+ [text-indent length(ex) / values]
+ expected: FAIL
+
+ [text-indent length(px) / values]
+ expected: FAIL
+
+ [text-indent length(mm) / values]
+ expected: FAIL
+
+ [word-spacing length(in) / values]
+ expected: FAIL
+
+ [text-indent length(cm) / values]
+ expected: FAIL
+
+ [text-indent length(pt) / values]
+ expected: FAIL
+
+ [text-shadow shadow(shadow) / values]
+ expected: FAIL
+
+ [word-spacing percentage(%) / values]
+ expected: FAIL
+
+ [text-indent length(in) / values]
+ expected: FAIL
+
+ [text-indent length(em) / values]
+ expected: FAIL
+
+ [text-indent percentage(%) / values]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini b/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini
index b19aefabeb0..39892257bb0 100644
--- a/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini
+++ b/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini
@@ -1,217 +1,75 @@
[transitions-animatable-properties-01.html]
- expected: TIMEOUT
[border-bottom-width intermediate]
expected: FAIL
[z-index intermediate]
- expected: NOTRUN
+ expected: FAIL
[text-indent intermediate]
- expected: NOTRUN
-
- [margin-right end]
- expected: NOTRUN
+ expected: FAIL
[border-color end]
expected: FAIL
[word-spacing intermediate]
- expected: NOTRUN
-
- [opacity end]
- expected: NOTRUN
-
- [padding-right end]
- expected: NOTRUN
-
- [width end]
- expected: NOTRUN
-
- [word-spacing end]
- expected: NOTRUN
-
- [max-height end]
- expected: NOTRUN
-
- [max-width end]
- expected: NOTRUN
-
- [outline-color end]
- expected: NOTRUN
-
- [text-indent end]
- expected: NOTRUN
-
- [height end]
- expected: NOTRUN
-
- [width intermediate]
- expected: NOTRUN
-
- [outline-width intermediate]
- expected: NOTRUN
+ expected: FAIL
[vertical-align intermediate]
- expected: NOTRUN
-
- [outline-offset end]
- expected: NOTRUN
-
- [margin-top end]
- expected: NOTRUN
-
- [outline-width end]
- expected: NOTRUN
+ expected: FAIL
[right intermediate]
- expected: NOTRUN
-
- [line-height end]
- expected: NOTRUN
+ expected: FAIL
[min-width intermediate]
- expected: NOTRUN
+ expected: FAIL
[background-position end]
expected: FAIL
- [padding-right intermediate]
- expected: NOTRUN
-
- [min-height end]
- expected: NOTRUN
-
- [margin-top intermediate]
- expected: NOTRUN
-
[crop end]
expected: FAIL
- [padding-left end]
- expected: NOTRUN
-
[top intermediate]
- expected: NOTRUN
-
- [text-shadow intermediate]
- expected: NOTRUN
+ expected: FAIL
[font-weight intermediate]
- expected: NOTRUN
+ expected: FAIL
[clip intermediate]
expected: FAIL
- [top end]
- expected: NOTRUN
-
- [font-weight end]
- expected: NOTRUN
-
- [font-size end]
- expected: NOTRUN
-
- [line-height intermediate]
- expected: NOTRUN
-
- [height intermediate]
- expected: NOTRUN
-
- [visibility intermediate]
- expected: NOTRUN
-
- [text-shadow end]
- expected: NOTRUN
-
[border-right-width intermediate]
expected: FAIL
- [margin-left end]
- expected: NOTRUN
-
- [letter-spacing intermediate]
- expected: NOTRUN
-
[border-left-width intermediate]
expected: FAIL
- [min-width end]
- expected: NOTRUN
-
- [right end]
- expected: NOTRUN
-
[min-height intermediate]
- expected: NOTRUN
-
- [margin-left intermediate]
- expected: NOTRUN
-
- [margin-right intermediate]
- expected: NOTRUN
+ expected: FAIL
[border-top-width intermediate]
expected: FAIL
- [padding-left intermediate]
- expected: NOTRUN
-
[max-width intermediate]
- expected: NOTRUN
+ expected: FAIL
[max-height intermediate]
- expected: NOTRUN
-
- [padding-top end]
- expected: NOTRUN
-
- [letter-spacing end]
- expected: NOTRUN
+ expected: FAIL
[outline-offset intermediate]
- expected: NOTRUN
-
- [margin-bottom end]
- expected: NOTRUN
-
- [opacity intermediate]
- expected: NOTRUN
+ expected: FAIL
[border-spacing intermediate]
expected: FAIL
- [vertical-align end]
- expected: NOTRUN
-
- [padding-top intermediate]
- expected: NOTRUN
-
- [padding-bottom intermediate]
- expected: NOTRUN
-
[left intermediate]
- expected: NOTRUN
-
- [visibility end]
- expected: NOTRUN
-
- [left end]
- expected: NOTRUN
-
- [outline-color intermediate]
- expected: NOTRUN
-
- [padding-bottom end]
- expected: NOTRUN
-
- [margin-bottom intermediate]
- expected: NOTRUN
+ expected: FAIL
- [z-index end]
- expected: NOTRUN
+ [outline-width intermediate]
+ expected: FAIL
- [font-size intermediate]
- expected: NOTRUN
+ [padding-right end]
+ expected: FAIL
[border-top-width end]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-values/vh-interpolate-pct.html.ini b/tests/wpt/metadata/css/css-values/vh-interpolate-pct.html.ini
index 34fc465d5c1..7d7e83d699e 100644
--- a/tests/wpt/metadata/css/css-values/vh-interpolate-pct.html.ini
+++ b/tests/wpt/metadata/css/css-values/vh-interpolate-pct.html.ini
@@ -1,3 +1,3 @@
[vh-interpolate-pct.html]
- type: reftest
+ bug: https://github.com/servo/servo/issues/17335
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-values/vh-interpolate-px.html.ini b/tests/wpt/metadata/css/css-values/vh-interpolate-px.html.ini
index a0a46af3d5f..4263bf37abb 100644
--- a/tests/wpt/metadata/css/css-values/vh-interpolate-px.html.ini
+++ b/tests/wpt/metadata/css/css-values/vh-interpolate-px.html.ini
@@ -1,3 +1,3 @@
[vh-interpolate-px.html]
- type: reftest
+ bug: https://github.com/servo/servo/issues/17335
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-values/vh-interpolate-vh.html.ini b/tests/wpt/metadata/css/css-values/vh-interpolate-vh.html.ini
index 58830513dbb..284e7675a11 100644
--- a/tests/wpt/metadata/css/css-values/vh-interpolate-vh.html.ini
+++ b/tests/wpt/metadata/css/css-values/vh-interpolate-vh.html.ini
@@ -1,3 +1,3 @@
[vh-interpolate-vh.html]
- type: reftest
+ bug: https://github.com/servo/servo/issues/17335
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini b/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini
new file mode 100644
index 00000000000..6c46d48c239
--- /dev/null
+++ b/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini
@@ -0,0 +1,3 @@
+[vh_not_refreshing_on_chrome.html]
+ bug: https://github.com/servo/servo/issues/8984
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-variables/variable-animation-from-to.html.ini b/tests/wpt/metadata/css/css-variables/variable-animation-from-to.html.ini
index 8ba469c4066..79ed388547d 100644
--- a/tests/wpt/metadata/css/css-variables/variable-animation-from-to.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-animation-from-to.html.ini
@@ -1,4 +1,5 @@
[variable-animation-from-to.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify CSS variable value before animation]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-variables/variable-animation-over-transition.html.ini b/tests/wpt/metadata/css/css-variables/variable-animation-over-transition.html.ini
index 673ee26523a..c6edf5d258b 100644
--- a/tests/wpt/metadata/css/css-variables/variable-animation-over-transition.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-animation-over-transition.html.ini
@@ -1,4 +1,5 @@
[variable-animation-over-transition.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify CSS variable value before animation]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-shorthand.html.ini b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-shorthand.html.ini
index 6d571e7905d..baa566691e6 100644
--- a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-shorthand.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-shorthand.html.ini
@@ -1,4 +1,5 @@
[variable-animation-substitute-into-keyframe-shorthand.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify border-bottom-color before animation]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-transform.html.ini b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-transform.html.ini
index fd3f7367e79..83d7114a33c 100644
--- a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-transform.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe-transform.html.ini
@@ -1,4 +1,5 @@
[variable-animation-substitute-into-keyframe-transform.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify transform before animation]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe.html.ini b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe.html.ini
index 16ffff1171d..1e19344cbec 100644
--- a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-into-keyframe.html.ini
@@ -1,4 +1,5 @@
[variable-animation-substitute-into-keyframe.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify color before animation]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-fallback.html.ini b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-fallback.html.ini
index c47147f8035..ec903a327a8 100644
--- a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-fallback.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-fallback.html.ini
@@ -1,4 +1,5 @@
[variable-animation-substitute-within-keyframe-fallback.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify color before animation]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-multiple.html.ini b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-multiple.html.ini
index 71733e346df..d4f2fefef86 100644
--- a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-multiple.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe-multiple.html.ini
@@ -1,4 +1,5 @@
[variable-animation-substitute-within-keyframe-multiple.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify color before animation]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe.html.ini b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe.html.ini
index 9a464322844..6d7eafff16b 100644
--- a/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-animation-substitute-within-keyframe.html.ini
@@ -1,4 +1,5 @@
[variable-animation-substitute-within-keyframe.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify color before animation]
expected: FAIL
diff --git a/tests/wpt/metadata/css/css-variables/variable-animation-to-only.html.ini b/tests/wpt/metadata/css/css-variables/variable-animation-to-only.html.ini
index 47e00fdaebe..5e862e864ff 100644
--- a/tests/wpt/metadata/css/css-variables/variable-animation-to-only.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-animation-to-only.html.ini
@@ -1,4 +1,5 @@
[variable-animation-to-only.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify CSS variable value after animation]
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/css-variables/variable-transitions-from-no-value.html.ini b/tests/wpt/metadata/css/css-variables/variable-transitions-from-no-value.html.ini
index cd4c1bf094f..1d039975c27 100644
--- a/tests/wpt/metadata/css/css-variables/variable-transitions-from-no-value.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-transitions-from-no-value.html.ini
@@ -1,4 +1,5 @@
[variable-transitions-from-no-value.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify CSS variable value after transition]
expected: NOTRUN
diff --git a/tests/wpt/metadata/css/css-variables/variable-transitions-to-no-value.html.ini b/tests/wpt/metadata/css/css-variables/variable-transitions-to-no-value.html.ini
index 648d67ca33e..b36005d4be8 100644
--- a/tests/wpt/metadata/css/css-variables/variable-transitions-to-no-value.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-transitions-to-no-value.html.ini
@@ -1,4 +1,5 @@
[variable-transitions-to-no-value.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify CSS variable value after transition]
expected: NOTRUN
diff --git a/tests/wpt/metadata/css/css-variables/variable-transitions-transition-property-variable-before-value.html.ini b/tests/wpt/metadata/css/css-variables/variable-transitions-transition-property-variable-before-value.html.ini
index 9eef6dd478f..53ad4c18ded 100644
--- a/tests/wpt/metadata/css/css-variables/variable-transitions-transition-property-variable-before-value.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-transitions-transition-property-variable-before-value.html.ini
@@ -1,4 +1,5 @@
[variable-transitions-transition-property-variable-before-value.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify CSS variable value after transition]
expected: NOTRUN
diff --git a/tests/wpt/metadata/css/css-variables/variable-transitions-value-before-transition-property-variable.html.ini b/tests/wpt/metadata/css/css-variables/variable-transitions-value-before-transition-property-variable.html.ini
index 4555bf399ca..d9b360988cd 100644
--- a/tests/wpt/metadata/css/css-variables/variable-transitions-value-before-transition-property-variable.html.ini
+++ b/tests/wpt/metadata/css/css-variables/variable-transitions-value-before-transition-property-variable.html.ini
@@ -1,4 +1,5 @@
[variable-transitions-value-before-transition-property-variable.html]
+ bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify CSS variable value after transition]
expected: NOTRUN
diff --git a/tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini b/tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini
index 24029f6afff..e30cdec585a 100644
--- a/tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini
+++ b/tests/wpt/metadata/css/cssom-view/matchMedia.xht.ini
@@ -1,5 +1,5 @@
[matchMedia.xht]
- type: testharness
+ bug: https://github.com/servo/servo/issues/20818
expected: TIMEOUT
[window.matchMedia exists]
expected: FAIL
diff --git a/tests/wpt/metadata/css/cssom/css-style-declaration-modifications.html.ini b/tests/wpt/metadata/css/cssom/css-style-declaration-modifications.html.ini
index 390321fb7f3..1fdb93b2c88 100644
--- a/tests/wpt/metadata/css/cssom/css-style-declaration-modifications.html.ini
+++ b/tests/wpt/metadata/css/cssom/css-style-declaration-modifications.html.ini
@@ -1,24 +1,3 @@
[css-style-declaration-modifications.html]
- type: testharness
+ bug: https://github.com/servo/servo/issues/21579
expected: TIMEOUT
- [CSSStyleDeclaration_accessible]
- expected: FAIL
-
- [read]
- expected: FAIL
-
- [csstext_write]
- expected: FAIL
-
- [property_write]
- expected: FAIL
-
- [Reading CSSStyleDeclaration initialized from a style element]
- expected: FAIL
-
- [Setting CSSStyleDeclaration#cssText]
- expected: FAIL
-
- [Calling CSSStyleDeclaration#setProperty]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/css/cssom/inline-style-001.html.ini b/tests/wpt/metadata/css/cssom/inline-style-001.html.ini
index 96205b5e817..f4ee0e32a0d 100644
--- a/tests/wpt/metadata/css/cssom/inline-style-001.html.ini
+++ b/tests/wpt/metadata/css/cssom/inline-style-001.html.ini
@@ -1,18 +1,3 @@
[inline-style-001.html]
- type: testharness
+ bug: https://github.com/servo/servo/issues/21579
expected: TIMEOUT
- [CSSStyleDeclaration_accessible]
- expected: FAIL
-
- [read]
- expected: FAIL
-
- [csstext_write]
- expected: FAIL
-
- [property_write]
- expected: FAIL
-
- [shorthand_properties]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/css/selectors/focus-within-shadow-001.html.ini b/tests/wpt/metadata/css/selectors/focus-within-shadow-001.html.ini
index 2959e7669e0..d6117e264ff 100644
--- a/tests/wpt/metadata/css/selectors/focus-within-shadow-001.html.ini
+++ b/tests/wpt/metadata/css/selectors/focus-within-shadow-001.html.ini
@@ -1,2 +1,3 @@
[focus-within-shadow-001.html]
+ bug: https://github.com/servo/servo/issues/9370
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/selectors/focus-within-shadow-002.html.ini b/tests/wpt/metadata/css/selectors/focus-within-shadow-002.html.ini
index 30ca33ff38e..74bc0a5a29f 100644
--- a/tests/wpt/metadata/css/selectors/focus-within-shadow-002.html.ini
+++ b/tests/wpt/metadata/css/selectors/focus-within-shadow-002.html.ini
@@ -1,2 +1,3 @@
[focus-within-shadow-002.html]
+ bug: https://github.com/servo/servo/issues/9370
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/selectors/focus-within-shadow-003.html.ini b/tests/wpt/metadata/css/selectors/focus-within-shadow-003.html.ini
index a6171ebf3a1..96675549048 100644
--- a/tests/wpt/metadata/css/selectors/focus-within-shadow-003.html.ini
+++ b/tests/wpt/metadata/css/selectors/focus-within-shadow-003.html.ini
@@ -1,2 +1,3 @@
[focus-within-shadow-003.html]
+ bug: https://github.com/servo/servo/issues/9370
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/selectors/focus-within-shadow-004.html.ini b/tests/wpt/metadata/css/selectors/focus-within-shadow-004.html.ini
index 1e7c496360e..18811f62e64 100644
--- a/tests/wpt/metadata/css/selectors/focus-within-shadow-004.html.ini
+++ b/tests/wpt/metadata/css/selectors/focus-within-shadow-004.html.ini
@@ -1,2 +1,3 @@
[focus-within-shadow-004.html]
+ bug: https://github.com/servo/servo/issues/9370
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/selectors/focus-within-shadow-005.html.ini b/tests/wpt/metadata/css/selectors/focus-within-shadow-005.html.ini
index 585263b0ac8..4693d401c73 100644
--- a/tests/wpt/metadata/css/selectors/focus-within-shadow-005.html.ini
+++ b/tests/wpt/metadata/css/selectors/focus-within-shadow-005.html.ini
@@ -1,2 +1,3 @@
[focus-within-shadow-005.html]
+ bug: https://github.com/servo/servo/issues/9370
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/selectors/focus-within-shadow-006.html.ini b/tests/wpt/metadata/css/selectors/focus-within-shadow-006.html.ini
index dcd9173bb94..731c9e9a4d9 100644
--- a/tests/wpt/metadata/css/selectors/focus-within-shadow-006.html.ini
+++ b/tests/wpt/metadata/css/selectors/focus-within-shadow-006.html.ini
@@ -1,2 +1,3 @@
[focus-within-shadow-006.html]
+ bug: https://github.com/servo/servo/issues/9370
expected: TIMEOUT
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-101.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-101.xml.ini
new file mode 100644
index 00000000000..47a4844a287
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-101.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-101.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-102.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-102.xml.ini
new file mode 100644
index 00000000000..e7f10f8bdee
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-102.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-102.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-103.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-103.xml.ini
new file mode 100644
index 00000000000..48179c48e62
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-103.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-103.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-105.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-105.xml.ini
new file mode 100644
index 00000000000..475c4d528f0
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-105.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-105.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-106.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-106.xml.ini
new file mode 100644
index 00000000000..307392be6b0
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-106.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-106.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-108.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-108.xml.ini
new file mode 100644
index 00000000000..fb3a3e9e26a
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-108.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-108.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-109.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-109.xml.ini
new file mode 100644
index 00000000000..2f79c42e78b
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-109.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-109.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-110.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-110.xml.ini
new file mode 100644
index 00000000000..f3a9c7728a4
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-110.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-110.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-125.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-125.xml.ini
new file mode 100644
index 00000000000..b516295c433
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-125.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-125.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-125b.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-125b.xml.ini
new file mode 100644
index 00000000000..9d199f408bc
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-125b.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-125b.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-126.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-126.xml.ini
new file mode 100644
index 00000000000..034ee12250f
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-126.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-126.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-126b.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-126b.xml.ini
new file mode 100644
index 00000000000..96486994c03
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-126b.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-126b.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-127.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-127.xml.ini
new file mode 100644
index 00000000000..7cf4d50145d
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-127.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-127.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-127b.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-127b.xml.ini
new file mode 100644
index 00000000000..6f84d37f7d8
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-127b.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-127b.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-128.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-128.xml.ini
new file mode 100644
index 00000000000..ac3289f251f
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-128.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-128.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-128b.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-128b.xml.ini
new file mode 100644
index 00000000000..14d94ca6eb7
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-128b.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-128b.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-129.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-129.xml.ini
new file mode 100644
index 00000000000..08d4b278a02
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-129.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-129.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-129b.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-129b.xml.ini
new file mode 100644
index 00000000000..1bdb94975ba
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-129b.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-129b.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-134.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-134.xml.ini
new file mode 100644
index 00000000000..b67c16183f4
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-134.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-134.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-134b.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-134b.xml.ini
new file mode 100644
index 00000000000..2146d87ecae
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-134b.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-134b.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-135.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-135.xml.ini
new file mode 100644
index 00000000000..f64d3b70afe
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-135.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-135.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-135b.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-135b.xml.ini
new file mode 100644
index 00000000000..464d1e1da15
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-135b.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-135b.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-136.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-136.xml.ini
new file mode 100644
index 00000000000..c48cbc937cd
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-136.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-136.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-136b.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-136b.xml.ini
new file mode 100644
index 00000000000..a284ca44ee8
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-136b.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-136b.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-168.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-168.xml.ini
new file mode 100644
index 00000000000..997c5a99592
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-168.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-168.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-168a.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-168a.xml.ini
new file mode 100644
index 00000000000..1dcb363bebc
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-168a.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-168a.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-169.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-169.xml.ini
new file mode 100644
index 00000000000..114f681d047
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-169.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-169.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-169a.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-169a.xml.ini
new file mode 100644
index 00000000000..d9a801328d6
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-169a.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-169a.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-173a.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-173a.xml.ini
new file mode 100644
index 00000000000..3b7a7de5774
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-173a.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-173a.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-83.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-83.xml.ini
new file mode 100644
index 00000000000..21388cd7cce
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-83.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-83.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-99.xml.ini b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-99.xml.ini
new file mode 100644
index 00000000000..8bd3775c282
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/old-tests/css3-modsel-99.xml.ini
@@ -0,0 +1,2 @@
+[css3-modsel-99.xml]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/selectors/webkit-pseudo-element.html.ini b/tests/wpt/metadata/css/selectors/webkit-pseudo-element.html.ini
new file mode 100644
index 00000000000..8502ae0ce91
--- /dev/null
+++ b/tests/wpt/metadata/css/selectors/webkit-pseudo-element.html.ini
@@ -0,0 +1,13 @@
+[webkit-pseudo-element.html]
+ [webkit-prefixed pseudo-element selectors should be accessible from CSSOM]
+ expected: FAIL
+
+ [qS and qSA shouldn't throw exception]
+ expected: FAIL
+
+ [webkit-prefix without dash is invalid]
+ expected: FAIL
+
+ [rules include webkit-prefixed pseudo-element should be cascaded]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/custom-elements/Document-createElement-svg.svg.ini b/tests/wpt/metadata/custom-elements/Document-createElement-svg.svg.ini
index 9e4a4f96426..727ba0b297c 100644
--- a/tests/wpt/metadata/custom-elements/Document-createElement-svg.svg.ini
+++ b/tests/wpt/metadata/custom-elements/Document-createElement-svg.svg.ini
@@ -1,2 +1,3 @@
[Document-createElement-svg.svg]
+ bug: https://github.com/servo/servo/issues/12973
expected: TIMEOUT
diff --git a/tests/wpt/metadata/encoding/idlharness.any.js.ini b/tests/wpt/metadata/encoding/idlharness.any.js.ini
index 1e892e5e427..7eed0794ca3 100644
--- a/tests/wpt/metadata/encoding/idlharness.any.js.ini
+++ b/tests/wpt/metadata/encoding/idlharness.any.js.ini
@@ -22,6 +22,66 @@
[idlharness]
expected: FAIL
+ [TextDecoderStream interface: attribute readable]
+ expected: FAIL
+
+ [TextEncoderStream interface object length]
+ expected: FAIL
+
+ [TextDecoderStream interface object length]
+ expected: FAIL
+
+ [TextEncoderStream interface: existence and properties of interface prototype object's "constructor" property]
+ expected: FAIL
+
+ [TextEncoderStream interface: existence and properties of interface object]
+ expected: FAIL
+
+ [TextDecoderStream interface: existence and properties of interface prototype object's @@unscopables property]
+ expected: FAIL
+
+ [TextEncoderStream interface object name]
+ expected: FAIL
+
+ [TextDecoderStream interface: attribute fatal]
+ expected: FAIL
+
+ [TextEncoderStream interface: existence and properties of interface prototype object's @@unscopables property]
+ expected: FAIL
+
+ [TextDecoderStream interface: existence and properties of interface prototype object's "constructor" property]
+ expected: FAIL
+
+ [TextDecoderStream interface: attribute ignoreBOM]
+ expected: FAIL
+
+ [TextEncoderStream interface: attribute writable]
+ expected: FAIL
+
+ [TextDecoderStream interface: existence and properties of interface object]
+ expected: FAIL
+
+ [TextDecoderStream interface: attribute encoding]
+ expected: FAIL
+
+ [TextEncoderStream interface: attribute readable]
+ expected: FAIL
+
+ [TextEncoderStream interface: attribute encoding]
+ expected: FAIL
+
+ [TextDecoderStream interface: existence and properties of interface prototype object]
+ expected: FAIL
+
+ [TextDecoderStream interface object name]
+ expected: FAIL
+
+ [TextEncoderStream interface: existence and properties of interface prototype object]
+ expected: FAIL
+
+ [TextDecoderStream interface: attribute writable]
+ expected: FAIL
+
[idlharness.any.worker.html]
[Untitled]
@@ -30,6 +90,66 @@
[idlharness]
expected: FAIL
+ [TextDecoderStream interface: attribute readable]
+ expected: FAIL
+
+ [TextEncoderStream interface object length]
+ expected: FAIL
+
+ [TextDecoderStream interface object length]
+ expected: FAIL
+
+ [TextEncoderStream interface: existence and properties of interface prototype object's "constructor" property]
+ expected: FAIL
+
+ [TextEncoderStream interface: existence and properties of interface object]
+ expected: FAIL
+
+ [TextDecoderStream interface: existence and properties of interface prototype object's @@unscopables property]
+ expected: FAIL
+
+ [TextEncoderStream interface object name]
+ expected: FAIL
+
+ [TextDecoderStream interface: attribute fatal]
+ expected: FAIL
+
+ [TextEncoderStream interface: existence and properties of interface prototype object's @@unscopables property]
+ expected: FAIL
+
+ [TextDecoderStream interface: existence and properties of interface prototype object's "constructor" property]
+ expected: FAIL
+
+ [TextDecoderStream interface: attribute ignoreBOM]
+ expected: FAIL
+
+ [TextEncoderStream interface: attribute writable]
+ expected: FAIL
+
+ [TextDecoderStream interface: existence and properties of interface object]
+ expected: FAIL
+
+ [TextDecoderStream interface: attribute encoding]
+ expected: FAIL
+
+ [TextEncoderStream interface: attribute readable]
+ expected: FAIL
+
+ [TextEncoderStream interface: attribute encoding]
+ expected: FAIL
+
+ [TextDecoderStream interface: existence and properties of interface prototype object]
+ expected: FAIL
+
+ [TextDecoderStream interface object name]
+ expected: FAIL
+
+ [TextEncoderStream interface: existence and properties of interface prototype object]
+ expected: FAIL
+
+ [TextDecoderStream interface: attribute writable]
+ expected: FAIL
+
[idlharness.any.serviceworker.html]
expected: TIMEOUT
diff --git a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini
index 28ee1901e6a..32626f90fad 100644
--- a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini
+++ b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini
@@ -3,95 +3,539 @@
[single-byte-decoder.html?document]
expected: CRASH
+ [windows-1254: iso_8859-9 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
-[single-byte-decoder.html?XMLHttpRequest]
- expected: CRASH
- [ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
+ [ISO-8859-8: iso-8859-8 (document.characterSet and document.inputEncoding)]
expected: FAIL
- [ISO-8859-3: iso_8859-3:1988 (XMLHttpRequest)]
+ [ISO-8859-4: iso_8859-4 (document.characterSet and document.inputEncoding)]
expected: FAIL
- [ISO-8859-4: iso_8859-4:1988 (XMLHttpRequest)]
+ [ISO-8859-6: arabic (document.characterSet and document.inputEncoding)]
expected: FAIL
- [ISO-8859-5: iso_8859-5:1988 (XMLHttpRequest)]
+ [KOI8-U: koi8-u (document.characterSet and document.inputEncoding)]
expected: FAIL
- [ISO-8859-6: iso_8859-6:1987 (XMLHttpRequest)]
+ [ISO-8859-2: iso8859-2 (document.characterSet and document.inputEncoding)]
expected: FAIL
- [ISO-8859-7: iso_8859-7:1987 (XMLHttpRequest)]
+ [ISO-8859-5: iso-8859-5 (document.characterSet and document.inputEncoding)]
expected: FAIL
- [ISO-8859-8: iso_8859-8:1988 (XMLHttpRequest)]
+ [windows-1252: csisolatin1 (document.characterSet and document.inputEncoding)]
expected: FAIL
- [windows-1252: iso_8859-1:1987 (XMLHttpRequest)]
+ [ISO-8859-2: latin2 (document.characterSet and document.inputEncoding)]
expected: FAIL
- [windows-1254: iso_8859-9:1989 (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-874: dos-874 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-874: iso885911 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: iso_8859-6 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1257: windows-1257 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: latin1 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [KOI8-R: koi (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: windows-1252 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-5: csisolatincyrillic (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1254: iso-ir-148 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [x-mac-cyrillic: x-mac-cyrillic (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: iso-8859-6-e (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1255: cp1255 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-3: iso-ir-109 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1254: cp1254 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-13: iso8859-13 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: cp1252 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-4: l4 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: iso-ir-127 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1254: latin5 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-14: iso885914 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [IBM866: cp866 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [KOI8-R: koi8 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: csisolatingreek (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: greek8 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: iso88597 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [macintosh: mac (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-4: csisolatin4 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: iso_8859-7 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1250: windows-1250 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: elot_928 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-874: tis-620 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-3: iso8859-3 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1250: cp1250 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-874: windows-874 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-2: iso-8859-2 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [macintosh: csmacintosh (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1258: cp1258 (XMLHttpRequest)]
- expected: TIMEOUT
+ [ISO-8859-15: iso_8859-15 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1254: iso_8859-9 (XMLHttpRequest)]
- expected: TIMEOUT
+ [ISO-8859-3: iso-8859-3 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1254: iso88599 (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-1253: windows-1253 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1254: iso-8859-9 (XMLHttpRequest)]
- expected: TIMEOUT
+ [KOI8-R: koi8-r (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1258: x-cp1258 (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-1251: windows-1251 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1257: windows-1257 (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-1254: csisolatin5 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1254: windows-1254 (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-1254: x-cp1254 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-3: csisolatin3 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-5: iso8859-5 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [x-mac-cyrillic: x-mac-ukrainian (XMLHttpRequest)]
- expected: TIMEOUT
+ [ISO-8859-3: l3 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1254: csisolatin5 (XMLHttpRequest)]
- expected: TIMEOUT
+ [ISO-8859-10: iso885910 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1257: cp1257 (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-1254: l5 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1255: x-cp1255 (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-1252: l1 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1257: x-cp1257 (XMLHttpRequest)]
- expected: TIMEOUT
+ [ISO-8859-5: iso88595 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1254: cp1254 (XMLHttpRequest)]
- expected: TIMEOUT
+ [ISO-8859-6: ecma-114 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1254: x-cp1254 (XMLHttpRequest)]
- expected: TIMEOUT
+ [ISO-8859-14: iso8859-14 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1254: latin5 (XMLHttpRequest)]
- expected: TIMEOUT
+ [ISO-8859-6: iso-8859-6 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1255: cp1255 (XMLHttpRequest)]
- expected: TIMEOUT
+ [KOI8-R: koi8_r (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1254: iso-ir-148 (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-1258: windows-1258 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1258: windows-1258 (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-1252: x-cp1252 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [windows-1255: windows-1255 (XMLHttpRequest)]
- expected: TIMEOUT
+ [ISO-8859-13: iso885913 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: iso-ir-138 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: iso-8859-8-e (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [IBM866: ibm866 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-14: iso-8859-14 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: csisolatinhebrew (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: cp819 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-10: latin6 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1253: x-cp1253 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: us-ascii (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: iso_8859-7:1987 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: iso8859-1 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-3: latin3 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-10: l6 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-2: iso88592 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-10: iso-8859-10 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1254: windows-1254 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [IBM866: 866 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: iso-8859-7 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: iso8859-8 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-874: iso-8859-11 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: ascii (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-3: iso_8859-3 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: ibm819 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: iso88591 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1258: cp1258 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: iso8859-7 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: iso-ir-100 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-5: iso_8859-5 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [IBM866: csibm866 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: hebrew (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-5: iso-ir-144 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
- [x-mac-cyrillic: x-mac-cyrillic (XMLHttpRequest)]
- expected: TIMEOUT
+ [windows-1254: iso8859-9 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-15: l9 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: iso_8859-6:1987 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1255: x-cp1255 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-5: cyrillic (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1256: cp1256 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-5: iso_8859-5:1988 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: csiso88596i (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: iso8859-6 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: csiso88596e (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1251: x-cp1251 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-2: csisolatin2 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-4: iso8859-4 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: greek (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: sun_eu_greek (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-4: latin4 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1255: windows-1255 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1254: iso_8859-9:1989 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: iso88596 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [macintosh: macintosh (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: iso_8859-1:1987 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1254: iso-8859-9 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: ecma-118 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-15: iso8859-15 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-2: l2 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-3: iso88593 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1256: x-cp1256 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1251: cp1251 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-15: iso885915 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-4: iso88594 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-2: iso_8859-2 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-3: iso_8859-3:1988 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [x-mac-cyrillic: x-mac-ukrainian (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-13: iso-8859-13 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-2: iso_8859-2:1987 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-874: iso8859-11 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1256: windows-1256 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: csiso88598e (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: asmo-708 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-4: iso-ir-110 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1254: iso88599 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1257: cp1257 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [macintosh: x-mac-roman (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-15: csisolatin9 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: iso-8859-6-i (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-10: csisolatin6 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8-I: csiso88598i (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-10: iso8859-10 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1250: x-cp1250 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1258: x-cp1258 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: iso_8859-1 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: visual (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1253: cp1253 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: iso_8859-8:1988 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: ansi_x3.4-1968 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-7: iso-ir-126 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [KOI8-R: cskoi8r (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8-I: iso-8859-8-i (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-10: iso-ir-157 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [KOI8-U: koi8-ru (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1257: x-cp1257 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: iso_8859-8 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8-I: logical (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-8: iso88598 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-2: iso-ir-101 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-15: iso-8859-15 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [windows-1252: iso-8859-1 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-16: iso-8859-16 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-4: iso-8859-4 (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+ [ISO-8859-6: csisolatinarabic (document.characterSet and document.inputEncoding)]
+ expected: FAIL
+
+
+[single-byte-decoder.html?XMLHttpRequest]
+ expected: CRASH
+ [ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
+ expected: FAIL
+
+ [ISO-8859-3: iso_8859-3:1988 (XMLHttpRequest)]
+ expected: FAIL
+
+ [ISO-8859-4: iso_8859-4:1988 (XMLHttpRequest)]
+ expected: FAIL
+
+ [ISO-8859-5: iso_8859-5:1988 (XMLHttpRequest)]
+ expected: FAIL
+
+ [ISO-8859-6: iso_8859-6:1987 (XMLHttpRequest)]
+ expected: FAIL
+
+ [ISO-8859-7: iso_8859-7:1987 (XMLHttpRequest)]
+ expected: FAIL
+
+ [ISO-8859-8: iso_8859-8:1988 (XMLHttpRequest)]
+ expected: FAIL
+
+ [windows-1252: iso_8859-1:1987 (XMLHttpRequest)]
+ expected: FAIL
+
+ [windows-1254: iso_8859-9:1989 (XMLHttpRequest)]
+ expected: FAIL
[single-byte-decoder.html?TextDecoder]
diff --git a/tests/wpt/metadata/encoding/streams/backpressure.any.js.ini b/tests/wpt/metadata/encoding/streams/backpressure.any.js.ini
new file mode 100644
index 00000000000..ae376965575
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/backpressure.any.js.ini
@@ -0,0 +1,17 @@
+[backpressure.any.sharedworker.html]
+ [backpressure]
+ expected: FAIL
+
+
+[backpressure.any.html]
+ [backpressure]
+ expected: FAIL
+
+
+[backpressure.any.serviceworker.html]
+ expected: TIMEOUT
+
+[backpressure.any.worker.html]
+ [backpressure]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/encoding/streams/decode-attributes.any.js.ini b/tests/wpt/metadata/encoding/streams/decode-attributes.any.js.ini
new file mode 100644
index 00000000000..ca0beb4bacc
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/decode-attributes.any.js.ini
@@ -0,0 +1,179 @@
+[decode-attributes.any.worker.html]
+ [a throwing fatal member should cause the constructor to throw]
+ expected: FAIL
+
+ [setting ignoreBOM to 'null' should set the attribute to false]
+ expected: FAIL
+
+ [encoding attribute should have correct value for 'iso-8859-2']
+ expected: FAIL
+
+ [setting fatal to 'undefined' should set the attribute to false]
+ expected: FAIL
+
+ [encoding attribute should have correct value for 'unicode-1-1-utf-8']
+ expected: FAIL
+
+ [setting ignoreBOM to '[object Object\]' should set the attribute to true]
+ expected: FAIL
+
+ [setting ignoreBOM to '1' should set the attribute to true]
+ expected: FAIL
+
+ [a throwing ignoreBOM member should cause the constructor to throw]
+ expected: FAIL
+
+ [setting fatal to '0' should set the attribute to false]
+ expected: FAIL
+
+ [constructing with a non-stringifiable encoding should throw]
+ expected: FAIL
+
+ [setting ignoreBOM to '' should set the attribute to true]
+ expected: FAIL
+
+ [constructing with an invalid encoding should throw]
+ expected: FAIL
+
+ [setting fatal to '' should set the attribute to false]
+ expected: FAIL
+
+ [setting fatal to 'false' should set the attribute to false]
+ expected: FAIL
+
+ [setting ignoreBOM to 'false' should set the attribute to false]
+ expected: FAIL
+
+ [setting ignoreBOM to '' should set the attribute to false]
+ expected: FAIL
+
+ [setting fatal to '1' should set the attribute to true]
+ expected: FAIL
+
+ [setting fatal to '[object Object\]' should set the attribute to true]
+ expected: FAIL
+
+ [setting fatal to 'true' should set the attribute to true]
+ expected: FAIL
+
+ [setting ignoreBOM to 'undefined' should set the attribute to false]
+ expected: FAIL
+
+ [setting fatal to 'null' should set the attribute to false]
+ expected: FAIL
+
+ [setting ignoreBOM to 'yes' should set the attribute to true]
+ expected: FAIL
+
+ [setting fatal to 'yes' should set the attribute to true]
+ expected: FAIL
+
+ [encoding attribute should have correct value for 'utf-16']
+ expected: FAIL
+
+ [setting ignoreBOM to '0' should set the attribute to false]
+ expected: FAIL
+
+ [setting ignoreBOM to 'true' should set the attribute to true]
+ expected: FAIL
+
+ [setting fatal to '' should set the attribute to true]
+ expected: FAIL
+
+ [encoding attribute should have correct value for 'ascii']
+ expected: FAIL
+
+
+[decode-attributes.any.sharedworker.html]
+ [decode-attributes]
+ expected: FAIL
+
+
+[decode-attributes.any.html]
+ [a throwing fatal member should cause the constructor to throw]
+ expected: FAIL
+
+ [setting ignoreBOM to 'null' should set the attribute to false]
+ expected: FAIL
+
+ [encoding attribute should have correct value for 'iso-8859-2']
+ expected: FAIL
+
+ [setting fatal to 'undefined' should set the attribute to false]
+ expected: FAIL
+
+ [encoding attribute should have correct value for 'unicode-1-1-utf-8']
+ expected: FAIL
+
+ [setting ignoreBOM to '[object Object\]' should set the attribute to true]
+ expected: FAIL
+
+ [setting ignoreBOM to '1' should set the attribute to true]
+ expected: FAIL
+
+ [a throwing ignoreBOM member should cause the constructor to throw]
+ expected: FAIL
+
+ [setting fatal to '0' should set the attribute to false]
+ expected: FAIL
+
+ [constructing with a non-stringifiable encoding should throw]
+ expected: FAIL
+
+ [setting ignoreBOM to '' should set the attribute to true]
+ expected: FAIL
+
+ [constructing with an invalid encoding should throw]
+ expected: FAIL
+
+ [setting fatal to '' should set the attribute to false]
+ expected: FAIL
+
+ [setting fatal to 'false' should set the attribute to false]
+ expected: FAIL
+
+ [setting ignoreBOM to 'false' should set the attribute to false]
+ expected: FAIL
+
+ [setting ignoreBOM to '' should set the attribute to false]
+ expected: FAIL
+
+ [setting fatal to '1' should set the attribute to true]
+ expected: FAIL
+
+ [setting fatal to '[object Object\]' should set the attribute to true]
+ expected: FAIL
+
+ [setting fatal to 'true' should set the attribute to true]
+ expected: FAIL
+
+ [setting ignoreBOM to 'undefined' should set the attribute to false]
+ expected: FAIL
+
+ [setting fatal to 'null' should set the attribute to false]
+ expected: FAIL
+
+ [setting ignoreBOM to 'yes' should set the attribute to true]
+ expected: FAIL
+
+ [setting fatal to 'yes' should set the attribute to true]
+ expected: FAIL
+
+ [encoding attribute should have correct value for 'utf-16']
+ expected: FAIL
+
+ [setting ignoreBOM to '0' should set the attribute to false]
+ expected: FAIL
+
+ [setting ignoreBOM to 'true' should set the attribute to true]
+ expected: FAIL
+
+ [setting fatal to '' should set the attribute to true]
+ expected: FAIL
+
+ [encoding attribute should have correct value for 'ascii']
+ expected: FAIL
+
+
+[decode-attributes.any.serviceworker.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/encoding/streams/decode-bad-chunks.any.js.ini b/tests/wpt/metadata/encoding/streams/decode-bad-chunks.any.js.ini
new file mode 100644
index 00000000000..072b3593998
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/decode-bad-chunks.any.js.ini
@@ -0,0 +1,17 @@
+[decode-bad-chunks.any.html]
+ [decode-bad-chunks]
+ expected: FAIL
+
+
+[decode-bad-chunks.any.worker.html]
+ [decode-bad-chunks]
+ expected: FAIL
+
+
+[decode-bad-chunks.any.serviceworker.html]
+ expected: TIMEOUT
+
+[decode-bad-chunks.any.sharedworker.html]
+ [decode-bad-chunks]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/encoding/streams/decode-ignore-bom.any.js.ini b/tests/wpt/metadata/encoding/streams/decode-ignore-bom.any.js.ini
new file mode 100644
index 00000000000..259b7667bd8
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/decode-ignore-bom.any.js.ini
@@ -0,0 +1,83 @@
+[decode-ignore-bom.any.html]
+ [ignoreBOM should work for encoding utf-16be, split at character 1]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16be, split at character 0]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16be, split at character 3]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16be, split at character 2]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-8, split at character 0]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-8, split at character 1]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-8, split at character 2]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-8, split at character 3]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16le, split at character 3]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16le, split at character 2]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16le, split at character 1]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16le, split at character 0]
+ expected: FAIL
+
+
+[decode-ignore-bom.any.serviceworker.html]
+ expected: TIMEOUT
+
+[decode-ignore-bom.any.sharedworker.html]
+ [decode-ignore-bom]
+ expected: FAIL
+
+
+[decode-ignore-bom.any.worker.html]
+ [ignoreBOM should work for encoding utf-16be, split at character 1]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16be, split at character 0]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16be, split at character 3]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16be, split at character 2]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-8, split at character 0]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-8, split at character 1]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-8, split at character 2]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-8, split at character 3]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16le, split at character 3]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16le, split at character 2]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16le, split at character 1]
+ expected: FAIL
+
+ [ignoreBOM should work for encoding utf-16le, split at character 0]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/encoding/streams/decode-incomplete-input.any.js.ini b/tests/wpt/metadata/encoding/streams/decode-incomplete-input.any.js.ini
new file mode 100644
index 00000000000..6972b401446
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/decode-incomplete-input.any.js.ini
@@ -0,0 +1,23 @@
+[decode-incomplete-input.any.serviceworker.html]
+ expected: TIMEOUT
+
+[decode-incomplete-input.any.sharedworker.html]
+ [decode-incomplete-input]
+ expected: FAIL
+
+
+[decode-incomplete-input.any.worker.html]
+ [incomplete input with error mode "fatal" should error the stream]
+ expected: FAIL
+
+ [incomplete input with error mode "replacement" should end with a replacement character]
+ expected: FAIL
+
+
+[decode-incomplete-input.any.html]
+ [incomplete input with error mode "fatal" should error the stream]
+ expected: FAIL
+
+ [incomplete input with error mode "replacement" should end with a replacement character]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/encoding/streams/decode-non-utf8.any.js.ini b/tests/wpt/metadata/encoding/streams/decode-non-utf8.any.js.ini
new file mode 100644
index 00000000000..6510f801f28
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/decode-non-utf8.any.js.ini
@@ -0,0 +1,71 @@
+[decode-non-utf8.any.sharedworker.html]
+ [decode-non-utf8]
+ expected: FAIL
+
+
+[decode-non-utf8.any.worker.html]
+ [TextDecoderStream should be able to reject invalid sequences in Shift_JIS]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode invalid sequences in Shift_JIS]
+ expected: FAIL
+
+ [TextDecoderStream should be able to reject invalid sequences in UTF-16LE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to reject invalid sequences in UTF-16BE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode Shift_JIS]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode invalid sequences in UTF-16LE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode UTF-16BE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode invalid sequences in UTF-16BE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode UTF-16LE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode ISO-8859-14]
+ expected: FAIL
+
+
+[decode-non-utf8.any.html]
+ [TextDecoderStream should be able to reject invalid sequences in Shift_JIS]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode invalid sequences in Shift_JIS]
+ expected: FAIL
+
+ [TextDecoderStream should be able to reject invalid sequences in UTF-16LE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to reject invalid sequences in UTF-16BE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode Shift_JIS]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode invalid sequences in UTF-16LE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode UTF-16BE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode invalid sequences in UTF-16BE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode UTF-16LE]
+ expected: FAIL
+
+ [TextDecoderStream should be able to decode ISO-8859-14]
+ expected: FAIL
+
+
+[decode-non-utf8.any.serviceworker.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/encoding/streams/decode-split-character.any.js.ini b/tests/wpt/metadata/encoding/streams/decode-split-character.any.js.ini
new file mode 100644
index 00000000000..affec6b9557
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/decode-split-character.any.js.ini
@@ -0,0 +1,77 @@
+[decode-split-character.any.serviceworker.html]
+ expected: TIMEOUT
+
+[decode-split-character.any.sharedworker.html]
+ [decode-split-character]
+ expected: FAIL
+
+
+[decode-split-character.any.worker.html]
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 3]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 1]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 2]
+ expected: FAIL
+
+ [a code point should be emitted as soon as all bytes are available]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 4]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 5]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 6]
+ expected: FAIL
+
+ [a code point split between chunks should not be emitted until all bytes are available; split point = 4]
+ expected: FAIL
+
+ [a code point split between chunks should not be emitted until all bytes are available; split point = 5]
+ expected: FAIL
+
+ [a code point split between chunks should not be emitted until all bytes are available; split point = 2]
+ expected: FAIL
+
+ [a code point split between chunks should not be emitted until all bytes are available; split point = 3]
+ expected: FAIL
+
+
+[decode-split-character.any.html]
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 3]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 1]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 2]
+ expected: FAIL
+
+ [a code point should be emitted as soon as all bytes are available]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 4]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 5]
+ expected: FAIL
+
+ [an empty chunk inside a code point split between chunks should not change the output; split point = 6]
+ expected: FAIL
+
+ [a code point split between chunks should not be emitted until all bytes are available; split point = 4]
+ expected: FAIL
+
+ [a code point split between chunks should not be emitted until all bytes are available; split point = 5]
+ expected: FAIL
+
+ [a code point split between chunks should not be emitted until all bytes are available; split point = 2]
+ expected: FAIL
+
+ [a code point split between chunks should not be emitted until all bytes are available; split point = 3]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/encoding/streams/decode-utf8.any.js.ini b/tests/wpt/metadata/encoding/streams/decode-utf8.any.js.ini
new file mode 100644
index 00000000000..e0dbbd4d512
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/decode-utf8.any.js.ini
@@ -0,0 +1,35 @@
+[decode-utf8.any.serviceworker.html]
+ expected: TIMEOUT
+
+[decode-utf8.any.sharedworker.html]
+ [decode-utf8]
+ expected: FAIL
+
+
+[decode-utf8.any.html]
+ [decoding one UTF-8 chunk should give one output string]
+ expected: FAIL
+
+ [a trailing empty chunk should be ignored]
+ expected: FAIL
+
+ [decoding an empty chunk should give no output chunks]
+ expected: FAIL
+
+ [an initial empty chunk should be ignored]
+ expected: FAIL
+
+
+[decode-utf8.any.worker.html]
+ [decoding one UTF-8 chunk should give one output string]
+ expected: FAIL
+
+ [a trailing empty chunk should be ignored]
+ expected: FAIL
+
+ [decoding an empty chunk should give no output chunks]
+ expected: FAIL
+
+ [an initial empty chunk should be ignored]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/encoding/streams/encode-bad-chunks.any.js.ini b/tests/wpt/metadata/encoding/streams/encode-bad-chunks.any.js.ini
new file mode 100644
index 00000000000..ddde7b046bc
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/encode-bad-chunks.any.js.ini
@@ -0,0 +1,47 @@
+[encode-bad-chunks.any.html]
+ [a chunk that cannot be converted to a string should error the streams]
+ expected: FAIL
+
+ [input of type numeric should be converted correctly to string]
+ expected: FAIL
+
+ [input of type undefined should be converted correctly to string]
+ expected: FAIL
+
+ [input of type array should be converted correctly to string]
+ expected: FAIL
+
+ [input of type object should be converted correctly to string]
+ expected: FAIL
+
+ [input of type null should be converted correctly to string]
+ expected: FAIL
+
+
+[encode-bad-chunks.any.worker.html]
+ [a chunk that cannot be converted to a string should error the streams]
+ expected: FAIL
+
+ [input of type numeric should be converted correctly to string]
+ expected: FAIL
+
+ [input of type undefined should be converted correctly to string]
+ expected: FAIL
+
+ [input of type array should be converted correctly to string]
+ expected: FAIL
+
+ [input of type object should be converted correctly to string]
+ expected: FAIL
+
+ [input of type null should be converted correctly to string]
+ expected: FAIL
+
+
+[encode-bad-chunks.any.sharedworker.html]
+ [encode-bad-chunks]
+ expected: FAIL
+
+
+[encode-bad-chunks.any.serviceworker.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/encoding/streams/encode-utf8.any.js.ini b/tests/wpt/metadata/encoding/streams/encode-utf8.any.js.ini
new file mode 100644
index 00000000000..1a887518165
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/encode-utf8.any.js.ini
@@ -0,0 +1,125 @@
+[encode-utf8.any.html]
+ [two leading chunks should result in two replacement characters]
+ expected: FAIL
+
+ [characters in the ISO-8859-1 range should be encoded correctly]
+ expected: FAIL
+
+ [a terminal unpaired trailing surrogate should immediately be replaced]
+ expected: FAIL
+
+ [a character split between chunks should be correctly encoded]
+ expected: FAIL
+
+ [an empty string should result in no output chunk]
+ expected: FAIL
+
+ [an unmatched surrogate at the end of a chunk followed by an ascii character in the next chunk should be replaced with the replacement character at the start of the next output chunk]
+ expected: FAIL
+
+ [a leading empty chunk should be ignored]
+ expected: FAIL
+
+ [encoding one string of UTF-8 should give one complete chunk]
+ expected: FAIL
+
+ [a leading surrogate chunk should be carried past empty chunks]
+ expected: FAIL
+
+ [a leading surrogate chunk should error when it is clear it didn't form a pair]
+ expected: FAIL
+
+ [a trailing empty chunk should be ignored]
+ expected: FAIL
+
+ [a plain ASCII chunk should be converted]
+ expected: FAIL
+
+ [a character following one split between chunks should be correctly encoded]
+ expected: FAIL
+
+ [an unmatched surrogate at the end of a chunk followed by a plane 1 character split into two chunks should result in the encoded plane 1 character appearing in the last output chunk]
+ expected: FAIL
+
+ [an unmatched surrogate at the end of a chunk followed by an astral character in the next chunk should be replaced with the replacement character at the start of the next output chunk]
+ expected: FAIL
+
+ [two consecutive astral characters each split down the middle should be correctly reassembled]
+ expected: FAIL
+
+ [a non-terminal unpaired leading surrogate should immediately be replaced]
+ expected: FAIL
+
+ [two consecutive astral characters each split down the middle with an invalid surrogate in the middle should be correctly encoded]
+ expected: FAIL
+
+ [a stream ending in a leading surrogate should emit a replacement character as a final chunk]
+ expected: FAIL
+
+
+[encode-utf8.any.worker.html]
+ [two leading chunks should result in two replacement characters]
+ expected: FAIL
+
+ [characters in the ISO-8859-1 range should be encoded correctly]
+ expected: FAIL
+
+ [a terminal unpaired trailing surrogate should immediately be replaced]
+ expected: FAIL
+
+ [a character split between chunks should be correctly encoded]
+ expected: FAIL
+
+ [an empty string should result in no output chunk]
+ expected: FAIL
+
+ [an unmatched surrogate at the end of a chunk followed by an ascii character in the next chunk should be replaced with the replacement character at the start of the next output chunk]
+ expected: FAIL
+
+ [a leading empty chunk should be ignored]
+ expected: FAIL
+
+ [encoding one string of UTF-8 should give one complete chunk]
+ expected: FAIL
+
+ [a leading surrogate chunk should be carried past empty chunks]
+ expected: FAIL
+
+ [a leading surrogate chunk should error when it is clear it didn't form a pair]
+ expected: FAIL
+
+ [a trailing empty chunk should be ignored]
+ expected: FAIL
+
+ [a plain ASCII chunk should be converted]
+ expected: FAIL
+
+ [a character following one split between chunks should be correctly encoded]
+ expected: FAIL
+
+ [an unmatched surrogate at the end of a chunk followed by a plane 1 character split into two chunks should result in the encoded plane 1 character appearing in the last output chunk]
+ expected: FAIL
+
+ [an unmatched surrogate at the end of a chunk followed by an astral character in the next chunk should be replaced with the replacement character at the start of the next output chunk]
+ expected: FAIL
+
+ [two consecutive astral characters each split down the middle should be correctly reassembled]
+ expected: FAIL
+
+ [a non-terminal unpaired leading surrogate should immediately be replaced]
+ expected: FAIL
+
+ [two consecutive astral characters each split down the middle with an invalid surrogate in the middle should be correctly encoded]
+ expected: FAIL
+
+ [a stream ending in a leading surrogate should emit a replacement character as a final chunk]
+ expected: FAIL
+
+
+[encode-utf8.any.sharedworker.html]
+ [encode-utf8]
+ expected: FAIL
+
+
+[encode-utf8.any.serviceworker.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/encoding/streams/readable-writable-properties.any.js.ini b/tests/wpt/metadata/encoding/streams/readable-writable-properties.any.js.ini
new file mode 100644
index 00000000000..b4b8335f34f
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/readable-writable-properties.any.js.ini
@@ -0,0 +1,23 @@
+[readable-writable-properties.any.html]
+ [TextDecoderStream readable and writable properties must pass brand checks]
+ expected: FAIL
+
+ [TextEncoderStream readable and writable properties must pass brand checks]
+ expected: FAIL
+
+
+[readable-writable-properties.any.serviceworker.html]
+ expected: TIMEOUT
+
+[readable-writable-properties.any.worker.html]
+ [TextDecoderStream readable and writable properties must pass brand checks]
+ expected: FAIL
+
+ [TextEncoderStream readable and writable properties must pass brand checks]
+ expected: FAIL
+
+
+[readable-writable-properties.any.sharedworker.html]
+ [readable-writable-properties]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/encoding/streams/realms.window.js.ini b/tests/wpt/metadata/encoding/streams/realms.window.js.ini
new file mode 100644
index 00000000000..059cf2b7b77
--- /dev/null
+++ b/tests/wpt/metadata/encoding/streams/realms.window.js.ini
@@ -0,0 +1,2 @@
+[realms.window.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/fetch/api/basic/header-value-null-byte.any.js.ini b/tests/wpt/metadata/fetch/api/basic/header-value-null-byte.any.js.ini
new file mode 100644
index 00000000000..96389a8b64e
--- /dev/null
+++ b/tests/wpt/metadata/fetch/api/basic/header-value-null-byte.any.js.ini
@@ -0,0 +1,11 @@
+[header-value-null-byte.any.html]
+
+[header-value-null-byte.any.sharedworker.html]
+ [header-value-null-byte]
+ expected: FAIL
+
+
+[header-value-null-byte.any.worker.html]
+
+[header-value-null-byte.any.serviceworker.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/fetch/api/request/request-init-stream.any.js.ini b/tests/wpt/metadata/fetch/api/request/request-init-stream.any.js.ini
new file mode 100644
index 00000000000..8bb9e65c259
--- /dev/null
+++ b/tests/wpt/metadata/fetch/api/request/request-init-stream.any.js.ini
@@ -0,0 +1,47 @@
+[request-init-stream.any.worker.html]
+ [Constructing a Request with a Request on which read() and releaseLock() are called]
+ expected: FAIL
+
+ [Constructing a Request with a stream on which read() and releaseLock() are called]
+ expected: FAIL
+
+ [Constructing a Request with a stream on which getReader() is called]
+ expected: FAIL
+
+ [Constructing a Request with a Request on which body.getReader() is called]
+ expected: FAIL
+
+ [Constructing a Request with a stream on which read() is called]
+ expected: FAIL
+
+ [Constructing a Request with a Request on which body.getReader().read() is called]
+ expected: FAIL
+
+
+[request-init-stream.any.sharedworker.html]
+ [request-init-stream]
+ expected: FAIL
+
+
+[request-init-stream.any.html]
+ [Constructing a Request with a Request on which read() and releaseLock() are called]
+ expected: FAIL
+
+ [Constructing a Request with a stream on which read() and releaseLock() are called]
+ expected: FAIL
+
+ [Constructing a Request with a stream on which getReader() is called]
+ expected: FAIL
+
+ [Constructing a Request with a Request on which body.getReader() is called]
+ expected: FAIL
+
+ [Constructing a Request with a stream on which read() is called]
+ expected: FAIL
+
+ [Constructing a Request with a Request on which body.getReader().read() is called]
+ expected: FAIL
+
+
+[request-init-stream.any.serviceworker.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/fetch/api/response/response-from-stream.any.js.ini b/tests/wpt/metadata/fetch/api/response/response-from-stream.any.js.ini
new file mode 100644
index 00000000000..ccf43c56945
--- /dev/null
+++ b/tests/wpt/metadata/fetch/api/response/response-from-stream.any.js.ini
@@ -0,0 +1,29 @@
+[response-from-stream.any.sharedworker.html]
+ [response-from-stream]
+ expected: FAIL
+
+
+[response-from-stream.any.html]
+ [Constructing a Response with a stream on which getReader() is called]
+ expected: FAIL
+
+ [Constructing a Response with a stream on which read() and releaseLock() are called]
+ expected: FAIL
+
+ [Constructing a Response with a stream on which read() is called]
+ expected: FAIL
+
+
+[response-from-stream.any.serviceworker.html]
+ expected: TIMEOUT
+
+[response-from-stream.any.worker.html]
+ [Constructing a Response with a stream on which getReader() is called]
+ expected: FAIL
+
+ [Constructing a Response with a stream on which read() and releaseLock() are called]
+ expected: FAIL
+
+ [Constructing a Response with a stream on which read() is called]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini b/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini
index c6509e035dd..3951cd266d5 100644
--- a/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini
+++ b/tests/wpt/metadata/fetch/cross-origin-resource-policy/fetch-in-iframe.html.ini
@@ -7,9 +7,13 @@
[Cross-origin fetch in a data: iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
expected: FAIL
+
[Cross-origin fetch in a data: iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-site' response header.]
expected: FAIL
+
[Cross-origin fetch in a cross origin iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-origin' response header.]
expected: FAIL
+
[Cross-origin fetch in a cross origin iframe load fails if the server blocks cross-origin loads with a 'Cross-Origin-Resource-Policy: same-site' response header.]
expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html.ini b/tests/wpt/metadata/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html.ini
new file mode 100644
index 00000000000..ff5d3abc74b
--- /dev/null
+++ b/tests/wpt/metadata/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html.ini
@@ -0,0 +1,10 @@
+[cross-site-redirect.tentative.https.sub.html]
+ [Cross-Site -> Cross-Site redirect]
+ expected: FAIL
+
+ [Cross-Site -> Same-Site redirect]
+ expected: FAIL
+
+ [Cross-Site -> Same-Origin redirect]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html.ini b/tests/wpt/metadata/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html.ini
new file mode 100644
index 00000000000..ea5a2ec1a12
--- /dev/null
+++ b/tests/wpt/metadata/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html.ini
@@ -0,0 +1,4 @@
+[multiple-redirect-cross-site.tentative.https.sub.html]
+ [Same-Origin -> Cross-Site -> Same-Origin redirect]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html.ini b/tests/wpt/metadata/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html.ini
new file mode 100644
index 00000000000..cb4a0801f78
--- /dev/null
+++ b/tests/wpt/metadata/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html.ini
@@ -0,0 +1,4 @@
+[multiple-redirect-same-site.tentative.https.sub.html]
+ [Same-Origin -> Same-Site -> Same-Origin redirect]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html.ini b/tests/wpt/metadata/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html.ini
new file mode 100644
index 00000000000..0ec11a20c11
--- /dev/null
+++ b/tests/wpt/metadata/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html.ini
@@ -0,0 +1,10 @@
+[same-origin-redirect.tentative.https.sub.html]
+ [Same-Origin -> Cross-Site redirect]
+ expected: FAIL
+
+ [Same-Origin -> Same-Site redirect]
+ expected: FAIL
+
+ [Same-Origin -> Same-Origin redirect]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html.ini b/tests/wpt/metadata/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html.ini
new file mode 100644
index 00000000000..72a5cbe072e
--- /dev/null
+++ b/tests/wpt/metadata/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html.ini
@@ -0,0 +1,10 @@
+[same-site-redirect.tentative.https.sub.html]
+ [Same-Site -> Same-Origin redirect]
+ expected: FAIL
+
+ [Same-Site -> Same-Site redirect]
+ expected: FAIL
+
+ [Same-Site -> Cross-Site redirect]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini
new file mode 100644
index 00000000000..dc2e45516de
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini
@@ -0,0 +1,4 @@
+[traverse_the_history_5.html]
+ [Multiple history traversals, last would be aborted]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini
index 20865f493ec..9579b42287e 100644
--- a/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini
+++ b/tests/wpt/metadata/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html.ini
@@ -30,3 +30,6 @@
[Set HTTP URL frame location.protocol to data]
expected: FAIL
+ [Set HTTP URL frame location.protocol to x]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/interaction/focus/composed.window.js.ini b/tests/wpt/metadata/html/interaction/focus/composed.window.js.ini
new file mode 100644
index 00000000000..3700bdbc7dd
--- /dev/null
+++ b/tests/wpt/metadata/html/interaction/focus/composed.window.js.ini
@@ -0,0 +1,4 @@
+[composed.window.html]
+ [Focus events are composed]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/interaction/focus/document-level-focus-apis/document-level-apis.html.ini b/tests/wpt/metadata/html/interaction/focus/document-level-focus-apis/document-level-apis.html.ini
new file mode 100644
index 00000000000..81f3ef81927
--- /dev/null
+++ b/tests/wpt/metadata/html/interaction/focus/document-level-focus-apis/document-level-apis.html.ini
@@ -0,0 +1,4 @@
+[document-level-apis.html]
+ [When a child browsing context is focused, its browsing context container is also focused]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini b/tests/wpt/metadata/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini
new file mode 100644
index 00000000000..19b1435fd03
--- /dev/null
+++ b/tests/wpt/metadata/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini
@@ -0,0 +1,22 @@
+[focus-fixup-rule-one-no-dialogs.html]
+ [Disabling contenteditable]
+ expected: FAIL
+
+ [Hiding the active element]
+ expected: FAIL
+
+ [Disabling the active element (making it expressly inert)]
+ expected: FAIL
+
+ [Changing the first legend element in disabled <fieldset>]
+ expected: FAIL
+
+ [Disabling <fieldset> affects its descendants]
+ expected: FAIL
+
+ [Removing the tabindex attribute from a div]
+ expected: FAIL
+
+ [Removing the active element from the DOM]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/interaction/focus/processing-model/preventScroll.html.ini b/tests/wpt/metadata/html/interaction/focus/processing-model/preventScroll.html.ini
new file mode 100644
index 00000000000..177bed89beb
--- /dev/null
+++ b/tests/wpt/metadata/html/interaction/focus/processing-model/preventScroll.html.ini
@@ -0,0 +1,19 @@
+[preventScroll.html]
+ [Sanity test]
+ expected: FAIL
+
+ [elm.focus({preventScroll: false})]
+ expected: FAIL
+
+ [elm.focus(null)]
+ expected: FAIL
+
+ [elm.focus(undefined)]
+ expected: FAIL
+
+ [elm.focus({})]
+ expected: FAIL
+
+ [elm.focus() without arguments]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html.ini b/tests/wpt/metadata/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html.ini
new file mode 100644
index 00000000000..1d9a4456142
--- /dev/null
+++ b/tests/wpt/metadata/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html.ini
@@ -0,0 +1,7 @@
+[focus-tabindex-default-value.html]
+ [The default value of tabIndex attribute must be 0 for elements that are focusable]
+ expected: FAIL
+
+ [The default value of tabIndex attribute must be -1 for elements that are not focusable]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/interaction/focus/tabindex-focus-flag.html.ini b/tests/wpt/metadata/html/interaction/focus/tabindex-focus-flag.html.ini
new file mode 100644
index 00000000000..5af0d13df14
--- /dev/null
+++ b/tests/wpt/metadata/html/interaction/focus/tabindex-focus-flag.html.ini
@@ -0,0 +1,13 @@
+[tabindex-focus-flag.html]
+ [a should not be focusable by default.]
+ expected: FAIL
+
+ [#summary-first should be focusable by default.]
+ expected: FAIL
+
+ [input[type="hidden"\] should not be focusable by default.]
+ expected: FAIL
+
+ [[contenteditable\] should be focusable by default.]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html.ini
new file mode 100644
index 00000000000..176a6ca1f30
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html.ini
@@ -0,0 +1,4 @@
+[fieldset-block-formatting-context.html]
+ [The fieldset element: block formatting context]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html.ini
new file mode 100644
index 00000000000..d1ea43f0322
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html.ini
@@ -0,0 +1,2 @@
+[fieldset-border-gap.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html.ini
new file mode 100644
index 00000000000..685d73d1454
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html.ini
@@ -0,0 +1,4 @@
+[fieldset-border-radius-hittest.html]
+ [fieldset, border-radius and hit testing]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html.ini
new file mode 100644
index 00000000000..7fddee706f4
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html.ini
@@ -0,0 +1,2 @@
+[fieldset-containing-block.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html.ini
new file mode 100644
index 00000000000..cfaa7ef35ac
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html.ini
@@ -0,0 +1,4 @@
+[fieldset-content-before-legend.html]
+ [fieldset content before legend]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html.ini
new file mode 100644
index 00000000000..e76c8d1b88d
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html.ini
@@ -0,0 +1,4 @@
+[fieldset-default-style.html]
+ [fieldset default style]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html.ini
new file mode 100644
index 00000000000..d4af9337d23
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html.ini
@@ -0,0 +1,58 @@
+[fieldset-display.html]
+ [fieldset with display: ruby-text]
+ expected: FAIL
+
+ [fieldset with display: table-footer-group]
+ expected: FAIL
+
+ [fieldset with display: table-column]
+ expected: FAIL
+
+ [fieldset with display: table-row]
+ expected: FAIL
+
+ [fieldset with display: table-cell]
+ expected: FAIL
+
+ [fieldset with display: table]
+ expected: FAIL
+
+ [fieldset with display: list-item]
+ expected: FAIL
+
+ [fieldset with display: flow]
+ expected: FAIL
+
+ [fieldset with display: table-header-group]
+ expected: FAIL
+
+ [fieldset with display: inline-table]
+ expected: FAIL
+
+ [fieldset with display: ruby]
+ expected: FAIL
+
+ [fieldset with display: flow-root]
+ expected: FAIL
+
+ [fieldset with display: ruby-base]
+ expected: FAIL
+
+ [fieldset with display: table-caption]
+ expected: FAIL
+
+ [fieldset with display: run-in]
+ expected: FAIL
+
+ [fieldset with display: table-column-group]
+ expected: FAIL
+
+ [fieldset with display: ruby-base-container]
+ expected: FAIL
+
+ [fieldset with display: table-row-group]
+ expected: FAIL
+
+ [fieldset with display: ruby-text-container]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html.ini
new file mode 100644
index 00000000000..209486495d3
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html.ini
@@ -0,0 +1,7 @@
+[fieldset-grid.html]
+ [Inline grid]
+ expected: FAIL
+
+ [Grid]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html.ini
new file mode 100644
index 00000000000..c72edb18366
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html.ini
@@ -0,0 +1,2 @@
+[fieldset-list-item.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html.ini
new file mode 100644
index 00000000000..7e24c228ec0
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html.ini
@@ -0,0 +1,2 @@
+[fieldset-overflow-hidden.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html.ini
new file mode 100644
index 00000000000..fb7222428f6
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html.ini
@@ -0,0 +1,2 @@
+[fieldset-overflow.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html.ini
new file mode 100644
index 00000000000..4f698bdc824
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html.ini
@@ -0,0 +1,2 @@
+[fieldset-painting-order.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html.ini
new file mode 100644
index 00000000000..69849101170
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html.ini
@@ -0,0 +1,2 @@
+[fieldset-vertical.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html.ini
new file mode 100644
index 00000000000..8e91cf8be9a
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html.ini
@@ -0,0 +1,2 @@
+[legend-auto-margins.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html.ini
new file mode 100644
index 00000000000..de5de2f7800
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html.ini
@@ -0,0 +1,10 @@
+[legend-block-formatting-context.html]
+ [rendered-legend]
+ expected: FAIL
+
+ [in-fieldset-second-child]
+ expected: FAIL
+
+ [in-fieldset-descendant]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html.ini
new file mode 100644
index 00000000000..e10f148a1ba
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html.ini
@@ -0,0 +1,73 @@
+[legend-display.html]
+ [rendered legend with display: ruby-base-container]
+ expected: FAIL
+
+ [rendered legend with display: ruby-text-container]
+ expected: FAIL
+
+ [rendered legend with display: flow]
+ expected: FAIL
+
+ [rendered legend with display: flow-root]
+ expected: FAIL
+
+ [rendered legend with display: table-column-group]
+ expected: FAIL
+
+ [rendered legend with display: table-row]
+ expected: FAIL
+
+ [rendered legend with display: table-caption]
+ expected: FAIL
+
+ [rendered legend with display: inline-grid]
+ expected: FAIL
+
+ [rendered legend with display: grid]
+ expected: FAIL
+
+ [rendered legend with display: flex]
+ expected: FAIL
+
+ [rendered legend with display: table-row-group]
+ expected: FAIL
+
+ [rendered legend with display: table-cell]
+ expected: FAIL
+
+ [rendered legend with display: ruby]
+ expected: FAIL
+
+ [rendered legend with display: list-item]
+ expected: FAIL
+
+ [rendered legend with display: table-header-group]
+ expected: FAIL
+
+ [rendered legend with display: table-footer-group]
+ expected: FAIL
+
+ [rendered legend with display: table]
+ expected: FAIL
+
+ [rendered legend with display: inline-flex]
+ expected: FAIL
+
+ [rendered legend with display: run-in]
+ expected: FAIL
+
+ [rendered legend with display: inline-block]
+ expected: FAIL
+
+ [rendered legend with display: ruby-text]
+ expected: FAIL
+
+ [rendered legend with display: ruby-base]
+ expected: FAIL
+
+ [rendered legend with display: inline]
+ expected: FAIL
+
+ [rendered legend with display: table-column]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html.ini
new file mode 100644
index 00000000000..0a55a47c4ba
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html.ini
@@ -0,0 +1,13 @@
+[legend-float-abspos.html]
+ [dynamic changes to float]
+ expected: FAIL
+
+ [dynamic changes to position]
+ expected: FAIL
+
+ [inserting a new legend and removing it again]
+ expected: FAIL
+
+ [no dynamic changes]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html.ini
new file mode 100644
index 00000000000..d4bd3869fdf
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html.ini
@@ -0,0 +1,10 @@
+[legend-grid-flex-multicol.html]
+ [multicol]
+ expected: FAIL
+
+ [inline-grid]
+ expected: FAIL
+
+ [grid]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html.ini
new file mode 100644
index 00000000000..84b3539d05c
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html.ini
@@ -0,0 +1,2 @@
+[legend-list-item.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html.ini
new file mode 100644
index 00000000000..f1efd104b95
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html.ini
@@ -0,0 +1,2 @@
+[legend-position-relative.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html.ini
new file mode 100644
index 00000000000..3d009c9c9c2
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html.ini
@@ -0,0 +1,7 @@
+[legend-sans-fieldset-display.html]
+ [.ruby]
+ expected: FAIL
+
+ [.rt]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html.ini
new file mode 100644
index 00000000000..af60f72f9b8
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html.ini
@@ -0,0 +1,4 @@
+[legend.html]
+ [rendered-legend: width]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html.ini
new file mode 100644
index 00000000000..45e26f2671f
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html.ini
@@ -0,0 +1,16 @@
+[min-inline-size.html]
+ [horizontal-tb ]
+ expected: FAIL
+
+ [vertical-rl ]
+ expected: FAIL
+
+ [vertical-lr ]
+ expected: FAIL
+
+ [vertical-lr override]
+ expected: FAIL
+
+ [vertical-rl override]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html.ini
deleted file mode 100644
index 068320fb597..00000000000
--- a/tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[fieldset-transform-translatez.html]
- expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/the-details-element/details-display-property-is-ignored.html.ini b/tests/wpt/metadata/html/rendering/the-details-element/details-display-property-is-ignored.html.ini
new file mode 100644
index 00000000000..0eec246967d
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/the-details-element/details-display-property-is-ignored.html.ini
@@ -0,0 +1,2 @@
+[details-display-property-is-ignored.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini
index 6b0817b6c56..0c03afd7dd8 100644
--- a/tests/wpt/metadata/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini
+++ b/tests/wpt/metadata/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini
@@ -178,46 +178,49 @@
[XHTML img usemap="#different-CASE-id"]
expected: FAIL
- [HTML (quirks) IMG usemap="#"]
+ [XHTML img usemap="hash-last#"]
expected: FAIL
- [XHTML img usemap="hash-last#"]
+ [XHTML img usemap="no-hash-id"]
expected: FAIL
- [HTML (quirks) IMG usemap="no-hash-id"]
+ [XHTML img usemap="#no-such-map"]
expected: FAIL
- [HTML (quirks) IMG usemap="no-hash-name"]
+ [XHTML img usemap="#percent-escape-name-%41"]
expected: FAIL
- [HTML (quirks) IMG usemap="#no-such-map"]
+ [XHTML img usemap="#"]
expected: FAIL
- [HTML (quirks) IMG usemap="hash-last#"]
+ [XHTML img usemap="#different-CASE-name"]
expected: FAIL
- [XHTML img usemap="no-hash-id"]
+ [XHTML img usemap=""]
expected: FAIL
- [HTML (quirks) IMG usemap="#different-CASE-name"]
+ [XHTML img usemap="no-hash-name"]
expected: FAIL
- [XHTML img usemap="#no-such-map"]
+ [HTML (quirks) IMG usemap="#"]
expected: FAIL
- [XHTML img usemap="#percent-escape-name-%41"]
+ [HTML (quirks) IMG usemap="no-hash-id"]
expected: FAIL
- [XHTML img usemap="#"]
+ [HTML (quirks) IMG usemap="no-hash-name"]
expected: FAIL
- [HTML (quirks) IMG usemap="#different-CASE-id"]
+ [HTML (quirks) IMG usemap="#no-such-map"]
expected: FAIL
- [XHTML img usemap="#different-CASE-name"]
+ [HTML (quirks) IMG usemap="hash-last#"]
expected: FAIL
- [XHTML img usemap=""]
+ [HTML (quirks) IMG usemap="#different-CASE-name"]
+ expected: FAIL
+
+ [HTML (quirks) IMG usemap="#different-CASE-id"]
expected: FAIL
[HTML (quirks) IMG usemap=""]
@@ -229,6 +232,3 @@
[HTML (quirks) IMG usemap="#percent-escape-id-%41"]
expected: FAIL
- [XHTML img usemap="no-hash-name"]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/adoption.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/adoption.html.ini
index cc5121db0aa..0cc1f123d22 100644
--- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/adoption.html.ini
+++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/adoption.html.ini
@@ -1,26 +1,5 @@
[adoption.html]
type: testharness
- [img (src only)]
- expected: FAIL
-
- [img (src only), parent is picture]
- expected: FAIL
-
- [img (src only), previous sibling is source]
- expected: FAIL
-
- [img (srcset 1 cand)]
- expected: FAIL
-
- [img (srcset 1 cand), parent is picture]
- expected: FAIL
-
- [img (srcset 1 cand), previous sibling is source]
- expected: FAIL
-
- [adopt a cloned img in template]
- expected: FAIL
-
[adoption is from appendChild]
expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini
index 12b76472074..bf38830e982 100644
--- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini
+++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini
@@ -1,81 +1,27 @@
[viewport-change.html]
type: testharness
expected: TIMEOUT
- [img (src only) broken image, onload, narrow]
- expected: FAIL
-
- [img (src only) valid image, onload, narrow]
- expected: FAIL
-
[img (srcset 1 cand) broken image, onload, narrow]
expected: FAIL
[img (srcset 1 cand) valid image, onload, narrow]
expected: FAIL
- [picture: source (max-width:500px) broken image, img broken image, onload, narrow]
- expected: FAIL
-
- [picture: source (max-width:500px) broken image, img broken image, resize to wide]
- expected: TIMEOUT
-
- [picture: source (max-width:500px) broken image, img valid image, onload, narrow]
- expected: FAIL
-
[picture: source (max-width:500px) broken image, img valid image, resize to wide]
expected: TIMEOUT
- [picture: source (max-width:500px) valid image, img broken image, onload, narrow]
- expected: FAIL
-
- [picture: source (max-width:500px) valid image, img broken image, resize to wide]
- expected: TIMEOUT
-
- [picture: source (max-width:500px) valid image, img valid image, onload, narrow]
- expected: FAIL
-
[picture: source (max-width:500px) valid image, img valid image, resize to wide]
expected: TIMEOUT
- [picture: same URL in source (max-width:500px) and img, onload, narrow]
- expected: FAIL
-
- [img (src only) broken image, onload, wide]
- expected: FAIL
-
- [img (src only) valid image, onload, wide]
- expected: FAIL
-
[img (srcset 1 cand) broken image, onload, wide]
expected: FAIL
[img (srcset 1 cand) valid image, onload, wide]
expected: FAIL
- [picture: source (max-width:500px) broken image, img broken image, onload, wide]
- expected: FAIL
-
- [picture: source (max-width:500px) broken image, img broken image, resize to narrow]
- expected: TIMEOUT
-
- [picture: source (max-width:500px) broken image, img valid image, onload, wide]
- expected: FAIL
-
- [picture: source (max-width:500px) broken image, img valid image, resize to narrow]
- expected: TIMEOUT
-
- [picture: source (max-width:500px) valid image, img broken image, onload, wide]
- expected: FAIL
-
[picture: source (max-width:500px) valid image, img broken image, resize to narrow]
expected: TIMEOUT
- [picture: source (max-width:500px) valid image, img valid image, onload, wide]
- expected: FAIL
-
[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
expected: TIMEOUT
- [picture: same URL in source (max-width:500px) and img, onload, wide]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/goal-parameter.htm.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/goal-parameter.htm.ini
new file mode 100644
index 00000000000..826c1e44545
--- /dev/null
+++ b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/goal-parameter.htm.ini
@@ -0,0 +1,2 @@
+[goal-parameter.htm]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html.ini
new file mode 100644
index 00000000000..178680e5d14
--- /dev/null
+++ b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html.ini
@@ -0,0 +1,2 @@
+[script-onerror-insertion-point-2.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016.html.ini
deleted file mode 100644
index 595f1f9d61b..00000000000
--- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016.html.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[016.html]
- [Timeout on original window, scope]
- expected: FAIL
-
- [Timeout on new window, scope]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js.ini
new file mode 100644
index 00000000000..3643306a1bf
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js.ini
@@ -0,0 +1,14 @@
+[abort-refresh-immediate.window.html]
+ expected: TIMEOUT
+ [document.open() aborts documents that are queued for navigation through <meta> refresh with timeout 0 (XMLHttpRequest)]
+ expected: TIMEOUT
+
+ [document.open() aborts documents that are queued for navigation through Refresh header with timeout 0 (fetch())]
+ expected: TIMEOUT
+
+ [document.open() aborts documents that are queued for navigation through <meta> refresh with timeout 0 (fetch())]
+ expected: TIMEOUT
+
+ [document.open() aborts documents that are queued for navigation through Refresh header with timeout 0 (XMLHttpRequest)]
+ expected: TIMEOUT
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js.ini
new file mode 100644
index 00000000000..fc05e60f852
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js.ini
@@ -0,0 +1,11 @@
+[abort-refresh-multisecond-header.window.html]
+ expected: TIMEOUT
+ [document.open() does NOT abort documents that are queued for navigation through Refresh header with 1-sec timeout (fetch())]
+ expected: TIMEOUT
+
+ [document.open() does NOT abort documents that are queued for navigation through Refresh header with 4-sec timeout (image loading)]
+ expected: TIMEOUT
+
+ [document.open() does NOT abort documents that are queued for navigation through Refresh header with 1-sec timeout (XMLHttpRequest)]
+ expected: TIMEOUT
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js.ini
new file mode 100644
index 00000000000..e3af2aa2a12
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js.ini
@@ -0,0 +1,11 @@
+[abort-refresh-multisecond-meta.window.html]
+ expected: TIMEOUT
+ [document.open() does NOT abort documents that are queued for navigation through <meta> refresh with 4-sec timeout (image loading)]
+ expected: TIMEOUT
+
+ [document.open() does NOT abort documents that are queued for navigation through <meta> refresh with 1-sec timeout (XMLHttpRequest)]
+ expected: TIMEOUT
+
+ [document.open() does NOT abort documents that are queued for navigation through <meta> refresh with 1-sec timeout (fetch())]
+ expected: TIMEOUT
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js.ini
new file mode 100644
index 00000000000..eff2445da68
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js.ini
@@ -0,0 +1,17 @@
+[abort-while-navigating.window.html]
+ expected: TIMEOUT
+ [document.open() aborts documents that are navigating through iframe loading (XMLHttpRequest)]
+ expected: FAIL
+
+ [document.open() aborts documents that are navigating through Location (fetch())]
+ expected: TIMEOUT
+
+ [document.open() aborts documents that are queued for navigation through .click() (fetch())]
+ expected: TIMEOUT
+
+ [document.open() aborts documents that are queued for navigation through .click() (XMLHttpRequest)]
+ expected: TIMEOUT
+
+ [document.open() aborts documents that are navigating through Location (XMLHttpRequest)]
+ expected: TIMEOUT
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js.ini
new file mode 100644
index 00000000000..b92467a93ba
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js.ini
@@ -0,0 +1,14 @@
+[abort.sub.window.html]
+ expected: TIMEOUT
+ [document.open() does not abort documents that are not navigating (image loading)]
+ expected: TIMEOUT
+
+ [document.open() does not abort documents that are not navigating (XMLHttpRequest)]
+ expected: TIMEOUT
+
+ [document.open() does not abort documents that are not navigating (establish a WebSocket connection)]
+ expected: TIMEOUT
+
+ [document.open() does not abort documents that are not navigating (fetch())]
+ expected: TIMEOUT
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window.js.ini
new file mode 100644
index 00000000000..c6d49957c4a
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/aborted-parser.window.js.ini
@@ -0,0 +1,4 @@
+[aborted-parser.window.html]
+ [document.open() after parser is aborted]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js.ini
new file mode 100644
index 00000000000..93a9dfe98cf
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js.ini
@@ -0,0 +1,13 @@
+[active.window.html]
+ [document.open() removes the document's children (non-active document without an associated Window object; createHTMLDocument)]
+ expected: FAIL
+
+ [document.open() removes the document's children (non-active document without an associated Window object; XMLHttpRequest)]
+ expected: FAIL
+
+ [document.open() removes the document's children (non-active document without an associated Window object; DOMParser)]
+ expected: FAIL
+
+ [document.open() removes the document's children (non-active document with an associated Window object; navigated away)]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-xml.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-xml.window.js.ini
index f94398d9201..2314441517b 100644
--- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-xml.window.js.ini
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-exception-vs-return-xml.window.js.ini
@@ -1,8 +1,5 @@
[bailout-exception-vs-return-xml.window.html]
expected: TIMEOUT
- [document.open should throw an InvalidStateError with XML document even when there is an active parser executing script]
- expected: FAIL
-
[document.open should throw an InvalidStateError with XML document even when the ignore-opens-during-unload counter is greater than 0 (during beforeunload event)]
expected: TIMEOUT
@@ -12,3 +9,6 @@
[document.open should throw an InvalidStateError with XML document even when the ignore-opens-during-unload counter is greater than 0 (during pagehide event)]
expected: FAIL
+ [document.open should throw an InvalidStateError with XML document even when there is an active parser executing script]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js.ini
index 5b4f15c7833..af4962cf370 100644
--- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js.ini
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js.ini
@@ -11,3 +11,15 @@
[Standard event listeners are to be removed from Window]
expected: FAIL
+ [Standard event listeners are to be removed from Window for a non-active document that is the associated Document of a Window (frame is removed)]
+ expected: FAIL
+
+ [Custom event listeners are to be removed from Window for an active but not fully active document]
+ expected: FAIL
+
+ [Custom event listeners are to be removed from Window for a non-active document that is the associated Document of a Window (frame is removed)]
+ expected: FAIL
+
+ [Standard event listeners are to be removed from Window for an active but not fully active document]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini
index 4ae5f1b897d..910c88d3e81 100644
--- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini
@@ -12,3 +12,33 @@
[document.open should bail out when ignore-opens-during-unload is greater than 0 during pagehide event]
expected: FAIL
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during visibilitychange event (open(parent) while unloading parent and child)]
+ expected: TIMEOUT
+
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (in top-level browsing context)]
+ expected: TIMEOUT
+
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (open(parent) while unloading child only)]
+ expected: TIMEOUT
+
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during pagehide event (open(parent) while unloading parent and child)]
+ expected: TIMEOUT
+
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during pagehide event (in top-level browsing context)]
+ expected: FAIL
+
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during unload event (in top-level browsing context)]
+ expected: FAIL
+
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during visibilitychange event (in top-level browsing context)]
+ expected: TIMEOUT
+
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (open(parent) while unloading parent and child)]
+ expected: TIMEOUT
+
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during visibilitychange event (open(parent) while unloading child only)]
+ expected: TIMEOUT
+
+ [document.open should bail out when ignore-opens-during-unload is greater than 0 during unload event (open(parent) while unloading parent and child)]
+ expected: TIMEOUT
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js.ini
new file mode 100644
index 00000000000..ac0f3147f9f
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js.ini
@@ -0,0 +1,13 @@
+[quirks.window.html]
+ [document.open() sets document to no-quirks mode (write new doctype)]
+ expected: FAIL
+
+ [document.open() sets document to no-quirks mode, not limited-quirks mode]
+ expected: FAIL
+
+ [document.open() sets document to no-quirks mode (write no doctype)]
+ expected: FAIL
+
+ [document.open() sets document to no-quirks mode (write old doctype)]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js.ini
new file mode 100644
index 00000000000..1f1bf468470
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js.ini
@@ -0,0 +1,4 @@
+[readiness.window.html]
+ [document.open() and readiness]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js.ini
new file mode 100644
index 00000000000..743f32638ad
--- /dev/null
+++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js.ini
@@ -0,0 +1,4 @@
+[url-fragment.window.html]
+ [document.open() and document's URL containing a fragment (entry is not relevant)]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/quirks/unitless-length/excluded-properties-001.html.ini b/tests/wpt/metadata/quirks/unitless-length/excluded-properties-001.html.ini
new file mode 100644
index 00000000000..05a16975210
--- /dev/null
+++ b/tests/wpt/metadata/quirks/unitless-length/excluded-properties-001.html.ini
@@ -0,0 +1,145 @@
+[excluded-properties-001.html]
+ [Property grid-auto-rows does not support quirky length]
+ expected: FAIL
+
+ [Property background-position-x does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-padding-left does not support quirky length]
+ expected: FAIL
+
+ [Property grid-template-rows does not support quirky length]
+ expected: FAIL
+
+ [Property padding-block-end does not support quirky length]
+ expected: FAIL
+
+ [Property inline-size does not support quirky length]
+ expected: FAIL
+
+ [Property padding-inline-end does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-margin-inline-end does not support quirky length]
+ expected: FAIL
+
+ [Property border-bottom-left-radius does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-padding-inline-start does not support quirky length]
+ expected: FAIL
+
+ [Property offset-distance does not support quirky length]
+ expected: FAIL
+
+ [Property grid-auto-columns does not support quirky length]
+ expected: FAIL
+
+ [Property padding-inline-start does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-padding-block-end does not support quirky length]
+ expected: FAIL
+
+ [Property outline-width does not support quirky length]
+ expected: FAIL
+
+ [Property column-rule-width does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-margin-bottom does not support quirky length]
+ expected: FAIL
+
+ [Property grid-template-columns does not support quirky length]
+ expected: FAIL
+
+ [Property perspective does not support quirky length]
+ expected: FAIL
+
+ [Property margin-block-end does not support quirky length]
+ expected: FAIL
+
+ [Property margin-block-start does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-margin-right does not support quirky length]
+ expected: FAIL
+
+ [Property margin-inline-end does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-padding-right does not support quirky length]
+ expected: FAIL
+
+ [Property block-size does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-padding-bottom does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-margin-top does not support quirky length]
+ expected: FAIL
+
+ [Property background-position-y does not support quirky length]
+ expected: FAIL
+
+ [Property border-top-left-radius does not support quirky length]
+ expected: FAIL
+
+ [Property column-width does not support quirky length]
+ expected: FAIL
+
+ [Property min-block-size does not support quirky length]
+ expected: FAIL
+
+ [Property outline-offset does not support quirky length]
+ expected: FAIL
+
+ [Property flex-basis does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-padding-block-start does not support quirky length]
+ expected: FAIL
+
+ [Property padding-block-start does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-margin-block-end does not support quirky length]
+ expected: FAIL
+
+ [Property row-gap does not support quirky length]
+ expected: FAIL
+
+ [Property min-inline-size does not support quirky length]
+ expected: FAIL
+
+ [Property margin-inline-start does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-margin-inline-start does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-padding-top does not support quirky length]
+ expected: FAIL
+
+ [Property border-bottom-right-radius does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-padding-inline-end does not support quirky length]
+ expected: FAIL
+
+ [Property border-top-right-radius does not support quirky length]
+ expected: FAIL
+
+ [Property column-gap does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-margin-block-start does not support quirky length]
+ expected: FAIL
+
+ [Property scroll-margin-left does not support quirky length]
+ expected: FAIL
+
+ [Property shape-margin does not support quirky length]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/quirks/unitless-length/excluded-properties-002.html.ini b/tests/wpt/metadata/quirks/unitless-length/excluded-properties-002.html.ini
new file mode 100644
index 00000000000..2921e774187
--- /dev/null
+++ b/tests/wpt/metadata/quirks/unitless-length/excluded-properties-002.html.ini
@@ -0,0 +1,34 @@
+[excluded-properties-002.html]
+ [Property mask does not support quirky length]
+ expected: FAIL
+
+ [Property background-blend-mode does not support quirky length]
+ expected: FAIL
+
+ [Property transform-origin does not support quirky length]
+ expected: FAIL
+
+ [Property filter does not support quirky length]
+ expected: FAIL
+
+ [Property text-shadow does not support quirky length]
+ expected: FAIL
+
+ [Property clip-path does not support quirky length]
+ expected: FAIL
+
+ [Property column-span does not support quirky length]
+ expected: FAIL
+
+ [Property background-size does not support quirky length]
+ expected: FAIL
+
+ [Property box-shadow does not support quirky length]
+ expected: FAIL
+
+ [Property perspective-origin does not support quirky length]
+ expected: FAIL
+
+ [Property object-position does not support quirky length]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/url/urlencoded-parser.any.js.ini b/tests/wpt/metadata/url/urlencoded-parser.any.js.ini
index bd7b49ac78a..e3e13ec3d62 100644
--- a/tests/wpt/metadata/url/urlencoded-parser.any.js.ini
+++ b/tests/wpt/metadata/url/urlencoded-parser.any.js.ini
@@ -1,20 +1,11 @@
[urlencoded-parser.any.html]
- [response.formData() with input: a&b&c]
- expected: FAIL
-
[request.formData() with input: a&b&c]
expected: FAIL
- [request.formData() with input: a=b&c=d&]
- expected: FAIL
-
- [request.formData() with input: a=b&c=d]
- expected: FAIL
-
- [response.formData() with input: a=b&c=d&]
+ [response.formData() with input: a&b&c]
expected: FAIL
- [response.formData() with input: _charset_=windows-1252&test=%C2x]
+ [response.formData() with input: a=b&c=d]
expected: FAIL
@@ -22,18 +13,15 @@
[response.formData() with input: a&b&c]
expected: FAIL
- [request.formData() with input: a&b&c]
- expected: FAIL
-
[request.formData() with input: _charset_=windows-1252&test=%C2x]
expected: FAIL
- [response.formData() with input: _charset_=windows-1252&test=%C2x]
+ [response.formData() with input: &&&a=b&&&&c=d&]
expected: FAIL
- [request.formData() with input: &&&a=b&&&&c=d&]
+ [response.formData() with input: a=b&c=d]
expected: FAIL
- [response.formData() with input: &&&a=b&&&&c=d&]
+ [request.formData() with input: a=b&c=d&]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/idlharness.https.window.js.ini b/tests/wpt/metadata/webaudio/idlharness.https.window.js.ini
index d95bb14fe01..4114b54f0a6 100644
--- a/tests/wpt/metadata/webaudio/idlharness.https.window.js.ini
+++ b/tests/wpt/metadata/webaudio/idlharness.https.window.js.ini
@@ -14,9 +14,6 @@
[BaseAudioContext interface: operation createBiquadFilter()]
expected: FAIL
- [BaseAudioContext interface: operation createChannelMerger(unsigned long)]
- expected: FAIL
-
[BaseAudioContext interface: operation createChannelSplitter(unsigned long)]
expected: FAIL
@@ -101,12 +98,6 @@
[BaseAudioContext interface: context must inherit property "createBiquadFilter()" with the proper type]
expected: FAIL
- [BaseAudioContext interface: context must inherit property "createChannelMerger(unsigned long)" with the proper type]
- expected: FAIL
-
- [BaseAudioContext interface: calling createChannelMerger(unsigned long) on context with too few arguments must throw TypeError]
- expected: FAIL
-
[BaseAudioContext interface: context must inherit property "createChannelSplitter(unsigned long)" with the proper type]
expected: FAIL
@@ -176,12 +167,6 @@
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "createBiquadFilter()" with the proper type]
expected: FAIL
- [BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "createChannelMerger(unsigned long)" with the proper type]
- expected: FAIL
-
- [BaseAudioContext interface: calling createChannelMerger(unsigned long) on new OfflineAudioContext(1, 1, sample_rate) with too few arguments must throw TypeError]
- expected: FAIL
-
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "createChannelSplitter(unsigned long)" with the proper type]
expected: FAIL
@@ -590,99 +575,6 @@
[AudioNode interface: new BiquadFilterNode(context) must inherit property "channelInterpretation" with the proper type]
expected: FAIL
- [ChannelMergerNode interface: existence and properties of interface object]
- expected: FAIL
-
- [ChannelMergerNode interface object length]
- expected: FAIL
-
- [ChannelMergerNode interface object name]
- expected: FAIL
-
- [ChannelMergerNode interface: existence and properties of interface prototype object]
- expected: FAIL
-
- [ChannelMergerNode interface: existence and properties of interface prototype object's "constructor" property]
- expected: FAIL
-
- [ChannelMergerNode interface: existence and properties of interface prototype object's @@unscopables property]
- expected: FAIL
-
- [ChannelMergerNode must be primary interface of new ChannelMergerNode(context)]
- expected: FAIL
-
- [Stringification of new ChannelMergerNode(context)]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "connect(AudioNode, unsigned long, unsigned long)" with the proper type]
- expected: FAIL
-
- [AudioNode interface: calling connect(AudioNode, unsigned long, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "connect(AudioParam, unsigned long)" with the proper type]
- expected: FAIL
-
- [AudioNode interface: calling connect(AudioParam, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect()" with the proper type]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(unsigned long)" with the proper type]
- expected: FAIL
-
- [AudioNode interface: calling disconnect(unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode)" with the proper type]
- expected: FAIL
-
- [AudioNode interface: calling disconnect(AudioNode) on new ChannelMergerNode(context) with too few arguments must throw TypeError]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode, unsigned long)" with the proper type]
- expected: FAIL
-
- [AudioNode interface: calling disconnect(AudioNode, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioNode, unsigned long, unsigned long)" with the proper type]
- expected: FAIL
-
- [AudioNode interface: calling disconnect(AudioNode, unsigned long, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioParam)" with the proper type]
- expected: FAIL
-
- [AudioNode interface: calling disconnect(AudioParam) on new ChannelMergerNode(context) with too few arguments must throw TypeError]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "disconnect(AudioParam, unsigned long)" with the proper type]
- expected: FAIL
-
- [AudioNode interface: calling disconnect(AudioParam, unsigned long) on new ChannelMergerNode(context) with too few arguments must throw TypeError]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "context" with the proper type]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "numberOfInputs" with the proper type]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "numberOfOutputs" with the proper type]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "channelCount" with the proper type]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "channelCountMode" with the proper type]
- expected: FAIL
-
- [AudioNode interface: new ChannelMergerNode(context) must inherit property "channelInterpretation" with the proper type]
- expected: FAIL
-
[ChannelSplitterNode interface: existence and properties of interface object]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html.ini
index f5269d37fde..decbfc1cb82 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html.ini
@@ -1,11 +1,5 @@
[ctor-analyser.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new AnalyserNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html.ini
index 5d4013b58ba..6992ca5707d 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html.ini
@@ -1,7 +1,7 @@
[test-analysernode.html]
- [Test AnalyserNode API]
+ [Test AnalyserNode's ctor API]
expected: FAIL
- [Test AnalyserNode's ctor API]
+ [Test AnalyserNode API]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html.ini
index c20621a71fd..3ab0ffc0e35 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html.ini
@@ -1,8 +1,2 @@
[ctor-audiobuffer.html]
expected: CRASH
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html.ini
index 85539401e15..1dd5bffb290 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html.ini
@@ -1,19 +1,10 @@
[audiobuffersource-basic.html]
- [X start(-1) did not throw an exception.]
- expected: FAIL
-
- [X start(0,-1) threw "InvalidStateError" instead of function RangeError() {\n [native code\]\n}.]
- expected: FAIL
-
- [X start(0,0,-1) threw "InvalidStateError" instead of function RangeError() {\n [native code\]\n}.]
+ [< [start/stop exceptions\] 1 out of 12 assertions were failed.]
expected: FAIL
[X stop(-1) did not throw an exception.]
expected: FAIL
- [< [start/stop exceptions\] 1 out of 12 assertions were failed.]
- expected: FAIL
-
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html.ini
index e50e54a484f..bee66afc5a1 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html.ini
@@ -1,10 +1,10 @@
[audiobuffersource-channels.html]
- [X source.buffer = buffer again did not throw an exception.]
+ [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
expected: FAIL
- [< [validate .buffer\] 1 out of 16 assertions were failed.]
+ [X source.buffer = buffer again did not throw an exception.]
expected: FAIL
- [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+ [< [validate .buffer\] 1 out of 16 assertions were failed.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-one-sample-loop.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-one-sample-loop.html.ini
index ec4723759dc..7072e3007b3 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-one-sample-loop.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-one-sample-loop.html.ini
@@ -2,9 +2,12 @@
[X Rendered data: Expected 1 for all values but found 998 unexpected values: \n\tIndex\tActual\n\t[1\]\t0\n\t[2\]\t0\n\t[3\]\t0\n\t[4\]\t0\n\t...and 994 more errors.]
expected: FAIL
+ [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+ expected: FAIL
+
[< [one-sample-loop\] 1 out of 1 assertions were failed.]
expected: FAIL
- [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+ [X Rendered data: Expected 1 for all values but found 999 unexpected values: \n\tIndex\tActual\n\t[1\]\t0\n\t[2\]\t0\n\t[3\]\t0\n\t[4\]\t0\n\t...and 995 more errors.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-start.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-start.html.ini
index 57682be74f1..2ff066738bf 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-start.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-start.html.ini
@@ -1,26 +1,26 @@
[audiobuffersource-start.html]
- [X Case 0: start(when): implicitly play whole buffer from beginning to end expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t9.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t1.8000000000000000e+1\t2.0000000000000000e+0\n\t[3\]\t2.7000000000000000e+1\t3.0000000000000000e+0\n\t[4\]\t3.6000000000000000e+1\t4.0000000000000000e+0\n\t...and 3 more errors.]
+ [< [Tests AudioBufferSourceNode start()\] 7 out of 18 assertions were failed.]
expected: FAIL
- [X Case 1: start(when, 0): play whole buffer from beginning to end explicitly giving offset of 0 expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t2.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t3.0000000000000000e+0\n\t[4\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t...and 3 more errors.]
+ [X Case 4: start(when, 4_frames, 4_frames): play with explicit non-zero offset and duration expected to be equal to the array [4,5,6,7,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 4 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t[1\]\t0.0000000000000000e+0\t5.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t6.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t7.0000000000000000e+0\n\t...and 0 more errors.]
expected: FAIL
- [X Case 2: start(when, 0, 8_frames): play whole buffer from beginning to end explicitly giving offset of 0 and duration of 8 frames expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t2.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t3.0000000000000000e+0\n\t[4\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t...and 3 more errors.]
+ [X Case 5: start(when, 7_frames): play with explicit non-zero offset near end of buffer expected to be equal to the array [7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 1 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t7.0000000000000000e+0]
expected: FAIL
- [X Case 3: start(when, 4_frames): play with explicit non-zero offset expected to be equal to the array [4,5,6,7,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 4 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t[1\]\t0.0000000000000000e+0\t5.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t6.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t7.0000000000000000e+0\n\t...and 0 more errors.]
+ [X Case 8: start(when, 0, 15_frames): play with whole buffer, with long duration (clipped) expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t2.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t3.0000000000000000e+0\n\t[4\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t...and 3 more errors.]
expected: FAIL
- [X Case 4: start(when, 4_frames, 4_frames): play with explicit non-zero offset and duration expected to be equal to the array [4,5,6,7,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 4 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t[1\]\t0.0000000000000000e+0\t5.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t6.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t7.0000000000000000e+0\n\t...and 0 more errors.]
+ [X Case 1: start(when, 0): play whole buffer from beginning to end explicitly giving offset of 0 expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t2.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t3.0000000000000000e+0\n\t[4\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t...and 3 more errors.]
expected: FAIL
- [X Case 5: start(when, 7_frames): play with explicit non-zero offset near end of buffer expected to be equal to the array [7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 1 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t7.0000000000000000e+0]
+ [X Case 0: start(when): implicitly play whole buffer from beginning to end expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t9.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t1.8000000000000000e+1\t2.0000000000000000e+0\n\t[3\]\t2.7000000000000000e+1\t3.0000000000000000e+0\n\t[4\]\t3.6000000000000000e+1\t4.0000000000000000e+0\n\t...and 3 more errors.]
expected: FAIL
- [X Case 8: start(when, 0, 15_frames): play with whole buffer, with long duration (clipped) expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t2.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t3.0000000000000000e+0\n\t[4\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t...and 3 more errors.]
+ [X Case 2: start(when, 0, 8_frames): play whole buffer from beginning to end explicitly giving offset of 0 and duration of 8 frames expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t2.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t3.0000000000000000e+0\n\t[4\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t...and 3 more errors.]
expected: FAIL
- [< [Tests AudioBufferSourceNode start()\] 7 out of 18 assertions were failed.]
+ [X Case 3: start(when, 4_frames): play with explicit non-zero offset expected to be equal to the array [4,5,6,7,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 4 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t[1\]\t0.0000000000000000e+0\t5.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t6.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t7.0000000000000000e+0\n\t...and 0 more errors.]
expected: FAIL
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiosource-time-limits.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiosource-time-limits.html.ini
index d053c0ab346..b5313c149bd 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiosource-time-limits.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiosource-time-limits.html.ini
@@ -1,16 +1,19 @@
[audiosource-time-limits.html]
- [X Output from AudioBufferSource.stop(1e+300): Expected 1 for all values but found 999 unexpected values: \n\tIndex\tActual\n\t[0\]\t0\n\t[1\]\t0\n\t[2\]\t0\n\t[3\]\t0\n\t...and 995 more errors.]
+ [X Peak amplitude from oscillator.stop(1e+300) is not greater than 0. Got 0.]
expected: FAIL
- [< [buffersource: huge stop time\] 1 out of 1 assertions were failed.]
+ [# AUDIT TASK RUNNER FINISHED: 2 out of 2 tasks were failed.]
expected: FAIL
- [X Peak amplitude from oscillator.stop(1e+300) is not greater than 0. Got 0.]
+ [< [buffersource: huge stop time\] 1 out of 1 assertions were failed.]
expected: FAIL
[< [oscillator: huge stop time\] 1 out of 1 assertions were failed.]
expected: FAIL
- [# AUDIT TASK RUNNER FINISHED: 2 out of 2 tasks were failed.]
+ [X Output from AudioBufferSource.stop(1e+300): Expected 1 for all values but found 999 unexpected values: \n\tIndex\tActual\n\t[0\]\t0\n\t[1\]\t0\n\t[2\]\t0\n\t[3\]\t0\n\t...and 995 more errors.]
+ expected: FAIL
+
+ [X Output from AudioBufferSource.stop(1e+300): Expected 1 for all values but found 1000 unexpected values: \n\tIndex\tActual\n\t[0\]\t0\n\t[1\]\t0\n\t[2\]\t0\n\t[3\]\t0\n\t...and 996 more errors.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html.ini
new file mode 100644
index 00000000000..1ec6a000047
--- /dev/null
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html.ini
@@ -0,0 +1,16 @@
+[buffer-resampling.html]
+ [< [interpolate\] 2 out of 2 assertions were failed.]
+ expected: FAIL
+
+ [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+ expected: FAIL
+
+ [X SNR (0.000 dB) is not greater than or equal to 37.17. Got 0.]
+ expected: FAIL
+
+ [X Interpolated sine wave does not equal [0,0.05756402388215065,0.11493714898824692,0.17192909121513367,0.22835086286067963,0.28401535749435425,0.3387379050254822,0.3923371136188507,0.44463518261909485,0.4954586327075958,0.5446390509605408,0.5920131802558899,0.6374239921569824,0.680720865726471,0.7217602133750916,0.760405957698822...\] with an element-wise tolerance of {"absoluteThreshold":0.090348,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[2\]\t0.0000000000000000e+0\t1.1493714898824692e-1\t1.1493714898824692e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t[3\]\t0.0000000000000000e+0\t1.7192909121513367e-1\t1.7192909121513367e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t[4\]\t0.0000000000000000e+0\t2.2835086286067963e-1\t2.2835086286067963e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t[5\]\t0.0000000000000000e+0\t2.8401535749435425e-1\t2.8401535749435425e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t[6\]\t0.0000000000000000e+0\t3.3873790502548218e-1\t3.3873790502548218e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t...and 476 more errors.\n\tMax AbsError of 1.0000000000000000e+0 at index of 300.\n\t[300\]\t0.0000000000000000e+0\t-1.0000000000000000e+0\t1.0000000000000000e+0\t1.0000000000000000e+0\t9.0347999999999998e-2\n\tMax RelError of 1.0000000000000000e+0 at index of 2.\n]
+ expected: FAIL
+
+ [X Interpolated sine wave does not equal [0,0.05756402388215065,0.11493714898824692,0.17192909121513367,0.22835086286067963,0.28401535749435425,0.3387379050254822,0.3923371136188507,0.44463518261909485,0.4954586327075958,0.5446390509605408,0.5920131802558899,0.6374239921569824,0.680720865726471,0.7217602133750916,0.760405957698822...\] with an element-wise tolerance of {"absoluteThreshold":0.090348,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[2\]\t0.0000000000000000e+0\t1.1493714898824692e-1\t1.1493714898824692e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t[3\]\t0.0000000000000000e+0\t1.7192909121513367e-1\t1.7192909121513367e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t[4\]\t0.0000000000000000e+0\t2.2835086286067963e-1\t2.2835086286067963e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t[5\]\t0.0000000000000000e+0\t2.8401535749435425e-1\t2.8401535749435425e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t[6\]\t0.0000000000000000e+0\t3.3873790502548218e-1\t3.3873790502548218e-1\t1.0000000000000000e+0\t9.0347999999999998e-2\n\t...and 477 more errors.\n\tMax AbsError of 1.0000000000000000e+0 at index of 300.\n\t[300\]\t0.0000000000000000e+0\t-1.0000000000000000e+0\t1.0000000000000000e+0\t1.0000000000000000e+0\t9.0347999999999998e-2\n\tMax RelError of 1.0000000000000000e+0 at index of 2.\n]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/ctor-audiobuffersource.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/ctor-audiobuffersource.html.ini
index ca302b9c130..81719db284e 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/ctor-audiobuffersource.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/ctor-audiobuffersource.html.ini
@@ -1,16 +1,4 @@
[ctor-audiobuffersource.html]
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
- [X node0 = new AudioBufferSourceNode(context) incorrectly threw TypeError: "Value is not an object.".]
- expected: FAIL
-
- [X node0 instanceof AudioBufferSourceNode is not equal to true. Got false.]
- expected: FAIL
-
[X node2.buffer === buffer is not equal to true. Got false.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/note-grain-on-timing.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/note-grain-on-timing.html.ini
index b9048a3781b..c0b05abed2a 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/note-grain-on-timing.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/note-grain-on-timing.html.ini
@@ -1,19 +1,19 @@
[note-grain-on-timing.html]
- [X Number of start frames is not equal to 100. Got 1.]
- expected: FAIL
-
- [X Number of end frames is not equal to 100. Got 1.]
+ [X Number of grains that started at the correct time is not equal to 100. Got 1.]
expected: FAIL
[X Pulse 0 boundary expected to be equal to the array [0,441\] but differs in 1 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t4.8520000000000000e+3\t4.4100000000000000e+2]
expected: FAIL
- [X Number of grains that started at the correct time is not equal to 100. Got 1.]
+ [X Number of start frames is not equal to 100. Got 1.]
expected: FAIL
[X Number of grains out of 100 that ended at the wrong time is not equal to 0. Got 1.]
expected: FAIL
+ [X Number of end frames is not equal to 100. Got 1.]
+ expected: FAIL
+
[< [Test timing of noteGrainOn\] 5 out of 6 assertions were failed.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sample-accurate-scheduling.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sample-accurate-scheduling.html.ini
index 2ee30ad13b8..3a1b725b3bc 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sample-accurate-scheduling.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sample-accurate-scheduling.html.ini
@@ -1,13 +1,19 @@
[sample-accurate-scheduling.html]
+ [X Number of impulses found is not equal to 9. Got 2.]
+ expected: FAIL
+
[X Non-zero sample found at sample offset 176399 is not true. Got false.]
expected: FAIL
- [X Number of impulses found is not equal to 9. Got 2.]
+ [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
expected: FAIL
[< [test\] 2 out of 4 assertions were failed.]
expected: FAIL
- [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+ [< [test\] 1 out of 3 assertions were failed.]
+ expected: FAIL
+
+ [X Number of impulses found is not equal to 9. Got 1.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html.ini
index 2027a838885..ea96d4b24a2 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html.ini
@@ -1,8 +1,5 @@
[audiocontext-suspend-resume.html]
expected: ERROR
- [X offlineContext = new OfflineAudioContext(1, 44100, 44100) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
[X p1 = offlineContext.suspend() incorrectly threw TypeError: "offlineContext.suspend is not a function".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html.ini
index d9038be4060..f005c866ee6 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html.ini
@@ -1,17 +1,17 @@
[audiocontextoptions.html]
expected: TIMEOUT
- [X default baseLatency is not greater than 0. Got 0.]
+ [< [test-audiocontextoptions-latencyHint-basic\] 1 out of 9 assertions were failed.]
expected: FAIL
- [< [test-audiocontextoptions-latencyHint-basic\] 1 out of 9 assertions were failed.]
+ [X creating two high latency contexts incorrectly threw TypeError: "'0' is not a valid enum value for enumeration 'AudioContextLatencyCategory'.".]
expected: FAIL
[X context = new AudioContext({'latencyHint': interactiveLatency/2}) incorrectly threw TypeError: "'0' is not a valid enum value for enumeration 'AudioContextLatencyCategory'.".]
expected: FAIL
- [X context = new AudioContext({'latencyHint': validLatency}) incorrectly threw TypeError: "'0' is not a valid enum value for enumeration 'AudioContextLatencyCategory'.".]
+ [X default baseLatency is not greater than 0. Got 0.]
expected: FAIL
- [X creating two high latency contexts incorrectly threw TypeError: "'0' is not a valid enum value for enumeration 'AudioContextLatencyCategory'.".]
+ [X context = new AudioContext({'latencyHint': validLatency}) incorrectly threw TypeError: "'0' is not a valid enum value for enumeration 'AudioContextLatencyCategory'.".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audionode-interface/audionode.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audionode-interface/audionode.html.ini
index 0879ed55b0e..fad7f86f63a 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audionode-interface/audionode.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audionode-interface/audionode.html.ini
@@ -1,16 +1,10 @@
[audionode.html]
- [X AudioContext.destination.numberOfOutputs is not equal to 0. Got 1.]
- expected: FAIL
-
- [X Connecting a node to a different context did not throw an exception.]
- expected: FAIL
-
- [< [test\] 2 out of 12 assertions were failed.]
- expected: FAIL
-
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
expected: FAIL
[< [test\] 1 out of 12 assertions were failed.]
expected: FAIL
+ [X AudioContext.destination.numberOfOutputs is not equal to 0. Got 1.]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html.ini
index 83d2ecf7e47..aae947a9649 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html.ini
@@ -1,47 +1,41 @@
[audioparam-exceptional-values.html]
- [X Creating context for testing incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
+ [X gain.gain.exponentialRampToValueAtTime(-1e-100,1) did not throw an exception.]
expected: FAIL
- [X gain.gain.setValueAtTime(1,-1) did not throw an exception.]
+ [X gain.gain.exponentialRampToValueAtTime(0,1) did not throw an exception.]
expected: FAIL
[X gain.gain.linearRampToValueAtTime(1,-1) did not throw an exception.]
expected: FAIL
- [X gain.gain.exponentialRampToValueAtTime(1,-1) did not throw an exception.]
- expected: FAIL
-
[X gain.gain.setTargetAtTime(1,-1,1) did not throw an exception.]
expected: FAIL
- [X gain.gain.setTargetAtTime(1,1,-1) did not throw an exception.]
+ [X gain.gain.setValueCurveAtTime([0,0,0\],1,-1) threw "TypeError" instead of EcmaScript error RangeError.]
expected: FAIL
- [X gain.gain.setValueCurveAtTime([[object Float32Array\]\],-1,1) threw "TypeError" instead of EcmaScript error RangeError.]
+ [< [special cases 1\] 9 out of 9 assertions were failed.]
expected: FAIL
- [X gain.gain.setValueCurveAtTime([[object Float32Array\]\],1,-1) threw "TypeError" instead of EcmaScript error RangeError.]
+ [X gain.gain.setValueCurveAtTime(curve, 1, -1) threw "TypeError" instead of EcmaScript error RangeError.]
expected: FAIL
- [X gain.gain.setValueCurveAtTime(curve, 1, 0) threw "TypeError" instead of EcmaScript error RangeError.]
+ [X gain.gain.exponentialRampToValueAtTime(1,-1) did not throw an exception.]
expected: FAIL
- [X gain.gain.setValueCurveAtTime(\[0,0,0\],1,-1) threw "TypeError" instead of EcmaScript error RangeError.]
+ [X gain.gain.setValueAtTime(1,-1) did not throw an exception.]
expected: FAIL
- [X gain.gain.setValueCurveAtTime(\[0,0,0\],-1,1) threw "TypeError" instead of EcmaScript error RangeError.]
+ [X gain.gain.setValueCurveAtTime(curve, 1, 0) threw "TypeError" instead of EcmaScript error RangeError.]
expected: FAIL
- [< [special cases 1\] 8 out of 8 assertions were failed.]
+ [# AUDIT TASK RUNNER FINISHED: 2 out of 6 tasks were failed.]
expected: FAIL
- [X gain.gain.exponentialRampToValueAtTime(0,1) did not throw an exception.]
+ [X gain.gain.setValueCurveAtTime([0,0,0\],-1,1) threw "TypeError" instead of EcmaScript error RangeError.]
expected: FAIL
- [X gain.gain.exponentialRampToValueAtTime(-1e-100,1) did not throw an exception.]
+ [X gain.gain.setTargetAtTime(1,1,-1) did not throw an exception.]
expected: FAIL
[X gain.gain.exponentialRampToValueAtTime(1e-100,1) did not throw an exception.]
@@ -50,6 +44,3 @@
[< [special cases 2\] 3 out of 3 assertions were failed.]
expected: FAIL
- [# AUDIT TASK RUNNER FINISHED: 2 out of 6 tasks were failed.]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exponentialRampToValueAtTime.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exponentialRampToValueAtTime.html.ini
index 4058485dd3c..d9f2411271c 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exponentialRampToValueAtTime.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-exponentialRampToValueAtTime.html.ini
@@ -1,307 +1,307 @@
[audioparam-exponentialRampToValueAtTime.html]
- [X Max error for test 0 at offset 1322 is not less than or equal to 0.00001222. Got 0.004971347529273832.]
+ [X Max error for test 27 at offset 37043 is not less than or equal to 0.00001222. Got 0.006891359771030949.]
expected: FAIL
- [X Max error for test 1 at offset 2645 is not less than or equal to 0.00001222. Got 0.00507232754748583.]
+ [X Max error for test 31 at offset 42335 is not less than or equal to 0.00001222. Got 0.007293772743964152.]
expected: FAIL
- [X Max error for test 2 at offset 3968 is not less than or equal to 0.00001222. Got 0.005072288986783049.]
+ [X Max error for test 32 at offset 43658 is not less than or equal to 0.00001222. Got 0.0072937417900018064.]
expected: FAIL
- [X Max error for test 3 at offset 5291 is not less than or equal to 0.00001222. Got 0.005177453099763553.]
+ [X Max error for test 55 at offset 74087 is not less than or equal to 0.00001222. Got 0.01122737314374763.]
expected: FAIL
- [X Max error for test 4 at offset 6614 is not less than or equal to 0.00001222. Got 0.005177414562697979.]
+ [X Max error for test 3 at offset 5291 is not less than or equal to 0.00001222. Got 0.005177453099763553.]
expected: FAIL
- [X Max error for test 5 at offset 7937 is not less than or equal to 0.00001222. Got 0.005287028393264749.]
+ [X Max error for test 20 at offset 27782 is not less than or equal to 0.00001222. Got 0.006206470780796884.]
expected: FAIL
- [X Max error for test 6 at offset 9260 is not less than or equal to 0.00001222. Got 0.005286989916402489.]
+ [X Max error for test 33 at offset 44981 is not less than or equal to 0.00001222. Got 0.007513133097079656.]
expected: FAIL
- [X Max error for test 7 at offset 10583 is not less than or equal to 0.00001222. Got 0.005401342058686055.]
+ [X Max error for test 91 at offset 121715 is not less than or equal to 0.00001222. Got 0.05877779461906339.]
expected: FAIL
- [X Max error for test 8 at offset 11906 is not less than or equal to 0.00001222. Got 0.00540130368332191.]
+ [X Max error for test 82 at offset 109808 is not less than or equal to 0.00001222. Got 0.027006863607415388.]
expected: FAIL
- [X Max error for test 9 at offset 13229 is not less than or equal to 0.00001222. Got 0.005520708240934441.]
+ [X Max error for test 62 at offset 83348 is not less than or equal to 0.00001222. Got 0.01297723326480682.]
expected: FAIL
- [X Max error for test 10 at offset 14552 is not less than or equal to 0.00001222. Got 0.005520670013722852.]
+ [X Max error for test 80 at offset 107162 is not less than or equal to 0.00001222. Got 0.024372089145737547.]
expected: FAIL
- [X Max error for test 11 at offset 15875 is not less than or equal to 0.00001222. Got 0.005645469482076645.]
+ [X Max error for test 54 at offset 72764 is not less than or equal to 0.00001222. Got 0.010744572666723327.]
expected: FAIL
- [X Max error for test 12 at offset 17198 is not less than or equal to 0.00001222. Got 0.005645431455758545.]
+ [X Max error for test 41 at offset 55565 is not less than or equal to 0.00001222. Got 0.008540497771090037.]
expected: FAIL
- [X Max error for test 13 at offset 18521 is not less than or equal to 0.00001222. Got 0.005776000004233634.]
+ [X Max error for test 18 at offset 25136 is not less than or equal to 0.00001222. Got 0.006056010187369548.]
expected: FAIL
- [X Max error for test 14 at offset 19844 is not less than or equal to 0.00001222. Got 0.0057759622384759915.]
+ [X Max error for test 61 at offset 82025 is not less than or equal to 0.00001222. Got 0.012977176838334303.]
expected: FAIL
- [X Max error for test 15 at offset 21167 is not less than or equal to 0.00001222. Got 0.0059127094586828586.]
+ [X Max error for test 87 at offset 116423 is not less than or equal to 0.00001222. Got 0.03996905609650592.]
expected: FAIL
- [X Max error for test 16 at offset 22490 is not less than or equal to 0.00001222. Got 0.005912672021051084.]
+ [X Max error for test 23 at offset 31751 is not less than or equal to 0.00001222. Got 0.006531028994848638.]
expected: FAIL
- [X Max error for test 17 at offset 23813 is not less than or equal to 0.00001222. Got 0.006056047220282001.]
+ [X Max error for test 64 at offset 85994 is not less than or equal to 0.00001222. Got 0.013688321971339096.]
expected: FAIL
- [X Max error for test 18 at offset 25136 is not less than or equal to 0.00001222. Got 0.006056010187369548.]
+ [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
expected: FAIL
- [X Max error for test 19 at offset 26459 is not less than or equal to 0.00001222. Got 0.006206507322052307.]
+ [X Max error for test 95 at offset 127007 is not less than or equal to 0.00001222. Got 0.1110222263568349.]
expected: FAIL
- [X Max error for test 20 at offset 27782 is not less than or equal to 0.00001222. Got 0.006206470780796884.]
+ [X Max error for test 60 at offset 80702 is not less than or equal to 0.00001222. Got 0.012336376203148012.]
expected: FAIL
- [X Max error for test 21 at offset 29105 is not less than or equal to 0.00001222. Got 0.0063646341440895165.]
+ [X Max error for test 8 at offset 11906 is not less than or equal to 0.00001222. Got 0.00540130368332191.]
expected: FAIL
- [X Max error for test 22 at offset 30428 is not less than or equal to 0.00001222. Got 0.00636459819331172.]
+ [X Max error for test 39 at offset 52919 is not less than or equal to 0.00001222. Got 0.008258169028622094.]
expected: FAIL
- [X Max error for test 23 at offset 31751 is not less than or equal to 0.00001222. Got 0.006531028994848638.]
+ [X Max error for test 51 at offset 68795 is not less than or equal to 0.00001222. Got 0.010301411434863215.]
expected: FAIL
- [X Max error for test 24 at offset 33074 is not less than or equal to 0.00001222. Got 0.0065309937470566844.]
+ [X Max error for test 66 at offset 88640 is not less than or equal to 0.00001222. Got 0.014481856656908305.]
expected: FAIL
- [X Max error for test 25 at offset 34397 is not less than or equal to 0.00001222. Got 0.006706357752496105.]
+ [X Max error for test 45 at offset 60857 is not less than or equal to 0.00001222. Got 0.009167318952047627.]
expected: FAIL
- [X Max error for test 26 at offset 35720 is not less than or equal to 0.00001222. Got 0.006706323336010292.]
+ [X Max error for test 70 at offset 93932 is not less than or equal to 0.00001222. Got 0.016381078788684566.]
expected: FAIL
- [X Max error for test 27 at offset 37043 is not less than or equal to 0.00001222. Got 0.006891359771030949.]
+ [X Max error for test 1 at offset 2645 is not less than or equal to 0.00001222. Got 0.00507232754748583.]
expected: FAIL
- [X Max error for test 28 at offset 38366 is not less than or equal to 0.00001222. Got 0.00689132633249392.]
+ [X Max error for test 58 at offset 78056 is not less than or equal to 0.00001222. Got 0.011755835641619888.]
expected: FAIL
- [X Max error for test 29 at offset 39689 is not less than or equal to 0.00001222. Got 0.007086858302333446.]
+ [X Max error for test 83 at offset 111131 is not less than or equal to 0.00001222. Got 0.030279806361083936.]
expected: FAIL
- [X Max error for test 30 at offset 41012 is not less than or equal to 0.00001222. Got 0.007086826009688193.]
+ [X Max error for test 38 at offset 51596 is not less than or equal to 0.00001222. Got 0.007993945275544895.]
expected: FAIL
- [X Max error for test 31 at offset 42335 is not less than or equal to 0.00001222. Got 0.007293772743964152.]
+ [X Max error for test 67 at offset 89963 is not less than or equal to 0.00001222. Got 0.01537293577367861.]
expected: FAIL
- [X Max error for test 32 at offset 43658 is not less than or equal to 0.00001222. Got 0.0072937417900018064.]
+ [X Max error for test 19 at offset 26459 is not less than or equal to 0.00001222. Got 0.006206507322052307.]
expected: FAIL
- [X Max error for test 33 at offset 44981 is not less than or equal to 0.00001222. Got 0.007513133097079656.]
+ [X Max error for test 85 at offset 113777 is not less than or equal to 0.00001222. Got 0.03445622424898759.]
expected: FAIL
- [X Max error for test 34 at offset 46304 is not less than or equal to 0.00001222. Got 0.007513103703685007.]
+ [X Max error for test 98 at offset 130976 is not less than or equal to 0.00001222. Got 0.19986539483609111.]
expected: FAIL
- [X Max error for test 35 at offset 47627 is not less than or equal to 0.00001222. Got 0.0077460971141775446.]
+ [X Max error for test 13 at offset 18521 is not less than or equal to 0.00001222. Got 0.005776000004233634.]
expected: FAIL
- [X Max error for test 36 at offset 48950 is not less than or equal to 0.00001222. Got 0.00774606953743358.]
+ [X Max error for test 57 at offset 76733 is not less than or equal to 0.00001222. Got 0.01175580623231679.]
expected: FAIL
- [X Max error for test 37 at offset 50273 is not less than or equal to 0.00001222. Got 0.00799390921649094.]
+ [X Max error for test 0 at offset 1322 is not less than or equal to 0.00001222. Got 0.004971347529273832.]
expected: FAIL
- [X Max error for test 38 at offset 51596 is not less than or equal to 0.00001222. Got 0.007993945275544895.]
+ [X Max error for test 44 at offset 59534 is not less than or equal to 0.00001222. Got 0.008842932469887153.]
expected: FAIL
- [X Max error for test 39 at offset 52919 is not less than or equal to 0.00001222. Got 0.008258169028622094.]
+ [X Max error for test 96 at offset 128330 is not less than or equal to 0.00001222. Got 0.11103236124822866.]
expected: FAIL
- [X Max error for test 40 at offset 54242 is not less than or equal to 0.00001222. Got 0.008258272128077778.]
+ [X Max error for test 90 at offset 120392 is not less than or equal to 0.00001222. Got 0.047584013396256356.]
expected: FAIL
- [X Max error for test 41 at offset 55565 is not less than or equal to 0.00001222. Got 0.008540497771090037.]
+ [X Max error for test 88 at offset 117746 is not less than or equal to 0.00001222. Got 0.03997048249087859.]
expected: FAIL
[X Max error for test 42 at offset 56888 is not less than or equal to 0.00001222. Got 0.008540543388584421.]
expected: FAIL
- [X Max error for test 43 at offset 58211 is not less than or equal to 0.00001222. Got 0.008842814255529671.]
+ [X Max error for test 7 at offset 10583 is not less than or equal to 0.00001222. Got 0.005401342058686055.]
expected: FAIL
- [X Max error for test 44 at offset 59534 is not less than or equal to 0.00001222. Got 0.008842932469887153.]
+ [X Max error for test 9 at offset 13229 is not less than or equal to 0.00001222. Got 0.005520708240934441.]
expected: FAIL
- [X Max error for test 45 at offset 60857 is not less than or equal to 0.00001222. Got 0.009167318952047627.]
+ [X Max error for test 73 at offset 97901 is not less than or equal to 0.00001222. Got 0.018853551375474058.]
expected: FAIL
- [X Max error for test 46 at offset 62180 is not less than or equal to 0.00001222. Got 0.009167376648625705.]
+ [X Max error for test 22 at offset 30428 is not less than or equal to 0.00001222. Got 0.00636459819331172.]
expected: FAIL
- [X Max error for test 47 at offset 63503 is not less than or equal to 0.00001222. Got 0.009516547638069068.]
+ [X Max error for test 93 at offset 124361 is not less than or equal to 0.00001222. Got 0.07686264332095362.]
expected: FAIL
- [X Max error for test 48 at offset 64826 is not less than or equal to 0.00001222. Got 0.009516684552275934.]
+ [X Max error for test 16 at offset 22490 is not less than or equal to 0.00001222. Got 0.005912672021051084.]
expected: FAIL
- [X Max error for test 49 at offset 66149 is not less than or equal to 0.00001222. Got 0.009893514080660987.]
+ [X Max error for test 21 at offset 29105 is not less than or equal to 0.00001222. Got 0.0063646341440895165.]
expected: FAIL
- [X Max error for test 50 at offset 67472 is not less than or equal to 0.00001222. Got 0.009893510977195341.]
+ [X Max error for test 78 at offset 104516 is not less than or equal to 0.00001222. Got 0.022205561601247308.]
expected: FAIL
- [X Max error for test 51 at offset 68795 is not less than or equal to 0.00001222. Got 0.010301411434863215.]
+ [X Max error for test 63 at offset 84671 is not less than or equal to 0.00001222. Got 0.013688247738325734.]
expected: FAIL
- [X Max error for test 52 at offset 70118 is not less than or equal to 0.00001222. Got 0.010301571864146954.]
+ [X Max error for test 40 at offset 54242 is not less than or equal to 0.00001222. Got 0.008258272128077778.]
expected: FAIL
- [X Max error for test 53 at offset 71441 is not less than or equal to 0.00001222. Got 0.010744562213274482.]
+ [X Max error for test 65 at offset 87317 is not less than or equal to 0.00001222. Got 0.014481760747876011.]
expected: FAIL
- [X Max error for test 54 at offset 72764 is not less than or equal to 0.00001222. Got 0.010744572666723327.]
+ [X Max error for test 50 at offset 67472 is not less than or equal to 0.00001222. Got 0.009893510977195341.]
expected: FAIL
- [X Max error for test 55 at offset 74087 is not less than or equal to 0.00001222. Got 0.01122737314374763.]
+ [X Max error for test 99 at offset 130979 is not less than or equal to 0.00001222. Got 0.0010478736613536294.]
expected: FAIL
- [X Max error for test 56 at offset 75410 is not less than or equal to 0.00001222. Got 0.011227478948691283.]
+ [X Max error for test 46 at offset 62180 is not less than or equal to 0.00001222. Got 0.009167376648625705.]
expected: FAIL
- [X Max error for test 57 at offset 76733 is not less than or equal to 0.00001222. Got 0.01175580623231679.]
+ [< [test\] 100 out of 102 assertions were failed.]
expected: FAIL
- [X Max error for test 58 at offset 78056 is not less than or equal to 0.00001222. Got 0.011755835641619888.]
+ [X Max error for test 6 at offset 9260 is not less than or equal to 0.00001222. Got 0.005286989916402489.]
expected: FAIL
- [X Max error for test 59 at offset 79379 is not less than or equal to 0.00001222. Got 0.012336239163652849.]
+ [X Max error for test 92 at offset 123038 is not less than or equal to 0.00001222. Got 0.05878033819291966.]
expected: FAIL
- [X Max error for test 60 at offset 80702 is not less than or equal to 0.00001222. Got 0.012336376203148012.]
+ [X Max error for test 59 at offset 79379 is not less than or equal to 0.00001222. Got 0.012336239163652849.]
expected: FAIL
- [X Max error for test 61 at offset 82025 is not less than or equal to 0.00001222. Got 0.012977176838334303.]
+ [X Max error for test 4 at offset 6614 is not less than or equal to 0.00001222. Got 0.005177414562697979.]
expected: FAIL
- [X Max error for test 62 at offset 83348 is not less than or equal to 0.00001222. Got 0.01297723326480682.]
+ [X Max error for test 52 at offset 70118 is not less than or equal to 0.00001222. Got 0.010301571864146954.]
expected: FAIL
- [X Max error for test 63 at offset 84671 is not less than or equal to 0.00001222. Got 0.013688247738325734.]
+ [X Max error for test 24 at offset 33074 is not less than or equal to 0.00001222. Got 0.0065309937470566844.]
expected: FAIL
- [X Max error for test 64 at offset 85994 is not less than or equal to 0.00001222. Got 0.013688321971339096.]
+ [X Max error for test 5 at offset 7937 is not less than or equal to 0.00001222. Got 0.005287028393264749.]
expected: FAIL
- [X Max error for test 65 at offset 87317 is not less than or equal to 0.00001222. Got 0.014481760747876011.]
+ [X Max error for test 75 at offset 100547 is not less than or equal to 0.00001222. Got 0.020392593309963868.]
expected: FAIL
- [X Max error for test 66 at offset 88640 is not less than or equal to 0.00001222. Got 0.014481856656908305.]
+ [X Max error for test 71 at offset 95255 is not less than or equal to 0.00001222. Got 0.01753058059001621.]
expected: FAIL
- [X Max error for test 67 at offset 89963 is not less than or equal to 0.00001222. Got 0.01537293577367861.]
+ [X Max error for test 68 at offset 91286 is not less than or equal to 0.00001222. Got 0.015373058296300991.]
expected: FAIL
- [X Max error for test 68 at offset 91286 is not less than or equal to 0.00001222. Got 0.015373058296300991.]
+ [X Max error for test 10 at offset 14552 is not less than or equal to 0.00001222. Got 0.005520670013722852.]
expected: FAIL
- [X Max error for test 69 at offset 92609 is not less than or equal to 0.00001222. Got 0.016380921220530496.]
+ [X Max error for test 48 at offset 64826 is not less than or equal to 0.00001222. Got 0.009516684552275934.]
expected: FAIL
- [X Max error for test 70 at offset 93932 is not less than or equal to 0.00001222. Got 0.016381078788684566.]
+ [X Max error for test 84 at offset 112454 is not less than or equal to 0.00001222. Got 0.030280498895388284.]
expected: FAIL
- [X Max error for test 71 at offset 95255 is not less than or equal to 0.00001222. Got 0.01753058059001621.]
+ [X Max error for test 12 at offset 17198 is not less than or equal to 0.00001222. Got 0.005645431455758545.]
expected: FAIL
- [X Max error for test 72 at offset 96578 is not less than or equal to 0.00001222. Got 0.01753077514543058.]
+ [X Max error for test 49 at offset 66149 is not less than or equal to 0.00001222. Got 0.009893514080660987.]
expected: FAIL
- [X Max error for test 73 at offset 97901 is not less than or equal to 0.00001222. Got 0.018853551375474058.]
+ [X Max error for test 97 at offset 129653 is not less than or equal to 0.00001222. Got 0.19983522770615608.]
expected: FAIL
- [X Max error for test 74 at offset 99224 is not less than or equal to 0.00001222. Got 0.018853800846327963.]
+ [X Max error for test 76 at offset 101870 is not less than or equal to 0.00001222. Got 0.02039291059393737.]
expected: FAIL
- [X Max error for test 75 at offset 100547 is not less than or equal to 0.00001222. Got 0.020392593309963868.]
+ [X Max error for test 36 at offset 48950 is not less than or equal to 0.00001222. Got 0.00774606953743358.]
expected: FAIL
- [X Max error for test 76 at offset 101870 is not less than or equal to 0.00001222. Got 0.02039291059393737.]
+ [X Max error for test 94 at offset 125684 is not less than or equal to 0.00001222. Got 0.07686707196371474.]
expected: FAIL
- [X Max error for test 77 at offset 103193 is not less than or equal to 0.00001222. Got 0.022205238153527315.]
+ [X Max error for test 37 at offset 50273 is not less than or equal to 0.00001222. Got 0.00799390921649094.]
expected: FAIL
- [X Max error for test 78 at offset 104516 is not less than or equal to 0.00001222. Got 0.022205561601247308.]
+ [X Max error for test 77 at offset 103193 is not less than or equal to 0.00001222. Got 0.022205238153527315.]
expected: FAIL
- [X Max error for test 79 at offset 105839 is not less than or equal to 0.00001222. Got 0.024371468038865658.]
+ [X Max error for test 35 at offset 47627 is not less than or equal to 0.00001222. Got 0.0077460971141775446.]
expected: FAIL
- [X Max error for test 80 at offset 107162 is not less than or equal to 0.00001222. Got 0.024372089145737547.]
+ [X Max error for test 53 at offset 71441 is not less than or equal to 0.00001222. Got 0.010744562213274482.]
expected: FAIL
- [X Max error for test 81 at offset 108485 is not less than or equal to 0.00001222. Got 0.0270063795920686.]
+ [X Max error for test 43 at offset 58211 is not less than or equal to 0.00001222. Got 0.008842814255529671.]
expected: FAIL
- [X Max error for test 82 at offset 109808 is not less than or equal to 0.00001222. Got 0.027006863607415388.]
+ [X Max error for test 14 at offset 19844 is not less than or equal to 0.00001222. Got 0.0057759622384759915.]
expected: FAIL
- [X Max error for test 83 at offset 111131 is not less than or equal to 0.00001222. Got 0.030279806361083936.]
+ [X Max error for test 79 at offset 105839 is not less than or equal to 0.00001222. Got 0.024371468038865658.]
expected: FAIL
- [X Max error for test 84 at offset 112454 is not less than or equal to 0.00001222. Got 0.030280498895388284.]
+ [X Max error for test 25 at offset 34397 is not less than or equal to 0.00001222. Got 0.006706357752496105.]
expected: FAIL
- [X Max error for test 85 at offset 113777 is not less than or equal to 0.00001222. Got 0.03445622424898759.]
+ [X Max error for test 69 at offset 92609 is not less than or equal to 0.00001222. Got 0.016380921220530496.]
expected: FAIL
- [X Max error for test 86 at offset 115100 is not less than or equal to 0.00001222. Got 0.03445703934642761.]
+ [X Max error for test 89 at offset 119069 is not less than or equal to 0.00001222. Got 0.04758232055157862.]
expected: FAIL
- [X Max error for test 87 at offset 116423 is not less than or equal to 0.00001222. Got 0.03996905609650592.]
+ [X Max error for test 28 at offset 38366 is not less than or equal to 0.00001222. Got 0.00689132633249392.]
expected: FAIL
- [X Max error for test 88 at offset 117746 is not less than or equal to 0.00001222. Got 0.03997048249087859.]
+ [X Max error for test 47 at offset 63503 is not less than or equal to 0.00001222. Got 0.009516547638069068.]
expected: FAIL
- [X Max error for test 89 at offset 119069 is not less than or equal to 0.00001222. Got 0.04758232055157862.]
+ [X Max error for test 29 at offset 39689 is not less than or equal to 0.00001222. Got 0.007086858302333446.]
expected: FAIL
- [X Max error for test 90 at offset 120392 is not less than or equal to 0.00001222. Got 0.047584013396256356.]
+ [X Max error for test 11 at offset 15875 is not less than or equal to 0.00001222. Got 0.005645469482076645.]
expected: FAIL
- [X Max error for test 91 at offset 121715 is not less than or equal to 0.00001222. Got 0.05877779461906339.]
+ [X Max error for test 86 at offset 115100 is not less than or equal to 0.00001222. Got 0.03445703934642761.]
expected: FAIL
- [X Max error for test 92 at offset 123038 is not less than or equal to 0.00001222. Got 0.05878033819291966.]
+ [X Max error for test 17 at offset 23813 is not less than or equal to 0.00001222. Got 0.006056047220282001.]
expected: FAIL
- [X Max error for test 93 at offset 124361 is not less than or equal to 0.00001222. Got 0.07686264332095362.]
+ [X Max error for test 72 at offset 96578 is not less than or equal to 0.00001222. Got 0.01753077514543058.]
expected: FAIL
- [X Max error for test 94 at offset 125684 is not less than or equal to 0.00001222. Got 0.07686707196371474.]
+ [X Max error for test 34 at offset 46304 is not less than or equal to 0.00001222. Got 0.007513103703685007.]
expected: FAIL
- [X Max error for test 95 at offset 127007 is not less than or equal to 0.00001222. Got 0.1110222263568349.]
+ [X Max error for test 74 at offset 99224 is not less than or equal to 0.00001222. Got 0.018853800846327963.]
expected: FAIL
- [X Max error for test 96 at offset 128330 is not less than or equal to 0.00001222. Got 0.11103236124822866.]
+ [X Max error for test 56 at offset 75410 is not less than or equal to 0.00001222. Got 0.011227478948691283.]
expected: FAIL
- [X Max error for test 97 at offset 129653 is not less than or equal to 0.00001222. Got 0.19983522770615608.]
+ [X Max error for test 2 at offset 3968 is not less than or equal to 0.00001222. Got 0.005072288986783049.]
expected: FAIL
- [X Max error for test 98 at offset 130976 is not less than or equal to 0.00001222. Got 0.19986539483609111.]
+ [X Max error for test 26 at offset 35720 is not less than or equal to 0.00001222. Got 0.006706323336010292.]
expected: FAIL
- [X Max error for test 99 at offset 130979 is not less than or equal to 0.00001222. Got 0.0010478736613536294.]
+ [X Max error for test 81 at offset 108485 is not less than or equal to 0.00001222. Got 0.0270063795920686.]
expected: FAIL
- [< [test\] 100 out of 102 assertions were failed.]
+ [X Max error for test 30 at offset 41012 is not less than or equal to 0.00001222. Got 0.007086826009688193.]
expected: FAIL
- [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+ [X Max error for test 15 at offset 21167 is not less than or equal to 0.00001222. Got 0.0059127094586828586.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime.html.ini
index f18dbc82cda..aced8618f6e 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime.html.ini
@@ -1,307 +1,307 @@
[audioparam-linearRampToValueAtTime.html]
- [X Max error for test 0 at offset 1322 is not less than or equal to 0.000001865. Got 0.004971382585870938.]
- expected: FAIL
-
- [X Max error for test 1 at offset 2645 is not less than or equal to 0.000001865. Got 0.005072295510229919.]
+ [X Max error for test 87 at offset 116423 is not less than or equal to 0.000001865. Got 0.039968519116250927.]
expected: FAIL
- [X Max error for test 2 at offset 3968 is not less than or equal to 0.000001865. Got 0.005072305387543696.]
+ [X Max error for test 21 at offset 29105 is not less than or equal to 0.000001865. Got 0.006364609063030028.]
expected: FAIL
- [X Max error for test 3 at offset 5291 is not less than or equal to 0.000001865. Got 0.005177440159265024.]
+ [X Max error for test 47 at offset 63503 is not less than or equal to 0.000001865. Got 0.009516487875647071.]
expected: FAIL
- [X Max error for test 4 at offset 6614 is not less than or equal to 0.000001865. Got 0.005177473300879752.]
+ [X Max error for test 79 at offset 105839 is not less than or equal to 0.000001865. Got 0.024371327061931274.]
expected: FAIL
- [X Max error for test 5 at offset 7937 is not less than or equal to 0.000001865. Got 0.005286972284210275.]
+ [X Max error for test 86 at offset 115100 is not less than or equal to 0.000001865. Got 0.03445758854939049.]
expected: FAIL
- [X Max error for test 6 at offset 9260 is not less than or equal to 0.000001865. Got 0.005287029709955556.]
+ [X Max error for test 60 at offset 80702 is not less than or equal to 0.000001865. Got 0.012336447834689302.]
expected: FAIL
- [X Max error for test 7 at offset 10583 is not less than or equal to 0.000001865. Got 0.005401305351315997.]
+ [X Max error for test 92 at offset 123038 is not less than or equal to 0.000001865. Got 0.05878170178485925.]
expected: FAIL
- [X Max error for test 8 at offset 11906 is not less than or equal to 0.000001865. Got 0.005401323712834355.]
+ [X Max error for test 99 at offset 130979 is not less than or equal to 0.000001865. Got 0.0007564072834763206.]
expected: FAIL
- [X Max error for test 9 at offset 13229 is not less than or equal to 0.000001865. Got 0.005520691792549967.]
+ [X Max error for test 24 at offset 33074 is not less than or equal to 0.000001865. Got 0.0065310521960605565.]
expected: FAIL
- [X Max error for test 10 at offset 14552 is not less than or equal to 0.000001865. Got 0.00552073526720557.]
+ [X Max error for test 6 at offset 9260 is not less than or equal to 0.000001865. Got 0.005287029709955556.]
expected: FAIL
- [X Max error for test 11 at offset 15875 is not less than or equal to 0.000001865. Got 0.005645406858491471.]
+ [X Max error for test 70 at offset 93932 is not less than or equal to 0.000001865. Got 0.016381215406334877.]
expected: FAIL
- [X Max error for test 12 at offset 17198 is not less than or equal to 0.000001865. Got 0.005645476626856955.]
+ [X Max error for test 74 at offset 99224 is not less than or equal to 0.000001865. Got 0.01885396793151646.]
expected: FAIL
- [X Max error for test 13 at offset 18521 is not less than or equal to 0.000001865. Got 0.0057759579767177206.]
+ [X Max error for test 45 at offset 60857 is not less than or equal to 0.000001865. Got 0.009167335753064386.]
expected: FAIL
- [X Max error for test 14 at offset 19844 is not less than or equal to 0.000001865. Got 0.005775986398284702.]
+ [X Max error for test 67 at offset 89963 is not less than or equal to 0.000001865. Got 0.01537284838487537.]
expected: FAIL
- [X Max error for test 15 at offset 21167 is not less than or equal to 0.000001865. Got 0.005912689001894731.]
+ [X Max error for test 43 at offset 58211 is not less than or equal to 0.000001865. Got 0.00884279670524028.]
expected: FAIL
- [X Max error for test 16 at offset 22490 is not less than or equal to 0.000001865. Got 0.005912744713046106.]
+ [X Max error for test 26 at offset 35720 is not less than or equal to 0.000001865. Got 0.006706357743664959.]
expected: FAIL
- [X Max error for test 17 at offset 23813 is not less than or equal to 0.000001865. Got 0.006055977132018537.]
+ [X Max error for test 63 at offset 84671 is not less than or equal to 0.000001865. Got 0.013688147253171168.]
expected: FAIL
- [X Max error for test 18 at offset 25136 is not less than or equal to 0.000001865. Got 0.006056061515967637.]
+ [X Max error for test 95 at offset 127007 is not less than or equal to 0.000001865. Got 0.11101781971301485.]
expected: FAIL
- [X Max error for test 19 at offset 26459 is not less than or equal to 0.000001865. Got 0.00620645917849245.]
+ [X Max error for test 82 at offset 109808 is not less than or equal to 0.000001865. Got 0.027007111489952065.]
expected: FAIL
- [X Max error for test 20 at offset 27782 is not less than or equal to 0.000001865. Got 0.0062064996841445265.]
+ [X Max error for test 61 at offset 82025 is not less than or equal to 0.000001865. Got 0.012977032107613464.]
expected: FAIL
- [X Max error for test 21 at offset 29105 is not less than or equal to 0.000001865. Got 0.006364609063030028.]
+ [X Max error for test 75 at offset 100547 is not less than or equal to 0.000001865. Got 0.020392423027089844.]
expected: FAIL
- [X Max error for test 22 at offset 30428 is not less than or equal to 0.000001865. Got 0.006364679458219021.]
+ [X Max error for test 10 at offset 14552 is not less than or equal to 0.000001865. Got 0.00552073526720557.]
expected: FAIL
- [X Max error for test 23 at offset 31751 is not less than or equal to 0.000001865. Got 0.006530950267540621.]
+ [X Max error for test 3 at offset 5291 is not less than or equal to 0.000001865. Got 0.005177440159265024.]
expected: FAIL
- [X Max error for test 24 at offset 33074 is not less than or equal to 0.000001865. Got 0.0065310521960605565.]
+ [X Max error for test 49 at offset 66149 is not less than or equal to 0.000001865. Got 0.009893413433050018.]
expected: FAIL
- [X Max error for test 25 at offset 34397 is not less than or equal to 0.000001865. Got 0.006706302503957123.]
+ [X Max error for test 55 at offset 74087 is not less than or equal to 0.000001865. Got 0.01122734013080757.]
expected: FAIL
- [X Max error for test 26 at offset 35720 is not less than or equal to 0.000001865. Got 0.006706357743664959.]
+ [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
expected: FAIL
- [X Max error for test 27 at offset 37043 is not less than or equal to 0.000001865. Got 0.0068913292960890915.]
+ [X Max error for test 83 at offset 111131 is not less than or equal to 0.000001865. Got 0.030279442811311768.]
expected: FAIL
- [X Max error for test 28 at offset 38366 is not less than or equal to 0.000001865. Got 0.006891335371900766.]
+ [X Max error for test 76 at offset 101870 is not less than or equal to 0.000001865. Got 0.020393074066344313.]
expected: FAIL
- [X Max error for test 29 at offset 39689 is not less than or equal to 0.000001865. Got 0.007086769460824398.]
+ [X Max error for test 78 at offset 104516 is not less than or equal to 0.000001865. Got 0.022205803665596154.]
expected: FAIL
- [X Max error for test 30 at offset 41012 is not less than or equal to 0.000001865. Got 0.007086892787027758.]
+ [< [test\] 100 out of 102 assertions were failed.]
expected: FAIL
- [X Max error for test 31 at offset 42335 is not less than or equal to 0.000001865. Got 0.007293709140558525.]
+ [X Max error for test 28 at offset 38366 is not less than or equal to 0.000001865. Got 0.006891335371900766.]
expected: FAIL
- [X Max error for test 32 at offset 43658 is not less than or equal to 0.000001865. Got 0.0072937826617006625.]
+ [X Max error for test 33 at offset 44981 is not less than or equal to 0.000001865. Got 0.007513096249085025.]
expected: FAIL
- [X Max error for test 33 at offset 44981 is not less than or equal to 0.000001865. Got 0.007513096249085025.]
+ [X Max error for test 38 at offset 51596 is not less than or equal to 0.000001865. Got 0.007993993846002342.]
expected: FAIL
- [X Max error for test 34 at offset 46304 is not less than or equal to 0.000001865. Got 0.007513117110837575.]
+ [X Max error for test 85 at offset 113777 is not less than or equal to 0.000001865. Got 0.034455837602666496.]
expected: FAIL
- [X Max error for test 35 at offset 47627 is not less than or equal to 0.000001865. Got 0.007745996270211642.]
+ [X Max error for test 57 at offset 76733 is not less than or equal to 0.000001865. Got 0.011755725728879002.]
expected: FAIL
- [X Max error for test 36 at offset 48950 is not less than or equal to 0.000001865. Got 0.007746146186898846.]
+ [X Max error for test 41 at offset 55565 is not less than or equal to 0.000001865. Got 0.008540448218182686.]
expected: FAIL
- [X Max error for test 37 at offset 50273 is not less than or equal to 0.000001865. Got 0.007993897169413747.]
+ [X Max error for test 58 at offset 78056 is not less than or equal to 0.000001865. Got 0.01175594882979216.]
expected: FAIL
- [X Max error for test 38 at offset 51596 is not less than or equal to 0.000001865. Got 0.007993993846002342.]
+ [X Max error for test 62 at offset 83348 is not less than or equal to 0.000001865. Got 0.01297733642594461.]
expected: FAIL
- [X Max error for test 39 at offset 52919 is not less than or equal to 0.000001865. Got 0.008258188108327222.]
+ [X Max error for test 68 at offset 91286 is not less than or equal to 0.000001865. Got 0.015373187577813849.]
expected: FAIL
- [X Max error for test 40 at offset 54242 is not less than or equal to 0.000001865. Got 0.008258228229559253.]
+ [X Max error for test 56 at offset 75410 is not less than or equal to 0.000001865. Got 0.011227562981803465.]
expected: FAIL
- [X Max error for test 41 at offset 55565 is not less than or equal to 0.000001865. Got 0.008540448218182686.]
+ [X Max error for test 64 at offset 85994 is not less than or equal to 0.000001865. Got 0.01368837845955073.]
expected: FAIL
[X Max error for test 42 at offset 56888 is not less than or equal to 0.000001865. Got 0.00854063192705488.]
expected: FAIL
- [X Max error for test 43 at offset 58211 is not less than or equal to 0.000001865. Got 0.00884279670524028.]
+ [X Max error for test 0 at offset 1322 is not less than or equal to 0.000001865. Got 0.004971382585870938.]
expected: FAIL
- [X Max error for test 44 at offset 59534 is not less than or equal to 0.000001865. Got 0.008842923444757374.]
+ [X Max error for test 4 at offset 6614 is not less than or equal to 0.000001865. Got 0.005177473300879752.]
expected: FAIL
- [X Max error for test 45 at offset 60857 is not less than or equal to 0.000001865. Got 0.009167335753064386.]
+ [X Max error for test 46 at offset 62180 is not less than or equal to 0.000001865. Got 0.009167401649722278.]
expected: FAIL
- [X Max error for test 46 at offset 62180 is not less than or equal to 0.000001865. Got 0.009167401649722278.]
+ [X Max error for test 30 at offset 41012 is not less than or equal to 0.000001865. Got 0.007086892787027758.]
expected: FAIL
- [X Max error for test 47 at offset 63503 is not less than or equal to 0.000001865. Got 0.009516487875647071.]
+ [X Max error for test 35 at offset 47627 is not less than or equal to 0.000001865. Got 0.007745996270211642.]
expected: FAIL
[X Max error for test 48 at offset 64826 is not less than or equal to 0.000001865. Got 0.009516715715078188.]
expected: FAIL
- [X Max error for test 49 at offset 66149 is not less than or equal to 0.000001865. Got 0.009893413433050018.]
+ [X Max error for test 80 at offset 107162 is not less than or equal to 0.000001865. Got 0.02437224312212655.]
expected: FAIL
- [X Max error for test 50 at offset 67472 is not less than or equal to 0.000001865. Got 0.009893580398436517.]
+ [X Max error for test 17 at offset 23813 is not less than or equal to 0.000001865. Got 0.006055977132018537.]
expected: FAIL
- [X Max error for test 51 at offset 68795 is not less than or equal to 0.000001865. Got 0.010301425392126383.]
+ [X Max error for test 39 at offset 52919 is not less than or equal to 0.000001865. Got 0.008258188108327222.]
expected: FAIL
- [X Max error for test 52 at offset 70118 is not less than or equal to 0.000001865. Got 0.010301588395931705.]
+ [X Max error for test 97 at offset 129653 is not less than or equal to 0.000001865. Got 0.19981859470557914.]
expected: FAIL
- [X Max error for test 53 at offset 71441 is not less than or equal to 0.000001865. Got 0.01074447077838395.]
+ [X Max error for test 19 at offset 26459 is not less than or equal to 0.000001865. Got 0.00620645917849245.]
expected: FAIL
- [X Max error for test 54 at offset 72764 is not less than or equal to 0.000001865. Got 0.010744630049297078.]
+ [X Max error for test 15 at offset 21167 is not less than or equal to 0.000001865. Got 0.005912689001894731.]
expected: FAIL
- [X Max error for test 55 at offset 74087 is not less than or equal to 0.000001865. Got 0.01122734013080757.]
+ [X Max error for test 16 at offset 22490 is not less than or equal to 0.000001865. Got 0.005912744713046106.]
expected: FAIL
- [X Max error for test 56 at offset 75410 is not less than or equal to 0.000001865. Got 0.011227562981803465.]
+ [X Max error for test 37 at offset 50273 is not less than or equal to 0.000001865. Got 0.007993897169413747.]
expected: FAIL
- [X Max error for test 57 at offset 76733 is not less than or equal to 0.000001865. Got 0.011755725728879002.]
+ [X Max error for test 89 at offset 119069 is not less than or equal to 0.000001865. Got 0.047581336103021205.]
expected: FAIL
- [X Max error for test 58 at offset 78056 is not less than or equal to 0.000001865. Got 0.01175594882979216.]
+ [X Max error for test 32 at offset 43658 is not less than or equal to 0.000001865. Got 0.0072937826617006625.]
expected: FAIL
- [X Max error for test 59 at offset 79379 is not less than or equal to 0.000001865. Got 0.012336223486588924.]
+ [X Max error for test 1 at offset 2645 is not less than or equal to 0.000001865. Got 0.005072295510229919.]
expected: FAIL
- [X Max error for test 60 at offset 80702 is not less than or equal to 0.000001865. Got 0.012336447834689302.]
+ [X Max error for test 90 at offset 120392 is not less than or equal to 0.000001865. Got 0.047584752923298695.]
expected: FAIL
- [X Max error for test 61 at offset 82025 is not less than or equal to 0.000001865. Got 0.012977032107613464.]
+ [X Max error for test 91 at offset 121715 is not less than or equal to 0.000001865. Got 0.05877649592226442.]
expected: FAIL
- [X Max error for test 62 at offset 83348 is not less than or equal to 0.000001865. Got 0.01297733642594461.]
+ [X Max error for test 96 at offset 128330 is not less than or equal to 0.000001865. Got 0.11103647207884057.]
expected: FAIL
- [X Max error for test 63 at offset 84671 is not less than or equal to 0.000001865. Got 0.013688147253171168.]
+ [X Max error for test 54 at offset 72764 is not less than or equal to 0.000001865. Got 0.010744630049297078.]
expected: FAIL
- [X Max error for test 64 at offset 85994 is not less than or equal to 0.000001865. Got 0.01368837845955073.]
+ [X Max error for test 59 at offset 79379 is not less than or equal to 0.000001865. Got 0.012336223486588924.]
expected: FAIL
- [X Max error for test 65 at offset 87317 is not less than or equal to 0.000001865. Got 0.01448162324578537.]
+ [X Max error for test 77 at offset 103193 is not less than or equal to 0.000001865. Got 0.022205070948626313.]
expected: FAIL
- [X Max error for test 66 at offset 88640 is not less than or equal to 0.000001865. Got 0.01448194743680873.]
+ [X Max error for test 7 at offset 10583 is not less than or equal to 0.000001865. Got 0.005401305351315997.]
expected: FAIL
- [X Max error for test 67 at offset 89963 is not less than or equal to 0.000001865. Got 0.01537284838487537.]
+ [X Max error for test 20 at offset 27782 is not less than or equal to 0.000001865. Got 0.0062064996841445265.]
expected: FAIL
- [X Max error for test 68 at offset 91286 is not less than or equal to 0.000001865. Got 0.015373187577813849.]
+ [X Max error for test 93 at offset 124361 is not less than or equal to 0.000001865. Got 0.07686046970099752.]
expected: FAIL
- [X Max error for test 69 at offset 92609 is not less than or equal to 0.000001865. Got 0.016380856349818174.]
+ [X Max error for test 12 at offset 17198 is not less than or equal to 0.000001865. Got 0.005645476626856955.]
expected: FAIL
- [X Max error for test 70 at offset 93932 is not less than or equal to 0.000001865. Got 0.016381215406334877.]
+ [X Max error for test 11 at offset 15875 is not less than or equal to 0.000001865. Got 0.005645406858491471.]
expected: FAIL
- [X Max error for test 71 at offset 95255 is not less than or equal to 0.000001865. Got 0.01753033724083315.]
+ [X Max error for test 88 at offset 117746 is not less than or equal to 0.000001865. Got 0.03997099563742852.]
expected: FAIL
- [X Max error for test 72 at offset 96578 is not less than or equal to 0.000001865. Got 0.017530827271874477.]
+ [X Max error for test 34 at offset 46304 is not less than or equal to 0.000001865. Got 0.007513117110837575.]
expected: FAIL
- [X Max error for test 73 at offset 97901 is not less than or equal to 0.000001865. Got 0.01885343466700245.]
+ [X Max error for test 53 at offset 71441 is not less than or equal to 0.000001865. Got 0.01074447077838395.]
expected: FAIL
- [X Max error for test 74 at offset 99224 is not less than or equal to 0.000001865. Got 0.01885396793151646.]
+ [X Max error for test 81 at offset 108485 is not less than or equal to 0.000001865. Got 0.027006033852439857.]
expected: FAIL
- [X Max error for test 75 at offset 100547 is not less than or equal to 0.000001865. Got 0.020392423027089844.]
+ [X Max error for test 40 at offset 54242 is not less than or equal to 0.000001865. Got 0.008258228229559253.]
expected: FAIL
- [X Max error for test 76 at offset 101870 is not less than or equal to 0.000001865. Got 0.020393074066344313.]
+ [X Max error for test 94 at offset 125684 is not less than or equal to 0.000001865. Got 0.0768694240525683.]
expected: FAIL
- [X Max error for test 77 at offset 103193 is not less than or equal to 0.000001865. Got 0.022205070948626313.]
+ [X Max error for test 72 at offset 96578 is not less than or equal to 0.000001865. Got 0.017530827271874477.]
expected: FAIL
- [X Max error for test 78 at offset 104516 is not less than or equal to 0.000001865. Got 0.022205803665596154.]
+ [X Max error for test 23 at offset 31751 is not less than or equal to 0.000001865. Got 0.006530950267540621.]
expected: FAIL
- [X Max error for test 79 at offset 105839 is not less than or equal to 0.000001865. Got 0.024371327061931274.]
+ [X Max error for test 5 at offset 7937 is not less than or equal to 0.000001865. Got 0.005286972284210275.]
expected: FAIL
- [X Max error for test 80 at offset 107162 is not less than or equal to 0.000001865. Got 0.02437224312212655.]
+ [X Max error for test 52 at offset 70118 is not less than or equal to 0.000001865. Got 0.010301588395931705.]
expected: FAIL
- [X Max error for test 81 at offset 108485 is not less than or equal to 0.000001865. Got 0.027006033852439857.]
+ [X Max error for test 31 at offset 42335 is not less than or equal to 0.000001865. Got 0.007293709140558525.]
expected: FAIL
- [X Max error for test 82 at offset 109808 is not less than or equal to 0.000001865. Got 0.027007111489952065.]
+ [X Max error for test 51 at offset 68795 is not less than or equal to 0.000001865. Got 0.010301425392126383.]
expected: FAIL
- [X Max error for test 83 at offset 111131 is not less than or equal to 0.000001865. Got 0.030279442811311768.]
+ [X Max error for test 44 at offset 59534 is not less than or equal to 0.000001865. Got 0.008842923444757374.]
expected: FAIL
- [X Max error for test 84 at offset 112454 is not less than or equal to 0.000001865. Got 0.03028084076877433.]
+ [X Max error for test 98 at offset 130976 is not less than or equal to 0.000001865. Got 0.19987906233523942.]
expected: FAIL
- [X Max error for test 85 at offset 113777 is not less than or equal to 0.000001865. Got 0.034455837602666496.]
+ [X Max error for test 29 at offset 39689 is not less than or equal to 0.000001865. Got 0.007086769460824398.]
expected: FAIL
- [X Max error for test 86 at offset 115100 is not less than or equal to 0.000001865. Got 0.03445758854939049.]
+ [X Max error for test 9 at offset 13229 is not less than or equal to 0.000001865. Got 0.005520691792549967.]
expected: FAIL
- [X Max error for test 87 at offset 116423 is not less than or equal to 0.000001865. Got 0.039968519116250927.]
+ [X Max error for test 84 at offset 112454 is not less than or equal to 0.000001865. Got 0.03028084076877433.]
expected: FAIL
- [X Max error for test 88 at offset 117746 is not less than or equal to 0.000001865. Got 0.03997099563742852.]
+ [X Max error for test 65 at offset 87317 is not less than or equal to 0.000001865. Got 0.01448162324578537.]
expected: FAIL
- [X Max error for test 89 at offset 119069 is not less than or equal to 0.000001865. Got 0.047581336103021205.]
+ [X Max error for test 36 at offset 48950 is not less than or equal to 0.000001865. Got 0.007746146186898846.]
expected: FAIL
- [X Max error for test 90 at offset 120392 is not less than or equal to 0.000001865. Got 0.047584752923298695.]
+ [X Max error for test 14 at offset 19844 is not less than or equal to 0.000001865. Got 0.005775986398284702.]
expected: FAIL
- [X Max error for test 91 at offset 121715 is not less than or equal to 0.000001865. Got 0.05877649592226442.]
+ [X Max error for test 71 at offset 95255 is not less than or equal to 0.000001865. Got 0.01753033724083315.]
expected: FAIL
- [X Max error for test 92 at offset 123038 is not less than or equal to 0.000001865. Got 0.05878170178485925.]
+ [X Max error for test 18 at offset 25136 is not less than or equal to 0.000001865. Got 0.006056061515967637.]
expected: FAIL
- [X Max error for test 93 at offset 124361 is not less than or equal to 0.000001865. Got 0.07686046970099752.]
+ [X Max error for test 73 at offset 97901 is not less than or equal to 0.000001865. Got 0.01885343466700245.]
expected: FAIL
- [X Max error for test 94 at offset 125684 is not less than or equal to 0.000001865. Got 0.0768694240525683.]
+ [X Max error for test 2 at offset 3968 is not less than or equal to 0.000001865. Got 0.005072305387543696.]
expected: FAIL
- [X Max error for test 95 at offset 127007 is not less than or equal to 0.000001865. Got 0.11101781971301485.]
+ [X Max error for test 66 at offset 88640 is not less than or equal to 0.000001865. Got 0.01448194743680873.]
expected: FAIL
- [X Max error for test 96 at offset 128330 is not less than or equal to 0.000001865. Got 0.11103647207884057.]
+ [X Max error for test 69 at offset 92609 is not less than or equal to 0.000001865. Got 0.016380856349818174.]
expected: FAIL
- [X Max error for test 97 at offset 129653 is not less than or equal to 0.000001865. Got 0.19981859470557914.]
+ [X Max error for test 8 at offset 11906 is not less than or equal to 0.000001865. Got 0.005401323712834355.]
expected: FAIL
- [X Max error for test 98 at offset 130976 is not less than or equal to 0.000001865. Got 0.19987906233523942.]
+ [X Max error for test 50 at offset 67472 is not less than or equal to 0.000001865. Got 0.009893580398436517.]
expected: FAIL
- [X Max error for test 99 at offset 130979 is not less than or equal to 0.000001865. Got 0.0007564072834763206.]
+ [X Max error for test 27 at offset 37043 is not less than or equal to 0.000001865. Got 0.0068913292960890915.]
expected: FAIL
- [< [test\] 100 out of 102 assertions were failed.]
+ [X Max error for test 22 at offset 30428 is not less than or equal to 0.000001865. Got 0.006364679458219021.]
expected: FAIL
- [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+ [X Max error for test 25 at offset 34397 is not less than or equal to 0.000001865. Got 0.006706302503957123.]
+ expected: FAIL
+
+ [X Max error for test 13 at offset 18521 is not less than or equal to 0.000001865. Got 0.0057759579767177206.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setTargetAtTime.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setTargetAtTime.html.ini
index f22e45740dd..25eda6e7d3d 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setTargetAtTime.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setTargetAtTime.html.ini
@@ -1,310 +1,310 @@
[audioparam-setTargetAtTime.html]
- [X Number of tests started and ended at the correct time is not equal to 100. Got 1.]
+ [X Max error for test 42 at offset 56888 is not less than or equal to 0.00065683. Got 0.9828986892565407.]
expected: FAIL
- [X Max error for test 0 at offset 1322 is not less than or equal to 0.00065683. Got 0.990047280389914.]
+ [X Max error for test 47 at offset 62181 is not less than or equal to 0.00065683. Got 0.9811320754716981.]
expected: FAIL
- [X Max error for test 1 at offset 1323 is not less than or equal to 0.00065683. Got 0.98989898989899.]
+ [X Max error for test 19 at offset 25137 is not less than or equal to 0.00065683. Got 0.9876543209876543.]
expected: FAIL
- [X Max error for test 2 at offset 3968 is not less than or equal to 0.00065683. Got 0.9898451435112884.]
+ [X Max error for test 48 at offset 64826 is not less than or equal to 0.00065683. Got 0.9809433244774503.]
expected: FAIL
- [X Max error for test 3 at offset 3969 is not less than or equal to 0.00065683. Got 0.9896907216494846.]
+ [X Max error for test 86 at offset 115100 is not less than or equal to 0.00065683. Got 0.9309156097430662.]
expected: FAIL
- [X Max error for test 4 at offset 6614 is not less than or equal to 0.00065683. Got 0.9896346257350639.]
+ [X Max error for test 31 at offset 41013 is not less than or equal to 0.00065683. Got 0.9855072463768116.]
expected: FAIL
- [X Max error for test 5 at offset 6615 is not less than or equal to 0.00065683. Got 0.9894736842105263.]
+ [X Max error for test 74 at offset 99224 is not less than or equal to 0.00065683. Got 0.9622285887375713.]
expected: FAIL
- [X Max error for test 6 at offset 9260 is not less than or equal to 0.00065683. Got 0.9894151948002298.]
+ [X Max error for test 1 at offset 1323 is not less than or equal to 0.00065683. Got 0.98989898989899.]
expected: FAIL
- [X Max error for test 7 at offset 9261 is not less than or equal to 0.00065683. Got 0.989247311827957.]
+ [X Max error for test 66 at offset 88640 is not less than or equal to 0.00065683. Got 0.9709935155615783.]
expected: FAIL
- [X Max error for test 8 at offset 11906 is not less than or equal to 0.00065683. Got 0.9891862723999705.]
+ [X Max error for test 29 at offset 38367 is not less than or equal to 0.00065683. Got 0.9859154929577465.]
expected: FAIL
- [X Max error for test 9 at offset 11907 is not less than or equal to 0.00065683. Got 0.989010989010989.]
+ [X Max error for test 21 at offset 27783 is not less than or equal to 0.00065683. Got 0.9873417721518988.]
expected: FAIL
- [X Max error for test 10 at offset 14552 is not less than or equal to 0.00065683. Got 0.9889472290923282.]
+ [X Max error for test 84 at offset 112454 is not less than or equal to 0.00065683. Got 0.939302156727807.]
expected: FAIL
- [X Max error for test 11 at offset 14553 is not less than or equal to 0.00065683. Got 0.9887640449438202.]
+ [X Max error for test 92 at offset 123038 is not less than or equal to 0.00065683. Got 0.8820065951886947.]
expected: FAIL
- [X Max error for test 12 at offset 17198 is not less than or equal to 0.00065683. Got 0.9886973785205923.]
+ [X Max error for test 88 at offset 117746 is not less than or equal to 0.00065683. Got 0.9198400003447016.]
expected: FAIL
- [X Max error for test 13 at offset 17199 is not less than or equal to 0.00065683. Got 0.9885057471264368.]
+ [X Max error for test 81 at offset 107163 is not less than or equal to 0.00065683. Got 0.9473684210526315.]
expected: FAIL
- [X Max error for test 14 at offset 19844 is not less than or equal to 0.00065683. Got 0.988435970831659.]
+ [X Max error for test 10 at offset 14552 is not less than or equal to 0.00065683. Got 0.9889472290923282.]
expected: FAIL
- [X Max error for test 15 at offset 19845 is not less than or equal to 0.00065683. Got 0.9882352941176471.]
+ [X Max error for test 8 at offset 11906 is not less than or equal to 0.00065683. Got 0.9891862723999705.]
expected: FAIL
- [X Max error for test 16 at offset 22490 is not less than or equal to 0.00065683. Got 0.9881621851594479.]
+ [X Max error for test 60 at offset 80702 is not less than or equal to 0.00065683. Got 0.9752934214747024.]
expected: FAIL
- [X Max error for test 17 at offset 22491 is not less than or equal to 0.00065683. Got 0.9879518072289156.]
+ [X Max error for test 3 at offset 3969 is not less than or equal to 0.00065683. Got 0.9896907216494846.]
expected: FAIL
- [X Max error for test 18 at offset 25136 is not less than or equal to 0.00065683. Got 0.9878751210146629.]
+ [X Max error for test 77 at offset 101871 is not less than or equal to 0.00065683. Got 0.9565217391304348.]
expected: FAIL
- [X Max error for test 19 at offset 25137 is not less than or equal to 0.00065683. Got 0.9876543209876543.]
+ [X Max error for test 91 at offset 120393 is not less than or equal to 0.00065683. Got 0.8888888888888888.]
expected: FAIL
- [X Max error for test 20 at offset 27782 is not less than or equal to 0.00065683. Got 0.9875737883906436.]
+ [X Max error for test 13 at offset 17199 is not less than or equal to 0.00065683. Got 0.9885057471264368.]
expected: FAIL
- [X Max error for test 21 at offset 27783 is not less than or equal to 0.00065683. Got 0.9873417721518988.]
+ [X Max error for test 61 at offset 80703 is not less than or equal to 0.00065683. Got 0.9743589743589743.]
expected: FAIL
- [X Max error for test 22 at offset 30428 is not less than or equal to 0.00065683. Got 0.9872570963562539.]
+ [X Max error for test 79 at offset 104517 is not less than or equal to 0.00065683. Got 0.9523809523809523.]
expected: FAIL
- [X Max error for test 23 at offset 30429 is not less than or equal to 0.00065683. Got 0.987012987012987.]
+ [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
expected: FAIL
- [X Max error for test 24 at offset 33074 is not less than or equal to 0.00065683. Got 0.9869238398588358.]
+ [X Max error for test 54 at offset 72764 is not less than or equal to 0.00065683. Got 0.9784830785336837.]
expected: FAIL
- [X Max error for test 25 at offset 33075 is not less than or equal to 0.00065683. Got 0.9866666666666667.]
+ [X Max error for test 70 at offset 93932 is not less than or equal to 0.00065683. Got 0.9671862719990767.]
expected: FAIL
- [X Max error for test 26 at offset 35720 is not less than or equal to 0.00065683. Got 0.9865726844007524.]
+ [X Max error for test 83 at offset 109809 is not less than or equal to 0.00065683. Got 0.9411764705882352.]
expected: FAIL
- [X Max error for test 27 at offset 35721 is not less than or equal to 0.00065683. Got 0.9863013698630136.]
+ [X Max error for test 36 at offset 48950 is not less than or equal to 0.00065683. Got 0.984490124463403.]
expected: FAIL
- [X Max error for test 28 at offset 38366 is not less than or equal to 0.00065683. Got 0.9862021481787615.]
+ [X Max error for test 22 at offset 30428 is not less than or equal to 0.00065683. Got 0.9872570963562539.]
expected: FAIL
- [X Max error for test 29 at offset 38367 is not less than or equal to 0.00065683. Got 0.9859154929577465.]
+ [X Max error for test 18 at offset 25136 is not less than or equal to 0.00065683. Got 0.9878751210146629.]
expected: FAIL
- [X Max error for test 30 at offset 41012 is not less than or equal to 0.00065683. Got 0.9858105811822068.]
+ [X Max error for test 45 at offset 59535 is not less than or equal to 0.00065683. Got 0.9818181818181818.]
expected: FAIL
- [X Max error for test 31 at offset 41013 is not less than or equal to 0.00065683. Got 0.9855072463768116.]
+ [X Max error for test 6 at offset 9260 is not less than or equal to 0.00065683. Got 0.9894151948002298.]
expected: FAIL
- [X Max error for test 32 at offset 43658 is not less than or equal to 0.00065683. Got 0.9853961406282427.]
+ [X Max error for test 95 at offset 125685 is not less than or equal to 0.00065683. Got 0.8.]
expected: FAIL
- [X Max error for test 33 at offset 43659 is not less than or equal to 0.00065683. Got 0.9850746268656716.]
+ [X Max error for test 38 at offset 51596 is not less than or equal to 0.00065683. Got 0.9839936102373862.]
expected: FAIL
- [X Max error for test 34 at offset 46304 is not less than or equal to 0.00065683. Got 0.9849567619626562.]
+ [X Max error for test 68 at offset 91286 is not less than or equal to 0.00065683. Got 0.9692071297374057.]
expected: FAIL
- [X Max error for test 35 at offset 46305 is not less than or equal to 0.00065683. Got 0.9846153846153847.]
+ [X Max error for test 43 at offset 56889 is not less than or equal to 0.00065683. Got 0.9824561403508771.]
expected: FAIL
- [X Max error for test 36 at offset 48950 is not less than or equal to 0.00065683. Got 0.984490124463403.]
+ [X Max error for test 46 at offset 62180 is not less than or equal to 0.00065683. Got 0.9816429723176522.]
expected: FAIL
- [X Max error for test 37 at offset 48951 is not less than or equal to 0.00065683. Got 0.9841269841269841.]
+ [X Max error for test 67 at offset 88641 is not less than or equal to 0.00065683. Got 0.9696969696969697.]
expected: FAIL
- [X Max error for test 38 at offset 51596 is not less than or equal to 0.00065683. Got 0.9839936102373862.]
+ [X Max error for test 98 at offset 130976 is not less than or equal to 0.00065683. Got 0.595967750692577.]
expected: FAIL
- [X Max error for test 39 at offset 51597 is not less than or equal to 0.00065683. Got 0.9836065573770492.]
+ [X Max error for test 64 at offset 85994 is not less than or equal to 0.00065683. Got 0.9725839991647606.]
expected: FAIL
- [X Max error for test 40 at offset 54242 is not less than or equal to 0.00065683. Got 0.9834642550810092.]
+ [X Max error for test 75 at offset 99225 is not less than or equal to 0.00065683. Got 0.96.]
expected: FAIL
- [X Max error for test 41 at offset 54243 is not less than or equal to 0.00065683. Got 0.9830508474576272.]
+ [X Max error for test 72 at offset 96578 is not less than or equal to 0.00065683. Got 0.9648815365865586.]
expected: FAIL
- [X Max error for test 42 at offset 56888 is not less than or equal to 0.00065683. Got 0.9828986892565407.]
+ [X Max error for test 80 at offset 107162 is not less than or equal to 0.00065683. Got 0.9511600703170818.]
expected: FAIL
- [X Max error for test 43 at offset 56889 is not less than or equal to 0.00065683. Got 0.9824561403508771.]
+ [X Max error for test 33 at offset 43659 is not less than or equal to 0.00065683. Got 0.9850746268656716.]
expected: FAIL
- [X Max error for test 44 at offset 59534 is not less than or equal to 0.00065683. Got 0.9822930656844523.]
+ [X Max error for test 16 at offset 22490 is not less than or equal to 0.00065683. Got 0.9881621851594479.]
expected: FAIL
- [X Max error for test 45 at offset 59535 is not less than or equal to 0.00065683. Got 0.9818181818181818.]
+ [X Max error for test 4 at offset 6614 is not less than or equal to 0.00065683. Got 0.9896346257350639.]
expected: FAIL
- [X Max error for test 46 at offset 62180 is not less than or equal to 0.00065683. Got 0.9816429723176522.]
+ [X Number of tests started and ended at the correct time is not equal to 100. Got 1.]
expected: FAIL
- [X Max error for test 47 at offset 62181 is not less than or equal to 0.00065683. Got 0.9811320754716981.]
+ [X Max error for test 63 at offset 83349 is not less than or equal to 0.00065683. Got 0.972972972972973.]
expected: FAIL
- [X Max error for test 48 at offset 64826 is not less than or equal to 0.00065683. Got 0.9809433244774503.]
+ [X Max error for test 58 at offset 78056 is not less than or equal to 0.00065683. Got 0.9764567669470277.]
expected: FAIL
- [X Max error for test 49 at offset 64827 is not less than or equal to 0.00065683. Got 0.9803921568627451.]
+ [X Max error for test 56 at offset 75410 is not less than or equal to 0.00065683. Got 0.9775154833769094.]
expected: FAIL
- [X Max error for test 50 at offset 67472 is not less than or equal to 0.00065683. Got 0.9801882315933432.]
+ [< [test\] 101 out of 102 assertions were failed.]
expected: FAIL
- [X Max error for test 51 at offset 67473 is not less than or equal to 0.00065683. Got 0.9795918367346939.]
+ [X Max error for test 97 at offset 128331 is not less than or equal to 0.00065683. Got 0.6666666666666642.]
expected: FAIL
- [X Max error for test 52 at offset 70118 is not less than or equal to 0.00065683. Got 0.97937083095423.]
+ [X Max error for test 62 at offset 83348 is not less than or equal to 0.00065683. Got 0.9740091305612436.]
expected: FAIL
- [X Max error for test 53 at offset 70119 is not less than or equal to 0.00065683. Got 0.9787234042553191.]
+ [X Max error for test 15 at offset 19845 is not less than or equal to 0.00065683. Got 0.9882352941176471.]
expected: FAIL
- [X Max error for test 54 at offset 72764 is not less than or equal to 0.00065683. Got 0.9784830785336837.]
+ [X Max error for test 94 at offset 125684 is not less than or equal to 0.00065683. Got 0.845561037037827.]
expected: FAIL
- [X Max error for test 55 at offset 72765 is not less than or equal to 0.00065683. Got 0.9777777777777777.]
+ [X Max error for test 32 at offset 43658 is not less than or equal to 0.00065683. Got 0.9853961406282427.]
expected: FAIL
- [X Max error for test 56 at offset 75410 is not less than or equal to 0.00065683. Got 0.9775154833769094.]
+ [X Max error for test 37 at offset 48951 is not less than or equal to 0.00065683. Got 0.9841269841269841.]
expected: FAIL
- [X Max error for test 57 at offset 75411 is not less than or equal to 0.00065683. Got 0.9767441860465116.]
+ [X Max error for test 50 at offset 67472 is not less than or equal to 0.00065683. Got 0.9801882315933432.]
expected: FAIL
- [X Max error for test 58 at offset 78056 is not less than or equal to 0.00065683. Got 0.9764567669470277.]
+ [X Max error for test 14 at offset 19844 is not less than or equal to 0.00065683. Got 0.988435970831659.]
expected: FAIL
- [X Max error for test 59 at offset 78057 is not less than or equal to 0.00065683. Got 0.975609756097561.]
+ [X Max error for test 26 at offset 35720 is not less than or equal to 0.00065683. Got 0.9865726844007524.]
expected: FAIL
- [X Max error for test 60 at offset 80702 is not less than or equal to 0.00065683. Got 0.9752934214747024.]
+ [X Max error for test 23 at offset 30429 is not less than or equal to 0.00065683. Got 0.987012987012987.]
expected: FAIL
- [X Max error for test 61 at offset 80703 is not less than or equal to 0.00065683. Got 0.9743589743589743.]
+ [X Max error for test 28 at offset 38366 is not less than or equal to 0.00065683. Got 0.9862021481787615.]
expected: FAIL
- [X Max error for test 62 at offset 83348 is not less than or equal to 0.00065683. Got 0.9740091305612436.]
+ [X Max error for test 30 at offset 41012 is not less than or equal to 0.00065683. Got 0.9858105811822068.]
expected: FAIL
- [X Max error for test 63 at offset 83349 is not less than or equal to 0.00065683. Got 0.972972972972973.]
+ [X Max error for test 40 at offset 54242 is not less than or equal to 0.00065683. Got 0.9834642550810092.]
expected: FAIL
- [X Max error for test 64 at offset 85994 is not less than or equal to 0.00065683. Got 0.9725839991647606.]
+ [X Max error for test 51 at offset 67473 is not less than or equal to 0.00065683. Got 0.9795918367346939.]
expected: FAIL
- [X Max error for test 65 at offset 85995 is not less than or equal to 0.00065683. Got 0.9714285714285714.]
+ [X Max error for test 44 at offset 59534 is not less than or equal to 0.00065683. Got 0.9822930656844523.]
expected: FAIL
- [X Max error for test 66 at offset 88640 is not less than or equal to 0.00065683. Got 0.9709935155615783.]
+ [X Max error for test 96 at offset 128330 is not less than or equal to 0.00065683. Got 0.776538807317465.]
expected: FAIL
- [X Max error for test 67 at offset 88641 is not less than or equal to 0.00065683. Got 0.9696969696969697.]
+ [X Max error for test 99 at offset 132299 is not less than or equal to 0.00065683. Got 0.9049431604462704.]
expected: FAIL
- [X Max error for test 68 at offset 91286 is not less than or equal to 0.00065683. Got 0.9692071297374057.]
+ [X Max error for test 27 at offset 35721 is not less than or equal to 0.00065683. Got 0.9863013698630136.]
expected: FAIL
- [X Max error for test 69 at offset 91287 is not less than or equal to 0.00065683. Got 0.967741935483871.]
+ [X Max error for test 73 at offset 96579 is not less than or equal to 0.00065683. Got 0.9629629629629629.]
expected: FAIL
- [X Max error for test 70 at offset 93932 is not less than or equal to 0.00065683. Got 0.9671862719990767.]
+ [X Max error for test 55 at offset 72765 is not less than or equal to 0.00065683. Got 0.9777777777777777.]
expected: FAIL
- [X Max error for test 71 at offset 93933 is not less than or equal to 0.00065683. Got 0.9655172413793104.]
+ [X Max error for test 7 at offset 9261 is not less than or equal to 0.00065683. Got 0.989247311827957.]
expected: FAIL
- [X Max error for test 72 at offset 96578 is not less than or equal to 0.00065683. Got 0.9648815365865586.]
+ [X Max error for test 90 at offset 120392 is not less than or equal to 0.00065683. Got 0.9045350614645049.]
expected: FAIL
- [X Max error for test 73 at offset 96579 is not less than or equal to 0.00065683. Got 0.9629629629629629.]
+ [X Max error for test 35 at offset 46305 is not less than or equal to 0.00065683. Got 0.9846153846153847.]
expected: FAIL
- [X Max error for test 74 at offset 99224 is not less than or equal to 0.00065683. Got 0.9622285887375713.]
+ [X Max error for test 53 at offset 70119 is not less than or equal to 0.00065683. Got 0.9787234042553191.]
expected: FAIL
- [X Max error for test 75 at offset 99225 is not less than or equal to 0.00065683. Got 0.96.]
+ [X Max error for test 57 at offset 75411 is not less than or equal to 0.00065683. Got 0.9767441860465116.]
expected: FAIL
- [X Max error for test 76 at offset 101870 is not less than or equal to 0.00065683. Got 0.9591420650055538.]
+ [X Max error for test 34 at offset 46304 is not less than or equal to 0.00065683. Got 0.9849567619626562.]
expected: FAIL
- [X Max error for test 77 at offset 101871 is not less than or equal to 0.00065683. Got 0.9565217391304348.]
+ [X Max error for test 0 at offset 1322 is not less than or equal to 0.00065683. Got 0.990047280389914.]
expected: FAIL
- [X Max error for test 78 at offset 104516 is not less than or equal to 0.00065683. Got 0.9555062168024705.]
+ [X Max error for test 20 at offset 27782 is not less than or equal to 0.00065683. Got 0.9875737883906436.]
expected: FAIL
- [X Max error for test 79 at offset 104517 is not less than or equal to 0.00065683. Got 0.9523809523809523.]
+ [X Max error for test 93 at offset 123039 is not less than or equal to 0.00065683. Got 0.8571428571428571.]
expected: FAIL
- [X Max error for test 80 at offset 107162 is not less than or equal to 0.00065683. Got 0.9511600703170818.]
+ [X Max error for test 25 at offset 33075 is not less than or equal to 0.00065683. Got 0.9866666666666667.]
expected: FAIL
- [X Max error for test 81 at offset 107163 is not less than or equal to 0.00065683. Got 0.9473684210526315.]
+ [X Max error for test 59 at offset 78057 is not less than or equal to 0.00065683. Got 0.975609756097561.]
expected: FAIL
- [X Max error for test 82 at offset 109808 is not less than or equal to 0.00065683. Got 0.9458729474346069.]
+ [X Max error for test 2 at offset 3968 is not less than or equal to 0.00065683. Got 0.9898451435112884.]
expected: FAIL
- [X Max error for test 83 at offset 109809 is not less than or equal to 0.00065683. Got 0.9411764705882352.]
+ [X Max error for test 11 at offset 14553 is not less than or equal to 0.00065683. Got 0.9887640449438202.]
expected: FAIL
- [X Max error for test 84 at offset 112454 is not less than or equal to 0.00065683. Got 0.939302156727807.]
+ [X Max error for test 76 at offset 101870 is not less than or equal to 0.00065683. Got 0.9591420650055538.]
expected: FAIL
- [X Max error for test 85 at offset 112455 is not less than or equal to 0.00065683. Got 0.9333333333333333.]
+ [X Max error for test 39 at offset 51597 is not less than or equal to 0.00065683. Got 0.9836065573770492.]
expected: FAIL
- [X Max error for test 86 at offset 115100 is not less than or equal to 0.00065683. Got 0.9309156097430662.]
+ [X Max error for test 87 at offset 115101 is not less than or equal to 0.00065683. Got 0.9230769230769231.]
expected: FAIL
- [X Max error for test 87 at offset 115101 is not less than or equal to 0.00065683. Got 0.9230769230769231.]
+ [X Max error for test 69 at offset 91287 is not less than or equal to 0.00065683. Got 0.967741935483871.]
expected: FAIL
- [X Max error for test 88 at offset 117746 is not less than or equal to 0.00065683. Got 0.9198400003447016.]
+ [X Max error for test 5 at offset 6615 is not less than or equal to 0.00065683. Got 0.9894736842105263.]
expected: FAIL
- [X Max error for test 89 at offset 117747 is not less than or equal to 0.00065683. Got 0.9090909090909091.]
+ [X Max error for test 17 at offset 22491 is not less than or equal to 0.00065683. Got 0.9879518072289156.]
expected: FAIL
- [X Max error for test 90 at offset 120392 is not less than or equal to 0.00065683. Got 0.9045350614645049.]
+ [X Max error for test 85 at offset 112455 is not less than or equal to 0.00065683. Got 0.9333333333333333.]
expected: FAIL
- [X Max error for test 91 at offset 120393 is not less than or equal to 0.00065683. Got 0.8888888888888888.]
+ [X Max error for test 12 at offset 17198 is not less than or equal to 0.00065683. Got 0.9886973785205923.]
expected: FAIL
- [X Max error for test 92 at offset 123038 is not less than or equal to 0.00065683. Got 0.8820065951886947.]
+ [X Max error for test 78 at offset 104516 is not less than or equal to 0.00065683. Got 0.9555062168024705.]
expected: FAIL
- [X Max error for test 93 at offset 123039 is not less than or equal to 0.00065683. Got 0.8571428571428571.]
+ [X Max error for test 82 at offset 109808 is not less than or equal to 0.00065683. Got 0.9458729474346069.]
expected: FAIL
- [X Max error for test 94 at offset 125684 is not less than or equal to 0.00065683. Got 0.845561037037827.]
+ [X Max error for test 24 at offset 33074 is not less than or equal to 0.00065683. Got 0.9869238398588358.]
expected: FAIL
- [X Max error for test 95 at offset 125685 is not less than or equal to 0.00065683. Got 0.8.]
+ [X Max error for test 49 at offset 64827 is not less than or equal to 0.00065683. Got 0.9803921568627451.]
expected: FAIL
- [X Max error for test 96 at offset 128330 is not less than or equal to 0.00065683. Got 0.776538807317465.]
+ [X Max error for test 65 at offset 85995 is not less than or equal to 0.00065683. Got 0.9714285714285714.]
expected: FAIL
- [X Max error for test 97 at offset 128331 is not less than or equal to 0.00065683. Got 0.6666666666666642.]
+ [X Max error for test 71 at offset 93933 is not less than or equal to 0.00065683. Got 0.9655172413793104.]
expected: FAIL
- [X Max error for test 98 at offset 130976 is not less than or equal to 0.00065683. Got 0.595967750692577.]
+ [X Max error for test 89 at offset 117747 is not less than or equal to 0.00065683. Got 0.9090909090909091.]
expected: FAIL
- [X Max error for test 99 at offset 132299 is not less than or equal to 0.00065683. Got 0.9049431604462704.]
+ [X Max error for test 41 at offset 54243 is not less than or equal to 0.00065683. Got 0.9830508474576272.]
expected: FAIL
- [< [test\] 101 out of 102 assertions were failed.]
+ [X Max error for test 52 at offset 70118 is not less than or equal to 0.00065683. Got 0.97937083095423.]
expected: FAIL
- [# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
+ [X Max error for test 9 at offset 11907 is not less than or equal to 0.00065683. Got 0.989010989010989.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html.ini
index cbb02b814c0..91ca3291158 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html.ini
@@ -1,35 +1,38 @@
[audioparam-setValueCurve-exceptions.html]
expected: ERROR
- [X setValueCurveAtTime(curve, 0.0125, 0.0125) incorrectly threw TypeError: "g.gain.setValueCurveAtTime is not a function".]
+ [< [setValueCurve\] 5 out of 6 assertions were failed.]
+ expected: FAIL
+
+ [X setValueCurveAtTime(curve, 0.018750000000000003, 0.01) threw "TypeError" instead of NotSupportedError.]
expected: FAIL
[X setValueAtTime(1, 0.018750000000000003) did not throw an exception.]
expected: FAIL
- [X linearRampToValueAtTime(1, 0.018750000000000003) did not throw an exception.]
+ [X setValueCurveAtTime(curve, 0.03125, 0.01) threw "TypeError" instead of NotSupportedError.]
expected: FAIL
- [X exponentialRampToValueAtTime(1, 0.018750000000000003) did not throw an exception.]
+ [X linearRampToValueAtTime(1, 0.018750000000000003) did not throw an exception.]
expected: FAIL
- [X setTargetAtTime(1, 0.018750000000000003, 1) did not throw an exception.]
+ [X setValueCurveAtTime(curve, 0.00625, 0.01) threw "TypeError" instead of NotSupportedError.]
expected: FAIL
- [< [setValueCurve\] 5 out of 6 assertions were failed.]
+ [X setValueCurveAtTime(curve, 0.043750000000000004, 0.01) threw "TypeError" instead of NotSupportedError.]
expected: FAIL
[X setValueCurveAtTime(curve, 0.05, 0.1) incorrectly threw TypeError: "g.gain.setValueCurveAtTime is not a function".]
expected: FAIL
- [X setValueCurveAtTime(curve, 0.00625, 0.01) threw "TypeError" instead of NotSupportedError.]
+ [X setTargetAtTime(1, 0.018750000000000003, 1) did not throw an exception.]
expected: FAIL
- [X setValueCurveAtTime(curve, 0.018750000000000003, 0.01) threw "TypeError" instead of NotSupportedError.]
+ [X setValueCurveAtTime(curve, 0.0125, 0.0125) incorrectly threw TypeError: "g.gain.setValueCurveAtTime is not a function".]
expected: FAIL
- [X setValueCurveAtTime(curve, 0.03125, 0.01) threw "TypeError" instead of NotSupportedError.]
+ [X exponentialRampToValueAtTime(1, 0.018750000000000003) did not throw an exception.]
expected: FAIL
- [X setValueCurveAtTime(curve, 0.043750000000000004, 0.01) threw "TypeError" instead of NotSupportedError.]
+ [\n Test Exceptions from setValueCurveAtTime\n ]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html.ini
index fb10576f028..1ee9dc36a98 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html.ini
@@ -1,11 +1,11 @@
[automation-rate.html]
expected: ERROR
- [X Set AudioBufferSourceNode.detune.automationRate to "a-rate" did not throw an exception.]
+ [< [AudioBufferSourceNode\] 2 out of 4 assertions were failed.]
expected: FAIL
[X Set AudioBufferSourceNode.playbackRate.automationRate to "a-rate" did not throw an exception.]
expected: FAIL
- [< [AudioBufferSourceNode\] 2 out of 4 assertions were failed.]
+ [X Set AudioBufferSourceNode.detune.automationRate to "a-rate" did not throw an exception.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/baseaudiocontext-audioworklet.https.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/baseaudiocontext-audioworklet.https.html.ini
index c65b4e97e43..aca30bb33fb 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/baseaudiocontext-audioworklet.https.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/baseaudiocontext-audioworklet.https.html.ini
@@ -1,5 +1,2 @@
[baseaudiocontext-audioworklet.https.html]
expected: ERROR
- [\n Checking BaseAudioContext.audioWorklet\n ]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html.ini
index 05e059ad3c0..bce6dd3eb04 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html.ini
@@ -1,14 +1,8 @@
[biquad-basic.html]
expected: ERROR
- [X Initialize context for testing incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
+ [< [existence\] 1 out of 1 assertions were failed.]
expected: FAIL
[X context.createBiquadFilter does not exist. Got undefined.]
expected: FAIL
- [< [existence\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/ctor-biquadfilter.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/ctor-biquadfilter.html.ini
index 6651b6044af..74f212f13ee 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/ctor-biquadfilter.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-biquadfilternode-interface/ctor-biquadfilter.html.ini
@@ -1,11 +1,5 @@
[ctor-biquadfilter.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new BiquadFilterNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html.ini
index ac202e63983..548315c2d1b 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html.ini
@@ -1,17 +1,16 @@
[audiochannelmerger-basic.html]
- expected: ERROR
- [X context.createChannelMerger() incorrectly threw TypeError: "context.createChannelMerger is not a function".]
+ [< [exceptions-channels\] 4 out of 4 assertions were failed.]
expected: FAIL
- [X context.createChannelMerger(0) threw "TypeError" instead of IndexSizeError.]
+ [X context.createChannelMerger(33) threw "TypeError" instead of IndexSizeError.]
expected: FAIL
- [X context.createChannelMerger(32) incorrectly threw TypeError: "context.createChannelMerger is not a function".]
+ [X context.createChannelMerger(0) threw "TypeError" instead of IndexSizeError.]
expected: FAIL
- [X context.createChannelMerger(33) threw "TypeError" instead of IndexSizeError.]
+ [X context.createChannelMerger(32) incorrectly threw TypeError: "context.createChannelMerger is not a function".]
expected: FAIL
- [< [exceptions-channels\] 4 out of 4 assertions were failed.]
+ [X context.createChannelMerger() incorrectly threw TypeError: "context.createChannelMerger is not a function".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input-non-default.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input-non-default.html.ini
deleted file mode 100644
index 307a5731949..00000000000
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input-non-default.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[audiochannelmerger-input-non-default.html]
- expected: ERROR
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input.html.ini
deleted file mode 100644
index 4c0f0dd12a1..00000000000
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-input.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[audiochannelmerger-input.html]
- expected: ERROR
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html.ini
deleted file mode 100644
index 4625d399cf7..00000000000
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-[ctor-channelmerger.html]
- expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
- [X node0 = new ChannelMergerNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html.ini
index 48bc3434924..32e0f35871f 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html.ini
@@ -1,11 +1,11 @@
[audiochannelsplitter.html]
expected: ERROR
- [X createChannelSplitter(0) threw "TypeError" instead of IndexSizeError.]
- expected: FAIL
-
[X createChannelSplitter(33) threw "TypeError" instead of IndexSizeError.]
expected: FAIL
[X splitternode = context.createChannelSplitter(32) incorrectly threw TypeError: "context.createChannelSplitter is not a function".]
expected: FAIL
+ [X createChannelSplitter(0) threw "TypeError" instead of IndexSizeError.]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html.ini
index 92e7446b7ac..65bfcd5f405 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html.ini
@@ -1,11 +1,5 @@
[ctor-channelsplitter.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new ChannelSplitterNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/ctor-constantsource.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/ctor-constantsource.html.ini
index 6f8ec2d5edf..2110cb2fbe9 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/ctor-constantsource.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/ctor-constantsource.html.ini
@@ -1,11 +1,5 @@
[ctor-constantsource.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new ConstantSourceNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html.ini
index 0705478a45f..5616ec2eb54 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html.ini
@@ -1,5 +1,5 @@
[test-constantsourcenode.html]
- [ConstantSourceNode can be constructed]
+ [ConstantSourceNode with no automation]
expected: FAIL
[ConstantSourceNode stop and start]
@@ -8,12 +8,12 @@
[ConstantSourceNode onended event]
expected: FAIL
- [ConstantSourceNode start and stop when work]
+ [ConstantSourceNode can be constructed]
expected: FAIL
- [ConstantSourceNode with no automation]
+ [ConstantSourceNode with automation]
expected: FAIL
- [ConstantSourceNode with automation]
+ [ConstantSourceNode start and stop when work]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html.ini
index e696df1a9f7..48fae67227f 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html.ini
@@ -1,11 +1,5 @@
[ctor-convolver.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new ConvolverNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/ctor-delay.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/ctor-delay.html.ini
index d69bdd755c1..03c0e35753a 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/ctor-delay.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/ctor-delay.html.ini
@@ -1,11 +1,5 @@
[ctor-delay.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new DelayNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html.ini
index 031e60e922d..2691f449994 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html.ini
@@ -1,11 +1,11 @@
[delaynode-maxdelaylimit.html]
expected: ERROR
- [X () => context.createDelay(180) threw "TypeError" instead of Delay length cannot be 180 seconds or more.]
+ [X Setting Delay length to negative threw "TypeError" instead of NotSupportedError.]
expected: FAIL
- [X () => context.createDelay(0) threw "TypeError" instead of Delay length cannot be 0.]
+ [X Setting Delay length to 0 seconds threw "TypeError" instead of NotSupportedError.]
expected: FAIL
- [X () => context.createDelay(-1) threw "TypeError" instead of Delay length cannot be negative.]
+ [X Setting Delay length to 180 seconds or more threw "TypeError" instead of NotSupportedError.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html.ini
index 7b109536ba3..b7b3d3da3ae 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html.ini
@@ -1,11 +1,5 @@
[ctor-dynamicscompressor.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new DynamicsCompressorNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-gainnode-interface/ctor-gain.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-gainnode-interface/ctor-gain.html.ini
deleted file mode 100644
index f607ab5b6f6..00000000000
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-gainnode-interface/ctor-gain.html.ini
+++ /dev/null
@@ -1,43 +0,0 @@
-[ctor-gain.html]
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
- [X node0 = new GainNode(context) incorrectly threw TypeError: "Value is not an object.".]
- expected: FAIL
-
- [X node0 instanceof GainNode is not equal to true. Got false.]
- expected: FAIL
-
- [X node.channelCount is not equal to 17. Got 2.]
- expected: FAIL
-
- [X new GainNode(c, {channelCount: 0}) did not throw an exception.]
- expected: FAIL
-
- [X new GainNode(c, {channelCount: 99}) did not throw an exception.]
- expected: FAIL
-
- [X node.channelCountMode after valid setter is not equal to clamped-max. Got max.]
- expected: FAIL
-
- [X node.channelCountMode after valid setter is not equal to explicit. Got max.]
- expected: FAIL
-
- [X node.channelCountMode after invalid setter is not equal to explicit. Got max.]
- expected: FAIL
-
- [X node.channelInterpretation is not equal to discrete. Got speakers.]
- expected: FAIL
-
- [X node.channelInterpretation after invalid setter is not equal to discrete. Got speakers.]
- expected: FAIL
-
- [< [test AudioNodeOptions\] 8 out of 20 assertions were failed.]
- expected: FAIL
-
- [# AUDIT TASK RUNNER FINISHED: 1 out of 5 tasks were failed.]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini
index 04f71c65f49..7c06aafddf3 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini
@@ -1,11 +1,5 @@
[ctor-iirfilter.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new IIRFilterNode(context, {"feedforward":[1\],"feedback":[1,-0.9\]}) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini
index 9714afed1a4..9914ef448f9 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini
@@ -1,14 +1,8 @@
[iirfilter-basic.html]
expected: ERROR
- [X Initialize context for testing incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
+ [< [existence\] 1 out of 1 assertions were failed.]
expected: FAIL
[X context.createIIRFilter does not exist. Got undefined.]
expected: FAIL
- [< [existence\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini
index 4aac1bfcd15..76179331f58 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini
@@ -1,5 +1,5 @@
[iirfilter.html]
- expected: ERROR
+ expected: CRASH
[X createIIRFilter with normalized coefficients incorrectly threw TypeError: "context.createIIRFilter is not a function".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini
index c91d5ebdad7..c72d4af0fab 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini
@@ -1,22 +1,22 @@
[test-iirfilternode.html]
- [feedforward coefficients can not be empty]
+ [the first feedback coefficient must be non-zero]
expected: FAIL
[feedback coefficients can not be empty]
expected: FAIL
- [more than 20 feedforward coefficients can not be used]
+ [IIRFilterNode getFrequencyResponse handles invalid frequencies properly]
expected: FAIL
[more than 20 feedback coefficients can not be used]
expected: FAIL
- [at least one feedforward coefficient must be non-zero]
+ [feedforward coefficients can not be empty]
expected: FAIL
- [the first feedback coefficient must be non-zero]
+ [at least one feedforward coefficient must be non-zero]
expected: FAIL
- [IIRFilterNode getFrequencyResponse handles invalid frequencies properly]
+ [more than 20 feedforward coefficients can not be used]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html.ini
index 3c7ee0d07ca..892336f1c9a 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html.ini
@@ -1,43 +1,16 @@
[ctor-offlineaudiocontext.html]
- [X new OfflineAudioContext(3) threw "ReferenceError" instead of TypeError.]
- expected: FAIL
-
- [X new OfflineAudioContext(3, 42) threw "ReferenceError" instead of TypeError.]
- expected: FAIL
-
- [X context = new OfflineAudioContext(3, 42, 12345) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [X new OfflineAudioContext() did not throw an exception.]
- expected: FAIL
-
- [X new OfflineAudioContext({}) did not throw an exception.]
- expected: FAIL
-
- [X new OfflineAudioContext({"length":42}) did not throw an exception.]
- expected: FAIL
-
- [X new OfflineAudioContext({"sampleRate":12345}) did not throw an exception.]
- expected: FAIL
-
- [< [options-1\] 4 out of 10 assertions were failed.]
+ [# AUDIT TASK RUNNER FINISHED: 1 out of 4 tasks were failed.]
expected: FAIL
- [X new OfflineAudioContext({"length":42,"sampleRate":8000,"numberOfChannels":33}) did not throw an exception.]
+ [X new OfflineAudioContext({"length":1,"sampleRate":1}) did not throw an exception.]
expected: FAIL
[X new OfflineAudioContext({"length":0,"sampleRate":8000}) did not throw an exception.]
expected: FAIL
- [X new OfflineAudioContext({"length":1,"sampleRate":1}) did not throw an exception.]
- expected: FAIL
-
[< [options-2\] 3 out of 3 assertions were failed.]
expected: FAIL
- [# AUDIT TASK RUNNER FINISHED: 2 out of 4 tasks were failed.]
- expected: FAIL
-
- [# AUDIT TASK RUNNER FINISHED: 1 out of 4 tasks were failed.]
+ [X new OfflineAudioContext({"length":42,"sampleRate":8000,"numberOfChannels":33}) did not throw an exception.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html.ini
index a7cc51f5b36..70f838faca3 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html.ini
@@ -1,33 +1,27 @@
[ctor-oscillator.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
+ [X node.channelCount is not equal to 17. Got 2.]
expected: FAIL
- [< [initialize\] 1 out of 1 assertions were failed.]
+ [X node0.type is not equal to sine. Got undefined.]
expected: FAIL
- [X node0 = new OscillatorNode(context) incorrectly threw TypeError: "Value is not an object.".]
+ [X node.channelCountMode after valid setter is not equal to clamped-max. Got max.]
expected: FAIL
- [X node0 instanceof OscillatorNode is not equal to true. Got false.]
+ [X node.channelInterpretation after invalid setter is not equal to discrete. Got speakers.]
expected: FAIL
- [X node0.type is not equal to sine. Got undefined.]
+ [X new OscillatorNode(c, {channelCount: 0}) did not throw an exception.]
expected: FAIL
[< [default constructor\] 1 out of 9 assertions were failed.]
expected: FAIL
- [X node.channelCount is not equal to 17. Got 2.]
- expected: FAIL
-
- [X new OscillatorNode(c, {channelCount: 0}) did not throw an exception.]
- expected: FAIL
-
- [X new OscillatorNode(c, {channelCount: 99}) did not throw an exception.]
+ [X node1.type is not equal to sawtooth. Got undefined.]
expected: FAIL
- [X node.channelCountMode after valid setter is not equal to clamped-max. Got max.]
+ [< [test AudioNodeOptions\] 8 out of 20 assertions were failed.]
expected: FAIL
[X node.channelCountMode after valid setter is not equal to explicit. Got max.]
@@ -39,12 +33,6 @@
[X node.channelInterpretation is not equal to discrete. Got speakers.]
expected: FAIL
- [X node.channelInterpretation after invalid setter is not equal to discrete. Got speakers.]
- expected: FAIL
-
- [< [test AudioNodeOptions\] 8 out of 20 assertions were failed.]
- expected: FAIL
-
- [X node1.type is not equal to sawtooth. Got undefined.]
+ [X new OscillatorNode(c, {channelCount: 99}) did not throw an exception.]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html.ini
new file mode 100644
index 00000000000..7386e31980e
--- /dev/null
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html.ini
@@ -0,0 +1,28 @@
+[detune-limiting.html]
+ [X Osc(freq: 1, detune: 18514.189453125) output does not equal [0,5.565462970480439e-7,0.0000011130925940960879,0.0000016696390048309695,0.0000022261851881921757,0.0000027827315989270573,0.000003339278009661939,0.000003895824193023145,0.000004452370376384351,0.0000050089170144929085,0.000005565463197854115,0.000006122009381215321,0.000006678556019323878,0.000007235102202685084,0.00000779164838604629,0.000008348194569407497...\] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t1.4247585204429924e-4\t5.5654629704804393e-7\t1.4191930574725120e-4\t2.5500000000000000e+2\t0.0000000000000000e+0\n\t[2\]\t2.8495170408859849e-4\t1.1130925940960879e-6\t2.8383861149450240e-4\t2.5500000000000000e+2\t0.0000000000000000e+0\n\t[3\]\t4.2742758523672819e-4\t1.6696390048309695e-6\t4.2575794623189722e-4\t2.5500000000000000e+2\t0.0000000000000000e+0\n\t[4\]\t5.6990334996953607e-4\t2.2261851881921757e-6\t5.6767716478134389e-4\t2.5499997385318113e+2\t0.0000000000000000e+0\n\t[5\]\t7.1237923111766577e-4\t2.7827315989270573e-6\t7.0959649951873871e-4\t2.5499997908254574e+2\t0.0000000000000000e+0\n\t...and 5505 more errors.\n\tMax AbsError of 7.0378831448033452e-1 at index of 5510.\n\t[5510\]\t7.0685487985610962e-1\t3.0665653757750988e-3\t7.0378831448033452e-1\t2.2950376993102469e+2\t0.0000000000000000e+0\n\tMax RelError of 2.5500000000000000e+2 at index of 1.\n]
+ expected: FAIL
+
+ [# AUDIT TASK RUNNER FINISHED: 2 out of 2 tasks were failed.]
+ expected: FAIL
+
+ [X osc[5:\]: Expected 0 for all values but found 5506 unexpected values: \n\tIndex\tActual\n\t[0\]\t0.0007123792311176658\n\t[1\]\t0.0008548550540581346\n\t[2\]\t0.0009973308769986033\n\t[3\]\t0.0011398065835237503\n\t...and 5502 more errors.]
+ expected: FAIL
+
+ [< [detune automation\] 1 out of 3 assertions were failed.]
+ expected: FAIL
+
+ [< [detune limits\] 2 out of 4 assertions were failed.]
+ expected: FAIL
+
+ [X Osc(freq: 44100.00390625) output: Expected 0 for all values but found 5510 unexpected values: \n\tIndex\tActual\n\t[1\]\t5.565462970480439e-7\n\t[2\]\t0.0000011130925940960879\n\t[3\]\t0.0000016696390048309695\n\t[4\]\t0.0000022261851881921757\n\t...and 5506 more errors.]
+ expected: FAIL
+
+ [X osc[5:\]: Expected 0 for all values but found 5507 unexpected values: \n\tIndex\tActual\n\t[0\]\t0.0007123792311176658\n\t[1\]\t0.0008548550540581346\n\t[2\]\t0.0009973308769986033\n\t[3\]\t0.0011398065835237503\n\t...and 5503 more errors.]
+ expected: FAIL
+
+ [X Osc(freq: 1, detune: 18514.189453125) output does not equal [0,5.565462970480439e-7,0.0000011130925940960879,0.0000016696390048309695,0.0000022261851881921757,0.0000027827315989270573,0.000003339278009661939,0.000003895824193023145,0.000004452370376384351,0.0000050089170144929085,0.000005565463197854115,0.000006122009381215321,0.000006678556019323878,0.000007235102202685084,0.00000779164838604629,0.000008348194569407497...\] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t1.4247585204429924e-4\t5.5654629704804393e-7\t1.4191930574725120e-4\t2.5500000000000000e+2\t0.0000000000000000e+0\n\t[2\]\t2.8495170408859849e-4\t1.1130925940960879e-6\t2.8383861149450240e-4\t2.5500000000000000e+2\t0.0000000000000000e+0\n\t[3\]\t4.2742758523672819e-4\t1.6696390048309695e-6\t4.2575794623189722e-4\t2.5500000000000000e+2\t0.0000000000000000e+0\n\t[4\]\t5.6990334996953607e-4\t2.2261851881921757e-6\t5.6767716478134389e-4\t2.5499997385318113e+2\t0.0000000000000000e+0\n\t[5\]\t7.1237923111766577e-4\t2.7827315989270573e-6\t7.0959649951873871e-4\t2.5499997908254574e+2\t0.0000000000000000e+0\n\t...and 5506 more errors.\n\tMax AbsError of 7.0388854946941137e-1 at index of 5511.\n\t[5511\]\t7.0695567131042480e-1\t3.0671218410134315e-3\t7.0388854946941137e-1\t2.2949481173425900e+2\t0.0000000000000000e+0\n\tMax RelError of 2.5500000000000000e+2 at index of 1.\n]
+ expected: FAIL
+
+ [X Osc(freq: 44100.00390625) output: Expected 0 for all values but found 5511 unexpected values: \n\tIndex\tActual\n\t[1\]\t5.565462970480439e-7\n\t[2\]\t0.0000011130925940960879\n\t[3\]\t0.0000016696390048309695\n\t[4\]\t0.0000022261851881921757\n\t...and 5507 more errors.]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html.ini
index 60f05981dcb..63e196e1da4 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html.ini
@@ -1,22 +1,13 @@
[ctor-panner.html]
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
+ [X new PannerNode(c, {"coneOuterGain":1.1}) threw "InvalidStateError" instead of InvalidStateError.]
expected: FAIL
- [< [initialize\] 1 out of 1 assertions were failed.]
+ [X new PannerNode(c, {"coneOuterGain":-1}) threw "InvalidStateError" instead of InvalidStateError.]
expected: FAIL
- [X node0 = new PannerNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
- expected: FAIL
-
- [< [test AudioNodeOptions\] 2 out of 18 assertions were failed.]
- expected: FAIL
-
- [X new PannerNode(c, {"channelCount":0}) did not throw an exception.]
+ [< [test AudioNodeOptions\] 2 out of 28 assertions were failed.]
expected: FAIL
[# AUDIT TASK RUNNER FINISHED: 1 out of 5 tasks were failed.]
expected: FAIL
- [X node6.channelInterpretation is not equal to discrete. Got speakers.]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html.ini
index f5b50f5b8fa..590a0e116bd 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/panner-distance-clamping.html.ini
@@ -1,38 +1,2 @@
[panner-distance-clamping.html]
expected: ERROR
- [X new PannerNode(c, {refDistance: -1}) threw "ReferenceError" instead of RangeError.]
- expected: FAIL
-
- [X new PannerNode(c, {refDistance: 0}) incorrectly threw ReferenceError: "PannerNode is not defined".]
- expected: FAIL
-
- [X new PannerNode(c, {refDistance: 5e-324}) incorrectly threw ReferenceError: "PannerNode is not defined".]
- expected: FAIL
-
- [X new PannerNode(c, {refDistance: -1}) threw "ReferenceError" instead of EcmaScript error RangeError.]
- expected: FAIL
-
- [X panner.maxDistance = 0 did not throw an exception.]
- expected: FAIL
-
- [X panner.maxDistance = -1 threw "NotSupportedError" instead of EcmaScript error RangeError.]
- expected: FAIL
-
- [< [max-distance-error\] 4 out of 6 assertions were failed.]
- expected: FAIL
-
- [X new PannerNode(c, {maxDistance: 0}) did not throw an exception.]
- expected: FAIL
-
- [X panner.refDistance = -1 did not throw an exception.]
- expected: FAIL
-
- [X new PannerNode(c, {refDistance: -1}) did not throw an exception.]
- expected: FAIL
-
- [< [ref-distance-error\] 2 out of 6 assertions were failed.]
- expected: FAIL
-
- [X new PannerNode(c, {maxDistance: -1}) did not throw an exception.]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html.ini
deleted file mode 100644
index 10dcd6b0c87..00000000000
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[panner-rolloff-clamping.html]
- expected: ERROR
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic.html.ini
deleted file mode 100644
index f5088fcd792..00000000000
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-pannernode-interface/pannernode-basic.html.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[pannernode-basic.html]
- [X Initialize context and panner incorrectly threw TypeError: "context.createPanner is not a function".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html.ini
index 60b5da616c4..55a222696ce 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html.ini
@@ -1,11 +1,5 @@
[ctor-stereopanner.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new StereoPannerNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-waveshapernode-interface/ctor-waveshaper.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-waveshapernode-interface/ctor-waveshaper.html.ini
index 64059b2a021..472044f8544 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-waveshapernode-interface/ctor-waveshaper.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-waveshapernode-interface/ctor-waveshaper.html.ini
@@ -1,11 +1,5 @@
[ctor-waveshaper.html]
expected: ERROR
- [X context = new OfflineAudioContext(...) incorrectly threw ReferenceError: "OfflineAudioContext is not defined".]
- expected: FAIL
-
- [< [initialize\] 1 out of 1 assertions were failed.]
- expected: FAIL
-
[X node0 = new WaveShaperNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
diff --git a/tests/wpt/metadata/websockets/cookies/006.html.ini b/tests/wpt/metadata/websockets/cookies/006.html.ini
index b051e90bbcd..81bc66f0684 100644
--- a/tests/wpt/metadata/websockets/cookies/006.html.ini
+++ b/tests/wpt/metadata/websockets/cookies/006.html.ini
@@ -4,6 +4,3 @@
[006.html?wss]
type: testharness
- [WebSockets: setting Secure cookie with document.cookie, checking ws request]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/workers/importscripts_mime.tentative.any.js.ini b/tests/wpt/metadata/workers/importscripts_mime.tentative.any.js.ini
new file mode 100644
index 00000000000..c1bdb07d8e0
--- /dev/null
+++ b/tests/wpt/metadata/workers/importscripts_mime.tentative.any.js.ini
@@ -0,0 +1,45 @@
+[importscripts_mime.tentative.any.sharedworker.html]
+ [importscripts_mime]
+ expected: FAIL
+
+
+[importscripts_mime.tentative.any.worker.html]
+ [importScripts() requires scripty MIME types: aaa/aaa is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: Text/html is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: zzz/zzz is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: application/octet-stream is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: text/potato is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: TEXT/HTML is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: potato/text is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: text/Html is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: TeXt/HtMl is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: text/html is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: application/xml is blocked.]
+ expected: FAIL
+
+ [importScripts() requires scripty MIME types: text/plain is blocked.]
+ expected: FAIL
+
+
+[importscripts_mime.tentative.any.serviceworker.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini
index f806a845a2a..9d72f08e38e 100644
--- a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini
+++ b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini
@@ -1,6 +1,5 @@
[005.html]
type: testharness
- expected: ERROR
[dedicated worker in shared worker in dedicated worker]
expected: FAIL
diff --git a/tests/wpt/metadata/xhr/headers-normalize-response.htm.ini b/tests/wpt/metadata/xhr/headers-normalize-response.htm.ini
index 7ac33fce748..c5dc615ee07 100644
--- a/tests/wpt/metadata/xhr/headers-normalize-response.htm.ini
+++ b/tests/wpt/metadata/xhr/headers-normalize-response.htm.ini
@@ -6,15 +6,9 @@
[Header value: \\0hello_world]
expected: FAIL
- [Header value: hello\\0world]
- expected: FAIL
-
[Header value: hello_world[tab\]]
expected: FAIL
[Header value: [tab\]hello_world[tab\]]
expected: FAIL
- [Header value: \\0]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/xhr/send-data-readablestream.any.js.ini b/tests/wpt/metadata/xhr/send-data-readablestream.any.js.ini
new file mode 100644
index 00000000000..65a79f001ba
--- /dev/null
+++ b/tests/wpt/metadata/xhr/send-data-readablestream.any.js.ini
@@ -0,0 +1,26 @@
+[send-data-readablestream.any.html]
+ [XMLHttpRequest: send() with a stream on which read() is called]
+ expected: FAIL
+
+ [XMLHttpRequest: send() with a stream on which read() and releaseLock() are called]
+ expected: FAIL
+
+ [XMLHttpRequest: send() with a stream on which getReader() is called]
+ expected: FAIL
+
+
+[send-data-readablestream.any.worker.html]
+ [XMLHttpRequest: send() with a stream on which read() is called]
+ expected: FAIL
+
+ [XMLHttpRequest: send() with a stream on which read() and releaseLock() are called]
+ expected: FAIL
+
+ [XMLHttpRequest: send() with a stream on which getReader() is called]
+ expected: FAIL
+
+
+[send-data-readablestream.any.sharedworker.html]
+ [send-data-readablestream]
+ expected: FAIL
+
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index 6363abb2abc..d89b2751d7f 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -11927,16 +11927,6 @@
[
{}
]
- ],
- "webgl/OWNERS": [
- [
- {}
- ]
- ],
- "webgl/common.js": [
- [
- {}
- ]
]
},
"testharness": {
@@ -20684,6 +20674,16 @@
{}
]
],
+ "mozilla/task_queue_throttling.any.js": [
+ [
+ "/_mozilla/mozilla/task_queue_throttling.any.html",
+ {}
+ ],
+ [
+ "/_mozilla/mozilla/task_queue_throttling.any.worker.html",
+ {}
+ ]
+ ],
"mozilla/textcontent.html": [
[
"/_mozilla/mozilla/textcontent.html",
@@ -20881,42 +20881,6 @@
"/_mozilla/mozilla/worklets/test_worklet.html",
{}
]
- ],
- "webgl/bufferSubData.html": [
- [
- "/_mozilla/webgl/bufferSubData.html",
- {}
- ]
- ],
- "webgl/compressedTexImage2D.html": [
- [
- "/_mozilla/webgl/compressedTexImage2D.html",
- {}
- ]
- ],
- "webgl/compressedTexSubImage2D.html": [
- [
- "/_mozilla/webgl/compressedTexSubImage2D.html",
- {}
- ]
- ],
- "webgl/texImage2D.html": [
- [
- "/_mozilla/webgl/texImage2D.html",
- {}
- ]
- ],
- "webgl/texSubImage2D.html": [
- [
- "/_mozilla/webgl/texSubImage2D.html",
- {}
- ]
- ],
- "webgl/uniformMatrixNfv.html": [
- [
- "/_mozilla/webgl/uniformMatrixNfv.html",
- {}
- ]
]
}
},
@@ -27074,7 +27038,7 @@
"testharness"
],
"mozilla/interfaces.html": [
- "179f9c6c6928b3a4194c82f85cd1cce81123a5bc",
+ "d48b52d06eaa76167fb8bc2c23f2410ec74ba247",
"testharness"
],
"mozilla/interfaces.js": [
@@ -32713,6 +32677,10 @@
"321132b7e7e21d542ce86e4322db04aba3e9d11e",
"support"
],
+ "mozilla/task_queue_throttling.any.js": [
+ "bbf464f384d55a44db6948d6cc7ab5f54509b800",
+ "testharness"
+ ],
"mozilla/test.jpg": [
"110b3d6b666d35a117ca8c8ada32bf1002943044",
"support"
@@ -33008,38 +32976,6 @@
"mozilla/worklets/throw_exception.js": [
"6ca4f80fc2728c00848bb4474b62fa3596ed2f18",
"support"
- ],
- "webgl/OWNERS": [
- "7507064ad72f41047fe1db39c3cb95da7ffea252",
- "support"
- ],
- "webgl/bufferSubData.html": [
- "a97df9062d6ea964e500059e155b29604edc21b6",
- "testharness"
- ],
- "webgl/common.js": [
- "416c21ce9330d3f73576b6b5aa01dab06c5798ee",
- "support"
- ],
- "webgl/compressedTexImage2D.html": [
- "b0a031add0be018f995e4463114d333a0d9eb85a",
- "testharness"
- ],
- "webgl/compressedTexSubImage2D.html": [
- "539f9e17f8a811c5acb4f07cf6cbd17015726632",
- "testharness"
- ],
- "webgl/texImage2D.html": [
- "2f769160dfdeaa3b0a73380e5540b30dfc971489",
- "testharness"
- ],
- "webgl/texSubImage2D.html": [
- "294b30c7607edc38aed19a31e44c5237eee8b970",
- "testharness"
- ],
- "webgl/uniformMatrixNfv.html": [
- "f75cbcb99724219224c63d0dc595b1c001298500",
- "testharness"
]
},
"url_base": "/_mozilla/",
diff --git a/tests/wpt/mozilla/tests/mozilla/interfaces.html b/tests/wpt/mozilla/tests/mozilla/interfaces.html
index 179f9c6c692..d48b52d06ea 100644
--- a/tests/wpt/mozilla/tests/mozilla/interfaces.html
+++ b/tests/wpt/mozilla/tests/mozilla/interfaces.html
@@ -26,6 +26,7 @@ test_interfaces([
"CanvasGradient",
"CanvasRenderingContext2D",
"CanvasPattern",
+ "ChannelMergerNode",
"CharacterData",
"CloseEvent",
"CSS",
diff --git a/tests/wpt/mozilla/tests/mozilla/task_queue_throttling.any.js b/tests/wpt/mozilla/tests/mozilla/task_queue_throttling.any.js
new file mode 100644
index 00000000000..bbf464f384d
--- /dev/null
+++ b/tests/wpt/mozilla/tests/mozilla/task_queue_throttling.any.js
@@ -0,0 +1,45 @@
+// META: title=Throttling the performance timeline task queue.
+
+async_test(function(t) {
+ var counter = 0;
+
+ function perf_observer(list, observer) {
+ // The timeline event should be throttled,
+ // while the event-loop is busy,
+ // and only handled after at least 6 other events,
+ // across several iterations of the event-loop.
+ assert_true(counter > 6)
+ }
+ var observer2 = new PerformanceObserver(t.step_func_done(perf_observer));
+ observer2.observe({entryTypes: ["mark"]});
+
+ for (var i = 0; i < 4; i++) {
+ var reader = new FileReader();
+ reader.onload = function() {
+ counter++;
+ };
+ var blob = new Blob();
+ reader.readAsText(blob);
+ }
+
+ var reader = new FileReader();
+ reader.onload = function() {
+ counter++;
+ // In a subsequent iteration of the event-loop,
+ // start reading another 5 blobs
+ for (var i = 0; i < 5; i++) {
+ var reader = new FileReader();
+ reader.onload = function() {
+ counter++;
+ };
+ var blob = new Blob();
+ reader.readAsText(blob);
+ }
+ };
+ var blob = new Blob();
+ reader.readAsText(blob);
+ // We've started reading 5 blobs in this iteration of the event-loop.
+
+ // Do this in the current iteration of the event-loop.
+ performance.mark("start");
+});
diff --git a/tests/wpt/mozilla/tests/webgl/OWNERS b/tests/wpt/mozilla/tests/webgl/OWNERS
deleted file mode 100644
index 7507064ad72..00000000000
--- a/tests/wpt/mozilla/tests/webgl/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-@emilio
diff --git a/tests/wpt/mozilla/tests/webgl/bufferSubData.html b/tests/wpt/mozilla/tests/webgl/bufferSubData.html
deleted file mode 100644
index a97df9062d6..00000000000
--- a/tests/wpt/mozilla/tests/webgl/bufferSubData.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<title>bufferSubData</title>
-<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
-<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.5>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
-
-<div id=log></div>
-<script>
-test(function() {
- var gl = getGl();
- assert_equals(gl.getError(), WebGLRenderingContext.NO_ERROR);
-
- var b = gl.createBuffer();
- gl.bindBuffer(gl.ARRAY_BUFFER, b);
-
- var a = new Float32Array(1);
- gl.bufferData(gl.ARRAY_BUFFER, a, gl.STATIC_DRAW);
-
- var nan = 0 / 0;
- gl.bufferSubData(gl.ARRAY_BUFFER, nan, a);
-
- assert_equals(gl.getError(), WebGLRenderingContext.NO_ERROR);
-});
-</script>
diff --git a/tests/wpt/mozilla/tests/webgl/common.js b/tests/wpt/mozilla/tests/webgl/common.js
deleted file mode 100644
index 416c21ce933..00000000000
--- a/tests/wpt/mozilla/tests/webgl/common.js
+++ /dev/null
@@ -1,13 +0,0 @@
-function getGl() {
- var c = document.createElement("canvas");
- var gl = c.getContext("experimental-webgl");
- assert_true(!!gl, "Should be able to get a context.");
- return gl;
-}
-
-function shouldGenerateGLError(cx, glError, fn) {
- test(function() {
- fn();
- assert_equals(cx.getError(), glError);
- }, "Calling " + fn + " should generate a " + glError + " error.");
-}
diff --git a/tests/wpt/mozilla/tests/webgl/compressedTexImage2D.html b/tests/wpt/mozilla/tests/webgl/compressedTexImage2D.html
deleted file mode 100644
index b0a031add0b..00000000000
--- a/tests/wpt/mozilla/tests/webgl/compressedTexImage2D.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<title>compressedTexImage2D</title>
-<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
-<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.8>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
-
-<div id=log></div>
-<script>
-test(function() {
- var COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
- var gl = getGl();
-
- var tex = gl.createTexture();
- gl.bindTexture(gl.TEXTURE_2D, tex);
-
- shouldGenerateGLError(gl, gl.INVALID_ENUM, function() {
- gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8));
- });
- shouldGenerateGLError(gl, gl.INVALID_ENUM, function() {
- gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8), null);
- });
- test(function() {
- assert_throws(new TypeError(), function() {
- gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0);
- });
- }, "Should throw a TypeError when passing too few arguments.");
-});
-</script>
diff --git a/tests/wpt/mozilla/tests/webgl/compressedTexSubImage2D.html b/tests/wpt/mozilla/tests/webgl/compressedTexSubImage2D.html
deleted file mode 100644
index 539f9e17f8a..00000000000
--- a/tests/wpt/mozilla/tests/webgl/compressedTexSubImage2D.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<title>compressedTexSubImage2D</title>
-<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
-<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.8>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
-
-<div id=log></div>
-<script>
-test(function() {
- var COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
- var gl = getGl();
-
- var tex = gl.createTexture();
- gl.bindTexture(gl.TEXTURE_2D, tex);
-
- shouldGenerateGLError(gl, gl.INVALID_ENUM, function() {
- gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 10, 10, COMPRESSED_RGB_S3TC_DXT1_EXT, new Uint8Array(8));
- });
- shouldGenerateGLError(gl, gl.INVALID_ENUM, function() {
- gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 10, 10, COMPRESSED_RGB_S3TC_DXT1_EXT, new Uint8Array(8), null);
- });
- test(function() {
- assert_throws(new TypeError(), function() {
- gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 10, 10, COMPRESSED_RGB_S3TC_DXT1_EXT);
- });
- }, "Should throw a TypeError when passing too few arguments.");
-});
-</script>
diff --git a/tests/wpt/mozilla/tests/webgl/texImage2D.html b/tests/wpt/mozilla/tests/webgl/texImage2D.html
deleted file mode 100644
index 2f769160dfd..00000000000
--- a/tests/wpt/mozilla/tests/webgl/texImage2D.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>texImage2D</title>
-<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
-<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.8>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
-
-<div id=log></div>
-<script>
-test(function() {
- var gl = getGl();
- assert_throws(new TypeError(), function() {
- gl.texImage2D(0, 0, 0, 0, 0, window);
- });
- assert_throws(new TypeError(), function() {
- gl.texImage2D(0, 0, 0, 0, 0, { get width() { throw 7 }, get height() { throw 7 }, data: new Uint8ClampedArray(10) });
- });
-});
-</script>
diff --git a/tests/wpt/mozilla/tests/webgl/texSubImage2D.html b/tests/wpt/mozilla/tests/webgl/texSubImage2D.html
deleted file mode 100644
index 294b30c7607..00000000000
--- a/tests/wpt/mozilla/tests/webgl/texSubImage2D.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>texSubImage2D</title>
-<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
-<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.8>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
-
-<div id=log></div>
-<script>
-test(function() {
- var gl = getGl();
- assert_throws(new TypeError(), function() {
- gl.texSubImage2D(0, 0, 0, 0, 0, 0, window);
- });
- assert_throws(new TypeError(), function() {
- gl.texSubImage2D(0, 0, 0, 0, 0, 0, { get width() { throw 7 }, get height() { throw 7 }, data: new Uint8ClampedArray(10) });
- });
-});
-</script>
diff --git a/tests/wpt/mozilla/tests/webgl/uniformMatrixNfv.html b/tests/wpt/mozilla/tests/webgl/uniformMatrixNfv.html
deleted file mode 100644
index f75cbcb9972..00000000000
--- a/tests/wpt/mozilla/tests/webgl/uniformMatrixNfv.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!doctype html>
-<title>uniformMatrix*fv</title>
-<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
-<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#WebGLRenderingContext>
-<link rel=help href=http://dev.w3.org/2006/webapi/WebIDL/#es-boolean>
-<link rel=help href=http://es5.github.com/#x9.2>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=common.js></script>
-
-<div id=log></div>
-<script id="vshader" type="x-shader/x-vertex">
-uniform mat2 m2;
-uniform mat3 m3;
-uniform mat4 m4;
-</script>
-<script>
-var floatArray = function(n) {
- var a = [];
- for (var i = 0; i < n; ++i) {
- a.push(1);
- }
- return a;
-};
-[2, 3, 4].forEach(function(n) {
- test(function() {
- var gl = getGl();
- var f = "uniformMatrix" + n + "fv";
- var loc = gl.getUniformLocation(gl.createProgram(), "m" + n);
- gl[f](loc, { valueOf: function() { throw "Error"; } }, floatArray(n));
- }, "Should not throw for " + n);
-});
-</script>
diff --git a/tests/wpt/web-platform-tests/.taskcluster.yml b/tests/wpt/web-platform-tests/.taskcluster.yml
index 70bde33c354..b6d21a17ab5 100644
--- a/tests/wpt/web-platform-tests/.taskcluster.yml
+++ b/tests/wpt/web-platform-tests/.taskcluster.yml
@@ -4,71 +4,76 @@ policy:
tasks:
$if: tasks_for == "github-push"
then:
- $if: event.ref == "refs/heads/master"
- then:
- $flattenDeep:
- $map: [{name: firefox, channel: nightly}, {name: chrome, channel: dev}]
- each(browser):
- $map:
- - [testharness, 1, 15]
- - [testharness, 2, 15]
- - [testharness, 3, 15]
- - [testharness, 4, 15]
- - [testharness, 5, 15]
- - [testharness, 6, 15]
- - [testharness, 7, 15]
- - [testharness, 8, 15]
- - [testharness, 9, 15]
- - [testharness, 10, 15]
- - [testharness, 11, 15]
- - [testharness, 12, 15]
- - [testharness, 13, 15]
- - [testharness, 14, 15]
- - [testharness, 15, 15]
- - [reftest, 1, 10]
- - [reftest, 2, 10]
- - [reftest, 3, 10]
- - [reftest, 4, 10]
- - [reftest, 5, 10]
- - [reftest, 6, 10]
- - [reftest, 7, 10]
- - [reftest, 8, 10]
- - [reftest, 9, 10]
- - [reftest, 10, 10]
- - [wdspec, 1, 1]
- each(chunk):
- taskId: {$eval: 'as_slugid(browser.name + browser.channel + chunk[0] + str(chunk[1]))'}
- taskGroupId: {$eval: 'as_slugid("task group")'}
- created: {$fromNow: ''}
- deadline: {$fromNow: '24 hours'}
- provisionerId: aws-provisioner-v1
- # Contributors interested in configurating TaskCluster to run
- # against their fork of WPT should change the `workerType` to
- # "github-worker".
- workerType: wpt-docker-worker
- metadata:
- name: wpt-${browser.name}-${browser.channel}-${chunk[0]}-${chunk[1]}
- description: >-
- A subset of WPT's "${chunk[0]}" tests (chunk number ${chunk[1]}
- of ${chunk[2]}), run in the ${browser.channel} release of
- ${browser.name}.
- owner: ${event.pusher.email}
- source: ${event.repository.url}
- payload:
- image: gsnedders/web-platform-tests:0.13
- maxRunTime: 7200
- artifacts:
- public/results:
- path: /home/test/artifacts
- type: directory
- command:
- - /bin/bash
- - --login
- - -c
- - "~/start.sh ${event.repository.url} ${event.ref[len('refs/heads/'):]} ${event.after} ${browser.name}-${browser.channel} &&
- cd ~/web-platform-tests &&
- ./tools/ci/ci_taskcluster.sh ${browser.name} ${chunk[0]} ${chunk[1]} ${chunk[2]}"
- else: []
+ $flattenDeep:
+ $map:
+ $flatten:
+ $match: {
+ event.ref == "refs/heads/master": [{name: firefox, channel: nightly}, {name: chrome, channel: dev}],
+ event.ref == "refs/heads/epochs/daily": [{name: firefox, channel: beta}, {name: chrome, channel: beta}],
+ event.ref == "refs/heads/epochs/weekly": [{name: firefox, channel: stable}, {name: chrome, channel: stable}]
+ }
+ each(browser):
+ $map:
+ - [testharness, 1, 15]
+ - [testharness, 2, 15]
+ - [testharness, 3, 15]
+ - [testharness, 4, 15]
+ - [testharness, 5, 15]
+ - [testharness, 6, 15]
+ - [testharness, 7, 15]
+ - [testharness, 8, 15]
+ - [testharness, 9, 15]
+ - [testharness, 10, 15]
+ - [testharness, 11, 15]
+ - [testharness, 12, 15]
+ - [testharness, 13, 15]
+ - [testharness, 14, 15]
+ - [testharness, 15, 15]
+ - [reftest, 1, 10]
+ - [reftest, 2, 10]
+ - [reftest, 3, 10]
+ - [reftest, 4, 10]
+ - [reftest, 5, 10]
+ - [reftest, 6, 10]
+ - [reftest, 7, 10]
+ - [reftest, 8, 10]
+ - [reftest, 9, 10]
+ - [reftest, 10, 10]
+ - [wdspec, 1, 1]
+ each(chunk):
+ taskId: {$eval: 'as_slugid(browser.name + browser.channel + chunk[0] + str(chunk[1]))'}
+ taskGroupId: {$eval: 'as_slugid("task group")'}
+ created: {$fromNow: ''}
+ deadline: {$fromNow: '24 hours'}
+ provisionerId: aws-provisioner-v1
+ workerType:
+ $if: event.repository.full_name == 'web-platform-tests/wpt'
+ then:
+ wpt-docker-worker
+ else:
+ github-worker
+ metadata:
+ name: wpt-${browser.name}-${browser.channel}-${chunk[0]}-${chunk[1]}
+ description: >-
+ A subset of WPT's "${chunk[0]}" tests (chunk number ${chunk[1]}
+ of ${chunk[2]}), run in the ${browser.channel} release of
+ ${browser.name}.
+ owner: ${event.pusher.email}
+ source: ${event.repository.url}
+ payload:
+ image: harjgam/web-platform-tests:0.14
+ maxRunTime: 7200
+ artifacts:
+ public/results:
+ path: /home/test/artifacts
+ type: directory
+ command:
+ - /bin/bash
+ - --login
+ - -c
+ - "~/start.sh ${event.repository.url} ${event.ref[len('refs/heads/'):]} ${event.after} ${browser.name} ${browser.channel} &&
+ cd ~/web-platform-tests &&
+ ./tools/ci/ci_taskcluster.sh ${browser.name} ${browser.channel} ${chunk[0]} ${chunk[1]} ${chunk[2]}"
# > NOTE: A well-designed template should produce `tasks: []` for any
# > unrecognized `task_for` values; this allows later expansion of this
# > service to handle more events.
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.basic.png b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.basic.png
index 1e313371d82..70d7b046cb2 100644
--- a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.basic.png
+++ b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.basic.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.png b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.png
index 1e313371d82..70d7b046cb2 100644
--- a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.png
+++ b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.png b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.png
index 1e313371d82..70d7b046cb2 100644
--- a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.png
+++ b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.png b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.png
index b04566f5c66..fb3b5b830d3 100644
--- a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.png
+++ b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html
new file mode 100644
index 00000000000..484af7c2399
--- /dev/null
+++ b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.text.measure.actualBoundingBox</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<style>
+@font-face {
+ font-family: CanvasTest;
+ src: url("/fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1>2d.text.measure.actualBoundingBox</h1>
+<p class="desc">Testing actualBoundingBox</p>
+
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("Testing actualBoundingBox");
+_addTest(function(canvas, ctx) {
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ ctx.baseline = 'alphabetic'
+ // Some platforms may return '-0'.
+ _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxLeft)", "0");
+ // Different platforms may render text slightly different.
+ _assert(ctx.measureText('A').actualBoundingBoxRight >= 50, "ctx.measureText('A').actualBoundingBoxRight >= 50");
+ _assert(ctx.measureText('A').actualBoundingBoxAscent >= 35, "ctx.measureText('A').actualBoundingBoxAscent >= 35");
+ _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxDescent), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxDescent)", "0");
+
+ _assertSame(Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft)", "0");
+ _assert(ctx.measureText('ABCD').actualBoundingBoxRight >= 200, "ctx.measureText('ABCD').actualBoundingBoxRight >= 200");
+ _assert(ctx.measureText('ABCD').actualBoundingBoxAscent >= 85, "ctx.measureText('ABCD').actualBoundingBoxAscent >= 85");
+ _assert(ctx.measureText('ABCD').actualBoundingBoxDescent >= 37, "ctx.measureText('ABCD').actualBoundingBoxDescent >= 37");
+}), 500);
+
+
+});
+</script>
+
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html
new file mode 100644
index 00000000000..ed8c04d0ab7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.advances.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.text.measure.advances</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<style>
+@font-face {
+ font-family: CanvasTest;
+ src: url("/fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1>2d.text.measure.advances</h1>
+<p class="desc">Testing width advances</p>
+
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("Testing width advances");
+_addTest(function(canvas, ctx) {
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ // Some platforms may return '-0'.
+ _assertSame(Math.abs(ctx.measureText('Hello').advances[0]), 0, "Math.abs(ctx.measureText('Hello').advances[\""+(0)+"\"])", "0");
+ // Different platforms may render text slightly different.
+ _assert(ctx.measureText('Hello').advances[1] >= 36, "ctx.measureText('Hello').advances[\""+(1)+"\"] >= 36");
+ _assert(ctx.measureText('Hello').advances[2] >= 58, "ctx.measureText('Hello').advances[\""+(2)+"\"] >= 58");
+ _assert(ctx.measureText('Hello').advances[3] >= 70, "ctx.measureText('Hello').advances[\""+(3)+"\"] >= 70");
+ _assert(ctx.measureText('Hello').advances[4] >= 80, "ctx.measureText('Hello').advances[\""+(4)+"\"] >= 80");
+
+ var tm = ctx.measureText('Hello');
+ _assertSame(ctx.measureText('Hello').advances[0], tm.advances[0], "ctx.measureText('Hello').advances[\""+(0)+"\"]", "tm.advances[\""+(0)+"\"]");
+ _assertSame(ctx.measureText('Hello').advances[1], tm.advances[1], "ctx.measureText('Hello').advances[\""+(1)+"\"]", "tm.advances[\""+(1)+"\"]");
+ _assertSame(ctx.measureText('Hello').advances[2], tm.advances[2], "ctx.measureText('Hello').advances[\""+(2)+"\"]", "tm.advances[\""+(2)+"\"]");
+ _assertSame(ctx.measureText('Hello').advances[3], tm.advances[3], "ctx.measureText('Hello').advances[\""+(3)+"\"]", "tm.advances[\""+(3)+"\"]");
+ _assertSame(ctx.measureText('Hello').advances[4], tm.advances[4], "ctx.measureText('Hello').advances[\""+(4)+"\"]", "tm.advances[\""+(4)+"\"]");
+}), 500);
+
+
+});
+</script>
+
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html
new file mode 100644
index 00000000000..2472889a607
--- /dev/null
+++ b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.baselines.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.text.measure.baselines</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<style>
+@font-face {
+ font-family: CanvasTest;
+ src: url("/fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1>2d.text.measure.baselines</h1>
+<p class="desc">Testing baselines</p>
+
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("Testing baselines");
+_addTest(function(canvas, ctx) {
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0");
+ _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39");
+ _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68");
+
+ _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0");
+ _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39");
+ _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68");
+}), 500);
+
+
+});
+</script>
+
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html
new file mode 100644
index 00000000000..36087e7b035
--- /dev/null
+++ b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.emHeights.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.text.measure.emHeights</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<style>
+@font-face {
+ font-family: CanvasTest;
+ src: url("/fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1>2d.text.measure.emHeights</h1>
+<p class="desc">Testing emHeights</p>
+
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("Testing emHeights");
+_addTest(function(canvas, ctx) {
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ _assertSame(ctx.measureText('A').emHeightAscent, 37.5, "ctx.measureText('A').emHeightAscent", "37.5");
+ _assertSame(ctx.measureText('A').emHeightDescent, 12.5, "ctx.measureText('A').emHeightDescent", "12.5");
+ _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 50, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "50");
+
+ _assertSame(ctx.measureText('ABCD').emHeightAscent, 37.5, "ctx.measureText('ABCD').emHeightAscent", "37.5");
+ _assertSame(ctx.measureText('ABCD').emHeightDescent, 12.5, "ctx.measureText('ABCD').emHeightDescent", "12.5");
+ _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 50, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "50");
+}), 500);
+
+
+});
+</script>
+
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html
new file mode 100644
index 00000000000..1c9bfc492c1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
+<title>Canvas test: 2d.text.measure.fontBoundingBox</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/canvas-tests.js"></script>
+<link rel="stylesheet" href="/common/canvas-tests.css">
+<style>
+@font-face {
+ font-family: CanvasTest;
+ src: url("/fonts/CanvasTest.ttf");
+}
+</style>
+<body class="show_output">
+
+<h1>2d.text.measure.fontBoundingBox</h1>
+<p class="desc">Testing fontBoundingBox</p>
+
+
+<span style="font-family: CanvasTest; position: absolute; visibility: hidden">A</span>
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("Testing fontBoundingBox");
+_addTest(function(canvas, ctx) {
+
+deferTest();
+step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 85, "ctx.measureText('A').fontBoundingBoxAscent", "85");
+ _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 39, "ctx.measureText('A').fontBoundingBoxDescent", "39");
+
+ _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 85, "ctx.measureText('ABCD').fontBoundingBoxAscent", "85");
+ _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 39, "ctx.measureText('ABCD').fontBoundingBoxDescent", "39");
+}), 500);
+
+
+});
+</script>
+
diff --git a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.baseline.alphabetic.html b/tests/wpt/web-platform-tests/2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html
index f070d0d5b7f..f070d0d5b7f 100644
--- a/tests/wpt/web-platform-tests/2dcontext/drawing-text-to-the-canvas/2d.text.draw.baseline.alphabetic.html
+++ b/tests/wpt/web-platform-tests/2dcontext/text-styles/2d.text.draw.baseline.alphabetic.html
diff --git a/tests/wpt/web-platform-tests/2dcontext/tools/name2dir.yaml b/tests/wpt/web-platform-tests/2dcontext/tools/name2dir.yaml
index 479c171810c..40a04057881 100644
--- a/tests/wpt/web-platform-tests/2dcontext/tools/name2dir.yaml
+++ b/tests/wpt/web-platform-tests/2dcontext/tools/name2dir.yaml
@@ -9,7 +9,6 @@
2d.fillRect: "drawing-rectangles-to-the-canvas"
2d.strokeRect: "drawing-rectangles-to-the-canvas"
2d.text.draw: "drawing-text-to-the-canvas"
-2d.text.draw.baseline.alphabetic: "drawing-text-to-the-canvas"
2d.text.draw.space.basic: "drawing-text-to-the-canvas"
2d.text.draw.space.collapse: "drawing-text-to-the-canvas"
2d.text.measure: "drawing-text-to-the-canvas"
diff --git a/tests/wpt/web-platform-tests/2dcontext/tools/tests2dtext.yaml b/tests/wpt/web-platform-tests/2dcontext/tools/tests2dtext.yaml
index 336e3cf38b4..f89d6d48a4f 100644
--- a/tests/wpt/web-platform-tests/2dcontext/tools/tests2dtext.yaml
+++ b/tests/wpt/web-platform-tests/2dcontext/tools/tests2dtext.yaml
@@ -1018,4 +1018,119 @@
@assert ctx.measureText('AB ').width === 100; @moz-todo
}), 500);
+- name: 2d.text.measure.advances
+ desc: Testing width advances
+ testing:
+ - 2d.text.measure.advances
+ fonts:
+ - CanvasTest
+ code: |
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ // Some platforms may return '-0'.
+ @assert Math.abs(ctx.measureText('Hello').advances[0]) === 0;
+ // Different platforms may render text slightly different.
+ @assert ctx.measureText('Hello').advances[1] >= 36;
+ @assert ctx.measureText('Hello').advances[2] >= 58;
+ @assert ctx.measureText('Hello').advances[3] >= 70;
+ @assert ctx.measureText('Hello').advances[4] >= 80;
+
+ var tm = ctx.measureText('Hello');
+ @assert ctx.measureText('Hello').advances[0] === tm.advances[0];
+ @assert ctx.measureText('Hello').advances[1] === tm.advances[1];
+ @assert ctx.measureText('Hello').advances[2] === tm.advances[2];
+ @assert ctx.measureText('Hello').advances[3] === tm.advances[3];
+ @assert ctx.measureText('Hello').advances[4] === tm.advances[4];
+ }), 500);
+
+- name: 2d.text.measure.actualBoundingBox
+ desc: Testing actualBoundingBox
+ testing:
+ - 2d.text.measure.actualBoundingBox
+ fonts:
+ - CanvasTest
+ code: |
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ ctx.baseline = 'alphabetic'
+ // Some platforms may return '-0'.
+ @assert Math.abs(ctx.measureText('A').actualBoundingBoxLeft) === 0;
+ // Different platforms may render text slightly different.
+ @assert ctx.measureText('A').actualBoundingBoxRight >= 50;
+ @assert ctx.measureText('A').actualBoundingBoxAscent >= 35;
+ @assert Math.abs(ctx.measureText('A').actualBoundingBoxDescent) === 0;
+
+ @assert Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft) === 0;
+ @assert ctx.measureText('ABCD').actualBoundingBoxRight >= 200;
+ @assert ctx.measureText('ABCD').actualBoundingBoxAscent >= 85;
+ @assert ctx.measureText('ABCD').actualBoundingBoxDescent >= 37;
+ }), 500);
+
+- name: 2d.text.measure.fontBoundingBox
+ desc: Testing fontBoundingBox
+ testing:
+ - 2d.text.measure.fontBoundingBox
+ fonts:
+ - CanvasTest
+ code: |
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ @assert ctx.measureText('A').fontBoundingBoxAscent === 85;
+ @assert ctx.measureText('A').fontBoundingBoxDescent === 39;
+
+ @assert ctx.measureText('ABCD').fontBoundingBoxAscent === 85;
+ @assert ctx.measureText('ABCD').fontBoundingBoxDescent === 39;
+ }), 500);
+
+- name: 2d.text.measure.emHeights
+ desc: Testing emHeights
+ testing:
+ - 2d.text.measure.emHeights
+ fonts:
+ - CanvasTest
+ code: |
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ @assert ctx.measureText('A').emHeightAscent === 37.5;
+ @assert ctx.measureText('A').emHeightDescent === 12.5;
+ @assert ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent === 50;
+
+ @assert ctx.measureText('ABCD').emHeightAscent === 37.5;
+ @assert ctx.measureText('ABCD').emHeightDescent === 12.5;
+ @assert ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent === 50;
+ }), 500);
+
+- name: 2d.text.measure.baselines
+ desc: Testing baselines
+ testing:
+ - 2d.text.measure.baselines
+ fonts:
+ - CanvasTest
+ code: |
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.font = '50px CanvasTest';
+ ctx.direction = 'ltr';
+ ctx.align = 'left'
+ @assert Math.abs(ctx.measureText('A').getBaselines().alphabetic) === 0;
+ @assert ctx.measureText('A').getBaselines().ideographic === -39;
+ @assert ctx.measureText('A').getBaselines().hanging === 68;
+
+ @assert Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic) === 0;
+ @assert ctx.measureText('ABCD').getBaselines().ideographic === -39;
+ @assert ctx.measureText('ABCD').getBaselines().hanging === 68;
+ }), 500);
+
# TODO: shadows, alpha, composite, clip
diff --git a/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js b/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js
index 33c8124ffa4..f2cffd0b8cf 100644
--- a/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js
+++ b/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js
@@ -73,12 +73,18 @@ backgroundFetchTest(async (test, backgroundFetch) => {
assert_equals(registration.uploadTotal, 0);
assert_equals(registration.uploaded, 0);
assert_equals(registration.downloadTotal, 0);
+ assert_equals(registration.state, "pending");
+ assert_equals(registration.failureReason, "");
// Skip `downloaded`, as the transfer may have started already.
- const {type, results} = await getMessageFromServiceWorker();
+ const {type, eventRegistration, results} = await getMessageFromServiceWorker();
assert_equals('backgroundfetchsuccess', type);
assert_equals(results.length, 1);
+ assert_equals(eventRegistration.id, registration.id);
+ assert_equals(eventRegistration.state, "success");
+ assert_equals(eventRegistration.failureReason, "");
+
assert_true(results[0].url.includes('resources/feature-name.txt'));
assert_equals(results[0].status, 200);
assert_equals(results[0].text, 'Background Fetch');
@@ -96,3 +102,23 @@ backgroundFetchTest(async (test, backgroundFetch) => {
'This fetch should have thrown a quota exceeded error');
}, 'Background Fetch that exceeds the quota throws a QuotaExceededError');
+
+backgroundFetchTest(async (test, backgroundFetch) => {
+ const registration = await backgroundFetch.fetch(
+ 'my-id', ['resources/feature-name.txt', 'resources/feature-name.txt']);
+
+ const {type, eventRegistration, results} = await getMessageFromServiceWorker();
+ assert_equals('backgroundfetchsuccess', type);
+ assert_equals(results.length, 2);
+
+ assert_equals(eventRegistration.id, registration.id);
+ assert_equals(eventRegistration.state, "success");
+ assert_equals(eventRegistration.failureReason, "");
+
+ for (const result of results) {
+ assert_true(result.url.includes('resources/feature-name.txt'));
+ assert_equals(result.status, 200);
+ assert_equals(result.text, 'Background Fetch');
+ }
+
+}, 'Fetches can have requests with duplicate URLs');
diff --git a/tests/wpt/web-platform-tests/background-fetch/get.https.window.js b/tests/wpt/web-platform-tests/background-fetch/get.https.window.js
index a0b2acd4a69..5f249663fda 100644
--- a/tests/wpt/web-platform-tests/background-fetch/get.https.window.js
+++ b/tests/wpt/web-platform-tests/background-fetch/get.https.window.js
@@ -41,6 +41,8 @@ backgroundFetchTest(async (test, backgroundFetch) => {
assert_equals(registration.uploadTotal, 0);
assert_equals(registration.uploaded, 0);
assert_equals(registration.downloadTotal, 1234);
+ assert_equals(registration.state, "pending");
+ assert_equals(registration.failureReason, "");
// Skip `downloaded`, as the transfer may have started already.
const secondRegistration = await backgroundFetch.get(registrationId);
diff --git a/tests/wpt/web-platform-tests/background-fetch/service_workers/sw-helpers.js b/tests/wpt/web-platform-tests/background-fetch/service_workers/sw-helpers.js
index ff51f22a2b9..e4c772135db 100644
--- a/tests/wpt/web-platform-tests/background-fetch/service_workers/sw-helpers.js
+++ b/tests/wpt/web-platform-tests/background-fetch/service_workers/sw-helpers.js
@@ -5,6 +5,25 @@ function sendMessageToDocument(msg) {
source.postMessage(msg);
}
+// This is needed to create a local javascript object identical to the
+// one returned by a BackgroundFetchEvent, so that it can be serialized
+// and transmitted from the service worker context to the document.
+function cloneRegistration(registration) {
+ function deepCopy(src) {
+ if (typeof src !== 'object' || src === null)
+ return src;
+ var dst = Array.isArray(src) ? [] : {};
+ for (var property in src) {
+ if (typeof src[property] === 'function')
+ continue;
+ dst[property] = deepCopy(src[property]);
+ }
+ return dst;
+ }
+
+ return deepCopy(registration);
+}
+
// Notify the document that the SW is registered and ready.
self.addEventListener('message', event => {
source = event.source;
diff --git a/tests/wpt/web-platform-tests/background-fetch/service_workers/sw.js b/tests/wpt/web-platform-tests/background-fetch/service_workers/sw.js
index 10e17f5874f..ab2445d18b0 100644
--- a/tests/wpt/web-platform-tests/background-fetch/service_workers/sw.js
+++ b/tests/wpt/web-platform-tests/background-fetch/service_workers/sw.js
@@ -1,20 +1,24 @@
importScripts('sw-helpers.js');
-async function getFetchResult(settledFetch) {
- if (!settledFetch.response)
+async function getFetchResult(record) {
+ response = await record.responseReady;
+ if (!response)
return Promise.resolve(null);
return {
- url: settledFetch.response.url,
- status: settledFetch.response.status,
- text: await settledFetch.response.text(),
+ url: response.url,
+ status: response.status,
+ text: await response.text(),
};
}
self.addEventListener('backgroundfetchsuccess', event => {
event.waitUntil(
- event.fetches.values()
- .then(fetches => Promise.all(fetches.map(fetch => getFetchResult(fetch))))
- .then(results => sendMessageToDocument({ type: event.type, results })));
+ event.registration.matchAll()
+ .then(records => Promise.all(records.map(record => getFetchResult(record))))
+ .then(results => {
+ const registrationCopy = cloneRegistration(event.registration);
+ sendMessageToDocument({ type: event.type, eventRegistration: registrationCopy, results })
+ }));
});
diff --git a/tests/wpt/web-platform-tests/beacon/beacon-readablestream.window.js b/tests/wpt/web-platform-tests/beacon/beacon-readablestream.window.js
new file mode 100644
index 00000000000..fc7f81f884b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/beacon/beacon-readablestream.window.js
@@ -0,0 +1,3 @@
+test(() => {
+ assert_throws(new TypeError(), () => navigator.sendBeacon("...", new ReadableStream()));
+}, "sendBeacon() with a stream does not work due to the keepalive flag being set");
diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/slow.py b/tests/wpt/web-platform-tests/common/slow.py
index f3b1c7e2ea6..f3b1c7e2ea6 100644
--- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/slow.py
+++ b/tests/wpt/web-platform-tests/common/slow.py
diff --git a/tests/wpt/web-platform-tests/compat/css-style-declaration-alias-enumeration.html b/tests/wpt/web-platform-tests/compat/css-style-declaration-alias-enumeration.html
index 4608af9d5fc..cdd9cc8eaef 100644
--- a/tests/wpt/web-platform-tests/compat/css-style-declaration-alias-enumeration.html
+++ b/tests/wpt/web-platform-tests/compat/css-style-declaration-alias-enumeration.html
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<title>Aliases enumerated on CSSStyleDeclaration</title>
-<link rel="author" title="Anders Hartvoll Ruud" href="andruud@chromium.org">
<link rel="help" href="https://compat.spec.whatwg.org/#css-simple-aliases">
<meta name="assert" content="This test verifies that aliases are enumerated on CSSStyleDeclaration" />
diff --git a/tests/wpt/web-platform-tests/compat/webkit-appearance.html b/tests/wpt/web-platform-tests/compat/webkit-appearance.html
new file mode 100644
index 00000000000..210944522a9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/compat/webkit-appearance.html
@@ -0,0 +1,57 @@
+<!doctype html>
+<title>-webkit-appearance</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<button id=button>Test</button>
+<script>
+ const button = document.getElementById('button');
+ // values from https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance
+ // intersection of Firefox and Chrome.
+ const values = ["none",
+ "button",
+ "button-bevel",
+ "caret",
+ "checkbox",
+ "listbox",
+ "listitem",
+ "menulist",
+ "menulist-button",
+ "menulist-text",
+ "menulist-textfield",
+ "radio",
+ "searchfield",
+ "textfield",
+ ];
+ for (const value of values) {
+ test(() => {
+ button.removeAttribute('style');
+ button.style.setProperty('-webkit-appearance', value);
+ assert_equals(button.style.WebkitAppearance, value);
+ assert_equals(button.style.webkitAppearance, value); // lowercase w
+ const style = getComputedStyle(button);
+ assert_equals(style.WebkitAppearance, value);
+ assert_equals(style.webkitAppearance, value); // lowercase w
+ }, `-webkit-appearance: ${value}`);
+ }
+
+ const invalidValues = ["bogus-button"];
+ for (const invalidValue of invalidValues) {
+ test(() => {
+ button.removeAttribute('style');
+ button.style.setProperty('-webkit-appearance', invalidValue);
+ assert_equals(button.style.WebkitAppearance, "");
+ assert_equals(button.style.webkitAppearance, ""); // lowercase w
+ const style = getComputedStyle(button);
+ assert_equals(style.WebkitAppearance, "button");
+ assert_equals(style.webkitAppearance, "button"); // lowercase w
+ }, `-webkit-appearance: ${invalidValue} (invalid)`);
+ }
+
+ test(() => {
+ button.removeAttribute('style');
+ button.style.setProperty('appearance', 'auto');
+ assert_equals(button.style.appearance, undefined);
+ const style = getComputedStyle(button);
+ assert_equals(style.appearance, undefined);
+ }, 'appearance');
+</script>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/blob/blob-urls-do-not-match-self.sub.html b/tests/wpt/web-platform-tests/content-security-policy/blob/blob-urls-do-not-match-self.sub.html
index 1bf96df17c0..cafa1e36602 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/blob/blob-urls-do-not-match-self.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/blob/blob-urls-do-not-match-self.sub.html
@@ -7,7 +7,7 @@
<title>blob-urls-do-not-match-self</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
- <script src='../support/logTest.sub.js?logs=["violated-directive=script-src"]'></script>
+ <script src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem"]'></script>
<script src='../support/alertAssert.sub.js?alerts=[]'></script>
</head>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/default-src/default-src-inline-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/default-src/default-src-inline-blocked.sub.html
index 86873553c6b..0cb4ca55387 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/default-src/default-src-inline-blocked.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/default-src/default-src-inline-blocked.sub.html
@@ -12,7 +12,7 @@
<title>default-src-inline-blocked</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
- <script src='../support/logTest.sub.js?logs=["violated-directive=script-src","violated-directive=script-src"]'></script>
+ <script src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem","violated-directive=script-src-elem"]'></script>
<script src='../support/alertAssert.sub.js?alerts=[]'></script>
</head>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html b/tests/wpt/web-platform-tests/content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html
index 401b65a898d..afb272cf36a 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/generic/filesystem-urls-do-not-match-self.sub.html
@@ -7,7 +7,7 @@
<title>filesystem-urls-do-not-match-self</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
- <script src='../support/logTest.sub.js?logs=["violated-directive=script-src"]'></script>
+ <script src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem"]'></script>
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
</head>
@@ -19,7 +19,7 @@
window.addEventListener('securitypolicyviolation', function(e) {
log("violated-directive=" + e.violatedDirective);
});
-
+
if(!window.webkitRequestFileSystem) {
t_log = async_test();
t_log.set_status(t_log.NOTRUN, "No filesystem:// support, cannot run test.");
diff --git a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_1-script-src.html b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_1-script-src.html
index d27b922565b..35033c3899f 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_1-script-src.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_1-script-src.html
@@ -16,9 +16,9 @@
var scriptsrc2 = async_test("Verify cascading of default-src to script-src policy: allow");
var allowedScriptRan = false;
var t_spv = async_test("Should fire violation events for every failed violation");
-
+
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
}));
</script>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_10_1.sub.html b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_10_1.sub.html
index 107ab905bcf..f48c1e3c56f 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_10_1.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_10_1.sub.html
@@ -2,16 +2,16 @@
<html>
<head>
<title>implicit port number matching fails with a different port</title>
- <meta http-equiv="Content-Security-Policy" content="script-src 'self' www.{{host}} 'unsafe-inline';">
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' www.{{host}} 'unsafe-inline';">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='negativeTests.js'></script>
<script>
var t_spv = async_test("Should fire violation events for every failed violation");
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
}));
-
+
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
diff --git a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_2.sub.html b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_2.sub.html
index cdb6238e4e0..6cb75e31ae3 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_2.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_2.sub.html
@@ -9,9 +9,9 @@
<script>
var t_spv = async_test("Should fire violation events for every failed violation");
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
}));
-
+
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
diff --git a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_3.html b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_3.html
index 754c9a3288f..d9c230d2a5c 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_3.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_2_3.html
@@ -9,9 +9,9 @@
<script>
var t_spv = async_test("Should fire violation events for every failed violation");
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
}));
-
+
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
diff --git a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_8_1.sub.html b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_8_1.sub.html
index c2d968b3664..e8ce23415f7 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_8_1.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/generic/generic-0_8_1.sub.html
@@ -9,9 +9,9 @@
<script>
var t_spv = async_test("Should fire violation events for every failed violation");
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
}));
-
+
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
diff --git a/tests/wpt/web-platform-tests/content-security-policy/meta/combine-header-and-meta-policies.sub.html b/tests/wpt/web-platform-tests/content-security-policy/meta/combine-header-and-meta-policies.sub.html
index 6e9e71dd921..70bfeb6b3bb 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/meta/combine-header-and-meta-policies.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/meta/combine-header-and-meta-policies.sub.html
@@ -7,7 +7,7 @@
<title>combine-header-and-meta-policies</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
- <script src='../support/logTest.sub.js?logs=["TEST COMPLETE", "violated-directive=img-src", "violated-directive=style-src"]'></script>
+ <script src='../support/logTest.sub.js?logs=["TEST COMPLETE", "violated-directive=img-src", "violated-directive=style-src-elem"]'></script>
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
<!-- enforcing multiple policies:
Content-Security-Policy: script-src 'self' 'unsafe-inline'; connect-src 'self'; style-src 'self'
@@ -23,7 +23,7 @@ Content-Security-Policy: img-src 'none'
window.addEventListener('securitypolicyviolation', function(e) {
log("violated-directive=" + e.violatedDirective);
});
-
+
var img = document.createElement('img');
img.src = '../support/fail.png';
img.onerror = function() {
diff --git a/tests/wpt/web-platform-tests/content-security-policy/navigation/to-javascript-url-script-src.html b/tests/wpt/web-platform-tests/content-security-policy/navigation/to-javascript-url-script-src.html
index 6c120adac20..70dea1f985e 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/navigation/to-javascript-url-script-src.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/navigation/to-javascript-url-script-src.html
@@ -13,7 +13,7 @@
if (e.target != element)
return;
assert_equals(e.blockedURI, "inline");
- assert_equals(e.effectiveDirective, "script-src");
+ assert_equals(e.effectiveDirective, "script-src-elem");
assert_equals(element.contentDocument.body.innerText, "", "Ensure that 'Fail' doesn't appear in the child document.");
element.remove();
test.done();
@@ -36,7 +36,7 @@
var i = document.createElement("iframe");
i.src = "javascript:'Fail.'";
- assert_csp_event_for_element(t, i);
+ assert_csp_event_for_element(t, i);
document.body.appendChild(i);
}, "<iframe src='javascript:'> blocked without 'unsafe-inline'.");
@@ -44,7 +44,7 @@
async_test(t => {
var i = document.createElement("iframe");
- assert_csp_event_for_element(t, i);
+ assert_csp_event_for_element(t, i);
navigate_to_javascript_onload(t, i);
document.body.appendChild(i);
@@ -54,17 +54,17 @@
var i = document.createElement("iframe");
i.src = "../support/echo-policy.py?policy=" + encodeURIComponent("script-src 'unsafe-inline'");
- assert_csp_event_for_element(t, i);
+ assert_csp_event_for_element(t, i);
navigate_to_javascript_onload(t, i);
document.body.appendChild(i);
}, "<iframe src='...'> with 'unsafe-inline' navigated to 'javascript:' blocked in this document");
-
+
async_test(t => {
var i = document.createElement("iframe");
i.src = "../support/echo-policy.py?policy=" + encodeURIComponent("script-src 'none'");
- assert_csp_event_for_element(t, i);
+ assert_csp_event_for_element(t, i);
navigate_to_javascript_onload(t, i);
document.body.appendChild(i);
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-allowed-src-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-allowed-src-blocked.html
new file mode 100644
index 00000000000..d4c19c54667
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-allowed-src-blocked.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src-attr 'unsafe-inline';
+ script-src 'nonce-abc';">
+ <script nonce='abc' src="/resources/testharness.js"></script>
+ <script nonce='abc' src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+ <script nonce='abc'>
+ var t = async_test("Should not fire a security policy violation event");
+ window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
+ </script>
+
+ <img src="../support/pass.png" onload="t.done()">
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-blocked-src-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-blocked-src-allowed.html
new file mode 100644
index 00000000000..199726e212d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-attr-blocked-src-allowed.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src-attr 'none';
+ script-src 'unsafe-inline' 'self';">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+ <script>
+ var t = async_test("Should fire a security policy violation event");
+ window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
+ assert_equals(e.violatedDirective, 'script-src-attr');
+ assert_equals(e.blockedURI, 'inline');
+ }));
+ </script>
+
+ <img src="../support/pass.png" onload="t.unreached_func('Should not have executed the inline handler')">
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-attr-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-attr-blocked.html
new file mode 100644
index 00000000000..c21898377e5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-attr-blocked.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src-elem 'self' 'unsafe-inline';
+ script-src-attr 'none';">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+ <script>
+ var t = async_test("Should fire a security policy violation for the attribute");
+ window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
+ assert_equals(e.violatedDirective, 'script-src-attr');
+ assert_equals(e.blockedURI, 'inline');
+ }));
+
+ var t1 = async_test("Should execute the inline script block");
+ </script>
+
+ <script>
+ t1.done();
+ </script>
+
+ <img src="../support/pass.png" onload="t.unreached_func('should not have run this event handler')">
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-src-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-src-blocked.html
new file mode 100644
index 00000000000..c7954613c78
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-allowed-src-blocked.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src-elem 'nonce-abc' 'nonce-def';
+ script-src 'nonce-abc';">
+ <script nonce='abc' src="/resources/testharness.js"></script>
+ <script nonce='abc' src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+ <script nonce='abc'>
+ var t = async_test("Should not fire a security policy violation event");
+ window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
+ </script>
+
+ <script nonce='def'>
+ t.done();
+ </script>
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-attr-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-attr-allowed.html
new file mode 100644
index 00000000000..4a85c15376c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-attr-allowed.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src-elem 'nonce-abc' 'self';
+ script-src-attr 'unsafe-inline'">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+ <script nonce='abc'>
+ var t = async_test("Should fire a security policy violation for the attribute");
+ window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
+ assert_equals(e.violatedDirective, 'script-src-elem');
+ assert_equals(e.blockedURI, 'inline');
+ }));
+
+ var t1 = async_test("Should execute the inline script attribute");
+ </script>
+
+ <script>
+ t.step_func(function() {
+ assert_unreached("Should not have executed the inline script block");
+ })
+ </script>
+
+ <img src="../support/pass.png" onload="t1.done()">
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-src-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-src-allowed.html
new file mode 100644
index 00000000000..ac4726f9f4b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/script-src-elem-blocked-src-allowed.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src-elem 'nonce-abc';
+ script-src 'nonce-abc' 'nonce-def';">
+ <script nonce='abc' src="/resources/testharness.js"></script>
+ <script nonce='abc' src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+ <script nonce='abc'>
+ var t = async_test("Should fire a spv event");
+ window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
+ assert_equals(e.violatedDirective, 'script-src-elem');
+ assert_equals(e.blockedURI, 'inline');
+ }));
+
+ </script>
+
+ <script nonce='def'>
+ t.step_func(function() {
+ assert_unreached("Should not have executed the inline block");
+ });
+ </script>
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/strict-dynamic-elem-allowed-src-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/strict-dynamic-elem-allowed-src-blocked.html
new file mode 100644
index 00000000000..b6543778230
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/strict-dynamic-elem-allowed-src-blocked.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src-elem 'strict-dynamic' 'nonce-abc';
+ script-src 'nonce-abc';">
+ <script nonce='abc' src="/resources/testharness.js"></script>
+ <script nonce='abc' src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+ <script nonce='abc'>
+ var t = async_test("Should not fire a security policy violation event");
+ window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
+
+ var s = document.createElement('script');
+ s.src = 'support/t_done.js';
+ document.head.appendChild(s);
+ </script>
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/strict-dynamic-elem-blocked-src-allowed.sub.html b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/strict-dynamic-elem-blocked-src-allowed.sub.html
new file mode 100644
index 00000000000..04394dc33ac
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/strict-dynamic-elem-blocked-src-allowed.sub.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="script-src 'strict-dynamic' 'nonce-abc';
+ script-src-elem 'nonce-abc';">
+ <script nonce='abc' src="/resources/testharness.js"></script>
+ <script nonce='abc' src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+ <script nonce='abc'>
+ var t = async_test("Should fire a security policy violation event");
+ window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
+ assert_equals(e.violatedDirective, "script-src-elem");
+ assert_equals(e.blockedURI, "{{location[scheme]}}://{{location[host]}}/content-security-policy/script-src-attr-elem/support/t_fail.js");
+ }));
+
+ var s = document.createElement('script');
+ s.src = 'support/t_fail.js';
+ document.head.appendChild(s);
+ </script>
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/support/t_done.js b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/support/t_done.js
new file mode 100644
index 00000000000..e31eb1d9592
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/support/t_done.js
@@ -0,0 +1 @@
+t.done();
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/support/t_fail.js b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/support/t_fail.js
new file mode 100644
index 00000000000..fa48d6e2c5d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src-attr-elem/support/t_fail.js
@@ -0,0 +1,3 @@
+t.step(function() {
+ assert_unreached("Should not loaded the script");
+});
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/addInlineTestsWithDOMManipulation.js b/tests/wpt/web-platform-tests/content-security-policy/script-src/addInlineTestsWithDOMManipulation.js
index a5d91dcab0f..02c8c8cdd42 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/addInlineTestsWithDOMManipulation.js
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/addInlineTestsWithDOMManipulation.js
@@ -3,7 +3,7 @@
var test_count = 2;
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
if (--test_count <= 0) {
t_spv.done();
}
@@ -25,4 +25,4 @@
document.writeln('<script>dmTest.step(function() {assert_unreached("Unsafe inline script ran - document.writeln")});</script>');
dmTest.done();
-})(); \ No newline at end of file
+})();
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/injected-inline-script-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/injected-inline-script-blocked.sub.html
index 07e2ae2871c..45c389f7f1e 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/injected-inline-script-blocked.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/injected-inline-script-blocked.sub.html
@@ -7,7 +7,7 @@
<title>injected-inline-script-blocked</title>
<script nonce='abc' src="/resources/testharness.js"></script>
<script nonce='abc' src="/resources/testharnessreport.js"></script>
- <script nonce='abc' src='../support/logTest.sub.js?logs=["violated-directive=script-src",]'></script>
+ <script nonce='abc' src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem",]'></script>
<script nonce='abc' src='../support/alertAssert.sub.js?alerts=[]'></script>
</head>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/inlineTests.js b/tests/wpt/web-platform-tests/content-security-policy/script-src/inlineTests.js
index 0c6e5446041..3c0712b4499 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/inlineTests.js
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/inlineTests.js
@@ -1,13 +1,22 @@
var t1 = async_test("Inline script block");
var t2 = async_test("Inline event handler");
-onload = function() {t1.done(); t2.done()}
+onload = function() {t1.done(); t2.done();};
-var t_spv = async_test("Should not fire policy violation events");
-var test_count = 2;
+var t_spv = async_test("Should fire policy violation events");
+var block_event_fired = false;
+var handler_event_fired = false;
window.addEventListener("securitypolicyviolation", t_spv.step_func(function(e) {
- assert_equals(e.violatedDirective, "script-src");
- if (--test_count <= 0) {
- t_spv.done();
+ if (e.violatedDirective == "script-src-elem") {
+ assert_false(block_event_fired);
+ block_event_fired = true;
+ } else if (e.violatedDirective == "script-src-attr") {
+ assert_false(handler_event_fired);
+ handler_event_fired = true;
+ } else {
+ assert_unreached("Unexpected directive broken");
+ }
+ if (block_event_fired && handler_event_fired) {
+ t_spv.done();
}
}));
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked.html
index e02d66ae9c9..ae4d8227edc 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/javascript-window-open-blocked.html
@@ -11,7 +11,7 @@
var t = async_test("Check that a securitypolicyviolation event is fired");
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
assert_equals(e.blockedURI, "inline");
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
}));
window.open('javascript:test(function() { assert_unreached("FAIL")});', 'new');
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy.html
index 16428b1a4de..3c4e39e8250 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy.html
@@ -10,7 +10,7 @@
<script nonce="abc">
var t_spv = async_test("Should fire securitypolicyviolation event");
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
assert_equals(e.disposition, "report");
}));
var externalRan = false;
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-hash-policy.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-hash-policy.html
index 9ae66611ea5..850f4b2c2ee 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-hash-policy.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-hash-policy.html
@@ -11,7 +11,7 @@
var t = async_test("Test that script executes if allowed by proper hash values");
var t_spv = async_test("Test that the securitypolicyviolation event is fired");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
assert_equals(e.disposition, "report");
assert_equals(e.blockedURI, "inline");
}));
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html
index 4e194468304..51b0b7971a0 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html
@@ -21,7 +21,7 @@
}
}));
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
- assert_equals(e.effectiveDirective, 'script-src');
+ assert_equals(e.effectiveDirective, 'script-src-elem');
}));
}, 'Whitelisted script without a correct nonce is not allowed with `strict-dynamic`.');
</script>
@@ -29,4 +29,4 @@
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html
index cd2ae8c16c0..91d12ed7bd3 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html
@@ -28,7 +28,7 @@
if (violation.blockedURI.split('?')[1] !== 'unNonced-appendChild') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
t.done();
}));
@@ -65,4 +65,4 @@
</script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_whitelist.sub.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_whitelist.sub.html
index 94490de1b46..314ed91e5d3 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_whitelist.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_whitelist.sub.html
@@ -44,7 +44,7 @@
if (violation.blockedURI.split('?')[1] !== 'nonWhitelisted-appendChild') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
assert_equals(violation.originalPolicy, "script-src 'self' 'nonce-dummy'");
t.done();
}));
@@ -58,4 +58,4 @@
</script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html
index 1e057ba947e..1ceb74c63d1 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html
@@ -27,7 +27,7 @@
if (violation.blockedURI.split('?')[1] !== 'appendChild-reportOnly') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
// Check that the violation comes from the Report-Only policy.
assert_equals(violation.originalPolicy, "script-src 'none'");
t.done();
@@ -41,4 +41,4 @@
</script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html
index 3a6151b10f3..f7625afdaf9 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_javascript_uri.html
@@ -20,7 +20,7 @@
async_test(function(t) {
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
assert_false(javascriptUriScriptRan);
- assert_equals(e.effectiveDirective, 'script-src');
+ assert_equals(e.effectiveDirective, 'script-src-elem');
}));
document.getElementById('javascriptUri').click();
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html
index 19d2ae1acc7..ac180d23f50 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html
@@ -16,7 +16,7 @@
<script nonce='dummy'>
async_test(function(t) {
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
- assert_equals(e.effectiveDirective, 'script-src');
+ assert_equals(e.effectiveDirective, 'script-src-elem');
}));
}, 'All the expected CSP violation reports have been fired.');
</script>
@@ -26,4 +26,4 @@
</script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html
index c167e5ef625..c5e33dc4253 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html
@@ -24,7 +24,7 @@
if (violation.blockedURI.split('?')[1] !== 'documentWrite') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
t.done();
}));
@@ -43,7 +43,7 @@
if (violation.blockedURI.split('?')[1] !== 'documentWriteln') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
t.done();
}));
@@ -62,7 +62,7 @@
if (violation.blockedURI.split('?')[1] !== 'documentWrite-deferred') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
t.done();
}));
@@ -81,7 +81,7 @@
if (violation.blockedURI.split('?')[1] !== 'documentWriteln-deferred') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
t.done();
}));
@@ -100,7 +100,7 @@
if (violation.blockedURI.split('?')[1] !== 'documentWrite-async') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
t.done();
}));
@@ -119,7 +119,7 @@
if (violation.blockedURI.split('?')[1] !== 'documentWriteln-async') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
t.done();
}));
@@ -138,7 +138,7 @@
if (violation.blockedURI.split('?')[1] !== 'documentWrite-deferred-async') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
t.done();
}));
@@ -157,7 +157,7 @@
if (violation.blockedURI.split('?')[1] !== 'documentWriteln-deferred-async') {
return;
}
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-elem');
t.done();
}));
@@ -173,7 +173,7 @@
return;
}
assert_false(innerHTMLScriptRan);
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-attr');
t.done();
}));
@@ -191,7 +191,7 @@
return;
}
assert_false(insertAdjacentHTMLScriptRan);
- assert_equals(violation.effectiveDirective, 'script-src');
+ assert_equals(violation.effectiveDirective, 'script-src-attr');
t.done();
}));
@@ -202,4 +202,4 @@
</script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/scripthash-unicode-normalization.sub.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/scripthash-unicode-normalization.sub.html
index 0c303630331..4212297c683 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/scripthash-unicode-normalization.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/scripthash-unicode-normalization.sub.html
@@ -20,9 +20,9 @@
<script nonce="nonceynonce">
var t_spv = async_test("Should fire securitypolicyviolation");
window.addEventListener('securitypolicyviolation', t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
+ assert_equals(e.violatedDirective, "script-src-elem");
}));
-
+
var matchingContent = 'Å';
var nonMatchingContent = 'Å';
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-and-scripthash.sub.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-and-scripthash.sub.html
index 94a39973af2..8f1f596bd00 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-and-scripthash.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-and-scripthash.sub.html
@@ -18,9 +18,9 @@
window.addEventListener('securitypolicyviolation', function(e) {
alert_assert("violated-directive=" + e.violatedDirective);
});
-
+
var t_alert = async_test('Expecting alerts: ["PASS (1/3)","PASS (2/3)","PASS (3/3)"]');
- var expected_alerts = ["PASS (1/3)", "PASS (2/3)", "PASS (3/3)", "violated-directive=script-src", "violated-directive=script-src"];
+ var expected_alerts = ["PASS (1/3)", "PASS (2/3)", "PASS (3/3)", "violated-directive=script-src-elem", "violated-directive=script-src-elem"];
function alert_assert(msg) {
t_alert.step(function() {
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-basic-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-basic-blocked.sub.html
index db94c1c5f4b..2001afcd9ca 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-basic-blocked.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-basic-blocked.sub.html
@@ -7,7 +7,7 @@
<title>scriptnonce-basic-blocked</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
- <script src='../support/alertAssert.sub.js?alerts=["PASS (closely-quoted nonce)","PASS (nonce w/whitespace)", "violated-directive=script-src", "violated-directive=script-src", "violated-directive=script-src"]'></script>
+ <script src='../support/alertAssert.sub.js?alerts=["PASS (closely-quoted nonce)","PASS (nonce w/whitespace)", "violated-directive=script-src-elem", "violated-directive=script-src-elem", "violated-directive=script-src-elem"]'></script>
<script nonce="noncynonce">
alert_assert('PASS (closely-quoted nonce)');
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html
index 18a6899a5cd..b595b76389f 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/scriptnonce-ignore-unsafeinline.sub.html
@@ -19,8 +19,8 @@
});
</script>
<script nonce='noncynonce'>
- var t_alert = async_test('Expecting alerts: ["PASS (1/2)","PASS (2/2)", "violated-directive=script-src"]');
- var expected_alerts = ["PASS (1/2)", "PASS (2/2)", "violated-directive=script-src"];
+ var t_alert = async_test('Expecting alerts: ["PASS (1/2)","PASS (2/2)", "violated-directive=script-src-elem"]');
+ var expected_alerts = ["PASS (1/2)", "PASS (2/2)", "violated-directive=script-src-elem"];
function alert_assert(msg) {
t_alert.step(function() {
diff --git a/tests/wpt/web-platform-tests/content-security-policy/script-src/srcdoc-doesnt-bypass-script-src.sub.html b/tests/wpt/web-platform-tests/content-security-policy/script-src/srcdoc-doesnt-bypass-script-src.sub.html
index eea201865aa..2cae85ec301 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/script-src/srcdoc-doesnt-bypass-script-src.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/script-src/srcdoc-doesnt-bypass-script-src.sub.html
@@ -7,25 +7,25 @@
<title>srcdoc-doesnt-bypass-script-src</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
- <script src='../support/logTest.sub.js?logs=["violated-directive=script-src"]'></script>
+ <script src='../support/logTest.sub.js?logs=["violated-directive=script-src-elem"]'></script>
</head>
<body>
-
+
<script nonce='abc'>
window.onmessage = function(e) {
log(e.data);
}
-
+
var i = document.createElement('iframe');
i.addEventListener('securitypolicyviolation', function(e) {
log("violated-directive=" + e.violatedDirective);
});
-
- i.srcdoc = "<sc" + "ript nonce='abc'>" +
- "window.addEventListener('securitypolicyviolation', function(e) {" +
+
+ i.srcdoc = "<sc" + "ript nonce='abc'>" +
+ "window.addEventListener('securitypolicyviolation', function(e) {" +
"window.parent.postMessage('violated-directive=' + e.violatedDirective, '*');});" +
- "</scr" + "ipt>" +
+ "</scr" + "ipt>" +
"<scr" + "ipt>window.parent.log('FAIL')</scr" + "ipt>";
document.body.appendChild(i);
</script>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-allowed-src-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-allowed-src-blocked.html
new file mode 100644
index 00000000000..567e22496cc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-allowed-src-blocked.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="style-src-attr 'unsafe-inline';
+ style-src 'none';">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ var t = async_test("Should apply the style attribute");
+ window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
+ </script>
+</head>
+
+<body style="background: green">
+ <script>
+ t.step(function() {
+ assert_true(document.body.style.length > 0);
+ t.done();
+ });
+ </script>
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html
new file mode 100644
index 00000000000..622c3bf7648
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="style-src-attr 'none';
+ style-src 'unsafe-inline';">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ var t = async_test("Should fire a security policy violation event");
+ window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
+ assert_equals(e.violatedDirective, 'style-src-attr');
+ assert_equals(e.blockedURI, 'inline');
+ }));
+ </script>
+</head>
+
+<body style="background: green">
+ <script>
+ async_test(function(test) {
+ assert_equals(document.body.style.length, 0);
+ test.done();
+ }, "The attribute style should not be applied");
+ </script>
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html
new file mode 100644
index 00000000000..279600ea2e1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="style-src-elem 'unsafe-inline';
+ style-src-attr 'none';">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ var t = async_test("Should fire a security policy violation for the attribute");
+ window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
+ assert_equals(e.violatedDirective, 'style-src-attr');
+ assert_equals(e.blockedURI, 'inline');
+ }));
+ </script>
+</head>
+
+<body style="background: green">
+ <style>
+ body {background: blue;}
+ </style>
+
+ <script>
+ async_test(function(test) {
+ assert_equals(document.body.style.length, 0);
+ assert_equals(document.styleSheets.length, 1);
+ test.done();
+ }, "The attribute style should not be applied and the inline style should be applied");
+ </script>
+
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked.html
new file mode 100644
index 00000000000..c15cf0bcf64
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="style-src-elem 'unsafe-inline';
+ style-src 'none';">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ var t = async_test("Inline style should be applied");
+ window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event"));
+ </script>
+</head>
+
+<body>
+ <style>
+ body {background: green;}
+ </style>
+ <script>
+ t.step(function() {
+ assert_equals(document.styleSheets.length, 1);
+ t.done();
+ });
+ </script>
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-attr-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-attr-allowed.html
new file mode 100644
index 00000000000..a42c9de9b84
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-attr-allowed.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="style-src-elem 'none';
+ script-src-attr 'unsafe-inline'">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ var t = async_test("Should fire a security policy violation for the inline block");
+ window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
+ assert_equals(e.violatedDirective, 'style-src-elem');
+ assert_equals(e.blockedURI, 'inline');
+ }));
+ </script>
+</head>
+
+<body style="background: green">
+ <style>
+ body {background: blue;}
+ </style>
+
+ <script>
+ async_test(function(test) {
+ assert_true(document.body.style.length > 0);
+ assert_equals(document.styleSheets.length, 0);
+ test.done();
+ }, "The inline style should not be applied and the attribute style should be applied");
+ </script>
+
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-src-allowed.html b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-src-allowed.html
new file mode 100644
index 00000000000..bf5014a4584
--- /dev/null
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src-attr-elem/style-src-elem-blocked-src-allowed.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <meta http-equiv="Content-Security-Policy" content="style-src-elem 'none';
+ style-src 'unsafe-inline';">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ var t = async_test("Should fire a security policy violation event");
+ window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
+ assert_equals(e.violatedDirective, 'style-src-elem');
+ assert_equals(e.blockedURI, 'inline');
+ }));
+ </script>
+</head>
+
+<body>
+ <style>
+ body {background: green;}
+ </style>
+ <script>
+ async_test(function(test) {
+ assert_equals(document.styleSheets.length, 0);
+ test.done();
+ }, "The inline style should not be applied");
+ </script>
+</body>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/injected-inline-style-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/injected-inline-style-blocked.sub.html
index d7e7de22cf6..978671223e8 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/injected-inline-style-blocked.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/injected-inline-style-blocked.sub.html
@@ -7,7 +7,7 @@
<title>injected-inline-style-blocked</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
- <script src='../support/logTest.sub.js?logs=["violated-directive=style-src","PASS"]'></script>
+ <script src='../support/logTest.sub.js?logs=["violated-directive=style-src-elem","PASS"]'></script>
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
</head>
@@ -17,14 +17,14 @@
log("violated-directive=" + e.violatedDirective);
});
</script>
-
+
<div id="test1">
PASS 1/2
</div>
<div id="test2">
PASS 2/2
</div>
-
+
<script src="support/inject-style.js"></script>
<script>
log(document.styleSheets.length == 0 ? "PASS" : "FAIL");
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/inline-style-attribute-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/inline-style-attribute-blocked.sub.html
index e2d84915cf0..71e5a88b7a5 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/inline-style-attribute-blocked.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/inline-style-attribute-blocked.sub.html
@@ -7,7 +7,7 @@
<title>inline-style-attribute-blocked</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
- <script src='../support/logTest.sub.js?logs=["violated-directive=style-src","PASS"]'></script>
+ <script src='../support/logTest.sub.js?logs=["violated-directive=style-src-attr","PASS"]'></script>
<script src="../support/alertAssert.sub.js?alerts=[]"></script>
<script>
window.addEventListener('securitypolicyviolation', function(e) {
@@ -16,7 +16,7 @@
</script>
</head>
<body style="background-color: blue;">
-
+
<script>
log(document.body.style.length > 0 ? 'FAIL' : 'PASS');
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-hash-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-hash-blocked.html
index b5d94040ed6..dec3b6e853b 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-hash-blocked.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-hash-blocked.html
@@ -12,7 +12,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-elem", e.violatedDirective);
}));
</script>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-imported-style-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-imported-style-blocked.html
index a00888098a5..e5016c2382f 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-imported-style-blocked.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-imported-style-blocked.html
@@ -10,7 +10,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-elem", e.violatedDirective);
}));
var l = document.createElement("link");
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-inline-style-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-inline-style-blocked.html
index 797cb13e70b..fd27938f067 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-inline-style-blocked.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-inline-style-blocked.html
@@ -10,7 +10,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-elem", e.violatedDirective);
}));
</script>
</head>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html
index a2c8e722795..6191bb2d555 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-injected-stylesheet-blocked.sub.html
@@ -10,7 +10,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-elem", e.violatedDirective);
}));
</script>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html
index 66b8f545c77..5072a2c8e2b 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html
@@ -10,7 +10,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-attr", e.violatedDirective);
}));
onload = t.step_func_done(function(e) {
var contentEl = document.getElementById("content");
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-blocked.html
index 7374e44902f..1baff387ae8 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-blocked.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-blocked.html
@@ -10,7 +10,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-elem", e.violatedDirective);
}));
</script>
<style>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html
index 53b1b013157..83eaabaa9b1 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event.html
@@ -9,7 +9,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-elem", e.violatedDirective);
}));
</script>
<style id="style1" nonce="not-nonceynonce"
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked.html
index f2cb2f2a775..016b4ebdc49 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked.html
@@ -10,7 +10,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-elem", e.violatedDirective);
}));
</script>
<style nonce="not-nonceynonce">
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-none-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-none-blocked.html
index 35696ade7f5..2a80b827c8c 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-none-blocked.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-none-blocked.html
@@ -10,7 +10,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-elem", e.violatedDirective);
}));
</script>
<link href="/content-security-policy/style-src/resources/style-src.css" rel=stylesheet type=text/css>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html
index 8095da54d32..a076eafd559 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/style-src-stylesheet-nonce-blocked.html
@@ -10,7 +10,7 @@
var t_spv = async_test("Should fire a securitypolicyviolation event");
document.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals("style-src", e.violatedDirective);
+ assert_equals("style-src-elem", e.violatedDirective);
}));
</script>
<link nonce="not-nonceynonce" href="/content-security-policy/style-src/resources/style-src.css?pipe=sub" rel=stylesheet type=text/css>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/stylehash-basic-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/stylehash-basic-blocked.sub.html
index d9f0fbf653e..6bfd5019e1b 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/stylehash-basic-blocked.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/stylehash-basic-blocked.sub.html
@@ -12,9 +12,9 @@
window.addEventListener('securitypolicyviolation', function(e) {
alert_assert("violated-directive=" + e.violatedDirective);
});
-
- var t_alert = async_test('Expecting alerts: ["PASS: The \'p\' element\'s text is green, which means the style was correctly applied.", "violated-directive=style-src"]');
- var expected_alerts = ["PASS: The 'p' element's text is green, which means the style was correctly applied.", "violated-directive=style-src"];
+
+ var t_alert = async_test('Expecting alerts: ["PASS: The \'p\' element\'s text is green, which means the style was correctly applied.", "violated-directive=style-src-elem"]');
+ var expected_alerts = ["PASS: The 'p' element's text is green, which means the style was correctly applied.", "violated-directive=style-src-elem"];
function alert_assert(msg) {
t_alert.step(function() {
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-allowed.sub.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-allowed.sub.html
index c5ffdba6de4..e190b84e857 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-allowed.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-allowed.sub.html
@@ -12,11 +12,11 @@
<script>
var t_spv = async_test("Should fire securitypolicyviolation");
window.addEventListener('securitypolicyviolation', t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "style-src");
+ assert_equals(e.violatedDirective, "style-src-elem");
}));
-
+
</script>
-
+
<style nonce="noncynonce">
#test1 {
color: green;
diff --git a/tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-blocked.sub.html b/tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-blocked.sub.html
index 609e45abdc7..4b2381fc33d 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-blocked.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/style-src/stylenonce-blocked.sub.html
@@ -13,8 +13,8 @@
<script>
var t_spv = async_test("Should fire securitypolicyviolation");
window.addEventListener('securitypolicyviolation', t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "style-src");
- }));
+ assert_equals(e.violatedDirective, "style-src-elem");
+ }));
</script>
<style nonce="noncynonce">
#test {
diff --git a/tests/wpt/web-platform-tests/content-security-policy/svg/svg-inline.sub.html b/tests/wpt/web-platform-tests/content-security-policy/svg/svg-inline.sub.html
index 3377f5dca6d..16d03407fd9 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/svg/svg-inline.sub.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/svg/svg-inline.sub.html
@@ -8,10 +8,10 @@
<script>
var t_spv = async_test("Should fire violation event");
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
- assert_equals(e.violatedDirective, "script-src");
- }));
+ assert_equals(e.violatedDirective, "script-src-elem");
+ }));
</script>
-
+
</head>
<body>
@@ -20,7 +20,7 @@
not redirect to a different resource.</p>
<div id="log"></div>
<?xml version="1.0" standalone="no"?>
-
+
<svg width="6cm" height="5cm" viewBox="0 0 600 500"
xmlns="http://www.w3.org/2000/svg" version="1.1">
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href.html
index f53a2e924c3..991200ac0da 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href.html
@@ -18,7 +18,7 @@
var t1 = async_test("Test that the javascript: src is not allowed to run");
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'script-src');
+ assert_equals(e.violatedDirective, 'script-src-elem');
assert_equals(e.blockedURI, 'inline');
}));
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href_blank.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href_blank.html
index 6b9f60ce368..66ec9e1678c 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href_blank.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-href_blank.html
@@ -18,7 +18,7 @@
var t1 = async_test("Test that the javascript: src is not allowed to run");
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'script-src');
+ assert_equals(e.violatedDirective, 'script-src-elem');
assert_equals(e.blockedURI, 'inline');
}));
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_open.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_open.html
index 3667f8016fa..12c9b099857 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_open.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_missing_unsafe_hashes-window_open.html
@@ -19,7 +19,7 @@
window.onmessage = t1.unreached_func("Should have not received any message");
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'script-src');
+ assert_equals(e.violatedDirective, 'script-src-elem');
assert_equals(e.blockedURI, 'inline');
}));
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href.html
index adae81b0c06..944b72774c8 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href.html
@@ -18,7 +18,7 @@
var t1 = async_test("Test that the javascript: src is not allowed to run");
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'script-src');
+ assert_equals(e.violatedDirective, 'script-src-elem');
assert_equals(e.blockedURI, 'inline');
}));
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href_blank.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href_blank.html
index 470283e10be..84491f83fbb 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href_blank.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-href_blank.html
@@ -18,7 +18,7 @@
var t1 = async_test("Test that the javascript: src is not allowed to run");
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'script-src');
+ assert_equals(e.violatedDirective, 'script-src-elem');
assert_equals(e.blockedURI, 'inline');
}));
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_open.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_open.html
index 8314e6ab911..c653d4f617e 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_open.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/javascript_src_denied_wrong_hash-window_open.html
@@ -19,7 +19,7 @@
window.onmessage = t1.unreached_func("Should have not received any message");
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'script-src');
+ assert_equals(e.violatedDirective, 'script-src-elem');
assert_equals(e.blockedURI, 'inline');
}));
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_missing_unsafe_hashes.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_missing_unsafe_hashes.html
index 0323dda50b7..7ba9d30bcfd 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_missing_unsafe_hashes.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_missing_unsafe_hashes.html
@@ -6,16 +6,16 @@
<title>Event handlers should not be allowed if a matching hash is present without 'unsafe-hashes'</title>
<script src='/resources/testharness.js' nonce='abc'></script>
<script src='/resources/testharnessreport.js' nonce='abc'></script>
-
+
</head>
<body>
<div id='log'></div>
<script nonce='abc'>
var t1 = async_test("Test that the inline event handler is not allowed to run");
-
+
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'script-src');
+ assert_equals(e.violatedDirective, 'script-src-attr');
assert_equals(e.blockedURI, 'inline');
}));
</script>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_wrong_hash.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_wrong_hash.html
index b9b13572c3b..2de6a48eb21 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_wrong_hash.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/script_event_handlers_denied_wrong_hash.html
@@ -12,9 +12,9 @@
<div id='log'></div>
<script nonce='abc'>
var t1 = async_test("Test that the inline event handler is not allowed to run");
-
+
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'script-src');
+ assert_equals(e.violatedDirective, 'script-src-attr');
assert_equals(e.blockedURI, 'inline');
}));
</script>
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes.html
index 66be2c3d807..e8070acba90 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes.html
@@ -16,9 +16,9 @@
<div id='log'></div>
<script>
var t1 = async_test("Test that the inline style attribute is blocked");
-
+
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'style-src');
+ assert_equals(e.violatedDirective, 'style-src-attr');
assert_equals(e.blockedURI, 'inline');
}));
diff --git a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash.html b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash.html
index 32ca66a8a8b..be276372242 100644
--- a/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash.html
+++ b/tests/wpt/web-platform-tests/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash.html
@@ -18,7 +18,7 @@
var t1 = async_test("Test that the inline style attribute is blocked");
window.addEventListener('securitypolicyviolation', t1.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'style-src');
+ assert_equals(e.violatedDirective, 'style-src-attr');
assert_equals(e.blockedURI, 'inline');
}));
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/attribute-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/attribute-tests.html
index 6e7d5feabb2..1d2141d38c4 100644
--- a/tests/wpt/web-platform-tests/cookies/http-state/attribute-tests.html
+++ b/tests/wpt/web-platform-tests/cookies/http-state/attribute-tests.html
@@ -9,8 +9,14 @@
<script src="/resources/testharnessreport.js"></script>
<script src="resources/cookie-http-state-template.js"></script>
</head>
- <body>
- <div id="log"></div>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
<script>
setup({ explicit_timeout: true });
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/charset-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/charset-tests.html
new file mode 100644
index 00000000000..9d9ef1bb087
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/charset-tests.html
@@ -0,0 +1,39 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests cookie charset functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [
+ {file: "charset0001", name: "charset0001"},
+ {file: "charset0002", name: "charset0002"},
+ {file: "charset0003", name: "charset0003"},
+ {file: "charset0004", name: "charset0004"},
+ ];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/chromium-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/chromium-tests.html
new file mode 100644
index 00000000000..e5d745e0390
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/chromium-tests.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests chromium cookie functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [
+ {file: "chromium0001", name: "chromium0001"},
+ {file: "chromium0002", name: "chromium0002"},
+ {file: "chromium0003", name: "chromium0003"},
+ {file: "chromium0004", name: "chromium0004"},
+ {file: "chromium0005", name: "chromium0005"},
+ {file: "chromium0006", name: "chromium0006"},
+ {file: "chromium0007", name: "chromium0007"},
+ {file: "chromium0008", name: "chromium0008"},
+ {file: "chromium0009", name: "chromium0009"},
+ {file: "chromium0010", name: "chromium0010"},
+ {file: "chromium0011", name: "chromium0011"},
+ {file: "chromium0012", name: "chromium0012"},
+ {file: "chromium0013", name: "chromium0013"},
+ {file: "chromium0014", name: "chromium0014"},
+ {file: "chromium0015", name: "chromium0015"},
+ {file: "chromium0016", name: "chromium0016"},
+ {file: "chromium0017", name: "chromium0017"},
+ {file: "chromium0018", name: "chromium0018"},
+ {file: "chromium0019", name: "chromium0019"},
+ {file: "disabled-chromium0020", name: "disabled-chromium0020"},
+ {file: "chromium0021", name: "chromium0021"},
+ {file: "disabled-chromium0022", name: "disabled-chromium0022"},
+ {file: "disabled-chromium0023", name: "disabled-chromium0023"},
+ ];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/comma-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/comma-tests.html
new file mode 100644
index 00000000000..f71bb8d9610
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/comma-tests.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests cookie setting comma functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [
+ {file: "comma0001", name: "comma0001"},
+ {file: "comma0002", name: "comma0002"},
+ {file: "comma0003", name: "comma0003"},
+ {file: "comma0004", name: "comma0004"},
+ {file: "comma0005", name: "comma0005"},
+ {file: "comma0006", name: "comma0006"},
+ {file: "comma0007", name: "comma0007"},
+ ];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/domain-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/domain-tests.html
new file mode 100644
index 00000000000..85c8cd00a44
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/domain-tests.html
@@ -0,0 +1,79 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests cookie setting domain functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [
+ {file: "domain0001", name: "domain0001"},
+ {file: "domain0002", name: "domain0002"},
+ {file: "domain0003", name: "domain0003"},
+ {file: "domain0004", name: "domain0004"},
+ {file: "domain0005", name: "domain0005"},
+ {file: "domain0006", name: "domain0006"},
+ {file: "domain0007", name: "domain0007"},
+ {file: "domain0008", name: "domain0008"},
+ {file: "domain0009", name: "domain0009"},
+ {file: "domain0010", name: "domain0010"},
+ {file: "domain0011", name: "domain0011"},
+ {file: "domain0012", name: "domain0012"},
+ {file: "domain0013", name: "domain0013"},
+ {file: "domain0014", name: "domain0014"},
+ {file: "domain0015", name: "domain0015"},
+ {file: "domain0016", name: "domain0016"},
+ {file: "domain0017", name: "domain0017"},
+ {file: "domain0018", name: "domain0018"},
+ {file: "domain0019", name: "domain0019"},
+ {file: "domain0020", name: "domain0020"},
+ {file: "domain0021", name: "domain0021"},
+ {file: "domain0022", name: "domain0022"},
+ {file: "domain0023", name: "domain0023"},
+ {file: "domain0024", name: "domain0024"},
+ {file: "domain0025", name: "domain0025"},
+ {file: "domain0026", name: "domain0026"},
+ {file: "domain0027", name: "domain0027"},
+ {file: "domain0028", name: "domain0028"},
+ {file: "domain0029", name: "domain0029"},
+ {file: "optional-domain0030", name: "optional-domain0030"},
+ {file: "domain0031", name: "domain0031"},
+ {file: "domain0033", name: "domain0033"},
+ {file: "domain0034", name: "domain0034"},
+ {file: "domain0035", name: "domain0035"},
+ {file: "domain0036", name: "domain0036"},
+ {file: "domain0037", name: "domain0037"},
+ {file: "domain0038", name: "domain0038"},
+ {file: "domain0039", name: "domain0039"},
+ {file: "domain0040", name: "domain0040"},
+ {file: "domain0041", name: "domain0041"},
+ {file: "domain0042", name: "domain0042"},
+ {file: "optional-domain0041", name: "optional-domain0041"},
+ {file: "optional-domain0042", name: "optional-domain0042"},
+ {file: "optional-domain0043", name: "optional-domain0043"},
+ ];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/general-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/general-tests.html
index 169984de6ac..1e63043ae11 100644
--- a/tests/wpt/web-platform-tests/cookies/http-state/general-tests.html
+++ b/tests/wpt/web-platform-tests/cookies/http-state/general-tests.html
@@ -9,8 +9,14 @@
<script src="/resources/testharnessreport.js"></script>
<script src="resources/cookie-http-state-template.js"></script>
</head>
- <body>
- <div id="log"></div>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
<script>
setup({ explicit_timeout: true });
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/mozilla-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/mozilla-tests.html
new file mode 100644
index 00000000000..01a5645b140
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/mozilla-tests.html
@@ -0,0 +1,52 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests basic cookie setting functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [
+ {file: "mozilla0001", name: "mozilla0001"},
+ {file: "mozilla0002", name: "mozilla0002"},
+ {file: "mozilla0003", name: "mozilla0003"},
+ {file: "mozilla0004", name: "mozilla0004"},
+ {file: "mozilla0005", name: "mozilla0005"},
+ {file: "mozilla0006", name: "mozilla0006"},
+ {file: "mozilla0007", name: "mozilla0007"},
+ {file: "mozilla0008", name: "mozilla0008"},
+ {file: "mozilla0009", name: "mozilla0009"},
+ {file: "mozilla0010", name: "mozilla0010"},
+ {file: "mozilla0011", name: "mozilla0011"},
+ {file: "mozilla0012", name: "mozilla0012"},
+ {file: "mozilla0013", name: "mozilla0013"},
+ {file: "mozilla0014", name: "mozilla0014"},
+ {file: "mozilla0015", name: "mozilla0015"},
+ {file: "mozilla0016", name: "mozilla0016"},
+ {file: "mozilla0017", name: "mozilla0017"},
+ ];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/name-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/name-tests.html
new file mode 100644
index 00000000000..9dd2781f235
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/name-tests.html
@@ -0,0 +1,68 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests basic cookie setting functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [
+ {file: "name0001", name: "name0001"},
+ {file: "name0002", name: "name0002"},
+ {file: "name0003", name: "name0003"},
+ {file: "name0004", name: "name0004"},
+ {file: "name0005", name: "name0005"},
+ {file: "name0006", name: "name0006"},
+ {file: "name0007", name: "name0007"},
+ {file: "name0008", name: "name0008"},
+ {file: "name0009", name: "name0009"},
+ {file: "name0010", name: "name0010"},
+ {file: "name0011", name: "name0011"},
+ {file: "name0012", name: "name0012"},
+ {file: "name0013", name: "name0013"},
+ {file: "name0014", name: "name0014"},
+ {file: "name0015", name: "name0015"},
+ {file: "name0016", name: "name0016"},
+ {file: "name0017", name: "name0017"},
+ {file: "name0018", name: "name0018"},
+ {file: "name0019", name: "name0019"},
+ {file: "name0020", name: "name0020"},
+ {file: "name0021", name: "name0021"},
+ {file: "name0022", name: "name0022"},
+ {file: "name0023", name: "name0023"},
+ {file: "name0024", name: "name0024"},
+ {file: "name0025", name: "name0025"},
+ {file: "name0026", name: "name0026"},
+ {file: "name0027", name: "name0027"},
+ {file: "name0028", name: "name0028"},
+ {file: "name0029", name: "name0029"},
+ {file: "name0030", name: "name0030"},
+ {file: "name0031", name: "name0031"},
+ {file: "name0032", name: "name0032"},
+ {file: "name0033", name: "name0033"},
+ ];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/ordering-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/ordering-tests.html
new file mode 100644
index 00000000000..53cfae452be
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/ordering-tests.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests basic cookie setting functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [
+ {file: "ordering0001", name: "ordering0001"},
+ ];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/path-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/path-tests.html
new file mode 100644
index 00000000000..464f39becd9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/path-tests.html
@@ -0,0 +1,68 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests basic cookie setting functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [
+ {file: "path0001", name: "path0001"},
+ {file: "path0002", name: "path0002"},
+ {file: "path0003", name: "path0003"},
+ {file: "path0004", name: "path0004"},
+ {file: "path0005", name: "path0005"},
+ {file: "path0006", name: "path0006"},
+ {file: "path0007", name: "path0007"},
+ {file: "path0008", name: "path0008"},
+ {file: "path0009", name: "path0009"},
+ {file: "path0010", name: "path0010"},
+ {file: "path0011", name: "path0011"},
+ {file: "path0012", name: "path0012"},
+ {file: "path0013", name: "path0013"},
+ {file: "path0014", name: "path0014"},
+ {file: "path0015", name: "path0015"},
+ {file: "path0016", name: "path0016"},
+ {file: "path0017", name: "path0017"},
+ {file: "path0018", name: "path0018"},
+ {file: "path0019", name: "path0019"},
+ {file: "path0020", name: "path0020"},
+ {file: "path0021", name: "path0021"},
+ {file: "path0022", name: "path0022"},
+ {file: "path0023", name: "path0023"},
+ {file: "path0024", name: "path0024"},
+ {file: "path0025", name: "path0025"},
+ {file: "path0026", name: "path0026"},
+ {file: "path0027", name: "path0027"},
+ {file: "path0028", name: "path0028"},
+ {file: "disabled-path0029", name: "disabled-path0029"},
+ {file: "path0029", name: "path0029"},
+ {file: "path0030", name: "path0030"},
+ {file: "path0031", name: "path0031"},
+ {file: "path0032", name: "path0032"},
+ ];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/all-tests.html.py-str b/tests/wpt/web-platform-tests/cookies/http-state/resources/all-tests.html.py-str
new file mode 100644
index 00000000000..37d630fef4f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/all-tests.html.py-str
@@ -0,0 +1,79 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests basic cookie setting functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h1>Cookie Tests</h1>
+ This page is a debug page for cookie tests. To run a test in isolation,
+ append "?debug=" and the test id to this URL. E.g. to debug "value0001", use
+ this url:<br>
+ <a href="cookie-setter.py?debug=value0001">
+ cookie-setter.py?debug=value0001
+ </a><br>
+ <br>
+ To request, append "?file=" and the file name (stripped of
+ "-tests.html"). For value0001, this would be:<br>
+ <a href="cookie-setter.py?file=value0001">
+ cookie-setter.py?file=value0001
+ </a><br>
+ <br>
+ Please note, the general tests are one level higher:<br>
+ <a href="../attribute-tests.html"> ../attribute-tests.html </a><br>
+ <a href="../charset-tests.html"> ../charset-tests.html </a><br>
+ <a href="../chromium-tests.html"> ../chromium-tests.html </a><br>
+ <a href="../comma-tests.html"> ../comma-tests.html </a><br>
+ <a href="../domain-tests.html"> ../domain-tests.html </a><br>
+ <a href="../general-tests.html"> ../general-tests.html </a><br>
+ <a href="../mozilla-tests.html"> ../mozilla-tests.html </a><br>
+ <a href="../name-tests.html"> ../name-tests.html </a><br>
+ <a href="../ordering-tests.html"> ../ordering-tests.html </a><br>
+ <a href="../path-tests.html"> ../path-tests.html </a><br>
+ <a href="../value-tests.html"> ../value-tests.html </a><br>
+
+ <h2>Current Cookies</h2>
+ These are all cookies, currently set by the browser for this domain: <br>
+ <span id="cookies">(None)</span>
+ <script type="text/javascript">
+ setInterval(() => {
+ document.getElementById("cookies").textContent =
+ document.cookie || "(None)";
+ }, 500);
+ </script>
+
+ <h2>All Tests</h2>
+ Below, all tests are running. The Log contains messages (e.g. when cookies
+ are left over) and the IFrames list preserves all requested files and shows
+ which cookies were expected to show. <br>
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <!-- No element should come after this - the test harness appends the result
+ here when it finished running all of them. -->
+
+ <script type="text/javascript">
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [%s];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-http-state-template.js b/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-http-state-template.js
index 470d46ebc43..d737b38c520 100644
--- a/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-http-state-template.js
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-http-state-template.js
@@ -1,16 +1,32 @@
const SERVER_LOCATION = "resources";
const SERVER_SCRIPT = SERVER_LOCATION + "/cookie-setter.py";
+/* Adds a div with "<time> [<tag>] - <message>" to the "#log" container.*/
+function log(message, tag) {
+ let log_str = document.createElement('div');
+ log_str.textContent = new Date().toTimeString().replace(/\s.+$/, '');
+ if (tag) {
+ log_str.textContent += " [" + tag + "] ";
+ }
+ log_str.textContent += " - " + message;
+ let log_container = document.getElementById("log");
+ log_container.appendChild(log_str);
+ log_container.scrollTo(0, log_container.scrollHeight);
+}
+
+/* Removes the "Cookie: " prefix and strip any leading or trailing whitespace.*/
function stripPrefixAndWhitespace(cookie_text) {
return cookie_text.replace(/^Cookie: /, '').replace(/^\s+|\s+$/g, '');
}
+/* Returns the absolute path of the resource folder, ignoring any navigation. */
function getLocalResourcesPath() {
let replace = "(" + SERVER_LOCATION + "\/)*"; // Redundant location.
replace += "[^\/]*$"; // Everything after the last "/".
return location.pathname.replace(new RegExp(replace), "") + SERVER_LOCATION;
}
+/* Returns the absolute server location ignoring any navgation.*/
function getAbsoluteServerLocation() {
// Replace the server location and everything coming after it ...
let replace = SERVER_LOCATION + ".*$";
@@ -18,6 +34,7 @@ function getAbsoluteServerLocation() {
return getLocalResourcesPath().replace(new RegExp(replace),'')+ SERVER_SCRIPT;
}
+/* Expires a cookie by name by setting it's expiry date into the past.*/
function expireCookie(name, expiry_date, path) {
name = name || "";
expiry_date = expiry_date || "Thu, 01 Jan 1970 00:00:00 UTC";
@@ -25,10 +42,16 @@ function expireCookie(name, expiry_date, path) {
document.cookie = name + "=; expires=" + expiry_date + "; path=" + path + ";";
}
+/* Captures a snapshot of cookies with |parse| and allows to diff it with a
+second snapshot with |diffWith|. This allows to run tests even if cookies were
+previously set that would mess with the expected final set of Cookies.
+With |resetCookies|, all cookies set between first and second snapshot are
+expired. */
function CookieManager() {
this.initial_cookies = [];
}
+/* Creates a snapshot of the current given document cookies.*/
CookieManager.prototype.parse = document_cookies => {
this.initial_cookies = [];
document_cookies = document_cookies.replace(/^Cookie: /, '');
@@ -37,22 +60,25 @@ CookieManager.prototype.parse = document_cookies => {
}
}
+/* Creates a diff of newly added cookies between the initial snapshot and the
+newly given cookies. The diff is stored for cleaning purposes. A second call
+will replace the the stored diff entirely.*/
CookieManager.prototype.diffWith = document_cookies => {
this.actual_cookies = document_cookies;
for (let i in initial_cookies) {
let no_spaces_cookie_regex =
- new RegExp(/\s*[\;]*\s/.source + initial_cookies[i]);
- this.actual_cookies = actual_cookies.replace(no_spaces_cookie_regex, '');
+ new RegExp(/\s*[\;]*\s/.source + initial_cookies[i].replace(/\\/, "\\\\"));
+ this.actual_cookies = this.actual_cookies.replace(no_spaces_cookie_regex, '');
}
return this.actual_cookies;
}
+/* Cleans cookies between the first and the second snapshot.
+Some tests might set cookies to the root path or cookies without key. Both cases
+are dropped here.*/
CookieManager.prototype.resetCookies = () => {
- expireCookie(/*name=*/""); // If a cookie without keys was accepted, drop it.
- if (this.actual_cookies == "") {
- return; // There is nothing to reset here.
- }
- let cookies_to_delete = this.actual_cookies.split(/\s*;\s*/)
+ // If a cookie without keys was accepted, drop it additionally.
+ let cookies_to_delete = [""].concat(this.actual_cookies.split(/\s*;\s*/))
for (let i in cookies_to_delete){
expireCookie(cookies_to_delete[i].replace(/=.*$/, ""));
// Drop cookies with same name that were set to the root path which happens
@@ -63,14 +89,27 @@ CookieManager.prototype.resetCookies = () => {
}
}
+/* Returns a new cookie test.
+The test creates an iframe where a |file| from the cookie-setter.py is loaded.
+This sets cookies which are diffed with an initial cookie snapshot and compared
+to the expectation that the server returned.
+Finally, it cleans up newly set cookies and all cookies in the root path or
+without key. */
function createCookieTest(file) {
return t => {
+ let iframe_container = document.getElementById("iframes");
const iframe = document.createElement('iframe');
- document.body.appendChild(iframe);
+ iframe_container.appendChild(iframe);
+ iframe_container.scrollTo(0, iframe_container.scrollHeight);
let diff_tool = new CookieManager();
t.add_cleanup(diff_tool.resetCookies);
return new Promise((resolve, reject) => {
diff_tool.parse(document.cookie);
+ if (diff_tool.initial_cookies.length > 0) {
+ // The cookies should ideally be empty. If that isn't the case, log it.
+ //Cookies with equal keys (e.g. foo=) may have unwanted side-effects.
+ log("Run with existing cookies: " + diff_tool.initial_cookies, file);
+ }
window.addEventListener("message", t.step_func(e => {
assert_true(!!e.data, "Message contains data")
resolve(e.data);
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-setter.py b/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-setter.py
index 0418f4b7630..758b1429f72 100644
--- a/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-setter.py
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/cookie-setter.py
@@ -1,5 +1,17 @@
-from os import path;
+from os import path
+from os import listdir
+"""
+The main purpose of this script is to set cookies based on files in this folder:
+ cookies/http-state/resources
+
+If a wpt server is running, navigate to
+ http://<server>/cookies/http-state/resources/cookie-setter.py
+which will run all cookie tests and explain the usage of this script in detail.
+
+If you want to run a test in isolation, append "?debug=" and the test id to the
+URL above.
+"""
SETUP_FILE_TEMPLATE = "{}-test"
EXPECTATION_FILE_TEMPLATE = "{}-expected"
@@ -7,13 +19,18 @@ EXPECTATION_HTML_SCAFFOLD = "iframe-expectation-doc.html.py-str"
DEBUGGING_HTML_SCAFFOLD = "debugging-single-test.html.py-str"
DEFAULT_RESOURCE_DIR = path.join("cookies", "http-state", "resources")
DEFAULT_TEST_DIR = "test-files"
+ALL_TESTS = "all-tests.html.py-str"
def dump_file(directory, filename):
+ """Reads a file into a string."""
return open(path.join(directory, filename), "r").read()
class CookieTestResponse(object):
+ """Loads the Set-Cookie header from a given file name. Relies on the naming
+ convention that ever test file is called '<test_id>-test' and every
+ expectation is called '<test_id>-expected'."""
def __init__(self, file, root):
super(CookieTestResponse, self).__init__()
self.__test_file = SETUP_FILE_TEMPLATE.format(file)
@@ -22,16 +39,36 @@ class CookieTestResponse(object):
self.__test_files_dir = path.join(self.__resources_dir, DEFAULT_TEST_DIR)
def cookie_setting_header(self):
+ """Returns the loaded header."""
return dump_file(self.__test_files_dir, self.__test_file)
def body_with_expectation(self):
+ """Returns a full HTML document which contains the expectation."""
html_frame = dump_file(self.__resources_dir, EXPECTATION_HTML_SCAFFOLD)
- expected_data = dump_file(self.__test_files_dir, self.__expectation_file);
+ expected_data = dump_file(self.__test_files_dir, self.__expectation_file)
return html_frame.format(**{'data' : expected_data})
+def find_all_test_files(root):
+ """Retrieves all files from the test-files/ folder and returns them as
+ string pair as used in the JavaScript object. Sorted by filename."""
+ all_files = []
+ line_template = '{{file: "{filename}", name: "{filename}"}},'
+ for file in listdir(path.join(root, DEFAULT_RESOURCE_DIR, DEFAULT_TEST_DIR)):
+ if file.endswith('-test'):
+ name = file.replace('-test', '')
+ all_files.append(line_template.format(**{'filename' : name}))
+ all_files.sort()
+ return all_files
+
+def generate_for_all_tests(root):
+ """Returns an HTML document which loads and executes all tests in the
+ test-files/ directory."""
+ html_frame = dump_file(path.join(root, DEFAULT_RESOURCE_DIR), ALL_TESTS)
+ return html_frame % '\n'.join(find_all_test_files(root))
def main(request, response):
if "debug" in request.GET:
+ """If '?debug=' is set, return the document for a single test."""
response.writer.write_status(200)
response.writer.end_headers()
html_frame = dump_file(path.join(request.doc_root, DEFAULT_RESOURCE_DIR),
@@ -40,15 +77,18 @@ def main(request, response):
response.writer.write_content(test_file)
return;
- if not "file" in request.GET:
- response.writer.write_status(404)
+ if "file" in request.GET:
+ """If '?file=' is set, send a cookie and a document which contains the
+ expectation of which cookies should be set by the browser in response."""
+ cookie_response = CookieTestResponse(request.GET['file'], request.doc_root)
+
+ response.writer.write_status(200)
+ response.writer.write(cookie_response.cookie_setting_header())
response.writer.end_headers()
- response.writer.write_content("The 'file' parameter is missing!")
+ response.writer.write_content(cookie_response.body_with_expectation())
return;
- cookie_response = CookieTestResponse(request.GET['file'], request.doc_root)
-
+ """Without any arguments, return documentation and run all available tests."""
response.writer.write_status(200)
- response.writer.write(cookie_response.cookie_setting_header())
response.writer.end_headers()
- response.writer.write_content(cookie_response.body_with_expectation())
+ response.writer.write_content(generate_for_all_tests(request.doc_root))
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/debugging-single-test.html.py-str b/tests/wpt/web-platform-tests/cookies/http-state/resources/debugging-single-test.html.py-str
index d34ff872c1d..40d9809a4bc 100644
--- a/tests/wpt/web-platform-tests/cookies/http-state/resources/debugging-single-test.html.py-str
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/debugging-single-test.html.py-str
@@ -8,9 +8,19 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="cookie-http-state-template.js"></script>
+ <style type="text/css">
+ .scrollable {
+ height:150px;
+ overflow-y:scroll;
+ }
+ </style>
</head>
<body>
- <div id="log"></div>
+ <h3>Log</h3>
+ <div id="log" class="scrollable"></div>
+ <h3>IFrame</h3>
+ <div id="iframes" class="toggleable scrollable"></div>
+ <h3>Test Results</h3>
<script>
setup({ explicit_timeout: true });
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0001-expected
new file mode 100644
index 00000000000..8646afc6366
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0001-expected
@@ -0,0 +1 @@
+Cookie: foo=春节回家路·春运完全手册
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0001-test
new file mode 100644
index 00000000000..e89a36dd89e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo=春节回家路·春运完全手册
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0002-expected
new file mode 100644
index 00000000000..fc7d2561017
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0002-expected
@@ -0,0 +1 @@
+Cookie: 春节回=家路·春运完全手册
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0002-test
new file mode 100644
index 00000000000..70ce472afa6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0002-test
@@ -0,0 +1 @@
+Set-Cookie: 春节回=家路·春运完全手册
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0003-expected
new file mode 100644
index 00000000000..1969bc86b97
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0003-expected
@@ -0,0 +1 @@
+Cookie: 春节回=家路·春运
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0003-test
new file mode 100644
index 00000000000..446e2fd29f2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0003-test
@@ -0,0 +1 @@
+Set-Cookie: 春节回=家路·春运; 完全手册
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0004-expected
new file mode 100644
index 00000000000..1d6d952989e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0004-expected
@@ -0,0 +1 @@
+Cookie: foo="春节回家路·春运完全手册"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0004-test
new file mode 100644
index 00000000000..1564ba4fc92
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/charset0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo="春节回家路·春运完全手册"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0001-expected
new file mode 100644
index 00000000000..1022f64a290
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0001-expected
@@ -0,0 +1 @@
+Cookie: a=b
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0001-test
new file mode 100644
index 00000000000..4635f0e7e37
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0001-test
@@ -0,0 +1 @@
+Set-Cookie: a=b
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0002-expected
new file mode 100644
index 00000000000..64932dcffb4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0002-expected
@@ -0,0 +1 @@
+Cookie: aBc="zzz "
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0002-test
new file mode 100644
index 00000000000..24ab0d2da56
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0002-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zzz " ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0003-expected
new file mode 100644
index 00000000000..64932dcffb4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0003-expected
@@ -0,0 +1 @@
+Cookie: aBc="zzz "
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0003-test
new file mode 100644
index 00000000000..bac41f99288
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0003-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zzz " ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0004-expected
new file mode 100644
index 00000000000..9be3e8f6435
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0004-expected
@@ -0,0 +1 @@
+Cookie: aBc="zz
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0004-test
new file mode 100644
index 00000000000..45cab2f409d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0004-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zz;pp" ; ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0005-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0005-expected
new file mode 100644
index 00000000000..9be3e8f6435
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0005-expected
@@ -0,0 +1 @@
+Cookie: aBc="zz
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0005-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0005-test
new file mode 100644
index 00000000000..c2dfebd3c44
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0005-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zz ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0006-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0006-expected
new file mode 100644
index 00000000000..8121145c18b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0006-expected
@@ -0,0 +1 @@
+Cookie: aBc="zzz " "ppp"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0006-test
new file mode 100644
index 00000000000..a9da26811a4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0006-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zzz " "ppp" ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0007-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0007-expected
new file mode 100644
index 00000000000..8121145c18b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0007-expected
@@ -0,0 +1 @@
+Cookie: aBc="zzz " "ppp"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0007-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0007-test
new file mode 100644
index 00000000000..dca20b8e7df
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0007-test
@@ -0,0 +1 @@
+Set-Cookie: aBc="zzz " "ppp" ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0008-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0008-expected
new file mode 100644
index 00000000000..602c0e017c4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0008-expected
@@ -0,0 +1 @@
+Cookie: aBc=A"B
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0008-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0008-test
new file mode 100644
index 00000000000..ece6c66f0b1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0008-test
@@ -0,0 +1 @@
+Set-Cookie: aBc=A"B ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0009-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0009-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0009-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0009-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0009-test
new file mode 100644
index 00000000000..eecdae60cc4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0009-test
@@ -0,0 +1 @@
+Set-Cookie: BLAHHH; path=/;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0010-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0010-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0010-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0010-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0010-test
new file mode 100644
index 00000000000..17a18ea9272
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0010-test
@@ -0,0 +1 @@
+Set-Cookie: "BLA\"HHH"; path=/;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0011-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0011-expected
new file mode 100644
index 00000000000..2062e231556
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0011-expected
@@ -0,0 +1 @@
+Cookie: a="B
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0011-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0011-test
new file mode 100644
index 00000000000..4000f269a49
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0011-test
@@ -0,0 +1 @@
+Set-Cookie: a="B
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0012-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0012-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0012-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0012-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0012-test
new file mode 100644
index 00000000000..b33a4e7427b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0012-test
@@ -0,0 +1 @@
+Set-Cookie: =ABC
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0013-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0013-expected
new file mode 100644
index 00000000000..5d2d06092c4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0013-expected
@@ -0,0 +1 @@
+Cookie: ABC=
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0013-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0013-test
new file mode 100644
index 00000000000..f61a087bb8f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0013-test
@@ -0,0 +1 @@
+Set-Cookie: ABC=; path = /
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0014-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0014-expected
new file mode 100644
index 00000000000..21bfd134e54
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0014-expected
@@ -0,0 +1 @@
+Cookie: A=BC
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0014-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0014-test
new file mode 100644
index 00000000000..edbb7931a38
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0014-test
@@ -0,0 +1 @@
+Set-Cookie: A = BC ;foo;;; bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0015-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0015-expected
new file mode 100644
index 00000000000..b968e7427a0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0015-expected
@@ -0,0 +1 @@
+Cookie: A=== BC
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0015-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0015-test
new file mode 100644
index 00000000000..80d32366b5d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0015-test
@@ -0,0 +1 @@
+Set-Cookie: A=== BC ;foo;;; bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0016-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0016-expected
new file mode 100644
index 00000000000..11d8efaea2a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0016-expected
@@ -0,0 +1 @@
+Cookie: foo="zohNumRKgI0oxyhSsV3Z7D"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0016-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0016-test
new file mode 100644
index 00000000000..8abf12026c7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0016-test
@@ -0,0 +1 @@
+Set-Cookie: foo="zohNumRKgI0oxyhSsV3Z7D" ; expires=Sun, 18-Apr-2027 21:06:29 GMT ; path=/ ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0017-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0017-expected
new file mode 100644
index 00000000000..6bb84483a05
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0017-expected
@@ -0,0 +1 @@
+Cookie: foo=zohNumRKgI0oxyhSsV3Z7D
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0017-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0017-test
new file mode 100644
index 00000000000..94cce02078b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0017-test
@@ -0,0 +1 @@
+Set-Cookie: foo=zohNumRKgI0oxyhSsV3Z7D ; expires=Sun, 18-Apr-2027 21:06:29 GMT ; path=/ ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0018-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0018-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0018-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0018-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0018-test
new file mode 100644
index 00000000000..145ad2c5def
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0018-test
@@ -0,0 +1 @@
+Set-Cookie:
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0019-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0019-expected
new file mode 100644
index 00000000000..b6df50eef28
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0019-expected
@@ -0,0 +1 @@
+Cookie: a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0019-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0019-test
new file mode 100644
index 00000000000..e3bcc4a18c3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0019-test
@@ -0,0 +1 @@
+Set-Cookie: a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0021-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0021-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0021-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0021-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0021-test
new file mode 100644
index 00000000000..145ad2c5def
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/chromium0021-test
@@ -0,0 +1 @@
+Set-Cookie:
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0001-expected
new file mode 100644
index 00000000000..ab55cea018a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0001-expected
@@ -0,0 +1 @@
+Cookie: foo=bar, baz=qux
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0001-test
new file mode 100644
index 00000000000..5b3678de396
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar, baz=qux
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0002-expected
new file mode 100644
index 00000000000..33590a08486
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0002-expected
@@ -0,0 +1 @@
+Cookie: foo="bar, baz=qux"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0002-test
new file mode 100644
index 00000000000..164c0a93bfc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0002-test
@@ -0,0 +1 @@
+Set-Cookie: foo="bar, baz=qux"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0003-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0003-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0003-test
new file mode 100644
index 00000000000..213d3a5f267
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0003-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; b,az=qux
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0004-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0004-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0004-test
new file mode 100644
index 00000000000..e93f6f4062c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; baz=q,ux
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0005-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0005-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0005-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0005-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0005-test
new file mode 100644
index 00000000000..eeb040d0a31
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Max-Age=50,399
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-test
new file mode 100644
index 00000000000..a3eaff03ba3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Expires=Fri, 07 Aug 2019 08:04:19 GMT
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-test
new file mode 100644
index 00000000000..29fb0a2695d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Expires=Fri 07 Aug 2019 08:04:19 GMT, baz=qux
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0020-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0020-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0020-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0020-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0020-test
new file mode 100644
index 00000000000..67cefa339ef
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0020-test
@@ -0,0 +1 @@
+Set-Cookie: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0022-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0022-expected
new file mode 100644
index 00000000000..8ac13216032
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0022-expected
@@ -0,0 +1 @@
+Cookie: AAA=BB
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0022-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0022-test
new file mode 100644
index 00000000000..1a8f35ffbd8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0022-test
Binary files differ
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0023-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0023-expected
new file mode 100644
index 00000000000..8ac13216032
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0023-expected
@@ -0,0 +1 @@
+Cookie: AAA=BB
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0023-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0023-test
new file mode 100644
index 00000000000..76a8ed4e9b8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-chromium0023-test
@@ -0,0 +1 @@
+Set-Cookie: AAA=BB ZYX
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-path0029-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-path0029-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-path0029-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-path0029-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-path0029-test
new file mode 100644
index 00000000000..d7219d590c6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/disabled-path0029-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/bar
+Location: /cookie-parser-result/f%6Fo/bar?disabled-path0029
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0001-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0001-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0001-test
new file mode 100644
index 00000000000..fd8926d7b4f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0001-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0001
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0002-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0002-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0002-test
new file mode 100644
index 00000000000..a6ad2a80856
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0002-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0002
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0003-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0003-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0003-test
new file mode 100644
index 00000000000..ff051f4806c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0003-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0003
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0004-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0004-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0004-test
new file mode 100644
index 00000000000..f05029bb5a7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0004-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?domain0004
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0005-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0005-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0005-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0005-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0005-test
new file mode 100644
index 00000000000..697ab186fcd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0005-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.home.example.org
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?domain0005
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0006-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0006-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0006-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0006-test
new file mode 100644
index 00000000000..fe5f90df9dc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0006-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.home.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0006
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0007-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0007-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0007-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0007-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0007-test
new file mode 100644
index 00000000000..1d2c6fcec62
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0007-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=sibling.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0007
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0008-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0008-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0008-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0008-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0008-test
new file mode 100644
index 00000000000..491c52de9da
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0008-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0008
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0009-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0009-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0009-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0009-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0009-test
new file mode 100644
index 00000000000..736e69fe8e5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0009-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0009
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0010-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0010-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0010-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0010-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0010-test
new file mode 100644
index 00000000000..5bf212f27d8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0010-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=..home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0010
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0011-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0011-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0011-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0011-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0011-test
new file mode 100644
index 00000000000..e1c54db25ed
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0011-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home..example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0011
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0012-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0012-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0012-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0012-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0012-test
new file mode 100644
index 00000000000..a189f38087a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0012-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain= .home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0012
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0013-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0013-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0013-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0013-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0013-test
new file mode 100644
index 00000000000..8493146e767
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0013-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain= . home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0013
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0014-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0014-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0014-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0014-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0014-test
new file mode 100644
index 00000000000..adccd0d3205
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0014-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org.
+Location: http://home.example.org:8888/cookie-parser-result?domain0014
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0015-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0015-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0015-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0015-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0015-test
new file mode 100644
index 00000000000..c123ba940d3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0015-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org..
+Location: http://home.example.org:8888/cookie-parser-result?domain0015
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0016-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0016-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0016-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0016-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0016-test
new file mode 100644
index 00000000000..9136ac4d86a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0016-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org .
+Location: http://home.example.org:8888/cookie-parser-result?domain0016
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0017-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0017-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0017-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0017-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0017-test
new file mode 100644
index 00000000000..8e876b8d687
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0017-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0017
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0018-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0018-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0018-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0018-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0018-test
new file mode 100644
index 00000000000..3763f9625ef
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0018-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.org.
+Location: http://home.example.org:8888/cookie-parser-result?domain0018
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0019-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0019-expected
new file mode 100644
index 00000000000..1f359c4850b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0019-expected
@@ -0,0 +1 @@
+Cookie: foo=bar; foo2=bar2
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0019-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0019-test
new file mode 100644
index 00000000000..f5aebfd0e10
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0019-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Set-Cookie: foo2=bar2; domain=.home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0019
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0020-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0020-expected
new file mode 100644
index 00000000000..5eb3ac42d41
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0020-expected
@@ -0,0 +1 @@
+Cookie: foo2=bar2; foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0020-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0020-test
new file mode 100644
index 00000000000..1c7a61c85f6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0020-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo2=bar2; domain=.home.example.org
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0020
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0021-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0021-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0021-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0021-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0021-test
new file mode 100644
index 00000000000..895744eac5d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0021-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain="home.example.org"
+Location: http://home.example.org:8888/cookie-parser-result?domain0021
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0022-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0022-expected
new file mode 100644
index 00000000000..1f359c4850b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0022-expected
@@ -0,0 +1 @@
+Cookie: foo=bar; foo2=bar2
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0022-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0022-test
new file mode 100644
index 00000000000..6eeae00159f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0022-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Set-Cookie: foo2=bar2; domain=.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0022
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0023-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0023-expected
new file mode 100644
index 00000000000..5eb3ac42d41
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0023-expected
@@ -0,0 +1 @@
+Cookie: foo2=bar2; foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0023-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0023-test
new file mode 100644
index 00000000000..91a81ed003c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0023-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo2=bar2; domain=.example.org
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0023
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0024-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0024-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0024-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0024-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0024-test
new file mode 100644
index 00000000000..63157b9b457
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0024-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.example.org; domain=home.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0024
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0025-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0025-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0025-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0025-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0025-test
new file mode 100644
index 00000000000..353c3bb6346
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0025-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0025
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0026-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0026-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0026-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0026-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0026-test
new file mode 100644
index 00000000000..3b14e307546
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0026-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.eXaMpLe.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0026
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0027-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0027-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0027-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0027-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0027-test
new file mode 100644
index 00000000000..8b7adbd17a1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0027-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org:8888
+Location: http://home.example.org:8888/cookie-parser-result?domain0027
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0028-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0028-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0028-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0028-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0028-test
new file mode 100644
index 00000000000..ab8f2c401eb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0028-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=subdomain.home.example.org
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?domain0028
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0029-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0029-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0029-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0029-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0029-test
new file mode 100644
index 00000000000..cfab57a6e49
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0029-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?domain0029
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0031-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0031-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0031-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0031-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0031-test
new file mode 100644
index 00000000000..6eccb78b8b8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0031-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0031
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0033-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0033-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0033-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0033-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0033-test
new file mode 100644
index 00000000000..7fdcc8356a1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0033-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org
+Location: http://hoMe.eXaMplE.org:8888/cookie-parser-result?domain0033
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0034-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0034-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0034-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0034-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0034-test
new file mode 100644
index 00000000000..d3f4723fd08
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0034-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=home.example.com
+Location: http://home.example.org:8888/cookie-parser-result?domain0034
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0035-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0035-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0035-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0035-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0035-test
new file mode 100644
index 00000000000..967d248c256
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0035-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.com; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0035
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0036-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0036-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0036-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0036-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0036-test
new file mode 100644
index 00000000000..a618ec4dd20
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0036-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=home.example.com; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0036
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0037-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0037-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0037-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0037-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0037-test
new file mode 100644
index 00000000000..c61fe8f2762
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0037-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.com; domain=home.example.org; domain=home.example.com
+Location: http://home.example.org:8888/cookie-parser-result?domain0037
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0038-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0038-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0038-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0038-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0038-test
new file mode 100644
index 00000000000..2d8fcca5731
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0038-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0038
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0039-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0039-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0039-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0039-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0039-test
new file mode 100644
index 00000000000..3225b28baac
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0039-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=home.example.org; domain=example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0039
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0040-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0040-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0040-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0040-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0040-test
new file mode 100644
index 00000000000..3e32fa895c3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0040-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=example.org; domain=home.example.org
+Location: http://home.example.org:8888/cookie-parser-result?domain0040
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0041-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0041-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0041-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0041-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0041-test
new file mode 100644
index 00000000000..6fbc4ad1141
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0041-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.sibling.example.org
+Location: http://sibling.example.org:8888/cookie-parser-result?domain0041
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0042-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0042-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0042-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0042-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0042-test
new file mode 100644
index 00000000000..9258624cc56
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/domain0042-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=.sibling.home.example.org
+Location: http://sibling.home.example.org:8888/cookie-parser-result?domain0042
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0001-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0001-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0001-test
new file mode 100644
index 00000000000..53f98e23b2a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=-1
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0002-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0002-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0002-test
new file mode 100644
index 00000000000..a79c5be41f4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0002-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=0
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0003-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0003-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0003-test
new file mode 100644
index 00000000000..785c326fae4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0003-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; expires=Thu, 10 Apr 1980 16:33:12 GMT
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0004-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0004-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0004-test
new file mode 100644
index 00000000000..567134f5d3a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=60
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0005-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0005-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0005-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0005-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0005-test
new file mode 100644
index 00000000000..0fa350adc36
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=-20
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0006-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0006-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0006-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0006-test
new file mode 100644
index 00000000000..567134f5d3a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0006-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; max-age=60
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0007-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0007-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0007-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0007-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0007-test
new file mode 100644
index 00000000000..785c326fae4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0007-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; expires=Thu, 10 Apr 1980 16:33:12 GMT
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0008-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0008-expected
new file mode 100644
index 00000000000..0f62babd8b0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0008-expected
@@ -0,0 +1 @@
+Cookie: foo=bar; foo1=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0008-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0008-test
new file mode 100644
index 00000000000..d6350d6c7b5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0008-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; max-age=60
+Set-Cookie: foo1=bar; max-age=60
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0009-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0009-expected
new file mode 100644
index 00000000000..555fbaf5471
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0009-expected
@@ -0,0 +1 @@
+Cookie: foo1=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0009-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0009-test
new file mode 100644
index 00000000000..84944d4d50b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0009-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo=bar; max-age=60
+Set-Cookie: foo1=bar; max-age=60
+Set-Cookie: foo=differentvalue; max-age=0
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0010-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0010-expected
new file mode 100644
index 00000000000..555fbaf5471
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0010-expected
@@ -0,0 +1 @@
+Cookie: foo1=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0010-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0010-test
new file mode 100644
index 00000000000..13477a47c26
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0010-test
@@ -0,0 +1,4 @@
+Set-Cookie: foo=bar; max-age=60
+Set-Cookie: foo1=bar; max-age=60
+Set-Cookie: foo=differentvalue; max-age=0
+Set-Cookie: foo2=evendifferentvalue; max-age=0
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0011-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0011-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0011-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0011-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0011-test
new file mode 100644
index 00000000000..bba20536edd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0011-test
@@ -0,0 +1 @@
+Set-Cookie: test=parser; domain=.parser.test; ;; ;=; ,,, ===,abc,=; abracadabra! max-age=20;=;;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0012-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0012-expected
new file mode 100644
index 00000000000..10e669a0134
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0012-expected
@@ -0,0 +1 @@
+Cookie: test="fubar! = foo
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0012-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0012-test
new file mode 100644
index 00000000000..9ba773f5c74
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0012-test
@@ -0,0 +1,2 @@
+Set-Cookie: test="fubar! = foo;bar\";" parser; max-age=6
+Set-Cookie: five; max-age=2.63,
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0013-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0013-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0013-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0013-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0013-test
new file mode 100644
index 00000000000..d491267e4aa
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0013-test
@@ -0,0 +1,2 @@
+Set-Cookie: test=kill; max-age=0
+Set-Cookie: five; max-age=0
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0014-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0014-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0014-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0014-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0014-test
new file mode 100644
index 00000000000..4cc1f450756
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0014-test
@@ -0,0 +1 @@
+Set-Cookie: six
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0015-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0015-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0015-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0015-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0015-test
new file mode 100644
index 00000000000..13254db6886
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0015-test
@@ -0,0 +1,2 @@
+Set-Cookie: six
+Set-Cookie: seven
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0016-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0016-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0016-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0016-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0016-test
new file mode 100644
index 00000000000..6aab3e80d6f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0016-test
@@ -0,0 +1,3 @@
+Set-Cookie: six
+Set-Cookie: seven
+Set-Cookie: =eight
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0017-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0017-expected
new file mode 100644
index 00000000000..fc9a2496c60
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0017-expected
@@ -0,0 +1 @@
+Cookie: test=six
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0017-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0017-test
new file mode 100644
index 00000000000..b6c297cc77d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/mozilla0017-test
@@ -0,0 +1,4 @@
+Set-Cookie: six
+Set-Cookie: seven
+Set-Cookie: =eight
+Set-Cookie: test=six
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0001-expected
new file mode 100644
index 00000000000..96527926e10
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0001-expected
@@ -0,0 +1 @@
+Cookie: a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0001-test
new file mode 100644
index 00000000000..3ce5f5f9824
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0001-test
@@ -0,0 +1 @@
+Set-Cookie: a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0002-expected
new file mode 100644
index 00000000000..d4d3cda811b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0002-expected
@@ -0,0 +1 @@
+Cookie: 1=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0002-test
new file mode 100644
index 00000000000..d6eac8a757a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0002-test
@@ -0,0 +1 @@
+Set-Cookie: 1=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0003-expected
new file mode 100644
index 00000000000..0c00f45c4a4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0003-expected
@@ -0,0 +1 @@
+Cookie: $=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0003-test
new file mode 100644
index 00000000000..7ea96155bd7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0003-test
@@ -0,0 +1 @@
+Set-Cookie: $=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0004-expected
new file mode 100644
index 00000000000..b079529aa24
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0004-expected
@@ -0,0 +1 @@
+Cookie: !a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0004-test
new file mode 100644
index 00000000000..99f0e61801a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0004-test
@@ -0,0 +1 @@
+Set-Cookie: !a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0005-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0005-expected
new file mode 100644
index 00000000000..a0f031bb34e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0005-expected
@@ -0,0 +1 @@
+Cookie: @a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0005-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0005-test
new file mode 100644
index 00000000000..9e33e0c8e47
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0005-test
@@ -0,0 +1 @@
+Set-Cookie: @a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0006-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0006-expected
new file mode 100644
index 00000000000..ee0e7d7c335
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0006-expected
@@ -0,0 +1 @@
+Cookie: #a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0006-test
new file mode 100644
index 00000000000..fbd03632c61
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0006-test
@@ -0,0 +1 @@
+Set-Cookie: #a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0007-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0007-expected
new file mode 100644
index 00000000000..6d6e56ebe59
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0007-expected
@@ -0,0 +1 @@
+Cookie: $a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0007-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0007-test
new file mode 100644
index 00000000000..d41e64b87ec
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0007-test
@@ -0,0 +1 @@
+Set-Cookie: $a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0008-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0008-expected
new file mode 100644
index 00000000000..a4b8c242825
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0008-expected
@@ -0,0 +1 @@
+Cookie: %a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0008-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0008-test
new file mode 100644
index 00000000000..7afcf700376
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0008-test
@@ -0,0 +1 @@
+Set-Cookie: %a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0009-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0009-expected
new file mode 100644
index 00000000000..49506acc248
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0009-expected
@@ -0,0 +1 @@
+Cookie: ^a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0009-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0009-test
new file mode 100644
index 00000000000..f40d2c4d6b9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0009-test
@@ -0,0 +1 @@
+Set-Cookie: ^a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0010-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0010-expected
new file mode 100644
index 00000000000..1e72557892b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0010-expected
@@ -0,0 +1 @@
+Cookie: &a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0010-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0010-test
new file mode 100644
index 00000000000..fb4fd921be3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0010-test
@@ -0,0 +1 @@
+Set-Cookie: &a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0011-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0011-expected
new file mode 100644
index 00000000000..260d7028a01
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0011-expected
@@ -0,0 +1 @@
+Cookie: *a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0011-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0011-test
new file mode 100644
index 00000000000..b36b72388f2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0011-test
@@ -0,0 +1 @@
+Set-Cookie: *a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0012-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0012-expected
new file mode 100644
index 00000000000..0a2686a1525
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0012-expected
@@ -0,0 +1 @@
+Cookie: (a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0012-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0012-test
new file mode 100644
index 00000000000..6927aac6fa0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0012-test
@@ -0,0 +1 @@
+Set-Cookie: (a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0013-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0013-expected
new file mode 100644
index 00000000000..87dec78b622
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0013-expected
@@ -0,0 +1 @@
+Cookie: )a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0013-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0013-test
new file mode 100644
index 00000000000..59ada98321c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0013-test
@@ -0,0 +1 @@
+Set-Cookie: )a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0014-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0014-expected
new file mode 100644
index 00000000000..82bfe0e60ac
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0014-expected
@@ -0,0 +1 @@
+Cookie: -a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0014-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0014-test
new file mode 100644
index 00000000000..a113e99be5e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0014-test
@@ -0,0 +1 @@
+Set-Cookie: -a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0015-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0015-expected
new file mode 100644
index 00000000000..390b77b30c4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0015-expected
@@ -0,0 +1 @@
+Cookie: _a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0015-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0015-test
new file mode 100644
index 00000000000..60fc0746ba2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0015-test
@@ -0,0 +1 @@
+Set-Cookie: _a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0016-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0016-expected
new file mode 100644
index 00000000000..7d4d9e33079
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0016-expected
@@ -0,0 +1 @@
+Cookie: +=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0016-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0016-test
new file mode 100644
index 00000000000..371dbcde6ca
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0016-test
@@ -0,0 +1 @@
+Set-Cookie: +=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0017-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0017-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0017-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0017-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0017-test
new file mode 100644
index 00000000000..056143166bd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0017-test
@@ -0,0 +1 @@
+Set-Cookie: =a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0018-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0018-expected
new file mode 100644
index 00000000000..96527926e10
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0018-expected
@@ -0,0 +1 @@
+Cookie: a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0018-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0018-test
new file mode 100644
index 00000000000..e86a48360cf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0018-test
@@ -0,0 +1 @@
+Set-Cookie: a =bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0019-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0019-expected
new file mode 100644
index 00000000000..8d0bc2d07d6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0019-expected
@@ -0,0 +1 @@
+Cookie: "a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0019-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0019-test
new file mode 100644
index 00000000000..d48e3f6954a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0019-test
@@ -0,0 +1 @@
+Set-Cookie: "a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0020-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0020-expected
new file mode 100644
index 00000000000..aa9cd6d435c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0020-expected
@@ -0,0 +1 @@
+Cookie: "a=b"=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0020-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0020-test
new file mode 100644
index 00000000000..b84f64d1798
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0020-test
@@ -0,0 +1 @@
+Set-Cookie: "a=b"=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0021-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0021-expected
new file mode 100644
index 00000000000..206ff76e3e3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0021-expected
@@ -0,0 +1 @@
+Cookie: "a=qux
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0021-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0021-test
new file mode 100644
index 00000000000..56b319e9d49
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0021-test
@@ -0,0 +1,2 @@
+Set-Cookie: "a=b"=bar
+Set-Cookie: "a=qux
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0022-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0022-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0022-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0022-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0022-test
new file mode 100644
index 00000000000..cc59ff17eda
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0022-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0023-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0023-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0023-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0023-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0023-test
new file mode 100644
index 00000000000..b7f9cc257d2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0023-test
@@ -0,0 +1 @@
+Set-Cookie: foo;bar=baz
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0024-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0024-expected
new file mode 100644
index 00000000000..5ac4f2535c8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0024-expected
@@ -0,0 +1 @@
+Cookie: $Version=1
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0024-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0024-test
new file mode 100644
index 00000000000..da7b696da91
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0024-test
@@ -0,0 +1 @@
+Set-Cookie: $Version=1; foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0025-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0025-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0025-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0025-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0025-test
new file mode 100644
index 00000000000..708f006b9c0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0025-test
@@ -0,0 +1 @@
+Set-Cookie: ===a=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0026-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0026-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0026-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0026-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0026-test
new file mode 100644
index 00000000000..bbeb77a029c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0026-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0027-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0027-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0027-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0027-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0027-test
new file mode 100644
index 00000000000..d222227e6de
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0027-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar ;
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0028-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0028-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0028-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0028-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0028-test
new file mode 100644
index 00000000000..1c197e3324c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0028-test
@@ -0,0 +1 @@
+Set-Cookie: =a
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0029-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0029-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0029-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0029-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0029-test
new file mode 100644
index 00000000000..44212468d44
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0029-test
@@ -0,0 +1 @@
+Set-Cookie: =
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0030-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0030-expected
new file mode 100644
index 00000000000..a391380fb66
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0030-expected
@@ -0,0 +1 @@
+Cookie: foo bar=baz
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0030-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0030-test
new file mode 100644
index 00000000000..cf3ff160f45
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0030-test
@@ -0,0 +1 @@
+Set-Cookie: foo bar=baz
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0031-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0031-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0031-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0031-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0031-test
new file mode 100644
index 00000000000..93941849040
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0031-test
@@ -0,0 +1 @@
+Set-Cookie: "foo;bar"=baz
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0032-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0032-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0032-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0032-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0032-test
new file mode 100644
index 00000000000..93fc9752333
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0032-test
@@ -0,0 +1 @@
+Set-Cookie: "foo\"bar;baz"=qux
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0033-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0033-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0033-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0033-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0033-test
new file mode 100644
index 00000000000..7bbdd89566a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/name0033-test
@@ -0,0 +1,2 @@
+Set-Cookie: =foo=bar
+Set-Cookie: aaa
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0030-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0030-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0030-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0030-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0030-test
new file mode 100644
index 00000000000..3ab75aa3a07
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0030-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=
+Location: http://home.example.org:8888/cookie-parser-result?optional-domain0030
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0041-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0041-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0041-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0041-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0041-test
new file mode 100644
index 00000000000..b85a6c9e43c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0041-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=example.org; domain=
+Location: http://home.example.org:8888/cookie-parser-result?optional-domain0041
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0042-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0042-expected
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0042-expected
@@ -0,0 +1 @@
+
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0042-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0042-test
new file mode 100644
index 00000000000..524d192b6e7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0042-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=foo.example.org; domain=
+Location: http://home.example.org:8888/cookie-parser-result?optional-domain0042
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0043-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0043-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0043-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0043-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0043-test
new file mode 100644
index 00000000000..506cdc46e52
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/optional-domain0043-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; domain=foo.example.org; domain=
+Location: http://subdomain.home.example.org:8888/cookie-parser-result?optional-domain0043
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/ordering0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/ordering0001-expected
new file mode 100644
index 00000000000..3d819593f53
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/ordering0001-expected
@@ -0,0 +1 @@
+Cookie: key=val5; key=val1; key=val2; key=val4
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/ordering0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/ordering0001-test
new file mode 100644
index 00000000000..ba6e85c44cd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/ordering0001-test
@@ -0,0 +1,7 @@
+Set-Cookie: key=val0;
+Set-Cookie: key=val1; path=/cookie-parser-result
+Set-Cookie: key=val2; path=/
+Set-Cookie: key=val3; path=/bar
+Set-Cookie: key=val4; domain=.example.org
+Set-Cookie: key=val5; domain=.example.org; path=/cookie-parser-result/foo
+Location: /cookie-parser-result/foo/baz?ordering0001
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0001-expected
new file mode 100644
index 00000000000..785d0a2f5f7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0001-expected
@@ -0,0 +1 @@
+Cookie: x=y; a=b
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0001-test
new file mode 100644
index 00000000000..ed81cb955f7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0001-test
@@ -0,0 +1,2 @@
+Set-Cookie: a=b; path=/
+Set-Cookie: x=y; path=/cookie-parser-result
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0002-expected
new file mode 100644
index 00000000000..2314ba0d495
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0002-expected
@@ -0,0 +1 @@
+Cookie: a=b; x=y
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0002-test
new file mode 100644
index 00000000000..22493285185
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0002-test
@@ -0,0 +1,2 @@
+Set-Cookie: a=b; path=/cookie-parser-result
+Set-Cookie: x=y; path=/
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0003-expected
new file mode 100644
index 00000000000..2314ba0d495
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0003-expected
@@ -0,0 +1 @@
+Cookie: a=b; x=y
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0003-test
new file mode 100644
index 00000000000..e4b5a4b2565
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0003-test
@@ -0,0 +1,2 @@
+Set-Cookie: x=y; path=/
+Set-Cookie: a=b; path=/cookie-parser-result
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0004-expected
new file mode 100644
index 00000000000..785d0a2f5f7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0004-expected
@@ -0,0 +1 @@
+Cookie: x=y; a=b
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0004-test
new file mode 100644
index 00000000000..a80ea6ec015
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0004-test
@@ -0,0 +1,2 @@
+Set-Cookie: x=y; path=/cookie-parser-result
+Set-Cookie: a=b; path=/
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0005-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0005-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0005-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0005-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0005-test
new file mode 100644
index 00000000000..6447c9164f9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0006-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0006-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0006-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0006-test
new file mode 100644
index 00000000000..07ecf27b82b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0006-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar
+Set-Cookie: foo=qux; path=/cookie-parser-result/foo
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0007-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0007-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0007-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0007-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0007-test
new file mode 100644
index 00000000000..66a54de7420
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0007-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo
+Location: /cookie-parser-result/foo?path0007
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0008-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0008-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0008-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0008-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0008-test
new file mode 100644
index 00000000000..b10012d3096
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0008-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo
+Location: /cookie-parser-result/bar?path0008
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0009-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0009-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0009-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0009-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0009-test
new file mode 100644
index 00000000000..874f21bad97
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0009-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux
+Location: /cookie-parser-result/foo?path0009
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0010-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0010-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0010-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0010-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0010-test
new file mode 100644
index 00000000000..0ea62fd5ec5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0010-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux
+Location: /cookie-parser-result/foo/qux?path0010
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0011-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0011-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0011-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0011-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0011-test
new file mode 100644
index 00000000000..35ea0620495
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0011-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux
+Location: /cookie-parser-result/bar/qux?path0011
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0012-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0012-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0012-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0012-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0012-test
new file mode 100644
index 00000000000..4c0577897bd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0012-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux
+Location: /cookie-parser-result/foo/baz?path0012
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0013-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0013-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0013-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0013-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0013-test
new file mode 100644
index 00000000000..d17b99b6b43
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0013-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux/
+Location: /cookie-parser-result/foo/baz?path0013
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0014-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0014-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0014-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0014-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0014-test
new file mode 100644
index 00000000000..a953e707b3b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0014-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux/
+Location: /cookie-parser-result/foo/qux?path0014
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0015-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0015-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0015-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0015-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0015-test
new file mode 100644
index 00000000000..253a9bb2fcd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0015-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux/
+Location: /cookie-parser-result/foo/qux/?path0015
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0016-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0016-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0016-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0016-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0016-test
new file mode 100644
index 00000000000..433faeb9120
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0016-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/
+Location: /cookie-parser-result/foo/qux?path0016
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0017-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0017-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0017-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0017-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0017-test
new file mode 100644
index 00000000000..a602d7ca6fe
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0017-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/
+Location: /cookie-parser-result/foo//qux?path0017
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0018-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0018-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0018-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0018-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0018-test
new file mode 100644
index 00000000000..37040dac5d3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0018-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/
+Location: /cookie-parser-result/fooqux?path0018
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0019-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0019-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0019-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0019-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0019-test
new file mode 100644
index 00000000000..6d498600a2f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0019-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0020-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0020-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0020-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0020-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0020-test
new file mode 100644
index 00000000000..603eded7ebd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0020-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0021-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0021-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0021-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0021-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0021-test
new file mode 100644
index 00000000000..4577c510a42
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0021-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=/
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0022-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0022-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0022-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0022-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0022-test
new file mode 100644
index 00000000000..4aade9e0145
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0022-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path= /
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0023-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0023-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0023-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0023-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0023-test
new file mode 100644
index 00000000000..f14d683df97
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0023-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; Path=/cookie-PARSER-result
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0024-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0024-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0024-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0024-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0024-test
new file mode 100644
index 00000000000..18a71c875b4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0024-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux?
+Location: /cookie-parser-result/foo/qux?path0024
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0025-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0025-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0025-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0025-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0025-test
new file mode 100644
index 00000000000..b6c497b9715
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0025-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux#
+Location: /cookie-parser-result/foo/qux?path0025
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0026-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0026-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0026-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0026-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0026-test
new file mode 100644
index 00000000000..ffc3b7a54fa
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0026-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/foo/qux;
+Location: /cookie-parser-result/foo/qux?path0026
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0027-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0027-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0027-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0027-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0027-test
new file mode 100644
index 00000000000..bd021f33e2c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0027-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path="/cookie-parser-result/foo/qux;"
+Location: /cookie-parser-result/foo/qux?path0027
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0028-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0028-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0028-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0028-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0028-test
new file mode 100644
index 00000000000..3bcd6a5c657
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0028-test
@@ -0,0 +1,2 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result/f%6Fo/bar
+Location: /cookie-parser-result/foo/bar?path0028
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0029-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0029-expected
new file mode 100644
index 00000000000..1022f64a290
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0029-expected
@@ -0,0 +1 @@
+Cookie: a=b
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0029-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0029-test
new file mode 100644
index 00000000000..17bd42f4212
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0029-test
@@ -0,0 +1,2 @@
+Set-Cookie: a=b; path = /cookie-parser-result
+Set-Cookie: x=y; path = /book
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0030-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0030-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0030-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0030-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0030-test
new file mode 100644
index 00000000000..e17a2d490b7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0030-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=/dog; path=
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0031-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0031-expected
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0031-expected
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0031-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0031-test
new file mode 100644
index 00000000000..3b24090b338
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0031-test
@@ -0,0 +1 @@
+Set-Cookie: foo=bar; path=; path=/dog
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0032-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0032-expected
new file mode 100644
index 00000000000..e7403c4aadc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0032-expected
@@ -0,0 +1 @@
+Cookie: foo=qux; foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0032-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0032-test
new file mode 100644
index 00000000000..db6ceb2ea06
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/path0032-test
@@ -0,0 +1,3 @@
+Set-Cookie: foo=bar; path=/cookie-parser-result
+Set-Cookie: foo=qux; path=/cookie-parser-result/
+Location: /cookie-parser-result/dog?path0032
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0001-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0001-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0001-test
new file mode 100644
index 00000000000..38b7dd296e6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0001-test
@@ -0,0 +1 @@
+Set-Cookie: foo= bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0002-expected
new file mode 100644
index 00000000000..9e96a81e3b4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0002-expected
@@ -0,0 +1 @@
+Cookie: foo="bar"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0002-test
new file mode 100644
index 00000000000..bed691f1809
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0002-test
@@ -0,0 +1 @@
+Set-Cookie: foo="bar"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0003-expected
new file mode 100644
index 00000000000..5cc2d467ef7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0003-expected
@@ -0,0 +1 @@
+Cookie: foo=" bar "
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0003-test
new file mode 100644
index 00000000000..ce1d455201d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0003-test
@@ -0,0 +1 @@
+Set-Cookie: foo=" bar "
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0004-expected
new file mode 100644
index 00000000000..400030f6f1d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0004-expected
@@ -0,0 +1 @@
+Cookie: foo="bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0004-test
new file mode 100644
index 00000000000..c569216520c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0004-test
@@ -0,0 +1 @@
+Set-Cookie: foo="bar;baz"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0005-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0005-expected
new file mode 100644
index 00000000000..cad285f7086
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0005-expected
@@ -0,0 +1 @@
+Cookie: foo="bar=baz"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0005-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0005-test
new file mode 100644
index 00000000000..514c0f125f1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0005-test
@@ -0,0 +1 @@
+Set-Cookie: foo="bar=baz"
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0006-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0006-expected
new file mode 100644
index 00000000000..b14d4f69b58
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0006-expected
@@ -0,0 +1 @@
+Cookie: foo=bar
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0006-test
new file mode 100644
index 00000000000..a939a822914
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/value0006-test
@@ -0,0 +1 @@
+Set-Cookie: foo = bar ; ttt
diff --git a/tests/wpt/web-platform-tests/cookies/http-state/value-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/value-tests.html
new file mode 100644
index 00000000000..cb09034ae85
--- /dev/null
+++ b/tests/wpt/web-platform-tests/cookies/http-state/value-tests.html
@@ -0,0 +1,41 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8>
+ <title>Tests basic cookie setting functionality</title>
+ <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/cookie-http-state-template.js"></script>
+ </head>
+ <body style="background:#EEE">
+ <h3>Log</h3>
+ <div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>IFrames</h3>
+ <div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
+ </div>
+ <h3>Test Results</h3>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const TEST_CASES = [
+ {file: "value0001", name: "value0001"},
+ {file: "value0002", name: "value0002"},
+ {file: "value0003", name: "value0003"},
+ {file: "value0004", name: "value0004"},
+ {file: "value0005", name: "value0005"},
+ {file: "value0006", name: "value0006"},
+ ];
+
+ for (const i in TEST_CASES) {
+ const t = TEST_CASES[i];
+ promise_test(createCookieTest(t.file),
+ t.file + " - " + t.name,
+ { timeout: 3000 });
+ }
+
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__host.header.html b/tests/wpt/web-platform-tests/cookies/prefix/__host.header.html
index 5a522cbaa01..de46485e44c 100644
--- a/tests/wpt/web-platform-tests/cookies/prefix/__host.header.html
+++ b/tests/wpt/web-platform-tests/cookies/prefix/__host.header.html
@@ -8,6 +8,7 @@
set_prefixed_cookie_via_http_test({
prefix: "__Host-",
params: "Path=/;" + extraParams,
+ origin: self.origin,
shouldExistInDOM: false,
shouldExistViaHTTP: false,
title: "__Host: Non-secure origin: Does not set 'Path=/;" + extraParams + "'"
@@ -17,6 +18,7 @@
set_prefixed_cookie_via_http_test({
prefix: "__Host-",
params: "Secure; Path=/;" + extraParams,
+ origin: self.origin,
shouldExistInDOM: false,
shouldExistViaHTTP: false,
title: "__Host: Non-secure origin: Does not set 'Secure; Path=/;" + extraParams + "'"
@@ -26,6 +28,7 @@
set_prefixed_cookie_via_http_test({
prefix: "__Host-",
params: "Secure; Path=/; Domain=" + document.location.hostname + "; " + extraParams,
+ origin: self.origin,
shouldExistInDOM: false,
shouldExistViaHTTP: false,
title: "__Host: Secure origin: Does not set 'Secure; Path=/; Domain=" + document.location.hostname + "; " + extraParams + "'"
@@ -35,6 +38,7 @@
set_prefixed_cookie_via_http_test({
prefix: "__Host-",
params: "Secure; Path=/cookies/resources/list.py",
+ origin: self.origin,
shouldExistInDOM: false,
shouldExistViaHTTP: false,
title: "__Host: Non-secure origin: Does not set 'Secure; Path=/cookies/resources/list.py'"
diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__host.header.https.html b/tests/wpt/web-platform-tests/cookies/prefix/__host.header.https.html
index 53d0dba6598..a71f75ef41b 100644
--- a/tests/wpt/web-platform-tests/cookies/prefix/__host.header.https.html
+++ b/tests/wpt/web-platform-tests/cookies/prefix/__host.header.https.html
@@ -8,6 +8,7 @@
set_prefixed_cookie_via_http_test({
prefix: "__Host-",
params: "Path=/;" + extraParams,
+ origin: self.origin,
shouldExistInDOM: false,
shouldExistViaHTTP: false,
title: "__Host: Secure origin: Does not set 'Path=/;" + extraParams + "'"
@@ -17,6 +18,7 @@
set_prefixed_cookie_via_http_test({
prefix: "__Host-",
params: "Secure; Path=/;" + extraParams,
+ origin: self.origin,
shouldExistInDOM: true,
shouldExistViaHTTP: true,
title: "__Host: Secure origin: Does set 'Secure; Path=/;" + extraParams + "'"
@@ -26,6 +28,7 @@
set_prefixed_cookie_via_http_test({
prefix: "__Host-",
params: "Secure; Path=/; Domain=" + document.location.hostname + "; " + extraParams,
+ origin: self.origin,
shouldExistInDOM: false,
shouldExistViaHTTP: false,
title: "__Host: Secure origin: Does not set 'Secure; Path=/; Domain=" + document.location.hostname + "; " + extraParams + "'"
@@ -35,6 +38,7 @@
set_prefixed_cookie_via_http_test({
prefix: "__Host-",
params: "Secure; Path=/cookies/resources/list.py",
+ origin: self.origin,
shouldExistInDOM: false,
shouldExistViaHTTP: false,
title: "__Host: Secure origin: Does not set 'Secure; Path=/cookies/resources/list.py'"
diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.html b/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.html
index 431e0e1ec98..fb369b62a3b 100644
--- a/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.html
+++ b/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.html
@@ -8,6 +8,7 @@
set_prefixed_cookie_via_http_test({
prefix: "__Secure-",
params: "Path=/;" + extraParams,
+ origin: self.origin,
shouldExistViaHTTP: false,
title: "__Secure: Non-secure origin: Should not set 'Path=/;" + extraParams + "'"
});
@@ -16,8 +17,9 @@
set_prefixed_cookie_via_http_test({
prefix: "__Secure-",
params: "Secure; Path=/;" + extraParams,
- shouldExistViaHTTP: true,
- title: "__Secure: Non-secure origin: Should set 'Secure; Path=/;" + extraParams + "'"
+ origin: self.origin,
+ shouldExistViaHTTP: false,
+ title: "__Secure: Non-secure origin: Should not set 'Secure; Path=/;" + extraParams + "'"
});
});
</script>
diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.https.html b/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.https.html
index d912babc239..8753a320b4e 100644
--- a/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.https.html
+++ b/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.https.html
@@ -3,11 +3,12 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/cookies/resources/cookie-helper.sub.js"></script>
<script>
- ["", "domain="+CROSS_SITE_HOST, "MaxAge=10", "HttpOnly"].forEach(extraParams => {
+ ["", "MaxAge=10", "HttpOnly"].forEach(extraParams => {
// Without 'secure'
set_prefixed_cookie_via_http_test({
prefix: "__Secure-",
params: "Path=/;" + extraParams,
+ origin: self.origin,
shouldExistViaHTTP: false,
title: "__Secure: secure origin: Should not set 'Path=/;" + extraParams + "'"
});
@@ -16,8 +17,27 @@
set_prefixed_cookie_via_http_test({
prefix: "__Secure-",
params: "Secure;Path=/;" + extraParams,
+ origin: self.origin,
shouldExistViaHTTP: true,
title: "__Secure: secure origin: Should set 'Secure;Path=/;" + extraParams + "'"
});
});
+
+ // Without 'secure'
+ set_prefixed_cookie_via_http_test({
+ prefix: "__Secure-",
+ params: "Path=/;domain=" + CROSS_SITE_HOST,
+ origin: SECURE_CROSS_SITE_ORIGIN,
+ shouldExistViaHTTP: false,
+ title: "__Secure: secure origin: Should not set 'Path=/;domain=" + CROSS_SITE_HOST + "'"
+ });
+
+ // With 'secure'
+ set_prefixed_cookie_via_http_test({
+ prefix: "__Secure-",
+ params: "Secure;Path=/;domain=" + CROSS_SITE_HOST,
+ origin: SECURE_CROSS_SITE_ORIGIN,
+ shouldExistViaHTTP: true,
+ title: "__Secure: secure origin: Should set 'Secure;Path=/;domain=" + CROSS_SITE_HOST + "'"
+ });
</script>
diff --git a/tests/wpt/web-platform-tests/cookies/prefix/document-cookie.non-secure.html b/tests/wpt/web-platform-tests/cookies/prefix/document-cookie.non-secure.html
index 1b5edf76a29..dbf92207a13 100644
--- a/tests/wpt/web-platform-tests/cookies/prefix/document-cookie.non-secure.html
+++ b/tests/wpt/web-platform-tests/cookies/prefix/document-cookie.non-secure.html
@@ -6,7 +6,8 @@
function create_test(prefix, params, shouldExistInDOM, shouldExistViaHTTP, title) {
promise_test(t => {
var name = prefix + "prefixtestcookie";
- erase_cookie_from_js(name);
+ erase_cookie_from_js(name, params);
+ t.add_cleanup(() => erase_cookie_from_js(name, params));
var value = "" + Math.random();
document.cookie = name + "=" + value + ";" + params;
diff --git a/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js b/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js
index 49cf0b1fdbf..2974da9af06 100644
--- a/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js
+++ b/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js
@@ -28,7 +28,13 @@
// A tiny helper which returns the result of fetching |url| with credentials.
function credFetch(url) {
- return fetch(url, {"credentials": "include"});
+ return fetch(url, {"credentials": "include"})
+ .then(response => {
+ if (response.status !== 200) {
+ throw new Error(response.statusText);
+ }
+ return response;
+ });
}
// Returns a URL on |origin| which redirects to a given absolute URL.
@@ -72,7 +78,8 @@ function create_cookie(origin, name, value, extras) {
function set_prefixed_cookie_via_dom_test(options) {
promise_test(t => {
var name = options.prefix + "prefixtestcookie";
- erase_cookie_from_js(name);
+ erase_cookie_from_js(name, options.paras);
+ t.add_cleanup(() => erase_cookie_from_js(name, options.params));
var value = "" + Math.random();
document.cookie = name + "=" + value + ";" + options.params;
@@ -86,23 +93,20 @@ function set_prefixed_cookie_via_dom_test(options) {
function set_prefixed_cookie_via_http_test(options) {
promise_test(t => {
- var postDelete = _ => {
- var value = "" + Math.random();
- return credFetch(options.origin + "/cookies/resources/set.py?" + name + "=" + value + ";" + options.params)
- .then(_ => credFetch(options.origin + "/cookies/resources/list.py"))
- .then(r => r.json())
- .then(cookies => assert_equals(cookies[name], options.shouldExistViaHTTP ? value : undefined));
- };
-
var name = options.prefix + "prefixtestcookie";
- if (!options.origin) {
- options.origin = self.origin;
- erase_cookie_from_js(name);
- return postDelete;
- } else {
- return credFetch(options.origin + "/cookies/resources/drop.py?name=" + name)
- .then(_ => postDelete());
- }
+ var value = "" + Math.random();
+
+ t.add_cleanup(() => {
+ var cookie = name + "=0;expires=" + new Date(0).toUTCString() + ";" +
+ options.params;
+
+ return credFetch(options.origin + "/cookies/resources/set.py?" + cookie);
+ });
+
+ return credFetch(options.origin + "/cookies/resources/set.py?" + name + "=" + value + ";" + options.params)
+ .then(_ => credFetch(options.origin + "/cookies/resources/list.py"))
+ .then(r => r.json())
+ .then(cookies => assert_equals(cookies[name], options.shouldExistViaHTTP ? value : undefined));
}, options.title);
}
@@ -184,9 +188,8 @@ return credFetch(origin + "/cookies/resources/dropSecure.py")
//
// erase cookie value and set for expiration
-function erase_cookie_from_js(name) {
- let secure = self.location.protocol == "https:" ? "Secure" : "";
- document.cookie = `${name}=0; path=/; expires=${new Date(0).toUTCString()}; ${secure}`;
+function erase_cookie_from_js(name, params) {
+ document.cookie = `${name}=0; expires=${new Date(0).toUTCString()}; ${params};`;
var re = new RegExp("(?:^|; )" + name);
assert_equals(re.test(document.cookie), false, "Sanity check: " + name + " has been deleted.");
}
diff --git a/tests/wpt/web-platform-tests/cookies/resources/set.py b/tests/wpt/web-platform-tests/cookies/resources/set.py
index abfb8c8d40d..5b6d0b9a2cc 100644
--- a/tests/wpt/web-platform-tests/cookies/resources/set.py
+++ b/tests/wpt/web-platform-tests/cookies/resources/set.py
@@ -1,7 +1,13 @@
import helpers
+import urllib
def main(request, response):
"""Respond to `/cookie/set?{cookie}` by echoing `{cookie}` as a `Set-Cookie` header."""
headers = helpers.setNoCacheAndCORSHeaders(request, response)
- headers.append(("Set-Cookie", request.url_parts.query))
+
+ # Cookies may require whitespace (e.g. in the `Expires` attribute), so the
+ # query string should be decoded.
+ cookie = urllib.unquote(request.url_parts.query)
+ headers.append(("Set-Cookie", cookie))
+
return headers, '{"success": true}'
diff --git a/tests/wpt/web-platform-tests/cookies/samesite/window-open-reload.html b/tests/wpt/web-platform-tests/cookies/samesite/window-open-reload.html
index b37cff8286a..fd9c7a6d5a8 100644
--- a/tests/wpt/web-platform-tests/cookies/samesite/window-open-reload.html
+++ b/tests/wpt/web-platform-tests/cookies/samesite/window-open-reload.html
@@ -40,5 +40,5 @@
create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host auxiliary navigations are strictly same-site.");
create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain auxiliary navigations are strictly same-site.");
- create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Reloaded ross-site auxiliary navigations are laxly same-site");
+ create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Reloaded cross-site auxiliary navigations are laxly same-site");
</script>
diff --git a/tests/wpt/web-platform-tests/cookies/secure/create-cookie-http.html b/tests/wpt/web-platform-tests/cookies/secure/create-cookie-http.html
deleted file mode 100644
index 425f66fde5c..00000000000
--- a/tests/wpt/web-platform-tests/cookies/secure/create-cookie-http.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/cookies/resources/cookie-helper.sub.js"></script>
-<script>
- //origin is who sets the cookie
- //target is who tries to send cookie
- function create_test(origin, target, expectedStatus, title) {
- promise_test(t => {
- var value = "" + Math.random();
- return resetSecureCookies(origin, value)
- .then(_ => {
- return credFetch(target + "/cookies/resources/list.py")
- .then(r => r.json())
- .then(cookies => verifySecureCookieState(expectedStatus, value, cookies));
- });
- }, title);
- }
-
- //Given an |expectedStatus| and |expectedValue|, assert the |cookies| contains the
- //proper set of cookie names and values.
- function verifySecureCookieState(expectedStatus, expectedValue, cookies) {
- assert_equals(cookies["alone_insecure"], expectedValue, "Insecure cookies are always present");
- if (expectedStatus == SecureStatus.INSECURE_COOKIE_ONLY) {
- assert_equals(cookies["alone_secure"], undefined, "Secure cookies are not present");
- } else if (expectedStatus == SecureStatus.BOTH_COOKIES) {
- assert_equals(cookies["alone_secure"], expectedValue, "Secure cookies are present");
- }
- }
-
- //cookies set by insecure origins
- create_test(INSECURE_ORIGIN, INSECURE_ORIGIN, SecureStatus.INSECURE_COOKIE_ONLY, "Secure cookies cannot be set by insecure origins");
- //create_test(INSECURE_ORIGIN, SECURE_ORIGIN, SecureStatus.INSECURE_COOKIE_ONLY, "Secure cookies cannot be set by insecure origins, even if read from a secure origin");
-
- //This test should set the secure cookie right but not be able to read it from the secure origin
- //create_test(SECURE_ORIGIN, INSECURE_ORIGIN, SecureStatus.INSECURE_COOKIE_ONLY, "Secure cookies should not be read by insecure origins");
- //create_test(SECURE_ORIGIN, SECURE_ORIGIN, SecureStatus.BOTH_COOKIES, "Secure cookies should be set and read by secure domains")
-</script>
diff --git a/tests/wpt/web-platform-tests/cors/simple-requests.htm b/tests/wpt/web-platform-tests/cors/simple-requests.htm
index 77ed8ee22e7..be4b53495c6 100644
--- a/tests/wpt/web-platform-tests/cors/simple-requests.htm
+++ b/tests/wpt/web-platform-tests/cors/simple-requests.htm
@@ -83,9 +83,9 @@ simple_async.step(function (){
+ uuid_token, true)
client.setRequestHeader('Accept', 'jewelry')
- client.setRequestHeader('accept-language', 'nn_NO,nn,en')
+ client.setRequestHeader('accept-language', 'nn-NO,nn,en')
client.setRequestHeader('content-type', 'text/plain; parameter=extra')
- client.setRequestHeader('content-Language', 'nn_NO')
+ client.setRequestHeader('content-Language', 'nn-NO')
client.onload = simple_async.step_func(function() {
assert_equals(client.getResponseHeader('content-type'), "text/plain", 'content-type response header')
diff --git a/tests/wpt/web-platform-tests/css/.gitignore b/tests/wpt/web-platform-tests/css/.gitignore
index 3ed165f4bd6..7b1bd439b77 100644
--- a/tests/wpt/web-platform-tests/css/.gitignore
+++ b/tests/wpt/web-platform-tests/css/.gitignore
@@ -1,8 +1,8 @@
-dist
-dist_last
-build-temp
-tools/cache
-tools/_virtualenv
+/dist
+/dist_last
+/build-temp
+/tools/cache
+/tools/_virtualenv
*.xcodeproj
*.DS_Store
*.pyc
@@ -11,5 +11,5 @@ tools/_virtualenv
*~
*.orig
*Thumbs.db
-_certs
-config.json
+/_certs
+/config.json
diff --git a/tests/wpt/web-platform-tests/css/CSS2/abspos/static-inside-table-cell.html b/tests/wpt/web-platform-tests/css/CSS2/abspos/static-inside-table-cell.html
new file mode 100644
index 00000000000..712bfbaf1e8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/abspos/static-inside-table-cell.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>Static position inside table cell</title>
+<link rel="author" title="Aleks Totic" href="atotic@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements">
+<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div id="container" style="position:relative;">
+ <div id="changeMe" style="height:100px;"></div>
+ <div style="display:table-cell;">
+ <div style="position:absolute; width:100px; height:100px; background:green;"></div>
+ <div style="width:100px; height:100px; background:red;"></div>
+ </div>
+</div>
+<script>
+ document.body.offsetTop;
+ document.querySelector('#changeMe').style.height = "auto";
+</script>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/borders/groove-default.html b/tests/wpt/web-platform-tests/css/CSS2/borders/groove-default.html
new file mode 100644
index 00000000000..c9028b9a2f4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/borders/groove-default.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<title>CSS Test: Groove border with default color should actually show a groove border</title>
+<link rel="help" href="https://drafts.csswg.org/css2/box.html#border-style-properties">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1488294">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="mismatch" href="groove-ridge-default-notref.html">
+<style>
+ div {
+ width: 100px;
+ height: 100px;
+ border: 10px groove;
+ }
+</style>
+<div></div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/borders/groove-ridge-default-notref.html b/tests/wpt/web-platform-tests/css/CSS2/borders/groove-ridge-default-notref.html
new file mode 100644
index 00000000000..5ead6432ccd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/borders/groove-ridge-default-notref.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<style>
+ div {
+ width: 100px;
+ height: 100px;
+ border: 10px solid;
+ }
+</style>
+<div></div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/borders/ridge-default.html b/tests/wpt/web-platform-tests/css/CSS2/borders/ridge-default.html
new file mode 100644
index 00000000000..4bd0bdf3aef
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/borders/ridge-default.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<title>CSS Test: ridge border with default color should actually show a ridge border</title>
+<link rel="help" href="https://drafts.csswg.org/css2/box.html#border-style-properties">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1488294">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="mismatch" href="groove-ridge-default-notref.html">
+<style>
+ div {
+ width: 100px;
+ height: 100px;
+ border: 10px ridge;
+ }
+</style>
+<div></div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-1-notref.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-1-notref.html
new file mode 100644
index 00000000000..540c8048af6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-1-notref.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<style>
+ div {
+ width: 10ch;
+ white-space: nowrap;
+ font-family: monospace;
+ }
+ span {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+</style>
+<div>
+ <span></span>
+ Some text that overflows my parent.
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-1.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-1.html
new file mode 100644
index 00000000000..656b9398e6b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-1.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="mismatch" href="float-nowrap-1-notref.html">
+<style>
+ div {
+ width: 10ch;
+ white-space: nowrap;
+ font-family: monospace;
+ }
+ span {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+</style>
+<div>
+ Some text that overflows my parent.
+ <span></span>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-2.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-2.html
new file mode 100644
index 00000000000..fc8e11fadc5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-2.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="match" href="float-nowrap-1.html">
+<style>
+ div {
+ width: 10ch;
+ white-space: nowrap;
+ font-family: monospace;
+ }
+ span {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+</style>
+<div>
+ Some text that
+ <span></span>
+ overflows my parent.
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-3-ref.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-3-ref.html
new file mode 100644
index 00000000000..e7556a21366
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-3-ref.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="mismatch" href="float-nowrap-4.html">
+<style>
+ div {
+ width: 10ch;
+ font-family: monospace;
+ }
+ .float {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+ .nowrap {
+ white-space: nowrap;
+ }
+</style>
+<div>
+ Some
+ <span class="nowrap">
+ text that overflows my parent.
+ </span>
+ <span class="float"></span>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-3.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-3.html
new file mode 100644
index 00000000000..dbc643c8ca9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-3.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="match" href="float-nowrap-3-ref.html">
+<style>
+ div {
+ width: 10ch;
+ font-family: monospace;
+ }
+ .float {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+ .nowrap {
+ white-space: nowrap;
+ }
+</style>
+<div>
+ Some
+ <span class="nowrap">
+ text that overflows <span class="float"></span> my parent.
+ </span>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-4-ref.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-4-ref.html
new file mode 100644
index 00000000000..a8c7b060819
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-4-ref.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<style>
+ div {
+ width: 10ch;
+ font-family: monospace;
+ }
+ .float {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+ .nowrap {
+ white-space: nowrap;
+ }
+</style>
+<div>
+ Some
+ <span class="float"></span>
+ <span class="nowrap">
+ text that overflows my parent.
+ </span>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-4.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-4.html
new file mode 100644
index 00000000000..bf11e6e31c4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-4.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="match" href="float-nowrap-4-ref.html">
+<style>
+ div {
+ width: 10ch;
+ font-family: monospace;
+ }
+ .float {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+ .nowrap {
+ white-space: nowrap;
+ }
+</style>
+<div>
+ Some
+ <span class="nowrap">
+ <span class="float"></span> text that overflows my parent.
+ </span>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-5-ref.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-5-ref.html
new file mode 100644
index 00000000000..7f400841037
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-5-ref.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<div>Hello Kittie
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-5.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-5.html
new file mode 100644
index 00000000000..f4403cfb838
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-5.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="match" href="float-nowrap-5-ref.html">
+<style>
+ div {
+ white-space: nowrap;
+ }
+ span {
+ float: left;
+ }
+</style>
+<div>Kittie<span>Hello&nbsp;</span>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-6.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-6.html
new file mode 100644
index 00000000000..7c6bf9c0db6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-6.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="match" href="float-nowrap-5-ref.html">
+<style>
+ div {
+ white-space: nowrap;
+ }
+ span {
+ float: left;
+ }
+</style>
+<div><span>Hello&nbsp;</span>Kittie
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-7.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-7.html
new file mode 100644
index 00000000000..bef462d9956
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-7.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="match" href="float-nowrap-1.html">
+<style>
+ div {
+ width: 10ch;
+ white-space: nowrap;
+ font-family: monospace;
+ }
+ .nowrap {
+ white-space: nowrap;
+ }
+ .float {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+</style>
+<div>
+ <span class="nowrap">S<div class="float"></div><span>ome</span> text that overflows my parent.</span>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-8.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-8.html
new file mode 100644
index 00000000000..8c2653193d6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-8.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="match" href="float-nowrap-1.html">
+<style>
+ div {
+ width: 10ch;
+ white-space: nowrap;
+ font-family: monospace;
+ }
+ span {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+</style>
+<div>
+ Some <span></span>
+ text that overflows my parent.
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-9.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-9.html
new file mode 100644
index 00000000000..b4a6b292309
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-nowrap-9.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<title>CSS Test: Floats in nowrap context</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=488725">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://www.mozilla.org" title="Mozilla">
+<link rel="match" href="float-nowrap-3-ref.html">
+<style>
+ div {
+ width: 10ch;
+ font-family: monospace;
+ }
+ .float {
+ float: right;
+ width: 5ch;
+ height: 5ch;
+ background: blue;
+ }
+ .nowrap {
+ white-space: nowrap;
+ }
+</style>
+<div>
+ Some
+ <span class="nowrap">
+ text <span class="float"></span> that overflows my parent.
+ </span>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/linebox/anonymous-inline-inherit-001-ref.html b/tests/wpt/web-platform-tests/css/CSS2/linebox/anonymous-inline-inherit-001-ref.html
new file mode 100644
index 00000000000..e97da2169d5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/linebox/anonymous-inline-inherit-001-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<body>
+ <span>
+ <span style="font-size: 500%">A</span>
+ x
+ </span>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/linebox/anonymous-inline-inherit-001.html b/tests/wpt/web-platform-tests/css/CSS2/linebox/anonymous-inline-inherit-001.html
new file mode 100644
index 00000000000..77904d80e45
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/linebox/anonymous-inline-inherit-001.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<link rel="match" href="anonymous-inline-inherit-001-ref.html">
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#anonymous">
+<link rel="author" href="kojii@chromium.org">
+<!--
+ The text node for "x" should be wrapped in an anonymous inline box,
+ which should have the initial value for non-inherited properties.
+ https://drafts.csswg.org/css2/visuren.html#anonymous
+-->
+<body>
+ <span style="vertical-align: top">
+ <span style="font-size: 500%">A</span>
+ x
+ </span>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/linebox/vertical-align-nested-top-001-ref.html b/tests/wpt/web-platform-tests/css/CSS2/linebox/vertical-align-nested-top-001-ref.html
new file mode 100644
index 00000000000..1fd155e3801
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/linebox/vertical-align-nested-top-001-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<style>
+body {
+ font-size: 18px;
+ line-height: 20px;
+}
+.hb {
+ font-size: 12px;
+ vertical-align: top;
+}
+</style>
+<body>
+ <span class="hb">XX</span>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/linebox/vertical-align-nested-top-001.html b/tests/wpt/web-platform-tests/css/CSS2/linebox/vertical-align-nested-top-001.html
new file mode 100644
index 00000000000..3667ced2ca3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/linebox/vertical-align-nested-top-001.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<link rel="match" href="vertical-align-nested-top-001-ref.html">
+<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align" />
+<link rel="author" href="kojii@chromium.org">
+<style>
+body {
+ font-size: 18px;
+ line-height: 20px;
+}
+.hb {
+ font-size: 12px;
+ vertical-align: top;
+}
+.g2 {
+ vertical-align: top;
+}
+</style>
+<body>
+ <span class="hb">X<span class="g2">X</span></span>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html b/tests/wpt/web-platform-tests/css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html
new file mode 100644
index 00000000000..a3794579f0e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/normal-flow/float-percentage-resolution-quirks-mode.html
@@ -0,0 +1,10 @@
+<title>In quirks mode a float should resolve its percentage height against its first ancestor with a defined height.</title>
+<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#Computing_widths_and_margins">
+<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
+<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
+<div style="width:100px; height:100px; background:red;">
+ <div>
+ <div></div>
+ <div style="float:left; width:100%; height:100%; background:green;"></div>
+ </div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/CSS2/positioning/abspos-inline-008.xht b/tests/wpt/web-platform-tests/css/CSS2/positioning/abspos-inline-008.xht
new file mode 100644
index 00000000000..9233b4373e5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/CSS2/positioning/abspos-inline-008.xht
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: Absolutely positioned descendant under relative positioned inline with negative offset</title>
+ <link rel="author" title="Tien-Ren Chen" href="mailto:trchen@chromium.org"/>
+ <link rel="help" href="https://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width"/>
+ <link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"/>
+ </head>
+ <body>
+ <p>Test passes if there is a filled green square.</p>
+ <div style="position:relative; left:100px; width:100px;">
+ <span style="position:relative; left:-100px;">
+ <div style="position:absolute; display:inline-block; width:100px; height:100px; background:green;"></div>
+ </span>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-invalid.html b/tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-invalid.html
index f939195f3e5..4fdd3d36ed9 100644
--- a/tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-invalid.html
+++ b/tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-blend-mode supports only the grammar '<blend-mode>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-valid.html b/tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-valid.html
index 4f1cfb8dcaf..151a01c75a5 100644
--- a/tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-valid.html
+++ b/tests/wpt/web-platform-tests/css/compositing/parsing/background-blend-mode-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-blend-mode supports the full grammar '<blend-mode>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/compositing/parsing/isolation-invalid.html b/tests/wpt/web-platform-tests/css/compositing/parsing/isolation-invalid.html
index 8278431ad8a..d5b8f49c613 100644
--- a/tests/wpt/web-platform-tests/css/compositing/parsing/isolation-invalid.html
+++ b/tests/wpt/web-platform-tests/css/compositing/parsing/isolation-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="isolation supports only the grammar '<isolation-mode>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/compositing/parsing/isolation-valid.html b/tests/wpt/web-platform-tests/css/compositing/parsing/isolation-valid.html
index 430533858eb..252ff138e0f 100644
--- a/tests/wpt/web-platform-tests/css/compositing/parsing/isolation-valid.html
+++ b/tests/wpt/web-platform-tests/css/compositing/parsing/isolation-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="isolation supports the full grammar '<isolation-mode>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-invalid.html b/tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-invalid.html
index c62ef1369df..e73d28e585a 100644
--- a/tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-invalid.html
+++ b/tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="mix-blend-mode supports only the grammar '<blend-mode>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-valid.html b/tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-valid.html
index 32496149974..c6393343dff 100644
--- a/tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-valid.html
+++ b/tests/wpt/web-platform-tests/css/compositing/parsing/mix-blend-mode-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="mix-blend-mode supports the full grammar '<blend-mode>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-invalid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-invalid.html
new file mode 100644
index 00000000000..a58d2cd11bc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-delay with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-delay">
+<meta name="assert" content="animation-delay supports only the grammar '<single-animation-play-state> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("animation-delay", "infinite");
+test_invalid_value("animation-delay", "0");
+test_invalid_value("animation-delay", "1s 2s");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-valid.html
new file mode 100644
index 00000000000..5ff0416cc64
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-valid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-delay with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-delay">
+<meta name="assert" content="animation-delay supports the full grammar '<single-animation-play-state> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("animation-delay", "-5ms");
+test_valid_value("animation-delay", "0s");
+test_valid_value("animation-delay", "10s");
+test_valid_value("animation-delay", "20s, 10s");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-direction-invalid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-direction-invalid.html
new file mode 100644
index 00000000000..0b48d97f0a1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-direction-invalid.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-direction with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-direction">
+<meta name="assert" content="animation-direction supports only the grammar '<single-animation-direction> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("animation-direction", "auto");
+test_invalid_value("animation-direction", "normal reverse");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-direction-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-direction-valid.html
new file mode 100644
index 00000000000..bcc9acc3428
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-direction-valid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-direction with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-direction">
+<meta name="assert" content="animation-direction supports the full grammar '<single-animation-direction> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("animation-direction", "normal");
+test_valid_value("animation-direction", "reverse");
+test_valid_value("animation-direction", "alternate");
+test_valid_value("animation-direction", "alternate-reverse");
+test_valid_value("animation-direction", "normal, reverse, alternate, alternate-reverse");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-duration-invalid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-duration-invalid.html
new file mode 100644
index 00000000000..5edacd3735e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-duration-invalid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-duration with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-duration">
+<meta name="assert" content="animation-duration supports only the grammar '<time> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("animation-duration", '-3s');
+test_invalid_value("animation-duration", '0');
+test_invalid_value("animation-duration", 'infinite');
+test_invalid_value("animation-duration", '1s 2s');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-duration-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-duration-valid.html
new file mode 100644
index 00000000000..e65a1a70724
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-duration-valid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-duration with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-duration">
+<meta name="assert" content="animation-duration supports the full grammar '<time> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("animation-duration", '3s');
+test_valid_value("animation-duration", '500ms');
+test_valid_value("animation-duration", '1s, 2s, 3s');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-fill-mode-invalid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-fill-mode-invalid.html
new file mode 100644
index 00000000000..dda2221f474
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-fill-mode-invalid.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-fill-mode with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-fill-mode">
+<meta name="assert" content="animation-fill-mode supports only the grammar '<single-animation-fill-mode> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("animation-fill-mode", "auto");
+test_invalid_value("animation-fill-mode", "forwards backwards");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-fill-mode-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-fill-mode-valid.html
new file mode 100644
index 00000000000..1f73a821d15
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-fill-mode-valid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-fill-mode with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-fill-mode">
+<meta name="assert" content="animation-fill-mode supports the full grammar '<single-animation-fill-mode> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("animation-fill-mode", "none");
+test_valid_value("animation-fill-mode", "forwards");
+test_valid_value("animation-fill-mode", "backwards");
+test_valid_value("animation-fill-mode", "both");
+test_valid_value("animation-fill-mode", "none, forwards, backwards, both");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-iteration-count-invalid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-iteration-count-invalid.html
new file mode 100644
index 00000000000..ff1e8e23a08
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-iteration-count-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-iteration-count with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-iteration-count">
+<meta name="assert" content="animation-iteration-count supports only the grammar '<single-animation-iteration-count> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("animation-iteration-count", "auto");
+test_invalid_value("animation-iteration-count", "-2");
+test_invalid_value("animation-iteration-count", "3 4");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-iteration-count-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-iteration-count-valid.html
new file mode 100644
index 00000000000..be8a8379890
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-iteration-count-valid.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-iteration-count with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-iteration-count">
+<meta name="assert" content="animation-iteration-count supports the full grammar '<single-animation-iteration-count> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("animation-iteration-count", "0");
+test_valid_value("animation-iteration-count", "3");
+test_valid_value("animation-iteration-count", "4.5");
+test_valid_value("animation-iteration-count", "infinite");
+
+test_valid_value("animation-iteration-count", "0, infinite, 3");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-invalid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-invalid.html
new file mode 100644
index 00000000000..77d53f990b1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-invalid.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-name with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-name">
+<meta name="assert" content="animation-name supports only the grammar '[ none | <keyframes-name> ]#'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("animation-name", '12');
+test_invalid_value("animation-name", 'one two');
+
+test_invalid_value("animation-name", 'one, initial');
+test_invalid_value("animation-name", 'one, inherit');
+test_invalid_value("animation-name", 'one, unset');
+test_invalid_value("animation-name", 'default, two');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-valid.html
new file mode 100644
index 00000000000..9ed73d4d15f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-valid.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-name with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-name">
+<meta name="assert" content="animation-name supports the full grammar '[ none | <keyframes-name> ]#'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("animation-name", 'NONE', 'none');
+
+test_valid_value("animation-name", 'foo');
+test_valid_value("animation-name", 'Both');
+test_valid_value("animation-name", 'ease-in');
+test_valid_value("animation-name", 'infinite');
+test_valid_value("animation-name", 'paused');
+test_valid_value("animation-name", 'first, second, third');
+
+test_valid_value("animation-name", '"string"');
+test_valid_value("animation-name", '"multi word string"');
+test_valid_value("animation-name", '"initial"');
+test_valid_value("animation-name", '"---\\22---"', '\"---\\\"---\"');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-play-state-invalid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-play-state-invalid.html
new file mode 100644
index 00000000000..f47a2f75ddf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-play-state-invalid.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-play-state with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-play-state">
+<meta name="assert" content="animation-play-state supports only the grammar '<single-animation-play-state> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("animation-play-state", "auto");
+test_invalid_value("animation-play-state", "paused running");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-play-state-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-play-state-valid.html
new file mode 100644
index 00000000000..ce6d053ec27
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-play-state-valid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-play-state with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-play-state">
+<meta name="assert" content="animation-play-state supports the full grammar '<single-animation-play-state> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("animation-play-state", "running");
+test_valid_value("animation-play-state", "paused");
+test_valid_value("animation-play-state", "running, paused");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-timing-function-invalid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-timing-function-invalid.html
new file mode 100644
index 00000000000..adc1cc10e39
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-timing-function-invalid.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-timing-function with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-timing-function">
+<meta name="assert" content="animation-timing-function supports only the grammar '<timing-function> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("animation-timing-function", "auto");
+test_invalid_value("animation-timing-function", "ease-in ease-out");
+test_invalid_value("animation-timing-function", "cubic-bezier(1, 2, 3)");
+test_invalid_value("animation-timing-function", "cubic-bezier(1, 2, 3, infinite)");
+test_invalid_value("animation-timing-function", "cubic-bezier(1, 2, 3, 4, 5)");
+test_invalid_value("animation-timing-function", "cubic-bezier(-0.1, 0.1, 0.5, 0.9)");
+test_invalid_value("animation-timing-function", "cubic-bezier(0.5, 0.1, 1.1, 0.9)");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-timing-function-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-timing-function-valid.html
new file mode 100644
index 00000000000..63e2805485b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-timing-function-valid.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing animation-timing-function with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-timing-function">
+<meta name="assert" content="animation-timing-function supports the full grammar '<timing-function> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("animation-timing-function", "linear");
+
+test_valid_value("animation-timing-function", "ease");
+test_valid_value("animation-timing-function", "ease-in");
+test_valid_value("animation-timing-function", "ease-out");
+test_valid_value("animation-timing-function", "ease-in-out");
+test_valid_value("animation-timing-function", "cubic-bezier(0.1, 0.2, 0.8, 0.9)");
+test_valid_value("animation-timing-function", "cubic-bezier(0, -2, 1, 3)");
+test_valid_value("animation-timing-function", "cubic-bezier(0, 0.7, 1, 1.3)");
+
+
+test_valid_value("animation-timing-function", "steps(4, start)");
+test_valid_value("animation-timing-function", "steps(2, end)");
+
+test_valid_value("animation-timing-function", "linear, ease, linear");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-invalid.html
index 68b18dcc2d0..30757f3a4d0 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-attachment supports only the grammar '<attachment>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-valid.html
index 600f310b462..14d72c606ba 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-attachment-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-attachment supports the full grammar '<attachment>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-invalid.html
index c2492a2a94a..96831e06fc9 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-clip supports only the grammar '<box>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-valid.html
index 5350a17cbec..e262a788bd0 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-clip-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-clip supports the full grammar '<box>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-invalid.html
index d7c688d6b6a..b94875402d8 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-color supports only the grammar '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-valid.html
index d7e864c29b9..3859b932c82 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-color-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-color supports the full grammar '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-invalid.html
index 43d7f67b3e9..eaba64a715c 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-image supports only the grammar '<bg-image>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-valid.html
index ffbf33b6d64..51c67b96ccb 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-image-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-image supports the full grammar '<bg-image>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-invalid.html
index c3deef9bc90..4ea58da8019 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background supports only the grammar '<bg-layer># , <final-bg-layer>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-invalid.html
index 9eead06baeb..5da00dabe33 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-origin supports only the grammar '<box>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-valid.html
index 1c19b96ec43..7e3b0fffcad 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-origin-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-origin supports the full grammar '<box>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-invalid.html
index 583606e14d2..bb974afd9f4 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-position supports only the grammar '<bg-position>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-valid.html
index dbb97406a5a..1c05517c62a 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-position-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-position supports the full grammar '<bg-position>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-invalid.html
index 3ae01662d08..abb153378f4 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-repeat supports only the grammar '<repeat-style>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-valid.html
index b69eb5ff030..2f72e03c733 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-repeat-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-repeat supports the full grammar '<repeat-style>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-invalid.html
index cfb9a1c077c..01a0322002b 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-size supports only the grammar '<bg-size>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-valid.html
index 22442117746..c169232cb32 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-size-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background-size supports the full grammar '<bg-size>#'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-valid.html
index 96529e5604a..41a334598f2 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/background-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="background supports the full grammar '<bg-layer># , <final-bg-layer>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-invalid.html
index 3916c4f2ecb..6e4d28e7983 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-color supports only the grammar '<color>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-valid.html
index 63532a99a4b..a4cd7748ac2 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-color-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-color supports the full grammar '<color>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-invalid.html
index 08c61dfb554..273fc0a7bf7 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image supports only the grammar ' <‘border-image-source’> || <‘border-image-slice’> [ / <‘border-image-width’> | / <‘border-image-width’>? / <‘border-image-outset’> ]? || <‘border-image-repeat’>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-invalid.html
index 4faaa3ca0d9..4102f603424 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-outset supports only the grammar '[ <length> | <number> ]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-valid.html
index 781a6e0a8ab..ee85af87677 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-outset-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-outset supports the full grammar '[ <length> | <number> ]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-invalid.html
index 962ab22fbf0..de0998dcc5b 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-repeat supports only the grammar '[ stretch | repeat | round | space ]{1,2}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-valid.html
index 381b0595235..f90ef71191e 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-repeat-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-repeat supports the full grammar '[ stretch | repeat | round | space ]{1,2}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-invalid.html
index 4ccf441f75a..c62a43d6b37 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-slice supports only the grammar '[<number> | <percentage>]{1,4} && fill?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-valid.html
index 29731944238..671120b41b7 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-slice-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-slice supports the full grammar '[<number> | <percentage>]{1,4} && fill?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-invalid.html
index 28edd7855df..8b1240a0d95 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-source supports only the grammar 'none | <image>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-valid.html
index c080d395078..7fbbbd9e95d 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-source-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-source supports the full grammar 'none | <image>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html
index 8bf9cd51fcd..67d22c18e2c 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image supports the full grammar ' <‘border-image-source’> || <‘border-image-slice’> [ / <‘border-image-width’> | / <‘border-image-width’>? / <‘border-image-outset’> ]? || <‘border-image-repeat’>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-invalid.html
index 44597235377..b3e9359749b 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-width supports only the grammar '[ <length-percentage> | <number> | auto ]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-valid.html
index e1316c33708..ce8b9a9455e 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-image-width-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-image-width supports the full grammar '[ <length-percentage> | <number> | auto ]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-invalid.html
index a3d28dfbac0..71404f2ce3e 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-width supports only the grammar '<line-width> || <line-style> || <color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-invalid.html
index 9d767a961ea..4e004af8f36 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-radius supports only the grammar '<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html
index 40a9d9e8e40..317803bf881 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-radius supports the full grammar '<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-invalid.html
index 42bd61ad1e9..27fa45116fd 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-style supports only the grammar '<line-style>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-valid.html
index 10fa39bbf6c..0b592180280 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-style-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-style supports the full grammar '<line-style>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-valid.html
index 5ca8bbdc43e..37b876ce4e9 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-width supports the full grammar '<line-width> || <line-style> || <color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-invalid.html
index 2edd05ea42b..ec7eb72a9ac 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-width supports only the grammar '<line-width>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-valid.html
index 5a9b174c915..552416df3d2 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-width-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="border-width supports the full grammar '<line-width>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-invalid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-invalid.html
index a38ae2fce74..44f074d05a8 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-invalid.html
@@ -10,7 +10,7 @@
<meta name="assert" content="Lengths must stay adjacent." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-valid.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-valid.html
index be72b78cbbe..a3b172e1bab 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/box-shadow-valid.html
@@ -10,7 +10,7 @@
<meta name="assert" content="Box shadow color, inset, and length parameters can be mixed in any order." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/clear-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/clear-invalid.html
index 636704330e3..38d1821bc81 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/clear-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/clear-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="clear supports only the grammar 'none | left | right | both'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/clear-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/clear-valid.html
index a849f6c06de..b27350e1791 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/clear-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/clear-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="clear supports the full grammar 'none | left | right | both'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/float-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/float-invalid.html
index 8c3d28f578a..c11f4e2e66c 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/float-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/float-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="float supports only the grammar 'left | right | top | bottom | start | end | none | <page-floats>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/float-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/float-valid.html
index 9ff6ef43a22..a8fc605325f 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/float-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/float-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="float supports the full grammar 'left | right | top | bottom | start | end | none | <page-floats>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/height-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/height-invalid.html
index f15bd27de80..dcd4d1afbe1 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/height-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/height-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="height supports only the grammar '[<length> | <percentage>] | available | min-content | max-content | fit-content | complex | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/height-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/height-valid.html
index a89ec6b5502..7cc09a594ed 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/height-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/height-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="height supports the full grammar '[<length> | <percentage>] | available | min-content | max-content | fit-content | complex | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/margin-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/margin-invalid.html
index 917fc927e9d..77009170938 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/margin-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/margin-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="margin supports only the grammar '[ <length> | <percentage> | auto]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/margin-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/margin-valid.html
index 1715a9c924e..154aa2de7cb 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/margin-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/margin-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="margin supports the full grammar '[ <length> | <percentage> | auto]{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/max-height-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/max-height-invalid.html
index 61c85d12910..aeb6e648081 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/max-height-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/max-height-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="max-height supports only the grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/max-height-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/max-height-valid.html
index ca58cec3a9c..04880c4903c 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/max-height-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/max-height-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="max-height supports the full grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/max-width-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/max-width-invalid.html
index 57bcbbf168c..03db7e26578 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/max-width-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/max-width-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="max-width supports only the grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/max-width-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/max-width-valid.html
index e098b804c08..1e08a820d9d 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/max-width-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/max-width-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="max-width supports the full grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/min-height-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/min-height-invalid.html
index 26a1e10a34c..edc480e1e89 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/min-height-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/min-height-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="min-height supports only the grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/min-height-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/min-height-valid.html
index 576a5c07989..0154c02b7b9 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/min-height-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/min-height-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="min-height supports the full grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/min-width-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/min-width-invalid.html
index d71777fea6c..e89826fb056 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/min-width-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/min-width-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="min-width supports only the grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/min-width-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/min-width-valid.html
index 406452dd583..f745b66bd43 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/min-width-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/min-width-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="min-width supports the full grammar '[ [<length> | <percentage>] && [border-box | content-box]? ] | available | min-content | max-content | fit-content'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/overflow-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/overflow-invalid.html
index bf3ee3d72ba..4747764fb6a 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/overflow-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/overflow-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="overflow supports only the grammar '[ visible | hidden | scroll | auto | no-display | no-content ]{1,2}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/overflow-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/overflow-valid.html
index 6bef585856c..1bfeec23646 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/overflow-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/overflow-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="overflow supports the full grammar '[ visible | hidden | scroll | auto | no-display | no-content ]{1,2}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/padding-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/padding-invalid.html
index 7e172efed30..e995ac616a1 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/padding-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/padding-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="padding supports only the grammar '<length>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/padding-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/padding-valid.html
index e5a932e1417..ba3c3a7fd4a 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/padding-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/padding-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="padding supports the full grammar '<length>{1,4}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-box/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/visibility-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/visibility-invalid.html
index 892ca54815f..73e611b2b80 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/visibility-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/visibility-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="visibility supports only the grammar 'visible | hidden | collapse'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/visibility-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/visibility-valid.html
index 2c1143dfa5c..2ab2f496607 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/visibility-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/visibility-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="visibility supports the full grammar 'visible | hidden | collapse'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/width-invalid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/width-invalid.html
index bcbb3d663ae..5a0145fe1d1 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/width-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/width-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="width supports only the grammar '[<length> | <percentage>] | available | min-content | max-content | fit-content | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-box/parsing/width-valid.html b/tests/wpt/web-platform-tests/css/css-box/parsing/width-valid.html
index 653b11e993c..93059bd2d3a 100644
--- a/tests/wpt/web-platform-tests/css/css-box/parsing/width-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-box/parsing/width-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="width supports the full grammar '[<length> | <percentage>] | available | min-content | max-content | fit-content | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-break/reference/widows-orphans-001-ref.html b/tests/wpt/web-platform-tests/css/css-break/reference/widows-orphans-001-ref.html
new file mode 100644
index 00000000000..06108ac800c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-break/reference/widows-orphans-001-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Fragmentation level 3 Test Reference File</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<style>
+div {
+ position: absolute;
+ columns: 2;
+ column-fill: balance-all;
+ column-gap: 0;
+}
+</style>
+<body>
+ <p>Test passes if there are 4 “X” characters <strong>arranged in a 2 by 2 square</strong> below.
+
+ <div>X<br>X<br>X<br>X</div>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/css-break/widows-orphans-001.html b/tests/wpt/web-platform-tests/css/css-break/widows-orphans-001.html
new file mode 100644
index 00000000000..8da27f0b659
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-break/widows-orphans-001.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Fragmentation level 3 Test: widows and block level boxes</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<link rel="help" href="https://drafts.csswg.org/css-break/#widows-orphans">
+<link rel="match" href="reference/widows-orphans-001-ref.html">
+<meta name="assert" content="The widows property has no effect on block container boxes that contains only block-level boxes.">
+<meta name="flags" content="">
+<style>
+div p { margin: 0; }
+
+div {
+ columns: 2;
+ column-gap: 0;
+ position: absolute; /* shrinkwrap. Using an explicit width in 'ch' with a monospace font would be fine as well if all UAs supported 'ch', but some don't. */
+ column-fill: balance-all; /* to make sure it balances as well on paged media */
+
+ widows: 4;
+}
+
+/* If the property applied to block container boxes that contain block-level boxes,
+ it would force the two two-line paragraphs to stick together.*/
+
+</style>
+<body>
+ <p>Test passes if there are 4 “X” characters <strong>arranged in a 2 by 2 square</strong> below.
+
+ <div>
+ <p>X<br>X
+ <p>X<br>X
+ </div>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/css-break/widows-orphans-002.html b/tests/wpt/web-platform-tests/css/css-break/widows-orphans-002.html
new file mode 100644
index 00000000000..cf9afe7c033
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-break/widows-orphans-002.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Fragmentation level 3 Test: widows and line boxes</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<link rel="help" href="https://drafts.csswg.org/css-break/#widows-orphans">
+<link rel="match" href="reference/widows-orphans-001-ref.html">
+<meta name="assert" content="The widows property affects block containers that establish an inline formatting context">
+<meta name="flags" content="">
+<style>
+div p { margin: 0; }
+
+div {
+ columns: 4;
+ column-gap: 0;
+ position: absolute; /* shrinkwrap. Using an explicit width in 'ch' with a monospace font would be fine as well if all UAs supported 'ch', but some don't. */
+ column-fill: balance-all; /* to make sure it balances as well on paged media */
+}
+div p {
+ orphans: 1; /* to avoid interference */
+ widows: 2;
+}
+
+/* The lines of each paragraphs should be kept together if the widows property applies,
+ or spread over the 4 columns if it fails to,
+ or all above one-another in a single column if multicol doesn't work. */
+
+</style>
+<body>
+ <p>Test passes if there are 4 “X” characters <strong>arranged in a 2 by 2 square</strong> below.
+
+ <div>
+ <p>X<br>X
+ <p>X<br>X
+ </div>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/css-break/widows-orphans-003.html b/tests/wpt/web-platform-tests/css/css-break/widows-orphans-003.html
new file mode 100644
index 00000000000..31114840926
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-break/widows-orphans-003.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Fragmentation level 3 Test: orphans and block level boxes</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<link rel="help" href="https://drafts.csswg.org/css-break/#widows-orphans">
+<link rel="match" href="reference/widows-orphans-001-ref.html">
+<meta name="assert" content="The orphans property has no effect on block container boxes that contains only block-level boxes.">
+<meta name="flags" content="">
+<style>
+div p { margin: 0; }
+
+div {
+ columns: 2;
+ column-gap: 0;
+ position: absolute; /* shrinkwrap. Using an explicit width in 'ch' with a monospace font would be fine as well if all UAs supported 'ch', but some don't. */
+ column-fill: balance-all; /* to make sure it balances as well on paged media */
+
+ orphans: 4;
+}
+
+/* If the property applied to block container boxes that contain block-level boxes,
+ it would force the two two-line paragraphs to stick together.*/
+
+</style>
+<body>
+ <p>Test passes if there are 4 “X” characters <strong>arranged in a 2 by 2 square</strong> below.
+
+ <div>
+ <p>X<br>X
+ <p>X<br>X
+ </div>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/css-break/widows-orphans-004.html b/tests/wpt/web-platform-tests/css/css-break/widows-orphans-004.html
new file mode 100644
index 00000000000..3e226d9e41e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-break/widows-orphans-004.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Fragmentation level 3 Test: orphans and line boxes</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<link rel="help" href="https://drafts.csswg.org/css-break/#widows-orphans">
+<link rel="match" href="reference/widows-orphans-001-ref.html">
+<meta name="assert" content="The orphans property affects block containers that establish an inline formatting context">
+<meta name="flags" content="">
+<style>
+div p { margin: 0; }
+
+div {
+ columns: 4;
+ column-gap: 0;
+ position: absolute; /* shrinkwrap. Using an explicit width in 'ch' with a monospace font would be fine as well if all UAs supported 'ch', but some don't. */
+ column-fill: balance-all; /* to make sure it balances as well on paged media */
+}
+div p {
+ widows: 1; /* to avoid interference */
+ orphans: 2;
+}
+
+/* The lines of each paragraphs should be kept together if the orphans property applies,
+ or spread over the 4 columns if it fails to,
+ or all above one-another in a single column if multicol doesn't work. */
+
+</style>
+<body>
+ <p>Test passes if there are 4 “X” characters <strong>arranged in a 2 by 2 square</strong> below.
+
+ <div>
+ <p>X<br>X
+ <p>X<br>X
+ </div>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/css-cascade/parsing/all-invalid.html b/tests/wpt/web-platform-tests/css/css-cascade/parsing/all-invalid.html
index 8b7c044a034..4a1d045ecc8 100644
--- a/tests/wpt/web-platform-tests/css/css-cascade/parsing/all-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-cascade/parsing/all-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="all supports only the grammar 'initial | inherit | unset'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-cascade/parsing/all-valid.html b/tests/wpt/web-platform-tests/css/css-cascade/parsing/all-valid.html
index 668a6c24241..3a9e5922de5 100644
--- a/tests/wpt/web-platform-tests/css/css-cascade/parsing/all-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-cascade/parsing/all-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="all supports the full grammar 'initial | inherit | unset'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-cascade/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-cascade/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-cascade/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-color/parsing/color-invalid.html b/tests/wpt/web-platform-tests/css/css-color/parsing/color-invalid.html
index fe44aad6fc6..676ffb315a9 100644
--- a/tests/wpt/web-platform-tests/css/css-color/parsing/color-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-color/parsing/color-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="color supports only the grammar '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid.html b/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid.html
index fb240182c31..70e2450c77f 100644
--- a/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="color supports the full grammar '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-color/parsing/opacity-invalid.html b/tests/wpt/web-platform-tests/css/css-color/parsing/opacity-invalid.html
index d9b9cc86abb..1bcf4c5b64b 100644
--- a/tests/wpt/web-platform-tests/css/css-color/parsing/opacity-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-color/parsing/opacity-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="opacity supports only the grammar '<alphavalue>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-color/parsing/opacity-valid.html b/tests/wpt/web-platform-tests/css/css-color/parsing/opacity-valid.html
index 8ae302e09f3..f9bb9b65014 100644
--- a/tests/wpt/web-platform-tests/css/css-color/parsing/opacity-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-color/parsing/opacity-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="opacity supports the full grammar '<alphavalue>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-color/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-color/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-color/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-animation-001.html b/tests/wpt/web-platform-tests/css/css-contain/contain-animation-001.html
new file mode 100644
index 00000000000..449221428c3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-animation-001.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: contain is not animatable</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+<meta name=assert content="the contain property is not animatable">
+<style>
+div {
+ border: 50px solid green;
+ background: red;
+ position: absolute; /* for shrinkwrap */
+ contain: strict;
+
+ animation-duration: 1s;
+ animation-name: bad;
+ animation-play-state: paused;
+
+ font-size: 100px;
+}
+
+@keyframes bad {
+ from {
+ contain: none;
+ }
+}
+</style>
+
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div>&nbsp;</div>
+
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-layout-018.html b/tests/wpt/web-platform-tests/css/css-contain/contain-layout-018.html
new file mode 100644
index 00000000000..5d7ebc0195c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-layout-018.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Layout containment stacking context</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
+<link rel="match" href="../reference/nothing.html">
+<meta name=assert content="Elements in which layout containment doesn't apply, do not create a stacking context.">
+<style>
+div {
+ display: inline;
+ contain: layout;
+ background: white;
+}
+span {
+ position: relative;
+ z-index: -1;
+}
+</style>
+
+<p>There should be nothing below.</p>
+<div><span>FAIL</span></div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-layout-baseline-001.html b/tests/wpt/web-platform-tests/css/css-contain/contain-layout-baseline-001.html
new file mode 100644
index 00000000000..ed2471a6261
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-layout-baseline-001.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<html lang=en>
+ <meta charset=utf-8>
+ <title>CSS-contain test: layout containment and baselines</title>
+ <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
+ <meta name=assert content="With contain:layout, for the purpose of the vertical-align property, the containing element is treated as having no baseline.">
+ <link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+ <link rel=help href="https://drafts.csswg.org/css-contain-1/#containment-layout">
+ <meta name="flags" content="">
+
+<style>
+#red {
+ position: absolute;
+ background: red;
+ width: 100px;
+ height: 100px;
+ z-index: -1;
+}
+.green {
+ display: inline-block;
+ height: 100px;
+ background: green;
+ width: 50px;
+ contain: layout;
+ color: transparent;
+}
+</style>
+
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div id=red></div>
+<div class=green></div><div class=green>a</div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-paint-025.html b/tests/wpt/web-platform-tests/css/css-contain/contain-paint-025.html
new file mode 100644
index 00000000000..0a41b62b2c1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-paint-025.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Paint containment stacking context</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-paint">
+<link rel="match" href="../reference/nothing.html">
+<meta name=assert content="Elements in which paint containment doesn't apply, do not create a stacking context.">
+<style>
+div {
+ display: inline;
+ contain: paint;
+ background: white;
+}
+span {
+ position: relative;
+ z-index: -1;
+}
+</style>
+
+<p>There should be nothing below.</p>
+<div><span>FAIL</span></div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-paint-baseline-001.html b/tests/wpt/web-platform-tests/css/css-contain/contain-paint-baseline-001.html
new file mode 100644
index 00000000000..3f84a3003a2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-paint-baseline-001.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html lang=en>
+ <meta charset=utf-8>
+ <title>CSS-contain test: paint containment and baselines</title>
+ <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
+ <meta name=assert content="contain:paint does not suppress baseline alignment">
+ <link rel="match" href="reference/contain-baseline-ref.html">
+ <link rel=help href="https://drafts.csswg.org/css-contain-1/#containment-paint">
+ <meta name="flags" content="">
+
+<style>
+div {
+ display: inline-block;
+ height: 5px;
+ background: blue;
+ width: 50px;
+ contain: paint;
+ color: transparent;
+ font-size: 100px;
+}
+</style>
+
+<p>Test passes if there are two, not one, blue lines below.</p>
+<div></div><div>a</div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-size-baseline-001.html b/tests/wpt/web-platform-tests/css/css-contain/contain-size-baseline-001.html
new file mode 100644
index 00000000000..0ffed1b3b6a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-size-baseline-001.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html lang=en>
+ <meta charset=utf-8>
+ <title>CSS-contain test: size containment and baselines</title>
+ <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
+ <meta name=assert content="contain:size does not suppress baseline alignment">
+ <link rel="match" href="reference/contain-baseline-ref.html">
+ <link rel=help href="https://drafts.csswg.org/css-contain-1/#containment-size">
+ <meta name="flags" content="">
+
+<style>
+div {
+ display: inline-block;
+ height: 5px;
+ background: blue;
+ width: 50px;
+ contain: size;
+ color: transparent;
+ font-size: 100px;
+}
+</style>
+
+<p>Test passes if there are two, not one, blue lines below.</p>
+<div></div><div>a</div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-002.html b/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-002.html
new file mode 100644
index 00000000000..1e7771e7c12
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-002.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Size containment on grid container with explicit non-intrinsically sized tracks (and gaps)</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
+<meta name=assert content="grid-gap, grid-template-columns, and grid-template-rows do affect the size of the grid, even with size containment">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+
+<style>
+div {
+ position: absolute;
+}
+#red {
+ background: red;
+ width: 100px;
+ height: 100px;
+}
+#test {
+ background: green;
+
+ contain: size;
+ display: grid;
+ grid-gap: 20px;
+ grid-template-columns: auto 80px; /* 0 + 20 + 80 = 100 */
+ grid-template-rows: 40px 40px; /* 40 + 20 + 40 = 100 */
+ font-size: 800px;
+}
+</style>
+
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div id=red></div>
+<div id=test>&nbsp;</div>
+
+<!--
+The &nbsp;, auto sized column, and 800px font size
+are to make the test fail in browsers
+that do not implement contain:size at all,
+by making the box non square.
+-->
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-size-multicol-001.html b/tests/wpt/web-platform-tests/css/css-contain/contain-size-multicol-001.html
new file mode 100644
index 00000000000..5c0dba9b7bb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-size-multicol-001.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Size containment on a multicol with set column size (and gap)</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
+<meta name=assert content="columns and column-gap do affect the size of a multicol, even with size containment">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+
+<style>
+div {
+ position: absolute;
+}
+#red {
+ background: red;
+ width: 100px;
+ height: 100px;
+}
+#test {
+ background: green;
+
+ columns: 2 40px;
+ column-gap: 20px;
+ min-height: 100px;
+
+ color: transparent;
+}
+</style>
+
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div id=red></div>
+<div id=test>
+filler filler filler filler filler filler filler filler
+filler filler filler filler filler filler filler filler
+filler filler filler filler filler filler filler filler
+filler filler filler filler filler filler filler filler
+</div>
+
+<!--
+The filler text, min-height (instead of height) and transparent color
+are to make the test fail in browsers
+that do not implement contain:size at all,
+by making the box non square.
+-->
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-size-scrollbars-001.html b/tests/wpt/web-platform-tests/css/css-contain/contain-size-scrollbars-001.html
new file mode 100644
index 00000000000..304e81e5c98
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-size-scrollbars-001.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Size containment scrollbars</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
+<link rel="match" href="reference/contain-size-scrollbars-001-ref.html">
+<meta name=assert content="This test checks that the size of an element with 'contain: size' includes the scrollbars too.">
+<style>
+div {
+ contain: size;
+ display: inline-block;
+ border: solid thick;
+ overflow: scroll;
+}
+</style>
+<p>This test passes if it has the same output as the reference.</p>
+<div></div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-style-baseline-001.html b/tests/wpt/web-platform-tests/css/css-contain/contain-style-baseline-001.html
new file mode 100644
index 00000000000..f05d2098283
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/contain-style-baseline-001.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html lang=en>
+ <meta charset=utf-8>
+ <title>CSS-contain test: style containment and baselines</title>
+ <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
+ <meta name=assert content="contain:style does not suppress baseline alignment">
+ <link rel="match" href="reference/contain-baseline-ref.html">
+ <link rel=help href="https://drafts.csswg.org/css-contain-1/#containment-style">
+ <meta name="flags" content="">
+
+<style>
+div {
+ display: inline-block;
+ height: 5px;
+ background: blue;
+ width: 50px;
+ contain: style;
+ color: transparent;
+ font-size: 100px;
+}
+</style>
+
+<p>Test passes if there are two, not one, blue lines below.</p>
+<div></div><div>a</div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-baseline-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-baseline-ref.html
new file mode 100644
index 00000000000..1fdecb1c331
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-baseline-ref.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<html lang=en>
+<meta charset=utf-8>
+<title>CSS test reference</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
+<style>
+div {
+ display: inline-block;
+ height: 5px;
+ background: blue;
+ width: 50px;
+ color: transparent;
+ font-size: 100px;
+}
+</style>
+
+<p>Test passes if there are two, not one, blue lines below.</p>
+<div></div><div>a</div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-size-scrollbars-001-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-size-scrollbars-001-ref.html
new file mode 100644
index 00000000000..402ff6c95e1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-size-scrollbars-001-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Reference file</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<style>
+div {
+ display: inline-block;
+ border: solid thick;
+ overflow: scroll;
+}
+</style>
+<p>This test passes if it has the same output as the reference.</p>
+<div></div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-counters-003-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-counters-003-ref.html
index 8eb67b5943f..12f9b989fd2 100644
--- a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-counters-003-ref.html
+++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-counters-003-ref.html
@@ -13,6 +13,6 @@
}
</style>
- <p>Test passes if there is the digit 20.
+ <p>Test passes if there is the number 20.
<div>20</div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/support/60x60-red.png b/tests/wpt/web-platform-tests/css/css-contain/support/60x60-red.png
deleted file mode 100644
index 823f125b8e4..00000000000
--- a/tests/wpt/web-platform-tests/css/css-contain/support/60x60-red.png
+++ /dev/null
Binary files differ
diff --git a/tests/wpt/web-platform-tests/css/css-display/display-contents-fieldset-nested-legend-ref.html b/tests/wpt/web-platform-tests/css/css-display/display-contents-fieldset-nested-legend-ref.html
index 6f547b3201c..c4afe0e53ba 100644
--- a/tests/wpt/web-platform-tests/css/css-display/display-contents-fieldset-nested-legend-ref.html
+++ b/tests/wpt/web-platform-tests/css/css-display/display-contents-fieldset-nested-legend-ref.html
@@ -3,4 +3,4 @@
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<title>CSS Test Reference</title>
-<fieldset style="color: green">P<legend style="padding: 0">legend</legend>ASS</fieldset>
+<fieldset style="color: green">P<legend>legend</legend>ASS</fieldset>
diff --git a/tests/wpt/web-platform-tests/css/css-display/parsing/display-invalid.html b/tests/wpt/web-platform-tests/css/css-display/parsing/display-invalid.html
new file mode 100644
index 00000000000..70516ad4901
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-display/parsing/display-invalid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Display: parsing display with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#display-prop">
+<link rel="help" href="https://drafts.csswg.org/css-display/#the-display-properties">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-containers">
+<meta name="assert" content="display supports only the spec grammar.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("display", "grid inline-grid");
+test_invalid_value("display", "none grid");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-display/parsing/display-valid.html b/tests/wpt/web-platform-tests/css/css-display/parsing/display-valid.html
new file mode 100644
index 00000000000..efa48350a62
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-display/parsing/display-valid.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Display: parsing display with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#display-prop">
+<link rel="help" href="https://drafts.csswg.org/css-display/#the-display-properties">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-containers">
+<meta name="assert" content="display supports the full spec grammar.">
+<meta name="assert" content="display supports the new values 'grid | inline-grid'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+// https://drafts.csswg.org/css-grid-1/#grid-containers
+test_valid_value("display", "grid");
+test_valid_value("display", "inline-grid");
+
+// https://drafts.csswg.org/css2/visuren.html#display-prop
+test_valid_value("display", "inline");
+test_valid_value("display", "block");
+test_valid_value("display", "list-item");
+test_valid_value("display", "inline-block");
+test_valid_value("display", "table");
+test_valid_value("display", "inline-table");
+test_valid_value("display", "table-row-group");
+test_valid_value("display", "table-header-group");
+test_valid_value("display", "table-footer-group");
+test_valid_value("display", "table-row");
+test_valid_value("display", "table-column-group");
+test_valid_value("display", "table-column");
+test_valid_value("display", "table-cell");
+test_valid_value("display", "table-caption");
+test_valid_value("display", "none");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-001.html b/tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-001.html
new file mode 100644
index 00000000000..a96994a8afe
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-001.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<title>CSS Test: Blurs are correctly clipped by an overflow: hidden ancestor</title>
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="help" href="https://drafts.fxtf.org/filter-effects/#funcdef-filter-blur">
+<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#valdef-overflow-hidden">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1459065">
+<link rel="match" href="blur-clip-stacking-context-ref.html">
+<style>
+ #cover, #clip, #blur {
+ width: 100px;
+ height: 100px;
+ }
+
+ #cover, #clip {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ }
+
+ #cover {
+ background: green;
+ }
+
+ #clip {
+ overflow: hidden;
+ background: red;
+ }
+
+ #blur {
+ background: blue;
+ filter: blur(20px);
+ }
+</style>
+<div id="clip"><div id="blur"></div></div>
+<div id="cover"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-002.html b/tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-002.html
new file mode 100644
index 00000000000..0473f129494
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-002.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<title>CSS Test: Blurs on an overflow: hidden element are correctly not-clipped to the padding box</title>
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="help" href="https://drafts.fxtf.org/filter-effects/#funcdef-filter-blur">
+<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#valdef-overflow-hidden">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1459065">
+<link rel="mismatch" href="blur-clip-stacking-context-ref.html">
+<style>
+ #cover, #clip {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ width: 100px;
+ height: 100px;
+ }
+
+ #cover {
+ background: green;
+ }
+
+ #clip {
+ overflow: hidden;
+ background: blue;
+ filter: blur(20px);
+ }
+</style>
+<div id="clip"></div>
+<div id="cover"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-ref.html b/tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-ref.html
new file mode 100644
index 00000000000..82b907334fd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-filter/blur-clip-stacking-context-ref.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<style>
+ div {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ background: green;
+ width: 100px;
+ height: 100px;
+ }
+</style>
+<div></div>
diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/percentage-heights-quirks-node.html b/tests/wpt/web-platform-tests/css/css-flexbox/percentage-heights-quirks-node.html
new file mode 100644
index 00000000000..4b254b46467
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-flexbox/percentage-heights-quirks-node.html
@@ -0,0 +1,9 @@
+<title>In quirks mode a flex item should resolve its percentage height against its first ancestor with a defined height.</title>
+<link rel="help" href="https://quirks.spec.whatwg.org/#the-percentage-height-calculation-quirk">
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
+<div style="width: 200px; height: 200px;">
+ <div style="display: flex;">
+ <div style="width: 50%; height: 50%; background: green;"></div>
+ </div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors.html b/tests/wpt/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors.html
index ece5b4be9b9..942686c4a1f 100644
--- a/tests/wpt/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors.html
+++ b/tests/wpt/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors.html
@@ -75,9 +75,9 @@
// Single value, calc
{ value: "calc(100.5)", isValid: true, expectedValue: "100.5", description: "Simple calc value" },
- { value: "calc(1001)", isValid: false, description: "Out-of-range simple calc value" },
+ { value: "calc(1001)", isValid: true, description: "Out-of-range simple calc value (should be clamped)" },
{ value: "calc(100.5*3 + 50.5)", isValid: true, expectedValue: "352", description: "Valid calc expression" },
- { value: "calc(100.5*3 + 800)", isValid: false, description: "Valid calc expression with out-of-range value" },
+ { value: "calc(100.5*3 + 800)", isValid: true, description: "Valid calc expression with out-of-range value (should be clamped)" },
{ value: "calc(100.5px + 50.5px)", isValid: false, description: "Valid calc expression with units" },
// Value range
diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html
index b35b16d648d..79dd1d43506 100644
--- a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html
+++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html
@@ -23,14 +23,17 @@
.columns { grid-template-columns: 100px 100px; }
.rows { grid-template-rows: 100px 100px; }
-.min-content-columns { grid-auto-columns: min-content; }
-.max-content-columns { grid-auto-columns: max-content; }
-.fit-content-columns { grid-auto-columns: fit-content; }
-.flex-columns { grid-auto-columns: 1fr; }
-.min-content-rows { grid-auto-rows: min-content; }
-.max-content-rows { grid-auto-rows: max-content; }
-.fit-content-rows { grid-auto-rows: fit-content; }
-.flex-rows { grid-auto-rows: 1fr; }
+.min-content-columns { grid-template-columns: min-content; }
+.max-content-columns { grid-template-columns: max-content; }
+.fit-content-columns { grid-template-columns: fit-content; }
+.min-content-rows { grid-template-rows: min-content; }
+.max-content-rows { grid-template-rows: max-content; }
+.fit-content-rows { grid-template-rows: fit-content; }
+
+.flex-columns { grid-template-columns: 1fr; }
+.max-flex-columns { grid-template-columns: minmax(0px, 1fr); }
+.flex-rows { grid-template-rows: 1fr; }
+.max-flex-rows { grid-template-rows: minmax(0px, 1fr); }
.height25 { height: 25px; }
.height50 { height: 50px; }
@@ -47,82 +50,113 @@
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.inline-grid')">
-<pre>auto-sized rows - items with relative height</pre>
-
-<div class="inline-grid alignItemsBaseline columns">
- <div class="firstRowFirstColumn height50" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
- <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="100"></div>
- <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="50" data-expected-width="200" data-expected-height="25"></div>
+<div style="height: 125px">
+ <pre>auto-sized rows - items with relative height</pre>
+ <div class="inline-grid alignItemsBaseline columns">
+ <div class="firstRowFirstColumn height50" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
+ <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="100"></div>
+ <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="50" data-expected-width="200" data-expected-height="25"></div>
+ </div>
</div>
-<pre>min-content-sized rows - items with relative height</pre>
-
-<div class="inline-grid alignItemsBaseline columns min-content-rows">
- <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div>
- <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div>
+<div style="height: 200px">
+ <pre>min-content-sized rows - items with relative height</pre>
+ <div class="inline-grid alignItemsBaseline columns min-content-rows">
+ <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div>
+ <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div>
+ </div>
</div>
-<pre>max-content-sized rows - items with relative height</pre>
-
-<div class="inline-grid alignItemsBaseline columns max-content-rows">
- <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div>
- <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div>
+<div style="height: 200px">
+ <pre>max-content-sized rows - items with relative height</pre>
+ <div class="inline-grid alignItemsBaseline columns max-content-rows">
+ <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div>
+ <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div>
+ </div>
</div>
-<pre>fit-content-sized rows - items with relative height</pre>
-
-<div class="inline-grid alignItemsBaseline columns fit-content-rows">
- <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div>
- <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div>
+<div style="height: 200px">
+ <pre>fit-content-sized rows - items with relative height</pre>
+ <div class="inline-grid alignItemsBaseline columns fit-content-rows">
+ <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div>
+ <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div>
+ </div>
</div>
-<pre>flexible-sized rows - items with relative height</pre>
-
-<div class="inline-grid alignItemsBaseline columns flex-rows">
- <div class="firstRowFirstColumn height50" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
- <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="100"></div>
- <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="50" data-expected-width="200" data-expected-height="25"></div>
+<div style="height: 125px">
+ <pre>flexible-sized rows - items with relative height</pre>
+ <div class="inline-grid alignItemsBaseline columns flex-rows">
+ <div class="firstRowFirstColumn height50" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
+ <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="100"></div>
+ <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="50" data-expected-width="200" data-expected-height="25"></div>
+ </div>
</div>
-<pre>auto-sized columns - items with relative width</pre>
-
-<div class="inline-grid justifyItemsBaseline rows">
- <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
- <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div>
- <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+<div style="height: 125px">
+ <pre>flex max-function rows - items with relative height</pre>
+ <div class="inline-grid alignItemsBaseline columns max-flex-rows">
+ <div class="firstRowFirstColumn height50" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div>
+ <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="100"></div>
+ <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="50" data-expected-width="200" data-expected-height="25"></div>
+ </div>
</div>
-<pre>min-content-sized columns - items with relative width</pre>
-
-<div class="inline-grid justifyItemsBaseline rows min-content-columns">
- <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div>
- <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+<div style="height: 250px">
+ <pre>auto-sized columns - items with relative width</pre>
+ <div class="inline-grid justifyItemsBaseline rows">
+ <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ </div>
</div>
-<pre>max-content-sized columns - items with relative width</pre>
-
-<div class="inline-grid justifyItemsBaseline rows max-content-columns">
- <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div>
- <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+<div style="height: 250px">
+ <pre>min-content-sized columns - items with relative width</pre>
+ <div class="inline-grid justifyItemsBaseline rows min-content-columns">
+ <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div>
+ <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ </div>
</div>
-<pre>fit-content-sized columns - items with relative width</pre>
+<div style="height: 250px">
+ <pre>max-content-sized columns - items with relative width</pre>
+ <div class="inline-grid justifyItemsBaseline rows max-content-columns">
+ <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div>
+ <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ </div>
+</div>
-<div class="inline-grid justifyItemsBaseline rows fit-content-columns">
- <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div>
- <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+<div style="height: 250px">
+ <pre>fit-content-sized columns - items with relative width</pre>
+ <div class="inline-grid justifyItemsBaseline rows fit-content-columns">
+ <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div>
+ <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ </div>
</div>
-<pre>flexible-sized columns - items with relative width</pre>
+<div style="height: 250px">
+ <pre>flexible-sized columns - items with relative width</pre>
+ <div class="inline-grid justifyItemsBaseline rows flex-columns">
+ <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ </div>
+</div>
-<div class="inline-grid justifyItemsBaseline rows flex-columns">
- <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
- <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div>
- <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+<div style="height: 250px">
+ <pre>flex max-function columns - items with relative width<br>baseline is not applied initially, but orthogonal items force repeating the track sizing and height is not indefinite in that phase.</pre>
+ <!-- https://github.com/w3c/csswg-drafts/issues/3046 -->
+ <div class="inline-grid justifyItemsBaseline rows max-flex-columns">
+ <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>
+ <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="-50" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div>
+ <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ </div>
</div>
+
+</body>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-002.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-002.html
index 4d0f506c7b6..3232913cb13 100644
--- a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-002.html
+++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-002.html
@@ -23,14 +23,17 @@
.columns { grid-template-columns: 100px 100px; }
.rows { grid-template-rows: 100px 100px; }
-.min-content-columns { grid-auto-columns: min-content; }
-.max-content-columns { grid-auto-columns: max-content; }
-.fit-content-columns { grid-auto-columns: fit-content; }
-.flex-columns { grid-auto-columns: 1fr; }
-.min-content-rows { grid-auto-rows: min-content; }
-.max-content-rows { grid-auto-rows: max-content; }
-.fit-content-rows { grid-auto-rows: fit-content; }
-.flex-rows { grid-auto-rows: 1fr; }
+.min-content-columns { grid-template-columns: min-content; }
+.max-content-columns { grid-template-columns: max-content; }
+.fit-content-columns { grid-template-columns: fit-content; }
+.flex-columns { grid-template-columns: 1fr; }
+.max-flex-columns { grid-template-columns: minmax(0px, 1fr); }
+
+.min-content-rows { grid-template-rows: min-content; }
+.max-content-rows { grid-template-rows: max-content; }
+.fit-content-rows { grid-template-rows: fit-content; }
+.flex-rows { grid-template-rows: 1fr; }
+.max-flex-rows { grid-template-rows: minmax(0px, 1fr); }
.height25 { height: 25px; }
.height50 { height: 50px; }
@@ -50,7 +53,6 @@
<body onload="checkLayout('.inline-grid')">
<pre>auto-sized rows - horizonal grid and verticalLR item - column-axis baseline</pre>
-
<div class="inline-grid alignItemsBaseline columns height200">
<div class="firstRowFirstColumn bigFont paddingBottom" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="75">É</div>
<div class="firstRowSecondColumn verticalLR" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="175">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
@@ -58,7 +60,6 @@
</div>
<pre>min-content-sized rows - horizonal grid and verticalLR item - column-axis baseline</pre>
-
<div class="inline-grid alignItemsBaseline columns min-content-rows">
<div class="firstRowFirstColumn bigFont paddingBottom" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="75">É</div>
<div class="firstRowSecondColumn verticalLR" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="75">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
@@ -66,23 +67,35 @@
</div>
<pre>max-content-sized rows - horizonal grid and verticalLR item - column-axis baseline</pre>
-
<div class="inline-grid alignItemsBaseline columns max-content-rows">
- <div class="firstRowFirstColumn bigFont paddingBottom" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="75">É</div>
- <div class="firstRowSecondColumn verticalLR" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="416">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="firstRowFirstColumn bigFont paddingBottom" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="75">É</div>
+ <div class="firstRowSecondColumn verticalLR" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="416">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
<div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="416" data-expected-width="200" data-expected-height="25"></div>
</div>
<pre>fit-content-sized rows - horizonal grid and verticalLR item - column-axis baseline</pre>
-
<div class="inline-grid alignItemsBaseline columns fit-content-rows">
- <div class="firstRowFirstColumn bigFont paddingBottom" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="75">É</div>
- <div class="firstRowSecondColumn verticalLR" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="416">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="firstRowFirstColumn bigFont paddingBottom" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="75">É</div>
+ <div class="firstRowSecondColumn verticalLR" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="416">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
<div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="416" data-expected-width="200" data-expected-height="25"></div>
</div>
-<pre>auto-sized columns - horizontal grid item - row-axis baseline</pre>
+<pre>flex-sized rows - horizonal grid and verticalLR item - column-axis baseline</pre>
+<div class="inline-grid alignItemsBaseline columns flex-rows">
+ <div class="firstRowFirstColumn bigFont paddingBottom" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="75">É</div>
+ <div class="firstRowSecondColumn verticalLR" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="416">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="416" data-expected-width="200" data-expected-height="25"></div>
+</div>
+<pre>max-flex-sized rows - horizonal grid and verticalLR item - column-axis baseline<br>baseline is not applied initially, but orthogonal items force repeating the track sizing and height is not indefinite in that phase.</pre>
+<!-- https://github.com/w3c/csswg-drafts/issues/3046 -->
+<div class="inline-grid alignItemsBaseline columns max-flex-rows">
+ <div class="firstRowFirstColumn bigFont paddingBottom" data-offset-x="0" data-offset-y="376" data-expected-width="100" data-expected-height="75">É</div>
+ <div class="firstRowSecondColumn verticalLR" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="416">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="416" data-expected-width="200" data-expected-height="25"></div>
+</div>
+
+<pre>auto-sized columns - horizontal grid item - row-axis baseline</pre>
<div class="inline-grid justifyItemsBaseline rows width200">
<div class="firstRowFirstColumn bigFont verticalLR paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="175" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
@@ -90,7 +103,6 @@
</div>
<pre>min-content-sized columns - horizontal grid item - row-axis baseline</pre>
-
<div class="inline-grid justifyItemsBaseline rows min-content-columns">
<div class="firstRowFirstColumn bigFont verticalLR paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="75" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
@@ -98,7 +110,6 @@
</div>
<pre>max-content-sized columns - horizontal grid item - row-axis baseline</pre>
-
<div class="inline-grid justifyItemsBaseline rows max-content-columns">
<div class="firstRowFirstColumn bigFont verticalLR paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
@@ -106,15 +117,28 @@
</div>
<pre>fit-content-sized columns - horizontal grid item - row-axis baseline</pre>
-
<div class="inline-grid justifyItemsBaseline rows fit-content-columns">
<div class="firstRowFirstColumn bigFont verticalLR paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
<div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
<div class="firstRowSpanning2AutoColumn width25" data-offset-x="416" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
</div>
-<pre>auto-sized rows - verticalLR grid and horizontal item - column-axis baseline</pre>
+<pre>flex-sized columns - horizontal grid item - row-axis baseline</pre>
+<div class="inline-grid justifyItemsBaseline rows flex-columns">
+ <div class="firstRowFirstColumn bigFont verticalLR paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="firstRowSpanning2AutoColumn width25" data-offset-x="416" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+</div>
+
+<pre>max-flex-sized columns - horizontal grid item - row-axis baseline<br>baseline is not applied initially, but orthogonal items force repeating the track sizing and height is not indefinite in that phase.</pre>
+<!-- https://github.com/w3c/csswg-drafts/issues/3046 -->
+<div class="inline-grid justifyItemsBaseline rows max-flex-columns">
+ <div class="firstRowFirstColumn bigFont verticalLR paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="secondRowFirstColumn" data-offset-x="35" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="firstRowSpanning2AutoColumn width25" data-offset-x="416" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+</div>
+<pre>auto-sized rows - verticalLR grid and horizontal item - column-axis baseline</pre>
<div class="inline-grid verticalLR alignItemsBaseline columns width200">
<div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
<div class="firstRowSecondColumn horizontalTB" data-offset-x="0" data-offset-y="100" data-expected-width="175" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
@@ -122,7 +146,6 @@
</div>
<pre>min-content-sized rows - verticalLR grid and horizontal item - column-axis baseline</pre>
-
<div class="inline-grid verticalLR alignItemsBaseline columns min-content-rows">
<div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
<div class="firstRowSecondColumn horizontalTB" data-offset-x="0" data-offset-y="100" data-expected-width="75" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
@@ -130,7 +153,6 @@
</div>
<pre>max-content-sized rows - verticalLR grid and horizontal item - column-axis baseline</pre>
-
<div class="inline-grid verticalLR alignItemsBaseline columns max-content-rows">
<div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
<div class="firstRowSecondColumn horizontalTB" data-offset-x="0" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
@@ -138,41 +160,68 @@
</div>
<pre>fit-content-sized rows - verticalLR grid and horizontal item - column-axis baseline</pre>
-
<div class="inline-grid verticalLR alignItemsBaseline columns fit-content-rows">
<div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
<div class="firstRowSecondColumn horizontalTB" data-offset-x="0" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
<div class="autoRowAutoColumnSpanning2 width25" data-offset-x="416" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
</div>
-<pre>auto-sized rows - verticalRL grid and horizontal item - column-axis baseline</pre>
+<pre>flex-sized rows - verticalLR grid and horizontal item - column-axis baseline</pre>
+<div class="inline-grid verticalLR alignItemsBaseline columns flex-rows">
+ <div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="firstRowSecondColumn horizontalTB" data-offset-x="0" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="416" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+</div>
+<pre>max-flex-sized rows - verticalLR grid and horizontal item - column-axis baseline<br>baseline is not applied initially, but orthogonal items force repeating the track sizing and height is not indefinite in that phase.</pre>
+<!-- https://github.com/w3c/csswg-drafts/issues/3046 -->
+<div class="inline-grid verticalLR alignItemsBaseline columns max-flex-rows">
+ <div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="firstRowSecondColumn horizontalTB" data-offset-x="35" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="416" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+</div>
+
+<pre>auto-sized rows - verticalRL grid and horizontal item - column-axis baseline</pre>
<div class="inline-grid verticalRL alignItemsBaseline columns width200">
- <div class="firstRowFirstColumn bigFont paddingRight" data-offset-x="125" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
- <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="175" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ <div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="125" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="175" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
</div>
<pre>min-content-sized rows - verticalRL grid and horizontal item - column-axis baseline</pre>
-
<div class="inline-grid verticalRL alignItemsBaseline columns min-content-rows">
- <div class="firstRowFirstColumn bigFont paddingRight" data-offset-x="25" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
- <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="75" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ <div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="25" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="75" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
</div>
<pre>max-content-sized rows - verticalRL grid and horizontal item - column-axis baseline</pre>
-
<div class="inline-grid verticalRL alignItemsBaseline columns max-content-rows">
- <div class="firstRowFirstColumn bigFont paddingRight" data-offset-x="366" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
- <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ <div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="366" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
</div>
<pre>fit-content-sized rows - verticalRL grid and horizontal item - column-axis baseline</pre>
-
<div class="inline-grid verticalRL alignItemsBaseline columns fit-content-rows">
- <div class="firstRowFirstColumn bigFont paddingRight" data-offset-x="366" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
- <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
- <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+ <div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="366" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+</div>
+
+<pre>flex-sized rows - verticalRL grid and horizontal item - column-axis baseline</pre>
+<div class="inline-grid verticalRL alignItemsBaseline columns flex-rows">
+ <div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="366" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
</div>
+
+<pre>max-flex-sized rows - verticalRL grid and horizontal item - column-axis baseline<br>baseline is not applied initially, but orthogonal items force repeating the track sizing and height is not indefinite in that phase.</pre>
+<!-- https://github.com/w3c/csswg-drafts/issues/3046 -->
+<div class="inline-grid verticalRL alignItemsBaseline columns max-flex-rows">
+ <div class="firstRowFirstColumn bigFont paddingLeft" data-offset-x="-10" data-offset-y="0" data-expected-width="75" data-expected-height="100">É</div>
+ <div class="firstRowSecondColumn horizontalTB" data-offset-x="25" data-offset-y="100" data-expected-width="416" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div>
+ <div class="autoRowAutoColumnSpanning2 width25" data-offset-x="0" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>
+</div>
+
+</body>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-area-invalid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-area-invalid.html
new file mode 100644
index 00000000000..b989322775e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-area-invalid.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-area with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-area">
+<meta name="assert" content="grid-area supports only the grammar '<grid-line> [ / <grid-line> ]{0,3}'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("grid-area", "'string'");
+test_invalid_value("grid-row", "1.0");
+test_invalid_value("grid-column", "1 2");
+test_invalid_value("grid-row-start", "+-3");
+test_invalid_value("grid-column-start", "0");
+test_invalid_value("grid-row-end", "span");
+test_invalid_value("grid-column-end", "sPaN");
+test_invalid_value("grid-column-end", '"1st"');
+test_invalid_value("grid-column-end", "1st");
+
+test_invalid_value("grid-area", "auto / initial");
+test_invalid_value("grid-row", "auto / inherit");
+test_invalid_value("grid-column", "auto / unset");
+
+test_invalid_value("grid-area", "auto / auto / auto / auto / auto");
+test_invalid_value("grid-row", "1 / 2 / 3")
+test_invalid_value("grid-column", "a / b / c");
+test_invalid_value("grid-row-end", "span 1 / span 2");
+test_invalid_value("grid-area", "auto 2 auto 4");
+test_invalid_value("grid-row", "33 -A0 auto");
+test_invalid_value("grid-row", "auto i 2 j span 3 k");
+
+
+// https://github.com/w3c/csswg-drafts/issues/2856
+test_invalid_value("grid-row-end", "1 auto");
+test_invalid_value("grid-row-end", "span 1 auto");
+test_invalid_value("grid-row-end", "span auto 1");
+test_invalid_value("grid-row-end", "1 auto span");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-area-valid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-area-valid.html
new file mode 100644
index 00000000000..8e7d0d43d1c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-area-valid.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-area with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-area">
+<meta name="assert" content="grid-area supports the full grammar '<grid-line> [ / <grid-line> ]{0,3}'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+// auto
+test_valid_value("grid-area", "auto", "auto / auto / auto / auto");
+test_valid_value("grid-area", "AuTo", "auto / auto / auto / auto");
+test_valid_value("grid-row", "auto", "auto / auto");
+test_valid_value("grid-column-end", "AuTo", "auto");
+
+// <custom-ident>
+test_valid_value("grid-area", "--a", "--a / --a / --a / --a");
+test_valid_value("grid-row", "-zπ", "-zπ / -zπ");
+test_valid_value("grid-row-start", "AZ");
+test_valid_value("grid-column-start", "-_π");
+test_valid_value("grid-row-end", "_9");
+
+
+// <integer> && <custom-ident>?
+test_valid_value("grid-area", "1", "1 / auto / auto / auto");
+test_valid_value("grid-area", "+90 -a-", "90 -a- / auto / auto / auto");
+test_valid_value("grid-row", "az 2", "2 az / auto");
+test_valid_value("grid-column", "9", "9 / auto");
+test_valid_value("grid-column", "-19 zA", "-19 zA / auto");
+test_valid_value("grid-column", "-A0 33", "33 -A0 / auto");
+test_valid_value("grid-row-start", "-19");
+test_valid_value("grid-row-start", "9 -Z_");
+test_valid_value("grid-column-start", "+90", "90");
+test_valid_value("grid-column-start", "Z -44", "-44 Z");
+test_valid_value("grid-row-end", "1 -πA");
+test_valid_value("grid-column-end", "π_ +5", "5 π_");
+
+// span && [ <integer> || <custom-ident> ]
+test_valid_value("grid-area", "span 2 i", "span 2 i / auto / auto / auto");
+test_valid_value("grid-area", "i 2 SpAn", "span 2 i / auto / auto / auto");
+test_valid_value("grid-row", "span 2", "span 2 / auto");
+test_valid_value("grid-column", "i SpAn", "span i / auto");
+test_valid_value("grid-row-start", "span i", "span i");
+test_valid_value("grid-column-start", "SpAn i 2", "span 2 i");
+test_valid_value("grid-row-end", "2 i span", "span 2 i");
+test_valid_value("grid-column-end", "2 SpAn", "span 2");
+
+// <grid-line> [ / <grid-line> ]{0,3}
+test_valid_value("grid-area", "auto / i", "auto / i / auto / i");
+test_valid_value("grid-area", "auto / i / 2 j", "auto / i / 2 j / i");
+test_valid_value("grid-area", "auto / i / 2 j / span 3 k");
+test_valid_value("grid-row", "auto / i");
+test_valid_value("grid-column", "2 j / span 3 k");
+
+
+// https://github.com/w3c/csswg-drafts/issues/2858
+// '\\31 st' in Blink, Firefox, '1st' in Edge, '"1st"' in Safari.
+test_valid_value("grid-column-end", "\\31st", ["\\31 st", "1st", '"1st"']);
+test_valid_value("grid-column-end", "\\31 st", ["\\31 st", "1st", '"1st"']);
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-columns-invalid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-columns-invalid.html
new file mode 100644
index 00000000000..e7a965f34ad
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-columns-invalid.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-auto-columns with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns">
+<meta name="assert" content="grid-auto-columns supports only the grammar '<track-size>+'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+// <track-breadth>
+test_invalid_value("grid-auto-columns", "none");
+test_invalid_value("grid-auto-columns", "-1px");
+test_invalid_value("grid-auto-columns", "-4%");
+
+// minmax( <inflexible-breadth> , <track-breadth> )
+test_invalid_value("grid-auto-columns", "minmax(1px)");
+test_invalid_value("grid-auto-columns", "minmax(1px, 2px, 3px)");
+test_invalid_value("grid-auto-columns", "minmax(5fr, 1px)");
+test_invalid_value("grid-auto-columns", "minmax(6px, -7%)");
+test_invalid_value("grid-auto-columns", "minmax(8px, -9fr)");
+
+// fit-content( <length-percentage> )
+test_invalid_value("grid-auto-columns", "fit-content(-1px)");
+test_invalid_value("grid-auto-columns", "fit-content(1px, 2px)");
+test_invalid_value("grid-auto-columns", "fit-content(1px auto)");
+
+// <track-size>+
+test_invalid_value("grid-auto-columns", "2em / 3em");
+test_invalid_value("grid-auto-columns", "auto, 10%");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-columns-valid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-columns-valid.html
new file mode 100644
index 00000000000..ba1f5f60d65
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-columns-valid.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-auto-columns with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns">
+<meta name="assert" content="grid-auto-columns supports the full grammar '<track-size>+'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+// <track-breadth>
+// <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto
+test_valid_value("grid-auto-columns", "1px");
+test_valid_value("grid-auto-columns", "2em");
+test_valid_value("grid-auto-columns", "calc(2em + 3ex)");
+test_valid_value("grid-auto-columns", "4%");
+test_valid_value("grid-auto-columns", "5fr");
+test_valid_value("grid-auto-columns", "min-content");
+test_valid_value("grid-auto-columns", "max-content");
+test_valid_value("grid-auto-columns", "auto");
+
+// minmax( <inflexible-breadth> , <track-breadth> )
+// <inflexible-breadth> = <length-percentage> | min-content | max-content | auto
+test_valid_value("grid-auto-columns", "minmax(1px, 5fr)");
+test_valid_value("grid-auto-columns", "minmax(2em, min-content)");
+test_valid_value("grid-auto-columns", "minmax(calc(2em + 3ex), max-content)");
+test_valid_value("grid-auto-columns", "minmax(4%, auto)");
+test_valid_value("grid-auto-columns", "minmax(5vmin, 1px)");
+test_valid_value("grid-auto-columns", "minmax(min-content, 2em)");
+test_valid_value("grid-auto-columns", "minmax(max-content, calc(2em + 3ex))");
+test_valid_value("grid-auto-columns", "minmax(auto, 4%)");
+
+// fit-content( <length-percentage> )
+test_valid_value("grid-auto-columns", "fit-content(1px)");
+test_valid_value("grid-auto-columns", "fit-content(2em)");
+test_valid_value("grid-auto-columns", "fit-content(calc(2em + 3ex))");
+test_valid_value("grid-auto-columns", "fit-content(4%)");
+
+test_valid_value("grid-auto-columns", "0px");
+test_valid_value("grid-auto-columns", "0%");
+test_valid_value("grid-auto-columns", "0fr");
+test_valid_value("grid-auto-columns", "minmax(auto, 0%)");
+test_valid_value("grid-auto-columns", "fit-content(0px)");
+
+// <track-size>+
+test_valid_value("grid-auto-columns", "1px 2px 3px 0px");
+test_valid_value("grid-auto-columns", "fit-content(1px) minmax(2px, 3px) 4px");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-flow-invalid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-flow-invalid.html
new file mode 100644
index 00000000000..a261e8eba11
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-flow-invalid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-auto-flow with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-flow">
+<meta name="assert" content="grid-auto-flow supports only the grammar '[ row | column ] || dense'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("grid-auto-flow", "auto");
+test_invalid_value("grid-auto-flow", "row dense column");
+test_invalid_value("grid-auto-flow", "dense row dense");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-flow-valid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-flow-valid.html
new file mode 100644
index 00000000000..4270a3df933
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-flow-valid.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-auto-flow with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-flow">
+<meta name="assert" content="grid-auto-flow supports the full grammar '[ row | column ] || dense'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("grid-auto-flow", "row");
+test_valid_value("grid-auto-flow", "column");
+test_valid_value("grid-auto-flow", "row dense");
+test_valid_value("grid-auto-flow", "dense column", "column dense");
+
+// Blink/WebKit "dense", Edge/Firefox "row dense"
+test_valid_value("grid-auto-flow", "dense", ["dense", "row dense"]);
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-rows-invalid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-rows-invalid.html
new file mode 100644
index 00000000000..7fceaa0f163
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-rows-invalid.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-auto-rows with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows">
+<meta name="assert" content="grid-auto-rows supports only the grammar '<track-size>+'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+// <track-breadth>
+test_invalid_value("grid-auto-rows", "none");
+test_invalid_value("grid-auto-rows", "-1px");
+test_invalid_value("grid-auto-rows", "-4%");
+
+// minmax( <inflexible-breadth> , <track-breadth> )
+test_invalid_value("grid-auto-rows", "minmax(1px)");
+test_invalid_value("grid-auto-rows", "minmax(1px, 2px, 3px)");
+test_invalid_value("grid-auto-rows", "minmax(5fr, 1px)");
+test_invalid_value("grid-auto-rows", "minmax(6px, -7%)");
+
+// fit-content( <length-percentage> )
+test_invalid_value("grid-auto-rows", "fit-content(-1px)");
+test_invalid_value("grid-auto-rows", "fit-content(1px, 2px)");
+test_invalid_value("grid-auto-rows", "fit-content(1px auto)");
+
+// <track-size>+
+test_invalid_value("grid-auto-rows", "2em / 3em");
+test_invalid_value("grid-auto-rows", "auto, 10%");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-rows-valid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-rows-valid.html
new file mode 100644
index 00000000000..cf63e2b7d52
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-auto-rows-valid.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-auto-rows with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows">
+<meta name="assert" content="grid-auto-rows supports the full grammar '<track-size>+'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+// <track-breadth>
+// <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto
+test_valid_value("grid-auto-rows", "1px");
+test_valid_value("grid-auto-rows", "2em");
+test_valid_value("grid-auto-rows", "calc(2em + 3ex)");
+test_valid_value("grid-auto-rows", "4%");
+test_valid_value("grid-auto-rows", "5fr");
+test_valid_value("grid-auto-rows", "min-content");
+test_valid_value("grid-auto-rows", "max-content");
+test_valid_value("grid-auto-rows", "auto");
+
+// minmax( <inflexible-breadth> , <track-breadth> )
+// <inflexible-breadth> = <length-percentage> | min-content | max-content | auto
+test_valid_value("grid-auto-rows", "minmax(1px, 5fr)");
+test_valid_value("grid-auto-rows", "minmax(2em, min-content)");
+test_valid_value("grid-auto-rows", "minmax(calc(2em + 3ex), max-content)");
+test_valid_value("grid-auto-rows", "minmax(4%, auto)");
+test_valid_value("grid-auto-rows", "minmax(5vmin, 1px)");
+test_valid_value("grid-auto-rows", "minmax(min-content, 2em)");
+test_valid_value("grid-auto-rows", "minmax(max-content, calc(2em + 3ex))");
+test_valid_value("grid-auto-rows", "minmax(auto, 4%)");
+
+// fit-content( <length-percentage> )
+test_valid_value("grid-auto-rows", "fit-content(1px)");
+test_valid_value("grid-auto-rows", "fit-content(2em)");
+test_valid_value("grid-auto-rows", "fit-content(calc(2em + 3ex))");
+test_valid_value("grid-auto-rows", "fit-content(4%)");
+
+test_valid_value("grid-auto-rows", "0px");
+test_valid_value("grid-auto-rows", "0%");
+test_valid_value("grid-auto-rows", "0fr");
+test_valid_value("grid-auto-rows", "minmax(auto, 0%)");
+test_valid_value("grid-auto-rows", "fit-content(0px)");
+
+// <track-size>+
+test_valid_value("grid-auto-rows", "1px 2px 3px 0px");
+test_valid_value("grid-auto-rows", "fit-content(1px) minmax(2px, 3px) 4px");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-areas-invalid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-areas-invalid.html
new file mode 100644
index 00000000000..5bc70c5697a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-areas-invalid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-template-areas with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-areas">
+<meta name="assert" content="grid-template-areas supports only the grammar 'none | <string>+'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("grid-template-areas", "auto");
+test_invalid_value("grid-template-areas", 'none "first"');
+test_invalid_value("grid-template-areas", '"first" none');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-areas-valid.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-areas-valid.html
new file mode 100644
index 00000000000..8d8f6823267
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-areas-valid.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: parsing grid-template-areas with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-areas">
+<meta name="assert" content="grid-template-areas supports the full grammar 'none | <string>+'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("grid-template-areas", "none");
+test_valid_value("grid-template-areas", '"first"');
+test_valid_value("grid-template-areas", '"first second"');
+test_valid_value("grid-template-areas", '"1st 2nd 3rd"');
+test_valid_value("grid-template-areas", '"first second" "third fourth"');
+test_valid_value("grid-template-areas", '"first second" "third ." "1st 2nd" "3rd 4th"');
+
+// Firefox preserves specific whitespace and full stop sequences.
+// Other browsers consolidate to ' ' and '.'
+test_valid_value("grid-template-areas", '" a \t b "', '"a b"'); // Fails in Firefox
+test_valid_value("grid-template-areas", '"c\td"', ['"c d"', '"c\\9 d"']);
+test_valid_value("grid-template-areas", '"first ..."', ['"first ."', '"first ..."']);
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-invalid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-invalid.html
index 626b9f13072..63ac09fc17e 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="gradient positions support only the '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-valid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-valid.html
index 382fc616360..9857496fe44 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/gradient-position-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="gradient positions support the full '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-invalid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-invalid.html
index f2a53fe5f26..72e32eba1d9 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="image-orientation supports only the grammar 'from-image | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-valid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-valid.html
index ea2ec1e699a..e40517bdc89 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/image-orientation-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="image-orientation supports the full grammar 'from-image | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-invalid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-invalid.html
index 9c54c5d7f15..febb0555ecd 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="image-rendering supports only the grammar 'auto | smooth | high-quality | crisp-edges | pixelated'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-valid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-valid.html
index b3b73edfde9..bf06b6f7985 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/image-rendering-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="image-rendering supports the full grammar 'auto | smooth | high-quality | crisp-edges | pixelated'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-invalid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-invalid.html
index e45ed73e23c..bc92a7b5010 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="image-resolution supports only the grammar '[ from-image || <resolution> ] && snap?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-valid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-valid.html
index 7345227fcaf..e04d1120ee4 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/image-resolution-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="image-resolution supports the full grammar '[ from-image || <resolution> ] && snap?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-invalid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-invalid.html
index 574573c8015..f76460f56da 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="object-fit supports only the grammar 'fill | none | [contain | cover] || scale-down'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-valid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-valid.html
index 8b531abad20..3b5ac61617c 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/object-fit-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="object-fit supports the full grammar 'fill | none | [contain | cover] || scale-down'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/object-position-invalid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/object-position-invalid.html
index 346b79a841a..63e47cf17a6 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/object-position-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/object-position-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="object-position supports only the '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/object-position-valid.html b/tests/wpt/web-platform-tests/css/css-images/parsing/object-position-valid.html
index b7be35ccd74..b9dab78b518 100644
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/object-position-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-images/parsing/object-position-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="object-position supports the full '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-images/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-images/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-images/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-001.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-001.html
new file mode 100644
index 00000000000..ebdfc2297bb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-001.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Masking: Test clip-path property and path function with nonzero fill</title>
+ <link rel="help" href="https://drafts.csswg.org/css-shapes-2/#funcdef-path">
+ <link rel="match" href="reference/clip-path-path-001-ref.html">
+ <meta name="assert" content="The clip-path property takes the basic shape
+ 'path()' for clipping. Test nonzero path function. On pass you should
+ see a green square.">
+</head>
+<style>
+ #rect {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ clip-path: path(nonzero, 'M10,10h80v80h-80zM25,25h50v50h-50z');
+ }
+</style>
+<body>
+ <p>The test passes if there are a green filled rect.</p>
+ <div id="rect"></div>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-002.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-002.html
new file mode 100644
index 00000000000..e3049922ebd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-002.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Masking: Test clip-path property and path function with evenodd fill</title>
+ <link rel="help" href="https://drafts.csswg.org/css-shapes-2/#funcdef-path">
+ <link rel="match" href="reference/clip-path-path-002-ref.html">
+ <meta name="assert" content="The clip-path property takes the basic shape
+ 'path()' for clipping. Test evenodd path function. On pass you should
+ see a hollow green square.">
+</head>
+<style>
+ #rect {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ clip-path: path(evenodd, 'M10,10h80v80h-80zM25,25h50v50h-50z');
+ }
+</style>
+<body>
+ <p>The test passes if there are a green hollow rect.</p>
+ <div id="rect"></div>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-001-ref.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-001-ref.html
new file mode 100644
index 00000000000..afc1d18f204
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-001-ref.html
@@ -0,0 +1,29 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Masking: Reference for clip-path's path function with nonzero</title>
+ <style type="text/css">
+ #rect {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ clip-path: url("#clip");
+ }
+ </style>
+</head>
+<body>
+ <p>The test passes if there are a green filled rect.</p>
+ <div id="rect"></div>
+ <svg height="0" width="0">
+ <defs>
+ <clipPath id="clip">
+ <path clip-rule="nonzero" d="M10,10h80v80h-80zM25,25h50v50h-50z"/>
+ </clipPath>
+ </defs>
+ </svg>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-002-ref.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-002-ref.html
new file mode 100644
index 00000000000..d9ea5183fb1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-002-ref.html
@@ -0,0 +1,29 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Masking: Reference for clip-path's path function with evenodd</title>
+ <style type="text/css">
+ #rect {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ clip-path: url("#clip");
+ }
+ </style>
+</head>
+<body>
+ <p>The test passes if there are a green hollow rect.</p>
+ <div id="rect"></div>
+ <svg height="0" width="0">
+ <defs>
+ <clipPath id="clip">
+ <path clip-rule="evenodd" d="M10,10h80v80h-80zM25,25h50v50h-50z"/>
+ </clipPath>
+ </defs>
+ </svg>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-image-hash.html b/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-image-hash.html
new file mode 100644
index 00000000000..b1efc90818b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-image-hash.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>CSS Test: mask-image: url(image.svg#hash)</title>
+<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#mask-layer-image">
+<link rel="match" href="reference/mask-image-ref.html">
+<meta name="assert" content="mask-image can use an SVG file as an image with element reference">
+<style>
+#back {
+ position: absolute;
+ box-sizing: border-box;
+ width: 200px;
+ height: 200px;
+ border: 60px solid green;
+ background: red;
+}
+#front {
+ position: absolute;
+ box-sizing: border-box;
+ width: 200px;
+ height: 200px;
+ border: 40px solid red;
+ background: green;
+ mask-image: url(support/image-with-ref.svg#ref);
+}
+</style>
+<p>The test passes if there is a green square and no red below.</p>
+<div id="back"></div><div id="front"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-image.html b/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-image.html
new file mode 100644
index 00000000000..40a1ff9b281
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-image.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>CSS Test: mask-image: url(image.svg)</title>
+<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#mask-layer-image">
+<link rel="match" href="reference/mask-image-ref.html">
+<meta name="assert" content="mask-image can use an SVG file as an image">
+<style>
+#back {
+ position: absolute;
+ box-sizing: border-box;
+ width: 200px;
+ height: 200px;
+ border: 60px solid green;
+ background: red;
+}
+#front {
+ position: absolute;
+ box-sizing: border-box;
+ width: 200px;
+ height: 200px;
+ border: 40px solid red;
+ background: green;
+ mask-image: url(support/image.svg);
+}
+</style>
+<p>The test passes if there is a green square and no red below.</p>
+<div id="back"></div><div id="front"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-local-mask.html b/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-local-mask.html
new file mode 100644
index 00000000000..18abc54f85e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-local-mask.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>CSS Test: mask-image: url(#local-mask)</title>
+<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#mask-layer-image">
+<link rel="match" href="reference/mask-image-ref.html">
+<meta name="assert" content="mask-image can use local reference to a &lt;mask&gt; element">
+<style>
+#back {
+ position: absolute;
+ box-sizing: border-box;
+ width: 200px;
+ height: 200px;
+ border: 60px solid green;
+ background: red;
+}
+#front {
+ position: absolute;
+ box-sizing: border-box;
+ width: 200px;
+ height: 200px;
+ border: 40px solid red;
+ background: green;
+ mask-image: url(#localmask);
+}
+</style>
+<p>The test passes if there is a green square and no red below.</p>
+<div id="back"></div><div id="front"></div>
+<svg viewBox="0 0 200 200" style="width: 0; height: 0">
+ <mask id="localmask">
+ <rect x="50" y="50" width="100" height="100" fill="white">
+ </mask>
+</svg>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-remote-mask.html b/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-remote-mask.html
new file mode 100644
index 00000000000..f3f2eefaa92
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/mask-image/mask-image-url-remote-mask.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>CSS Test: mask-image: url(remote.svg#mask)</title>
+<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#mask-layer-image">
+<link rel="match" href="reference/mask-image-ref.html">
+<meta name="assert" content="mask-image can use reference to a &lt;mask&gt; element from a remote SVG document">
+<style>
+#back {
+ position: absolute;
+ box-sizing: border-box;
+ width: 200px;
+ height: 200px;
+ border: 60px solid green;
+ background: red;
+}
+#front {
+ position: absolute;
+ box-sizing: border-box;
+ width: 200px;
+ height: 200px;
+ border: 40px solid red;
+ background: green;
+ mask-image: url(support/mask.svg#mask);
+}
+</style>
+<p>The test passes if there is a green square and no red below.</p>
+<div id="back"></div><div id="front"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/mask-image/reference/mask-image-ref.html b/tests/wpt/web-platform-tests/css/css-masking/mask-image/reference/mask-image-ref.html
new file mode 100644
index 00000000000..4e121163f9d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/mask-image/reference/mask-image-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<title>CSS Reference: mask-image</title>
+<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<style>
+#ref {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ background: green;
+}
+</style>
+<p>The test passes if there is a green square and no red below.</p>
+<div id="ref"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/mask-image/support/image-with-ref.svg b/tests/wpt/web-platform-tests/css/css-masking/mask-image/support/image-with-ref.svg
new file mode 100644
index 00000000000..fe77fb37ac6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/mask-image/support/image-with-ref.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
+ <style>
+ g { display: none; }
+ g:target { display: inline; }
+ </style>
+ <g id="ref">
+ <rect x="50" y="50" width="100" height="100" fill="black"/>
+ </g>
+</svg>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/mask-image/support/image.svg b/tests/wpt/web-platform-tests/css/css-masking/mask-image/support/image.svg
new file mode 100644
index 00000000000..28dbaa02383
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/mask-image/support/image.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
+ <rect x="50" y="50" width="100" height="100" fill="black"/>
+</svg>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/mask-image/support/mask.svg b/tests/wpt/web-platform-tests/css/css-masking/mask-image/support/mask.svg
new file mode 100644
index 00000000000..cab55923d32
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-masking/mask-image/support/mask.svg
@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
+ <mask id="mask">
+ <rect x="50" y="50" width="100" height="100" fill="white"/>
+ </mask>
+</svg>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-invalid.html b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-invalid.html
index 18ae8b552a5..85261202784 100644
--- a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="clip supports only the grammar 'rect() | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-invalid.html b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-invalid.html
index 3d33de251f6..2672d486d3e 100644
--- a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="clip-path supports only the grammar '<clip-source> | [ <basic-shape> || <geometry-box> ] | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-valid.html b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-valid.html
index 1d55ed78553..83c76fb9ff5 100644
--- a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="clip-path supports the full grammar '<clip-source> | [ <basic-shape> || <geometry-box> ] | none'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-invalid.html b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-invalid.html
index 3088d07af8e..4f4883e8a09 100644
--- a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="clip-rule supports only the grammar 'nonzero | evenodd'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-valid.html b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-valid.html
index 2fb19073a3e..fe94f8f6c5e 100644
--- a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-rule-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="clip-rule supports the full grammar 'nonzero | evenodd'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-valid.html b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-valid.html
index a21e90178b7..bd14dfd1b5c 100644
--- a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="clip supports the full grammar 'rect() | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-masking/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-masking/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/inline-block-and-column-span-all.html b/tests/wpt/web-platform-tests/css/css-multicol/inline-block-and-column-span-all.html
new file mode 100644
index 00000000000..c968a0875cd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-multicol/inline-block-and-column-span-all.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<title>Combining column-span and inline-block on the same element</title>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#column-span" title="6.1. column-span">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+<meta name="assert" content="column-span:all only applies to block-level elements, i.e. not inline-blocks, for instance">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div style="columns:4; column-gap:0; width:400px;">
+ <div style="column-span:all; display:inline-block;">
+ <div style="float:left; width:100px; height:50px; background:green;"></div>
+ <div style="float:left; width:100px; height:50px; background:green;"></div>
+ </div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/intrinsic-size-001.html b/tests/wpt/web-platform-tests/css/css-multicol/intrinsic-size-001.html
new file mode 100644
index 00000000000..ce8011b17f8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-multicol/intrinsic-size-001.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<title>Intrinsic size computation with specified padding</title>
+<link rel="author" title="Googld Inc." href="https://www.google.com/">
+<link rel="help" href="https://drafts.csswg.org/css-multicol/#pseudo-algorithm " title="3.4. Pseudo-algorithm">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div style="float:left; columns:2; height:40px; padding:30px; column-gap:0; background:green;">
+ <div style="width:20px;"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2-ref.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2-ref.xht
index 757283350f5..b49e941337e 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2-ref.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2-ref.xht
@@ -4,7 +4,7 @@
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/"/>
<style><![CDATA[
body {
- margin: 0;
+ margin: 1em;
}
body>div {
font-family: Ahem;
@@ -12,7 +12,7 @@ body>div {
line-height: 1em;
color: black;
background: yellow;
- margin: 1em;
+ margin: 1em 0;
border: 1em solid gray;
width: 15em;
height: 2em;
@@ -34,7 +34,7 @@ div+div+div {
</head>
<body>
-
+<p>Pass if there is no red visible.</p>
<div>
<div>xx xx</div>
<div class="a">x x</div>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2.xht
index ab7d75644d8..4e4d94f8e83 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2.xht
@@ -2,14 +2,15 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<title>multicolumn | column-rule</title>
+<title>CSS Multi-column Layout Test: 'column-rule' shorthand</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/"/>
<link rel="help" href=""/>
<link rel="match" href="multicol-rule-shorthand-2-ref.xht"/>
-<meta name="flags" content=""/>
+<meta name="assert" content="Tests that column rules are not displayed for invalid properties and values."/>
+<meta name="flags" content="invalid"/>
<style type="text/css"><![CDATA[
body {
- margin: 0;
+ margin: 1em;
}
body>div {
font-family: Ahem;
@@ -17,36 +18,22 @@ body>div {
line-height: 1em;
color: black;
background: yellow;
- margin: 1em;
+ margin: 1em 0;
border: 1em solid gray;
width: 15em;
- orphans: 1;
- widows: 1;
column-count: 4;
column-gap: 1em;
column-rule: solid blue 1em;
- column-rule: normal red 1em;
- column: normal red 1em;
-}
-span {
- background: blue;
- position: absolute;
- top: 0;
- left: 3em;
- height: 2em;
- width: 1em;
-}
-span+span {
- left: 7em;
-}
-span+span+span {
- left: 11em;
+ column-rule: normal red 1em; /* invalid: 'normal' is not a 'border-style' */
+ column: normal red 1em; /* invalid: 'column' is not a valid property name; 'normal' can only apply to 'column-gap' */
}
+
]]></style>
</head>
<body>
+<p>Pass if there is no red visible.</p>
<div>
xx xx
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001-ref.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001-ref.xht
index 926bb66423e..dddb96880af 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001-ref.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001-ref.xht
@@ -6,23 +6,17 @@
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
- body
+ div
{
font: 1.25em/1 Ahem;
width: 30em;
- }
-
- div
- {
background-color: yellow;
color: black;
- orphans: 1;
- widows: 1;
}
]]></style>
</head>
<body>
-
+ <p>Test passes if it is identical to the reference.</p>
<div>d da&nbsp; d da&nbsp; d da&nbsp; d da&nbsp; d da&nbsp;<br />
dam&nbsp;&nbsp; dam&nbsp;&nbsp; dam&nbsp;&nbsp; dam&nbsp;&nbsp; dam&nbsp;&nbsp;<br />
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001.xht
index 84cf1ff893c..02cbf9b4f26 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-001.xht
@@ -4,22 +4,17 @@
<title>CSS Multi-column Layout Test: column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns" title="The number and width of columns" />
<link rel="match" href="multicol-width-001-ref.xht" />
+ <meta name="assert" content="Tests that column-width is calculated correctly."/>
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
- body
+ div
{
font: 1.25em/1 Ahem;
width: 30em;
- }
-
- div
- {
background-color: yellow;
color: black;
- orphans: 1;
- widows: 1;
column-gap: 0;
column-width: 6em;
@@ -27,6 +22,7 @@
]]></style>
</head>
<body>
+ <p>Test passes if it is identical to the reference.</p>
<div>
d da dam dame damer
d da dam dame damer
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002-ref.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002-ref.xht
index 59d54cadccd..68e10339a1c 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002-ref.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002-ref.xht
@@ -20,6 +20,7 @@
]]></style>
</head>
<body>
+ <p>Test passes if there are two black bars and two blue bars with a yellow stripe to the right of each bar, matching reference.</p>
<table>
<tr>
<td><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /></td>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002.xht
index f838020e427..78a14959058 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-002.xht
@@ -4,8 +4,9 @@
<title>CSS Multi-column Layout Test: column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns" title="The number and width of columns" />
<link rel="match" href="multicol-width-002-ref.xht" />
+ <meta name="assert" content="Tests that column-width is calculated correctly."/>
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
div
@@ -14,8 +15,6 @@
border: gray solid 1em;
color: black;
font: 1.25em/1 Ahem;
- orphans: 1;
- widows: 1;
width: 12em;
column-gap: 0;
@@ -26,6 +25,7 @@
]]></style>
</head>
<body>
+ <p>Test passes if there are two black bars and two blue bars with a yellow stripe to the right of each bar, matching reference.</p>
<div>
bl ac bl ac
<span>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-003.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-003.xht
index a05a32d8bbb..0e91866163b 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-003.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-003.xht
@@ -4,9 +4,10 @@
<title>CSS Multi-column Layout Test: column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-multi-column-model" title="The Multi-column Model" />
<link rel="match" href="multicol-width-002-ref.xht" />
<meta name="flags" content="ahem" />
+ <meta name="assert" content="Test to check that the multicol container and not the column box becomes the containing box"/>
<style type="text/css"><![CDATA[
div#multi-column
{
@@ -15,11 +16,8 @@
color: black;
font: 1.25em/1 Ahem;
height: 2em;
- orphans: 1;
position: relative;
- widows: 1;
width: 12em;
-
column-width: 6em;
column-gap: 0;
}
@@ -33,23 +31,23 @@
width: 2em;
}
- div#s2 {left: 3em;}
+ div#s2 {right: 7em;}
div#s3
{
background-color: blue;
- left: 6em;
+ right: 4em;
}
div#s4
{
background-color: blue;
- left: 9em;
+ right: 1em;
}
]]></style>
</head>
<body>
-
+ <p>Test passes if there are two black bars and two blue bars with a yellow stripe to the right of each bar, matching reference.</p>
<div id="multi-column">
<div></div>
<div id="s2"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-001.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-001.xht
index c3e3b353028..8983e00fff0 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-001.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-001.xht
@@ -2,25 +2,25 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<title>multicolumn | column-width</title>
+<title>CSS Multi-column Layout Test: column-width (ch units)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/"/>
-<link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns"/>
+<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns"/>
<link rel="match" href="multicol-width-ch-ref.xht"/>
<meta name="flags" content=""/>
+<meta name="assert" value="Test that the ch unit can be used as a value for column-width."/>
<style type="text/css"><![CDATA[
.multicol {
font: 1em monospace;
width: 69ch;
column-width: 13ch;
column-gap: 1ch;
- orphans: 1;
- widows: 1;
background: yellow;
}
]]></style>
</head>
<body>
+ <p>Test passes if we have five columns with four lines in each. The final column should contain the words: million, billion, trillion.</p>
<div class="multicol">
one two three four
five six seven eight
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-ref.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-ref.xht
index 133ad3e4b24..8adefc11e76 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-ref.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-ch-ref.xht
@@ -23,6 +23,7 @@
</head>
<body>
+ <p>Test passes if we have five columns with four lines in each. The final column should contain the words: million, billion, trillion.</p>
<div class="multicol-ref">
<span>
one two three four
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-001.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-001.xht
index eeec2dc3e66..3fde0610ac6 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-001.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-001.xht
@@ -4,30 +4,25 @@
<title>CSS Multi-column Layout Test: column-count and column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns" title="3. The number and width of columns" />
<link rel="match" href="multicol-width-001-ref.xht" />
+ <meta name="asset" content="Test that column-count and column-width are valid in combination"/>
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
- body
+ div
{
font: 1.25em/1 Ahem;
width: 30em;
- }
-
- div
- {
background-color: yellow;
color: black;
- orphans: 1;
- widows: 1;
-
column-count: 5;
column-gap: 0;
- column-width: 6em;
+ column-width: 5em;
}
]]></style>
</head>
<body>
+ <p>Test passes if it is identical to the reference.</p>
<div>
d da dam dame damer
d da dam dame damer
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-002.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-002.xht
index 9b9bffc8484..6de99956e3b 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-002.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-count-002.xht
@@ -4,8 +4,9 @@
<title>CSS Multi-column Layout Test: column-count and column-width (basic)</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cc" title="3.2 'column-count'" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cc" title="3.2 'column-count'" />
<link rel="match" href="multicol-count-002-ref.xht" />
+ <meta name="asset" content="Test that column-count acts as a max when combined with column-width."/>
<meta name="flags" content="ahem" />
<style type="text/css"><![CDATA[
html {background-color: white;}
@@ -22,10 +23,9 @@
{
background-color: yellow;
color: black;
-
column-count: 4;
column-gap: 0;
- column-width: 5em;
+ column-width: 4em; /* would create 5 columns if column-count was not acting as a max */
}
]]></style>
</head>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001-ref.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001-ref.xht
index a583e30f3d7..8664fc38253 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001-ref.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001-ref.xht
@@ -20,6 +20,7 @@
]]></style>
</head>
<body>
+ <p>This test passes is it is idential to the reference.</p>
<table>
<tr>
<td><img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /></td>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001.xht
index 76c9a57774c..83128b1f33b 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-invalid-001.xht
@@ -4,7 +4,7 @@
<title>CSS Multi-column Layout Test: invalid column-width</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cw" title="3.1. 'column-width'" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />
<link rel="match" href="multicol-width-invalid-001-ref.xht" />
<meta name="flags" content="ahem invalid" />
<meta name="assert" content="This test checks that 'column-width: bzzt' is invalid (generating a parsing error) and therefore will be ignored." />
@@ -15,18 +15,17 @@
border: gray solid 1em;
color: black;
font: 1.25em/1 Ahem;
- orphans: 1;
- widows: 1;
width: 12em;
column-gap: 0;
- column-width: bzzt;
+ column-width: bzzt; /* this value is invalid */
}
span {color: blue;}
]]></style>
</head>
<body>
+ <p>This test passes is it is idential to the reference.</p>
<div>
bl ac
<span>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-001.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-001.xht
index cb943a7fad3..04530e93d7c 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-001.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-001.xht
@@ -4,7 +4,7 @@
<title>CSS Multi-column Layout Test: large column-width</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-23 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cw" title="3.1. 'column-width'" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />
<link rel="match" href="multicol-width-invalid-001-ref.xht" />
<meta name="flags" content="ahem" />
<meta name="assert" content="This test checks that a set 'column-width' may be wider (to fill the available space). In this test, the actual column-width will be increased to 12em." />
@@ -15,8 +15,6 @@
border: gray solid 1em;
color: black;
font: 1.25em/1 Ahem;
- orphans: 1;
- widows: 1;
width: 12em;
column-gap: 0;
@@ -27,6 +25,7 @@
]]></style>
</head>
<body>
+ <p>This test passes is it is idential to the reference.</p>
<div>
bl ac
<span>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-002.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-002.xht
index 60528159db7..2efa3941d8f 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-002.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-large-002.xht
@@ -4,7 +4,7 @@
<title>CSS Multi-column Layout Test: large column-width</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-24 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cw" title="3.1. 'column-width'" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />
<link rel="match" href="multicol-width-invalid-001-ref.xht" />
<meta name="flags" content="ahem" />
<meta name="assert" content="This test checks that a set 'column-width' equal in width to the whole available space of the multi-column will use it all for its column box." />
@@ -15,8 +15,6 @@
border: gray solid 1em;
color: black;
font: 1.25em/1 Ahem;
- orphans: 1;
- widows: 1;
width: 12em;
column-gap: 0;
@@ -27,6 +25,7 @@
]]></style>
</head>
<body>
+ <p>This test passes is it is idential to the reference.</p>
<div>
bl ac
<span>
@@ -38,4 +37,4 @@
bl ac
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-negative-001.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-negative-001.xht
index 5370b8033bc..dd7d515499d 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-negative-001.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-negative-001.xht
@@ -4,7 +4,7 @@
<title>CSS Multi-column Layout Test: negative column-width</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-24 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cw" title="3.1. 'column-width'" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />
<link rel="match" href="multicol-count-002-ref.xht" />
<meta name="flags" content="ahem invalid" />
<meta name="assert" content="This test checks that a set 'column-width' can not be negative." />
@@ -15,8 +15,6 @@
border: black solid 1em;
color: yellow;
font: 1.25em/1 Ahem;
- orphans: 1;
- widows: 1;
width: 19em;
column-width: -100px;
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001-ref.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001-ref.xht
index eb427d1da4a..a862607a6ba 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001-ref.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001-ref.xht
@@ -20,6 +20,7 @@
]]></style>
</head>
<body>
+ <p>This test passes is it is idential to the reference.</p>
<table>
<tr>
<td><img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /></td>
diff --git a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001.xht b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001.xht
index c034815060b..8ef3bfa6ac0 100644
--- a/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001.xht
+++ b/tests/wpt/web-platform-tests/css/css-multicol/multicol-width-small-001.xht
@@ -4,7 +4,7 @@
<title>CSS Multi-column Layout Test: narrow column-width</title>
<link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-24 -->
- <link rel="help" href="http://www.w3.org/TR/css3-multicol/#overflow-inside-multicol-elements" title="8.1. Overflow inside multicol elements" />
+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#overflow-inside-multicol-elements" title="8.1. Overflow inside multicol elements" />
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#cw" title="3.1. 'column-width'" />
<link rel="match" href="multicol-width-small-001-ref.xht" />
<meta name="flags" content="ahem" />
@@ -29,6 +29,7 @@
]]></style>
</head>
<body>
+ <p>This test passes is it is idential to the reference.</p>
<div>
<div>
Bl ac
diff --git a/tests/wpt/web-platform-tests/css/css-paint-api/registered-properties-in-custom-paint.https.html b/tests/wpt/web-platform-tests/css/css-paint-api/registered-properties-in-custom-paint.https.html
deleted file mode 100644
index d9a63da144d..00000000000
--- a/tests/wpt/web-platform-tests/css/css-paint-api/registered-properties-in-custom-paint.https.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<html class="reftest-wait">
-<link rel="match" href="parse-input-arguments-ref.html">
-<style>
-.container {
- width: 100px;
- height: 100px;
- --length: 10px;
- --number: 10;
-}
-
-#canvas-geometry {
- background-image: paint(geometry);
-}
-</style>
-<script src="/common/reftest-wait.js"></script>
-<script src="/common/worklet-reftest.js"></script>
-<body>
-<div id="canvas-geometry" class="container"></div>
-
-<script id="code" type="text/worklet">
-registerPaint('geometry', class {
- static get inputProperties() {
- return [
- '--length',
- '--length-initial',
- '--number',
- ];
- }
- paint(ctx, geom, styleMap) {
- const properties = [...styleMap.keys()].sort();
- var serializedStrings = [];
- for (let i = 0; i < properties.length; i++) {
- const value = styleMap.get(properties[i]);
- let serialized;
- if (value)
- serialized = properties[i].toString() + ': [' + value.constructor.name + '=' + value.toString() + ']';
- else
- serialized = properties[i].toString() + ': [null]';
- serializedStrings.push(serialized);
- }
- ctx.strokeStyle = 'green';
- if (serializedStrings[0] != "--length: [CSSUnitValue=10px]")
- ctx.strokeStyle = 'red';
- if (serializedStrings[1] != "--length-initial: [CSSUnitValue=20px]")
- ctx.strokeStyle = 'blue';
- if (serializedStrings[2] != "--number: [CSSUnitValue=10]")
- ctx.strokeStyle = 'yellow';
- ctx.lineWidth = 4;
- ctx.strokeRect(0, 0, geom.width, geom.height);
- }
-});
-</script>
-
-<script>
- try {
- CSS.registerProperty({name: '--length', syntax: '<length>', initialValue: '0px', inherits: false});
- CSS.registerProperty({name: '--length-initial', syntax: '<length>', initialValue: '20px', inherits: false});
- CSS.registerProperty({name: '--number', syntax: '<number>', initialValue: '0', inherits: false});
- importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, document.getElementById('code').textContent);
- } catch(e) {
- document.body.textContent = e;
- takeScreenshot();
- }
-</script>
-</body>
-</html>
diff --git a/tests/wpt/web-platform-tests/css/css-paint-api/registered-property-type.https.html b/tests/wpt/web-platform-tests/css/css-paint-api/registered-property-type.https.html
new file mode 100644
index 00000000000..6ff7ce4e0af
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-paint-api/registered-property-type.https.html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<link rel="help" href="https://www.w3.org/TR/css-paint-api-1/#examples">
+<link rel="match" href="parse-input-arguments-ref.html">
+<style>
+.container {
+ width: 100px;
+ height: 100px;
+}
+
+#canvas-geometry {
+ background-image: paint(geometry);
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+<body>
+<div id="canvas-geometry" class="container"></div>
+<script id="code" type="text/worklet">
+ // Globals that must be prepended to this script:
+ // - debugLog: A function that logs errors.
+ // - props: Test data.
+
+ registerPaint('geometry', class {
+ static get inputProperties() { return props.map(p => p.name); }
+
+ paint(ctx, geom, styleMap) {
+ ctx.strokeStyle = 'green';
+ for (let prop of props) {
+ let first = styleMap.get(prop.name);
+ let all = styleMap.getAll(prop.name);
+ let serialize = v => v.constructor.name + '=' + v.toString()
+ let actual = all.map(serialize).join(',');
+ let expected = prop.expected.join(',');
+ let pass = actual === expected
+ && serialize(first) === prop.expected[0];
+ if (!pass)
+ ctx.strokeStyle = 'red';
+ debugLog(pass ? 'PASS' : 'FAIL', prop.syntax, actual, expected);
+ }
+ ctx.lineWidth = 4;
+ ctx.strokeRect(0, 0, geom.width, geom.height);
+ }
+ });
+</script>
+<script>
+ // A copy of this array (automatically enriched with 'name' and 'expected')
+ // is also available in the worklet.
+ let props = [
+ // Initial values.
+ { syntax: '*', initialValue: 'if(){}' },
+ { syntax: '<angle>', initialValue: '42deg' },
+ { syntax: '<color>', initialValue: '#fefefe' },
+ { syntax: '<custom-ident>', initialValue: 'none' },
+ { syntax: '<image>', initialValue: 'linear-gradient(red, red)' },
+ { syntax: '<image>', initialValue: 'url(http://a.com/a)' },
+ { syntax: '<integer>', initialValue: '42' },
+ { syntax: '<length-percentage>', initialValue: '10%' },
+ { syntax: '<length-percentage>', initialValue: '10px' },
+ { syntax: '<length-percentage>', initialValue: 'calc(10px + 10%)' },
+ { syntax: '<length>', initialValue: '1337px' },
+ { syntax: '<number>', initialValue: '42.5' },
+ { syntax: '<percentage>', initialValue: '42%' },
+ { syntax: '<resolution>', initialValue: '300dpi' },
+ { syntax: '<time>', initialValue: '3600s' },
+ { syntax: '<url>', initialValue: 'url(http://a.com/a)' },
+ { syntax: 'thing', initialValue: 'thing' },
+ { syntax: '<length> | <angle>', initialValue: '1337px' },
+ { syntax: '<angle> | <image>', initialValue: '1turn' },
+ { syntax: '<length>+', initialValue: '1337px' },
+ { syntax: '<length>+', initialValue: '1337px 1338px', count: 2 },
+ { syntax: '<length>#', initialValue: '1337px' },
+ { syntax: '<length>#', initialValue: '1337px, 1338px', count: 2 },
+
+ // Non-initial values:
+ { syntax: '*', initialValue: 'fail', value: 'if(){}' },
+ { syntax: '<angle> | fail', initialValue: 'fail', value: '42deg' },
+ { syntax: '<color> | fail', initialValue: 'fail', value: '#fefefe' },
+ { syntax: '<custom-ident> | fail', initialValue: 'fail', value: 'none' },
+ { syntax: '<image> | fail', initialValue: 'fail', value: 'linear-gradient(red, red)' },
+ { syntax: '<image> | fail', initialValue: 'fail', value: 'url(http://a.com/a)' },
+ { syntax: '<integer> | fail', initialValue: 'fail', value: '42' },
+ { syntax: '<length-percentage> | fail', initialValue: 'fail', value: '10%' },
+ { syntax: '<length-percentage> | fail', initialValue: 'fail', value: '10px' },
+ { syntax: '<length-percentage> | fail', initialValue: 'fail', value: 'calc(10px + 10%)' },
+ { syntax: '<length> | fail', initialValue: 'fail', value: '1337px' },
+ { syntax: '<number> | fail', initialValue: 'fail', value: '42.5' },
+ { syntax: '<percentage> | fail', initialValue: 'fail', value: '42%' },
+ { syntax: '<resolution> | fail', initialValue: 'fail', value: '300dpi' },
+ { syntax: '<time> | fail', initialValue: 'fail', value: '3600s' },
+ { syntax: '<url> | fail', initialValue: 'fail', value: 'url(http://a.com/a)' },
+ { syntax: 'thing | fail', initialValue: 'fail', value: 'thing' },
+ { syntax: '<length>+ | fail', initialValue: 'fail', value: '1337px' },
+ { syntax: '<length>+ | fail', initialValue: 'fail', value: '1337px 1338px', count: 2 },
+ { syntax: '<length># | fail', initialValue: 'fail', value: '1337px' },
+ { syntax: '<length># | fail', initialValue: 'fail', value: '1337px, 1338px', count: 2 },
+ ];
+
+ try {
+ let target = document.getElementById('canvas-geometry');
+ let pid = 1;
+
+ for (let p of props) {
+ p.name = `--prop-${++pid}`;
+
+ CSS.registerProperty({
+ name: p.name,
+ syntax: p.syntax,
+ initialValue: p.initialValue,
+ inherits: (typeof p.inherits !== 'undefined') ? p.inherits : false
+ });
+
+ if (typeof p.value !== 'undefined')
+ target.style.setProperty(p.name, p.value);
+ if (typeof p.count === 'undefined')
+ p.count = 1;
+
+ let getValue = p => (typeof p.value !== 'undefined') ? p.value : p.initialValue;
+ let serialize = v => v.constructor.name + '=' + v.toString();
+
+ let parse = function (p) {
+ if (p.count == 1)
+ return [CSSStyleValue.parse(p.name, getValue(p))];
+ return CSSStyleValue.parseAll(p.name, getValue(p));
+ };
+
+ // Generate expected value. We assume that CSSStyleValue.parse/All
+ // returns the correct CSSStyleValue subclass and value.
+ p.expected = parse(p).map(serialize);
+ }
+
+ // Adding '?debug' to the URL will cause this test to emit
+ // test results to console.log.
+ let debugMode = document.location.href.endsWith('?debug');
+ let code = [
+ `const props = ${JSON.stringify(props)};`,
+ `const debugLog = ${debugMode ? 'console.log' : 'function(){}'};`,
+ document.getElementById('code').textContent
+ ].join('\n');
+
+ importWorkletAndTerminateTestAfterAsyncPaint(CSS.paintWorklet, code);
+ } catch(e) {
+ document.body.textContent = e;
+ takeScreenshot();
+ }
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-position/position-sticky-overflow-hidden.html b/tests/wpt/web-platform-tests/css/css-position/position-sticky-overflow-hidden.html
new file mode 100644
index 00000000000..b1dc49f34fe
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-position/position-sticky-overflow-hidden.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<title>position:sticky elements should respect an overflow:hidden ancestor</title>
+<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
+<meta name="assert" content="This test checks that position:sticky elements adhere to an overflow:hidden ancestor" />
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script src="resources/sticky-util.js"></script>
+
+<body></body>
+
+<script>
+test(() => {
+ const outer_scroller = document.createElement('div');
+ outer_scroller.style.width = '100px';
+ outer_scroller.style.height = '100px';
+ outer_scroller.style.overflow = 'scroll';
+
+ const inner_scroller = document.createElement('div');
+ inner_scroller.style.width = '80%';
+ inner_scroller.style.height = '200px';
+ inner_scroller.style.overflow = 'hidden';
+
+ const sticky = document.createElement('div');
+ sticky.style.width = '20px';
+ sticky.style.height = '20px';
+ sticky.style.position = 'sticky';
+ sticky.style.top = '0';
+ sticky.style.background = 'red';
+
+ const spacer = document.createElement('div');
+ spacer.style.height = '500px';
+
+ inner_scroller.appendChild(sticky);
+ inner_scroller.appendChild(spacer);
+ outer_scroller.appendChild(inner_scroller);
+ document.body.appendChild(outer_scroller);
+
+ outer_scroller.scrollTop = 50;
+
+ // The sticky should attach to the inner scroller, and so should not stick.
+ assert_equals(sticky.offsetTop, inner_scroller.offsetTop);
+}, 'A sticky element should attach to an overflow:hidden ancestor');
+
+// This tests a specific bug in Firefox where the sticky element incorrectly
+// started sticking when inside a table. See https://bugzilla.mozilla.org/show_bug.cgi?id=1488810
+test(() => {
+ const outer_scroller = document.createElement('div');
+ outer_scroller.style.width = '100px';
+ outer_scroller.style.height = '100px';
+ outer_scroller.style.overflow = 'scroll';
+
+ const table = document.createElement('div');
+ table.style.display = 'table';
+
+ const tr = document.createElement('div');
+ tr.style.display = 'table-row';
+
+ const inner_scroller = document.createElement('div');
+ inner_scroller.style.display = 'table-cell';
+ inner_scroller.style.overflow = 'hidden';
+
+ const sticky = document.createElement('div');
+ sticky.style.width = '20px';
+ sticky.style.height = '20px';
+ sticky.style.position = 'sticky';
+ sticky.style.top = '0';
+ sticky.style.background = 'red';
+
+ const spacer = document.createElement('div');
+ spacer.style.height = '500px';
+
+ inner_scroller.appendChild(sticky);
+ inner_scroller.appendChild(spacer);
+ tr.append(inner_scroller);
+ table.appendChild(tr);
+ outer_scroller.appendChild(table);
+ document.body.appendChild(outer_scroller);
+
+ outer_scroller.scrollTop = 50;
+
+ // The sticky should attach to the inner scroller, and so should not stick.
+ assert_equals(sticky.offsetTop, inner_scroller.offsetTop);
+}, 'A sticky element should attach to an overflow:hidden ancestor inside a table');
+</script>
diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/property-cascade.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/property-cascade.html
index 97c1975cf13..5f0b7eb50c2 100644
--- a/tests/wpt/web-platform-tests/css/css-properties-values-api/property-cascade.html
+++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/property-cascade.html
@@ -1,5 +1,4 @@
<!DOCTYPE html>
-<link rel="author" title="Anders Hartvoll Ruud" href="andruud@chromium.org">
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1/#the-registerproperty-function" />
<meta name="assert" content="Verifies that registering a propety does not affect the cascade" />
<script src="/resources/testharness.js"></script>
diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html
index 69ebf7a13d8..98150558dae 100644
--- a/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html
+++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html
@@ -1,5 +1,4 @@
<!DOCTYPE html>
-<link rel="author" title="Anders Hartvoll Ruud" href="andruud@chromium.org">
<!-- TODO(andruud): Add Typed OM details to spec and link to it here. -->
<link rel="help" href="https://github.com/w3c/css-houdini-drafts/pull/783" />
<meta name="assert" content="Verifies that registered custom properties interact correctly with CSS Typed OM" />
@@ -58,11 +57,11 @@ function assert_computed_type(name, value, expected) {
}
}
-function assert_attribute_get_type(syntax, value, expected) {
+function assert_attribute_get_type(styleDecl, propertyMap, syntax, value, expected) {
let name = gen_name();
- target.style = `${name}: ${value}`;
+ styleDecl.setProperty(name, value);
- assert_true(target.attributeStyleMap.get(name) instanceof CSSUnparsedValue);
+ assert_true(propertyMap.get(name) instanceof CSSUnparsedValue);
CSS.registerProperty({
name: name,
@@ -72,10 +71,10 @@ function assert_attribute_get_type(syntax, value, expected) {
});
if (expected == CSSStyleValue) {
- assert_false(target.attributeStyleMap.get(name) instanceof CSSUnparsedValue);
+ assert_false(propertyMap.get(name) instanceof CSSUnparsedValue);
}
- assert_true(target.attributeStyleMap.get(name) instanceof expected);
+ assert_true(propertyMap.get(name) instanceof expected);
}
// computedStyleMap
@@ -194,111 +193,123 @@ test(function(){
assert_true(target.computedStyleMap().getAll(name).every(x => x instanceof CSSUnitValue));
}, 'All computed values correctly reified in comma-separated list');
-// attributeStyleMap.get
+// attributeStyleMap.get / styleMap.get
-test(function(){
+function test_style_property_map_get(test_fn, name_fn) {
+ let rule = style.sheet.rules[0];
+
+ test(function(){
+ target.attributeStyleMap.clear();
+ test_fn(target.style, target.attributeStyleMap);
+ }, name_fn('attributeStyleMap'));
+
+ test(function(){
+ rule.styleMap.clear();
+ test_fn(rule.style, rule.styleMap);
+ }, name_fn('styleMap'));
+}
+
+test_style_property_map_get(function(styleDecl, propertyMap){
let name1 = gen_prop('<length>', '100px');
let name2 = gen_prop('<length>', '0px');
- target.style = `${name2}: var(${name1})`;
- assert_true(target.attributeStyleMap.get(name2) instanceof CSSUnparsedValue);
-}, 'attributeStyleMap.get returns CSSUnparsedValue for value with var references');
+ styleDecl.setProperty(name2, `var(${name1})`);
+ assert_true(propertyMap.get(name2) instanceof CSSUnparsedValue);
+}, name => `${name}.get returns CSSUnparsedValue for value with var references`);
-test(function(){
+test_style_property_map_get(function(styleDecl, propertyMap){
let name1 = gen_prop('<length>', '100px');
let name2 = gen_prop('<length>#', '0px');
- target.style = `${name2}: 1px, var(${name1}), 3px`;
- assert_true(target.attributeStyleMap.get(name2) instanceof CSSUnparsedValue);
-}, 'attributeStyleMap.get returns CSSUnparsedValue for value with var reference in list');
+ styleDecl.setProperty(name2, `1px, var(${name1}), 3px`);
+ assert_true(propertyMap.get(name2) instanceof CSSUnparsedValue);
+}, name => `${name}.get returns CSSUnparsedValue for value with var references in list`);
-test(function(){
- assert_attribute_get_type('*', 'if(){}', CSSUnparsedValue);
-}, 'attributeStyleMap.get returns CSSUnparsedValue for *');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '*', 'if(){}', CSSUnparsedValue);
+}, name => `${name}.get returns CSSUnparsedValue for *`);
-test(function(){
- assert_attribute_get_type('<angle>', '42deg', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <angle>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<angle>', '42deg', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <angle>`);
-test(function(){
- assert_attribute_get_type('<color>', '#fefefe', CSSStyleValue);
-}, 'attributeStyleMap.get returns CSSStyleValue for <color>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<color>', '#fefefe', CSSStyleValue);
+}, name => `${name}.get returns CSSStyleValue for <color>`);
-test(function(){
- assert_attribute_get_type('<custom-ident>', 'none', CSSKeywordValue);
-}, 'attributeStyleMap.get returns CSSKeywordValue for <custom-ident>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<custom-ident>', 'none', CSSKeywordValue);
+}, name => `${name}.get returns CSSKeywordValue for <custom-ident>`);
-test(function(){
- assert_attribute_get_type('<image>', 'url(thing.png)', CSSImageValue);
-}, 'attributeStyleMap.get returns CSSImageValue for <image>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<image>', 'url(thing.png)', CSSImageValue);
+}, name => `${name}.get returns CSSImageValue for <image>`);
-test(function(){
- assert_attribute_get_type('<integer>', '100', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <integer>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<integer>', '100', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <integer>`);
-test(function(){
- assert_attribute_get_type('<length-percentage>', '10%', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <length-percentage> [10%]');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<length-percentage>', '10%', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <length-percentage> [10%]`);
-test(function(){
- assert_attribute_get_type('<length-percentage>', '10px', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <length-percentage> [10px]');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<length-percentage>', '10px', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <length-percentage> [10px]`);
-test(function(){
- assert_attribute_get_type('<length-percentage>', 'calc(10px + 10%)', CSSMathSum);
-}, 'attributeStyleMap.get returns CSSMathSum for <length-percentage> [calc(10px + 10%)]');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<length-percentage>', 'calc(10px + 10%)', CSSMathSum);
+}, name => `${name}.get returns CSSMathSum for <length-percentage> [calc(10px + 10%)]`);
-test(function(){
- assert_attribute_get_type('<length>', '10px', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <length>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<length>', '10px', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <length>`);
-test(function(){
- assert_attribute_get_type('<number>', '42', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <number>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<number>', '42', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <number>`);
-test(function(){
- assert_attribute_get_type('<percentage>', '10%', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <percentage>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<percentage>', '10%', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <percentage>`);
-test(function(){
- assert_attribute_get_type('<resolution>', '300dpi', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <resolution>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<resolution>', '300dpi', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <resolution>`);
-test(function(){
- assert_attribute_get_type('<time>', '42s', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <time>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<time>', '42s', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <time>`);
-test(function(){
- assert_attribute_get_type('<url>', 'url(a)', CSSStyleValue);
-}, 'attributeStyleMap.get returns CSSStyleValue for <url>');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<url>', 'url(a)', CSSStyleValue);
+}, name => `${name}.get returns CSSStyleValue for <url>`);
-test(function(){
- assert_attribute_get_type('thing1 | THING2', 'thing1', CSSKeywordValue);
-}, 'attributeStyleMap.get returns CSSKeywordValue for thing1 | THING2');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, 'thing1 | THING2', 'thing1', CSSKeywordValue);
+}, name => `${name}.get returns CSSKeywordValue for thing1 | THING2`);
-test(function(){
- assert_attribute_get_type('<length>+', '10px 20px', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <length>+');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<length>+', '10px 20px', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <length>+`);
-test(function(){
- assert_attribute_get_type('<length>#', '10px 20px', CSSUnitValue);
-}, 'attributeStyleMap.get returns CSSUnitValue for <length>#');
+test_style_property_map_get(function(styleDecl, propertyMap){
+ assert_attribute_get_type(styleDecl, propertyMap, '<length>#', '10px 20px', CSSUnitValue);
+}, name => `${name}.get returns CSSUnitValue for <length>#`);
// attributeStyleMap.getAll
-test(function(){
+test_style_property_map_get(function(styleDecl, propertyMap){
let name = gen_prop('<length>+', '0px');
- target.attributeStyleMap.clear();
- target.style = `${name}: 10px 20px 30px`;
- assert_equals(target.attributeStyleMap.getAll(name).length, 3);
- assert_true(target.attributeStyleMap.getAll(name).every(x => x instanceof CSSUnitValue));
-}, 'attributeStyleMap.getAll returns a list of CSSUnitValues for <length>+');
+ styleDecl.setProperty(name, '10px 20px 30px');
+ assert_equals(propertyMap.getAll(name).length, 3);
+ assert_true(propertyMap.getAll(name).every(x => x instanceof CSSUnitValue));
+}, name => `${name}.getAll returns a list of CSSUnitValues for <length>+`);
-test(function(){
+test_style_property_map_get(function(styleDecl, propertyMap){
let name = gen_prop('<length>#', '0px');
- target.attributeStyleMap.clear();
- target.style = `${name}: 10px, 20px, 30px`;
- assert_equals(target.attributeStyleMap.getAll(name).length, 3);
- assert_true(target.attributeStyleMap.getAll(name).every(x => x instanceof CSSUnitValue));
-}, 'attributeStyleMap.getAll returns a list of CSSUnitValues for <length>#');
+ styleDecl.setProperty(name, '10px, 20px, 30px');
+ assert_equals(propertyMap.getAll(name).length, 3);
+ assert_true(propertyMap.getAll(name).every(x => x instanceof CSSUnitValue));
+}, name => `${name}.getAll returns a list of CSSUnitValues for <length>#`);
// StylePropertyMap.set
@@ -341,99 +352,189 @@ test_style_property_map_set({
test_style_property_map_set({
syntax: '<angle>',
initialValue: '0deg',
- shouldAccept: [CSS.deg(42), CSS.turn(2)],
- shouldReject: [unparsed('42deg'), CSS.px(15)],
+ shouldAccept: [CSS.deg(42), CSS.turn(2), '42deg'],
+ shouldReject: [unparsed('42deg'), CSS.px(15), '50px'],
});
test_style_property_map_set({
syntax: '<custom-ident>',
initialValue: 'none',
- shouldAccept: [keyword('foo')],
- shouldReject: [unparsed('foo'), CSS.px(15)],
+ shouldAccept: [keyword('foo'), 'foo'],
+ shouldReject: [unparsed('foo'), CSS.px(15), '15px'],
});
test_style_property_map_set({
syntax: '<image>',
initialValue: 'url(a)',
- shouldAccept: [url_image('url(b)')],
- shouldReject: [unparsed('url(b)'), CSS.px(100)],
+ shouldAccept: [url_image('url(b)'), 'url(b)'],
+ shouldReject: [unparsed('url(b)'), CSS.px(100), '50px'],
});
test_style_property_map_set({
syntax: '<integer>',
initialValue: '0',
- shouldAccept: [CSS.number(1), CSS.number(-42)],
- shouldReject: [unparsed('42'), CSS.px(100)],
+ shouldAccept: [CSS.number(1), CSS.number(-42), '1', '-42'],
+ shouldReject: [unparsed('42'), CSS.px(100), '50px'],
});
test_style_property_map_set({
syntax: '<length-percentage>',
initialValue: '0px',
- shouldAccept: [CSS.percent(10), CSS.px(1), CSS.em(1)],
- shouldReject: [unparsed('10%'), unparsed('10px'), CSS.dpi(1)],
+ shouldAccept: [CSS.percent(10), CSS.px(1), CSS.em(1), '10px', '10%'],
+ shouldReject: [unparsed('10%'), unparsed('10px'), CSS.dpi(1), 'url(b)'],
});
test_style_property_map_set({
syntax: '<length>',
initialValue: '0px',
- shouldAccept: [CSS.px(10), CSS.em(10), CSS.vh(200), sum(CSS.px(10), CSS.em(20))],
- shouldReject: [unparsed('10px'), CSS.percent(1)],
+ shouldAccept: [CSS.px(10), CSS.em(10), CSS.vh(200), sum(CSS.px(10), CSS.em(20)), '10em', 'calc(10px + 10em)'],
+ shouldReject: [unparsed('10px'), CSS.percent(1), 'url(b)'],
});
test_style_property_map_set({
syntax: '<number>',
initialValue: '0',
- shouldAccept: [CSS.number(1337), CSS.number(-42.5)],
- shouldReject: [unparsed('42'), CSS.px(15)],
+ shouldAccept: [CSS.number(1337), CSS.number(-42.5), '1337', '-42.5'],
+ shouldReject: [unparsed('42'), CSS.px(15), '#fef'],
});
test_style_property_map_set({
syntax: '<percentage>',
initialValue: '0%',
- shouldAccept: [CSS.percent(10)],
- shouldReject: [unparsed('10%'), CSS.px(1)],
+ shouldAccept: [CSS.percent(10), '10%'],
+ shouldReject: [unparsed('10%'), CSS.px(1), '#fef'],
});
test_style_property_map_set({
syntax: '<resolution>',
initialValue: '0dpi',
- shouldAccept: [CSS.dpi(100), CSS.dpcm(10), CSS.dppx(50)],
- shouldReject: [unparsed('42'), CSS.px(15)],
+ shouldAccept: [CSS.dpi(100), CSS.dpcm(10), CSS.dppx(50), '100dpi'],
+ shouldReject: [unparsed('42'), CSS.px(15), '#fef'],
});
test_style_property_map_set({
syntax: '<time>',
initialValue: '0s',
- shouldAccept: [CSS.s(42), CSS.ms(16)],
- shouldReject: [unparsed('42s'), CSS.px(15)],
+ shouldAccept: [CSS.s(42), CSS.ms(16), '16ms'],
+ shouldReject: [unparsed('42s'), CSS.px(15), '#fef'],
});
test_style_property_map_set({
syntax: '<url>',
initialValue: 'url(a)',
shouldAccept: [url_image('url(b)')],
- shouldReject: [unparsed('url(b)'), CSS.px(100)],
+ shouldReject: [unparsed('url(b)'), CSS.px(100), '#fef'],
});
test_style_property_map_set({
syntax: '<transform-list>',
initialValue: 'translateX(0px)',
shouldAccept: [CSSStyleValue.parse('transform', 'translateX(10px)')],
- shouldReject: [unparsed('transformX(10px'), CSS.px(100)],
+ shouldReject: [unparsed('transformX(10px'), CSS.px(100), '#fef'],
});
test_style_property_map_set({
syntax: 'none | thing | THING',
initialValue: 'none',
- shouldAccept: [keyword('thing'), keyword('THING')],
- shouldReject: [unparsed('thing'), CSS.px(15), keyword('notathing')],
+ shouldAccept: [keyword('thing'), keyword('THING'), 'thing'],
+ shouldReject: [unparsed('thing'), CSS.px(15), keyword('notathing'), 'notathing'],
});
test_style_property_map_set({
syntax: '<angle> | <length>',
initialValue: '0deg',
- shouldAccept: [CSS.deg(42), CSS.turn(2), CSS.px(10), CSS.em(10)],
- shouldReject: [unparsed('42deg'), unparsed('20px'), CSS.s(1)],
+ shouldAccept: [CSS.deg(42), CSS.turn(2), CSS.px(10), CSS.em(10), '10deg', '10px'],
+ shouldReject: [unparsed('42deg'), unparsed('20px'), CSS.s(1), '#fef'],
});
+// CSSStyleValue.parse/parseAll
+
+function assert_parsed_type(prop, value, expected) {
+ let parse_value = CSSStyleValue.parse(prop, value);
+ let parse_all_value = CSSStyleValue.parseAll(prop, value);
+
+ assert_true(parse_value instanceof expected);
+ assert_true(parse_all_value.every(x => x instanceof expected))
+
+ // If CSSStyleValue is expected, the values must be exactly CSSStyleValue.
+ // This is because CSSUnparsedValues are also CSSStyleValues, which would be
+ // wrong in this case.
+ if (expected == CSSStyleValue) {
+ assert_equals(parse_value.constructor, CSSStyleValue);
+ assert_true(parse_all_value.every(x => x.constructor == CSSStyleValue));
+ }
+}
+
+test(function(){
+ assert_parsed_type(gen_prop('*', 'if(){}'), 'while(){}', CSSUnparsedValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnparsedValue for *');
+
+test(function(){
+ assert_parsed_type(gen_prop('<angle> | fail', 'fail'), '42deg', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnitValue for <angle>');
+
+test(function(){
+ assert_parsed_type(gen_prop('<color> | fail', 'fail'), '#fefefe', CSSStyleValue);
+}, 'CSSStyleValue.parse[All] returns CSSStyleValue for <color>');
+
+test(function(){
+ assert_parsed_type(gen_prop('<custom-ident> | <length>', '10px'), 'none', CSSKeywordValue);
+}, 'CSSStyleValue.parse[All] returns CSSKeywordValue for <custom-ident>');
+
+test(function(){
+ assert_parsed_type(gen_prop('<image> | fail', 'fail'), 'url(thing.png)', CSSImageValue);
+}, 'CSSStyleValue.parse[All] returns CSSImageValue for <image> [url]');
+
+test(function(){
+ assert_parsed_type(gen_prop('<integer> | fail', 'fail'), '100', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnitValue for <integer>');
+
+test(function(){
+ assert_parsed_type(gen_prop('<length-percentage> | fail', 'fail'), '10%', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnitValue for <length-percentage> [%]');
+
+test(function(){
+ assert_parsed_type(gen_prop('<length-percentage> | fail', 'fail'), '10px', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnitValue for <length-percentage> [px]');
+
+test(function(){
+ assert_parsed_type(gen_prop('<length-percentage> | fail', 'fail'), 'calc(10px + 10%)', CSSMathSum);
+}, 'CSSStyleValue.parse[All] returns CSSMathSum for <length-percentage> [px + %]');
+
+test(function(){
+ assert_parsed_type(gen_prop('<length> | fail', 'fail'), '10px', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnitValue for <length>');
+
+test(function(){
+ assert_parsed_type(gen_prop('<number> | fail', 'fail'), '42', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnitValue for <number>');
+
+test(function(){
+ assert_parsed_type(gen_prop('<percentage> | fail', 'fail'), '10%', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnitValue for <percentage>');
+
+test(function(){
+ assert_parsed_type(gen_prop('<resolution> | fail', 'fail'), '300dpi', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnitValue for <resolution>');
+
+test(function(){
+ assert_parsed_type(gen_prop('<time> | fail', 'fail'), '42s', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns CSSUnitValue for <time>');
+
+test(function(){
+ assert_parsed_type(gen_prop('<url> | fail', 'fail'), 'url(a)', CSSStyleValue);
+}, 'CSSStyleValue.parse[All] returns CSSStyleValue for <url>');
+
+test(function(){
+ assert_parsed_type(gen_prop('thing1 | THING2 | <url>', 'url(fail)'), 'THING2', CSSKeywordValue);
+}, 'CSSStyleValue.parse[All] returns CSSKeywordValue for ident');
+
+test(function(){
+ assert_parsed_type(gen_prop('<length>+ | fail', 'fail'), '10px 20px', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns list of CSSUnitValues for <length>+');
+
+test(function(){
+ assert_parsed_type(gen_prop('<length># | fail', 'fail'), '10px, 20px', CSSUnitValue);
+}, 'CSSStyleValue.parse[All] returns list of CSSUnitValues for <length>#');
+
</script>
diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/unit-cycles.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/unit-cycles.html
index c242640f2b9..b5c996a4429 100644
--- a/tests/wpt/web-platform-tests/css/css-properties-values-api/unit-cycles.html
+++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/unit-cycles.html
@@ -1,5 +1,4 @@
<!DOCTYPE html>
-<link rel="author" title="Anders Hartvoll Ruud" href="andruud@chromium.org">
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1/#dependency-cycles-via-relative-units" />
<meta name="assert" content="This test verifies that reference cycles via units are detected" />
<script src="/resources/testharness.js"></script>
diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/url-resolution.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/url-resolution.html
index 6e7c008a58c..d9327896496 100644
--- a/tests/wpt/web-platform-tests/css/css-properties-values-api/url-resolution.html
+++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/url-resolution.html
@@ -1,5 +1,4 @@
<!DOCTYPE html>
-<link rel="author" title="Anders Hartvoll Ruud" href="andruud@chromium.org">
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1/#relative-urls" />
<meta name="assert" content="This test verifies that relative URLs in registered properties resolve correctly" />
<script src="/resources/testharness.js"></script>
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scrollTo-scrollBy-snaps.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scrollTo-scrollBy-snaps.html
index 58807a6836f..3e022f0a121 100644
--- a/tests/wpt/web-platform-tests/css/css-scroll-snap/scrollTo-scrollBy-snaps.html
+++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scrollTo-scrollBy-snaps.html
@@ -73,8 +73,8 @@ var divScroller = document.getElementById("inner-scroller");
var viewport = document.scrollingElement;
[
[{left: 800}, 1000, 0],
- [{top: 1200}, 0, 1000],
- [{left: 1200, top: 800}, 1000, 1000]
+ [{top: 900}, 0, 1000],
+ [{left: 900, top: 800}, 1000, 1000]
].forEach(([input, expectedX, expectedY]) => {
test(() => {
divScroller.scrollTo(0, 0);
diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/textarea-scrollbar-width-none-ref.html b/tests/wpt/web-platform-tests/css/css-scrollbars/textarea-scrollbar-width-none-ref.html
new file mode 100644
index 00000000000..9f505dd7f1d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-scrollbars/textarea-scrollbar-width-none-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>CSS Reference</title>
+<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<style>
+ textarea {
+ overflow: hidden;
+ white-space: pre;
+ }
+</style>
+<textarea cols="10" rows="10"></textarea>
+<script>
+ let textarea = document.querySelector("textarea");
+ textarea.value = ('X'.repeat(100) + '\n').repeat(100);
+</script>
diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/textarea-scrollbar-width-none.html b/tests/wpt/web-platform-tests/css/css-scrollbars/textarea-scrollbar-width-none.html
new file mode 100644
index 00000000000..dcfaf5b6270
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-scrollbars/textarea-scrollbar-width-none.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>CSS Test: scrollbar-width should apply on &lt;textarea&gt;</title>
+<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width">
+<link rel="match" href="textarea-scrollbar-width-none-ref.html">
+<style>
+ textarea {
+ scrollbar-width: none;
+ white-space: pre;
+ }
+</style>
+<textarea cols="10" rows="10"></textarea>
+<script>
+ let textarea = document.querySelector("textarea");
+ textarea.value = ('X'.repeat(100) + '\n').repeat(100);
+</script>
diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-invalid.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-invalid.html
index eb60a2e4428..6299e2ecaad 100644
--- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="shape-image-threshold supports only the grammar '<number>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-valid.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-valid.html
index 4fe1efceb03..914abd02210 100644
--- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-image-threshold-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="shape-image-threshold supports the full grammar '<number>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-invalid.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-invalid.html
index cdaea050395..2255982ef97 100644
--- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="shape-margin supports only the grammar '<length> | <percentage>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-valid.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-valid.html
index 28f094b6abb..e4a3a891087 100644
--- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-margin-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="shape-margin supports the full grammar '<length> | <percentage>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid-position.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid-position.html
index 3bca706b153..e61c7071f91 100644
--- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid-position.html
+++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid-position.html
@@ -8,7 +8,7 @@
<meta name="assert" content="shape-outside positions support only the '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid.html
index 57ce32e7fe6..484bafe4b5f 100644
--- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="shape-outside supports only the grammar 'none | [ <basic-shape> || <shape-box> ] | <image>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid-position.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid-position.html
index ec0a16d568d..cd13c25ba38 100644
--- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid-position.html
+++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid-position.html
@@ -8,7 +8,7 @@
<meta name="assert" content="shape-outside positions support the full '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid.html
index 1a70d10f831..d52eb9ada0a 100644
--- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="shape-outside supports the full grammar 'none | [ <basic-shape> || <shape-box> ] | <image>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-shapes/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-invalid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-invalid.html
index 24976fc2609..2ed6721e091 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="perspective-origin supports only the '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-valid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-valid.html
index d8ac4ccb50a..79f4e0df12e 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/perspective-origin-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="perspective-origin supports the full '<position>' grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-invalid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-invalid.html
index a3f625f6ab6..9eef999716d 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="rotate supports only the grammar 'none | <number>{3}? <angle>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid.html
index 33e44e3361d..c82f6be8c5d 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="rotate supports the full grammar 'none | <number>{3}? <angle>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-invalid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-invalid.html
index ddc2cade2bc..1072d1d6b1e 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="scale supports only the grammar 'none | <number>{1,3}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html
index 2b99d249aaf..89f79e2e85d 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="scale supports the full grammar 'none | <number>{1,3}'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-transforms/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-invalid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-invalid.html
index 415dc072014..781601cd26a 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="transform-box supports only the grammar 'content-box | border-box | fill-box | stroke-box | view-box'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-valid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-valid.html
index c2e7a5bc904..0754a5c9aee 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-box-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="transform-box supports the full grammar 'content-box | border-box | fill-box | stroke-box | view-box'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-invalid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-invalid.html
index bff9d7b723a..7fb8367ecb2 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="transform supports only the grammar 'none | <transform-list>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-invalid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-invalid.html
index 0a8ef52f0ec..19a7c963a70 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="transform-origin supports only the grammar from spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-valid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-valid.html
index c9f1d73c29e..f76a0b407e1 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-origin-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="transform-origin supports the full grammar from spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-valid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-valid.html
index 62ad8e920f3..fbde8eaf2d2 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/transform-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="transform supports the full grammar 'none | <transform-list>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid.html
index 8aa6de5e281..9064586bdaa 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="translate supports only the grammar 'none | <length-percentage> [ <length-percentage> <length>? ]?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html b/tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html
index 86b4deb489b..fe16d545e1f 100644
--- a/tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-transforms/parsing/translate-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="translate supports the full grammar 'none | <length-percentage> [ <length-percentage> <length>? ]?'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-delay-invalid.html b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-delay-invalid.html
new file mode 100644
index 00000000000..b34d50551ce
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-delay-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Transitions: parsing transition-delay with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-delay">
+<meta name="assert" content="transition-delay supports only the grammar '<time> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("transition-delay", 'infinite');
+test_invalid_value("transition-delay", '0');
+test_invalid_value("transition-delay", '500ms 0.5s');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-delay-valid.html b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-delay-valid.html
new file mode 100644
index 00000000000..d6b42b9c059
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-delay-valid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Transitions: parsing transition-delay with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-delay">
+<meta name="assert" content="transition-delay supports the full grammar '<time> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("transition-delay", '0s');
+test_valid_value("transition-delay", '500ms');
+test_valid_value("transition-delay", '1s, 2s');
+test_valid_value("transition-delay", '-1s, -2s');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-duration-invalid.html b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-duration-invalid.html
new file mode 100644
index 00000000000..fd0f341f407
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-duration-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Transitions: parsing transition-duration with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-duration">
+<meta name="assert" content="transition-duration supports only the grammar '<time> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("transition-duration", 'infinite');
+test_invalid_value("transition-duration", '-500ms');
+test_invalid_value("transition-duration", '1s 2s');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-duration-valid.html b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-duration-valid.html
new file mode 100644
index 00000000000..311ca086695
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-duration-valid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Transitions: parsing transition-duration with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-duration">
+<meta name="assert" content="transition-duration supports the full grammar '<time> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("transition-duration", '0s');
+test_valid_value("transition-duration", '500ms');
+test_valid_value("transition-duration", '1s, 2s');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-property-invalid.html b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-property-invalid.html
new file mode 100644
index 00000000000..903a206eac1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-property-invalid.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Transitions: parsing transition-property with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-property">
+<meta name="assert" content="transition-property supports only the grammar 'none | <single-transition-property> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("transition-property", 'one two three');
+test_invalid_value("transition-property", '1, 2, 3');
+test_invalid_value("transition-property", 'none, one');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-property-valid.html b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-property-valid.html
new file mode 100644
index 00000000000..4e3894f5aa9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-property-valid.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Transitions: parsing transition-property with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-property">
+<meta name="assert" content="transition-property supports the full grammar 'none | <single-transition-property> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("transition-property", 'none');
+test_valid_value("transition-property", 'all');
+test_valid_value("transition-property", 'one');
+test_valid_value("transition-property", 'one-two-three');
+test_valid_value("transition-property", 'one, two, three');
+test_valid_value("transition-property", 'width, all');
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-timing-function-invalid.html b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-timing-function-invalid.html
new file mode 100644
index 00000000000..936defa6cce
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-timing-function-invalid.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Animations: parsing transition-timing-function with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-timing-function">
+<link rel="help" href="https://drafts.csswg.org/css-timing-1/#typedef-timing-function">
+<meta name="assert" content="transition-timing-function supports only the grammar '<timing-function> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("transition-timing-function", "auto");
+test_invalid_value("transition-timing-function", "ease-in ease-out");
+test_invalid_value("transition-timing-function", "cubic-bezier(1, 2, 3)");
+test_invalid_value("transition-timing-function", "cubic-bezier(1, 2, 3, infinite)");
+test_invalid_value("transition-timing-function", "cubic-bezier(1, 2, 3, 4, 5)");
+test_invalid_value("transition-timing-function", "cubic-bezier(-0.1, 0.1, 0.5, 0.9)");
+test_invalid_value("transition-timing-function", "cubic-bezier(0.5, 0.1, 1.1, 0.9)");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid.html b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid.html
new file mode 100644
index 00000000000..e11ef0002e4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Transitions: parsing transition-timing-function with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-timing-function">
+<link rel="help" href="https://drafts.csswg.org/css-timing-1/#typedef-timing-function">
+<meta name="assert" content="transition-timing-function supports the full grammar '<timing-function> #'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("transition-timing-function", "linear");
+
+test_valid_value("transition-timing-function", "ease");
+test_valid_value("transition-timing-function", "ease-in");
+test_valid_value("transition-timing-function", "ease-out");
+test_valid_value("transition-timing-function", "ease-in-out");
+test_valid_value("transition-timing-function", "cubic-bezier(0.1, 0.2, 0.8, 0.9)");
+test_valid_value("transition-timing-function", "cubic-bezier(0, -2, 1, 3)");
+test_valid_value("transition-timing-function", "cubic-bezier(0, 0.7, 1, 1.3)");
+
+test_valid_value("transition-timing-function", "steps(4, start)");
+test_valid_value("transition-timing-function", "steps(2, end)");
+
+test_valid_value("transition-timing-function", "linear, ease, linear");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/transitions-animatable-properties-01.html b/tests/wpt/web-platform-tests/css/css-transitions/transitions-animatable-properties-01.html
index 06143d3061d..534f81839ac 100644
--- a/tests/wpt/web-platform-tests/css/css-transitions/transitions-animatable-properties-01.html
+++ b/tests/wpt/web-platform-tests/css/css-transitions/transitions-animatable-properties-01.html
@@ -5,6 +5,7 @@
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title> CSS Transitions: Animatable CSS properties </title>
<meta name="assert" content="Check that all animatable CSS properties are animatable and then accepted by the 'transition-property' property">
+ <meta name="timeout" content="long">
<link rel="author" title="Daniel Glazman" href="mailto:daniel.glazman@disruptive-innovations.com">
<link rel="help" href="http://www.w3.org/TR/css3-transitions/#transitions">
<link rel="help" href="http://www.w3.org/TR/css3-transitions/#animatable-properties">
diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/color-interpolation.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/color-interpolation.html
index 4713d90621d..d8324db22e2 100644
--- a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/color-interpolation.html
+++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/color-interpolation.html
@@ -15,8 +15,8 @@
runPropertyTests('color-interpolation', [
{ syntax: 'auto' },
- { syntax: 'sRGB' },
- { syntax: 'linearRGB' },
+ { syntax: 'srgb' },
+ { syntax: 'linearrgb' },
]);
</script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-invalid.html
index 4ced38240f2..984475450a3 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="box-sizing supports only the grammar 'content-box | border-box'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-valid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-valid.html
index fb60ac23bb8..3dfa4f97941 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/box-sizing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="box-sizing supports the full grammar 'content-box | border-box'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-invalid.html
index b4c9cb71e03..a59b01ec2bb 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="caret-color supports only the grammar 'auto | <color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-valid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-valid.html
index 41cc70654da..dd35cf8e903 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/caret-color-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="caret-color supports the full grammar 'auto | <color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-invalid.html
index dda8031d309..b7928c85d3c 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="cursor supports only the grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-valid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-valid.html
index e33b82e2ddc..285c16a4ee5 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/cursor-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="cursor supports the full grammar.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-invalid.html
index 195f55dc72b..2b910e80303 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="outline-color supports only the grammar '<color> | invert'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-mandatory.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-mandatory.html
index fbe730bdae3..2af06658241 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-mandatory.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-mandatory.html
@@ -8,7 +8,7 @@
<meta name="assert" content="outline-color supports '<color>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-optional.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-optional.html
index bf12b87f219..79932990988 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-optional.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-color-valid-optional.html
@@ -9,7 +9,7 @@
<meta name="flags" content="may">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-invalid.html
index c56a579452f..c43cc3c6434 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="outline supports only the grammar '<outline-color> || <outline> || <outline>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-invalid.html
index 1ee9477a111..3ff26e35ae0 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="outline-offset supports only the grammar '<length>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-valid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-valid.html
index c5e023b8e96..75fc7e60bd9 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="outline-offset supports the full grammar '<length>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-invalid.html
index 2340c62d902..a659b68a55b 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="outline-style supports only the grammar 'auto | <outline-line-style>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-valid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-valid.html
index 5adcfda7ec7..98e139539f3 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-style-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="outline-style supports the full grammar 'auto | <outline-line-style>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-mandatory.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-mandatory.html
index a296c989bce..c5217185eb1 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-mandatory.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-mandatory.html
@@ -9,7 +9,7 @@
<meta name="assert" content="outline supports the full grammar '<outline-color> || <outline> || <outline>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-optional.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-optional.html
index e179406cafb..8150ffa208e 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-optional.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-valid-optional.html
@@ -11,7 +11,7 @@
<meta name="flags" content="may">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-invalid.html
index 07012fef225..6008fffd94b 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="outline-width supports only the grammar '<border-width>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-valid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-valid.html
index 050371246ce..2415e005dee 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-width-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="outline-width supports the full grammar '<border-width>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/resize-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/resize-invalid.html
index a56a1dbc6e2..7f9698f7aad 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/resize-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/resize-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="resize supports only the grammar 'none | both | horizontal | vertical'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/resize-valid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/resize-valid.html
index 025b0e447bb..d50df443e05 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/resize-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/resize-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="resize supports the full grammar 'none | both | horizontal | vertical'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-ui/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-invalid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-invalid.html
index f3945a162ec..aa4169c1462 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="text-overflow supports only the grammar 'clip | ellipsis'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-valid.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-valid.html
index 3f0aaa60938..5d40b6839de 100644
--- a/tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/text-overflow-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="text-overflow supports the full grammar 'clip | ellipsis'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-values/reference/vh_not_refreshing_on_chrome-ref.html b/tests/wpt/web-platform-tests/css/css-values/reference/vh_not_refreshing_on_chrome-ref.html
index 32ce9ada155..279d1c69b9f 100644
--- a/tests/wpt/web-platform-tests/css/css-values/reference/vh_not_refreshing_on_chrome-ref.html
+++ b/tests/wpt/web-platform-tests/css/css-values/reference/vh_not_refreshing_on_chrome-ref.html
@@ -36,10 +36,10 @@
var frameTest = document.getElementById('frameTest');
// let's resize the iframe vertically only, showing that the vh sizes is not updated.
- if (height <= 300) {
+ if (height < 300) {
//frameTest.style.width = height++ + "px";
- frameTest.style.height = height++ + "px";
+ frameTest.style.height = ++height + "px";
setTimeout(resizeReference, 10);
diff --git a/tests/wpt/web-platform-tests/css/css-values/support/vh_not_refreshing_on_chrome_iframe.html b/tests/wpt/web-platform-tests/css/css-values/support/vh_not_refreshing_on_chrome_iframe.html
index c58ec57a58f..8d8e9b49d4a 100644
--- a/tests/wpt/web-platform-tests/css/css-values/support/vh_not_refreshing_on_chrome_iframe.html
+++ b/tests/wpt/web-platform-tests/css/css-values/support/vh_not_refreshing_on_chrome_iframe.html
@@ -78,8 +78,12 @@
setTimeout(animate, 20);
- addEventListener('transitionend', function() {
- parent.postMessage('testBoxWithTransition', '*');
+ addEventListener('transitionend', event => {
+ if (event.propertyName == 'width') {
+ // Stop any further transitons.
+ testBoxWithTransition.style.transitionProperty = 'none';
+ parent.postMessage('testBoxWithTransition', '*');
+ }
}, false);
var transitionedTestBoxStyle = document.getElementById('testBoxWithTransition').style;
transitionedTestBoxStyle.height = "60px";
diff --git a/tests/wpt/web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html b/tests/wpt/web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html
index b4e0a413ab9..52a45a114c8 100644
--- a/tests/wpt/web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html
+++ b/tests/wpt/web-platform-tests/css/css-values/vh_not_refreshing_on_chrome.html
@@ -39,10 +39,10 @@
var frameTest = document.getElementById('frameTest');
// let's resize the iframe vertically only, showing that the vh sizes is not updated.
- if (height <= 300) {
+ if (height < 300) {
//frameTest.style.width = height++ + "px";
- frameTest.style.height = height++ + "px";
+ frameTest.style.height = ++height + "px";
setTimeout(resizeReference, 10);
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-001.html
index 5591465b0a7..7f887e771e8 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-001.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-001.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>upright vertical writing mode and ch unit on table rows</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/ch-units-vrl-001-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#text-orientation">
+<link rel="match" href="reference/ch-units-vrl-001-ref.html">
<meta name="assert" content="The font-metric dependent ch unit on table rows takes the writing mode (with upright text-orientation) into account,
even though theses properties do not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-002.html
index d1ff259c588..129d0eca5fd 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-002.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-002.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>upright vertical writing mode and ch unit on table row groups</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/ch-units-vrl-001-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#text-orientation">
+<link rel="match" href="reference/ch-units-vrl-001-ref.html">
<meta name="assert" content="The font-metric dependent ch unit on table row groups takes the writing mode (with upright text-orientatino) into account,
even though these properties do not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-003.html b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-003.html
index 5f7de3c96de..3ed08c47875 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-003.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-003.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>upright vertical writing mode and ch unit on table columns</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/ch-units-vrl-001-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#text-orientation">
+<link rel="match" href="reference/ch-units-vrl-001-ref.html">
<meta name="assert" content="The font-metric dependent ch unit on table columns takes the writing mode (with upright orientation) into account,
even though these properties do no apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-004.html b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-004.html
index 4264afd7182..8005db198c3 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-004.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-004.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>upright vertical writing mode and ch unit on table column groups</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/ch-units-vrl-001-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#text-orientation">
+<link rel="match" href="reference/ch-units-vrl-001-ref.html">
<meta name="assert" content="The font-metric dependent ch unit on table column groups takes the writing mode (with upright text-orientation) into account,
even though these properties do not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-005.html b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-005.html
index 6348b0099be..436bb3df236 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-005.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-005.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>sideways vertical writing mode and ch unit on table rows</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/ch-units-vrl-005-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#text-orientation">
+<link rel="match" href="reference/ch-units-vrl-005-ref.html">
<meta name="assert" content="The font-metric dependent ch unit on table rows takes the writing mode (with a sideways text-orientation) into account,
even though theese properties do not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-006.html b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-006.html
index 1395606be49..cbe1dee6847 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-006.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-006.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>sideways vertical writing mode and ch unit on table row groups</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/ch-units-vrl-005-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#text-orientation">
+<link rel="match" href="reference/ch-units-vrl-005-ref.html">
<meta name="assert" content="The font-metric dependent ch unit on table row groups takes the writing mode (with a sideways text-orientation) into account,
even though these properties do not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-007.html b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-007.html
index 978e5ba3c20..59aecf55a40 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-007.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-007.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>sideways vertical writing mode and ch unit on table columns</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/ch-units-vrl-005-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#text-orientation">
+<link rel="match" href="reference/ch-units-vrl-005-ref.html">
<meta name="assert" content="The font-metric dependent ch unit on table columns takes the writing mode (with a sideways orientation) into account,
even though these properties do not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-008.html b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-008.html
index eece5974bfb..b0d09cef586 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-008.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/ch-units-vrl-008.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>sideways vertical writing mode and ch unit on table column groups</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-values-3/#font-relative-lengths">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/ch-units-vrl-005-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#text-orientation">
+<link rel="match" href="reference/ch-units-vrl-005-ref.html">
<meta name="assert" content="The font-metric dependent ch unit on table column groups takes the writing mode (with a sideways orientation) into account,
even though theses properties do not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-001.html
new file mode 100644
index 00000000000..08500537f87
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-001.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html style="writing-mode: vertical-lr;">
+<title>CSS Test: intrinsic size contributions of images in vertical writing mode</title>
+<meta name="assert" content="The image's parent element's intrinsic inline size should be contributed to by the image's height, not the image's width">
+<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes">
+<link rel="author" title="Zhang Junzhi" href="mailto:zjz@zjz.name">
+<link rel="match" href="img-intrinsic-size-contribution-ref.html">
+
+<style>
+* { margin: 0; padding: 0; }
+</style>
+
+<div style="border: 1px solid blue; display: grid; height: 150px;">
+ <div style="border: 1px solid orange;">
+ <img src="support/blue-200x100.png">
+ </div>
+</div>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-002.html
new file mode 100644
index 00000000000..df0ccf2093b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-002.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html style="writing-mode: vertical-lr;">
+<title>CSS Test: intrinsic size contributions of images in vertical writing mode (with the image itself in horizontal writing mode)</title>
+<meta name="assert" content="The image's parent element's intrinsic inline size should be contributed to by the image's height, not the image's width">
+<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes">
+<link rel="author" title="Zhang Junzhi" href="mailto:zjz@zjz.name">
+<link rel="match" href="img-intrinsic-size-contribution-ref.html">
+
+<style>
+* { margin: 0; padding: 0; }
+</style>
+
+<div style="border: 1px solid blue; display: grid; height: 150px;">
+ <div style="border: 1px solid orange;">
+ <img src="support/blue-200x100.png" style="writing-mode: horizontal-tb;">
+ </div>
+</div>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-ref.html b/tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-ref.html
new file mode 100644
index 00000000000..ffda7d62ba9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/img-intrinsic-size-contribution-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<title>CSS Test Reference: intrinsic size contributions of images in vertical writing mode</title>
+<link rel="author" title="Zhang Junzhi" href="mailto:zjz@zjz.name">
+
+<style>
+* { margin: 0; padding: 0; }
+</style>
+
+<div style="border: 1px solid blue; height: 150px; width: 202px;">
+ <div style="border: 1px solid orange; height: 148px;">
+ <img src="support/blue-200x100.png">
+ </div>
+</div>
+
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-001.html
index 599c80edc90..5eea84d5362 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-001.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-001.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>writing-modes and logical props: tr</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-logical-1/#box">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/logical-props-001-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#block-flow">
+<link rel="match" href="reference/logical-props-001-ref.html">
<meta name="assert" content="The logical properties on table rows are resolved taking the writing mode of the element into account,
even though the writing mode property does not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-002.html b/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-002.html
index a018e59853d..96295d09dda 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-002.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-002.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>writing-modes and logical props: tbody</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-logical-1/#box">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/logical-props-001-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#block-flow">
+<link rel="match" href="reference/logical-props-001-ref.html">
<meta name="assert" content="The logical properties on table row groups are resolved taking the writing mode of the element into account,
even though the writing mode property does not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-003.html b/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-003.html
index 64e272d4514..f40c9fc9ef0 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-003.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-003.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>writing-modes and logical props: col</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-logical-1/#box">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/logical-props-001-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#block-flow">
+<link rel="match" href="reference/logical-props-001-ref.html">
<meta name="assert" content="The logical properties on table columns are resolved taking the writing mode of the element into account,
even though the writing mode property does not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-004.html b/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-004.html
index 556794d7fa8..e5b23679e62 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-004.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/logical-props-004.html
@@ -2,8 +2,10 @@
<meta charset="utf-8">
<title>writing-modes and logical props: colgroup</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
+<link rel="help" href="https://www.w3.org/TR/css-logical-1/#box">
<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#placement">
-<link rel="match" href="reference/logical-props-001-ref.html"
+<link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#block-flow">
+<link rel="match" href="reference/logical-props-001-ref.html">
<meta name="assert" content="The logical properties on table column groups are resolved taking the writing mode of the element into account,
even though the writing mode property does not apply to that element.">
<style>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-invalid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-invalid.html
index 7181dbe675d..cb282f0b723 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="direction supports only the grammar 'ltr | rtl'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-valid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-valid.html
index 11585cf9e43..f8b9fa808b9 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/direction-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="direction supports the full grammar 'ltr | rtl'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-invalid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-invalid.html
index b8a0c14b56b..c3401ea7d24 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="text-combine-upright supports only the grammar 'none | all'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-valid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-valid.html
index 2b15840cd7c..dada1f97e2f 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="text-combine-upright supports the full grammar 'none | all'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-invalid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-invalid.html
index cc9c051049b..ceb9cf78cc3 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="text-orientation supports only the grammar 'mixed | upright | sideways'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-valid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-valid.html
index 06049c28a0a..36f2d367015 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/text-orientation-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="text-orientation supports the full grammar 'mixed | upright | sideways'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-invalid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-invalid.html
index 1e5f2a1f62a..f1a2b730b48 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="unicode-bidi supports only the grammar 'normal | embed | isolate | bidi-override | isolate-override | plaintext'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-valid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-valid.html
index 087c026adce..38911df2d34 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/unicode-bidi-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="unicode-bidi supports the full grammar 'normal | embed | isolate | bidi-override | isolate-override | plaintext'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-invalid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-invalid.html
index 50e42f73c6d..a2010d40d2e 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-invalid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="writing-mode supports only the grammar 'horizontal-tb | vertical-rl | vertical-lr'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-valid.html b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-valid.html
index 6f525109fe1..6f79a36a4dc 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/parsing/writing-mode-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="writing-mode supports the full grammar 'horizontal-tb | vertical-rl | vertical-lr'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/support/blue-200x100.png b/tests/wpt/web-platform-tests/css/css-writing-modes/support/blue-200x100.png
new file mode 100644
index 00000000000..e32c47dd1ee
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/support/blue-200x100.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/svg-aliasing-001.html b/tests/wpt/web-platform-tests/css/css-writing-modes/svg-aliasing-001.html
index bc32f202e2b..3979459838e 100644
--- a/tests/wpt/web-platform-tests/css/css-writing-modes/svg-aliasing-001.html
+++ b/tests/wpt/web-platform-tests/css/css-writing-modes/svg-aliasing-001.html
@@ -3,7 +3,7 @@
<title>SVG writing modes values parsed as aliases</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#svg-writing-mode">
-<link rel="match" href="reference/svg-aliasing-001-ref.html"
+<link rel="match" href="reference/svg-aliasing-001-ref.html">
<meta name="assert" content="The legacy SVG writing mode values are parsed as simple aliases of the newer ones, and do not have side effects on bidi.">
<meta name="flags" content="may"> <!-- "may" because the support for these values is optional-->
diff --git a/tests/wpt/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl-ref.html b/tests/wpt/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl-ref.html
new file mode 100644
index 00000000000..1ee4fe2652f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body style="overflow: scroll">
+ <div style="position: absolute; top: 50px; left: 50px; width: 200px; height: 200px; background: green"></div>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl.html b/tests/wpt/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl.html
new file mode 100644
index 00000000000..85ac2a96659
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>CSSOM View - 6.1 - getBoundingClientRect tests</title>
+<link rel="help" href="http://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect">
+<link rel=match href="cssom-getBoundingClientRect-vertical-rl-ref.html">
+<meta name="flags" content="dom">
+<body style="writing-mode: vertical-rl; overflow: scroll">
+ <div id="target" style="position: absolute; top: 50px; left: 50px; width: 200px; height: 200px; background: red"></div>
+ <div id="overlay" style="position: absolute; background: green"></div>
+ <script>
+ var r = document.getElementById('target').getBoundingClientRect();
+ var overlay = document.getElementById('overlay');
+ overlay.style.top = r.top + 'px';
+ overlay.style.left = r.left + 'px';
+ overlay.style.width = r.width + 'px';
+ overlay.style.height = r.height + 'px';
+ </script>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/cssom/computed-style-set-property.html b/tests/wpt/web-platform-tests/css/cssom/computed-style-set-property.html
index 65678526817..0a5e4cb0589 100644
--- a/tests/wpt/web-platform-tests/css/cssom/computed-style-set-property.html
+++ b/tests/wpt/web-platform-tests/css/cssom/computed-style-set-property.html
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<title>NoModificationAllowedError when mutating read only properties</title>
-<link rel="author" title="Anders Hartvoll Ruud" href="andruud@chromium.org">
<link rel="help" href="https://www.w3.org/TR/cssom-1/#dom-cssstyledeclaration-setpropertyvalue">
<meta name="assert" content="This test verifies that NoModificationAllowedError is thrown when mutating read only properties" />
<script src="/resources/testharness.js"></script>
diff --git a/tests/wpt/web-platform-tests/css/cssom/shorthand-serialization.html b/tests/wpt/web-platform-tests/css/cssom/shorthand-serialization.html
index 2178ba37a95..44af6737e3e 100644
--- a/tests/wpt/web-platform-tests/css/cssom/shorthand-serialization.html
+++ b/tests/wpt/web-platform-tests/css/cssom/shorthand-serialization.html
@@ -58,6 +58,20 @@
assert_equals(testElem.style.margin, "20px");
assert_equals(testElem.style.cssText, "margin: 20px;")
}, "Shorthand serialization after setting");
+
+ test(function() {
+ const testElem = document.getElementById("test");
+ testElem.style.cssText = "margin: initial;";
+ assert_equals(testElem.style.margin, "initial");
+ assert_equals(testElem.style.cssText, "margin: initial;");
+ }, "Shorthand serialization with 'initial' value.");
+
+ test(function() {
+ const testElem = document.getElementById("test");
+ testElem.style.setProperty("margin-top", "initial", "important");
+ assert_equals(testElem.style.margin, "");
+ assert_equals(testElem.style.cssText, "margin-top: initial !important; margin-right: initial; margin-bottom: initial; margin-left: initial;");
+ }, "Shorthand serialization with 'initial' value, one longhand with important flag.");
</script>
</body>
</html>
diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-invalid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-invalid.html
index 0cec437c627..6fdf647a43d 100644
--- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="color-interpolation-filters supports only the grammar 'auto | sRGB | linearRGB'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-valid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-valid.html
index 5f7a6e65359..58539b015fd 100644
--- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="color-interpolation-filters supports the full grammar 'auto | sRGB | linearRGB'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html
index 06cb30c8c3c..b1e089758d4 100644
--- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="filter supports only the grammar 'none | <filter-function-list>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html
index 266fee237ba..e2dd7036a24 100644
--- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="filter supports the full grammar 'none | <filter-function-list>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-invalid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-invalid.html
index 3d8207bd55c..4310330af83 100644
--- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="lighting-color supports only the grammar 'auto | sRGB | linearRGB'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-valid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-valid.html
index 89b189a7f9a..01c8c0fc995 100644
--- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/lighting-color-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="lighting-color supports the full grammar 'auto | sRGB | linearRGB'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/filter-effects/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-invalid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-invalid.html
index 817c2684bbc..af32ae2c5a5 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-anchor supports only the grammar 'auto | <position>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid.html
index d354763b4e7..a69a5ce9f81 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-anchor-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-anchor supports the full grammar 'auto | <position>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-invalid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-invalid.html
index 7eec1270ab8..2d0be83e03b 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-distance supports only the grammar '<length-percentage>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-valid.html
index b699ecea5a1..5b081bcaab7 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-distance-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-distance supports the full grammar '<length-percentage>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-invalid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-invalid.html
index 23475f8d513..cc2eb500eb8 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset supports only the grammar from the spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-valid.html
index 4cdb2b19389..b93091b2088 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset supports the full grammar from the spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
@@ -16,25 +16,25 @@ test_valid_value("offset", "100px none auto 90deg", "100px center none auto 90de
test_valid_value("offset", "100px", "100px center");
test_valid_value("offset", "auto none reverse");
test_valid_value("offset", "auto");
-test_valid_value("offset", "center bottom path('M 1 2 V 3 Z')");
-test_valid_value("offset", "center center path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 300 300 Z') 100% 90deg / left bottom");
+test_valid_value("offset", "center bottom path(\"M 1 2 V 3 Z\")");
+test_valid_value("offset", "center center path(\"M 0 0 L 100 100 M 100 200 L 200 200 Z L 300 300 Z\") 100% 90deg / left bottom");
test_valid_value("offset", "left bottom ray(0rad closest-side) 10px auto 30deg / right bottom");
test_valid_value("offset", "left top");
test_valid_value("offset", "none 30deg reverse", "none reverse 30deg");
test_valid_value("offset", "none 50px reverse 30deg");
test_valid_value("offset", "none calc(10px + 20%) auto");
test_valid_value("offset", "none reverse");
-test_valid_value("offset", "path('M 0 0 H 1') -200% auto");
-test_valid_value("offset", "path('M 0 0 H 1') -200%");
-test_valid_value("offset", "path('M 0 0 H 1') 50px");
-test_valid_value("offset", "path('M 0 0 H 1') auto");
-test_valid_value("offset", "path('M 0 0 H 1') reverse 30deg 50px", "path('M 0 0 H 1') 50px reverse 30deg");
-test_valid_value("offset", "path('M 0 0 H 1')");
-test_valid_value("offset", "path('m 0 0 h 100') -7rad 8px / auto", "path('m 0 0 h 100') 8px -7rad / auto");
-test_valid_value("offset", "path('m 0 0 h 100') -7rad 8px / left top", "path('m 0 0 h 100') 8px -7rad / left top");
-test_valid_value("offset", "path('m 0 0 h 100') -7rad 8px", "path('m 0 0 h 100') 8px -7rad");
-test_valid_value("offset", "path('m 0 0 h 100') 100px 0deg");
-test_valid_value("offset", "path('m 1 2 v 3 Z')");
+test_valid_value("offset", "path(\"M 0 0 H 1\") -200% auto");
+test_valid_value("offset", "path(\"M 0 0 H 1\") -200%");
+test_valid_value("offset", "path('M 0 0 H 1') 50px", "path(\"M 0 0 H 1\") 50px");
+test_valid_value("offset", "path(\"M 0 0 H 1\") auto");
+test_valid_value("offset", "path('M 0 0 H 1') reverse 30deg 50px", "path(\"M 0 0 H 1\") 50px reverse 30deg");
+test_valid_value("offset", "path(\"M 0 0 H 1\")");
+test_valid_value("offset", "path('m 0 0 h 100') -7rad 8px / auto", "path(\"m 0 0 h 100\") 8px -7rad / auto");
+test_valid_value("offset", "path('m 0 0 h 100') -7rad 8px / left top", "path(\"m 0 0 h 100\") 8px -7rad / left top");
+test_valid_value("offset", "path('m 0 0 h 100') -7rad 8px", "path(\"m 0 0 h 100\") 8px -7rad");
+test_valid_value("offset", "path(\"m 0 0 h 100\") 100px 0deg");
+test_valid_value("offset", "path('m 1 2 v 3 Z')", "path(\"m 1 2 v 3 Z\")");
test_valid_value("offset", "ray(farthest-corner 90deg) 1%", "ray(90deg farthest-corner) 1%");
test_valid_value("offset", "ray(sides 0deg) 50% 90deg auto", "ray(0deg sides) 50% auto 90deg");
test_valid_value("offset", "right bottom / left top");
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-invalid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-invalid.html
index 67c1099ba73..c69f7c81a9d 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-path supports only the grammar from the spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html
index d57b465ada6..bda82928726 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-path supports the full grammar from the spec.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-invalid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-invalid.html
index 6565fa5cdd7..5e749e5b4ec 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-position supports only the grammar 'auto | <position>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html
index 565abffbdee..d40f70e8c00 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-position supports the full grammar 'auto | <position>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-invalid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-invalid.html
index a649fb4aabb..4e5a9229a0c 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-invalid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-invalid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-rotate supports only the grammar '[ auto | reverse ] || <angle>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-valid.html
index 38e9ff1ba45..71978d33b12 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-rotate-parsing-valid.html
@@ -8,7 +8,7 @@
<meta name="assert" content="offset-rotate supports the full grammar '[ auto | reverse ] || <angle>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="support/parsing-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/motion/parsing/support/parsing-testcommon.js
deleted file mode 100644
index b075882f89a..00000000000
--- a/tests/wpt/web-platform-tests/css/motion/parsing/support/parsing-testcommon.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// serializedValue can be the expected serialization of value,
-// or an array of permitted serializations,
-// or omitted if value should serialize as value.
-function test_valid_value(property, value, serializedValue) {
- if (arguments.length < 3)
- serializedValue = value;
-
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_not_equals(div.style.getPropertyValue(property), "", "property should be set");
-
- var div = document.createElement('div');
- div.style[property] = value;
- var readValue = div.style.getPropertyValue(property);
- if (serializedValue instanceof Array)
- assert_in_array(readValue, serializedValue, "serialization should be sound");
- else
- assert_equals(readValue, serializedValue, "serialization should be canonical");
-
- div.style[property] = readValue;
- assert_equals(div.style.getPropertyValue(property), readValue, "serialization should round-trip");
-
- }, "e.style['" + property + "'] = " + stringifiedValue + " should set the property value");
-}
-
-function test_invalid_value(property, value) {
- var stringifiedValue = JSON.stringify(value);
-
- test(function(){
- var div = document.createElement('div');
- div.style[property] = value;
- assert_equals(div.style.getPropertyValue(property), "");
- }, "e.style['" + property + "'] = " + stringifiedValue + " should not set the property value");
-}
diff --git a/tests/wpt/web-platform-tests/css/selectors/CHANGES b/tests/wpt/web-platform-tests/css/selectors/CHANGES
deleted file mode 100644
index 681a56f9158..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/CHANGES
+++ /dev/null
@@ -1,241 +0,0 @@
-Since the 3 June 2009 release, the following tests have changed:
-
-Removed tests:
- css3-modsel-d5 - :indeterminate
- css3-modsel-d5a - :indeterminate and :checked
- css3-modsel-d5b - NEGATED :indeterminate and :checked
- css3-modsel-d5c - :indeterminate and :checked
- css3-modsel-d5d - :indeterminate with :checked
- css3-modsel-d5e - NEGATED :indeterminate with :checked
- :indeterminate is not part of Selectors Level 3
-
-------------------------------------------------------------------------
-Since the 7 March 2006 release, the following tests have changed:
-
-New tests:
- css3-modsel-184a - Ends-wth attribute selector with empty value
- css3-modsel-184b - Starts-with attribute selector with empty value
- css3-modsel-184c - Contains attribute selector with empty value
- css3-modsel-184d - NEGATED ends-with attribute selector with empty value
- css3-modsel-184e - NEGATED starts-with attribute selector with empty value
- css3-modsel-184f - NEGATED contains attribute selector with empty value
- Tests to verify that attribute selectors with empty values don't match
-
-Removed tests:
- css3-modsel-40 - ::selection pseudo-element
- css3-modsel-162 - Contextual ::selection
- css3-modsel-164 - :focus with ::selection
- css3-modsel-165 - :hover with ::selection
- ::selection has been removed from Selectors Level 3
-
-------------------------------------------------------------------------
-Since the 19 October 2005 release, the following tests have changed:
-
-Modified tests:
- css3-modsel-6 - Attribute value selector
- Removed confusing prose and made it a simple pass criteria.
-
- css3-modsel-18 - :hover pseudo-class
- Removed test of border-spacing.
-
- css3-modsel-39a - ::first-letter pseudo-element with ::before pseudo-element
- css3-modsel-39c - ::first-letter pseudo-element with ::before pseudo-element
- Changed from background-color to color.
-
- css3-modsel-161 - Syntax and parsing of unknown pseudo-classes and pseudo-elements
- Added the metadata making this test an interactive test.
-
- css3-modsel-d5 - :indeterminate
- css3-modsel-d5a - :indeterminate and :checked
- css3-modsel-d5d - :indeterminate with :checked
- css3-modsel-d5e - NEGATED :indeterminate with :checked
- Changed so that UAs that do not support styling of form controls
- can still pass these tests if they support combinators (mark II).
-
- css3-modsel-d1b - Dynamic handling of :empty
- Updated to test what the spec actually says (oops).
-
-Removed tests:
- css3-modsel-180 - ::first-letter on inlines
- We changed the spec so that first-letter doesn't apply to
- inlines, but we don't want to just reverse the test since we want
- to allow :first-letter to apply to inlines in future.
-
-
-------------------------------------------------------------------------
-Since the 3 October 2005 release, the following tests have changed:
-
-New tests:
- css3-modsel-27a - Impossible rules (:root:firstchild, etc)
- css3-modsel-27b - Impossible rules (* html, * :root)
- A test to verify there are no elements above the root element.
-
-------------------------------------------------------------------------
-Since the 16 December 2004 release, the following tests have changed:
-
-Modified tests:
- css3-modsel-15c - Multiple IDs
- css3-modsel-d3 - Dynamic handling of attribute selectors
- Fixed typos in script.
-
- css3-modsel-70 - NEGATED :checked pseudo-class
- css3-modsel-d5b - NEGATED :indeterminate and :checked
- css3-modsel-d5c - :indeterminate and :checked
- css3-modsel-d5e - NEGATED :indeterminate with :checked
- Changed so that UAs that do not support styling of form controls
- can still pass these tests if they support combinators.
-
- css3-modsel-66 - NEGATED :target pseudo-class
- Changed colours so it is less misleading on non-supporting UAs.
-
- css3-modsel-39b - ::first-letter pseudo-element
- css3-modsel-39 - ::first-letter pseudo-element
- css3-modsel-39a - ::first-letter pseudo-element with ::before pseudo-element
- css3-modsel-39c - ::first-letter pseudo-element with ::before pseudo-element
- Made their "very long paragraphs" actually be long.
-
- css3-modsel-84 - :contains() pseudo-class
- css3-modsel-85 - NEGATED :contains() pseudo-class
- Made text less misleading about the pass condition.
-
-Removed tests:
- css3-modsel-19a - :active pseudo-class on blocks
- This test tested something that the spec did not specify.
-
- css3-modsel-84 - :contains() pseudo-class
- css3-modsel-84b - :contains() pseudo-class
- css3-modsel-85 - NEGATED :contains() pseudo-class
- css3-modsel-163 - Contextual :contains
- Removed since :contains() was removed.
-
-------------------------------------------------------------------------
-Since the 10 May 2004 release, the following tests have changed:
-
-New tests:
- css3-modsel-15c - Multiple IDs
- A test that checks if UAs support multiple IDs on the same
- element. Requires two or more of XHTML, xml:id, and DOM3 Core
- support. See also the comment in the test itself.
-
-Modified tests:
- css3-modsel-90 - Simple combination of direct and indirect adjacent combinators
- css3-modsel-d3 - Dynamic handling of attribute selectors
- css3-modsel-15b - Multiple ID selectors
- Changed to remove false-negative results in some of the test
- harnesses.
-
- css3-modsel-25 - :checked pseudo-class
- Changed so that UAs that do not support styling of form controls
- can still pass this test if they support combinators.
-
- css3-modsel-162 - Contextual ::selection
- Made the pass condition slightly clearer.
- Fixed the control test to disable styling of all text in that section.
-
- All tests involving namespace attributes
- Fixed the generating script so that the tests involving
- attributes once again have their namespace prefixes declared.
-
-------------------------------------------------------------------------
-Since the 21 April 2004 release, the following tests have changed:
-
-New tests:
- css3-modsel-183 - Syntax and parsing of class selectors
- Some more detailed tests for error handling issues known to be
- broken in some UAs.
-
-Modified tests:
- css3-modsel-14b - More than one class selector
- Expanded the test to catch a few more potential bugs.
-
- css3-modsel-153 - :empty pseudo-class and CDATA
- css3-modsel-150 - :empty pseudo-class and XML/SGML constructs
- Updating :empty tests to match agreed (if as yet unpublished)
- errata.
-
-------------------------------------------------------------------------
-Since the 2 March 2004 release, the following tests have changed:
-
-New tests:
- css3-modsel-42a - :after pseudo-element
- css3-modsel-41a - :before pseudo-element
-
-Removed tests:
- css3-modsel-12 - Default attribute value
- css3-modsel-58 - Default attribute value and negation pseudo-class
- These tests no longer apply since UAs are now allowed to assume
- attribute defaulting or to ignore it, basically at will.
-
-Modified tests:
- css3-modsel-23 - :enabled pseudo-class
- css3-modsel-24 - :disabled pseudo-class
- css3-modsel-28 - :nth-child() pseudo-class
- css3-modsel-28b - :nth-child() pseudo-class
- css3-modsel-29 - :nth-last-child() pseudo-class
- css3-modsel-29b - :nth-last-child() pseudo-class
- css3-modsel-32 - :first-child pseudo-class
- css3-modsel-33 - :last-child pseudo-class
- css3-modsel-68 - NEGATED :enabled pseudo-class
- css3-modsel-69 - NEGATED :disabled pseudo-class
- css3-modsel-73 - NEGATED :nth-child() pseudo-class
- css3-modsel-73b - NEGATED :nth-child() pseudo-class
- css3-modsel-74 - NEGATED :nth-last-child() pseudo-class
- css3-modsel-74b - NEGATED :nth-last-child() pseudo-class
- css3-modsel-77 - NEGATED :first-child pseudo-class
- css3-modsel-77b - NEGATED :first-child pseudo-class
- css3-modsel-78 - NEGATED :last-child pseudo-class
- css3-modsel-78b - NEGATED :last-child pseudo-class
- css3-modsel-87 - Nondeterministic matching of direct and indirect adjacent combinators
- css3-modsel-87b - Nondeterministic matching of direct and indirect adjacent combinators
- css3-modsel-88 - Nondeterministic matching of descendant and direct adjacent combinators
- css3-modsel-88b - Nondeterministic matching of descendant and direct adjacent combinators
- css3-modsel-90 - Simple combination of direct and indirect adjacent combinators
- css3-modsel-90b - Simple combination of direct and indirect adjacent combinators
- css3-modsel-d1 - NEGATED Dynamic handling of :empty
- css3-modsel-d1b - NEGATED Dynamic handling of :empty
- css3-modsel-d2 - Dynamic handling of combinators
- css3-modsel-d3 - Dynamic handling of attribute selectors
- css3-modsel-d4 - Dynamic updating of :first-child and :last-child
- css3-modsel-d5 - :indeterminate
- css3-modsel-d5a - :indeterminate and :checked
- css3-modsel-d5b - NEGATED :indeterminate and :checked
- css3-modsel-d5c - :indeterminate and :checked
- css3-modsel-d5d - :indeterminate with :checked
- css3-modsel-d5e - NEGATED :indeterminate with :checked
- (and some others depending on the test format)
- Fixed minor standards compliance issues.
-
- All the non-namespaced XHTML tests
- Removed some extraneous namespace declarations that made the
- tests invalid.
-
-------------------------------------------------------------------------
-Since the 15 September 2003 release, the following tests have changed:
-
-New tests:
- css3-modsel-3a - Universal selector (no namespaces)
- css3-modsel-18a - :hover pseudo-class on links
- css3-modsel-18c - :hover pseudo-class on links
- css3-modsel-19a - :active pseudo-class on blocks
- css3-modsel-19b - :active pseudo-class on controls
- css3-modsel-179 - ::first-line on inlines
- css3-modsel-179a - ::first-line after <br>
- css3-modsel-180 - ::first-letter on inlines
- css3-modsel-180a - ::first-letter after <br>
- css3-modsel-181 - Case sensitivity
- css3-modsel-182 - Namespaces and \: in selectors
-
-Modified tests:
- css3-modsel-21c - :target pseudo-class
- Fixed to match spec errata.
-
- css3-modsel-98 - Attribute value selector with declared namespace
- Added a test to make sure the attribute selectors work without quotes.
-
- css3-modsel-161 - Syntax and parsing of unknown pseudo-classes and pseudo-elements
- Added more tests and split up the existing test to catch more possible errors.
-
- css3-modsel-44 - Child combinator
- Stylesheet used the wrong property name.
-
-------------------------------------------------------------------------
diff --git a/tests/wpt/web-platform-tests/css/selectors/Makefile b/tests/wpt/web-platform-tests/css/selectors/Makefile
deleted file mode 100644
index 210118befd5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-##############################################################################
-# W3C Test Suite Generator #
-##############################################################################
-
-## Variables
-
-DESTINATION_TYPES=$(shell perl generate.pl -v DESTINATION_TYPES)
-SHELL_TYPES=$(shell perl generate.pl -v SHELL_TYPES)
-TEST_TYPES=$(shell perl generate.pl -v TEST_TYPES)
-SOURCE=$(shell ls *.xml)
-STYLESHEETS=dist/style/tng.css $(shell perl -e 'foreach $$a (qw($(DESTINATION_TYPES))) { print "dist/style/$$a-full.css\ndist/style/$$a-shell.css\n"; }')
-
-
-## Main Targets
-
-all: directories cache $(STYLESHEETS) dist/.htaccess dist/CHANGES
-
-directories: Makefile generate.pl utils/*
- -rm -rf dist/
- -rm cache
- perl -e 'foreach $$a (qw($(DESTINATION_TYPES))) { print `mkdir -p dist/$$a/tests\n`; foreach $$b (qw($(TEST_TYPES))) { print `mkdir -p dist/$$a/$$b/flat\n`; foreach $$c (qw($(SHELL_TYPES))) { print `mkdir -p dist/$$a/$$b/$$c\n`; } } }'
- mkdir -p dist/style
- touch directories
-
-cache: $(SOURCE)
- perl generate.pl $?
-
-
-## Support Files
-
-# (not mentioned in 'all' as there is no README)
-dist/README: README.dist
- cp README.dist dist/README
-
-dist/CHANGES: CHANGES
- cp CHANGES dist/CHANGES
-
-dist/style/%.css: %.css
- cp $< $@
-
-dist/.htaccess: htaccess
- cp htaccess dist/.htaccess
-
-## Phony Targets
-
-.PHONY: all clean
-clean:
- -rm -rf dist/
- -rm directories
- -rm cache
-
-##############################################################################
diff --git a/tests/wpt/web-platform-tests/css/selectors/README b/tests/wpt/web-platform-tests/css/selectors/README
deleted file mode 100644
index 06016f638ba..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/README
+++ /dev/null
@@ -1,27 +0,0 @@
-The format is:
-
- <csstest xmlns="http://www.example.org/css3tests"
- def="<put the title of the test here>"
- module="W3C Selectors"
- modulename="css3-modsel"
- number="<put your initials here>-<give each test a unique number>"
- rev="1.0"
- date="1-january-1979 <edit the date keeping the format>">
- <author><!-- Put your name here --></author>
- <cssrules>
- /* put the rules here */
- </cssrules>
- <code>
- <p xmlns="http://www.w3.org/1999/xhtml"> Put the test here. </p>
- </code>
- </csstest>
-
-
-You can also use a special <restrict> element in elements in the <code>
-element, as in:
-
- <test:restrict xmlns:test="http://www.example.org/css3tests" for="xml xhtml">
- ...
- </test:restrict>
-
-See test -d2 for an example.
diff --git a/tests/wpt/web-platform-tests/css/selectors/TODO b/tests/wpt/web-platform-tests/css/selectors/TODO
deleted file mode 100644
index f504110bf14..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/TODO
+++ /dev/null
@@ -1,13 +0,0 @@
-Some things that need testing:
- :nth-child(2n+3)
- :nth-child(2n-2)
- :nth-child(2n-3)
- :nth-child(-2n+1)
- :nth-child(-1n+6)
- :nth-child(-2)
- :nth-child(-2n-2)
- :nth-child(-n-2)
- summary file
-
-See also:
- http://www.w3.org/mid/40B8E7FA.3040409@mit.edu \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-1.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-1.xml
deleted file mode 100644
index 54b2ad93f71..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-1.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Groups of selectors" module="W3C Selectors" modulename="css3-modsel" number="1" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>li,p { background-color : lime }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li>The background of this list item should be green</li>
- <li>The background of this second list item should be also green</li>
-</ul>
-<p xmlns="http://www.w3.org/1999/xhtml">The background of this paragraph should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-10.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-10.xml
deleted file mode 100644
index e6a028b472c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-10.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Substring matching attribute selector (end)" module="W3C Selectors" modulename="css3-modsel" number="10" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { background-color : red }
-p[title$="bar"] { background-color : lime }</cssrules>
-
-<code>
-<p title="foobar" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background because
-its title attribute ends with "bar"</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-100.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-100.xml
deleted file mode 100644
index 44910f25d1a..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-100.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute dash-separated value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="100" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[a|foo|="bar"], *|*[html|lang|="en"] { background-color : lime }
-</cssrules>
-
-<code>
-<p html:lang="en-us" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:foo="bargain-trash" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:foo="bar-drink-glass" xmlns="http://www.example.org/a">This paragraph should have a green background</r>
-<s b:foo="bar-drink-glass" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-100b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-100b.xml
deleted file mode 100644
index 7e58b62fc1c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-100b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute dash-separated value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="100b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[a|foo|="bar"], *|*[html|lang|="en"] { background-color : red }
-</cssrules>
-
-<code>
-<p html:lang="en-us" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:foo="bargain-trash" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:foo="bar-drink-glass" xmlns="http://www.example.org/a">This paragraph should have a green background</r>
-<s b:foo="bar-drink-glass" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-101.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-101.xml
deleted file mode 100644
index bb8e1639aa0..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-101.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute value selector on beginning with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="101" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[a|title^="si on"], *|*[title^="si on"] { background-color : lime }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="et si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-101b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-101b.xml
deleted file mode 100644
index e71226d5d12..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-101b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute value selector on beginning with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="101b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[a|title^="si on"], *|*[title^="si on"] { background-color : red }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="et si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-102.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-102.xml
deleted file mode 100644
index c331c591a47..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-102.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<csstest def="Substring matching attribute value selector on end with declared namespace"
-module="W3C Selectors" modulename="css3-modsel" number="102" rev="1.1" date="13-november-2001"
-xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[a|title$="tait"], p[|title$="tait"] { background-color : lime }
-*|*[|title$="tait"], *|*[html|title$="tait"] { background-color : red }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q xmlns:a="http://www.example.org/a" a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a" xmlns:a="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b" xmlns:b="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-102b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-102b.xml
deleted file mode 100644
index ed37bf7a649..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-102b.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="Substring matching attribute value selector on end with declared namespace"
-module="W3C Selectors" modulename="css3-modsel" number="102b" rev="1.1" date="13-november-2001"
-xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[a|title$="tait"], *|*[html|title$="tait"] { background-color : red }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background</p>
-<q xmlns:a="http://www.example.org/a" a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a" xmlns:a="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b" xmlns:b="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-103.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-103.xml
deleted file mode 100644
index d0581121a11..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-103.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Substring matching attribute value selector on middle with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="103" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[a|title*="hanta"], p[|title*="hanta"] { background-color : lime }
-*|*[|title*="hanta"], *|*[html|title*="hanta"] { background-color : red }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-103b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-103b.xml
deleted file mode 100644
index ef1e8557bcc..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-103b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute value selector on middle with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="103b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[a|title*="hanta"], *|*[html|title*="hanta"] { background-color : red }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-104.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-104.xml
deleted file mode 100644
index a7919bbb27c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-104.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute existence selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="104" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : red }
-*|*[*|title] { background-color : lime }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background</p>
-<q a:foo="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-104b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-104b.xml
deleted file mode 100644
index 2147452f3f8..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-104b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute existence selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="104b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : lime ! important }
-*|*[*|title] { background-color : red }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background</p>
-<q a:foo="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-105.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-105.xml
deleted file mode 100644
index 12946be512a..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-105.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Attribute value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="105" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : red }
-*|*[*|title="si on chantait"] { background-color : lime }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:foo="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-105b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-105b.xml
deleted file mode 100644
index 47c4d987c08..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-105b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Attribute value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="105b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : lime ! important }
-*|*[*|title="si on chantait"] { background-color : red }
-</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:foo="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-106.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-106.xml
deleted file mode 100644
index 13e1f5d3fd6..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-106.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Attribute space-separated value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="106" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : red }
-*|*[*|class~="deux"], *|*[*|foo~="deux"] { background-color : lime }
-</cssrules>
-
-<code>
-<p class="un deux trois" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:bar="un deux trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<q a:foo="un second deuxieme trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:foo="un deux trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:foo="un deux trois" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-106b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-106b.xml
deleted file mode 100644
index e990b199052..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-106b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Attribute space-separated value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="106b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : lime ! important }
-*|*[*|class~="deux"], *|*[*|foo~="deux"] { background-color : red }
-</cssrules>
-
-<code>
-<p class="un deux trois" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:bar="un deux trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<q a:foo="un second deuxieme trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:foo="un deux trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:foo="un deux trois" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-107.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-107.xml
deleted file mode 100644
index 3782017361d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-107.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Attribute dash-separated value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="107" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[*|lang|="en"], *|*[a|foo|="un-d"] { background-color : lime }
-</cssrules>
-
-<code>
-<p lang="en-us" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background</p>
-<q a:foo="un-deux-trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<q a:foo="un-second-deuxieme-trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:foo="un-d-trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:foo="un-d-trois" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-107b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-107b.xml
deleted file mode 100644
index fb8d7c82e91..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-107b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Attribute dash-separated value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="107b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[*|lang|="en"], *|*[a|foo|="un-d"] { background-color : red }
-</cssrules>
-
-<code>
-<p lang="en-us" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background</p>
-<q a:foo="un-deux-trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<q a:foo="un-second-deuxieme-trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:foo="un-d-trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:foo="un-d-trois" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-108.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-108.xml
deleted file mode 100644
index 790435a2d5d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-108.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on beginning with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="108" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : red }
-*|*[*|title^="si on"] { background-color : lime }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-108b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-108b.xml
deleted file mode 100644
index cea8ca41d22..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-108b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on beginning with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="108b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : lime ! important }
-*|*[*|title^="si on"] { background-color : red }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-109.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-109.xml
deleted file mode 100644
index da0cdb5c06b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-109.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on end with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="109" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : red }
-*|*[*|title$="tait"] { background-color : lime }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-109b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-109b.xml
deleted file mode 100644
index 41914e08b8e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-109b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on end with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="109b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : lime ! important }
-*|*[*|title$="tait"] { background-color : red }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-11.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-11.xml
deleted file mode 100644
index 6a8ef38babf..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-11.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Substring matching attribute selector (contains)" module="W3C Selectors" modulename="css3-modsel" number="11" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { background-color : red }
-p[title*="bar"] { background-color : lime }</cssrules>
-
-<code>
-<p title="foobarufoo" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background because
-its title attribute contains "bar"</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-110.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-110.xml
deleted file mode 100644
index a6c13036a2f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-110.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on middle with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="110" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : red }
-*|*[*|title*="on ch"] { background-color : lime }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-110b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-110b.xml
deleted file mode 100644
index 07b5bd816de..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-110b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on middle with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="110b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : lime ! important }
-*|*[*|title*="on ch"] { background-color : red }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-111.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-111.xml
deleted file mode 100644
index 4d22762c22c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-111.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Attribute existence selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="111" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[|title] { background-color : lime }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background</p>
-<q a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background</r>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-111b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-111b.xml
deleted file mode 100644
index 530c32ae772..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-111b.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Attribute existence selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="111b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[|title] { background-color : red }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background</p>
-<q a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background</r>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-112.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-112.xml
deleted file mode 100644
index d8976209589..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-112.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="112" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[|title="si on chantait"] { background-color : lime }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-112b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-112b.xml
deleted file mode 100644
index e4ad26641ef..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-112b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="112b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[|title="si on chantait"] { background-color : red }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-113.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-113.xml
deleted file mode 100644
index cc6d62375b2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-113.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="Attribute space-separated value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="113" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
-*|p, *|q { background-color : red }
-*|*[|class~="foo"] { background-color : lime }</cssrules>
-
-<code>
-<p class="bar foo toto" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<address class="bar foofoo toto" xmlns="http://www.w3.org/1999/xhtml">This address should be unstyled.</address>
-<q class="bar foo toto" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r b:class="bar foo toto" xmlns="http://www.example.org/b">This paragraph should be unstyled.</r>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-113b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-113b.xml
deleted file mode 100644
index 5c345804b2a..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-113b.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="Attribute space-separated value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="113b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
-*|p, *|q { background-color : lime ! important }
-*|*[|class~="foo"] { background-color : red }</cssrules>
-
-<code>
-<p class="bar foo toto" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<address class="bar foofoo toto" xmlns="http://www.w3.org/1999/xhtml">This address should be unstyled.</address>
-<q class="bar foo toto" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r b:class="bar foo toto" xmlns="http://www.example.org/b">This paragraph should be unstyled.</r>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-114.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-114.xml
deleted file mode 100644
index 0524450449c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-114.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute dash-separated value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="114" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
-*|p, *|q { background-color : red }
-*|*[|lang|="foo-bar"], *|*[|myattr|="tat-tut"] { background-color : lime }</cssrules>
-
-<code>
-<p lang="foo-bar" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<address lang="foo-b" xmlns="http://www.w3.org/1999/xhtml">This address should be unstyled.</address>
-<address lang="foo-barbar-toto" xmlns="http://www.w3.org/1999/xhtml">This address should be unstyled.</address>
-<q myattr="tat-tut-tot" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r b:myattr="tat-tut-tot" xmlns="http://www.example.org/b">This paragraph should be unstyled.</r>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-114b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-114b.xml
deleted file mode 100644
index 15eb9a56702..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-114b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute dash-separated value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="114b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
-*|p, *|q { background-color : lime ! important }
-*|*[|lang|="foo-bar"], *|*[|myattr|="tat-tut"] { background-color : red }</cssrules>
-
-<code>
-<p lang="foo-bar" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<address lang="foo-b" xmlns="http://www.w3.org/1999/xhtml">This address should be unstyled.</address>
-<address lang="foo-barbar-toto" xmlns="http://www.w3.org/1999/xhtml">This address should be unstyled.</address>
-<q myattr="tat-tut-tot" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r b:myattr="tat-tut-tot" xmlns="http://www.example.org/b">This paragraph should be unstyled.</r>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-115.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-115.xml
deleted file mode 100644
index fc7c1ddcbce..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-115.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on beginning without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="115" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[|title^="si on"] { background-color : lime }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-115b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-115b.xml
deleted file mode 100644
index 9d35f3a9123..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-115b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on beginning without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="115b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[|title^="si on"] { background-color : red }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-116.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-116.xml
deleted file mode 100644
index 6cb57a475b0..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-116.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on end without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="116" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[|title$="tait"] { background-color : lime }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-116b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-116b.xml
deleted file mode 100644
index c6ee055bd3f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-116b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on end without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="116b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[|title$="tait"] { background-color : red }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-117.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-117.xml
deleted file mode 100644
index 162692dbd8a..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-117.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on middle without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="117" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[|title*="on ch"] { background-color : lime }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-117b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-117b.xml
deleted file mode 100644
index 18b49772a59..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-117b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Substring matching attribute selector on middle without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="117b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[|title*="on ch"] { background-color : red }</cssrules>
-
-<code>
-<p title="si on chantait" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should be unstyled.</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-118.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-118.xml
deleted file mode 100644
index 9179fc63b7e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-118.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def="NEGATED type element selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="118" rev="1.2" date="30-july-2002" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace html url(http://www.w3.org/1999/xhtml);
-@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-*|p, *|l { display : block ; margin-bottom : 1em }
-div.test * { background-color : red }
-div.test *:not(a|p) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="test" xmlns="http://www.w3.org/1999/xhtml">
- <p xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
- <p xmlns="http://www.example.org/b">This paragraph should have a green background.</p>
- <p xmlns="">This paragraph should have a green background.</p>
- <p xmlns="http://www.example.org/a">
- <l>This paragraph should have a green background.</l>
- </p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-119.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-119.xml
deleted file mode 100644
index 17ca9382442..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-119.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<csstest def="NEGATED type element selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="119" rev="1.2" date="30-july-2002" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace html url(http://www.w3.org/1999/xhtml);
-@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.test *:not(*|div) { display : block ; margin-bottom : 1em ;
- background-color : red }
-div.test &gt; *:not(*|p):not(*|div) { background-color : lime }
-div.stub &gt; *:not(*|div) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="test" xmlns="http://www.w3.org/1999/xhtml">
-<div class="stub">
-<p>This paragraph should have a green background.</p>
-<p xmlns="http://www.example.org/b">This paragraph should have a green background.</p>
-<p xmlns="">This paragraph should have a green background.</p>
-<p xmlns="http://www.example.org/a">This paragraph should have a green background.</p>
-</div>
-<address>This address should have a green background.</address>
-<s xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t xmlns="">This paragraph should have a green background.</t>
-<u xmlns="http://www.example.org/a">This paragraph should have a green background.</u>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-12.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-12.xml-removed
deleted file mode 100644
index 7e5efa12b08..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-12.xml-removed
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Default attribute value" module="W3C Selectors" modulename="css3-modsel" number="12" rev="1.1" date="21-june-2003" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>form { background-color : lime }
-form[method] { background-color : red }
-form[method="get"] { background-color : red }</cssrules>
-<code>
-<form action="http://www.example.org/foo.cgi" xmlns="http://www.w3.org/1999/xhtml">
-<p>The line should have a green background.</p>
-</form>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-120.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-120.xml
deleted file mode 100644
index 536153b5624..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-120.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def="NEGATED type element selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="120" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace html url(http://www.w3.org/1999/xhtml);
-@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.stub &gt; * { display : block ; margin-bottom : 1em ;
- background-color : red }
-div.stub &gt; *:not(|p) { background-color : lime }
-div.stub &gt; *|l &gt; *:not(|p) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p>This paragraph should have a green background</p>
-<p xmlns="http://www.example.org/b">This paragraph should have a green background</p>
-<l xmlns="http://www.example.org/b">
-<p xmlns="">This paragraph should have a
- green background</p>
-</l>
-<p xmlns="http://www.example.org/a">This paragraph should have a green background</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-121.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-121.xml
deleted file mode 100644
index 28705a986a4..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-121.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<csstest def="NEGATED universal selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="121" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace html url(http://www.w3.org/1999/xhtml);
-@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.stub &gt; *|* { color : red ; display : block ;
- margin-bottom : 1em }
-div.stub &gt; *|*:not(a|*) { color : green }
-div.stub v { color : green }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<address>This address should be in green characters.</address>
-<s xmlns="http://www.example.org/b">This paragraph should be in green characters.</s>
-<t xmlns="">This paragraph should be in green characters.</t>
-<u xmlns="http://www.example.org/a">
-<v>This paragraph should be in green characters.</v>
-</u>
-</div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-122.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-122.xml
deleted file mode 100644
index 648983399be..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-122.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED universal selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="122" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace html url(http://www.w3.org/1999/xhtml);
-@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.stub &gt; *|* { background-color : lime ; display : block ;
- margin-bottom : 1em }
-div.stub &gt; *|*:not(*|*) { background-color : red }
-/* yes, the rule just above selects nothing... That's the point */
-</cssrules>
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<address>This address should have a green background</address>
-<s xmlns="http://www.example.org/b">This paragraph should have a green background</s>
-<t xmlns="">This paragraph should have a green background</t>
-<u xmlns="http://www.example.org/a">This paragraph should have a green background</u>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-123.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-123.xml
deleted file mode 100644
index e9f541cf368..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-123.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED universal selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="123" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace html url(http://www.w3.org/1999/xhtml);
-@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.stub &gt; *|* { color : red ; display : block ;
- margin-bottom : 1em }
-div.stub &gt; *|*:not(|*) { color : green }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<address>This address should be in green characters.</address>
-<s xmlns="http://www.example.org/b">This paragraph should be in green characters.</s>
-<u xmlns="http://www.example.org/a">This paragraph should be in green characters.</u>
-</div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-123b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-123b.xml
deleted file mode 100644
index 1cd2ae359ae..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-123b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="NEGATED universal selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="123b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace html url(http://www.w3.org/1999/xhtml);
-@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.stub &gt; *|* { color : green ; display : block ;
- margin-bottom : 1em }
-div.stub &gt; *|*:not(|*) { color : red ! important }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<t xmlns="">This paragraph should be in green characters.</t>
-</div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-124.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-124.xml
deleted file mode 100644
index 6d7fc65024b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-124.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="124" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : red }
-div.stub *:not([a|title="foo"]) {background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="foo">This paragraph should have a green background.</p>
-<q a:title="foo" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<s a:title="foobar" xmlns="http://www.example.org/a">This paragraph should have a green background.</s>
-<r b:title="foo" xmlns="http://www.example.org/b">This paragraph should have a green background.</r>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-124b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-124b.xml
deleted file mode 100644
index 1a4f8633896..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-124b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="124b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r, *|s { background-color : lime ! important }
-div.stub *:not([a|title="foo"]) {background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="foo">This paragraph should have a green background.</p>
-<q a:title="foo" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<s a:title="foobar" xmlns="http://www.example.org/a">This paragraph should have a green background.</s>
-<r b:title="foo" xmlns="http://www.example.org/b">This paragraph should have a green background.</r>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-125.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-125.xml
deleted file mode 100644
index 0365c2a4421..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-125.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute space-separated value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="125" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : red }
-div.stub *|*:not([a|foo~="bar"]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:foo="hgt bardot f" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:foo="hgt bar f" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:foo="hgt bar f" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-125b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-125b.xml
deleted file mode 100644
index 25cf9336304..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-125b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute space-separated value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="125b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : lime ! important }
-div.stub *|*:not([a|foo~="bar"]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:foo="hgt bardot f" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:foo="hgt bar f" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:foo="hgt bar f" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-126.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-126.xml
deleted file mode 100644
index 57bfd40d6cb..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-126.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute dash-separated value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="126" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : red }
-div.stub *|*:not([a|foo|="bar"]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:foo="bargain-trash" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:foo="bar-drink-glass" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:foo="bar-drink-glass" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-126b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-126b.xml
deleted file mode 100644
index 3d200684d4e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-126b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute dash-separated value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="126b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : lime ! important }
-div.stub *|*:not([a|foo|="bar"]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:foo="bargain-trash" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:foo="bar-drink-glass" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:foo="bar-drink-glass" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-127.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-127.xml
deleted file mode 100644
index b9d4d717c47..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-127.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Substring matching attribute value selector on beginning with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="127" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : red }
-div.stub *|*:not([a|title^="si on"]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="et si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-127b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-127b.xml
deleted file mode 100644
index aeed223c2b3..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-127b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Substring matching attribute value selector on beginning with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="127b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : lime ! important }
-div.stub *|*:not([a|title^="si on"]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="et si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-128.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-128.xml
deleted file mode 100644
index b7095d1ff83..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-128.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Substring matching attribute value selector on end with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="128" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : red }
-div.stub *|*:not([a|title$="tait"]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-128b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-128b.xml
deleted file mode 100644
index ec336c02bda..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-128b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Substring matching attribute value selector on end with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="128b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : lime ! important }
-div.stub *|*:not([a|title$="tait"]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-129.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-129.xml
deleted file mode 100644
index 7b035992d3f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-129.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Substring matching attribute value selector on middle with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="129" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : red }
-div.stub *|*:not([a|title*="hanta"]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-129b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-129b.xml
deleted file mode 100644
index 80ea9377d0c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-129b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Substring matching attribute value selector on middle with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="129b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|s { background-color : lime ! important }
-div.stub *|*:not([a|title*="hanta"]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-13.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-13.xml
deleted file mode 100644
index 9fbd1d596ad..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-13.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="Class selectors" module="W3C Selectors" modulename="css3-modsel" number="13" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>li { background-color : red }
-.t1 { background-color : lime }
-li.t2 { background-color : lime }
-.t3 { background-color : red }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li class="t1">This list item should have green background because its class is "t1"</li>
- <li class="t2">This list item should have green background because its class is "t2"</li>
- <li class="t2">
-<span class="t33">This list item should have green background because
- the inner SPAN does not match SPAN.t3</span>
-</li>
-</ul>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-130.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-130.xml
deleted file mode 100644
index 89758646f3f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-130.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute existence selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="130" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q { background-color : red }
-div.stub *|*:not([*|title]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:foo="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-130b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-130b.xml
deleted file mode 100644
index cbbc27506ef..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-130b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute existence selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="130b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q { background-color : lime ! important }
-div.stub *|*:not([*|title]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:foo="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-131.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-131.xml
deleted file mode 100644
index 7796e77ab18..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-131.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Attribute value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="131" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q { background-color : red }
-div.stub *|*:not([*|title="si on chantait"]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:foo="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-131b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-131b.xml
deleted file mode 100644
index 20bebae23f7..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-131b.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Attribute value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="131b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q { background-color : lime ! important }
-div.stub *|*:not([*|title="si on chantait"]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:foo="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-132.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-132.xml
deleted file mode 100644
index 93b657592a9..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-132.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<csstest def="NEGATED Attribute space-separated value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="132" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p.deu, *|q { background-color : red }
-div.stub html|*:not([*|class~="deux"]),
- div.stub *|*:not(html|*):not([*|foo~="deux"]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p class="un deux trois">This paragraph should be unstyled</p>
-<p class="un deu trois">This paragraph should have a green background.</p>
-<q a:bar="un deux trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<q a:foo="un second deuxieme trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:foo="un deux trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:foo="un deux trois" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-132b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-132b.xml
deleted file mode 100644
index bdfc4b01162..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-132b.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<csstest def="NEGATED Attribute space-separated value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="132b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p.deu, *|q { background-color : lime ! important }
-div.stub html|*:not([*|class~="deux"]),
- div.stub *|*:not(html|*):not([*|foo~="deux"]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p class="un deux trois">This paragraph should be unstyled</p>
-<p class="un deu trois">This paragraph should have a green background.</p>
-<q a:bar="un deux trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<q a:foo="un second deuxieme trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:foo="un deux trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:foo="un deux trois" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-133.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-133.xml
deleted file mode 100644
index aac7b33aaba..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-133.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<csstest def="NEGATED Attribute dash-separated value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="133" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p.foo, *|q, *|s { background-color : red }
-div.stub html|*:not([*|lang|="en"]),
- div.stub *|*:not(html|*):not([a|foo|="un-d"]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p lang="en-us">This paragraph should be unstyled.</p>
-<p lang="fr" class="foo">This paragraph should have a green background.</p>
-<q a:foo="un-deux-trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<q a:foo="un-second-deuxieme-trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:foo="un-d-trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:foo="un-d-trois" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-133b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-133b.xml
deleted file mode 100644
index bbee1b9fdd4..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-133b.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<csstest def="NEGATED Attribute dash-separated value selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="133b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p.foo, *|q, *|s { background-color : lime ! important }
-div.stub html|*:not([*|lang|="en"]),
- div.stub *|*:not(html|*):not([a|foo|="un-d"]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p lang="en-us">This paragraph should be unstyled.</p>
-<p lang="fr" class="foo">This paragraph should have a green background.</p>
-<q a:foo="un-deux-trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<q a:foo="un-second-deuxieme-trois" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:foo="un-d-trois" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:foo="un-d-trois" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-134.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-134.xml
deleted file mode 100644
index 0786e24af66..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-134.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on beginning with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="134" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p.red, *|q, *|t { background-color : red }
-div.stub *|*:not([*|title^="si on"]) { background-color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<p title="si il chantait" class="red">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-134b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-134b.xml
deleted file mode 100644
index e526178e312..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-134b.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on beginning with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="134b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p.red, *|q, *|t { background-color : lime ! important }
-div.stub *|*:not([*|title^="si on"]) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<p title="si il chantait" class="red">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-135.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-135.xml
deleted file mode 100644
index 6f07a3f0572..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-135.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on end with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="135" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p.red, *|q, *|t { background-color : red }
-div.stub *|*:not([*|title$="tait"]) { background-color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<p title="si tu chantais" class="red">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-135b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-135b.xml
deleted file mode 100644
index be2ffab1605..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-135b.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on end with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="135b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p.red, *|q, *|t { background-color : lime ! important }
-div.stub *|*:not([*|title$="tait"]) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<p title="si tu chantais" class="red">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-136.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-136.xml
deleted file mode 100644
index e5b9be82129..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-136.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on middle with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="136" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p.red, *|q, *|t { background-color : red }
-div.stub *|*:not([*|title*="on ch"]) { background-color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<p title="si il chantait" class="red">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-136b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-136b.xml
deleted file mode 100644
index df0a18c7c22..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-136b.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on middle with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="136b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|p.red, *|q, *|t { background-color : lime ! important }
-div.stub *|*:not([*|title*="on ch"]) { background-color : red }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<p title="si il chantait" class="red">This paragraph should have a green background.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-137.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-137.xml
deleted file mode 100644
index 449365b2f02..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-137.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="NEGATED Attribute existence selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="137" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|q, *|r { display : block ; margin-bottom : 1em }
-*|q { background-color : red }
-div.stub *|*:not([|title]) { background-color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-137b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-137b.xml
deleted file mode 100644
index 01570504e4e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-137b.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="NEGATED Attribute existence selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="137b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|q, *|r { display : block ; margin-bottom : 1em }
-*|q { background-color : lime ! important }
-div.stub *|*:not([|title]) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-138.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-138.xml
deleted file mode 100644
index ef64af1ce58..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-138.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="138" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|q, *|s, *|t { background-color : red }
-div.stub *|*:not([|title="si on chantait"]) { background-color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-138b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-138b.xml
deleted file mode 100644
index 1723302997b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-138b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="138b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|q, *|s, *|t { background-color : lime ! important }
-div.stub *|*:not([|title="si on chantait"]) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q a:title="si on chantait" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-139.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-139.xml
deleted file mode 100644
index e06aa60f557..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-139.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute space-separated value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="139" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
-*|address, *|r { background-color : red }
-div.stub *|*:not([|class~="foo"]) { background-color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p class="bar foo toto">This paragraph should be unstyled.</p>
-<address class="bar foofoo toto">This address should have a green background.</address>
-<q class="bar foo toto" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r b:class="bar foo toto" xmlns="http://www.example.org/b">This paragraph should have a green background.</r>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-139b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-139b.xml
deleted file mode 100644
index d60f7180489..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-139b.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED Attribute space-separated value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="139b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
-*|address, *|r { background-color : lime ! important }
-div.stub *|*:not([|class~="foo"]) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p class="bar foo toto">This paragraph should be unstyled.</p>
-<address class="bar foofoo toto">This address should have a green background.</address>
-<q class="bar foo toto" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r b:class="bar foo toto" xmlns="http://www.example.org/b">This paragraph should have a green background.</r>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14.xml
deleted file mode 100644
index d570a2e50e2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<csstest def="More than one class selector" module="W3C Selectors" modulename="css3-modsel" number="14" rev="1.2" date="22-june-2003" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { background-color : red ; border : thick solid red ; padding : 1em }
-p.t1 { background-color : lime }
-p.t2 { border : thick solid green }
-
-div { background: green; color: white; }
-div.teST { background: red; color: yellow; }
-div.te { background: red; color: yellow; }
-div.st { background: red; color: yellow; }
-div.te.st { background: red; color: yellow; }</cssrules>
-
-<code>
-
-<p class="t1 t2" xmlns="http://www.w3.org/1999/xhtml">This paragraph
-should have a green background and a green thick solid border because
-it carries both classes t1 and t2.</p>
-
-<div class="test" xmlns="http://www.w3.org/1999/xhtml">This line
-should be green.</div>
-
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-140.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-140.xml
deleted file mode 100644
index 5dc99e07ce1..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-140.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Attribute dash-separated value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="140" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
-*|address, *|r { background-color : red }
-div.stub *|*:not([|lang|="foo-bar"]) { background-color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p lang="foo-bar">This paragraph should be unstyled.</p>
-<address lang="foo-b">This address should have a green background.</address>
-<address lang="foo-barbar-toto">This address should have a green background.</address>
-<q lang="foo-bar" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r b:lang="foo-bar" xmlns="http://www.example.org/b">This paragraph should have a green background.</r>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-140b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-140b.xml
deleted file mode 100644
index 93b811a004d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-140b.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Attribute dash-separated value selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="140b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
-*|address, *|r { background-color : lime ! important }
-div.stub *|*:not([|lang|="foo-bar"]) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p lang="foo-bar">This paragraph should be unstyled.</p>
-<address lang="foo-b">This address should have a green background.</address>
-<address lang="foo-barbar-toto">This address should have a green background.</address>
-<q lang="foo-bar" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
-<r b:lang="foo-bar" xmlns="http://www.example.org/b">This paragraph should have a green background.</r>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-141.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-141.xml
deleted file mode 100644
index def596ab199..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-141.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on beginning without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="141" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|q, *|s, *|t { background-color : red }
-div.stub *|*:not([|title^="si on"]) { background-color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-141b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-141b.xml
deleted file mode 100644
index cc310d5135a..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-141b.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on beginning without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="141b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|q, *|s, *|t { background-color : lime ! important }
-div.stub *|*:not([|title^="si on"]) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t b:ti="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-142.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-142.xml
deleted file mode 100644
index 49bf0b7c588..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-142.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on end without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="142" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|q, *|s, *|t { background-color : red }
-div.stub *|*:not([|title$="tait"]) { background-color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-142b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-142b.xml
deleted file mode 100644
index 861e3f58a68..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-142b.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on end without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="142b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|q, *|s, *|t { background-color : lime ! important }
-div.stub *|*:not([|title$="tait"]) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-143.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-143.xml
deleted file mode 100644
index b9bddae77d6..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-143.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on middle without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="143" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|q, *|s, *|t { background-color : red }
-div.stub *|*:not([|title*="on ch"]) { background-color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-143b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-143b.xml
deleted file mode 100644
index b81f992559c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-143b.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def="NEGATED Substring matching attribute selector on middle without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="143b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
-*|q, *|s, *|t { background-color : lime ! important }
-div.stub *|*:not([|title*="on ch"]) { background-color : red }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p title="si on chantait">This paragraph should be unstyled.</p>
-<q a:title="si nous chantions" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
-<r title="si on chantait" xmlns="http://www.example.org/a">This paragraph should be unstyled.</r>
-<s b:title="si on chantait" xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
-<t title="si nous chantions" xmlns="http://www.example.org/b">This paragraph should have a green background.</t>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-144.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-144.xml
deleted file mode 100644
index 790d05f61ae..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-144.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="NEGATED :enabled:disabled pseudo-classes" module="W3C Selectors" modulename="css3-modsel" number="144" rev="1.0" date="12-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>div :not(:enabled):not(:disabled) { background: lime; }
-p { background : red;}</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <p>This paragraph should have a green background.</p>
- </div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-145a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-145a.xml
deleted file mode 100644
index 7ad7011c1d3..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-145a.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<csstest def=":nth-of-type() pseudo-class with hidden elements" module="W3C Selectors" modulename="css3-modsel" number="145a" rev="1.1" date="9-october-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- line { display: block; }
- [type~=odd] { background: red; }
- line:nth-of-type(odd) { background: lime; }
- [hidden] { display: none; }
-</cssrules>
-
-<code>
- <test xmlns="http://www.example.org/">
- <line type="odd">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd" hidden="hidden">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- <line type="even" hidden="hidden">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- <line type="even" hidden="hidden">This line should be unstyled.</line>
- <line type="odd" hidden="hidden">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- </test>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-145b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-145b.xml
deleted file mode 100644
index d55730b0652..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-145b.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<csstest def=":nth-of-type() pseudo-class with hidden elements" module="W3C Selectors" modulename="css3-modsel" number="145b" rev="1.1" date="9-october-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- line { display: block; }
- [type~=odd] { background: lime ! important; }
- line:nth-of-type(odd) { background: red; }
- [hidden] { display: none; }
-</cssrules>
-
-<code>
- <test xmlns="http://www.example.org/">
- <line type="odd">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd" hidden="hidden">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- <line type="even" hidden="hidden">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- <line type="even" hidden="hidden">This line should be unstyled.</line>
- <line type="odd" hidden="hidden">This line should be green.</line>
- <line type="even">This line should be unstyled.</line>
- <line type="odd">This line should be green.</line>
- </test>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-146a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-146a.xml
deleted file mode 100644
index 2e2f822568c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-146a.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<csstest def=":nth-child() pseudo-class with hidden elements" module="W3C Selectors" modulename="css3-modsel" number="146a" rev="1.1" date="9-october-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- line { display: block; }
- [type~=match] { background: red; }
- line:nth-child(3n-1) { background: lime; }
- [hidden] { display: none; }
-</cssrules>
-
-<code>
- <test xmlns="http://www.example.org/">
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="" hidden="hidden">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="" hidden="hidden">This line should be unstyled.</line>
- <line type="match" hidden="hidden">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- </test>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-146b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-146b.xml
deleted file mode 100644
index b8ac8243969..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-146b.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<csstest def=":nth-child() pseudo-class with hidden elements" module="W3C Selectors" modulename="css3-modsel" number="146b" rev="1.1" date="9-october-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- line { display: block; }
- [type~=match] { background: lime ! important; }
- line:nth-child(3n-1) { background: red; }
- [hidden] { display: none; }
-</cssrules>
-
-<code>
- <test xmlns="http://www.example.org/">
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="" hidden="hidden">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="" hidden="hidden">This line should be unstyled.</line>
- <line type="match" hidden="hidden">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- </test>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-147a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-147a.xml
deleted file mode 100644
index 70bab9788b9..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-147a.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<csstest def=":nth-last-of-type() pseudo-class with collapsed elements" module="W3C Selectors" modulename="css3-modsel" number="147a" rev="1.2" date="10-october-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- line { display: block; }
- [type~=match] { background: red; }
- line:nth-last-of-type(3n-1) { background: lime; }
- [hidden] { visibility: collapse; }
-</cssrules>
-
-<code>
- <test xmlns="http://www.example.org/">
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match" hidden="hidden">This line should be green.</line>
- <line type="" hidden="hidden">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="" hidden="hidden">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- </test>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-147b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-147b.xml
deleted file mode 100644
index 3791bdd4a7e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-147b.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<csstest def=":nth-last-of-type() pseudo-class with collapsed elements" module="W3C Selectors" modulename="css3-modsel" number="147b" rev="1.2" date="10-october-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- line { display: block; }
- [type~=match] { background: lime ! important; }
- line:nth-last-of-type(3n-1) { background: red; }
- [hidden] { visibility: collapse; }
-</cssrules>
-
-<code>
- <test xmlns="http://www.example.org/">
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match" hidden="hidden">This line should be green.</line>
- <line type="" hidden="hidden">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="" hidden="hidden">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- <line type="">This line should be unstyled.</line>
- <line type="match">This line should be green.</line>
- <line type="">This line should be unstyled.</line>
- </test>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-148.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-148.xml
deleted file mode 100644
index da1756f509c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-148.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def=":empty pseudo-class and text" module="W3C Selectors" modulename="css3-modsel" number="148" rev="1.0" date="15-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- p:empty { background: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-149.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-149.xml
deleted file mode 100644
index 1c20641cd2d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-149.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def=":empty pseudo-class and empty elements" module="W3C Selectors" modulename="css3-modsel" number="149" rev="1.0" date="15-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- address:empty { background: lime; }
- address { background: red; margin: 0; height: 1em; }
- .text { margin: -1em 0 0 0; }
-</cssrules>
-
-<code>
- <address xmlns="http://www.w3.org/1999/xhtml"/>
- <div class="text" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-149b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-149b.xml
deleted file mode 100644
index c883ff0d546..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-149b.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def=":empty pseudo-class and empty elements" module="W3C Selectors" modulename="css3-modsel" number="149b" rev="1.0" date="15-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- address:empty { background: lime; }
- address { background: red; margin: 0; height: 1em; }
- .text { margin: -1em 0 0 0; }
-</cssrules>
-
-<code>
- <address xmlns="http://www.w3.org/1999/xhtml"></address>
- <div class="text" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14b.xml
deleted file mode 100644
index fd9801f55c7..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="More than one class selector" module="W3C Selectors" modulename="css3-modsel" number="14b" rev="1.1" date="27-april-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { background: green; color: white; }
-.t1.fail { background: red; color: yellow; }
-.fail.t1 { background: red; color: yellow; }
-.t2.fail { background: red; color: yellow; }
-.fail.t2 { background: red; color: yellow; }
-/* Note: This is a valid test even per CSS1, since in CSS1 those rules
- are invalid and should be dropped. */
-</cssrules>
-
-<code>
- <p class="t1" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</p>
- <p class="t1 t2" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14c.xml
deleted file mode 100644
index 7e0946dcb8f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14c.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="More than one class selector" module="W3C Selectors" modulename="css3-modsel" number="14c" rev="1.0" date="6-december-2002" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { background: red; color: yellow; }
-p.t1.t2 { background: green; color: white; }
-div { background: green; color: white; }
-div.t1 { background: red; color: yellow; }
-address { background: red; color: yellow; }
-address.t5.t5 { background: green; color: white; }
-</cssrules>
-
-<code>
- <p class="t1 t2" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</p>
- <div class="t3" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</div>
- <address class="t4 t5 t6" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</address>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14d.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14d.xml
deleted file mode 100644
index 2623cc919ae..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14d.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="NEGATED More than one class selector" module="W3C Selectors" modulename="css3-modsel" number="14d" rev="1.0" date="6-december-2002" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { background: green; color: white; }
-.t1:not(.t2) { background: red; color: yellow; }
-:not(.t2).t1 { background: red; color: yellow; }
-.t2:not(.t1) { background: red; color: yellow; }
-:not(.t1).t2 { background: red; color: yellow; }
-</cssrules>
-
-<code>
- <p class="t1 t2" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14e.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14e.xml
deleted file mode 100644
index 3cd4f29bc89..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-14e.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="NEGATED More than one class selector" module="W3C Selectors" modulename="css3-modsel" number="14e" rev="1.0" date="6-december-2002" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { background: green; color: white; }
-p:not(.t1):not(.t2) { background: red; color: yellow; }
-div { background: red; color: yellow; }
-div:not(.t1) { background: green; color: white; }
-address { background: green; color: white; }
-address:not(.t5):not(.t5) { background: red; color: yellow; }
-</cssrules>
-
-<code>
- <p class="t1 t2" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</p>
- <div class="t3" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</div>
- <address class="t4 t5 t6" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</address>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-15.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-15.xml
deleted file mode 100644
index 2821ea2ccdb..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-15.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="ID selectors" module="W3C Selectors" modulename="css3-modsel" number="15" rev="1.1" date="19-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>li { background-color : red }
-#t1 { background-color : lime }
-li#t2 { background-color : lime }
-li#t3 { background-color : lime }
-#t4 { background-color : red }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li id="t1">This list item should have a green background. because its ID is "t1"</li>
- <li id="t2">This list item should have a green background. because its ID is "t2"</li>
- <li id="t3"><span id="t44">This list item should have a green background. because the inner SPAN does not match "#t4"</span></li>
-</ul>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-150.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-150.xml
deleted file mode 100644
index 79455907d52..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-150.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def=":empty pseudo-class and XML/SGML constructs" module="W3C Selectors" modulename="css3-modsel" number="150" rev="1.1" date="24-april-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- address:empty { background: lime; }
- address { background: red; margin: 0; height: 1em; }
- .text { margin: -1em 0 0 0; }
-</cssrules>
-
-<code>
- <address xmlns="http://www.w3.org/1999/xhtml"><!-- --><?test random PI?></address>
- <div class="text" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</div>
- <p xmlns="http://www.w3.org/1999/xhtml">(Note: This test is based on unpublished errata.)</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-151.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-151.xml
deleted file mode 100644
index dee60a2045d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-151.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def=":empty pseudo-class and whitespace" module="W3C Selectors" modulename="css3-modsel" number="151" rev="1.0" date="15-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- address { background: lime; margin: 0; height: 1em; }
- address:empty { background: red; }
- .text { margin: -1em 0 0 0; }
-</cssrules>
-
-<code>
- <address xmlns="http://www.w3.org/1999/xhtml"> </address>
- <div class="text" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-152.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-152.xml
deleted file mode 100644
index 77d8ee55b29..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-152.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def=":empty pseudo-class and elements" module="W3C Selectors" modulename="css3-modsel" number="152" rev="1.0" date="15-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- address { background: lime; margin: 0; height: 1em; }
- address:empty { background: red; }
- .text { margin: -1em 0 0 0; }
-</cssrules>
-
-<code>
- <address xmlns="http://www.w3.org/1999/xhtml"><span/></address>
- <div class="text" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-153.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-153.xml
deleted file mode 100644
index b822c6acd84..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-153.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def=":empty pseudo-class and CDATA" module="W3C Selectors" modulename="css3-modsel" number="153" rev="1.1" date="24-april-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- address { background: red; margin: 0; height: 1em; display: block; }
- address:empty { background: lime; }
- .text { margin: -1em 0 0 0; }
-</cssrules>
-
-<code>
- <address xmlns="http://tests.example.org/xml-only/"><![CDATA[]]></address>
- <div class="text" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</div>
- <p xmlns="http://www.w3.org/1999/xhtml">(Note: This test is based on unpublished errata.)</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-154.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-154.xml
deleted file mode 100644
index 0f822776af5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-154.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="154" rev="1.0" date="20-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- p, { background: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155.xml
deleted file mode 100644
index cf9a6286976..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="155" rev="1.0" date="20-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- .5cm { background: red; }
-</cssrules>
-
-<code>
- <p class="5cm" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155a.xml
deleted file mode 100644
index 4c7f3531b0b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155a.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="155a" rev="1.0" date="27-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- .\5cm { background: red; }
-</cssrules>
-
-<code>
- <p class="5cm" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155b.xml
deleted file mode 100644
index 36ea99926b0..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155b.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="155b" rev="1.0" date="27-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- .two\ words { background: red; }
-
- /* the "." and "~=" forms match on a space separated list of words.
- In such a list, a word containing a space can never match, since it
- would by definition be two words. */
-
-</cssrules>
-
-<code>
- <p class="two words" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155c.xml
deleted file mode 100644
index ba42bf6b2b5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155c.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="155c" rev="1.0" date="27-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- .one.word { background: red; }
-</cssrules>
-
-<code>
- <p class="one.word" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155d.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155d.xml
deleted file mode 100644
index f604ceafac2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-155d.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="155d" rev="1.0" date="27-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- .one\.word { background: lime; }
- p { background: red; }
-</cssrules>
-
-<code>
- <p class="one.word" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-156.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-156.xml
deleted file mode 100644
index 9233997880e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-156.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="156" rev="1.0" date="20-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- foo &amp; address, p { background: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-156b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-156b.xml
deleted file mode 100644
index 149e6d0bcc2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-156b.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="156b" rev="1.0" date="20-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- foo &amp; address, p { background: red; }
- p { background: lime; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-156c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-156c.xml
deleted file mode 100644
index c5796d2930e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-156c.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="156c" rev="1.0" date="20-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- foo &amp; address, p { background: red ! important; }
- p { background: lime; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-157.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-157.xml
deleted file mode 100644
index 241b1d1aac5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-157.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="157" rev="1.0" date="20-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- [*=test] { background: red; }
-</cssrules>
-
-<code>
- <p class="test" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-158.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-158.xml
deleted file mode 100644
index e8b37afa4b2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-158.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Syntax and parsing" module="W3C Selectors" modulename="css3-modsel" number="158" rev="1.0" date="20-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- [*|*=test] { background: red; }
-</cssrules>
-
-<code>
- <p class="test" xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-159.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-159.xml
deleted file mode 100644
index 19d1de75ff2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-159.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def="Syntax and parsing of new pseudo-elements" module="W3C Selectors" modulename="css3-modsel" number="159" rev="1.0" date="20-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>
- ::selection { background: lime; }
- :selection { background: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">Try selecting some text in this document. It should be have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-15b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-15b.xml
deleted file mode 100644
index 07f9bc5e630..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-15b.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="Multiple ID selectors" module="W3C Selectors" modulename="css3-modsel" number="15b" rev="1.1" date="29-may-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { background: green; color: white; }
-#test#fail { background: red; color: yellow; }
-#fail#test { background: red; color: yellow; }
-#fail { background: red; color: yellow; }
-div { background: red; color: yellow; }
-#pass#pass { background: green; color: white; }
-</cssrules>
-
-<code>
- <p id="test" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</p>
- <div id="pass" xmlns="http://www.w3.org/1999/xhtml">This line should be green.</div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-15c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-15c.xml
deleted file mode 100644
index f5fd8ad6d57..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-15c.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<csstest def="Multiple IDs" module="W3C Selectors" modulename="css3-modsel" number="15c" rev="1.1" date="24-february-2005" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-.warning { color: navy; }
-div { color: red; }
-#Aone#Atwo, #Aone#Athree, #Atwo#Athree { color: green; }
-p { color: green; }
-#Bone#Btwo, #Bone#Bthree, #Btwo#Bthree { color: red; }
-#Cone#Ctwo, #Cone#Cthree, #Ctwo#Cthree { color: red; }
-#Done#Dtwo, #Done#Dthree, #Dtwo#Dthree { color: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" class="warning">This test requires support for two or more of XHTML, xml:id, and DOM3 Core.</p>
-<div xmlns="http://www.w3.org/1999/xhtml" id="Aone" xml:id="Atwo" title="Athree">This line should be green.</div>
- <p xmlns="http://www.w3.org/1999/xhtml" id="Bone" >This line should be green.</p>
- <p xmlns="http://www.w3.org/1999/xhtml" xml:id="Ctwo" >This line should be green.</p>
- <p xmlns="http://www.w3.org/1999/xhtml" title="Dthree">This line should be green.</p>
- <script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript">
- document.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'div')[0].setIdAttribute('title', true);
- document.getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'p')[3].setIdAttribute('title', true);
- </script>
- <!-- This test could also be done using a custom DOCTYPE with an internal subset, which would
- then work in any XHTML UA. However, that requires massive changes to the generator scripts.
- Better, if we need such a test, would be to special-case it and have 15d be a separate file. -->
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-16.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-16.xml
deleted file mode 100644
index ea4c9849b8a..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-16.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def=":link pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="16" rev="1.1" date="01-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<historyneeded/>
-
-<cssrules>p.test a { background-color : red }
-p.test *:link { background-color : lime }</cssrules>
-
-<code>
-<p class="test" xmlns="http://www.w3.org/1999/xhtml">
-<a href="http://unvisited.example.org/css3-modsel-16/">This link should have green background.</a>
-(Don't follow this link.)
-</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-160.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-160.xml
deleted file mode 100644
index 721d60af63f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-160.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def="Syntax and parsing of unknown pseudo-classes" module="W3C Selectors" modulename="css3-modsel" number="160" rev="1.0" date="20-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { background: lime; }
- p:subject { background: red; } /* this is not valid CSS, and if UAs
- implemented the experimental :subject pseudo-class they should have
- used the :-vnd-ident syntax. */
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-161.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-161.xml
deleted file mode 100644
index 285b4d2938e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-161.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<csstest def="Syntax and parsing of unknown pseudo-classes and pseudo-elements" module="W3C Selectors" modulename="css3-modsel" number="161" rev="1.2" date="9-november-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>
- p { background: lime; }
- p * { background: lime; }
- p > * { background: lime; }
- p + * { background: lime; }
- p ~ * { background: lime; }
-
- /* let's try some pseudos that are not valid CSS but are likely to
- be implemented as extensions in some UAs. These should not be
- recognised, as UAs implementing such extensions should use the
- :-vnd-ident syntax. */
-
- :canvas { background: red; }
- :viewport { background: red; }
- :window { background: red; }
- :menu { background: red; }
- :table { background: red; }
- :select { background: red; }
- ::canvas { background: red; }
- ::viewport { background: red; }
- ::window { background: red; }
- ::menu { background: red; }
- ::table { background: red; }
- ::select { background: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This line should have a green background.</p>
- <p xmlns="http://www.w3.org/1999/xhtml">
- UAs may render the following element as a pop up menu. If so, please ensure the menu is unstyled (or green).
- <select size="1">
- <option>This should</option>
- <option>have a green</option>
- <option>background.</option>
- </select>
- </p>
- <table xmlns="http://www.w3.org/1999/xhtml"><tr><td>This line should have a green background (or it might be unstyled).</td></tr></table>
- <!-- only allowed to be unstyled if + and ~ are not supported -->
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-162.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-162.xml-removed
deleted file mode 100644
index b81ef952c64..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-162.xml-removed
+++ /dev/null
@@ -1,97 +0,0 @@
-<csstest def="Contextual ::selection" module="W3C Selectors" modulename="css3-modsel" number="162" rev="1.1" date="29-may-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>
-
-<!--
- foo::selection matches the part of <foo> that has the selection.
- *::selection matches the parts of every element that have the selection.
-
- The following properties definitely apply to ::selection:
- color
- background-color
- outline
- cursor
- ?
-
- This is quite a thorough test IMHO. :-)
- -->
-
- td > div { border: solid thick black; padding: 1em; line-height: 2; }
- td > div > span { padding: 0.25em; }
-
- /* test version */
- .test > * { background: aqua; }
- .test > div > ::selection { outline: solid thick green; }
- .test > div > :nth-child(even)::selection { outline: solid thick yellow; }
- .test > div > :empty::selection { outline: solid thick blue; background: red; }
- .test > div *::selection { background: transparent; } /* applies to spans 4 to 6 and the strong */
- .test span:first-child::selection { background: white; } /* selects "Cascadable" */
- .test span[id=b]::selection { background: silver; } /* selects "Advanced" */
- .test #b + * + * { background: green; color: white; } /* affects "Selectors"'s span, whose selection inherits the background-color (next rule) */
- .test span[id=b] ~ ::selection { background: inherit; color: inherit; } /* selects "Tree", "Selectors" and "for CSS" but is overriden for "Tree" and "for CSS" */
- .test span[id=b] + ::selection { background: yellow; cursor: crosshair; } /* selects "Tree" */
- .test :not(#b):last-child::selection { background: transparent; } /* selects "for CSS" and "CSS" */
- .test ::selection { color: black; } /* applies to all spans and the strong */
- .test::selection { background: red ! important; } /* applies to the text in the cell and the div... so nothing. */
- .test::selection { color: red ! important; background: aqua; } /* should end up doing nothing - no text at that level and background is aqua is already the background */
- .test strong { color: red ! important; } /* should also end up doing nothing */
-
- /* control version */
- .control ::selection { background: transparent; color: inherit; cursor: inherit; outline: none; }
- .control > div { background: aqua; color: black; }
- .control > div > span { padding: 0; margin: 0.25em; }
- .control > div > span.a { background: white; }
- .control > div > span.b { background: silver; }
- .control > div > span.c { background: yellow; cursor: crosshair; }
- .control > div > span.d { background: green; color: white; padding: 0.25em; margin: 0; }
- .control > div > span.green { outline: solid thick green; }
- .control > div > span.yellow { outline: solid thick yellow; }
- .control > div > span.blue { outline: solid thick blue; background: red; }
-
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <p>Select everything in this document. The following two constructs
- (in the thick black borders) should end up looking identical. You
- should also check that the cursor is the same on equivalent parts
- (in particular the cursor should either be a crosshair over "Tree"
- and the default everywhere else, or the default everywhere).</p>
-
- <table>
- <tr>
- <td class="test">
-
- <div>
- <span>Cascadable</span>
- <span id="b">Advanced</span>
- <span>Tree</span>
- <span>Selectors</span>
- <span><!-- empty --></span>
- <span>for <strong>CSS</strong></span>
- </div>
-
- </td>
- <td class="control">
-
- <div>
- <span class="a green">Cascadable</span>
- <span class="b yellow">Advanced</span>
- <span class="c green">Tree</span>
- <span class="d yellow">Selectors</span>
- <span class="e blue"/>
- <span class="f yellow">for <strong>CSS</strong></span>
- </div>
-
- </td>
- </tr>
- </table>
- </div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-163.xml-disabled-contains-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-163.xml-disabled-contains-removed
deleted file mode 100644
index 88deffac63e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-163.xml-disabled-contains-removed
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Contextual :contains" module="W3C Selectors" modulename="css3-modsel" number="163" rev="1.0" date="21-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>
- .float { float: right; }
- :hover ~ :contains('green') { background: green; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" class="float">TEST</p>
- <p xmlns="http://www.w3.org/1999/xhtml">TEST</p>
- <p xmlns="http://www.w3.org/1999/xhtml"><strong>TEST</strong></p>
- <table xmlns="http://www.w3.org/1999/xhtml"><tr><td>TEST</td></tr></table>
- <p xmlns="http://www.w3.org/1999/xhtml">While you hover over any of the four instances of the word TEST above, this paragraph should turn green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-164.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-164.xml-removed
deleted file mode 100644
index 2c26d874176..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-164.xml-removed
+++ /dev/null
@@ -1,38 +0,0 @@
-<csstest def=":focus with ::selection" module="W3C Selectors" modulename="css3-modsel" number="164" rev="1.0" date="21-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>
- textarea { border: solid thick gray; }
- textarea:focus { border: solid thick green; }
- textarea::selection { background: silver; color: black; }
- textarea:focus::selection { background: lime; color: black; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml"><textarea rows="5" cols="70"
->Select some of this text, then change the focus around. While this
-text is focussed, the selection should be green. While the focus is
-elsewhere, the selection should be silver. The border should at all
-times be a darker colour than the selection's background. Repeat the
-test with everything selected.</textarea></p>
-
- <p xmlns="http://www.w3.org/1999/xhtml">CONFORMANCE NOTE: If the UA
- removes the selection when the focus leaves the text, which is also
- valid behaviour, then the description above is inaccurate. In these
- cases, the selection should disappear completely when the focus is
- moved, and when the focus is returned, the selection should not be
- in the same place as when focus was removed (typically, either the
- selection will be non-existent, or everything will be selected --
- but what is selected is independent of what was selected when the
- focus was removed).</p>
-
- <p xmlns="http://www.w3.org/1999/xhtml">If the selection is
- preserved, then the selection should NOT disappear when focus is
- removed, it should instead turn silver as described.</p>
-
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-165.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-165.xml-removed
deleted file mode 100644
index c2d16df2d79..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-165.xml-removed
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def=":hover with ::selection" module="W3C Selectors" modulename="css3-modsel" number="165" rev="1.0" date="21-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>
- p { border: solid thick gray; }
- p:hover { border: solid thick green; }
- p::selection { background: silver; color: black; }
- p:hover::selection { background: lime; color: black; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">Select some of this
- paragraph, then move your pointing device around. While it is above
- the paragraph, the selection should be green. While the pointing
- device is elsewhere, the selection should be silver. The
- paragraph's border should at all times be a darker colour than the
- selection's background. Repeat the test with everything
- selected.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-166.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-166.xml
deleted file mode 100644
index 2b5ede8f529..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-166.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def=":first-letter with ::first-letter" module="W3C Selectors" modulename="css3-modsel" number="166" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p:first-letter { background-color: red; }
- p::first-letter { background-color: lime; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">The first letter of this paragraph should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-166a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-166a.xml
deleted file mode 100644
index 141d6cfa09f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-166a.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def=":first-letter with ::first-letter" module="W3C Selectors" modulename="css3-modsel" number="166a" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p::first-letter { background-color: red; }
- p:first-letter { background-color: lime; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">The first letter of this paragraph should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-167.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-167.xml
deleted file mode 100644
index 28809de1351..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-167.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def=":first-line with ::first-line" module="W3C Selectors" modulename="css3-modsel" number="167" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p:first-line { background-color: red; }
- p::first-line { background-color: lime; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">The first line of this paragraph should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-167a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-167a.xml
deleted file mode 100644
index 1bff3b132ea..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-167a.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def=":first-line with ::first-line" module="W3C Selectors" modulename="css3-modsel" number="167a" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p::first-line { background-color: red; }
- p:first-line { background-color: lime; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">The first line of this paragraph should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-168.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-168.xml
deleted file mode 100644
index 9cc9bbebb13..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-168.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def=":before with ::before" module="W3C Selectors" modulename="css3-modsel" number="168" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- span:before { background-color: red; content: 'FAILED'; }
- span::before { background-color: lime; content: 'PASSED'; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This test has <span/>.</p>
- <p xmlns="http://www.w3.org/1999/xhtml">(If the previous line just reads "This test has ." then this test has failed.)</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-168a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-168a.xml
deleted file mode 100644
index 8332c3345c5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-168a.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def=":before with ::before" module="W3C Selectors" modulename="css3-modsel" number="168a" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- span::before { background-color: red; content: 'FAILED'; }
- span:before { background-color: lime; content: 'PASSED'; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This test has <span/>.</p>
- <p xmlns="http://www.w3.org/1999/xhtml">(If the previous line just reads "This test has ." then this test has failed.)</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-169.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-169.xml
deleted file mode 100644
index 0579bc96e60..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-169.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def=":after with ::after" module="W3C Selectors" modulename="css3-modsel" number="169" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- span:after { background-color: red; content: 'FAILED'; }
- span::after { background-color: lime; content: 'PASSED'; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This test has <span/>.</p>
- <p xmlns="http://www.w3.org/1999/xhtml">(If the previous line just reads "This test has ." then this test has failed.)</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-169a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-169a.xml
deleted file mode 100644
index f39e6b530bc..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-169a.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def=":after with ::after" module="W3C Selectors" modulename="css3-modsel" number="169a" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- span::after { background-color: red; content: 'FAILED'; }
- span:after { background-color: lime; content: 'PASSED'; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This test has <span/>.</p>
- <p xmlns="http://www.w3.org/1999/xhtml">(If the previous line just reads "This test has ." then this test has failed.)</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-17.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-17.xml
deleted file mode 100644
index 8203771cf1c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-17.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def=":visited pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="17" rev="1.1" date="01-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<historyneeded/>
-
-<cssrules>p.test a { background-color : red }
-p.test *:visited { background-color : lime }</cssrules>
-
-<code>
-<p class="test" xmlns="http://www.w3.org/1999/xhtml">
-<a href="http://www.w3.org/">You should see a green background assigned by the anchor.</a>
-(Note: You must have visited http://www.w3.org/ for this test to be valid.)
-</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170.xml
deleted file mode 100644
index 2feb3cf9c49..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Long chains of selectors" module="W3C Selectors" modulename="css3-modsel" number="170" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- span { color: red; }
- span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span { color: green } /* 2049 */
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml"><span>This line should be green.</span></p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170a.xml
deleted file mode 100644
index 749bb0709cd..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170a.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Long chains of selectors" module="W3C Selectors" modulename="css3-modsel" number="170a" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- .span { color: red; }
- .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span { color: green } /* 2049 */
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" class="span">This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170b.xml
deleted file mode 100644
index c0f6887cf09..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170b.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Long chains of selectors" module="W3C Selectors" modulename="css3-modsel" number="170b" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- .span { color: red; }
- .span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span { color: green } /* 2049 */
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" class="span">This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170c.xml
deleted file mode 100644
index b8c68bd6135..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170c.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Long chains of selectors" module="W3C Selectors" modulename="css3-modsel" number="170c" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p.span { color: red; }
- p:not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span) { color: green } /* 2049 */
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170d.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170d.xml
deleted file mode 100644
index 5d79d1ff45e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-170d.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Long chains of selectors" module="W3C Selectors" modulename="css3-modsel" number="170d" rev="1.0" date="1-january-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { color: red; }
- p:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child { color: green } /* 2049 */
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-171.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-171.xml
deleted file mode 100644
index df876299aa3..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-171.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def="Classes: XHTML global class attribute" module="W3C Selectors" modulename="css3-modsel" number="171" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { color: green; }
- .fail { color: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml">
- <span xhtml:class="fail">This should be green.</span>
- </p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-172a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-172a.xml
deleted file mode 100644
index a936ab7fdf0..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-172a.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<csstest def="Namespaced attribute selectors" module="W3C Selectors" modulename="css3-modsel" number="172a" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- tests, tests * { display: block; color: green; }
- testA[|attribute] { color: red; }
- testB[|attribute="fail"] { color: red; }
- testC[|attribute~="fail"] { color: red; }
- testD[|attribute^="fail"] { color: red; }
- testE[|attribute*="fail"] { color: red; }
- testF[|attribute$="fail"] { color: red; }
- testG[|attribute|="fail"] { color: red; }
-</cssrules>
-
-<code>
- <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
- <testA test:attribute="fail">This should be green.</testA>
- <testB test:attribute="fail">This should be green.</testB>
- <testC test:attribute="fail">This should be green.</testC>
- <testD test:attribute="fail">This should be green.</testD>
- <testE test:attribute="fail">This should be green.</testE>
- <testF test:attribute="fail">This should be green.</testF>
- <testG test:attribute="fail">This should be green.</testG>
- </tests>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-172b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-172b.xml
deleted file mode 100644
index ea3f3b54ad5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-172b.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<csstest def="Namespaced attribute selectors" module="W3C Selectors" modulename="css3-modsel" number="172b" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- @namespace url(http://css.example.net/);
- tests, tests * { display: block; color: green; }
- testA[|attribute] { color: red; }
- testB[|attribute="fail"] { color: red; }
- testC[|attribute~="fail"] { color: red; }
- testD[|attribute^="fail"] { color: red; }
- testE[|attribute*="fail"] { color: red; }
- testF[|attribute$="fail"] { color: red; }
- testG[|attribute|="fail"] { color: red; }
-</cssrules>
-
-<code>
- <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
- <testA test:attribute="fail">This should be green.</testA>
- <testB test:attribute="fail">This should be green.</testB>
- <testC test:attribute="fail">This should be green.</testC>
- <testD test:attribute="fail">This should be green.</testD>
- <testE test:attribute="fail">This should be green.</testE>
- <testF test:attribute="fail">This should be green.</testF>
- <testG test:attribute="fail">This should be green.</testG>
- </tests>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-173a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-173a.xml
deleted file mode 100644
index ee0c48cc4b4..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-173a.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<csstest def="Namespaced attribute selectors" module="W3C Selectors" modulename="css3-modsel" number="173a" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- tests, tests * { display: block; color: red; }
- testA[*|attribute] { color: green; }
- testB[*|attribute="pass"] { color: green; }
- testC[*|attribute~="pass"] { color: green; }
- testD[*|attribute^="pass"] { color: green; }
- testE[*|attribute*="pass"] { color: green; }
- testF[*|attribute$="pass"] { color: green; }
- testG[*|attribute|="pass"] { color: green; }
-</cssrules>
-
-<code>
- <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
- <testA test:attribute="pass">This should be green.</testA>
- <testB test:attribute="pass">This should be green.</testB>
- <testC test:attribute="pass">This should be green.</testC>
- <testD test:attribute="pass">This should be green.</testD>
- <testE test:attribute="pass">This should be green.</testE>
- <testF test:attribute="pass">This should be green.</testF>
- <testG test:attribute="pass">This should be green.</testG>
- </tests>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-173b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-173b.xml
deleted file mode 100644
index 4520c7c8f60..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-173b.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<csstest def="Namespaced attribute selectors" module="W3C Selectors" modulename="css3-modsel" number="173b" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- tests, tests * { display: block; color: red; }
- testA[*|attribute] { color: green; }
- testB[*|attribute="pass"] { color: green; }
- testC[*|attribute~="pass"] { color: green; }
- testD[*|attribute^="pass"] { color: green; }
- testE[*|attribute*="pass"] { color: green; }
- testF[*|attribute$="pass"] { color: green; }
- testG[*|attribute|="pass"] { color: green; }
-</cssrules>
-
-<code>
- <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
- <testA attribute="pass">This should be green.</testA>
- <testB attribute="pass">This should be green.</testB>
- <testC attribute="pass">This should be green.</testC>
- <testD attribute="pass">This should be green.</testD>
- <testE attribute="pass">This should be green.</testE>
- <testF attribute="pass">This should be green.</testF>
- <testG attribute="pass">This should be green.</testG>
- </tests>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-174a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-174a.xml
deleted file mode 100644
index 2593661e45d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-174a.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Attribute selectors with multiple attributes" module="W3C Selectors" modulename="css3-modsel" number="174a" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- tests, tests * { display: block; color: red; }
- testA[*|attribute="pass"] { color: green; }
- testB[*|attribute="pass"] { color: green; }
-</cssrules>
-
-<code>
- <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
- <testA attribute="pass" test:attribute="fail">This should be green.</testA>
- <testB attribute="fail" test:attribute="pass">This should be green.</testB>
- </tests>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-174b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-174b.xml
deleted file mode 100644
index a8dddce2b52..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-174b.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="NEGATED Attribute selectors with multiple attributes" module="W3C Selectors" modulename="css3-modsel" number="174b" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- tests, tests * { display: block; color: green }
- testA:not([*|attribute="pass"]) { color: red; }
- testB:not([*|attribute="pass"]) { color: red; }
-</cssrules>
-
-<code>
- <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
- <testA attribute="pass" test:attribute="fail">This should be green.</testA>
- <testB attribute="fail" test:attribute="pass">This should be green.</testB>
- </tests>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-175a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-175a.xml
deleted file mode 100644
index 6d74fd27a9d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-175a.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Parsing: Numbers in classes" module="W3C Selectors" modulename="css3-modsel" number="175a" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { color: green; }
- .13 { color: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" class="13">This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-175b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-175b.xml
deleted file mode 100644
index ea136a0cef3..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-175b.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Parsing: Numbers in classes" module="W3C Selectors" modulename="css3-modsel" number="175b" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { color: green; }
- .\13 { color: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" class="13">This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-175c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-175c.xml
deleted file mode 100644
index dabde06c883..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-175c.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Parsing: Numbers in classes" module="W3C Selectors" modulename="css3-modsel" number="175c" rev="1.0" date="20-september-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { color: red; }
- .\31 \33 { color: green; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" class="13">This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-176.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-176.xml
deleted file mode 100644
index b56202954fd..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-176.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Combinations: classes and IDs" module="W3C Selectors" modulename="css3-modsel" number="176" rev="1.0" date="6-december-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { background: red; color: yellow; }
-p:not(#other).class:not(.fail).test#id#id { background: green; color: white; }
-div { background: green; color: white; }
-div:not(#theid).class:not(.fail).test#theid#theid { background: red; color: yellow; }
-div:not(#other).notclass:not(.fail).test#theid#theid { background: red; color: yellow; }
-div:not(#other).class:not(.test).test#theid#theid { background: red; color: yellow; }
-div:not(#other).class:not(.fail).nottest#theid#theid { background: red; color: yellow; }
-div:not(#other).class:not(.fail).nottest#theid#other { background: red; color: yellow; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" id="id" class="class test">This line should be green.</p>
- <div xmlns="http://www.w3.org/1999/xhtml" id="theid" class="class test">This line should be green.</div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-177a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-177a.xml
deleted file mode 100644
index 27b39e8f06d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-177a.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="Parsing : vs ::" module="W3C Selectors" modulename="css3-modsel" number="177a" rev="1.0" date="22-june-2003" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>
- p:selection { color: yellow; background: red; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">When you select this text, it shouldn't go red.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-177b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-177b.xml
deleted file mode 100644
index fc78911553f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-177b.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def="Parsing : vs ::" module="W3C Selectors" modulename="css3-modsel" number="177b" rev="1.0" date="22-june-2003" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- div { color: green; }
- p::first-child { color: yellow; background: red; }
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <p>This line should be green.</p>
- </div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-178.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-178.xml
deleted file mode 100644
index fc37aedc761..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-178.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="Parsing: :not and pseudo-elements" module="W3C Selectors" modulename="css3-modsel" number="178" rev="1.0" date="22-june-2003" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- div { color: green; }
- p:not(:first-line) { color: yellow; background: red; }
- p:not(:after) { color: yellow; background: red; content: ' THIS TEST HAS FAILED! '; }
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <p>This line should be green.</p>
- </div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-179.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-179.xml
deleted file mode 100644
index d18dbbfc40d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-179.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="::first-line on inlines" module="W3C Selectors" modulename="css3-modsel" number="179" rev="1.0" date="29-february-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { color: green; }
- span:first-line { background: red; color: yellow; font-size: 4em; }
- span::first-line { background: red; color: yellow; font-size: 4em; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml"><span>This line should be green.</span></p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-179a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-179a.xml
deleted file mode 100644
index ff4361ab1ad..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-179a.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="::first-line after &lt;br&gt;" module="W3C Selectors" modulename="css3-modsel" number="179a" rev="1.0" date="29-february-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { color: green; }
- p:first-line { background: red; color: yellow; font-size: 4em; }
- p::first-line { background: red; color: yellow; font-size: 4em; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml"><br/>This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18.xml
deleted file mode 100644
index 72e8b4456cf..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<csstest def=":hover pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="18" rev="1.2" date="20-october-2005" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>p:hover { background-color : lime }
-a:hover { background-color : lime }
-
-tr:hover { background-color : green }
-td:hover { background-color : lime }
-
-table { border-spacing: 5px; }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">The background color of this paragraph should turn to green when
- the mouse pointer hovers either its text (<strong>here</strong>) or its whitespace background, <strong>here</strong>:</p>
-<address xmlns="http://www.w3.org/1999/xhtml">The background color of <a href="#foo">this anchor (<strong>here</strong>)</a> should turn to green when the pointing device hovers over it.</address>
-<table xmlns="http://www.w3.org/1999/xhtml">
- <tbody>
- <tr>
- <td>The cells in</td>
- <td>this table</td>
- <td>should go</td>
- </tr>
- <tr>
- <td>green when</td>
- <td>you hover</td>
- <td>the pointing</td>
- </tr>
- <tr>
- <td>device over</td>
- <td>them (<strong>here</strong>).</td>
- <td></td>
- </tr>
- <tr>
- <td>The rows in</td>
- <td>this table</td>
- <td>should go</td>
- </tr>
- <tr>
- <td>dark green</td>
- <td>when the</td>
- <td>pointing device</td>
- </tr>
- <tr>
- <td>is over the</td>
- <td>cells <strong>there</strong>:</td>
- <td></td> <!-- remove this cell to make an evil test; row should still go green, but cell should not -->
- </tr>
- <tr>
- <td>And <strong>here</strong>:</td>
- <td></td>
- <td>(blank cells).</td>
- </tr>
- </tbody>
-</table>
-</code>
-<!-- the row going green assumes that :hover is hierarchical, something that the spec
-explicitly does not require... -->
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-180.xml-disabled-because-we-want-to-allow-for-expansion b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-180.xml-disabled-because-we-want-to-allow-for-expansion
deleted file mode 100644
index 713e761b82f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-180.xml-disabled-because-we-want-to-allow-for-expansion
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="::first-letter on inlines" module="W3C Selectors" modulename="css3-modsel" number="180" rev="1.1" date="10-november-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { color: green; }
- span:first-letter { background: red; color: yellow; font-size: 4em; }
- span::first-letter { background: red; color: yellow; font-size: 4em; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml"><span>This line should be green.</span></p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-180a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-180a.xml
deleted file mode 100644
index e76bb43776e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-180a.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="::first-letter after &lt;br&gt;" module="W3C Selectors" modulename="css3-modsel" number="180a" rev="1.0" date="29-february-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- p { color: green; }
- p:first-letter { background: red; color: yellow; font-size: 4em; }
- p::first-letter { background: red; color: yellow; font-size: 4em; }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml"><br/>This line should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-181.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-181.xml
deleted file mode 100644
index 3eca72a32ed..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-181.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<csstest def="Case sensitivity" module="W3C Selectors" modulename="css3-modsel" number="181" rev="1.0" date="1-march-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- .cs { color: green; }
- .cs P { background: red; color: yellow; }
- .cs .a { background: red; color: yellow; }
- .cs .span1 span { background: red; color: yellow; }
- .cs .span2 { color: red; }
- .cs .span2 SPAN { color: green; }
- .cs .span2 span { background: red; color: yellow; }
- .ci { color: red; }
- .ci P { background: green; color: white; }
- .ci .a { background: green; color: white; }
- .ci .span1 span { background: green; color: white; }
- .ci .span2 SPAN { background: green; color: white; }
-</cssrules>
-
-<code xmlns:test="http://www.example.org/css3tests">
-<div xmlns="http://www.w3.org/1999/xhtml">
-<test:restrict for="xml xhtml">
- <div class="cs">
- <p>This line should be green.</p>
- <p class="A">This line should be green.</p>
- <p class="span1"><SPAN>This line should be green.</SPAN></p>
- <p class="span2"><SPAN>This line should be green.</SPAN></p>
- </div>
-</test:restrict>
-<test:restrict for="html">
- <div class="ci">
- <p>This line should be green.</p>
- <p class="A">This line should be green.</p>
- <p><SPAN>This line should be green.</SPAN></p>
- </div>
-</test:restrict>
-</div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-182.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-182.xml
deleted file mode 100644
index f8212bf1cca..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-182.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Namespaces and \: in selectors" module="W3C Selectors" modulename="css3-modsel" number="182" rev="1.0" date="2-march-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { color: green; }
-foo\:bar { background: red; color: yellow; }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">
-<foo:bar xmlns:foo="http://www.example.org/">
-This text should be green.
-</foo:bar>
-</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-183.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-183.xml
deleted file mode 100644
index 03de4bcaec5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-183.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Syntax and parsing of class selectors" module="W3C Selectors" modulename="css3-modsel" number="183" rev="1.0" date="24-april-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { color: green; }
-..test { background: red; color: yellow; }
-.foo..quux { background: red; color: yellow; }
-.bar. { background: red; color: yellow; }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml" class="test">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml" class=".test">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml" class="foo">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml" class="foo quux">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml" class="foo quux">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml" class=" bar ">This text should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184a.xml
deleted file mode 100644
index e6da5a1a984..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184a.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="Ends-with attribute selector with empty value" module="W3C Selectors" modulename="css3-modsel" number="184a" rev="1.0" date="30-october-2008" xmlns="http://www.example.org/css3tests">
-
-<author>Lachlan Hunt</author>
-
-<cssrules>
-p { color: lime; }
-p[class$=""] { color: red; }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml" class="">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184b.xml
deleted file mode 100644
index b2230ede04e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184b.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="Starts-with attribute selector with empty value" module="W3C Selectors" modulename="css3-modsel" number="184b" rev="1.0" date="30-october-2008" xmlns="http://www.example.org/css3tests">
-
-<author>Lachlan Hunt</author>
-
-<cssrules>
-p { color: lime; }
-p[class^=""] { color: red; }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml" class="">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184c.xml
deleted file mode 100644
index b04d4418510..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184c.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="Contains attribute selector with empty value" module="W3C Selectors" modulename="css3-modsel" number="184c" rev="1.0" date="30-october-2008" xmlns="http://www.example.org/css3tests">
-
-<author>Lachlan Hunt</author>
-
-<cssrules>
-p { color: lime; }
-p[class*=""] { color: red; }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml" class="">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184d.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184d.xml
deleted file mode 100644
index 4e38023ea42..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184d.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="NEGATED ends-with attribute selector with empty value" module="W3C Selectors" modulename="css3-modsel" number="184d" rev="1.0" date="30-october-2008" xmlns="http://www.example.org/css3tests">
-
-<author>Lachlan Hunt</author>
-
-<cssrules>
-p { color: red; }
-p:not([class$=""]) { color: lime; }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml" class="">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184e.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184e.xml
deleted file mode 100644
index 6f96b7f7765..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184e.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="NEGATED starts-with attribute selector with empty value" module="W3C Selectors" modulename="css3-modsel" number="184e" rev="1.0" date="30-october-2008" xmlns="http://www.example.org/css3tests">
-
-<author>Lachlan Hunt</author>
-
-<cssrules>
-p { color: red; }
-p:not([class^=""]) { color: lime; }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml" class="">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184f.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184f.xml
deleted file mode 100644
index a9593f8dc4f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-184f.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="NEGATED contains attribute selector with empty value" module="W3C Selectors" modulename="css3-modsel" number="184f" rev="1.0" date="30-october-2008" xmlns="http://www.example.org/css3tests">
-
-<author>Lachlan Hunt</author>
-
-<cssrules>
-p { color: red; }
-p:not([class*=""]) { color: lime; }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml" class="">This text should be green.</p>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18a.xml
deleted file mode 100644
index 70b168a3a5b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18a.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def=":hover pseudo-class on links" module="W3C Selectors" modulename="css3-modsel" number="18a" rev="1.0" date="29-february-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>
-p { color: navy; }
-
-.a a:hover { background: green; color: white; }
-
-.b a:hover { background: red; color: yellow; }
-.b a:link { background: green; color: white; }
-
-.c :link { background: green; color: white; }
-.c :visited:hover { background: red; color: yellow; }
-</cssrules>
-
-<code>
-<p class="a" xmlns="http://www.w3.org/1999/xhtml">The background color of <a href="#foo">this anchor (<strong>here</strong>)</a> should turn to green when the pointing device hovers over it.</p>
-<p class="b" xmlns="http://www.w3.org/1999/xhtml">The background color of <a href="#foo">this anchor (<strong>here</strong>)</a> should <strong>remain green when you hover it</strong>.</p>
-<p class="c" xmlns="http://www.w3.org/1999/xhtml">The background color of <a href="http://link.example.com/">this anchor (<strong>here</strong>)</a> should <strong>remain green when the pointing device hovers over it</strong> (do not follow that link).</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18b.xml
deleted file mode 100644
index b57cbfb25d0..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18b.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def=":hover pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="18b" rev="1.1" date="03-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>div:hover > p:first-child { background-color : lime }</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <p>The background color of this paragraph should turn to green when the mouse pointer hovers over any of the following:<br/><strong>This text.</strong></p>
- <p>This text.</p>
- <table><tr><td><table><tr><td><dl><dt>This text.</dt><dd>This text.</dd></dl></td></tr></table></td></tr><tr><td>This text.</td></tr></table>
- <p><sub>This text.</sub></p>
- <p>...and anything else between the top of the first paragraph and the bottom of this paragraph.</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18c.xml
deleted file mode 100644
index 3d28e24bfa2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-18c.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def=":hover pseudo-class on links" module="W3C Selectors" modulename="css3-modsel" number="18c" rev="1.0" date="29-february-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>
-:link, :visited { color: navy; text-decoration: none; }
-:link:hover span { background-color : lime }
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml"><a href="#foo">Hover <strong>here</strong> and the background of <span>this text should go green</span>.</a></p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-19.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-19.xml
deleted file mode 100644
index 5f348f242aa..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-19.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def=":active pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="19" rev="1.1" date="03-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>a:active { background-color : lime }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">The background color of <a href="#foo">the anchor</a>
- should turn to green when it is activated and come back to
- normal when it is released.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-19a.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-19a.xml-removed
deleted file mode 100644
index 138c1fab508..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-19a.xml-removed
+++ /dev/null
@@ -1,13 +0,0 @@
-<csstest def=":active pseudo-class on blocks" module="W3C Selectors" modulename="css3-modsel" number="19a" rev="1.0" date="29-february-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>p { color: navy; }
-p:active { background: red; color: yellow; font-size: 2em; }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">Clicking this paragraph should have no effect.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-19b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-19b.xml
deleted file mode 100644
index 9c3683c327c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-19b.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<csstest def=":active pseudo-class on controls" module="W3C Selectors" modulename="css3-modsel" number="19b" rev="1.0" date="29-february-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>button:active { background: green; color: white; }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml"><button>Activating (e.g. holding the mouse button down on) this button should make it go green.</button></p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-2.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-2.xml
deleted file mode 100644
index e06740a7d53..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-2.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<csstest def="Type element selectors" module="W3C Selectors" modulename="css3-modsel" number="2" rev="1.1" date="03-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>address { background-color: lime }</cssrules>
-
-<code>
-<address xmlns="http://www.w3.org/1999/xhtml">This address element should have a green background.</address>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-20.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-20.xml
deleted file mode 100644
index d6204affe15..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-20.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def=":focus pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="20" rev="1.1" date="03-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>a:focus { background-color : lime }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">The background color of <a href="#foo">anchors</a>
- in this page should turn <a href="#foo">to green</a> when they have the
- <a href="#foo">focus</a>.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-21.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-21.xml
deleted file mode 100644
index 56b1a5f185e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-21.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<csstest def=":target pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="21" rev="1.1" date="03-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>p:target { background-color : lime }</cssrules>
-<code>
-<p id="first" xmlns="http://www.w3.org/1999/xhtml">This paragraph should be unstyled.
- The background of the following paragraph should become green when
- you follow <a href="#second">this link</a>.</p>
-<p id="second" xmlns="http://www.w3.org/1999/xhtml">This paragraph should initially be unstyled.
- It should become green when you select the link above. When you select
- <a href="#third">this link</a>, it should return to being unstyled and the
- background of the paragraph below should become green.</p>
-<p id="third" xmlns="http://www.w3.org/1999/xhtml">This paragraph should initially be unstyled.
- It should become green when you select the link above. When you follow
- <a href="#missing">this link</a>, the three paragraphs
- should all return to being unstyled.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-21b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-21b.xml
deleted file mode 100644
index fde26af08ac..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-21b.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<csstest def=":target pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="21b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { background-color: lime; }
-p:target { background-color: red; }</cssrules>
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This paragraph should be green.</p>
-</code>
-</csstest>
-
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-21c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-21c.xml
deleted file mode 100644
index a62a1518b12..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-21c.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<csstest def=":target pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="21c" rev="1.2" date="24-january-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>:root { background-color: green; }
-:target { background-color: red; }</cssrules>
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml">This page should be green.</p>
-</code>
-</csstest>
-
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-22.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-22.xml
deleted file mode 100644
index 5996160912d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-22.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def=":lang() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="22" rev="1.0" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>ul &gt; li { background-color : red }
-li:lang(en-GB) { background-color : lime }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li lang="en-GB">This list item should be green because its language is
- British English</li>
- <li lang="en-GB-wa">This list item should be green because its language
- is British English (Wales)</li>
-</ul>
-<ol xmlns="http://www.w3.org/1999/xhtml">
- <li lang="en-US">This list item should NOT be green because its language
- is US English</li>
- <li lang="fr">This list item should NOT be green because its language is
- French</li>
-</ol>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-23.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-23.xml
deleted file mode 100644
index 9c10294fa6d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-23.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def=":enabled pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="23" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>button { background-color : red }
-input { background-color : red }
-button:enabled { background-color : lime }
-input:enabled { background-color : lime }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">
- <button>A button (enabled) with green background</button>
- <br/>
- <input type="text" size="36" value="a text area (enabled) with green background"/>
-</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-24.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-24.xml
deleted file mode 100644
index cd109dfea19..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-24.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def=":disabled pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="24" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>button { background-color : red }
-input { background-color : red }
-button:disabled { background-color : lime }
-input:disabled { background-color : lime }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">
- <button disabled="disabled">A button (disabled) with green background</button>
- <br/>
- <input disabled="disabled" type="text" size="36" value="a text area (disabled) with green background"/>
-</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-25.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-25.xml
deleted file mode 100644
index aea599d761b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-25.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def=":checked pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="25" rev="1.1" date="29-may-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>input, span { background-color : red }
-input:checked, input:checked + span { background-color : lime}
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">
-<input type="checkbox" checked="checked"/> <span>Everything in this paragraph should have a green background</span></p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-27.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-27.xml
deleted file mode 100644
index 3d9f31b6f4d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-27.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<csstest def=":root pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="27" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>html { background-color : red }
-*:root { background-color: lime }</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">The background of the document should be green</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-27a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-27a.xml
deleted file mode 100644
index 9c8cad695b2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-27a.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def="Impossible rules (:root:first-child, etc)" module="W3C Selectors" modulename="css3-modsel" number="27a" rev="1.0" date="19-october-2005" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-:root:first-child { background-color: red; }
-:root:last-child { background-color: red; }
-:root:only-child { background-color: red; }
-:root:nth-child(1) { background-color: red; }
-:root:nth-child(n) { background-color: red; }
-:root:nth-last-child(1) { background-color: red; }
-:root:nth-last-child(n) { background-color: red; }
-:root:first-of-type { background-color: red; }
-:root:last-of-type { background-color: red; }
-:root:only-of-type { background-color: red; }
-:root:nth-of-type(1) { background-color: red; }
-:root:nth-of-type(n) { background-color: red; }
-:root:nth-last-of-type(1) { background-color: red; }
-:root:nth-last-of-type(n) { background-color: red; }
-p { color: green; }</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This line should be green (there should be no red on this page).</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-27b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-27b.xml
deleted file mode 100644
index 7045d492b7d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-27b.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<csstest def="Impossible rules (* html, * :root)" module="W3C Selectors" modulename="css3-modsel" number="27b" rev="1.0" date="17-october-2005" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>* html { background-color: red; }
-* :root { background-color: red; }
-p { color: green; }</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This line should be green (there should be no red on this page).</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-28.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-28.xml
deleted file mode 100644
index 7972d5dfc0c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-28.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<csstest def=":nth-child() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="28" rev="1.0" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-ul &gt; li:nth-child(odd) { background-color : lime }
-ol &gt; li:nth-child(even) { background-color : lime }
-table.t1 tr:nth-child(-n+4) { background-color : lime }
-table.t2 td:nth-child(3n+1) { background-color : lime }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li class="red">This first list item should have a green background</li>
- <li>Second list item</li>
- <li class="red">This third list item should have a green background</li>
- <li>Fourth list item</li>
- <li class="red">This fifth list item should have a green background</li>
- <li>Sixth list item</li>
-</ul>
-<ol xmlns="http://www.w3.org/1999/xhtml">
- <li>First list item</li>
- <li class="red">This second list item should have a green background</li>
- <li>Third list item</li>
- <li class="red">This fourth list item should have a green background</li>
- <li>Fifth list item</li>
- <li class="red">This sixth list item should have a green background</li>
-</ol>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table border="1" class="t1">
- <tr class="red">
-<td>Green row : 1.1</td>
-<td>1.2</td>
- <td>1.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 2.1</td>
-<td>2.2</td>
- <td>2.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 3.1</td>
-<td>3.2</td>
- <td>3.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 4.1</td>
-<td>4.2</td>
- <td>4.3</td>
-</tr>
- <tr>
-<td>5.1</td>
-<td>5.2</td>
-<td>5.3</td>
-</tr>
- <tr>
-<td>6.1</td>
-<td>6.2</td>
-<td>6.3</td>
-</tr>
-</table>
-
-<table class="t2" border="1">
- <tr>
-<td class="red">green cell</td>
-<td>1.2</td>
-<td>1.3</td>
- <td class="red">green cell</td>
-<td>1.5</td>
-<td>1.6</td>
- <td class="red">green cell</td>
-<td>1.8</td>
-</tr>
- <tr>
-<td class="red">green cell</td>
-<td>2.2</td>
-<td>2.3</td>
- <td class="red">green cell</td>
-<td>2.5</td>
-<td>2.6</td>
- <td class="red">green cell</td>
-<td>2.8</td>
-</tr>
- <tr>
-<td class="red">green cell</td>
-<td>3.2</td>
-<td>3.3</td>
- <td class="red">green cell</td>
-<td>3.5</td>
-<td>3.6</td>
- <td class="red">green cell</td>
-<td>3.8</td>
-</tr>
-</table>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-28b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-28b.xml
deleted file mode 100644
index 21a5a5479e0..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-28b.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<csstest def=":nth-child() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="28b" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.green { background-color : lime ! important }
-ul &gt; li:nth-child(odd) { background-color : red }
-ol &gt; li:nth-child(even) { background-color : red }
-table.t1 tr:nth-child(-n+4) { background-color : red }
-table.t2 td:nth-child(3n+1) { background-color : red }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li class="green">This first list item should have a green background</li>
- <li>Second list item</li>
- <li class="green">This third list item should have a green background</li>
- <li>Fourth list item</li>
- <li class="green">This fifth list item should have a green background</li>
- <li>Sixth list item</li>
-</ul>
-<ol xmlns="http://www.w3.org/1999/xhtml">
- <li>First list item</li>
- <li class="green">This second list item should have a green background</li>
- <li>Third list item</li>
- <li class="green">This fourth list item should have a green background</li>
- <li>Fifth list item</li>
- <li class="green">This sixth list item should have a green background</li>
-</ol>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table border="1" class="t1">
- <tr class="green">
-<td>Green row : 1.1</td>
-<td>1.2</td>
- <td>1.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 2.1</td>
-<td>2.2</td>
- <td>2.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 3.1</td>
-<td>3.2</td>
- <td>3.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 4.1</td>
-<td>4.2</td>
- <td>4.3</td>
-</tr>
- <tr>
-<td>5.1</td>
-<td>5.2</td>
-<td>5.3</td>
-</tr>
- <tr>
-<td>6.1</td>
-<td>6.2</td>
-<td>6.3</td>
-</tr>
-</table>
-<p/>
-<table class="t2" border="1">
- <tr>
-<td class="green">green cell</td>
-<td>1.2</td>
-<td>1.3</td>
- <td class="green">green cell</td>
-<td>1.5</td>
-<td>1.6</td>
- <td class="green">green cell</td>
-<td>1.8</td>
-</tr>
- <tr>
-<td class="green">green cell</td>
-<td>2.2</td>
-<td>2.3</td>
- <td class="green">green cell</td>
-<td>2.5</td>
-<td>2.6</td>
- <td class="green">green cell</td>
-<td>2.8</td>
-</tr>
- <tr>
-<td class="green">green cell</td>
-<td>3.2</td>
-<td>3.3</td>
- <td class="green">green cell</td>
-<td>3.5</td>
-<td>3.6</td>
- <td class="green">green cell</td>
-<td>3.8</td>
-</tr>
-</table>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-28c.pl-draft b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-28c.pl-draft
deleted file mode 100644
index f8601068c01..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-28c.pl-draft
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/perl -wT
-
-print "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n";
-nest(0, 5, 5, 'span');
-print "</div>\n";
-
-:nth-child(-1n+6) :nth-child(-2) :nth-child(-2n-2)
-
-sub nest {
- my($indent, $remaining, $count, $element, @position) = @_;
- ++$indent;
- --$remaining;
- for (my $index = 0; $index < $count; ++$index) {
- if ($remaining > 1) {
- print((' ' x $indent) . "<$element>\n");
- nest($indent, $remaining, $count, $element, @position, $index);
- print((' ' x $indent) . "</$element>\n");
- } elsif ($remaining) {
- print((' ' x $indent) . "<$element> ");
- nest($indent, $remaining, $count, $element, @position, $index);
- print "</$element>\n";
- } else {
- my $class = tryToMatch(\@position, [nthChild(-1, 6), nthChild(0, -2), nthChild(-2, -2)]) ? 'match' : 'nomatch';
- print "<$element class="$class">Test</$element> ";
- }
- }
-}
-
-sub nthChild {
- my($position, $counts) = @_;
- if
-}
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-29.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-29.xml
deleted file mode 100644
index f98b97fd105..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-29.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<csstest def=":nth-last-child() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="29" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.red { background-color : red }
-ul &gt; li:nth-last-child(odd) { background-color : green }
-ol &gt; li:nth-last-child(even) { background-color : green }
-table.t1 tr:nth-last-child(-n+4) { background-color : green }
-table.t2 td:nth-last-child(3n+1) { background-color : green }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li>First list item</li>
- <li class="red">This second list item should have a green background</li>
- <li>Third list item</li>
- <li class="red">This fourth list item should have a green background</li>
- <li>Fifth list item</li>
- <li class="red">This sixth list item should have a green background</li>
-</ul>
-<ol xmlns="http://www.w3.org/1999/xhtml">
- <li class="red">This first list item should have a green background</li>
- <li>Second list item</li>
- <li class="red">This third list item should have a green background</li>
- <li>Fourth list item</li>
- <li class="red">This fifth list item should have a green background</li>
- <li>Sixth list item</li>
-</ol>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table border="1" class="t1">
- <tr>
-<td>1.1</td>
-<td>1.2</td>
- <td>1.3</td>
-</tr>
- <tr>
-<td>2.1</td>
-<td>2.2</td>
- <td>2.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 3.1</td>
-<td>3.2</td>
- <td>3.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 4.1</td>
-<td>4.2</td>
- <td>4.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 5.1</td>
-<td>5.2</td>
- <td>5.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 6.1</td>
-<td>6.2</td>
- <td>6.3</td>
-</tr>
-</table>
-<p/>
-<table class="t2" border="1">
- <tr>
-<td>1.1</td>
-<td class="red">green cell</td>
-<td>1.3</td>
- <td>1.4</td>
-<td class="red">green cell</td>
-<td>1.6</td>
- <td>1.7</td>
-<td class="red">green cell</td>
-</tr>
- <tr>
-<td>2.1</td>
-<td class="red">green cell</td>
-<td>2.3</td>
- <td>2.4</td>
-<td class="red">green cell</td>
-<td>2.6</td>
- <td>2.7</td>
-<td class="red">green cell</td>
-</tr>
- <tr>
-<td>3.1</td>
-<td class="red">green cell</td>
-<td>3.3</td>
- <td>3.4</td>
-<td class="red">green cell</td>
-<td>3.6</td>
- <td>3.7</td>
-<td class="red">green cell</td>
-</tr>
-</table>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-29b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-29b.xml
deleted file mode 100644
index 31e75b5b42b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-29b.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<csstest def=":nth-last-child() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="29b" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.green { background-color : lime ! important }
-ul &gt; li:nth-last-child(odd) { background-color : red }
-ol &gt; li:nth-last-child(even) { background-color : red }
-table.t1 tr:nth-last-child(-n+4) { background-color : red }
-table.t2 td:nth-last-child(3n+1) { background-color : red }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li>First list item</li>
- <li class="green">This second list item should have a green background</li>
- <li>Third list item</li>
- <li class="green">This fourth list item should have a green background</li>
- <li>Fifth list item</li>
- <li class="green">This sixth list item should have a green background</li>
-</ul>
-<ol xmlns="http://www.w3.org/1999/xhtml">
- <li class="green">This first list item should have a green background</li>
- <li>Second list item</li>
- <li class="green">This third list item should have a green background</li>
- <li>Fourth list item</li>
- <li class="green">This fifth list item should have a green background</li>
- <li>Sixth list item</li>
-</ol>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table border="1" class="t1">
- <tr>
-<td>1.1</td>
-<td>1.2</td>
- <td>1.3</td>
-</tr>
- <tr>
-<td>2.1</td>
-<td>2.2</td>
- <td>2.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 3.1</td>
-<td>3.2</td>
- <td>3.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 4.1</td>
-<td>4.2</td>
- <td>4.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 5.1</td>
-<td>5.2</td>
- <td>5.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 6.1</td>
-<td>6.2</td>
- <td>6.3</td>
-</tr>
-</table>
-<p/>
-<table class="t2" border="1">
- <tr>
-<td>1.1</td>
-<td class="green">green cell</td>
-<td>1.3</td>
- <td>1.4</td>
-<td class="green">green cell</td>
-<td>1.6</td>
- <td>1.7</td>
-<td class="green">green cell</td>
-</tr>
- <tr>
-<td>2.1</td>
-<td class="green">green cell</td>
-<td>2.3</td>
- <td>2.4</td>
-<td class="green">green cell</td>
-<td>2.6</td>
- <td>2.7</td>
-<td class="green">green cell</td>
-</tr>
- <tr>
-<td>3.1</td>
-<td class="green">green cell</td>
-<td>3.3</td>
- <td>3.4</td>
-<td class="green">green cell</td>
-<td>3.6</td>
- <td>3.7</td>
-<td class="green">green cell</td>
-</tr>
-</table>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-3.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-3.xml
deleted file mode 100644
index 7dd22bd1f36..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-3.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<csstest def="Universal selector" module="W3C Selectors" modulename="css3-modsel" number="3" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>* { color : lime }
-ul, p { color : red }
-*.t1 { color : lime }
-</cssrules>
-
-<!-- this is a _non-namespace_ test! -->
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">
-<span class="t1">This paragraph, and all textual contents in the document,
- should be green.</span>
-</p>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li class="t1">This item should be green.</li>
-</ul>
-<foo xmlns="http://www.example.org/a">And this element, part of a non-HTML namespace,
- should be green too</foo>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-30.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-30.xml
deleted file mode 100644
index 67ed015543f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-30.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<csstest def=":nth-of-type() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="30" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-p:nth-of-type(3) { background-color : lime }
-dl &gt; :nth-of-type(3n+1) { background-color : lime }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This paragraph is here only to fill space in the DOM</p>
-<address xmlns="http://www.w3.org/1999/xhtml">And this address too..</address>
-<p xmlns="http://www.w3.org/1999/xhtml">So does this paragraph !</p>
-<p class="red" xmlns="http://www.w3.org/1999/xhtml">But this one should have green background</p>
-<dl xmlns="http://www.w3.org/1999/xhtml">
- <dt class="red">First definition term that should have green background</dt>
- <dd class="red">First definition that should have green background</dd>
- <dt>Second definition term</dt>
- <dd>Second definition</dd>
- <dt>Third definition term</dt>
- <dd>Third definition</dd>
- <dt class="red">Fourth definition term that should have green background</dt>
- <dd class="red">Fourth definition that should have green background</dd>
- <dt>Fifth definition term</dt>
- <dd>Fifth definition</dd>
- <dt>Sixth definition term</dt>
- <dd>Sixth definition</dd>
-</dl>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-31.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-31.xml
deleted file mode 100644
index e8b9e373430..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-31.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<csstest def=":nth-last-of-type() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="31" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-p:nth-last-of-type(3) { background-color : lime }
-dl &gt; :nth-last-of-type(3n+1) { background-color : lime }
-</cssrules>
-
-<code>
-<p class="red" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background</p>
-<address xmlns="http://www.w3.org/1999/xhtml">But this address is here only to fill space in the dom..</address>
-<p xmlns="http://www.w3.org/1999/xhtml">So does this paragraph !</p>
-<p xmlns="http://www.w3.org/1999/xhtml">And so does this one too.</p>
-<dl xmlns="http://www.w3.org/1999/xhtml">
- <dt>First definition term</dt>
- <dd>First definition</dd>
- <dt>Second definition term</dt>
- <dd>Second definition</dd>
- <dt class="red">Third definition term that should have green background</dt>
- <dd class="red">Third definition that should have green background</dd>
- <dt>Fourth definition term</dt>
- <dd>Fourth definition</dd>
- <dt>Fifth definition term</dt>
- <dd>Fifth definition</dd>
- <dt class="red">Sixth definition term that should have green background</dt>
- <dd class="red">Sixth definition that should have green background</dd>
-</dl>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-32.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-32.xml
deleted file mode 100644
index 362a42a5da9..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-32.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<csstest def=":first-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="32" rev="1.0" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-.t1 td:first-child { background-color : lime }
-p &gt; *:first-child { background-color : lime }
-</cssrules>
-
-<code>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table class="t1" border="1">
- <tr>
- <td class="red">green cell</td>
- <td>1.2</td>
- <td>1.3</td>
- </tr>
- <tr>
- <td class="red">green cell</td>
- <td>2.2</td>
- <td>2.3</td>
- </tr>
- <tr>
- <td class="red">green cell</td>
- <td>3.2</td>
- <td>3.3</td>
- </tr>
-</table>
-</div>
-<p xmlns="http://www.w3.org/1999/xhtml">This paragraph contains some text
- <span>and a span that should have a green background</span>
-</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-33.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-33.xml
deleted file mode 100644
index 62b2398034b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-33.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<csstest def=":last-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="33" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-.t1 td:last-child { background-color : lime }
-p &gt; *:last-child { background-color : lime }
-</cssrules>
-
-<code>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table class="t1" border="1">
- <tr>
- <td>1.1</td>
- <td>1.2</td>
- <td class="red">green cell</td>
- </tr>
- <tr>
- <td>2.1</td>
- <td>2.2</td>
- <td class="red">green cell</td>
- </tr>
- <tr>
- <td>3.1</td>
- <td>3.2</td>
- <td class="red">green cell</td>
- </tr>
-</table>
-</div>
-<p xmlns="http://www.w3.org/1999/xhtml">
-<span>This paragraph contains a span that should
- have a green background</span> and some text after it.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-34.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-34.xml
deleted file mode 100644
index 1fe467a4e03..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-34.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def=":first-of-type pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="34" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-address { margin-bottom : 1em ; margin-left : 1em }
-address:first-of-type { background-color : lime }
-</cssrules>
-
-<code>
-<div xmlns="http://www.w3.org/1999/xhtml">This div contains 3 addresses:
-<address class="red">A first address that should have a green background</address>
-<address>A second address with normal background</address>
-<address>A third address with normal background</address>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-35.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-35.xml
deleted file mode 100644
index 91eba662245..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-35.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def=":last-of-type pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="35" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.red { background-color : red }
-address { margin-bottom : 1em ; margin-left : 1em }
-address:last-of-type { background-color : lime }
-</cssrules>
-<code>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<address>A first address with normal background</address>
-<address>A second address with normal background</address>
-<address class="red">A third address that should have a green background</address>
-This div contains 3 addresses above this sentence.</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-36.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-36.xml
deleted file mode 100644
index 4873f209378..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-36.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def=":only-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="36" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-p:only-child { background-color : lime }
-div.testText &gt; div &gt; p { margin-left : 1em }
-</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This paragraph should have normal background</p>
-<div xmlns="http://www.w3.org/1999/xhtml">This div contains only one paragraph
- <p class="red">This paragraph should have green background</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-37.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-37.xml
deleted file mode 100644
index c660db6b789..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-37.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def=":only-of-type pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="37" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-.t1 :only-of-type { background-color : lime }
-</cssrules>
-<code>
-<div class="t1" xmlns="http://www.w3.org/1999/xhtml">
-<p>This paragraph should have normal background</p>
-<address class="red">But this address should have green background</address>
-<p>This paragraph should have normal background</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-38.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-38.xml
deleted file mode 100644
index ad0515a1628..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-38.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="::first-line pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="38" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>p:first-line { background-color : lime }
-</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This very long paragraph should have a
- first line with green background. This very long paragraph should have a first
- line with green background. This very long paragraph should have a first line
- with green background. This very long paragraph should have a first line with
- green background. This very long paragraph should have a first line with green
- background. This very long paragraph should have a first line with green background.
- This very long paragraph should have a first line with green background.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39.xml
deleted file mode 100644
index a262929ac20..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<csstest def="::first-letter pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="39" rev="1.2" date="17-september-2005" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>p:first-letter { font-size : xx-large ; background-color : lime }</cssrules>
-
-<code>
-
-<p xmlns="http://www.w3.org/1999/xhtml">This very long paragraph
-should have a big first letter T with a green background. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text.</p>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39a.xml
deleted file mode 100644
index dcc1730d0ca..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39a.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<csstest def="::first-letter pseudo-element with ::before pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="39a" rev="1.2" date="9-november-2005" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>p:first-letter { color: lime; font-size: xx-large; }
-p:before { color: red; content: 'T'; }</cssrules>
-
-<code>
-
-<p xmlns="http://www.w3.org/1999/xhtml">his very long paragraph should
-have a big green first letter T. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text.</p>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39b.xml
deleted file mode 100644
index fd1a787ce29..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39b.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<csstest def="::first-letter pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="39b" rev="1.1" date="17-september-2005" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>p::first-letter { font-size : xx-large ; background-color : lime }</cssrules>
-
-
-<code>
-
-<p xmlns="http://www.w3.org/1999/xhtml">This very long paragraph
-should have a big first letter T with a green background. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text.</p>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39c.xml
deleted file mode 100644
index 5832c074e54..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-39c.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<csstest def="::first-letter pseudo-element with ::before pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="39c" rev="1.2" date="9-november-2005" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>p::first-letter { color: lime; font-size: xx-large; }
- p::before { color: red; content: 'T'; }</cssrules>
-
-<code>
-
-<p xmlns="http://www.w3.org/1999/xhtml">his very long paragraph should
-have a big green first letter T. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
-text. Dummy text. Dummy text. Dummy text.</p>
-
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-3a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-3a.xml
deleted file mode 100644
index 2737ccc6dbc..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-3a.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Universal selector (no namespaces)" module="W3C Selectors" modulename="css3-modsel" number="3a" rev="1.0" date="3-november-2003" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>* { color : lime }
-ul, p { color : red }
-*.t1 { color : lime }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">
-<span class="t1">This paragraph, and all textual contents in the document,
- should be green.</span>
-</p>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li class="t1">This item should be green.</li>
-</ul>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-4.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-4.xml
deleted file mode 100644
index 1f8c1187b73..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-4.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<csstest def="Omitted universal selector" module="W3C Selectors" modulename="css3-modsel" number="4" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>#foo { background-color : lime }
-p { background-color : red }</cssrules>
-
-<code>
-<p id="foo" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-40.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-40.xml-removed
deleted file mode 100644
index 6422bfa4d33..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-40.xml-removed
+++ /dev/null
@@ -1,11 +0,0 @@
-<csstest def="::selection pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="40" rev="1.1" date="20-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<userinteraction/>
-<cssrules>p::selection { background-color : lime }
-</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph should have green background. Any textual selection in this long paragraph should have green background.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-41.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-41.xml
deleted file mode 100644
index 1b54a0ad824..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-41.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<csstest def="::before pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="41" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>p::before { background-color : lime ; content : "GENERATED CONTENT "}
-</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">You should see before this paragraph the words GENERATED CONTENT over green background</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-41a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-41a.xml
deleted file mode 100644
index 9dda3c76ea1..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-41a.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<csstest def=":before pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="41a" rev="1.0" date="30-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>p:before { background-color : lime ; content : "GENERATED CONTENT "}
-</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">You should see before this paragraph the words GENERATED CONTENT over green background</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-42.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-42.xml
deleted file mode 100644
index 226b3d9d33e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-42.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<csstest def="::after pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="42" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>p::after { background-color : lime ; content : "GENERATED CONTENT "}
-</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">You should see after this paragraph the words GENERATED CONTENT over green background</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-42a.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-42a.xml
deleted file mode 100644
index b7b68750ad5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-42a.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<csstest def=":after pseudo-element" module="W3C Selectors" modulename="css3-modsel" number="42a" rev="1.0" date="30-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>p:after { background-color : lime ; content : "GENERATED CONTENT "}
-</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">You should see after this paragraph the words GENERATED CONTENT over green background</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-43.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-43.xml
deleted file mode 100644
index 8453553fb9b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-43.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<csstest def="Descendant combinator" module="W3C Selectors" modulename="css3-modsel" number="43" rev="1.1" date="05-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.white { background-color: transparent ! important; }
-.red { background-color: red; }
-div.t1 p { background-color: lime; }</cssrules>
-<code>
- <div class="t1" xmlns="http://www.w3.org/1999/xhtml">
- <p class="red">This paragraph should have a green background</p>
- <table>
- <tbody>
- <tr>
- <td>
- <p class="red">This paragraph should have a green background</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <table xmlns="http://www.w3.org/1999/xhtml">
- <tbody>
- <tr>
- <td>
- <p class="white">This paragraph should be unstyled.</p>
- </td>
- </tr>
- </tbody>
- </table>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-43b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-43b.xml
deleted file mode 100644
index 5707a2bb439..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-43b.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<csstest def="Descendant combinator" module="W3C Selectors" modulename="css3-modsel" number="43b" rev="1.1" date="05-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.white { background-color: transparent ! important; }
-.green { background-color: lime; }
-div.t1 p { background-color: red; }</cssrules>
-<code>
- <div class="t1" xmlns="http://www.w3.org/1999/xhtml">
- <p class="white">This paragraph should be unstyled</p>
- <table>
- <tbody>
- <tr>
- <td>
- <p class="white">This paragraph should be unstyled</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <table xmlns="http://www.w3.org/1999/xhtml">
- <tbody>
- <tr>
- <td>
- <p class="green">This paragraph should have a green background</p>
- </td>
- </tr>
- </tbody>
- </table>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44.xml
deleted file mode 100644
index bedc9840168..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<csstest def="Child combinator" module="W3C Selectors" modulename="css3-modsel" number="44" rev="1.2" date="29-february-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.white { background-color: transparent ! important; }
-.red { background-color: red; }
-div &gt; p.test { background-color: lime; }</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <p class="red test">This paragraph should have a green background</p>
- <div>
- <p class="red test">This paragraph should have a green background</p>
- </div>
- </div>
- <table xmlns="http://www.w3.org/1999/xhtml">
- <tbody>
- <tr>
- <td>
- <p class="white test">This paragraph should be unstyled.</p>
- </td>
- </tr>
- </tbody>
- </table>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44b.xml
deleted file mode 100644
index d4df889b06d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44b.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<csstest def="Child combinator" module="W3C Selectors" modulename="css3-modsel" number="44b" rev="1.1" date="05-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.white { background-color: transparent ! important; }
-.green { background-color: lime; }
-div &gt; p.test { background-color: red; }</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <p class="white test">This paragraph should be unstyled.</p>
- <div>
- <p class="white test">This paragraph should be unstyled.</p>
- </div>
- </div>
- <table xmlns="http://www.w3.org/1999/xhtml">
- <tbody>
- <tr>
- <td>
- <p class="green test">This paragraph should have a green background.</p>
- </td>
- </tr>
- </tbody>
- </table>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44c.xml
deleted file mode 100644
index 90bc43abf7d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44c.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="Child combinator and classes" module="W3C Selectors" modulename="css3-modsel" number="44c" rev="1.1" date="21-june-2003" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- .fail > div { background: red; color: yellow; }
- .control { background: green; color: white; }
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml"> This should be unstyled. </div>
- <div xmlns="http://www.w3.org/1999/xhtml" class="control"> This should have a green background. </div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44d.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44d.xml
deleted file mode 100644
index 882f74a48dd..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-44d.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="Child combinatior and IDs" module="W3C Selectors" modulename="css3-modsel" number="44d" rev="1.0" date="21-november-2001" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- #fail > div { background: red; }
- p { background: green; }
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml"> This should be unstyled. </div>
- <p xmlns="http://www.w3.org/1999/xhtml"> This should have a green background. </p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-45.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-45.xml
deleted file mode 100644
index ed406c223ce..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-45.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Direct adjacent combinator" module="W3C Selectors" modulename="css3-modsel" number="45" rev="1.1" date="05-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.red { background-color : red }
-div.stub &gt; p + p { background-color : lime }</cssrules>
-
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p>This paragraph should be unstyled.</p>
- <p class="red">But this one should have a green background.</p>
- <p class="red">And this one should also have a green background.</p>
- <address>This address is only here to fill some space between two paragraphs.</address>
- <p>This paragraph should be unstyled.</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-45b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-45b.xml
deleted file mode 100644
index b1cc9bba4bc..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-45b.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="Direct adjacent combinator" module="W3C Selectors" modulename="css3-modsel" number="45b" rev="1.1" date="05-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.green { background-color: lime; }
-.white { background-color: transparent ! important; }
-div.stub &gt; p + p { background-color: red; }</cssrules>
-
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p class="green">This paragraph should have a green background.</p>
- <p class="white">But this one should be unstyled.</p>
- <p class="white">And this one should also be unstyled.</p>
- <address class="green">This address is only here to fill some space between two paragraphs and should have a green background.</address>
- <p class="green">This paragraph should have a green background too.</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-45c.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-45c.xml
deleted file mode 100644
index 47ec8819a41..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-45c.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="Direct adjacent combinator and classes" module="W3C Selectors" modulename="css3-modsel" number="45c" rev="1.1" date="6-december-2002" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
- .fail + div { background: red; }
- .control { background: lime; }
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml"> This should be unstyled. </div>
- <div xmlns="http://www.w3.org/1999/xhtml" class="control"> This should have a green background. </div>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-46.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-46.xml
deleted file mode 100644
index 15c8ae2370f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-46.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Indirect adjacent combinator" module="W3C Selectors" modulename="css3-modsel" number="46" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.red { background-color : red }
-div.stub &gt; p ~ p { background-color : lime }</cssrules>
-
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p>This paragraph should be unstyled.</p>
- <p class="red">But this one should have a green background</p>
- <p class="red">And this one should also have a green background</p>
- <address>This address is only here to fill some space between two paragraphs</address>
- <p class="red">This paragraph should have a green background</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-46b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-46b.xml
deleted file mode 100644
index da34d40f623..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-46b.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Indirect adjacent combinator" module="W3C Selectors" modulename="css3-modsel" number="46b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.green { background-color : lime ! important }
-div.stub &gt; p ~ p { background-color : red }</cssrules>
-
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p>This paragraph should be unstyled.</p>
- <p class="green">But this one should have a green background</p>
- <p class="green">And this one should also have a green background</p>
- <address>This address is only here to fill some space between two paragraphs</address>
- <p class="green">This paragraph should have a green background</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-47.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-47.xml
deleted file mode 100644
index b3a30d36daa..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-47.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED type element selector" module="W3C Selectors" modulename="css3-modsel" number="47" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>div.stub span, div.stub address, div.stub *|q, div.stub *|r { background-color: red; }
-address, *|q, *|r { display: block; margin: 1em; }
-div.stub *:not(p) { background-color: lime; }</cssrules>
-
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p>
- <span>The text in this paragraph should have a green background</span>
- </p>
- <address>This address should have a green background</address>
- <q xmlns="http://www.example.org/a">This element in another namespace should have a green background.</q>
- <r xmlns="">This element without a namespace should have a green background.</r>
- <p>This paragraph should be unstyled.</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-48.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-48.xml
deleted file mode 100644
index eff468f1532..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-48.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED universal selector" module="W3C Selectors" modulename="css3-modsel" number="48" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace html url(http://www.w3.org/1999/xhtml);
-@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.stub &gt; *|* { background-color : lime ; display : block ;
- margin-bottom : 1em }
-div.stub &gt; *|*:not(*) { background-color : red }
-/* yes, the rule just above selects nothing... That's the point */
-</cssrules>
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<address>This address should have a green background</address>
-<s xmlns="http://www.example.org/b">This paragraph should have a green background</s>
-<t xmlns="">This paragraph should have a green background</t>
-<u xmlns="http://www.example.org/a">This paragraph should have a green background</u>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-49.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-49.xml
deleted file mode 100644
index d55fbfc02a8..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-49.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="NEGATED omitted universal selector is forbidden" module="W3C Selectors" modulename="css3-modsel" number="49" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace html url(http://www.w3.org/1999/xhtml);
-@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.stub &gt; *|* { background-color : lime ; display : block ;
- margin-bottom : 1em }
-div.stub &gt; *|*:not() { background-color : red }
-/* yes, the rule just above selects nothing... That's the point */
-</cssrules>
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<address>This address should have a green background</address>
-<s xmlns="http://www.example.org/b">This paragraph should have a green background</s>
-<t xmlns="">This paragraph should have a green background</t>
-<u xmlns="http://www.example.org/a">This paragraph should have a green background</u>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-5.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-5.xml
deleted file mode 100644
index 69153646c01..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-5.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<csstest def="Attribute existence selector" module="W3C Selectors" modulename="css3-modsel" number="5" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>p { background-color : red }
-p[title] { background-color : lime }</cssrules>
-
-<code>
-<p title="title" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background because its TITLE
- attribute is set.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-50.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-50.xml
deleted file mode 100644
index e437ecc6a2d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-50.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="NEGATED attribute existence selector" module="W3C Selectors" modulename="css3-modsel" number="50" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-a|* { color : red ; display : block ; margin-bottom : 1em }
-div.stub *|*:not([test]) { color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q test="1" xmlns="http://www.example.org/a">
- <r>This text should be in green characters</r>
-</q>
-<s xmlns="http://www.example.org/a">This text should be in green characters</s>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-51.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-51.xml
deleted file mode 100644
index c2476d13b94..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-51.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="NEGATED attribute value selector" module="W3C Selectors" modulename="css3-modsel" number="51" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-div.stub &gt; p {color : red }
-div.stub &gt; a|* { color : red ; display : block ; margin-bottom : 1em }
-div.stub *|*:not([test="1"]) { color : lime }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q test="1" xmlns="http://www.example.org/a">
- <r test="11">This text should be</r>
- <r>in green characters</r>
-</q>
-<s xmlns="http://www.example.org/a">This text should be in green characters</s>
-<p>This text should be in green characters</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-52.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-52.xml
deleted file mode 100644
index ef1ae777bb0..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-52.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<csstest def="NEGATED attribute space-separated value selector" module="W3C Selectors" modulename="css3-modsel" number="52" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.stub p { color : red }
-div.stub &gt; a|*, div.stub &gt; b|* { color : red ; display : block ; margin-bottom : 1em }
-div.stub *|*:not([test~="foo"]) { color : lime }
-div.stub *|p:not([class~="foo"]) { color : lime }
-div.stub b|*[test~="foo2"] { color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q test="bar foo tut" xmlns="http://www.example.org/a">
- <r test="tut foofoo bar">This text should be</r>
- <r>in green characters</r>
-</q>
-<s test="bar tut" xmlns="http://www.example.org/a">This text should be in green characters</s>
-<t xmlns="http://www.example.org/a">This text should be in green characters</t>
-<p class="tit foo1 tut">This text should be in green characters</p>
-<u test="tit foo2 tut" xmlns="http://www.example.org/b">This text should be in green characters</u>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-53.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-53.xml
deleted file mode 100644
index fa5ea77a07b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-53.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<csstest def="NEGATED attribute dash-separated value selector" module="W3C Selectors" modulename="css3-modsel" number="53" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.stub p { color : red }
-div.stub &gt; a|*, div.stub &gt; b|* { color : red ; display : block ; margin-bottom : 1em }
-div.stub *|*:not([test|="foo-bar"]) { color : lime }
-div.stub *|p:not([lang|="en-us"]) { color : lime }
-div.stub b|*[test|="foo2-bar"] { color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<q test="foo-bar" xmlns="http://www.example.org/a">
- <r test="foo-bartut">This text should be</r>
- <r>in green characters</r>
-</q>
-<s test="bar tut" xmlns="http://www.example.org/a">This text should be in green characters</s>
-<t xmlns="http://www.example.org/a">This text should be in green characters</t>
-<p class="en-uk">This text should be in green characters</p>
-<u test="foo2-bar-lol" xmlns="http://www.example.org/b">This text should be in green characters</u>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-54.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-54.xml
deleted file mode 100644
index 09fba60bf87..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-54.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="NEGATED substring matching attribute selector on beginning" module="W3C Selectors" modulename="css3-modsel" number="54" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>div.stub &gt; * { color : red }
-div.stub *:not([title^="si on"]) { color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p>This paragraph should be in green characters.</p>
-<p title="on chante?">This paragraph should be in green characters.</p>
-<p title="si on chantait">
- <span title="si il chantait">This paragraph should be in green characters.</span>
-</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-55.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-55.xml
deleted file mode 100644
index 947352d7784..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-55.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="NEGATED substring matching attribute selector on end" module="W3C Selectors" modulename="css3-modsel" number="55" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>div.stub &gt; * { color : red }
-div.stub *:not([title$="tait"]) { color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p>This paragraph should be in green characters.</p>
-<p title="on chante?">This paragraph should be in green characters.</p>
-<p title="si on chantait">
- <span title="si il chante">This paragraph should be in green characters.</span>
-</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-56.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-56.xml
deleted file mode 100644
index 34e3c845672..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-56.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="NEGATED substring matching attribute selector on middle" module="W3C Selectors" modulename="css3-modsel" number="56" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>div.stub &gt; * { color : red }
-div.stub *:not([title*=" on"]) { color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p>This paragraph should be in green characters.</p>
-<p title="on chante?">This paragraph should be in green characters.</p>
-<p title="si on chantait">
- <span title="si il chante">This paragraph should be in green characters.</span>
-</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-57.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-57.xml
deleted file mode 100644
index 89b824672b3..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-57.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="NEGATED Attribute existence selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="57" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-*|p, *|q, *|r { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-div.stub *:not([a|title]) {background-color : lime }
-</cssrules>
-
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <q a:title="a paragraph" xmlns="http://www.example.org/a">This a:q element should be unstyled.</q>
- <p title="a paragraph">This paragraph should have a green background.</p>
- <r b:title="a paragraph" xmlns="http://www.example.org/b">This b:r element should have a green background.</r>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-57b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-57b.xml
deleted file mode 100644
index 9f0e3f38d34..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-57b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="NEGATED Attribute existence selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="57b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-*|p, *|q, *|r { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-div.stub *:not([a|title]) {background-color : red }
-</cssrules>
-
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <q a:title="a paragraph" xmlns="http://www.example.org/a">This a:q element should be unstyled.</q>
- <p title="a paragraph">This paragraph should have a green background.</p>
- <r b:title="a paragraph" xmlns="http://www.example.org/b">This b:r element should have a green background.</r>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-58.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-58.xml-removed
deleted file mode 100644
index 5e147c80a73..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-58.xml-removed
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="Default attribute value and negation pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="58" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>form { background-color : red }
-form:not([method]) { background-color : lime }
-</cssrules>
-
-<code> <!-- 'method' is an attribute with a default value in the XHTML DTD -->
- <form action="http://www.example.org/foo.cgi" xmlns="http://www.w3.org/1999/xhtml">
- <p>The paragraph should have a green background.</p>
- </form>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-59.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-59.xml
deleted file mode 100644
index b0aa032a2a9..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-59.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="NEGATED class selector" module="W3C Selectors" modulename="css3-modsel" number="59" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>div.stub &gt; * { color : red }
-div.stub *:not(.foo) { color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p>This paragraph should be in green characters.</p>
-<p class="bar foofoo tut">This paragraph should be in green characters.</p>
-<p class="bar foo tut">
- <span class="tut foo2">This paragraph should be in green characters.</span>
-</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-6.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-6.xml
deleted file mode 100644
index 9a386de0297..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-6.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="Attribute value selector" module="W3C Selectors" modulename="css3-modsel" number="6" rev="1.1" date="18-november-2005" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>address { background-color : red }
-address[title="foo"] { background-color : lime }
-span[title="a"] { background-color : red }</cssrules>
-
-<code>
-<address title="foo" xmlns="http://www.w3.org/1999/xhtml">
-<span title="b">This line should </span>
- <span title="aa">have a green background.
-</span>
-</address>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-60.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-60.xml
deleted file mode 100644
index 882156d3223..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-60.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="NEGATED ID selector" module="W3C Selectors" modulename="css3-modsel" number="60" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>div.stub &gt; * { color : red }
-div.stub *:not(#foo) { color : lime }
-</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p>This paragraph should be in green characters.</p>
-<p id="foo2">This paragraph should be in green characters.</p>
-<p id="foo">
- <span>This paragraph should be in green characters.</span>
-</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-61.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-61.xml
deleted file mode 100644
index aee3da868ca..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-61.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="NEGATED :link pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="61" rev="1.1" date="01-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<historyneeded/>
-
-<cssrules>div.stub &gt; * { background-color : red }
-div.stub *:not(:link) { background-color : lime }
-</cssrules>
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<a href="http://www.w3.org/">This anchor should have a green background</a>
-(Note: You must have visited http://www.w3.org/ for this test to be valid.)
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-62.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-62.xml
deleted file mode 100644
index 26e17595158..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-62.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def="NEGATED :visited pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="62" rev="1.1" date="01-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<historyneeded/>
-
-<cssrules>div.stub &gt; * { background-color : red }
-div.stub *:not(:visited) { background-color : lime }
-</cssrules>
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<a href="http://unvisited.example.org/css3-modsel-62/">This anchor should have a green background</a>
-(Don't follow this link.)
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-63.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-63.xml
deleted file mode 100644
index 1215c119d66..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-63.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="NEGATED :hover pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="63" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>div.stub * { color: lime; text-decoration: none; }
-div.stub &gt; * &gt; *:not(:hover) { color: black }
-</cssrules>
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p> <span>The color of this text should be green when the pointing device hovers over it.</span> </p>
- <p> <a href="http://dummy.example.org/dummy">The color of this text should be green when the pointing device hovers over it.</a> </p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-64.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-64.xml
deleted file mode 100644
index 87eb45bce9e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-64.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="NEGATED :active pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="64" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>div.stub * { color : lime }
-div.stub &gt; * &gt; *:not(:active) { color : black }
-</cssrules>
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p> <a href="http://dummy.example.org/dummy">This text should turn green while it is active.</a> </p>
- <p> <button>This text should turn green while it is active.</button> </p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-65.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-65.xml
deleted file mode 100644
index 8fc8e954b36..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-65.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="NEGATED :focus pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="65" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<userinteraction/>
-
-<cssrules>a:not(:focus) { background-color: transparent; }
-a { background-color: lime; }
-</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">The background color of all <a href="#foo">anchors</a>
- should become <a href="#foo"> green</a> when they have the
- <a href="#foo">focus</a>.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-66.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-66.xml
deleted file mode 100644
index 7d17bf525dd..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-66.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<csstest def="NEGATED :target pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="66" rev="1.2" date="30-august-2005" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<userinteraction/>
-
-<cssrules>p { background-color: navy; color: white; }
-p:not(:target) { background-color: white; color: black; }</cssrules>
-<code>
-<p id="first" xmlns="http://www.w3.org/1999/xhtml">This paragraph should be unstyled.
- The background of the following paragraph should become blue when
- you follow <a href="#second">this link</a>.</p>
-<p id="second" xmlns="http://www.w3.org/1999/xhtml">This paragraph should initially be unstyled.
- It should become blue when you select the link above. When you select
- <a href="#third">this link</a>, it should return to being unstyled and the
- background of the paragraph below should become blue.</p>
-<p id="third" xmlns="http://www.w3.org/1999/xhtml">This paragraph should initially be unstyled.
- It should become blue when you select the link above. When you follow
- <a href="#missing">this link</a>, the three paragraphs
- should all return to being unstyled.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-66b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-66b.xml
deleted file mode 100644
index c3b40707733..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-66b.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<csstest def="NEGATED :target pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="66b" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { background-color: red; }
-p:not(:target) { background-color: lime; }</cssrules>
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This paragraph should be green.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-67.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-67.xml
deleted file mode 100644
index 533498fd904..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-67.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="NEGATED :lang() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="67" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>div.stub * { background-color : red }
-div.stub *:not(:lang(fr)) { background-color : green }</cssrules>
-
-<code>
-<div lang="en" class="stub" xmlns="http://www.w3.org/1999/xhtml">
-<p>This paragraph should have a green background because the
- enclosing div is in english.</p>
-<p lang="en">This paragraph should have a green background because
- it is in english.</p>
-<div lang="fr">
- <p lang="en">This paragraph should have a green background
- because it is in english.</p>
-</div>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-68.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-68.xml
deleted file mode 100644
index 7c8afe60230..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-68.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="NEGATED :enabled pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="68" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>button { background-color : red }
-input { background-color : red }
-button:not(:enabled) { background-color : lime }
-input:not(:enabled) { background-color : lime }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">
- <button disabled="disabled">A button (disabled) with green background</button>
- <br/>
- <input disabled="disabled" type="text" size="36" value="a text area (disabled) with green background"/>
-</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-69.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-69.xml
deleted file mode 100644
index 8915eb2839e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-69.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="NEGATED :disabled pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="69" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>button { background-color : red }
-input { background-color : red }
-button:not(:disabled) { background-color : lime }
-input:not(:disabled) { background-color : lime }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">
- <button>A button (enabled) with green background</button>
- <br/>
- <input type="text" size="36" value="a text area (enabled) with green background"/>
-</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7.xml
deleted file mode 100644
index bd5199ddffa..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute multivalue selector" module="W3C Selectors" modulename="css3-modsel" number="7" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>p { background-color : red }
-p[class~="b"] { background-color : lime }
-address { background-color : red }
-address[title~="foo"] { background-color : lime }
-span[class~="b"] { background-color : red }</cssrules>
-
-<code>
-<p class="a b c" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background because CLASS
- contains "b"</p>
-<address title="tot foo bar" xmlns="http://www.w3.org/1999/xhtml">
-<span class="a c">This address should also</span>
- <span class="a bb c">have green background because the selector in the last
- rule does not apply to the inner SPANs.</span>
-</address>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-70.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-70.xml
deleted file mode 100644
index cce76420397..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-70.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<csstest def="NEGATED :checked pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="70" rev="1.1" date="24-february-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>input, span { background-color : red }
-input:not(:checked), input:not(:checked) + span { background-color : lime}</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">
-<input type="checkbox"/> <span>Everything in this paragraph should have a green background</span></p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-72.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-72.xml
deleted file mode 100644
index cdf956b89c7..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-72.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="NEGATED :root pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="72" rev="1.1" date="27-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p:not(:root) { background-color: lime; }
-div * { background-color: red; }
-</cssrules>
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <p>This paragraph should have a green background and there should be no red anywhere.</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-72b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-72b.xml
deleted file mode 100644
index 0d1f0d1a515..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-72b.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="NEGATED :root pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="72b" rev="1.0" date="27-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>html:not(:root), test:not(:root) { background-color: red; }
-p { background-color: lime; }
-</cssrules>
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <p>This paragraph should have a green background and there should be no red anywhere.</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-73.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-73.xml
deleted file mode 100644
index 54dafec9b36..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-73.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<csstest def="NEGATED :nth-child() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="73" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-ul &gt; li:not(:nth-child(odd)) { background-color : lime }
-ol &gt; li:not(:nth-child(even)) { background-color : lime }
-table.t1 tr:not(:nth-child(-n+4)) { background-color : lime }
-table.t2 td:not(:nth-child(3n+1)) { background-color : lime }
-table.t1 td, table.t2 td { border : thin black solid }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li>First list item</li>
- <li class="red">This second list item should have a green background</li>
- <li>Third list</li>
- <li class="red">This fourth list item should have a green background</li>
- <li>Fifth list item</li>
- <li class="red">This sixth list item should have a green background</li>
-</ul>
-<ol xmlns="http://www.w3.org/1999/xhtml">
- <li class="red">This first list item should have a green background</li>
- <li>Second list item</li>
- <li class="red">This third list item should have a green background</li>
- <li>Fourth list item</li>
- <li class="red">This fifth list item should have a green background</li>
- <li>Sixth list item</li>
-</ol>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table border="1" class="t1">
- <tr>
-<td>1.1</td>
-<td>1.2</td>
- <td>1.3</td>
-</tr>
- <tr>
-<td>2.1</td>
-<td>2.2</td>
- <td>2.3</td>
-</tr>
- <tr>
-<td>3.1</td>
-<td>3.2</td>
- <td>3.3</td>
-</tr>
- <tr>
-<td>4.1</td>
-<td>4.2</td>
- <td>4.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 5.1</td>
-<td>5.2</td>
-<td>5.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 6.1</td>
-<td>6.2</td>
-<td>6.3</td>
-</tr>
-</table>
-<p/>
-<table class="t2" border="1">
- <tr>
-<td>1.1</td>
-<td class="red">green cell</td>
-<td class="red">green cell</td>
- <td>1.4</td>
-<td class="red">green cell</td>
-<td class="red">green cell</td>
- <td>1.7</td>
-<td class="red">green cell</td>
-</tr>
- <tr>
-<td>2.1</td>
-<td class="red">green cell</td>
-<td class="red">green cell</td>
- <td>2.4</td>
-<td class="red">green cell</td>
-<td class="red">green cell</td>
- <td>2.7</td>
-<td class="red">green cell</td>
-</tr>
- <tr>
-<td>3.1</td>
-<td class="red">green cell</td>
-<td class="red">green cell</td>
- <td>3.4</td>
-<td class="red">green cell</td>
-<td class="red">green cell</td>
- <td>3.7</td>
-<td class="red">green cell</td>
-</tr>
-</table>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-73b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-73b.xml
deleted file mode 100644
index b5657a1189b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-73b.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<csstest def="NEGATED :nth-child() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="73b" rev="1.2" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.green { background-color : lime ! important; }
-ul &gt; li:not(:nth-child(odd)) { background-color : red }
-ol &gt; li:not(:nth-child(even)) { background-color : red }
-table.t1 tr:not(:nth-child(-n+4)) { background-color : red }
-table.t2 td:not(:nth-child(3n+1)) { background-color : red }
-table.t1 td, table.t2 td { border : thin black solid }</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li>First list item</li>
- <li class="green">This second list item should have a green background</li>
- <li>Third list</li>
- <li class="green">This fourth list item should have a green background</li>
- <li>Fifth list item</li>
- <li class="green">This sixth list item should have a green background</li>
-</ul>
-<ol xmlns="http://www.w3.org/1999/xhtml">
- <li class="green">This first list item should have a green background</li>
- <li>Second list item</li>
- <li class="green">This third list item should have a green background</li>
- <li>Fourth list item</li>
- <li class="green">This fifth list item should have a green background</li>
- <li>Sixth list item</li>
-</ol>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table border="1" class="t1">
- <tr>
-<td>1.1</td>
-<td>1.2</td>
- <td>1.3</td>
-</tr>
- <tr>
-<td>2.1</td>
-<td>2.2</td>
- <td>2.3</td>
-</tr>
- <tr>
-<td>3.1</td>
-<td>3.2</td>
- <td>3.3</td>
-</tr>
- <tr>
-<td>4.1</td>
-<td>4.2</td>
- <td>4.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 5.1</td>
-<td>5.2</td>
-<td>5.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 6.1</td>
-<td>6.2</td>
-<td>6.3</td>
-</tr>
-</table>
-<p/>
-<table class="t2" border="1">
- <tr>
-<td>1.1</td>
-<td class="green">green cell</td>
-<td class="green">green cell</td>
- <td>1.4</td>
-<td class="green">green cell</td>
-<td class="green">green cell</td>
- <td>1.7</td>
-<td class="green">green cell</td>
-</tr>
- <tr>
-<td>2.1</td>
-<td class="green">green cell</td>
-<td class="green">green cell</td>
- <td>2.4</td>
-<td class="green">green cell</td>
-<td class="green">green cell</td>
- <td>2.7</td>
-<td class="green">green cell</td>
-</tr>
- <tr>
-<td>3.1</td>
-<td class="green">green cell</td>
-<td class="green">green cell</td>
- <td>3.4</td>
-<td class="green">green cell</td>
-<td class="green">green cell</td>
- <td>3.7</td>
-<td class="green">green cell</td>
-</tr>
-</table>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-74.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-74.xml
deleted file mode 100644
index cb3efc99cd8..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-74.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<csstest def="NEGATED :nth-last-child() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="74" rev="1.0" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-ul &gt; li:not(:nth-last-child(odd)) { background-color : lime }
-ol &gt; li:not(:nth-last-child(even)) { background-color : lime }
-table.t1 tr:not(:nth-last-child(-n+4)) { background-color : lime }
-table.t2 td:not(:nth-last-child(3n+1)) { background-color : lime }
-table.t1 td, table.t2 td { border : thin black solid }
-</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li class="red">This first list item should have a green background</li>
- <li>Second list item</li>
- <li class="red">This third list item should have a green background</li>
- <li>Fourth list item</li>
- <li class="red">This fifth list item should have a green background</li>
- <li>Sixth list item</li>
-</ul>
-<ol xmlns="http://www.w3.org/1999/xhtml">
- <li>First list item</li>
- <li class="red">This second list item should have a green background</li>
- <li>Third list item</li>
- <li class="red">This fourth list item should have a green background</li>
- <li>Fifth list item</li>
- <li class="red">This sixth list item should have a green background</li>
-</ol>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table border="1" class="t1">
- <tr class="red">
-<td>Green row : 1.1</td>
-<td>1.2</td>
- <td>1.3</td>
-</tr>
- <tr class="red">
-<td>Green row : 2.1</td>
-<td>2.2</td>
- <td>2.3</td>
-</tr>
- <tr>
-<td>3.1</td>
-<td>3.2</td>
- <td>3.3</td>
-</tr>
- <tr>
-<td>4.1</td>
-<td>4.2</td>
- <td>4.3</td>
-</tr>
- <tr>
-<td>5.1</td>
-<td>5.2</td>
- <td>5.3</td>
-</tr>
- <tr>
-<td>6.1</td>
-<td>6.2</td>
- <td>6.3</td>
-</tr>
-</table>
-<p/>
-<table class="t2" border="1">
- <tr>
-<td class="red">green cell</td>
-<td>1.2</td>
-<td class="red">green cell</td>
- <td class="red">green cell</td>
-<td>1.5</td>
-<td class="red">green cell</td>
- <td class="red">green cell</td>
-<td>1.8</td>
-</tr>
- <tr>
-<td class="red">green cell</td>
-<td>2.2</td>
-<td class="red">green cell</td>
- <td class="red">green cell</td>
-<td>2.5</td>
-<td class="red">green cell</td>
- <td class="red">green cell</td>
-<td>2.8</td>
-</tr>
- <tr>
-<td class="red">green cell</td>
-<td>3.2</td>
-<td class="red">green cell</td>
- <td class="red">green cell</td>
-<td>3.5</td>
-<td class="red">green cell</td>
- <td class="red">green cell</td>
-<td>3.8</td>
-</tr>
-</table>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-74b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-74b.xml
deleted file mode 100644
index ed7f2086846..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-74b.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<csstest def="NEGATED :nth-last-child() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="74b" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.green { background-color : lime ! important; }
-ul &gt; li:not(:nth-last-child(odd)) { background-color : red }
-ol &gt; li:not(:nth-last-child(even)) { background-color : red }
-table.t1 tr:not(:nth-last-child(-n+4)) { background-color : red }
-table.t2 td:not(:nth-last-child(3n+1)) { background-color : red }
-table.t1 td, table.t2 td { border : thin black solid }
-</cssrules>
-
-<code>
-<ul xmlns="http://www.w3.org/1999/xhtml">
- <li class="green">This first list item should have a green background</li>
- <li>Second list item</li>
- <li class="green">This third list item should have a green background</li>
- <li>Fourth list item</li>
- <li class="green">This fifth list item should have a green background</li>
- <li>Sixth list item</li>
-</ul>
-<ol xmlns="http://www.w3.org/1999/xhtml">
- <li>First list item</li>
- <li class="green">This second list item should have a green background</li>
- <li>Third list item</li>
- <li class="green">This fourth list item should have a green background</li>
- <li>Fifth list item</li>
- <li class="green">This sixth list item should have a green background</li>
-</ol>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<table border="1" class="t1">
- <tr class="green">
-<td>Green row : 1.1</td>
-<td>1.2</td>
- <td>1.3</td>
-</tr>
- <tr class="green">
-<td>Green row : 2.1</td>
-<td>2.2</td>
- <td>2.3</td>
-</tr>
- <tr>
-<td>3.1</td>
-<td>3.2</td>
- <td>3.3</td>
-</tr>
- <tr>
-<td>4.1</td>
-<td>4.2</td>
- <td>4.3</td>
-</tr>
- <tr>
-<td>5.1</td>
-<td>5.2</td>
- <td>5.3</td>
-</tr>
- <tr>
-<td>6.1</td>
-<td>6.2</td>
- <td>6.3</td>
-</tr>
-</table>
-<p/>
-<table class="t2" border="1">
- <tr>
-<td class="green">green cell</td>
-<td>1.2</td>
-<td class="green">green cell</td>
- <td class="green">green cell</td>
-<td>1.5</td>
-<td class="green">green cell</td>
- <td class="green">green cell</td>
-<td>1.8</td>
-</tr>
- <tr>
-<td class="green">green cell</td>
-<td>2.2</td>
-<td class="green">green cell</td>
- <td class="green">green cell</td>
-<td>2.5</td>
-<td class="green">green cell</td>
- <td class="green">green cell</td>
-<td>2.8</td>
-</tr>
- <tr>
-<td class="green">green cell</td>
-<td>3.2</td>
-<td class="green">green cell</td>
- <td class="green">green cell</td>
-<td>3.5</td>
-<td class="green">green cell</td>
- <td class="green">green cell</td>
-<td>3.8</td>
-</tr>
-</table>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-75.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-75.xml
deleted file mode 100644
index 996af7b18f7..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-75.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<csstest def="NEGATED :nth-of-type() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="75" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.red { background-color : red }
-p:not(:nth-of-type(3)) { background-color : lime }
-dl &gt; *:not(:nth-of-type(3n+1)) { background-color : lime }
-</cssrules>
-
-<code>
-<p class="red" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background</p>
-<address xmlns="http://www.w3.org/1999/xhtml">And this address should be unstyled.</address>
-<p class="red" xmlns="http://www.w3.org/1999/xhtml">This paragraph should also have green background!</p>
-<p xmlns="http://www.w3.org/1999/xhtml">But this one should be unstyled again.</p>
-<dl xmlns="http://www.w3.org/1999/xhtml">
- <dt>First definition term</dt>
- <dd>First definition</dd>
- <dt class="red">Second definition term that should have green background</dt>
- <dd class="red">Second definition that should have green background</dd>
- <dt class="red">Third definition term that should have green background</dt>
- <dd class="red">Third definition that should have green background</dd>
- <dt>Fourth definition term</dt>
- <dd>Fourth definition</dd>
- <dt class="red">Fifth definition term that should have green background</dt>
- <dd class="red">Fifth definition that should have green background</dd>
- <dt class="red">Sixth definition term that should have green background</dt>
- <dd class="red">Sixth definition that should have green background</dd>
-</dl>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-75b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-75b.xml
deleted file mode 100644
index fae417ee013..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-75b.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<csstest def="NEGATED :nth-of-type() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="75b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.green { background-color : lime ! important }
-p:not(:nth-of-type(3)) { background-color : red }
-dl &gt; *:not(:nth-of-type(3n+1)) { background-color : red }
-</cssrules>
-
-<code>
-<p class="green" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background</p>
-<address xmlns="http://www.w3.org/1999/xhtml">And this address should be unstyled.</address>
-<p class="green" xmlns="http://www.w3.org/1999/xhtml">This paragraph should also have green background!</p>
-<p xmlns="http://www.w3.org/1999/xhtml">But this one should be unstyled again.</p>
-<dl xmlns="http://www.w3.org/1999/xhtml">
- <dt>First definition term</dt>
- <dd>First definition</dd>
- <dt class="green">Second definition term that should have green background</dt>
- <dd class="green">Second definition that should have green background</dd>
- <dt class="green">Third definition term that should have green background</dt>
- <dd class="green">Third definition that should have green background</dd>
- <dt>Fourth definition term</dt>
- <dd>Fourth definition</dd>
- <dt class="green">Fifth definition term that should have green background</dt>
- <dd class="green">Fifth definition that should have green background</dd>
- <dt class="green">Sixth definition term that should have green background</dt>
- <dd class="green">Sixth definition that should have green background</dd>
-</dl>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-76.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-76.xml
deleted file mode 100644
index 4c1caa7abe2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-76.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<csstest def="NEGATED :nth-last-of-type() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="76" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.red { background-color : red }
-p:not(:nth-last-of-type(3)) { background-color : lime }
-dl &gt; *:not(:nth-last-of-type(3n+1)) { background-color : lime }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This paragraph should be unstyled.</p>
-<address xmlns="http://www.w3.org/1999/xhtml">This address should be unstyled.</address>
-<p class="red" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background.</p>
-<p class="red" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background.</p>
-<dl xmlns="http://www.w3.org/1999/xhtml">
- <dt class="red">First definition term that should have green background.</dt>
- <dd class="red">First definition that should also have a green background.</dd>
- <dt class="red">Second definition term that should have green background.</dt>
- <dd class="red">Second definition that should have green background.</dd>
- <dt>Third definition term.</dt>
- <dd>Third definition.</dd>
- <dt class="red">Fourth definition term that should have green background.</dt>
- <dd class="red">Fourth definition that should have green background.</dd>
- <dt class="red">Fifth definition term that should have green background.</dt>
- <dd class="red">Fifth definition that should have green background.</dd>
- <dt>Sixth definition term.</dt>
- <dd>Sixth definition.</dd>
-</dl>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-76b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-76b.xml
deleted file mode 100644
index 089f673ecf4..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-76b.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<csstest def="NEGATED :nth-last-of-type() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="76b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.green { background-color : lime ! important }
-p:not(:nth-last-of-type(3)) { background-color : red }
-dl &gt; *:not(:nth-last-of-type(3n+1)) { background-color : red }
-</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This paragraph should be unstyled.</p>
-<address xmlns="http://www.w3.org/1999/xhtml">This address should be unstyled.</address>
-<p class="green" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background.</p>
-<p class="green" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background.</p>
-<dl xmlns="http://www.w3.org/1999/xhtml">
- <dt class="green">First definition term that should have green background.</dt>
- <dd class="green">First definition that should also have a green background.</dd>
- <dt class="green">Second definition term that should have green background.</dt>
- <dd class="green">Second definition that should have green background.</dd>
- <dt>Third definition term.</dt>
- <dd>Third definition.</dd>
- <dt class="green">Fourth definition term that should have green background.</dt>
- <dd class="green">Fourth definition that should have green background.</dd>
- <dt class="green">Fifth definition term that should have green background.</dt>
- <dd class="green">Fifth definition that should have green background.</dd>
- <dt>Sixth definition term.</dt>
- <dd>Sixth definition.</dd>
-</dl>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-77.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-77.xml
deleted file mode 100644
index e204565968d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-77.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<csstest def="NEGATED :first-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="77" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.red { background-color : red }
-.t1 td:not(:first-child) { background-color : lime }
-p &gt; *:not(:first-child) { background-color : lime }
-table.t1 td { border : thin black solid }
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <table class="t1" border="1">
- <tr>
- <td>1.1</td>
- <td class="red">green cell</td>
- <td class="red">green cell</td>
- </tr>
- <tr>
- <td>2.1</td>
- <td class="red">green cell</td>
- <td class="red">green cell</td>
- </tr>
- <tr>
- <td>3.1</td>
- <td class="red">green cell</td>
- <td class="red">green cell</td>
- </tr>
- </table>
- </div>
- <p xmlns="http://www.w3.org/1999/xhtml">This paragraph <span>should be</span> unstyled.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-77b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-77b.xml
deleted file mode 100644
index 77a6f9b7efd..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-77b.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<csstest def="NEGATED :first-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="77b" rev="1.2" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.green { background-color : lime ! important }
-.t1 td:not(:first-child) { background-color : red }
-p &gt; *:not(:first-child) { background-color : red }
-table.t1 td { border : thin black solid }
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <table class="t1" border="1">
- <tr>
- <td>1.1</td>
- <td class="green">green cell</td>
- <td class="green">green cell</td>
- </tr>
- <tr>
- <td>2.1</td>
- <td class="green">green cell</td>
- <td class="green">green cell</td>
- </tr>
- <tr>
- <td>3.1</td>
- <td class="green">green cell</td>
- <td class="green">green cell</td>
- </tr>
- </table>
- </div>
- <p xmlns="http://www.w3.org/1999/xhtml">This paragraph <span>should be</span> unstyled.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-78.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-78.xml
deleted file mode 100644
index 42dd9ccaf3d..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-78.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<csstest def="NEGATED :last-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="78" rev="1.1" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.red { background-color : red }
-.t1 td:not(:last-child) { background-color : lime }
-p &gt; *:not(:last-child) { background-color : lime }
-table.t1 td { border : thin black solid }
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <table class="t1" border="1">
- <tr>
- <td class="red">green cell</td>
- <td class="red">green cell</td>
- <td>1.3</td>
- </tr>
- <tr>
- <td class="red">green cell</td>
- <td class="red">green cell</td>
- <td>2.3</td>
- </tr>
- <tr>
- <td class="red">green cell</td>
- <td class="red">green cell</td>
- <td>3.3</td>
- </tr>
- </table>
- </div>
- <p xmlns="http://www.w3.org/1999/xhtml">This <span>paragraph should</span> be unstyled.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-78b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-78b.xml
deleted file mode 100644
index 491dcaa7e99..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-78b.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<csstest def="NEGATED :last-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="78b" rev="1.2" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.green { background-color : lime ! important }
-.t1 td:not(:last-child) { background-color : red }
-p &gt; *:not(:last-child) { background-color : red }
-table.t1 td { border : thin black solid }
-</cssrules>
-
-<code>
- <div xmlns="http://www.w3.org/1999/xhtml">
- <table class="t1" border="1">
- <tr>
- <td class="green">green cell</td>
- <td class="green">green cell</td>
- <td>1.3</td>
- </tr>
- <tr>
- <td class="green">green cell</td>
- <td class="green">green cell</td>
- <td>2.3</td>
- </tr>
- <tr>
- <td class="green">green cell</td>
- <td class="green">green cell</td>
- <td>3.3</td>
- </tr>
- </table>
- </div>
- <p xmlns="http://www.w3.org/1999/xhtml">This <span>paragraph should</span> be unstyled.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-79.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-79.xml
deleted file mode 100644
index e0f664373a2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-79.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def="NEGATED :first-of-type pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="79" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-address { margin-bottom : 1em ; margin-left : 1em }
-address:not(:first-of-type) { background-color : lime }
-</cssrules>
-
-<code>
-<div xmlns="http://www.w3.org/1999/xhtml">This div contains 3 addresses :
-<address>A first address with normal background</address>
-<address class="red">A second address that should have a green background</address>
-<address class="red">A third address that should have a green background</address>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7b.xml
deleted file mode 100644
index 51fcccb0ada..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7b.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Attribute multivalue selector" module="W3C Selectors" modulename="css3-modsel" number="7b" rev="1.0" date="1-january-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { background: lime; }
-[title~="hello world"] { background: red; }
-/* Section 6.3.1: Represents the att attribute whose value is a
-space-separated list of words, one of which is exactly "val". If this
-selector is used, the words in the value must not contain spaces
-(since they are separated by spaces). */
-</cssrules>
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" title="hello world">This line should have a green background.</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7c.xml-disabled-due-to-limitations-in-the-build-system b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7c.xml-disabled-due-to-limitations-in-the-build-system
deleted file mode 100644
index 68c5a9fe804..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7c.xml-disabled-due-to-limitations-in-the-build-system
+++ /dev/null
@@ -1,29 +0,0 @@
-<csstest def="Attribute multivalue selector and spaces (title attribute)" module="W3C Selectors" modulename="css3-modsel" number="7c" rev="1.0" date="9-november-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { background: red; }
-[title~="pass"] { background: lime; }
-address { background: lime; }
-[title~="fail"] { background: red; }
-</cssrules>
-
-<!-- XML 1.0 doesn't support the characters on the lines commented out below -->
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" title="test&#x9;pass">This line should have a green background.</p>
- <p xmlns="http://www.w3.org/1999/xhtml" title="test&#xa;pass">This line should have a green background.</p>
- <p xmlns="http://www.w3.org/1999/xhtml" title="test&#xd;pass">This line should have a green background.</p>
- <!-- <p xmlns="http://www.w3.org/1999/xhtml" title="test&#xc;pass">This line should have a green background.</p> -->
- <p xmlns="http://www.w3.org/1999/xhtml" title="test&#x20;pass">This line should have a green background.</p>
- <!-- <address xmlns="http://www.w3.org/1999/xhtml" title="test&#x1;pass">This line should have a green background.</address> -->
- <!-- <address xmlns="http://www.w3.org/1999/xhtml" title="test&#xf;pass">This line should have a green background.</address> -->
- <address xmlns="http://www.w3.org/1999/xhtml" title="test&#xa0;pass">This line should have a green background.</address>
- <address xmlns="http://www.w3.org/1999/xhtml" title="test&#x2003;pass">This line should have a green background.</address>
- <address xmlns="http://www.w3.org/1999/xhtml" title="test&#x202f;pass">This line should have a green background.</address>
- <address xmlns="http://www.w3.org/1999/xhtml" title="test&#x3000;pass">This line should have a green background.</address>
- <address xmlns="http://www.w3.org/1999/xhtml" title="test&#x10020;pass">This line should have a green background.</address>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7d.xml-disabled-due-to-limitations-in-the-build-system b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7d.xml-disabled-due-to-limitations-in-the-build-system
deleted file mode 100644
index 61faff54274..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-7d.xml-disabled-due-to-limitations-in-the-build-system
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.1"?>
-<csstest def="Attribute multivalue selector and spaces (class attribute)" module="W3C Selectors" modulename="css3-modsel" number="7d" rev="1.0" date="9-november-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<cssrules>
-p { background: red; }
-[class~="pass"] { background: lime; }
-address { background: lime; }
-[class~="fail"] { background: red; }
-</cssrules>
-
-<!-- XML 1.0 doesn't support the characters on the lines commented out below -->
-
-<code>
- <p xmlns="http://www.w3.org/1999/xhtml" class="test&#x9;pass">This line should have a green background.</p>
- <p xmlns="http://www.w3.org/1999/xhtml" class="test&#xa;pass">This line should have a green background.</p>
- <p xmlns="http://www.w3.org/1999/xhtml" class="test&#xd;pass">This line should have a green background.</p>
- <!-- <p xmlns="http://www.w3.org/1999/xhtml" class="test&#xc;pass">This line should have a green background.</p> -->
- <p xmlns="http://www.w3.org/1999/xhtml" class="test&#x20;pass">This line should have a green background.</p>
- <!-- <address xmlns="http://www.w3.org/1999/xhtml" class="test&#x1;pass">This line should have a green background.</address> -->
- <!-- <address xmlns="http://www.w3.org/1999/xhtml" class="test&#xf;pass">This line should have a green background.</address> -->
- <address xmlns="http://www.w3.org/1999/xhtml" class="test&#xa0;pass">This line should have a green background.</address>
- <address xmlns="http://www.w3.org/1999/xhtml" class="test&#x2003;pass">This line should have a green background.</address>
- <address xmlns="http://www.w3.org/1999/xhtml" class="test&#x202f;pass">This line should have a green background.</address>
- <address xmlns="http://www.w3.org/1999/xhtml" class="test&#x3000;pass">This line should have a green background.</address>
- <address xmlns="http://www.w3.org/1999/xhtml" class="test&#x10020;pass">This line should have a green background.</address>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-8.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-8.xml
deleted file mode 100644
index 8ad15c3ed3f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-8.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="Attribute value selectors (hyphen-separated attributes)" module="W3C Selectors" modulename="css3-modsel" number="8" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>p { background-color : red }
-p[lang|="en"] { background-color : lime }
-address { background-color : red }
-address[lang="fi"] { background-color : lime }
-span[lang|="fr"] { background-color : red }</cssrules>
-
-<code>
-<p lang="en-gb" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have green background because its language is "en-gb"</p>
-<address lang="fi" xmlns="http://www.w3.org/1999/xhtml">
-<span lang="en-us">This address should also</span>
- <span lang="en-fr">have green background because the language of the inner SPANs
- is not French.</span>
-</address>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-80.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-80.xml
deleted file mode 100644
index 9199f4b5bd0..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-80.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="NEGATED :last-of-type pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="80" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>.red { background-color : red }
-address { margin-bottom : 1em ; margin-left : 1em }
-address:not(:last-of-type) { background-color : lime }
-</cssrules>
-<code>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<address class="red">A first address that should have a green background</address>
-<address class="red">A second address that should have a green background</address>
-<address>A third address with normal background</address>
-This div should have three addresses above it.</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-81.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-81.xml
deleted file mode 100644
index 2e16fdb3b90..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-81.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="NEGATED :only-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="81" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.red { background-color : red }
-p:not(:only-child) { background-color : lime }
-div.testText &gt; div &gt; p { margin-left : 1em }
-</cssrules>
-<code>
- <p class="red" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
- <div xmlns="http://www.w3.org/1999/xhtml">This div contains only one paragraph.
- <p>This paragraph should be unstyled.</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-81b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-81b.xml
deleted file mode 100644
index 3d70619eb95..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-81b.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="NEGATED :only-child pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="81b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.green { background-color : lime ! important }
-p:not(:only-child) { background-color : lime }
-div.testText &gt; div &gt; p { margin-left : 1em }
-</cssrules>
-<code>
- <p class="green" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
- <div xmlns="http://www.w3.org/1999/xhtml">This div contains only one paragraph.
- <p>This paragraph should be unstyled.</p>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-82.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-82.xml
deleted file mode 100644
index 180aa135583..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-82.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="NEGATED :only-of-type pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="82" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.red { background-color : red }
-.t1 *:not(:only-of-type) { background-color : lime }
-</cssrules>
-<code>
-<div class="t1" xmlns="http://www.w3.org/1999/xhtml">
-<p class="red">This paragraph should have green background.</p>
-<address>But this address should be unstyled.</address>
-<p class="red">This paragraph should have green background.</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-82b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-82b.xml
deleted file mode 100644
index 388a7e0dbd5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-82b.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<csstest def="NEGATED :only-of-type pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="82b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-<cssrules>.green { background-color : lime ! important }
-.t1 *:not(:only-of-type) { background-color : red }
-</cssrules>
-<code>
-<div class="t1" xmlns="http://www.w3.org/1999/xhtml">
-<p class="green">This paragraph should have green background.</p>
-<address>But this address should be unstyled.</address>
-<p class="green">This paragraph should have green background.</p>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-83.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-83.xml
deleted file mode 100644
index 07f6c1211b7..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-83.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<csstest def="Negation pseudo-class cannot be an argument of itself" module="W3C Selectors" modulename="css3-modsel" number="83" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>p { background-color : lime }
-p:not(:not(p)) { background-color : red }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-84.xml-disabled-contains-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-84.xml-disabled-contains-removed
deleted file mode 100644
index 9a19e01f486..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-84.xml-disabled-contains-removed
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def=":contains() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="84" rev="1.2" date="29-september-2005" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>div.stub *:contains("agree") { background-color : lime }
-.red { background-color : red }</cssrules>
-
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p class="red">There is no disagreement over the fact that this paragraph should have a green background.</p>
- <ul class="red">
- <li>All the text in this list should have a</li><li>green background throughout as well.</li>
- </ul>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-84b.xml-disabled-contains-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-84b.xml-disabled-contains-removed
deleted file mode 100644
index fbb0f06a698..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-84b.xml-disabled-contains-removed
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def=":contains() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="84b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>.green { background-color : lime }
-div.stub *:contains("agree") { background-color : red }</cssrules>
-
-<code>
- <div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p class="green">This paragraph should have a green background.</p>
- <ul class="green">
- <li>This list should also have a</li>
-<li>green background throughout.</li>
- </ul>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-85.xml-disabled-contains-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-85.xml-disabled-contains-removed
deleted file mode 100644
index 2021bd8fba6..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-85.xml-disabled-contains-removed
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="NEGATED :contains() pseudo-class" module="W3C Selectors" modulename="css3-modsel" number="85" rev="1.2" date="29-september-2005" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>div.stub *:not(:contains("red")) { background-color: lime; }
-.red { background-color: red; }</cssrules>
-
-<code>
-<div class="stub" xmlns="http://www.w3.org/1999/xhtml">
- <p class="red">This paragraph should have a green background.</p>
- <ul class="red">
- <li>All the text in this list should have a</li>
- <li>green background throughout as well.</li>
- </ul>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-86.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-86.xml
deleted file mode 100644
index cb55d9fca49..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-86.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<csstest def="Nondeterministic matching of descendant and child combinators" module="W3C Selectors" modulename="css3-modsel" number="86" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>p { color: red; }
-blockquote &gt; div p { color: green; }
-</cssrules>
-<t:code xmlns:t="http://www.example.org/css3tests" xmlns="http://www.w3.org/1999/xhtml">
-<blockquote>
-<div>
-<div>
-<p>This text should be green.</p>
-</div>
-</div>
-</blockquote>
-</t:code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-87.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-87.xml
deleted file mode 100644
index 377fbb601c4..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-87.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Nondeterministic matching of direct and indirect adjacent combinators" module="W3C Selectors" modulename="css3-modsel" number="87" rev="1.2" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { color: red; }
-blockquote + div ~ p { color: green; }</cssrules>
-<code>
-<blockquote xmlns="http://www.w3.org/1999/xhtml"><div>This text should be unstyled.</div></blockquote>
-<div xmlns="http://www.w3.org/1999/xhtml">This text should be unstyled.</div>
-<div xmlns="http://www.w3.org/1999/xhtml">This text should be unstyled.</div>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-87b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-87b.xml
deleted file mode 100644
index 0e0861f17e1..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-87b.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Nondeterministic matching of direct and indirect adjacent combinators" module="W3C Selectors" modulename="css3-modsel" number="87b" rev="1.2" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { color: green ! important; }
-blockquote + div ~ p { color: red; }</cssrules>
-<code>
-<blockquote xmlns="http://www.w3.org/1999/xhtml"><div>This text should be unstyled.</div></blockquote>
-<div xmlns="http://www.w3.org/1999/xhtml">This text should be unstyled.</div>
-<div xmlns="http://www.w3.org/1999/xhtml">This text should be unstyled.</div>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-88.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-88.xml
deleted file mode 100644
index f9795eabf91..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-88.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def="Nondeterministic matching of descendant and direct adjacent combinators" module="W3C Selectors" modulename="css3-modsel" number="88" rev="1.2" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { color: red; }
-blockquote + div p { color: green; }</cssrules>
-<code>
-<blockquote xmlns="http://www.w3.org/1999/xhtml"><div>This text should be unstyled.</div></blockquote>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<div>
-<p>This text should be green.</p>
-</div>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-88b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-88b.xml
deleted file mode 100644
index 97a8a654d93..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-88b.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def="Nondeterministic matching of descendant and direct adjacent combinators" module="W3C Selectors" modulename="css3-modsel" number="88b" rev="1.2" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { color: green ! important; }
-blockquote + div p { color: red; }</cssrules>
-<code>
-<blockquote xmlns="http://www.w3.org/1999/xhtml"><div>This text should be unstyled.</div></blockquote>
-<div xmlns="http://www.w3.org/1999/xhtml">
-<div>
-<p>This text should be green.</p>
-</div>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-89.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-89.xml
deleted file mode 100644
index 48aca00df9e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-89.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<csstest def="Simple combination of descendant and child combinators" module="W3C Selectors" modulename="css3-modsel" number="89" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>p { color: red; }
-blockquote div &gt; p { color: green; }</cssrules>
-<code>
-<blockquote xmlns="http://www.w3.org/1999/xhtml">
-<div>
-<div>
-<p>This text should be green.</p>
-</div>
-</div>
-</blockquote>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-9.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-9.xml
deleted file mode 100644
index 17c5faa589e..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-9.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<csstest def="Substring matching attribute selector (beginning)" module="W3C Selectors" modulename="css3-modsel" number="9" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<cssrules>p { background-color : red }
-p[title^="foo"] { background-color : lime }</cssrules>
-
-<code>
-<p title="foobar" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background<br/>
-because its title attribute begins with "foo"</p>
-</code>
-
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-90.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-90.xml
deleted file mode 100644
index 3269a9c9397..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-90.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Simple combination of direct and indirect adjacent combinators" module="W3C Selectors" modulename="css3-modsel" number="90" rev="1.3" date="29-may-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { color: red; }
-blockquote ~ div + p { color: green; }</cssrules>
-<code>
-<blockquote xmlns="http://www.w3.org/1999/xhtml"><div>This text should be unstyled.</div></blockquote>
-<div xmlns="http://www.w3.org/1999/xhtml">This text should be unstyled.</div>
-<div xmlns="http://www.w3.org/1999/xhtml">This text should be unstyled.</div>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-90b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-90b.xml
deleted file mode 100644
index cc6303e0e5b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-90b.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<csstest def="Simple combination of direct and indirect adjacent combinators" module="W3C Selectors" modulename="css3-modsel" number="90b" rev="1.2" date="3-march-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>p { color: green ! important; }
-blockquote ~ div + p { color: red; }</cssrules>
-<code>
-<blockquote xmlns="http://www.w3.org/1999/xhtml"><div>This text should be unstyled.</div></blockquote>
-<div xmlns="http://www.w3.org/1999/xhtml">This text should be unstyled.</div>
-<div xmlns="http://www.w3.org/1999/xhtml">This text should be unstyled.</div>
-<p xmlns="http://www.w3.org/1999/xhtml">This text should be green.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-91.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-91.xml
deleted file mode 100644
index 64db9e8fd07..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-91.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<csstest def="Type element selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="91" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace test url(http://www.example.org/a);
-testa { background-color : red }
-test|testa { background-color : lime }</cssrules>
-<code>
-<testa xmlns="http://www.example.org/a">This paragraph should have a green background</testa>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-92.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-92.xml
deleted file mode 100644
index 66995165f76..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-92.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<csstest def="Type element selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="92" rev="1.0" date="11-july-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-<author>Daniel Glazman</author>
-
-<cssrules>@namespace test url(http://www.example.org/b);
-div.myTest * { background-color : red }
-div.myTest *|testA { background-color : lime }</cssrules>
-
-<code>
-<div class="myTest" xmlns="http://www.w3.org/1999/xhtml">
-<testA xmlns="http://www.example.org/b">This paragraph should have a green background</testA>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-93.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-93.xml
deleted file mode 100644
index d27bc764648..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-93.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<csstest def="Type element selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="93" rev="1.1" date="13-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace test url(http://www.example.org/b);
-*|testA { background-color : red }
-|testA {background-color : lime }</cssrules>
-
-<code>
-<testA xmlns="">This paragraph has no declared namespace and should have a green background.</testA>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-94.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-94.xml
deleted file mode 100644
index 3182eedd5b9..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-94.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Universal selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="94" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-p, q { display : block ; margin-bottom : 1em }
-b|* { background-color : lime }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This line should be unstyled.</p>
-<p xmlns="http://www.example.org/b">This line should have a green background.</p>
-<q xmlns="http://www.example.org/b">This line should have a green background.</q>
-<p xmlns="http://www.example.org/a">This line should be unstyleed.</p>
-<p xmlns="http://www.example.org/b">This line should have a green background.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-94b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-94b.xml
deleted file mode 100644
index 683af54fd62..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-94b.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="Universal selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="94b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-p, q { display : block ; margin-bottom : 1em }
-b|* { background-color : red }
-[test] { background-color: lime; }</cssrules>
-
-<code>
-<p xmlns="http://www.w3.org/1999/xhtml">This line should be unstyled.</p>
-<p xmlns="http://www.example.org/b" test="test">This line should have a green background.</p>
-<q xmlns="http://www.example.org/b" test="test">This line should have a green background.</q>
-<p xmlns="http://www.example.org/a">This line should be unstyled.</p>
-<p xmlns="http://www.example.org/b" test="test">This line should have a green background.</p>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-95.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-95.xml
deleted file mode 100644
index c501fecd110..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-95.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Universal selector with universal namespace" module="W3C Selectors" modulename="css3-modsel" number="95" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.test * { background-color : red ; display : block ; margin-bottom : 1em }
-div.test *|* { background-color : lime }</cssrules>
-
-<code>
- <div class="test" xmlns="http://www.w3.org/1999/xhtml">
- <p>This line should have a green background</p>
- <p xmlns="http://www.example.org/b">This line should have a green background</p>
- <q xmlns="http://www.example.org/b">This line should have a green background</q>
- <p xmlns="http://www.example.org/a">This line should have a green background</p>
- <foo xmlns="http://www.example.org/b">This line should have a green background</foo>
- </div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-96.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-96.xml
deleted file mode 100644
index 3675657022f..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-96.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def="Universal selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="96" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.green * { background-color : red }
-div.test * { display : block ; margin-bottom : 1em }
-div.test |* { background-color : lime }</cssrules>
-
-<code>
-<div class="test" xmlns="http://www.w3.org/1999/xhtml">
- <p>This line should be unstyled.</p>
- <elementA xmlns="http://www.example.org/a">This line should be unstyled.</elementA>
- <elementB xmlns="http://www.example.org/b">This line should be unstyled.</elementB>
- <div class="green">
- <p xmlns="">This line should have a green background</p>
- <elementA xmlns="">This line should have a green background</elementA>
- <elementB xmlns="">This line should have a green background</elementB>
- </div>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-96b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-96b.xml
deleted file mode 100644
index 415115970c0..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-96b.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<csstest def="Universal selector without declared namespace" module="W3C Selectors" modulename="css3-modsel" number="96b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-div.green * { background-color : lime ! important }
-div.test * { display : block ; margin-bottom : 1em }
-div.test |* { background-color : red }</cssrules>
-
-<code>
-<div class="test" xmlns="http://www.w3.org/1999/xhtml">
- <p>This line should be unstyled.</p>
- <elementA xmlns="http://www.example.org/a">This line should be unstyled.</elementA>
- <elementB xmlns="http://www.example.org/b">This line should be unstyled.</elementB>
- <div class="green">
- <p xmlns="">This line should have a green background</p>
- <elementA xmlns="">This line should have a green background</elementA>
- <elementB xmlns="">This line should have a green background</elementB>
- </div>
-</div>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-97.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-97.xml
deleted file mode 100644
index bcfddc6ff34..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-97.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Attribute existence selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="97" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-*|p, *|q, *|r { display : block ; margin-bottom : 1em }
-*|q { background-color : red }
-*[a|title] {background-color : lime }
-</cssrules>
-
-<code>
- <p title="a paragraph" xmlns="http://www.w3.org/1999/xhtml">This paragraph should be unstyled.</p>
- <q a:title="a paragraph" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
- <r b:title="a paragraph" xmlns="http://www.example.org/b">This paragraph should be unstyled.</r>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-97b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-97b.xml
deleted file mode 100644
index 684b97e470c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-97b.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<csstest def="Attribute existence selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="97b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-*|p, *|q, *|r { display : block ; margin-bottom : 1em }
-*|q { background-color : lime ! important }
-*[a|title] {background-color : red }
-</cssrules>
-
-<code>
- <p title="a paragraph" xmlns="http://www.w3.org/1999/xhtml">This paragraph should be unstyled.</p>
- <q a:title="a paragraph" xmlns="http://www.example.org/a">This paragraph should have a green background.</q>
- <r b:title="a paragraph" xmlns="http://www.example.org/b">This paragraph should be unstyled.</r>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-98.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-98.xml
deleted file mode 100644
index f8a7ea055f5..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-98.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Attribute value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="98" rev="1.2" date="7-february-2004" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q, *|t { background-color : red }
-*[a|title="foo"] {background-color : lime }
-*[a|title=footwo] {background-color : lime }
-</cssrules>
-
-<code>
- <p title="foo" xmlns="http://www.w3.org/1999/xhtml">This paragraph should be unstyled.</p>
- <q a:title="foo" xmlns="http://www.example.org/a">This paragraph should have a green background</q>
- <s a:title="foobar" xmlns="http://www.example.org/a">This paragraph should be unstyled.</s>
- <r b:title="foo" xmlns="http://www.example.org/b">This paragraph should be unstyled.</r>
- <t a:title="footwo" xmlns="http://www.example.org/a">This paragraph should have a green background</t>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-98b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-98b.xml
deleted file mode 100644
index b9ac686f2d2..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-98b.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<csstest def="Attribute value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="98b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|q { background-color : lime ! important }
-*[a|title="foo"] {background-color : red }
-</cssrules>
-
-<code>
- <p title="foo" xmlns="http://www.w3.org/1999/xhtml">This paragraph should be unstyled.</p>
- <q a:title="foo" xmlns="http://www.example.org/a">This paragraph should have a green background</q>
- <s a:title="foobar" xmlns="http://www.example.org/a">This paragraph should be unstyled.</s>
- <r b:title="foo" xmlns="http://www.example.org/b">This paragraph should be unstyled.</r>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-99.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-99.xml
deleted file mode 100644
index f5e88ecb543..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-99.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<csstest def="Attribute space-separated value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="99" rev="1.2" date="22-june-2003" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : red }
-*|*[a|foo~="bar"], *|*[|class~="bar"] { background-color : lime }
-*|*[html|class~="bar"] { background-color : red }
-</cssrules>
-
-<code>
- <p class="t bar u" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
- <q a:foo="hgt bardot f" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
- <r a:foo="hgt bar f" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
- <s b:foo="hgt bar f" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-99b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-99b.xml
deleted file mode 100644
index 30fb0021bc1..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-99b.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<csstest def="Attribute space-separated value selector with declared namespace" module="W3C Selectors" modulename="css3-modsel" number="99b" rev="1.1" date="12-november-2001" xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.example.org/css3tests">
-
-<author>Daniel Glazman</author>
-<author>Ian Hickson</author>
-
-<cssrules>@namespace a url(http://www.example.org/a);
-@namespace b url(http://www.example.org/b);
-@namespace html url(http://www.w3.org/1999/xhtml);
-*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
-*|p, *|r { background-color : lime ! important }
-*|*[a|foo~="bar"], *|*[html|class~="bar"] { background-color : red }
-</cssrules>
-
-<code>
- <p class="t bar u" xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
- <q a:foo="hgt bardot f" xmlns="http://www.example.org/a">This paragraph should be unstyled.</q>
- <r a:foo="hgt bar f" xmlns="http://www.example.org/a">This paragraph should have a green background.</r>
- <s b:foo="hgt bar f" xmlns="http://www.example.org/b">This paragraph should be unstyled.</s>
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d1.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d1.xml
deleted file mode 100644
index 06b98529876..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d1.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<csstest def="NEGATED Dynamic handling of :empty" module="W3C Selectors" modulename="css3-modsel" number="d1" rev="1.1" date="3-march-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- #test { background: red; display: block; padding: 1em; }
- #test:not(:empty) { background: lime; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- document.getElementById('test').appendChild(document.createTextNode('This line should be green.'));
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <p> The following bar should be green. </p>
-
- <div id="test"/>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d1b.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d1b.xml
deleted file mode 100644
index caf7ae8a8ad..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d1b.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<csstest def="Dynamic handling of :empty" module="W3C Selectors" modulename="css3-modsel" number="d1b" rev="1.1" date="3-march-2006" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- #test1 { background: red; display: block; padding: 1em; margin: 1em; }
- #test1:empty { background: lime; }
- #test2 { background: lime; display: block; padding: 1em; margin: 1em; }
- #test2:empty { background: red; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- document.getElementById('test1').appendChild(document.createTextNode(''));
- document.getElementById('test2').appendChild(document.createTextNode(' '));
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <p> The following two bars should be green. </p>
-
- <div id="test1"/>
- <div id="test2"/>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d2.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d2.xml
deleted file mode 100644
index 927c92c51ea..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d2.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<csstest def="Dynamic handling of combinators" module="W3C Selectors" modulename="css3-modsel" number="d2" rev="1.1" date="3-march-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- #test { background: red; display: block; padding: 1em; }
- #stub ~ div div + div > div { background: lime; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <test:restrict xmlns:test="http://www.example.org/css3tests" for="xml xhtml">
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- el = document.getElementById('test');
- el.parentNode.parentNode.insertBefore(document.createElementNS('http://www.w3.org/1999/xhtml', 'div'), el.parentNode);
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
- </test:restrict>
-
- <test:restrict xmlns:test="http://www.example.org/css3tests" for="html">
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- el = document.getElementById('test');
- el.parentNode.parentNode.insertBefore(document.createElement('div'), el.parentNode);
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
- </test:restrict>
-
- <p> The following bar should be green. </p>
-
- <div id="stub"/>
- <div/>
- <div><div><!-- <div/> --><div><div id="test"/></div></div></div>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d3.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d3.xml
deleted file mode 100644
index ba8956cc82c..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d3.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<csstest def="Dynamic handling of attribute selectors" module="W3C Selectors" modulename="css3-modsel" number="d3" rev="1.3" date="24-february-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- [test] { background: red; display: block; padding: 1em; }
- stub ~ [|attribute^=start]:not([|attribute~=mid])[|attribute*=dle][|attribute$=end] ~ t { background: lime; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- document.getElementsByTagNameNS('', 't')[1].setAttributeNS('', 'attribute', 'start middle end');
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <p> The following block should be green. </p>
-
- <!-- root of selector -->
- <stub xmlns=""/>
-
- <!-- middle part of selector does not match this -->
- <t xmlns="" attribute="fake"/>
-
- <!-- middle part of selector matches this once attribute is fixed -->
- <t xmlns="" attribute="start mid dle end"/>
-
- <!-- subject of selector -->
- <t xmlns="" test="test"/>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d4.xml b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d4.xml
deleted file mode 100644
index 4d1050a4231..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d4.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<csstest def="Dynamic updating of :first-child and :last-child" module="W3C Selectors" modulename="css3-modsel" number="d4" rev="1.1" date="3-march-2004" xmlns="http://www.example.org/css3tests">
-
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- #two:first-child { background: red; }
- #three:last-child { background: lime; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- el2 = document.getElementById('two');
- el3 = document.getElementById('three');
- el2.parentNode.insertBefore(el3.nextSibling, el2);
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <div><p id="two">This line should be unstyled. (2)</p><p id="three">This line should have a green background. (3)</p><p>This line should be unstyled. (4 moving to 1)</p></div>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5.xml-removed
deleted file mode 100644
index 70c9e120091..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5.xml-removed
+++ /dev/null
@@ -1,35 +0,0 @@
-<csstest def=":indeterminate" module="W3C Selectors" modulename="css3-modsel" number="d5" rev="1.1" date="20-october-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Tantek &#x00C7;elik</author>
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- input, span { background:red }
- input:indeterminate, input:indeterminate + span { background:green; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- /* Technically not part of DOM1 HTML but Tantek assures me that
- is an oversight... */
- document.getElementById("test").indeterminate = true;
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <p> <input id="test" type="checkbox"/> <span>Everything in this paragraph should have a green background.</span> </p>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5a.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5a.xml-removed
deleted file mode 100644
index e57f5e67914..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5a.xml-removed
+++ /dev/null
@@ -1,35 +0,0 @@
-<csstest def=":indeterminate and :checked" module="W3C Selectors" modulename="css3-modsel" number="d5a" rev="1.1" date="20-october-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Tantek &#x00C7;elik</author>
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- input, span { background: green; }
- input:checked, input:checked + span { background: red; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- /* Technically not part of DOM1 HTML but Tantek assures me that
- is an oversight... */
- document.getElementById("test").indeterminate = true;
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <p> <input id="test" type="checkbox"/> <span>Everything in this paragraph should have a green background.</span> </p>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5b.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5b.xml-removed
deleted file mode 100644
index b8114fabca6..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5b.xml-removed
+++ /dev/null
@@ -1,36 +0,0 @@
-<csstest def="NEGATED :indeterminate and :checked" module="W3C Selectors" modulename="css3-modsel" number="d5b" rev="1.1" date="24-february-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Tantek &#x00C7;elik</author>
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- input, span { background: red; }
- input:not(:checked), input:not(:checked) + span { background: green; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- /* Microsoft specs for .indeterminate say that this is an invalid test
- as an element can be both .checked and .indeterminate; however the
- selectors spec says no element can be :checked:indeterminate. */
- document.getElementById("test").indeterminate = true;
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <p> <input id="test" type="checkbox" checked="checked"/> <span>Everything in this paragraph should have a green background.</span> </p>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5c.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5c.xml-removed
deleted file mode 100644
index a568e301d51..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5c.xml-removed
+++ /dev/null
@@ -1,37 +0,0 @@
-<csstest def=":indeterminate and :checked" module="W3C Selectors" modulename="css3-modsel" number="d5c" rev="1.1" date="24-february-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Tantek &#x00C7;elik</author>
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- input, span { background:red }
- input:not(:indeterminate), input:not(:indeterminate) + span { background:green; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- /* Microsoft specs for .indeterminate say that this is an invalid test
- as an element can be both .checked and .indeterminate; however the
- selectors spec says no element can be :checked:indeterminate. */
- document.getElementById("test").indeterminate = true;
- document.getElementById("test").checked = true;
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <p> <input id="test" type="checkbox"/> <span>Everything in this paragraph should have a green background.</span> </p>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5d.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5d.xml-removed
deleted file mode 100644
index a8343d6ab83..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5d.xml-removed
+++ /dev/null
@@ -1,36 +0,0 @@
-<csstest def=":indeterminate with :checked" module="W3C Selectors" modulename="css3-modsel" number="d5d" rev="1.2" date="20-october-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Tantek &#x00C7;elik</author>
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- input, span { background: green; }
- input:indeterminate:checked, input:indeterminate:checked + span { background: red; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- /* Microsoft specs for .indeterminate say that this is an invalid test
- as an element can be both .checked and ,indeterminate; however the
- selectors spec says no element can be :checked:indeterminate. */
- document.getElementById("test").indeterminate = true;
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <p> <input id="test" type="checkbox" checked="checked"/> <span>Everything in this paragraph should have a green background.</span> </p>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5e.xml-removed b/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5e.xml-removed
deleted file mode 100644
index ffe1b1a019b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/css3-modsel-d5e.xml-removed
+++ /dev/null
@@ -1,33 +0,0 @@
-<csstest def="NEGATED :indeterminate with :checked" module="W3C Selectors" modulename="css3-modsel" number="d5e" rev="1.2" date="20-october-2005" xmlns="http://www.example.org/css3tests">
-
-<author>Tantek &#x00C7;elik</author>
-<author>Ian Hickson</author>
-
-<dynamic/>
-
-<cssrules>
- input, span { background:red }
- input:not(:indeterminate):not(:checked), input:not(:indeterminate):not(:checked) + span { background:green; }
-</cssrules>
-
-<code>
-
- <div xmlns="http://www.w3.org/1999/xhtml">
-
- <script type="text/javascript">
- <![CDATA[
-
- function test() {
- document.getElementById("test").checked = false;
- }
-
- window.setTimeout("test()", 100);
- ]]>
- </script>
-
- <p> <input id="test" type="checkbox" checked="checked"/> <span>Everything in this paragraph should have a green background.</span> </p>
-
- </div>
-
-</code>
-</csstest>
diff --git a/tests/wpt/web-platform-tests/css/selectors/generate.pl b/tests/wpt/web-platform-tests/css/selectors/generate.pl
deleted file mode 100644
index 812dd7a1126..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/generate.pl
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/perl -w
-##############################################################################
-# W3C Test Suite Generator #
-##############################################################################
-package main;
-use strict;
-use diagnostics;
-use XML::Parser; # DEPENDENCY
-use lib '.';
-use utils::parser;
-use utils::helpers;
-use utils::generators;
-
-# check arguments
-# if argument 1 is '-v' then print out the value of second argument, which will be one of:
-# - DESTINATION_TYPES
-# - SHELL_TYPES
-# - TEST_TYPES
-
-if (scalar(@ARGV) == 1 and ($ARGV[0] eq '-h' or $ARGV[0] eq '--help')) {
- print "Syntax: generateTests.pl -v VARIABLE_NAME or generateTests.pl test1.xml test2,xml ...\n";
- return 0;
-} elsif (scalar(@ARGV) > 0 and $ARGV[0] eq '-v') {
- if (scalar(@ARGV) == 2) {
- print $utils::helpers::types{$ARGV[1]};
- exit 0;
- } else {
- my @vars = keys(%utils::helpers::types);
- local $" = '\', \'';
- print "You must specify which variable to display in the form '-v VARIABLE_NAME',\nwhere VARIABLE_NAME is one of '@vars'.\n";
- exit 1;
- }
-}
-
-# otherwise, process arguments as filenames:
-my %cache = %{&utils::helpers::readCache()};
-while (scalar(@ARGV)) {
- # read file
- local $/ = undef;
- my $file = <>;
- close(ARGV);
- # print status
- my $filename = $ARGV;
- $filename =~ s/\.[a-z]+$//o; # remove extension
- print "parsing $filename...\n";
- # process file
- $cache{$filename} = XML::Parser->new(Style => 'utils::parser', Namespaces => 1, ErrorContext => 1)->parse($file);
- die "$filename: modulename/number attributes wrong ('$cache{$filename}->{modulename}-$cache{$filename}->{number}')\n" if $filename ne "$cache{$filename}->{modulename}-$cache{$filename}->{number}";
-}
-&utils::helpers::writeCache(\%cache);
-
-print "generating tests...\n";
-# ...and generate the tests
-&utils::generators::generateTopIndex(\%cache); # points to mini test index and all test type indexes
-foreach my $destinationType (split ' ', $utils::helpers::types{'DESTINATION_TYPES'}) {
- my @destinationTests = &utils::helpers::shortlistTestsForDestination($destinationType,
- [ sort {
- my $na = $cache{$a}->{'number'};
- my $nb = $cache{$b}->{'number'};
- for my $n ($na, $nb) {
- $n =~ m/^([0-9]*(?:\.[0-9]+)?)/o;
- $n = $1;
- }
- if (($na ne '') and ($nb ne '')) {
- return (($na <=> $nb) or ($cache{$a}->{'number'} cmp $cache{$b}->{'number'}) or ($a cmp $b));
- } else {
- return (($cache{$a}->{'number'} cmp $cache{$b}->{'number'}) or ($a cmp $b));
- }
- } keys(%cache) ], \%cache);
- # generate primary index
- &utils::generators::generateSubIndex($destinationType, \@destinationTests, \%cache); # points to mini test index and all test type indexes
- # generate complete mini test index
- &utils::generators::generateMiniTestIndex($destinationType, \@destinationTests, \%cache); # points to all mini tests
- # generate mini tests
- foreach my $testIndex (0..$#destinationTests) {
- # generate mini test and CSS if needed
- &utils::generators::generateMiniTest($destinationType, \@destinationTests, \%cache, $testIndex);
- }
- # generate flat tests and shells
- foreach my $testType (split ' ', $utils::helpers::types{'TEST_TYPES'}) {
- my @finalTestList = &utils::helpers::shortlistTestsForTypes($testType, \@destinationTests, \%cache);
- # generate test type index
- &utils::generators::generateTestTypeIndex($destinationType, $testType, \@finalTestList, \%cache); # points to flat test index and each shell index
- # generate flat test index
- &utils::generators::generateFlatTestIndex($destinationType, $testType, \@finalTestList, \%cache); # points to flat tests
- foreach my $shell (split ' ', $utils::helpers::types{'SHELL_TYPES'}) {
- # generate shell index
- &utils::generators::generateShellTestIndex($destinationType, $testType, $shell, \@finalTestList, \%cache); # points to shell tests
- }
- foreach my $testIndex (0..$#finalTestList) {
- # generate flat test
- &utils::generators::generateFlatTest($destinationType, $testType, \@finalTestList, \%cache, $testIndex);
- foreach my $shell (split ' ', $utils::helpers::types{'SHELL_TYPES'}) {
- # generate shell
- &utils::generators::generateShell($destinationType, $testType, $shell, \@finalTestList, \%cache, $testIndex);
- }
- }
- }
-}
-# generate latest changes log
-foreach my $test (sort { $a->{date} cmp $b->{date} } values %cache) {
- print "$test->{date} ($test->{rev}): $test->{modulename}-$test->{number} - $test->{def}\n";
-}
-print "done\n";
-
-##############################################################################
diff --git a/tests/wpt/web-platform-tests/css/selectors/historical-xmlid.xht b/tests/wpt/web-platform-tests/css/selectors/historical-xmlid.xht
new file mode 100644
index 00000000000..7916d9c1203
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/historical-xmlid.xht
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>No xml:id support</title>
+ <link rel="help" href="https://drafts.csswg.org/selectors-4/#id-selectors"/>
+ <link rel="help" href="https://dom.spec.whatwg.org/#concept-id"/>
+ <link rel="match" href="../reference/ref-filled-green-100px-square.xht"/>
+ <style type="text/css"><![CDATA[
+ div {
+ background: green;
+ height: 100px;
+ width: 100px;
+ }
+ #a {
+ background: red;
+ }
+ ]]></style>
+ </head>
+ <body>
+ <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+ <div xml:id="a"></div>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/htaccess b/tests/wpt/web-platform-tests/css/selectors/htaccess
deleted file mode 100644
index c91ca1c3e52..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/htaccess
+++ /dev/null
@@ -1 +0,0 @@
-AddDefaultCharset utf-8
diff --git a/tests/wpt/web-platform-tests/css/selectors/html-full.css b/tests/wpt/web-platform-tests/css/selectors/html-full.css
deleted file mode 100644
index fa306e5c535..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/html-full.css
+++ /dev/null
@@ -1,59 +0,0 @@
-/* same as xhtml.css minus namespace stuff */
-
-pre.rules {
- border : 1px solid black ;
- padding : 5px
-}
-
-.WARNING {
- background-color: black;
- color: white;
- font-weight: bold;
- margin-top: 1em;
-}
-
-div.testSource {
- border: thin black solid;
- padding-left: 1em;
- padding-right: 1em;
-}
-
-div.testDescription {
- border: thin black solid;
- background-color: red;
-}
-
-.testDescription {
- margin-top: 1em;
- width: 100%;
- border: thin solid black;
-}
-
-.testDescription th,
-.testDescription td {
- text-align: center;
-}
-
-.testDescription th {
- background-color: silver;
-}
-
-.testDescription .a {
- width: 25%;
-}
-
-.testDescription .b {
- width: 50%;
-}
-
-.testDescription .c {
- width: 100%;
-}
-
-div.validator {
- margin-top: 1em;
-}
-
-div.validator img {
- border-width : 0;
-}
diff --git a/tests/wpt/web-platform-tests/css/selectors/html-shell.css b/tests/wpt/web-platform-tests/css/selectors/html-shell.css
deleted file mode 100644
index 1c23986cc7b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/html-shell.css
+++ /dev/null
@@ -1,73 +0,0 @@
-/* same as xhtml.css minus namespace stuff */
-
-pre.rules {
- border : 1px solid black ;
- padding : 5px
-}
-
-.WARNING {
- background-color: black;
- color: white;
- font-weight: bold;
- margin-top: 1em;
-}
-
-div.testSource {
- border: thin black solid;
- padding-left: 1em;
- padding-right: 1em;
-}
-
-div.testDescription {
- border: thin black solid;
- background-color: red;
-}
-
-.testDescription {
- margin-top: 1em;
- width: 100%;
- border: thin solid black;
-}
-
-.testDescription th,
-.testDescription td {
- text-align: center;
-}
-
-.testDescription th {
- background-color: silver;
-}
-
-.testDescription .a {
- width: 25%;
-}
-
-.testDescription .b {
- width: 50%;
-}
-
-.testDescription .c {
- width: 100%;
-}
-
-div.validator {
- margin-top: 1em;
-}
-
-div.validator img {
- border-width : 0;
-}
-
-iframe, object {
- display: block;
- position: fixed;
- top: static-position;
- left: 1em;
- right: 1em;
- bottom: 1em;
- margin: 0;
- width: auto;
- height: auto;
- padding: 0;
- border: thin black solid;
-}
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-1.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-1.xml
new file mode 100644
index 00000000000..0ce55a4d99e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-1.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Groups of selectors</title>
+ <style type="text/css"><![CDATA[li,p { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li>The background of this list item should be green</li>
+ <li>The background of this second list item should be also green</li>
+</ul>
+<p>The background of this paragraph should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-10.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-10.xml
new file mode 100644
index 00000000000..bb2f40f492e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-10.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector (end)</title>
+ <style type="text/css"><![CDATA[p { background-color : red }
+p[title$="bar"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p title="foobar">This paragraph should have a green background because
+its title attribute ends with &quot;bar&quot;</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-100.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-100.xml
new file mode 100644
index 00000000000..57658b7013a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-100.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute dash-separated value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[a|foo|="bar"], *|*[html|lang|="en"] { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml">
+<p html:lang="en-us">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:foo="bargain-trash">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:foo="bar-drink-glass">This paragraph should have a green background</r>
+<s xmlns="http://www.example.org/b" b:foo="bar-drink-glass">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-100b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-100b.xml
new file mode 100644
index 00000000000..8519170f151
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-100b.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute dash-separated value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[a|foo|="bar"], *|*[html|lang|="en"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b" xmlns:html="http://www.w3.org/1999/xhtml">
+<p html:lang="en-us">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:foo="bargain-trash">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:foo="bar-drink-glass">This paragraph should have a green background</r>
+<s xmlns="http://www.example.org/b" b:foo="bar-drink-glass">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-101.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-101.xml
new file mode 100644
index 00000000000..4d17096f436
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-101.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute value selector on beginning with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[a|title^="si on"], *|*[title^="si on"] { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="et si on chantait">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-101b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-101b.xml
new file mode 100644
index 00000000000..23fc37b86ab
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-101b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute value selector on beginning with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[a|title^="si on"], *|*[title^="si on"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="et si on chantait">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-102.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-102.xml
new file mode 100644
index 00000000000..de597818519
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-102.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute value selector on end with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[a|title$="tait"], p[|title$="tait"] { background-color : lime }
+*|*[|title$="tait"], *|*[html|title$="tait"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" xmlns:a="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" xmlns:a="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" xmlns:b="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-102b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-102b.xml
new file mode 100644
index 00000000000..cfd121ab71b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-102b.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute value selector on end with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[a|title$="tait"], *|*[html|title$="tait"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<p title="si on chantait">This paragraph should have a green background</p>
+<q xmlns="http://www.example.org/a" xmlns:a="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" xmlns:a="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" xmlns:b="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-103.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-103.xml
new file mode 100644
index 00000000000..191533a5d38
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-103.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute value selector on middle with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[a|title*="hanta"], p[|title*="hanta"] { background-color : lime }
+*|*[|title*="hanta"], *|*[html|title*="hanta"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-103b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-103b.xml
new file mode 100644
index 00000000000..4cdd208fa47
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-103b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute value selector on middle with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[a|title*="hanta"], *|*[html|title*="hanta"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-104.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-104.xml
new file mode 100644
index 00000000000..beed75ddaaf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-104.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute existence selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : red }
+*|*[*|title] { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background</p>
+<q xmlns="http://www.example.org/a" a:foo="si on chantait">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-104b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-104b.xml
new file mode 100644
index 00000000000..9a87d41fa3a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-104b.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute existence selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : lime ! important }
+*|*[*|title] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background</p>
+<q xmlns="http://www.example.org/a" a:foo="si on chantait">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-105.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-105.xml
new file mode 100644
index 00000000000..51d511ee988
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-105.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : red }
+*|*[*|title="si on chantait"] { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:foo="si on chantait">This paragraph should be unstyled.</q>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-105b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-105b.xml
new file mode 100644
index 00000000000..3c3cd2ce4c7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-105b.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : lime ! important }
+*|*[*|title="si on chantait"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:foo="si on chantait">This paragraph should be unstyled.</q>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-106.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-106.xml
new file mode 100644
index 00000000000..c806d6bf56c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-106.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute space-separated value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : red }
+*|*[*|class~="deux"], *|*[*|foo~="deux"] { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p class="un deux trois">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:bar="un deux trois">This paragraph should be unstyled.</q>
+<q xmlns="http://www.example.org/a" a:foo="un second deuxieme trois">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:foo="un deux trois">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:foo="un deux trois">This paragraph should have a green background.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-106b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-106b.xml
new file mode 100644
index 00000000000..a76ec5a05fe
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-106b.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute space-separated value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : lime ! important }
+*|*[*|class~="deux"], *|*[*|foo~="deux"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p class="un deux trois">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:bar="un deux trois">This paragraph should be unstyled.</q>
+<q xmlns="http://www.example.org/a" a:foo="un second deuxieme trois">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:foo="un deux trois">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:foo="un deux trois">This paragraph should have a green background.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-107.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-107.xml
new file mode 100644
index 00000000000..260bdd40c60
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-107.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute dash-separated value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[*|lang|="en"], *|*[a|foo|="un-d"] { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p lang="en-us">This paragraph should have a green background</p>
+<q xmlns="http://www.example.org/a" a:foo="un-deux-trois">This paragraph should be unstyled.</q>
+<q xmlns="http://www.example.org/a" a:foo="un-second-deuxieme-trois">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:foo="un-d-trois">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:foo="un-d-trois">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-107b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-107b.xml
new file mode 100644
index 00000000000..ebdd2e009bd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-107b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute dash-separated value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[*|lang|="en"], *|*[a|foo|="un-d"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p lang="en-us">This paragraph should have a green background</p>
+<q xmlns="http://www.example.org/a" a:foo="un-deux-trois">This paragraph should be unstyled.</q>
+<q xmlns="http://www.example.org/a" a:foo="un-second-deuxieme-trois">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:foo="un-d-trois">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:foo="un-d-trois">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-108.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-108.xml
new file mode 100644
index 00000000000..30e354522d9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-108.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on beginning with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : red }
+*|*[*|title^="si on"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-108b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-108b.xml
new file mode 100644
index 00000000000..933aee9c141
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-108b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on beginning with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : lime ! important }
+*|*[*|title^="si on"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-109.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-109.xml
new file mode 100644
index 00000000000..9f8cee6a738
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-109.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on end with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : red }
+*|*[*|title$="tait"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-109b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-109b.xml
new file mode 100644
index 00000000000..5e242f5d73e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-109b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on end with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : lime ! important }
+*|*[*|title$="tait"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-11.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-11.xml
new file mode 100644
index 00000000000..5e4d827e4cc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-11.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector (contains)</title>
+ <style type="text/css"><![CDATA[p { background-color : red }
+p[title*="bar"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p title="foobarufoo">This paragraph should have a green background because
+its title attribute contains &quot;bar&quot;</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-110.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-110.xml
new file mode 100644
index 00000000000..8760fac79ab
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-110.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on middle with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : red }
+*|*[*|title*="on ch"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-110b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-110b.xml
new file mode 100644
index 00000000000..a20984ac412
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-110b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on middle with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : lime ! important }
+*|*[*|title*="on ch"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-111.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-111.xml
new file mode 100644
index 00000000000..f834da54858
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-111.xml
@@ -0,0 +1,20 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute existence selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[|title] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a">
+<p title="si on chantait">This paragraph should have a green background</p>
+<q xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background</r>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-111b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-111b.xml
new file mode 100644
index 00000000000..8d55801a244
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-111b.xml
@@ -0,0 +1,20 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute existence selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[|title] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a">
+<p title="si on chantait">This paragraph should have a green background</p>
+<q xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background</r>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-112.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-112.xml
new file mode 100644
index 00000000000..f335eff311e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-112.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[|title="si on chantait"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-112b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-112b.xml
new file mode 100644
index 00000000000..0b5b174b3a7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-112b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[|title="si on chantait"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-113.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-113.xml
new file mode 100644
index 00000000000..c779e14650e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-113.xml
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute space-separated value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
+*|p, *|q { background-color : red }
+*|*[|class~="foo"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:b="http://www.example.org/b">
+<p class="bar foo toto">This paragraph should have a green background.</p>
+<address class="bar foofoo toto">This address should be unstyled.</address>
+<q xmlns="http://www.example.org/a" class="bar foo toto">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/b" b:class="bar foo toto">This paragraph should be unstyled.</r>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-113b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-113b.xml
new file mode 100644
index 00000000000..4cbfc6dfeed
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-113b.xml
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute space-separated value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
+*|p, *|q { background-color : lime ! important }
+*|*[|class~="foo"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:b="http://www.example.org/b">
+<p class="bar foo toto">This paragraph should have a green background.</p>
+<address class="bar foofoo toto">This address should be unstyled.</address>
+<q xmlns="http://www.example.org/a" class="bar foo toto">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/b" b:class="bar foo toto">This paragraph should be unstyled.</r>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-114.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-114.xml
new file mode 100644
index 00000000000..9a7f451ee8f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-114.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute dash-separated value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
+*|p, *|q { background-color : red }
+*|*[|lang|="foo-bar"], *|*[|myattr|="tat-tut"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:b="http://www.example.org/b">
+<p lang="foo-bar">This paragraph should have a green background.</p>
+<address lang="foo-b">This address should be unstyled.</address>
+<address lang="foo-barbar-toto">This address should be unstyled.</address>
+<q xmlns="http://www.example.org/a" myattr="tat-tut-tot">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/b" b:myattr="tat-tut-tot">This paragraph should be unstyled.</r>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-114b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-114b.xml
new file mode 100644
index 00000000000..b5aab0d17d4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-114b.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute dash-separated value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
+*|p, *|q { background-color : lime ! important }
+*|*[|lang|="foo-bar"], *|*[|myattr|="tat-tut"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:b="http://www.example.org/b">
+<p lang="foo-bar">This paragraph should have a green background.</p>
+<address lang="foo-b">This address should be unstyled.</address>
+<address lang="foo-barbar-toto">This address should be unstyled.</address>
+<q xmlns="http://www.example.org/a" myattr="tat-tut-tot">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/b" b:myattr="tat-tut-tot">This paragraph should be unstyled.</r>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-115.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-115.xml
new file mode 100644
index 00000000000..4c2492bd1b6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-115.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on beginning without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[|title^="si on"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-115b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-115b.xml
new file mode 100644
index 00000000000..9b37ed1ab8a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-115b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on beginning without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[|title^="si on"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-116.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-116.xml
new file mode 100644
index 00000000000..e73d83db14f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-116.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on end without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[|title$="tait"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-116b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-116b.xml
new file mode 100644
index 00000000000..59a46a6362c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-116b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on end without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[|title$="tait"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-117.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-117.xml
new file mode 100644
index 00000000000..5381cec147b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-117.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on middle without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[|title*="on ch"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-117b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-117b.xml
new file mode 100644
index 00000000000..b88ac99a653
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-117b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector on middle without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[|title*="on ch"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<p title="si on chantait">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should have a green background.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should be unstyled.</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-118.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-118.xml
new file mode 100644
index 00000000000..823c577031d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-118.xml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED type element selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace html url(http://www.w3.org/1999/xhtml);
+@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+*|p, *|l { display : block ; margin-bottom : 1em }
+div.test * { background-color : red }
+div.test *:not(a|p) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="test">
+ <p xmlns="http://www.w3.org/1999/xhtml">This paragraph should have a green background.</p>
+ <p xmlns="http://www.example.org/b">This paragraph should have a green background.</p>
+ <p xmlns="">This paragraph should have a green background.</p>
+ <p xmlns="http://www.example.org/a">
+ <l>This paragraph should have a green background.</l>
+ </p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-119.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-119.xml
new file mode 100644
index 00000000000..8a4eda34b41
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-119.xml
@@ -0,0 +1,31 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED type element selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace html url(http://www.w3.org/1999/xhtml);
+@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.test *:not(*|div) { display : block ; margin-bottom : 1em ;
+ background-color : red }
+div.test > *:not(*|p):not(*|div) { background-color : lime }
+div.stub > *:not(*|div) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="test">
+<div class="stub">
+<p>This paragraph should have a green background.</p>
+<p xmlns="http://www.example.org/b">This paragraph should have a green background.</p>
+<p xmlns="">This paragraph should have a green background.</p>
+<p xmlns="http://www.example.org/a">This paragraph should have a green background.</p>
+</div>
+<address>This address should have a green background.</address>
+<s xmlns="http://www.example.org/b">This paragraph should have a green background.</s>
+<t xmlns="">This paragraph should have a green background.</t>
+<u xmlns="http://www.example.org/a">This paragraph should have a green background.</u>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-120.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-120.xml
new file mode 100644
index 00000000000..4f233426b2f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-120.xml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED type element selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace html url(http://www.w3.org/1999/xhtml);
+@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.stub > * { display : block ; margin-bottom : 1em ;
+ background-color : red }
+div.stub > *:not(|p) { background-color : lime }
+div.stub > *|l > *:not(|p) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<p>This paragraph should have a green background</p>
+<p xmlns="http://www.example.org/b">This paragraph should have a green background</p>
+<l xmlns="http://www.example.org/b">
+<p xmlns="">This paragraph should have a
+ green background</p>
+</l>
+<p xmlns="http://www.example.org/a">This paragraph should have a green background</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-121.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-121.xml
new file mode 100644
index 00000000000..4d666876cc8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-121.xml
@@ -0,0 +1,28 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED universal selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace html url(http://www.w3.org/1999/xhtml);
+@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.stub > *|* { color : red ; display : block ;
+ margin-bottom : 1em }
+div.stub > *|*:not(a|*) { color : green }
+div.stub v { color : green }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<address>This address should be in green characters.</address>
+<s xmlns="http://www.example.org/b">This paragraph should be in green characters.</s>
+<t xmlns="">This paragraph should be in green characters.</t>
+<u xmlns="http://www.example.org/a">
+<v>This paragraph should be in green characters.</v>
+</u>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-122.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-122.xml
new file mode 100644
index 00000000000..23538313056
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-122.xml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED universal selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace html url(http://www.w3.org/1999/xhtml);
+@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.stub > *|* { background-color : lime ; display : block ;
+ margin-bottom : 1em }
+div.stub > *|*:not(*|*) { background-color : red }
+/* yes, the rule just above selects nothing... That's the point */
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-address-p-p-p-lime-background.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<address>This address should have a green background</address>
+<s xmlns="http://www.example.org/b">This paragraph should have a green background</s>
+<t xmlns="">This paragraph should have a green background</t>
+<u xmlns="http://www.example.org/a">This paragraph should have a green background</u>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-123.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-123.xml
new file mode 100644
index 00000000000..b9e577a0593
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-123.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED universal selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace html url(http://www.w3.org/1999/xhtml);
+@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.stub > *|* { color : red ; display : block ;
+ margin-bottom : 1em }
+div.stub > *|*:not(|*) { color : green }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<address>This address should be in green characters.</address>
+<s xmlns="http://www.example.org/b">This paragraph should be in green characters.</s>
+<u xmlns="http://www.example.org/a">This paragraph should be in green characters.</u>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-123b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-123b.xml
new file mode 100644
index 00000000000..b6dcd3a97ee
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-123b.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED universal selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace html url(http://www.w3.org/1999/xhtml);
+@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.stub > *|* { color : green ; display : block ;
+ margin-bottom : 1em }
+div.stub > *|*:not(|*) { color : red ! important }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<t xmlns="">This paragraph should be in green characters.</t>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-124.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-124.xml
new file mode 100644
index 00000000000..6c487f8af8c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-124.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : red }
+div.stub *:not([a|title="foo"]) {background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="foo">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="foo">This paragraph should be unstyled.</q>
+<s xmlns="http://www.example.org/a" a:title="foobar">This paragraph should have a green background.</s>
+<r xmlns="http://www.example.org/b" b:title="foo">This paragraph should have a green background.</r>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-124b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-124b.xml
new file mode 100644
index 00000000000..a6fba323d29
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-124b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r, *|s { background-color : lime ! important }
+div.stub *:not([a|title="foo"]) {background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="foo">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="foo">This paragraph should be unstyled.</q>
+<s xmlns="http://www.example.org/a" a:title="foobar">This paragraph should have a green background.</s>
+<r xmlns="http://www.example.org/b" b:title="foo">This paragraph should have a green background.</r>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-125.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-125.xml
new file mode 100644
index 00000000000..10e3ec1d844
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-125.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute space-separated value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : red }
+div.stub *|*:not([a|foo~="bar"]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:foo="hgt bardot f">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:foo="hgt bar f">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:foo="hgt bar f">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-125b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-125b.xml
new file mode 100644
index 00000000000..032a0eab06f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-125b.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute space-separated value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : lime ! important }
+div.stub *|*:not([a|foo~="bar"]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:foo="hgt bardot f">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:foo="hgt bar f">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:foo="hgt bar f">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-126.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-126.xml
new file mode 100644
index 00000000000..dca13bdbf70
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-126.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute dash-separated value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : red }
+div.stub *|*:not([a|foo|="bar"]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:foo="bargain-trash">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:foo="bar-drink-glass">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:foo="bar-drink-glass">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-126b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-126b.xml
new file mode 100644
index 00000000000..9dba3b1c725
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-126b.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute dash-separated value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : lime ! important }
+div.stub *|*:not([a|foo|="bar"]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:foo="bargain-trash">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:foo="bar-drink-glass">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:foo="bar-drink-glass">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-127.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-127.xml
new file mode 100644
index 00000000000..9ef8cd77a74
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-127.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute value selector on beginning with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : red }
+div.stub *|*:not([a|title^="si on"]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="et si on chantait">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-127b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-127b.xml
new file mode 100644
index 00000000000..41e88ecf652
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-127b.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute value selector on beginning with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : lime ! important }
+div.stub *|*:not([a|title^="si on"]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="et si on chantait">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-128.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-128.xml
new file mode 100644
index 00000000000..cb192739deb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-128.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute value selector on end with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : red }
+div.stub *|*:not([a|title$="tait"]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-128b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-128b.xml
new file mode 100644
index 00000000000..26dbce728c1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-128b.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute value selector on end with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : lime ! important }
+div.stub *|*:not([a|title$="tait"]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-129.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-129.xml
new file mode 100644
index 00000000000..c3dbdbaf6da
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-129.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute value selector on middle with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : red }
+div.stub *|*:not([a|title*="hanta"]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-129b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-129b.xml
new file mode 100644
index 00000000000..407d6a91c53
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-129b.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute value selector on middle with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|s { background-color : lime ! important }
+div.stub *|*:not([a|title*="hanta"]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-p-lime-background-except-middle.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-13.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-13.xml
new file mode 100644
index 00000000000..826e576ad41
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-13.xml
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Class selectors</title>
+ <style type="text/css"><![CDATA[li { background-color : red }
+.t1 { background-color : lime }
+li.t2 { background-color : lime }
+.t3 { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li class="t1">This list item should have green background because its class is &quot;t1&quot;</li>
+ <li class="t2">This list item should have green background because its class is &quot;t2&quot;</li>
+ <li class="t2">
+<span class="t33">This list item should have green background because
+ the inner SPAN does not match SPAN.t3</span>
+</li>
+</ul>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-130.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-130.xml
new file mode 100644
index 00000000000..e9a7672c53e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-130.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute existence selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q { background-color : red }
+div.stub *|*:not([*|title]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:foo="si on chantait">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-130b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-130b.xml
new file mode 100644
index 00000000000..54c6c6a9c2c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-130b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute existence selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q { background-color : lime ! important }
+div.stub *|*:not([*|title]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:foo="si on chantait">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-131.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-131.xml
new file mode 100644
index 00000000000..f937a8094ad
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-131.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q { background-color : red }
+div.stub *|*:not([*|title="si on chantait"]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:foo="si on chantait">This paragraph should have a green background.</q>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-131b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-131b.xml
new file mode 100644
index 00000000000..05a7753eac6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-131b.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q { background-color : lime ! important }
+div.stub *|*:not([*|title="si on chantait"]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:foo="si on chantait">This paragraph should have a green background.</q>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-132.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-132.xml
new file mode 100644
index 00000000000..f7080850ff9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-132.xml
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute space-separated value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p.deu, *|q { background-color : red }
+div.stub html|*:not([*|class~="deux"]),
+ div.stub *|*:not(html|*):not([*|foo~="deux"]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p class="un deux trois">This paragraph should be unstyled</p>
+<p class="un deu trois">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:bar="un deux trois">This paragraph should have a green background.</q>
+<q xmlns="http://www.example.org/a" a:foo="un second deuxieme trois">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:foo="un deux trois">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:foo="un deux trois">This paragraph should be unstyled.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-132b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-132b.xml
new file mode 100644
index 00000000000..8270be88ded
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-132b.xml
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute space-separated value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p.deu, *|q { background-color : lime ! important }
+div.stub html|*:not([*|class~="deux"]),
+ div.stub *|*:not(html|*):not([*|foo~="deux"]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p class="un deux trois">This paragraph should be unstyled</p>
+<p class="un deu trois">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:bar="un deux trois">This paragraph should have a green background.</q>
+<q xmlns="http://www.example.org/a" a:foo="un second deuxieme trois">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:foo="un deux trois">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:foo="un deux trois">This paragraph should be unstyled.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-133.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-133.xml
new file mode 100644
index 00000000000..1c1b5baf575
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-133.xml
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute dash-separated value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p.foo, *|q, *|s { background-color : red }
+div.stub html|*:not([*|lang|="en"]),
+ div.stub *|*:not(html|*):not([a|foo|="un-d"]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p lang="en-us">This paragraph should be unstyled.</p>
+<p lang="fr" class="foo">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:foo="un-deux-trois">This paragraph should have a green background.</q>
+<q xmlns="http://www.example.org/a" a:foo="un-second-deuxieme-trois">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:foo="un-d-trois">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:foo="un-d-trois">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-133b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-133b.xml
new file mode 100644
index 00000000000..6f67b88a179
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-133b.xml
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute dash-separated value selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p.foo, *|q, *|s { background-color : lime ! important }
+div.stub html|*:not([*|lang|="en"]),
+ div.stub *|*:not(html|*):not([a|foo|="un-d"]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p lang="en-us">This paragraph should be unstyled.</p>
+<p lang="fr" class="foo">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:foo="un-deux-trois">This paragraph should have a green background.</q>
+<q xmlns="http://www.example.org/a" a:foo="un-second-deuxieme-trois">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:foo="un-d-trois">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:foo="un-d-trois">This paragraph should have a green background.</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-134.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-134.xml
new file mode 100644
index 00000000000..20f42fda609
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-134.xml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on beginning with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p.red, *|q, *|t { background-color : red }
+div.stub *|*:not([*|title^="si on"]) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-g-u-u-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<p title="si il chantait" class="red">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-134b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-134b.xml
new file mode 100644
index 00000000000..5a14b8f7334
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-134b.xml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on beginning with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p.red, *|q, *|t { background-color : lime ! important }
+div.stub *|*:not([*|title^="si on"]) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-g-u-u-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<p title="si il chantait" class="red">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-135.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-135.xml
new file mode 100644
index 00000000000..842ff6573ae
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-135.xml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on end with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p.red, *|q, *|t { background-color : red }
+div.stub *|*:not([*|title$="tait"]) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-g-u-u-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<p title="si tu chantais" class="red">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-135b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-135b.xml
new file mode 100644
index 00000000000..9658c29253a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-135b.xml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on end with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p.red, *|q, *|t { background-color : lime ! important }
+div.stub *|*:not([*|title$="tait"]) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-g-u-u-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<p title="si tu chantais" class="red">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-136.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-136.xml
new file mode 100644
index 00000000000..ca2a6ca22de
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-136.xml
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on middle with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p.red, *|q, *|t { background-color : red }
+div.stub *|*:not([*|title*="on ch"]) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-g-u-u-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<p title="si il chantait" class="red">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-136b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-136b.xml
new file mode 100644
index 00000000000..94e8cb03d23
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-136b.xml
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on middle with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|p.red, *|q, *|t { background-color : lime ! important }
+div.stub *|*:not([*|title*="on ch"]) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-g-u-u-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<p title="si il chantait" class="red">This paragraph should have a green background.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should be unstyled.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-137.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-137.xml
new file mode 100644
index 00000000000..fd17088d383
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-137.xml
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute existence selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|q, *|r { display : block ; margin-bottom : 1em }
+*|q { background-color : red }
+div.stub *|*:not([|title]) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-137b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-137b.xml
new file mode 100644
index 00000000000..47d5dc7b200
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-137b.xml
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute existence selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|q, *|r { display : block ; margin-bottom : 1em }
+*|q { background-color : lime ! important }
+div.stub *|*:not([|title]) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-138.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-138.xml
new file mode 100644
index 00000000000..9e8f8c0e2ef
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-138.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|q, *|s, *|t { background-color : red }
+div.stub *|*:not([|title="si on chantait"]) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-138b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-138b.xml
new file mode 100644
index 00000000000..7cc16fd3c39
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-138b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|q, *|s, *|t { background-color : lime ! important }
+div.stub *|*:not([|title="si on chantait"]) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<q xmlns="http://www.example.org/a" a:title="si on chantait">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-139.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-139.xml
new file mode 100644
index 00000000000..ceebe6640b9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-139.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute space-separated value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
+*|address, *|r { background-color : red }
+div.stub *|*:not([|class~="foo"]) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p class="bar foo toto">This paragraph should be unstyled.</p>
+<address class="bar foofoo toto">This address should have a green background.</address>
+<q xmlns="http://www.example.org/a" class="bar foo toto">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/b" b:class="bar foo toto">This paragraph should have a green background.</r>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-139b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-139b.xml
new file mode 100644
index 00000000000..4e727ea9c95
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-139b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute space-separated value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
+*|address, *|r { background-color : lime ! important }
+div.stub *|*:not([|class~="foo"]) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p class="bar foo toto">This paragraph should be unstyled.</p>
+<address class="bar foofoo toto">This address should have a green background.</address>
+<q xmlns="http://www.example.org/a" class="bar foo toto">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/b" b:class="bar foo toto">This paragraph should have a green background.</r>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14.xml
new file mode 100644
index 00000000000..5074fe0249c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14.xml
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>More than one class selector</title>
+ <style type="text/css"><![CDATA[p { background-color : red ; border : thick solid red ; padding : 1em }
+p.t1 { background-color : lime }
+p.t2 { border : thick solid green }
+
+div { background: green; color: white; }
+div.teST { background: red; color: yellow; }
+div.te { background: red; color: yellow; }
+div.st { background: red; color: yellow; }
+div.te.st { background: red; color: yellow; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+
+<p class="t1 t2">This paragraph
+should have a green background and a green thick solid border because
+it carries both classes t1 and t2.</p>
+
+<div class="test">This line
+should be green.</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-140.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-140.xml
new file mode 100644
index 00000000000..49c9e4bf743
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-140.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute dash-separated value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
+*|address, *|r { background-color : red }
+div.stub *|*:not([|lang|="foo-bar"]) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p lang="foo-bar">This paragraph should be unstyled.</p>
+<address lang="foo-b">This address should have a green background.</address>
+<address lang="foo-barbar-toto">This address should have a green background.</address>
+<q xmlns="http://www.example.org/a" lang="foo-bar">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/b" b:lang="foo-bar">This paragraph should have a green background.</r>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-140b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-140b.xml
new file mode 100644
index 00000000000..a39bd7d7730
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-140b.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute dash-separated value selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|address, *|q, *|r { display : block ; margin-bottom : 1em }
+*|address, *|r { background-color : lime ! important }
+div.stub *|*:not([|lang|="foo-bar"]) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p lang="foo-bar">This paragraph should be unstyled.</p>
+<address lang="foo-b">This address should have a green background.</address>
+<address lang="foo-barbar-toto">This address should have a green background.</address>
+<q xmlns="http://www.example.org/a" lang="foo-bar">This paragraph should be unstyled.</q>
+<r xmlns="http://www.example.org/b" b:lang="foo-bar">This paragraph should have a green background.</r>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-141.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-141.xml
new file mode 100644
index 00000000000..d69a2722fc6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-141.xml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on beginning without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|q, *|s, *|t { background-color : red }
+div.stub *|*:not([|title^="si on"]) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-141b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-141b.xml
new file mode 100644
index 00000000000..184cb4e9dad
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-141b.xml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on beginning without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|q, *|s, *|t { background-color : lime ! important }
+div.stub *|*:not([|title^="si on"]) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" b:ti="si on chantait">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-142.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-142.xml
new file mode 100644
index 00000000000..230f49032d0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-142.xml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on end without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|q, *|s, *|t { background-color : red }
+div.stub *|*:not([|title$="tait"]) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-142b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-142b.xml
new file mode 100644
index 00000000000..a107e2a4eac
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-142b.xml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on end without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|q, *|s, *|t { background-color : lime ! important }
+div.stub *|*:not([|title$="tait"]) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-143.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-143.xml
new file mode 100644
index 00000000000..3bcd4f23c7f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-143.xml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on middle without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|q, *|s, *|t { background-color : red }
+div.stub *|*:not([|title*="on ch"]) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-143b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-143b.xml
new file mode 100644
index 00000000000..3c867296568
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-143b.xml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Substring matching attribute selector on middle without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s, *|t{ display : block ; margin-bottom : 1em }
+*|q, *|s, *|t { background-color : lime ! important }
+div.stub *|*:not([|title*="on ch"]) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-u-g-u-g-g.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+<div class="stub">
+<p title="si on chantait">This paragraph should be unstyled.</p>
+<q xmlns="http://www.example.org/a" a:title="si nous chantions">This paragraph should have a green background.</q>
+<r xmlns="http://www.example.org/a" title="si on chantait">This paragraph should be unstyled.</r>
+<s xmlns="http://www.example.org/b" b:title="si on chantait">This paragraph should have a green background.</s>
+<t xmlns="http://www.example.org/b" title="si nous chantions">This paragraph should have a green background.</t>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-144.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-144.xml
new file mode 100644
index 00000000000..7efde113c56
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-144.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :enabled:disabled pseudo-classes</title>
+ <style type="text/css"><![CDATA[div :not(:enabled):not(:disabled) { background: lime; }
+p { background : red;}]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <p>This paragraph should have a green background.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-145a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-145a.xml
new file mode 100644
index 00000000000..ff15de6779a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-145a.xml
@@ -0,0 +1,33 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-of-type() pseudo-class with hidden elements</title>
+ <style type="text/css"><![CDATA[
+ line { display: block; }
+ [type~=odd] { background: red; }
+ line:nth-of-type(odd) { background: lime; }
+ [hidden] { display: none; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <test xmlns="http://www.example.org/">
+ <line type="odd">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd" hidden="hidden">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ <line type="even" hidden="hidden">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ <line type="even" hidden="hidden">This line should be unstyled.</line>
+ <line type="odd" hidden="hidden">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ </test>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-145b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-145b.xml
new file mode 100644
index 00000000000..fb57366b696
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-145b.xml
@@ -0,0 +1,33 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-of-type() pseudo-class with hidden elements</title>
+ <style type="text/css"><![CDATA[
+ line { display: block; }
+ [type~=odd] { background: lime ! important; }
+ line:nth-of-type(odd) { background: red; }
+ [hidden] { display: none; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <test xmlns="http://www.example.org/">
+ <line type="odd">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd" hidden="hidden">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ <line type="even" hidden="hidden">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ <line type="even" hidden="hidden">This line should be unstyled.</line>
+ <line type="odd" hidden="hidden">This line should be green.</line>
+ <line type="even">This line should be unstyled.</line>
+ <line type="odd">This line should be green.</line>
+ </test>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-146a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-146a.xml
new file mode 100644
index 00000000000..8704f09e6dc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-146a.xml
@@ -0,0 +1,39 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-child() pseudo-class with hidden elements</title>
+ <style type="text/css"><![CDATA[
+ line { display: block; }
+ [type~=match] { background: red; }
+ line:nth-child(3n-1) { background: lime; }
+ [hidden] { display: none; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <test xmlns="http://www.example.org/">
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="" hidden="hidden">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="" hidden="hidden">This line should be unstyled.</line>
+ <line type="match" hidden="hidden">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ </test>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-146b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-146b.xml
new file mode 100644
index 00000000000..a7b28b4e5c5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-146b.xml
@@ -0,0 +1,39 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-child() pseudo-class with hidden elements</title>
+ <style type="text/css"><![CDATA[
+ line { display: block; }
+ [type~=match] { background: lime ! important; }
+ line:nth-child(3n-1) { background: red; }
+ [hidden] { display: none; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <test xmlns="http://www.example.org/">
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="" hidden="hidden">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="" hidden="hidden">This line should be unstyled.</line>
+ <line type="match" hidden="hidden">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ </test>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-147a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-147a.xml
new file mode 100644
index 00000000000..dcf600bf805
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-147a.xml
@@ -0,0 +1,39 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-last-of-type() pseudo-class with collapsed elements</title>
+ <style type="text/css"><![CDATA[
+ line { display: block; }
+ [type~=match] { background: red; }
+ line:nth-last-of-type(3n-1) { background: lime; }
+ [hidden] { visibility: collapse; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <test xmlns="http://www.example.org/">
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match" hidden="hidden">This line should be green.</line>
+ <line type="" hidden="hidden">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="" hidden="hidden">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ </test>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-147b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-147b.xml
new file mode 100644
index 00000000000..fdea6da4250
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-147b.xml
@@ -0,0 +1,39 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-last-of-type() pseudo-class with collapsed elements</title>
+ <style type="text/css"><![CDATA[
+ line { display: block; }
+ [type~=match] { background: lime ! important; }
+ line:nth-last-of-type(3n-1) { background: red; }
+ [hidden] { visibility: collapse; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <test xmlns="http://www.example.org/">
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match" hidden="hidden">This line should be green.</line>
+ <line type="" hidden="hidden">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="" hidden="hidden">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="">This line should be unstyled.</line>
+ <line type="match">This line should be green.</line>
+ <line type="">This line should be unstyled.</line>
+ </test>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-148.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-148.xml
new file mode 100644
index 00000000000..217ba53bbd0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-148.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:empty pseudo-class and text</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ p:empty { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-149.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-149.xml
new file mode 100644
index 00000000000..98fce81fac6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-149.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:empty pseudo-class and empty elements</title>
+ <style type="text/css"><![CDATA[
+ address:empty { background: lime; }
+ address { background: red; margin: 0; height: 1em; }
+ .text { margin: -1em 0 0 0; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background-offset.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <address></address>
+ <div class="text">This line should have a green background.</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-149b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-149b.xml
new file mode 100644
index 00000000000..98fce81fac6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-149b.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:empty pseudo-class and empty elements</title>
+ <style type="text/css"><![CDATA[
+ address:empty { background: lime; }
+ address { background: red; margin: 0; height: 1em; }
+ .text { margin: -1em 0 0 0; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background-offset.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <address></address>
+ <div class="text">This line should have a green background.</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14b.xml
new file mode 100644
index 00000000000..0be061ee973
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14b.xml
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>More than one class selector</title>
+ <style type="text/css"><![CDATA[
+p { background: green; color: white; }
+.t1.fail { background: red; color: yellow; }
+.fail.t1 { background: red; color: yellow; }
+.t2.fail { background: red; color: yellow; }
+.fail.t2 { background: red; color: yellow; }
+/* Note: This is a valid test even per CSS1, since in CSS1 those rules
+ are invalid and should be dropped. */
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="t1">This line should be green.</p>
+ <p class="t1 t2">This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14c.xml
new file mode 100644
index 00000000000..0384f33280e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14c.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>More than one class selector</title>
+ <style type="text/css"><![CDATA[
+p { background: red; color: yellow; }
+p.t1.t2 { background: green; color: white; }
+div { background: green; color: white; }
+div.t1 { background: red; color: yellow; }
+address { background: red; color: yellow; }
+address.t5.t5 { background: green; color: white; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="t1 t2">This line should be green.</p>
+ <div class="t3">This line should be green.</div>
+ <address class="t4 t5 t6">This line should be green.</address>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14d.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14d.xml
new file mode 100644
index 00000000000..37e057b517f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14d.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED More than one class selector</title>
+ <style type="text/css"><![CDATA[
+p { background: green; color: white; }
+.t1:not(.t2) { background: red; color: yellow; }
+:not(.t2).t1 { background: red; color: yellow; }
+.t2:not(.t1) { background: red; color: yellow; }
+:not(.t1).t2 { background: red; color: yellow; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="t1 t2">This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14e.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14e.xml
new file mode 100644
index 00000000000..a8f8d756215
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-14e.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED More than one class selector</title>
+ <style type="text/css"><![CDATA[
+p { background: green; color: white; }
+p:not(.t1):not(.t2) { background: red; color: yellow; }
+div { background: red; color: yellow; }
+div:not(.t1) { background: green; color: white; }
+address { background: green; color: white; }
+address:not(.t5):not(.t5) { background: red; color: yellow; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="t1 t2">This line should be green.</p>
+ <div class="t3">This line should be green.</div>
+ <address class="t4 t5 t6">This line should be green.</address>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-15.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-15.xml
new file mode 100644
index 00000000000..f3aa372602f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-15.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>ID selectors</title>
+ <style type="text/css"><![CDATA[li { background-color : red }
+#t1 { background-color : lime }
+li#t2 { background-color : lime }
+li#t3 { background-color : lime }
+#t4 { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li id="t1">This list item should have a green background. because its ID is &quot;t1&quot;</li>
+ <li id="t2">This list item should have a green background. because its ID is &quot;t2&quot;</li>
+ <li id="t3"><span id="t44">This list item should have a green background. because the inner SPAN does not match &quot;#t4&quot;</span></li>
+</ul>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-150.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-150.xml
new file mode 100644
index 00000000000..b9fdca487ea
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-150.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:empty pseudo-class and XML/SGML constructs</title>
+ <style type="text/css"><![CDATA[
+ address:empty { background: lime; }
+ address { background: red; margin: 0; height: 1em; }
+ .text { margin: -1em 0 0 0; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <address><!-- --><?test random PI?></address>
+ <div class="text">This line should have a green background.</div>
+ <p>(Note: This test is based on unpublished errata.)</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-151.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-151.xml
new file mode 100644
index 00000000000..a4bb1dd2017
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-151.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:empty pseudo-class and whitespace</title>
+ <style type="text/css"><![CDATA[
+ address { background: lime; margin: 0; height: 1em; }
+ address:empty { background: red; }
+ .text { margin: -1em 0 0 0; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background-offset.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <address> </address>
+ <div class="text">This line should have a green background.</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-152.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-152.xml
new file mode 100644
index 00000000000..b39d5734634
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-152.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:empty pseudo-class and elements</title>
+ <style type="text/css"><![CDATA[
+ address { background: lime; margin: 0; height: 1em; }
+ address:empty { background: red; }
+ .text { margin: -1em 0 0 0; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background-offset.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <address><span></span></address>
+ <div class="text">This line should have a green background.</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-153.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-153.xml
new file mode 100644
index 00000000000..45f65fb5988
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-153.xml
@@ -0,0 +1,18 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:empty pseudo-class and CDATA</title>
+ <style type="text/css"><![CDATA[
+ address { background: red; margin: 0; height: 1em; display: block; }
+ address:empty { background: lime; }
+ .text { margin: -1em 0 0 0; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <address xmlns="http://tests.example.org/xml-only/"><![CDATA[]]></address>
+ <div class="text">This line should have a green background.</div>
+ <p>(Note: This test is based on unpublished errata.)</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-154.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-154.xml
new file mode 100644
index 00000000000..f5f029542b7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-154.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ p, { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155.xml
new file mode 100644
index 00000000000..961374d6994
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ .5cm { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="5cm">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155a.xml
new file mode 100644
index 00000000000..1fca1916e4f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155a.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ .\5cm { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="5cm">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155b.xml
new file mode 100644
index 00000000000..168f86523ee
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155b.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ .two\ words { background: red; }
+
+ /* the "." and "~=" forms match on a space separated list of words.
+ In such a list, a word containing a space can never match, since it
+ would by definition be two words. */
+
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="two words">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155c.xml
new file mode 100644
index 00000000000..4fd0b48d6b7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155c.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ .one.word { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="one.word">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155d.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155d.xml
new file mode 100644
index 00000000000..0c21d5f12ec
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-155d.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ .one\.word { background: lime; }
+ p { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="one.word">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156.xml
new file mode 100644
index 00000000000..fa0483e6455
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ foo & address, p { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156b.xml
new file mode 100644
index 00000000000..59d9f3b65c8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156b.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ foo & address, p { background: red; }
+ p { background: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156c.xml
new file mode 100644
index 00000000000..2b9d445924c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-156c.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ foo & address, p { background: red ! important; }
+ p { background: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-157.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-157.xml
new file mode 100644
index 00000000000..6a7e1d85ffd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-157.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ [*=test] { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="test">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-158.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-158.xml
new file mode 100644
index 00000000000..9595b907936
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-158.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ [*|*=test] { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="test">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-159.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-159.xml
new file mode 100644
index 00000000000..3504398dbcf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-159.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing of new pseudo-elements</title>
+ <style type="text/css"><![CDATA[
+ ::selection { background: lime; }
+ :selection { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+ <p>Try selecting some text in this document. It should be have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-15b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-15b.xml
new file mode 100644
index 00000000000..b7e4205e0d4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-15b.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Multiple ID selectors</title>
+ <style type="text/css"><![CDATA[
+p { background: green; color: white; }
+#test#fail { background: red; color: yellow; }
+#fail#test { background: red; color: yellow; }
+#fail { background: red; color: yellow; }
+div { background: red; color: yellow; }
+#pass#pass { background: green; color: white; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p id="test">This line should be green.</p>
+ <div id="pass">This line should be green.</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-16.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-16.xml
new file mode 100644
index 00000000000..48122c26d8a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-16.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:link pseudo-class</title>
+ <style type="text/css"><![CDATA[p.test a { background-color : red }
+p.test *:link { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" history" />
+ </head>
+ <body>
+<p class="test">
+<a href="http://unvisited.example.org/css3-modsel-16/">This link should have green background.</a>
+(Don&#39;t follow this link.)
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-160.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-160.xml
new file mode 100644
index 00000000000..ec1de24cb28
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-160.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing of unknown pseudo-classes</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ p:subject { background: red; } /* this is not valid CSS, and if UAs
+ implemented the experimental :subject pseudo-class they should have
+ used the :-vnd-ident syntax. */
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-161.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-161.xml
new file mode 100644
index 00000000000..888c6f436b5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-161.xml
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing of unknown pseudo-classes and pseudo-elements</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+ p * { background: lime; }
+ p > * { background: lime; }
+ p + * { background: lime; }
+ p ~ * { background: lime; }
+
+ /* let's try some pseudos that are not valid CSS but are likely to
+ be implemented as extensions in some UAs. These should not be
+ recognised, as UAs implementing such extensions should use the
+ :-vnd-ident syntax. */
+
+ :canvas { background: red; }
+ :viewport { background: red; }
+ :window { background: red; }
+ :menu { background: red; }
+ :table { background: red; }
+ :select { background: red; }
+ ::canvas { background: red; }
+ ::viewport { background: red; }
+ ::window { background: red; }
+ ::menu { background: red; }
+ ::table { background: red; }
+ ::select { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+ <p>This line should have a green background.</p>
+ <p>
+ UAs may render the following element as a pop up menu. If so, please ensure the menu is unstyled (or green).
+ <select size="1">
+ <option>This should</option>
+ <option>have a green</option>
+ <option>background.</option>
+ </select>
+ </p>
+ <table><tr><td>This line should have a green background (or it might be unstyled).</td></tr></table>
+ <!-- only allowed to be unstyled if + and ~ are not supported -->
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-166.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-166.xml
new file mode 100644
index 00000000000..5d4e31f9a5c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-166.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:first-letter with ::first-letter</title>
+ <style type="text/css"><![CDATA[
+ p:first-letter { background-color: red; }
+ p::first-letter { background-color: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>The first letter of this paragraph should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-166a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-166a.xml
new file mode 100644
index 00000000000..55d36bb68c9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-166a.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:first-letter with ::first-letter</title>
+ <style type="text/css"><![CDATA[
+ p::first-letter { background-color: red; }
+ p:first-letter { background-color: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>The first letter of this paragraph should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-167.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-167.xml
new file mode 100644
index 00000000000..0fa9e6cdbb9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-167.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:first-line with ::first-line</title>
+ <style type="text/css"><![CDATA[
+ p:first-line { background-color: red; }
+ p::first-line { background-color: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>The first line of this paragraph should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-167a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-167a.xml
new file mode 100644
index 00000000000..6dd9d8faac2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-167a.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:first-line with ::first-line</title>
+ <style type="text/css"><![CDATA[
+ p::first-line { background-color: red; }
+ p:first-line { background-color: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>The first line of this paragraph should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-168.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-168.xml
new file mode 100644
index 00000000000..431a41b159f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-168.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:before with ::before</title>
+ <style type="text/css"><![CDATA[
+ span:before { background-color: red; content: 'FAILED'; }
+ span::before { background-color: lime; content: 'PASSED'; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-test-has-passed-desc.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This test has <span></span>.</p>
+ <p>(If the previous line just reads &quot;This test has .&quot; then this test has failed.)</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-168a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-168a.xml
new file mode 100644
index 00000000000..d5ddad42b1d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-168a.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:before with ::before</title>
+ <style type="text/css"><![CDATA[
+ span::before { background-color: red; content: 'FAILED'; }
+ span:before { background-color: lime; content: 'PASSED'; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-test-has-passed-desc.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This test has <span></span>.</p>
+ <p>(If the previous line just reads &quot;This test has .&quot; then this test has failed.)</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-169.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-169.xml
new file mode 100644
index 00000000000..eee2bef3573
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-169.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:after with ::after</title>
+ <style type="text/css"><![CDATA[
+ span:after { background-color: red; content: 'FAILED'; }
+ span::after { background-color: lime; content: 'PASSED'; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-test-has-passed-desc.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This test has <span></span>.</p>
+ <p>(If the previous line just reads &quot;This test has .&quot; then this test has failed.)</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-169a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-169a.xml
new file mode 100644
index 00000000000..6254a520c31
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-169a.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:after with ::after</title>
+ <style type="text/css"><![CDATA[
+ span::after { background-color: red; content: 'FAILED'; }
+ span:after { background-color: lime; content: 'PASSED'; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-test-has-passed-desc.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This test has <span></span>.</p>
+ <p>(If the previous line just reads &quot;This test has .&quot; then this test has failed.)</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-17.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-17.xml
new file mode 100644
index 00000000000..e06fb70d588
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-17.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:visited pseudo-class</title>
+ <style type="text/css"><![CDATA[p.test a { background-color : red }
+p.test *:visited { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" history" />
+ </head>
+ <body>
+<p class="test">
+<a href="http://www.w3.org/">You should see a green background assigned by the anchor.</a>
+(Note: You must have visited http://www.w3.org/ for this test to be valid.)
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170.xml
new file mode 100644
index 00000000000..c56ae2ac295
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Long chains of selectors</title>
+ <style type="text/css"><![CDATA[
+ span { color: red; }
+ span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span, span { color: green } /* 2049 */
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p><span>This line should be green.</span></p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170a.xml
new file mode 100644
index 00000000000..1cde7071457
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170a.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Long chains of selectors</title>
+ <style type="text/css"><![CDATA[
+ .span { color: red; }
+ .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span, .span { color: green } /* 2049 */
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="span">This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170b.xml
new file mode 100644
index 00000000000..50b4fc0825b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170b.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Long chains of selectors</title>
+ <style type="text/css"><![CDATA[
+ .span { color: red; }
+ .span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span.span { color: green } /* 2049 */
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="span">This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170c.xml
new file mode 100644
index 00000000000..9e5cf375d6f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170c.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Long chains of selectors</title>
+ <style type="text/css"><![CDATA[
+ p.span { color: red; }
+ p:not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span):not(.span) { color: green } /* 2049 */
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170d.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170d.xml
new file mode 100644
index 00000000000..371945a439f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-170d.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Long chains of selectors</title>
+ <style type="text/css"><![CDATA[
+ p { color: red; }
+ p:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child:first-child { color: green } /* 2049 */
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-171.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-171.xml
new file mode 100644
index 00000000000..aa3b86e82fa
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-171.xml
@@ -0,0 +1,17 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Classes: XHTML global class attribute</title>
+ <style type="text/css"><![CDATA[
+ p { color: green; }
+ .fail { color: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <p xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ <span xhtml:class="fail">This should be green.</span>
+ </p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-172a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-172a.xml
new file mode 100644
index 00000000000..fca9c6d4b7d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-172a.xml
@@ -0,0 +1,30 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Namespaced attribute selectors</title>
+ <style type="text/css"><![CDATA[
+ tests, tests * { display: block; color: green; }
+ testA[|attribute] { color: red; }
+ testB[|attribute="fail"] { color: red; }
+ testC[|attribute~="fail"] { color: red; }
+ testD[|attribute^="fail"] { color: red; }
+ testE[|attribute*="fail"] { color: red; }
+ testF[|attribute$="fail"] { color: red; }
+ testG[|attribute|="fail"] { color: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/seven-green-divs.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
+ <testA test:attribute="fail">This should be green.</testA>
+ <testB test:attribute="fail">This should be green.</testB>
+ <testC test:attribute="fail">This should be green.</testC>
+ <testD test:attribute="fail">This should be green.</testD>
+ <testE test:attribute="fail">This should be green.</testE>
+ <testF test:attribute="fail">This should be green.</testF>
+ <testG test:attribute="fail">This should be green.</testG>
+ </tests>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-172b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-172b.xml
new file mode 100644
index 00000000000..ec93920fbb7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-172b.xml
@@ -0,0 +1,31 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Namespaced attribute selectors</title>
+ <style type="text/css"><![CDATA[
+ @namespace url(http://css.example.net/);
+ tests, tests * { display: block; color: green; }
+ testA[|attribute] { color: red; }
+ testB[|attribute="fail"] { color: red; }
+ testC[|attribute~="fail"] { color: red; }
+ testD[|attribute^="fail"] { color: red; }
+ testE[|attribute*="fail"] { color: red; }
+ testF[|attribute$="fail"] { color: red; }
+ testG[|attribute|="fail"] { color: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/seven-green-divs.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
+ <testA test:attribute="fail">This should be green.</testA>
+ <testB test:attribute="fail">This should be green.</testB>
+ <testC test:attribute="fail">This should be green.</testC>
+ <testD test:attribute="fail">This should be green.</testD>
+ <testE test:attribute="fail">This should be green.</testE>
+ <testF test:attribute="fail">This should be green.</testF>
+ <testG test:attribute="fail">This should be green.</testG>
+ </tests>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-173a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-173a.xml
new file mode 100644
index 00000000000..b75f8309c7d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-173a.xml
@@ -0,0 +1,30 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Namespaced attribute selectors</title>
+ <style type="text/css"><![CDATA[
+ tests, tests * { display: block; color: red; }
+ testA[*|attribute] { color: green; }
+ testB[*|attribute="pass"] { color: green; }
+ testC[*|attribute~="pass"] { color: green; }
+ testD[*|attribute^="pass"] { color: green; }
+ testE[*|attribute*="pass"] { color: green; }
+ testF[*|attribute$="pass"] { color: green; }
+ testG[*|attribute|="pass"] { color: green; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/seven-green-divs.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
+ <testA test:attribute="pass">This should be green.</testA>
+ <testB test:attribute="pass">This should be green.</testB>
+ <testC test:attribute="pass">This should be green.</testC>
+ <testD test:attribute="pass">This should be green.</testD>
+ <testE test:attribute="pass">This should be green.</testE>
+ <testF test:attribute="pass">This should be green.</testF>
+ <testG test:attribute="pass">This should be green.</testG>
+ </tests>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-173b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-173b.xml
new file mode 100644
index 00000000000..7769701a9bd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-173b.xml
@@ -0,0 +1,30 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Namespaced attribute selectors</title>
+ <style type="text/css"><![CDATA[
+ tests, tests * { display: block; color: red; }
+ testA[*|attribute] { color: green; }
+ testB[*|attribute="pass"] { color: green; }
+ testC[*|attribute~="pass"] { color: green; }
+ testD[*|attribute^="pass"] { color: green; }
+ testE[*|attribute*="pass"] { color: green; }
+ testF[*|attribute$="pass"] { color: green; }
+ testG[*|attribute|="pass"] { color: green; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/seven-green-divs.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
+ <testA attribute="pass">This should be green.</testA>
+ <testB attribute="pass">This should be green.</testB>
+ <testC attribute="pass">This should be green.</testC>
+ <testD attribute="pass">This should be green.</testD>
+ <testE attribute="pass">This should be green.</testE>
+ <testF attribute="pass">This should be green.</testF>
+ <testG attribute="pass">This should be green.</testG>
+ </tests>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-174a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-174a.xml
new file mode 100644
index 00000000000..25e23c5272c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-174a.xml
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute selectors with multiple attributes</title>
+ <style type="text/css"><![CDATA[
+ tests, tests * { display: block; color: red; }
+ testA[*|attribute="pass"] { color: green; }
+ testB[*|attribute="pass"] { color: green; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
+ <testA attribute="pass" test:attribute="fail">This should be green.</testA>
+ <testB attribute="fail" test:attribute="pass">This should be green.</testB>
+ </tests>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-174b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-174b.xml
new file mode 100644
index 00000000000..3a4d0a5e3a2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-174b.xml
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute selectors with multiple attributes</title>
+ <style type="text/css"><![CDATA[
+ tests, tests * { display: block; color: green }
+ testA:not([*|attribute="pass"]) { color: red; }
+ testB:not([*|attribute="pass"]) { color: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <tests xmlns="http://css.example.net/" xmlns:test="http://css.example.net/">
+ <testA attribute="pass" test:attribute="fail">This should be green.</testA>
+ <testB attribute="fail" test:attribute="pass">This should be green.</testB>
+ </tests>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175a.xml
new file mode 100644
index 00000000000..ca91d681235
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175a.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Parsing: Numbers in classes</title>
+ <style type="text/css"><![CDATA[
+ p { color: green; }
+ .13 { color: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="13">This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175b.xml
new file mode 100644
index 00000000000..135b8410279
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175b.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Parsing: Numbers in classes</title>
+ <style type="text/css"><![CDATA[
+ p { color: green; }
+ .\13 { color: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="13">This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175c.xml
new file mode 100644
index 00000000000..7a93313e773
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-175c.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Parsing: Numbers in classes</title>
+ <style type="text/css"><![CDATA[
+ p { color: red; }
+ .\31 \33 { color: green; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="13">This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-176.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-176.xml
new file mode 100644
index 00000000000..31482f08983
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-176.xml
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Combinations: classes and IDs</title>
+ <style type="text/css"><![CDATA[
+p { background: red; color: yellow; }
+p:not(#other).class:not(.fail).test#id#id { background: green; color: white; }
+div { background: green; color: white; }
+div:not(#theid).class:not(.fail).test#theid#theid { background: red; color: yellow; }
+div:not(#other).notclass:not(.fail).test#theid#theid { background: red; color: yellow; }
+div:not(#other).class:not(.test).test#theid#theid { background: red; color: yellow; }
+div:not(#other).class:not(.fail).nottest#theid#theid { background: red; color: yellow; }
+div:not(#other).class:not(.fail).nottest#theid#other { background: red; color: yellow; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p id="id" class="class test">This line should be green.</p>
+ <div id="theid" class="class test">This line should be green.</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-177a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-177a.xml
new file mode 100644
index 00000000000..09ea141d647
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-177a.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Parsing : vs ::</title>
+ <style type="text/css"><![CDATA[
+ p:selection { color: yellow; background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+ <p>When you select this text, it shouldn&#39;t go red.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-177b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-177b.xml
new file mode 100644
index 00000000000..1205619970a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-177b.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Parsing : vs ::</title>
+ <style type="text/css"><![CDATA[
+ div { color: green; }
+ p::first-child { color: yellow; background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <p>This line should be green.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-178.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-178.xml
new file mode 100644
index 00000000000..00f25827619
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-178.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Parsing: :not and pseudo-elements</title>
+ <style type="text/css"><![CDATA[
+ div { color: green; }
+ p:not(:first-line) { color: yellow; background: red; }
+ p:not(:after) { color: yellow; background: red; content: ' THIS TEST HAS FAILED! '; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <p>This line should be green.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-179.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-179.xml
new file mode 100644
index 00000000000..d58cbe961d0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-179.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::first-line on inlines</title>
+ <style type="text/css"><![CDATA[
+ p { color: green; }
+ span:first-line { background: red; color: yellow; font-size: 4em; }
+ span::first-line { background: red; color: yellow; font-size: 4em; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-green-color.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p><span>This line should be green.</span></p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-179a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-179a.xml
new file mode 100644
index 00000000000..184365703d3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-179a.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::first-line after &lt;br&gt;</title>
+ <style type="text/css"><![CDATA[
+ p { color: green; }
+ p:first-line { background: red; color: yellow; font-size: 4em; }
+ p::first-line { background: red; color: yellow; font-size: 4em; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p><br></br>This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18.xml
new file mode 100644
index 00000000000..97443c66cfb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18.xml
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:hover pseudo-class</title>
+ <style type="text/css"><![CDATA[p:hover { background-color : lime }
+a:hover { background-color : lime }
+
+tr:hover { background-color : green }
+td:hover { background-color : lime }
+
+table { border-spacing: 5px; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+<p>The background color of this paragraph should turn to green when
+ the mouse pointer hovers either its text (<strong>here</strong>) or its whitespace background, <strong>here</strong>:</p>
+<address>The background color of <a href="#foo">this anchor (<strong>here</strong>)</a> should turn to green when the pointing device hovers over it.</address>
+<table>
+ <tbody>
+ <tr>
+ <td>The cells in</td>
+ <td>this table</td>
+ <td>should go</td>
+ </tr>
+ <tr>
+ <td>green when</td>
+ <td>you hover</td>
+ <td>the pointing</td>
+ </tr>
+ <tr>
+ <td>device over</td>
+ <td>them (<strong>here</strong>).</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>The rows in</td>
+ <td>this table</td>
+ <td>should go</td>
+ </tr>
+ <tr>
+ <td>dark green</td>
+ <td>when the</td>
+ <td>pointing device</td>
+ </tr>
+ <tr>
+ <td>is over the</td>
+ <td>cells <strong>there</strong>:</td>
+ <td></td> <!-- remove this cell to make an evil test; row should still go green, but cell should not -->
+ </tr>
+ <tr>
+ <td>And <strong>here</strong>:</td>
+ <td></td>
+ <td>(blank cells).</td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-180a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-180a.xml
new file mode 100644
index 00000000000..3661eb9c1f0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-180a.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::first-letter after &lt;br&gt;</title>
+ <style type="text/css"><![CDATA[
+ p { color: green; }
+ p:first-letter { background: red; color: yellow; font-size: 4em; }
+ p::first-letter { background: red; color: yellow; font-size: 4em; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p><br></br>This line should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-181.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-181.xml
new file mode 100644
index 00000000000..62465e4be54
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-181.xml
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Case sensitivity</title>
+ <style type="text/css"><![CDATA[
+ .cs { color: green; }
+ .cs P { background: red; color: yellow; }
+ .cs .a { background: red; color: yellow; }
+ .cs .span1 span { background: red; color: yellow; }
+ .cs .span2 { color: red; }
+ .cs .span2 SPAN { color: green; }
+ .cs .span2 span { background: red; color: yellow; }
+ .ci { color: red; }
+ .ci P { background: green; color: white; }
+ .ci .a { background: green; color: white; }
+ .ci .span1 span { background: green; color: white; }
+ .ci .span2 SPAN { background: green; color: white; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div>
+
+ <div class="cs">
+ <p>This line should be green.</p>
+ <p class="A">This line should be green.</p>
+ <p class="span1"><SPAN>This line should be green.</SPAN></p>
+ <p class="span2"><SPAN>This line should be green.</SPAN></p>
+ </div>
+
+
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-182.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-182.xml
new file mode 100644
index 00000000000..293c11b780f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-182.xml
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Namespaces and \: in selectors</title>
+ <style type="text/css"><![CDATA[
+p { color: green; }
+foo\:bar { background: red; color: yellow; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<p>
+<foo:bar xmlns:foo="http://www.example.org/">
+This text should be green.
+</foo:bar>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-183.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-183.xml
new file mode 100644
index 00000000000..97412ddef6e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-183.xml
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Syntax and parsing of class selectors</title>
+ <style type="text/css"><![CDATA[
+p { color: green; }
+..test { background: red; color: yellow; }
+.foo..quux { background: red; color: yellow; }
+.bar. { background: red; color: yellow; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="test">This text should be green.</p>
+<p class=".test">This text should be green.</p>
+<p class="foo">This text should be green.</p>
+<p class="foo quux">This text should be green.</p>
+<p class="foo quux">This text should be green.</p>
+<p class=" bar ">This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184-ref.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184-ref.xht
new file mode 100644
index 00000000000..8ffc002f9b0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184-ref.xht
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Ref: Two lime lines</title>
+ <style type="text/css">
+ p { color: lime; }
+ </style>
+ </head>
+ <body>
+ <p>This text should be green.</p>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184a.xml
new file mode 100644
index 00000000000..9777db1410e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184a.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Ends-with attribute selector with empty value</title>
+ <style type="text/css"><![CDATA[
+p { color: lime; }
+p[class$=""] { color: red; }
+]]></style>
+ <link rel="author" title="Lachlan Hunt" href="http://lachy.id.au/about/contact"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="css3-modsel-184-ref.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="">This text should be green.</p>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184b.xml
new file mode 100644
index 00000000000..2ea9ad9816d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184b.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Starts-with attribute selector with empty value</title>
+ <style type="text/css"><![CDATA[
+p { color: lime; }
+p[class^=""] { color: red; }
+]]></style>
+ <link rel="author" title="Lachlan Hunt" href="http://lachy.id.au/about/contact"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="css3-modsel-184-ref.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="">This text should be green.</p>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184c.xml
new file mode 100644
index 00000000000..4e945506ce2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184c.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Contains attribute selector with empty value</title>
+ <style type="text/css"><![CDATA[
+p { color: lime; }
+p[class*=""] { color: red; }
+]]></style>
+ <link rel="author" title="Lachlan Hunt" href="http://lachy.id.au/about/contact"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="css3-modsel-184-ref.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="">This text should be green.</p>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184d.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184d.xml
new file mode 100644
index 00000000000..73402386ae0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184d.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED ends-with attribute selector with empty value</title>
+ <style type="text/css"><![CDATA[
+p { color: red; }
+p:not([class$=""]) { color: lime; }
+]]></style>
+ <link rel="author" title="Lachlan Hunt" href="http://lachy.id.au/about/contact"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="css3-modsel-184-ref.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="">This text should be green.</p>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184e.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184e.xml
new file mode 100644
index 00000000000..418169b8cd0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184e.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED starts-with attribute selector with empty value</title>
+ <style type="text/css"><![CDATA[
+p { color: red; }
+p:not([class^=""]) { color: lime; }
+]]></style>
+ <link rel="author" title="Lachlan Hunt" href="http://lachy.id.au/about/contact"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="css3-modsel-184-ref.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="">This text should be green.</p>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184f.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184f.xml
new file mode 100644
index 00000000000..c28b61dabfb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-184f.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED contains attribute selector with empty value</title>
+ <style type="text/css"><![CDATA[
+p { color: red; }
+p:not([class*=""]) { color: lime; }
+]]></style>
+ <link rel="author" title="Lachlan Hunt" href="http://lachy.id.au/about/contact"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="css3-modsel-184-ref.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="">This text should be green.</p>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18a.xml
new file mode 100644
index 00000000000..da5d12dc881
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18a.xml
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:hover pseudo-class on links</title>
+ <style type="text/css"><![CDATA[
+p { color: navy; }
+
+.a a:hover { background: green; color: white; }
+
+.b a:hover { background: red; color: yellow; }
+.b a:link { background: green; color: white; }
+
+.c :link { background: green; color: white; }
+.c :visited:hover { background: red; color: yellow; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+<p class="a">The background color of <a href="#foo">this anchor (<strong>here</strong>)</a> should turn to green when the pointing device hovers over it.</p>
+<p class="b">The background color of <a href="#foo">this anchor (<strong>here</strong>)</a> should <strong>remain green when you hover it</strong>.</p>
+<p class="c">The background color of <a href="http://link.example.com/">this anchor (<strong>here</strong>)</a> should <strong>remain green when the pointing device hovers over it</strong> (do not follow that link).</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18b.xml
new file mode 100644
index 00000000000..b8dc445f98e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18b.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:hover pseudo-class</title>
+ <style type="text/css"><![CDATA[div:hover > p:first-child { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+ <div>
+ <p>The background color of this paragraph should turn to green when the mouse pointer hovers over any of the following:<br></br><strong>This text.</strong></p>
+ <p>This text.</p>
+ <table><tr><td><table><tr><td><dl><dt>This text.</dt><dd>This text.</dd></dl></td></tr></table></td></tr><tr><td>This text.</td></tr></table>
+ <p><sub>This text.</sub></p>
+ <p>...and anything else between the top of the first paragraph and the bottom of this paragraph.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18c.xml
new file mode 100644
index 00000000000..77fba265b98
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-18c.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:hover pseudo-class on links</title>
+ <style type="text/css"><![CDATA[
+:link, :visited { color: navy; text-decoration: none; }
+:link:hover span { background-color : lime }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+ <p><a href="#foo">Hover <strong>here</strong> and the background of <span>this text should go green</span>.</a></p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-19.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-19.xml
new file mode 100644
index 00000000000..79f23a5084a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-19.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:active pseudo-class</title>
+ <style type="text/css"><![CDATA[a:active { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+<p>The background color of <a href="#foo">the anchor</a>
+ should turn to green when it is activated and come back to
+ normal when it is released.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-19b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-19b.xml
new file mode 100644
index 00000000000..48ae456ca37
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-19b.xml
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:active pseudo-class on controls</title>
+ <style type="text/css"><![CDATA[button:active { background: green; color: white; }]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+<p><button>Activating (e.g. holding the mouse button down on) this button should make it go green.</button></p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-2.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-2.xml
new file mode 100644
index 00000000000..09f84d60e98
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-2.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Type element selectors</title>
+ <style type="text/css"><![CDATA[address { background-color: lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<address>This address element should have a green background.</address>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-20.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-20.xml
new file mode 100644
index 00000000000..7d1288c9f24
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-20.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:focus pseudo-class</title>
+ <style type="text/css"><![CDATA[a:focus { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+<p>The background color of <a href="#foo">anchors</a>
+ in this page should turn <a href="#foo">to green</a> when they have the
+ <a href="#foo">focus</a>.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21.xml
new file mode 100644
index 00000000000..5c530922475
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21.xml
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:target pseudo-class</title>
+ <style type="text/css"><![CDATA[p:target { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+<p id="first">This paragraph should be unstyled.
+ The background of the following paragraph should become green when
+ you follow <a href="#second">this link</a>.</p>
+<p id="second">This paragraph should initially be unstyled.
+ It should become green when you select the link above. When you select
+ <a href="#third">this link</a>, it should return to being unstyled and the
+ background of the paragraph below should become green.</p>
+<p id="third">This paragraph should initially be unstyled.
+ It should become green when you select the link above. When you follow
+ <a href="#missing">this link</a>, the three paragraphs
+ should all return to being unstyled.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21b.xml
new file mode 100644
index 00000000000..d97181d47dc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21b.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:target pseudo-class</title>
+ <style type="text/css"><![CDATA[p { background-color: lime; }
+p:target { background-color: red; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This paragraph should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21c.xml
new file mode 100644
index 00000000000..e45074c9a09
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-21c.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:target pseudo-class</title>
+ <style type="text/css"><![CDATA[:root { background-color: green; }
+:target { background-color: red; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p>This page should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-22.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-22.xml
new file mode 100644
index 00000000000..098679c3689
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-22.xml
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:lang() pseudo-class</title>
+ <style type="text/css"><![CDATA[ul > li { background-color : red }
+li:lang(en-GB) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li lang="en-GB">This list item should be green because its language is
+ British English</li>
+ <li lang="en-GB-wa">This list item should be green because its language
+ is British English (Wales)</li>
+</ul>
+<ol>
+ <li lang="en-US">This list item should NOT be green because its language
+ is US English</li>
+ <li lang="fr">This list item should NOT be green because its language is
+ French</li>
+</ol>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-23.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-23.xml
new file mode 100644
index 00000000000..663ec09ef2c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-23.xml
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:enabled pseudo-class</title>
+ <style type="text/css"><![CDATA[button { background-color : red }
+input { background-color : red }
+button:enabled { background-color : lime }
+input:enabled { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>
+ <button>A button (enabled) with green background</button>
+ <br></br>
+ <input type="text" size="36" value="a text area (enabled) with green background"></input>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-24.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-24.xml
new file mode 100644
index 00000000000..d20a0116f74
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-24.xml
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:disabled pseudo-class</title>
+ <style type="text/css"><![CDATA[button { background-color : red }
+input { background-color : red }
+button:disabled { background-color : lime }
+input:disabled { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>
+ <button disabled="disabled">A button (disabled) with green background</button>
+ <br></br>
+ <input disabled="disabled" type="text" size="36" value="a text area (disabled) with green background"></input>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-25.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-25.xml
new file mode 100644
index 00000000000..ef1875fc89e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-25.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:checked pseudo-class</title>
+ <style type="text/css"><![CDATA[input, span { background-color : red }
+input:checked, input:checked + span { background-color : lime}
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>
+<input type="checkbox" checked="checked"></input> <span>Everything in this paragraph should have a green background</span></p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27.xml
new file mode 100644
index 00000000000..e20227755cb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:root pseudo-class</title>
+ <style type="text/css"><![CDATA[html { background-color : red }
+*:root { background-color: lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>The background of the document should be green</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27a.xml
new file mode 100644
index 00000000000..42736a39095
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27a.xml
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Impossible rules (:root:first-child, etc)</title>
+ <style type="text/css"><![CDATA[
+:root:first-child { background-color: red; }
+:root:last-child { background-color: red; }
+:root:only-child { background-color: red; }
+:root:nth-child(1) { background-color: red; }
+:root:nth-child(n) { background-color: red; }
+:root:nth-last-child(1) { background-color: red; }
+:root:nth-last-child(n) { background-color: red; }
+:root:first-of-type { background-color: red; }
+:root:last-of-type { background-color: red; }
+:root:only-of-type { background-color: red; }
+:root:nth-of-type(1) { background-color: red; }
+:root:nth-of-type(n) { background-color: red; }
+:root:nth-last-of-type(1) { background-color: red; }
+:root:nth-last-of-type(n) { background-color: red; }
+p { color: green; }]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>This line should be green (there should be no red on this page).</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27b.xml
new file mode 100644
index 00000000000..8bfb356e50d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-27b.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Impossible rules (* html, * :root)</title>
+ <style type="text/css"><![CDATA[* html { background-color: red; }
+* :root { background-color: red; }
+p { color: green; }]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>This line should be green (there should be no red on this page).</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-28.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-28.xml
new file mode 100644
index 00000000000..f73184d1cac
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-28.xml
@@ -0,0 +1,99 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-child() pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+ul > li:nth-child(odd) { background-color : lime }
+ol > li:nth-child(even) { background-color : lime }
+table.t1 tr:nth-child(-n+4) { background-color : lime }
+table.t2 td:nth-child(3n+1) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li class="red">This first list item should have a green background</li>
+ <li>Second list item</li>
+ <li class="red">This third list item should have a green background</li>
+ <li>Fourth list item</li>
+ <li class="red">This fifth list item should have a green background</li>
+ <li>Sixth list item</li>
+</ul>
+<ol>
+ <li>First list item</li>
+ <li class="red">This second list item should have a green background</li>
+ <li>Third list item</li>
+ <li class="red">This fourth list item should have a green background</li>
+ <li>Fifth list item</li>
+ <li class="red">This sixth list item should have a green background</li>
+</ol>
+<div>
+<table border="1" class="t1">
+ <tr class="red">
+<td>Green row : 1.1</td>
+<td>1.2</td>
+ <td>1.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 2.1</td>
+<td>2.2</td>
+ <td>2.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 3.1</td>
+<td>3.2</td>
+ <td>3.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 4.1</td>
+<td>4.2</td>
+ <td>4.3</td>
+</tr>
+ <tr>
+<td>5.1</td>
+<td>5.2</td>
+<td>5.3</td>
+</tr>
+ <tr>
+<td>6.1</td>
+<td>6.2</td>
+<td>6.3</td>
+</tr>
+</table>
+
+<table class="t2" border="1">
+ <tr>
+<td class="red">green cell</td>
+<td>1.2</td>
+<td>1.3</td>
+ <td class="red">green cell</td>
+<td>1.5</td>
+<td>1.6</td>
+ <td class="red">green cell</td>
+<td>1.8</td>
+</tr>
+ <tr>
+<td class="red">green cell</td>
+<td>2.2</td>
+<td>2.3</td>
+ <td class="red">green cell</td>
+<td>2.5</td>
+<td>2.6</td>
+ <td class="red">green cell</td>
+<td>2.8</td>
+</tr>
+ <tr>
+<td class="red">green cell</td>
+<td>3.2</td>
+<td>3.3</td>
+ <td class="red">green cell</td>
+<td>3.5</td>
+<td>3.6</td>
+ <td class="red">green cell</td>
+<td>3.8</td>
+</tr>
+</table>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-28b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-28b.xml
new file mode 100644
index 00000000000..dd3944a9288
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-28b.xml
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-child() pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important }
+ul > li:nth-child(odd) { background-color : red }
+ol > li:nth-child(even) { background-color : red }
+table.t1 tr:nth-child(-n+4) { background-color : red }
+table.t2 td:nth-child(3n+1) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li class="green">This first list item should have a green background</li>
+ <li>Second list item</li>
+ <li class="green">This third list item should have a green background</li>
+ <li>Fourth list item</li>
+ <li class="green">This fifth list item should have a green background</li>
+ <li>Sixth list item</li>
+</ul>
+<ol>
+ <li>First list item</li>
+ <li class="green">This second list item should have a green background</li>
+ <li>Third list item</li>
+ <li class="green">This fourth list item should have a green background</li>
+ <li>Fifth list item</li>
+ <li class="green">This sixth list item should have a green background</li>
+</ol>
+<div>
+<table border="1" class="t1">
+ <tr class="green">
+<td>Green row : 1.1</td>
+<td>1.2</td>
+ <td>1.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 2.1</td>
+<td>2.2</td>
+ <td>2.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 3.1</td>
+<td>3.2</td>
+ <td>3.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 4.1</td>
+<td>4.2</td>
+ <td>4.3</td>
+</tr>
+ <tr>
+<td>5.1</td>
+<td>5.2</td>
+<td>5.3</td>
+</tr>
+ <tr>
+<td>6.1</td>
+<td>6.2</td>
+<td>6.3</td>
+</tr>
+</table>
+<p></p>
+<table class="t2" border="1">
+ <tr>
+<td class="green">green cell</td>
+<td>1.2</td>
+<td>1.3</td>
+ <td class="green">green cell</td>
+<td>1.5</td>
+<td>1.6</td>
+ <td class="green">green cell</td>
+<td>1.8</td>
+</tr>
+ <tr>
+<td class="green">green cell</td>
+<td>2.2</td>
+<td>2.3</td>
+ <td class="green">green cell</td>
+<td>2.5</td>
+<td>2.6</td>
+ <td class="green">green cell</td>
+<td>2.8</td>
+</tr>
+ <tr>
+<td class="green">green cell</td>
+<td>3.2</td>
+<td>3.3</td>
+ <td class="green">green cell</td>
+<td>3.5</td>
+<td>3.6</td>
+ <td class="green">green cell</td>
+<td>3.8</td>
+</tr>
+</table>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-29.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-29.xml
new file mode 100644
index 00000000000..cfa23b50c54
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-29.xml
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-last-child() pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+ul > li:nth-last-child(odd) { background-color : green }
+ol > li:nth-last-child(even) { background-color : green }
+table.t1 tr:nth-last-child(-n+4) { background-color : green }
+table.t2 td:nth-last-child(3n+1) { background-color : green }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li>First list item</li>
+ <li class="red">This second list item should have a green background</li>
+ <li>Third list item</li>
+ <li class="red">This fourth list item should have a green background</li>
+ <li>Fifth list item</li>
+ <li class="red">This sixth list item should have a green background</li>
+</ul>
+<ol>
+ <li class="red">This first list item should have a green background</li>
+ <li>Second list item</li>
+ <li class="red">This third list item should have a green background</li>
+ <li>Fourth list item</li>
+ <li class="red">This fifth list item should have a green background</li>
+ <li>Sixth list item</li>
+</ol>
+<div>
+<table border="1" class="t1">
+ <tr>
+<td>1.1</td>
+<td>1.2</td>
+ <td>1.3</td>
+</tr>
+ <tr>
+<td>2.1</td>
+<td>2.2</td>
+ <td>2.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 3.1</td>
+<td>3.2</td>
+ <td>3.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 4.1</td>
+<td>4.2</td>
+ <td>4.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 5.1</td>
+<td>5.2</td>
+ <td>5.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 6.1</td>
+<td>6.2</td>
+ <td>6.3</td>
+</tr>
+</table>
+<p></p>
+<table class="t2" border="1">
+ <tr>
+<td>1.1</td>
+<td class="red">green cell</td>
+<td>1.3</td>
+ <td>1.4</td>
+<td class="red">green cell</td>
+<td>1.6</td>
+ <td>1.7</td>
+<td class="red">green cell</td>
+</tr>
+ <tr>
+<td>2.1</td>
+<td class="red">green cell</td>
+<td>2.3</td>
+ <td>2.4</td>
+<td class="red">green cell</td>
+<td>2.6</td>
+ <td>2.7</td>
+<td class="red">green cell</td>
+</tr>
+ <tr>
+<td>3.1</td>
+<td class="red">green cell</td>
+<td>3.3</td>
+ <td>3.4</td>
+<td class="red">green cell</td>
+<td>3.6</td>
+ <td>3.7</td>
+<td class="red">green cell</td>
+</tr>
+</table>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-29b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-29b.xml
new file mode 100644
index 00000000000..39227d21895
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-29b.xml
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-last-child() pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important }
+ul > li:nth-last-child(odd) { background-color : red }
+ol > li:nth-last-child(even) { background-color : red }
+table.t1 tr:nth-last-child(-n+4) { background-color : red }
+table.t2 td:nth-last-child(3n+1) { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li>First list item</li>
+ <li class="green">This second list item should have a green background</li>
+ <li>Third list item</li>
+ <li class="green">This fourth list item should have a green background</li>
+ <li>Fifth list item</li>
+ <li class="green">This sixth list item should have a green background</li>
+</ul>
+<ol>
+ <li class="green">This first list item should have a green background</li>
+ <li>Second list item</li>
+ <li class="green">This third list item should have a green background</li>
+ <li>Fourth list item</li>
+ <li class="green">This fifth list item should have a green background</li>
+ <li>Sixth list item</li>
+</ol>
+<div>
+<table border="1" class="t1">
+ <tr>
+<td>1.1</td>
+<td>1.2</td>
+ <td>1.3</td>
+</tr>
+ <tr>
+<td>2.1</td>
+<td>2.2</td>
+ <td>2.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 3.1</td>
+<td>3.2</td>
+ <td>3.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 4.1</td>
+<td>4.2</td>
+ <td>4.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 5.1</td>
+<td>5.2</td>
+ <td>5.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 6.1</td>
+<td>6.2</td>
+ <td>6.3</td>
+</tr>
+</table>
+<p></p>
+<table class="t2" border="1">
+ <tr>
+<td>1.1</td>
+<td class="green">green cell</td>
+<td>1.3</td>
+ <td>1.4</td>
+<td class="green">green cell</td>
+<td>1.6</td>
+ <td>1.7</td>
+<td class="green">green cell</td>
+</tr>
+ <tr>
+<td>2.1</td>
+<td class="green">green cell</td>
+<td>2.3</td>
+ <td>2.4</td>
+<td class="green">green cell</td>
+<td>2.6</td>
+ <td>2.7</td>
+<td class="green">green cell</td>
+</tr>
+ <tr>
+<td>3.1</td>
+<td class="green">green cell</td>
+<td>3.3</td>
+ <td>3.4</td>
+<td class="green">green cell</td>
+<td>3.6</td>
+ <td>3.7</td>
+<td class="green">green cell</td>
+</tr>
+</table>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-3.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-3.xml
new file mode 100644
index 00000000000..7bcc09b947f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-3.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Universal selector</title>
+ <style type="text/css"><![CDATA[* { color : lime }
+ul, p { color : red }
+*.t1 { color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<p>
+<span class="t1">This paragraph, and all textual contents in the document,
+ should be green.</span>
+</p>
+<ul>
+ <li class="t1">This item should be green.</li>
+</ul>
+<foo xmlns="http://www.example.org/a">And this element, part of a non-HTML namespace,
+ should be green too</foo>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-30.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-30.xml
new file mode 100644
index 00000000000..facd83b7116
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-30.xml
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-of-type() pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+p:nth-of-type(3) { background-color : lime }
+dl > :nth-of-type(3n+1) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>This paragraph is here only to fill space in the DOM</p>
+<address>And this address too..</address>
+<p>So does this paragraph !</p>
+<p class="red">But this one should have green background</p>
+<dl>
+ <dt class="red">First definition term that should have green background</dt>
+ <dd class="red">First definition that should have green background</dd>
+ <dt>Second definition term</dt>
+ <dd>Second definition</dd>
+ <dt>Third definition term</dt>
+ <dd>Third definition</dd>
+ <dt class="red">Fourth definition term that should have green background</dt>
+ <dd class="red">Fourth definition that should have green background</dd>
+ <dt>Fifth definition term</dt>
+ <dd>Fifth definition</dd>
+ <dt>Sixth definition term</dt>
+ <dd>Sixth definition</dd>
+</dl>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-31.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-31.xml
new file mode 100644
index 00000000000..dbf672bda05
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-31.xml
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:nth-last-of-type() pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+p:nth-last-of-type(3) { background-color : lime }
+dl > :nth-last-of-type(3n+1) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="red">This paragraph should have green background</p>
+<address>But this address is here only to fill space in the dom..</address>
+<p>So does this paragraph !</p>
+<p>And so does this one too.</p>
+<dl>
+ <dt>First definition term</dt>
+ <dd>First definition</dd>
+ <dt>Second definition term</dt>
+ <dd>Second definition</dd>
+ <dt class="red">Third definition term that should have green background</dt>
+ <dd class="red">Third definition that should have green background</dd>
+ <dt>Fourth definition term</dt>
+ <dd>Fourth definition</dd>
+ <dt>Fifth definition term</dt>
+ <dd>Fifth definition</dd>
+ <dt class="red">Sixth definition term that should have green background</dt>
+ <dd class="red">Sixth definition that should have green background</dd>
+</dl>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-32.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-32.xml
new file mode 100644
index 00000000000..a5551b33f5f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-32.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:first-child pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+.t1 td:first-child { background-color : lime }
+p > *:first-child { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div>
+<table class="t1" border="1">
+ <tr>
+ <td class="red">green cell</td>
+ <td>1.2</td>
+ <td>1.3</td>
+ </tr>
+ <tr>
+ <td class="red">green cell</td>
+ <td>2.2</td>
+ <td>2.3</td>
+ </tr>
+ <tr>
+ <td class="red">green cell</td>
+ <td>3.2</td>
+ <td>3.3</td>
+ </tr>
+</table>
+</div>
+<p>This paragraph contains some text
+ <span>and a span that should have a green background</span>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-33.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-33.xml
new file mode 100644
index 00000000000..c3fc2731a93
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-33.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:last-child pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+.t1 td:last-child { background-color : lime }
+p > *:last-child { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div>
+<table class="t1" border="1">
+ <tr>
+ <td>1.1</td>
+ <td>1.2</td>
+ <td class="red">green cell</td>
+ </tr>
+ <tr>
+ <td>2.1</td>
+ <td>2.2</td>
+ <td class="red">green cell</td>
+ </tr>
+ <tr>
+ <td>3.1</td>
+ <td>3.2</td>
+ <td class="red">green cell</td>
+ </tr>
+</table>
+</div>
+<p>
+<span>This paragraph contains a span that should
+ have a green background</span> and some text after it.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-34.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-34.xml
new file mode 100644
index 00000000000..6ea08bbae2f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-34.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:first-of-type pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+address { margin-bottom : 1em ; margin-left : 1em }
+address:first-of-type { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div>This div contains 3 addresses:
+<address class="red">A first address that should have a green background</address>
+<address>A second address with normal background</address>
+<address>A third address with normal background</address>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-35.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-35.xml
new file mode 100644
index 00000000000..ac53300ad11
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-35.xml
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:last-of-type pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+address { margin-bottom : 1em ; margin-left : 1em }
+address:last-of-type { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div>
+<address>A first address with normal background</address>
+<address>A second address with normal background</address>
+<address class="red">A third address that should have a green background</address>
+This div contains 3 addresses above this sentence.</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-36.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-36.xml
new file mode 100644
index 00000000000..393073a4be9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-36.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:only-child pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+p:only-child { background-color : lime }
+div.testText > div > p { margin-left : 1em }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>This paragraph should have normal background</p>
+<div>This div contains only one paragraph
+ <p class="red">This paragraph should have green background</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-37.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-37.xml
new file mode 100644
index 00000000000..2c805492f7e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-37.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:only-of-type pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+.t1 :only-of-type { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div class="t1">
+<p>This paragraph should have normal background</p>
+<address class="red">But this address should have green background</address>
+<p>This paragraph should have normal background</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-38.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-38.xml
new file mode 100644
index 00000000000..ff60e4290d8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-38.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::first-line pseudo-element</title>
+ <style type="text/css"><![CDATA[p:first-line { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>This very long paragraph should have a
+ first line with green background. This very long paragraph should have a first
+ line with green background. This very long paragraph should have a first line
+ with green background. This very long paragraph should have a first line with
+ green background. This very long paragraph should have a first line with green
+ background. This very long paragraph should have a first line with green background.
+ This very long paragraph should have a first line with green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39.xml
new file mode 100644
index 00000000000..bd0207a8f8b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39.xml
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::first-letter pseudo-element</title>
+ <style type="text/css"><![CDATA[p:first-letter { font-size : xx-large ; background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+
+<p>This very long paragraph
+should have a big first letter T with a green background. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39a.xml
new file mode 100644
index 00000000000..70746c18572
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39a.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::first-letter pseudo-element with ::before pseudo-element</title>
+ <style type="text/css"><![CDATA[p:first-letter { color: lime; font-size: xx-large; }
+p:before { color: red; content: 'T'; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+
+<p>his very long paragraph should
+have a big green first letter T. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39b.xml
new file mode 100644
index 00000000000..95b85d5efe3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39b.xml
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::first-letter pseudo-element</title>
+ <style type="text/css"><![CDATA[p::first-letter { font-size : xx-large ; background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+
+<p>This very long paragraph
+should have a big first letter T with a green background. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39c.xml
new file mode 100644
index 00000000000..4401b78fb6e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-39c.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::first-letter pseudo-element with ::before pseudo-element</title>
+ <style type="text/css"><![CDATA[p::first-letter { color: lime; font-size: xx-large; }
+ p::before { color: red; content: 'T'; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+
+<p>his very long paragraph should
+have a big green first letter T. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text. Dummy text. Dummy
+text. Dummy text. Dummy text. Dummy text.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-3a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-3a.xml
new file mode 100644
index 00000000000..8ee5d04a994
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-3a.xml
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Universal selector (no namespaces)</title>
+ <style type="text/css"><![CDATA[* { color : lime }
+ul, p { color : red }
+*.t1 { color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>
+<span class="t1">This paragraph, and all textual contents in the document,
+ should be green.</span>
+</p>
+<ul>
+ <li class="t1">This item should be green.</li>
+</ul>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-4.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-4.xml
new file mode 100644
index 00000000000..4d38e6c2d51
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-4.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Omitted universal selector</title>
+ <style type="text/css"><![CDATA[#foo { background-color : lime }
+p { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p id="foo">This paragraph should have a green background</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-41.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-41.xml
new file mode 100644
index 00000000000..8d0caef3112
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-41.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::before pseudo-element</title>
+ <style type="text/css"><![CDATA[p::before { background-color : lime ; content : "GENERATED CONTENT "}
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>You should see before this paragraph the words GENERATED CONTENT over green background</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-41a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-41a.xml
new file mode 100644
index 00000000000..a010e28af73
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-41a.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:before pseudo-element</title>
+ <style type="text/css"><![CDATA[p:before { background-color : lime ; content : "GENERATED CONTENT "}
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>You should see before this paragraph the words GENERATED CONTENT over green background</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-42.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-42.xml
new file mode 100644
index 00000000000..32617aee70b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-42.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>::after pseudo-element</title>
+ <style type="text/css"><![CDATA[p::after { background-color : lime ; content : "GENERATED CONTENT "}
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>You should see after this paragraph the words GENERATED CONTENT over green background</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-42a.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-42a.xml
new file mode 100644
index 00000000000..600e68138e3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-42a.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>:after pseudo-element</title>
+ <style type="text/css"><![CDATA[p:after { background-color : lime ; content : "GENERATED CONTENT "}
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>You should see after this paragraph the words GENERATED CONTENT over green background</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-43.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-43.xml
new file mode 100644
index 00000000000..312c185510b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-43.xml
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Descendant combinator</title>
+ <style type="text/css"><![CDATA[.white { background-color: transparent ! important; }
+.red { background-color: red; }
+div.t1 p { background-color: lime; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div class="t1">
+ <p class="red">This paragraph should have a green background</p>
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <p class="red">This paragraph should have a green background</p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <p class="white">This paragraph should be unstyled.</p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-43b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-43b.xml
new file mode 100644
index 00000000000..386b5994c78
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-43b.xml
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Descendant combinator</title>
+ <style type="text/css"><![CDATA[.white { background-color: transparent ! important; }
+.green { background-color: lime; }
+div.t1 p { background-color: red; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div class="t1">
+ <p class="white">This paragraph should be unstyled</p>
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <p class="white">This paragraph should be unstyled</p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <p class="green">This paragraph should have a green background</p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44.xml
new file mode 100644
index 00000000000..3ba816eba4d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44.xml
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Child combinator</title>
+ <style type="text/css"><![CDATA[.white { background-color: transparent ! important; }
+.red { background-color: red; }
+div > p.test { background-color: lime; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <p class="red test">This paragraph should have a green background</p>
+ <div>
+ <p class="red test">This paragraph should have a green background</p>
+ </div>
+ </div>
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <p class="white test">This paragraph should be unstyled.</p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44b.xml
new file mode 100644
index 00000000000..cdbf452c925
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44b.xml
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Child combinator</title>
+ <style type="text/css"><![CDATA[.white { background-color: transparent ! important; }
+.green { background-color: lime; }
+div > p.test { background-color: red; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <p class="white test">This paragraph should be unstyled.</p>
+ <div>
+ <p class="white test">This paragraph should be unstyled.</p>
+ </div>
+ </div>
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <p class="green test">This paragraph should have a green background.</p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44c.xml
new file mode 100644
index 00000000000..9f5c8d25c17
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44c.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Child combinator and classes</title>
+ <style type="text/css"><![CDATA[
+ .fail > div { background: red; color: yellow; }
+ .control { background: green; color: white; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div> This should be unstyled. </div>
+ <div class="control"> This should have a green background. </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44d.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44d.xml
new file mode 100644
index 00000000000..8f448aba1bc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-44d.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Child combinatior and IDs</title>
+ <style type="text/css"><![CDATA[
+ #fail > div { background: red; }
+ p { background: green; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div> This should be unstyled. </div>
+ <p> This should have a green background. </p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45.xml
new file mode 100644
index 00000000000..7d29eeaab2b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45.xml
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Direct adjacent combinator</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+div.stub > p + p { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div class="stub">
+ <p>This paragraph should be unstyled.</p>
+ <p class="red">But this one should have a green background.</p>
+ <p class="red">And this one should also have a green background.</p>
+ <address>This address is only here to fill some space between two paragraphs.</address>
+ <p>This paragraph should be unstyled.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45b.xml
new file mode 100644
index 00000000000..7aa209e96f8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45b.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Direct adjacent combinator</title>
+ <style type="text/css"><![CDATA[.green { background-color: lime; }
+.white { background-color: transparent ! important; }
+div.stub > p + p { background-color: red; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div class="stub">
+ <p class="green">This paragraph should have a green background.</p>
+ <p class="white">But this one should be unstyled.</p>
+ <p class="white">And this one should also be unstyled.</p>
+ <address class="green">This address is only here to fill some space between two paragraphs and should have a green background.</address>
+ <p class="green">This paragraph should have a green background too.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45c.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45c.xml
new file mode 100644
index 00000000000..4e139447cf7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-45c.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Direct adjacent combinator and classes</title>
+ <style type="text/css"><![CDATA[
+ .fail + div { background: red; }
+ .control { background: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div> This should be unstyled. </div>
+ <div class="control"> This should have a green background. </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-46.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-46.xml
new file mode 100644
index 00000000000..c826cc9675e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-46.xml
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Indirect adjacent combinator</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+div.stub > p ~ p { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div class="stub">
+ <p>This paragraph should be unstyled.</p>
+ <p class="red">But this one should have a green background</p>
+ <p class="red">And this one should also have a green background</p>
+ <address>This address is only here to fill some space between two paragraphs</address>
+ <p class="red">This paragraph should have a green background</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-46b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-46b.xml
new file mode 100644
index 00000000000..35b47b898a7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-46b.xml
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Indirect adjacent combinator</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important }
+div.stub > p ~ p { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div class="stub">
+ <p>This paragraph should be unstyled.</p>
+ <p class="green">But this one should have a green background</p>
+ <p class="green">And this one should also have a green background</p>
+ <address>This address is only here to fill some space between two paragraphs</address>
+ <p class="green">This paragraph should have a green background</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-47.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-47.xml
new file mode 100644
index 00000000000..320490f2112
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-47.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED type element selector</title>
+ <style type="text/css"><![CDATA[div.stub span, div.stub address, div.stub *|q, div.stub *|r { background-color: red; }
+address, *|q, *|r { display: block; margin: 1em; }
+div.stub *:not(p) { background-color: lime; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <div class="stub">
+ <p>
+ <span>The text in this paragraph should have a green background</span>
+ </p>
+ <address>This address should have a green background</address>
+ <q xmlns="http://www.example.org/a">This element in another namespace should have a green background.</q>
+ <r xmlns="">This element without a namespace should have a green background.</r>
+ <p>This paragraph should be unstyled.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-48.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-48.xml
new file mode 100644
index 00000000000..51484c8eac6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-48.xml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED universal selector</title>
+ <style type="text/css"><![CDATA[@namespace html url(http://www.w3.org/1999/xhtml);
+@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.stub > *|* { background-color : lime ; display : block ;
+ margin-bottom : 1em }
+div.stub > *|*:not(*) { background-color : red }
+/* yes, the rule just above selects nothing... That's the point */
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-address-p-p-p-lime-background.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<address>This address should have a green background</address>
+<s xmlns="http://www.example.org/b">This paragraph should have a green background</s>
+<t xmlns="">This paragraph should have a green background</t>
+<u xmlns="http://www.example.org/a">This paragraph should have a green background</u>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-49.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-49.xml
new file mode 100644
index 00000000000..40aa8315ce0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-49.xml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED omitted universal selector is forbidden</title>
+ <style type="text/css"><![CDATA[@namespace html url(http://www.w3.org/1999/xhtml);
+@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.stub > *|* { background-color : lime ; display : block ;
+ margin-bottom : 1em }
+div.stub > *|*:not() { background-color : red }
+/* yes, the rule just above selects nothing... That's the point */
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-address-p-p-p-lime-background.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<address>This address should have a green background</address>
+<s xmlns="http://www.example.org/b">This paragraph should have a green background</s>
+<t xmlns="">This paragraph should have a green background</t>
+<u xmlns="http://www.example.org/a">This paragraph should have a green background</u>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-5.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-5.xml
new file mode 100644
index 00000000000..cd559508ec4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-5.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute existence selector</title>
+ <style type="text/css"><![CDATA[p { background-color : red }
+p[title] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p title="title">This paragraph should have a green background because its TITLE
+ attribute is set.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-50.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-50.xml
new file mode 100644
index 00000000000..7b81eaec828
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-50.xml
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED attribute existence selector</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+a|* { color : red ; display : block ; margin-bottom : 1em }
+div.stub *|*:not([test]) { color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<q xmlns="http://www.example.org/a" test="1">
+ <r>This text should be in green characters</r>
+</q>
+<s xmlns="http://www.example.org/a">This text should be in green characters</s>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-51.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-51.xml
new file mode 100644
index 00000000000..327bdca14d8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-51.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED attribute value selector</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+div.stub > p {color : red }
+div.stub > a|* { color : red ; display : block ; margin-bottom : 1em }
+div.stub *|*:not([test="1"]) { color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<q xmlns="http://www.example.org/a" test="1">
+ <r test="11">This text should be</r>
+ <r>in green characters</r>
+</q>
+<s xmlns="http://www.example.org/a">This text should be in green characters</s>
+<p>This text should be in green characters</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-52.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-52.xml
new file mode 100644
index 00000000000..3320e3d2c0a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-52.xml
@@ -0,0 +1,28 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED attribute space-separated value selector</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.stub p { color : red }
+div.stub > a|*, div.stub > b|* { color : red ; display : block ; margin-bottom : 1em }
+div.stub *|*:not([test~="foo"]) { color : lime }
+div.stub *|p:not([class~="foo"]) { color : lime }
+div.stub b|*[test~="foo2"] { color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<q xmlns="http://www.example.org/a" test="bar foo tut">
+ <r test="tut foofoo bar">This text should be</r>
+ <r>in green characters</r>
+</q>
+<s xmlns="http://www.example.org/a" test="bar tut">This text should be in green characters</s>
+<t xmlns="http://www.example.org/a">This text should be in green characters</t>
+<p class="tit foo1 tut">This text should be in green characters</p>
+<u xmlns="http://www.example.org/b" test="tit foo2 tut">This text should be in green characters</u>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-53.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-53.xml
new file mode 100644
index 00000000000..bb9118688b6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-53.xml
@@ -0,0 +1,28 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED attribute dash-separated value selector</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.stub p { color : red }
+div.stub > a|*, div.stub > b|* { color : red ; display : block ; margin-bottom : 1em }
+div.stub *|*:not([test|="foo-bar"]) { color : lime }
+div.stub *|p:not([lang|="en-us"]) { color : lime }
+div.stub b|*[test|="foo2-bar"] { color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="stub">
+<q xmlns="http://www.example.org/a" test="foo-bar">
+ <r test="foo-bartut">This text should be</r>
+ <r>in green characters</r>
+</q>
+<s xmlns="http://www.example.org/a" test="bar tut">This text should be in green characters</s>
+<t xmlns="http://www.example.org/a">This text should be in green characters</t>
+<p class="en-uk">This text should be in green characters</p>
+<u xmlns="http://www.example.org/b" test="foo2-bar-lol">This text should be in green characters</u>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-54.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-54.xml
new file mode 100644
index 00000000000..6e5327a9c26
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-54.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED substring matching attribute selector on beginning</title>
+ <style type="text/css"><![CDATA[div.stub > * { color : red }
+div.stub *:not([title^="si on"]) { color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-paragraph-lime-characters.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div class="stub">
+<p>This paragraph should be in green characters.</p>
+<p title="on chante?">This paragraph should be in green characters.</p>
+<p title="si on chantait">
+ <span title="si il chantait">This paragraph should be in green characters.</span>
+</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-55.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-55.xml
new file mode 100644
index 00000000000..acc6dcd7290
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-55.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED substring matching attribute selector on end</title>
+ <style type="text/css"><![CDATA[div.stub > * { color : red }
+div.stub *:not([title$="tait"]) { color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-paragraph-lime-characters.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div class="stub">
+<p>This paragraph should be in green characters.</p>
+<p title="on chante?">This paragraph should be in green characters.</p>
+<p title="si on chantait">
+ <span title="si il chante">This paragraph should be in green characters.</span>
+</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-56.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-56.xml
new file mode 100644
index 00000000000..27ae88d296b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-56.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED substring matching attribute selector on middle</title>
+ <style type="text/css"><![CDATA[div.stub > * { color : red }
+div.stub *:not([title*=" on"]) { color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-paragraph-lime-characters.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div class="stub">
+<p>This paragraph should be in green characters.</p>
+<p title="on chante?">This paragraph should be in green characters.</p>
+<p title="si on chantait">
+ <span title="si il chante">This paragraph should be in green characters.</span>
+</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-57.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-57.xml
new file mode 100644
index 00000000000..4539b0a9ec2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-57.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute existence selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+*|p, *|q, *|r { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+div.stub *:not([a|title]) {background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+ <div class="stub">
+ <q xmlns="http://www.example.org/a" a:title="a paragraph">This a:q element should be unstyled.</q>
+ <p title="a paragraph">This paragraph should have a green background.</p>
+ <r xmlns="http://www.example.org/b" b:title="a paragraph">This b:r element should have a green background.</r>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-57b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-57b.xml
new file mode 100644
index 00000000000..baf4a38b2ec
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-57b.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Attribute existence selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+*|p, *|q, *|r { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+div.stub *:not([a|title]) {background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+ <div class="stub">
+ <q xmlns="http://www.example.org/a" a:title="a paragraph">This a:q element should be unstyled.</q>
+ <p title="a paragraph">This paragraph should have a green background.</p>
+ <r xmlns="http://www.example.org/b" b:title="a paragraph">This b:r element should have a green background.</r>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-59.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-59.xml
new file mode 100644
index 00000000000..543123eba56
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-59.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED class selector</title>
+ <style type="text/css"><![CDATA[div.stub > * { color : red }
+div.stub *:not(.foo) { color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-paragraph-lime-characters.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div class="stub">
+<p>This paragraph should be in green characters.</p>
+<p class="bar foofoo tut">This paragraph should be in green characters.</p>
+<p class="bar foo tut">
+ <span class="tut foo2">This paragraph should be in green characters.</span>
+</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-6.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-6.xml
new file mode 100644
index 00000000000..98c87228926
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-6.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute value selector</title>
+ <style type="text/css"><![CDATA[address { background-color : red }
+address[title="foo"] { background-color : lime }
+span[title="a"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<address title="foo">
+<span title="b">This line should </span>
+ <span title="aa">have a green background.
+</span>
+</address>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-60.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-60.xml
new file mode 100644
index 00000000000..eec66ac79aa
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-60.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED ID selector</title>
+ <style type="text/css"><![CDATA[div.stub > * { color : red }
+div.stub *:not(#foo) { color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/three-paragraph-lime-characters.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div class="stub">
+<p>This paragraph should be in green characters.</p>
+<p id="foo2">This paragraph should be in green characters.</p>
+<p id="foo">
+ <span>This paragraph should be in green characters.</span>
+</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-61.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-61.xml
new file mode 100644
index 00000000000..cb3c2df6fcd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-61.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :link pseudo-class</title>
+ <style type="text/css"><![CDATA[div.stub > * { background-color : red }
+div.stub *:not(:link) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" history" />
+ </head>
+ <body>
+<div class="stub">
+<a href="http://www.w3.org/">This anchor should have a green background</a>
+(Note: You must have visited http://www.w3.org/ for this test to be valid.)
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-62.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-62.xml
new file mode 100644
index 00000000000..ffaea5d44a6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-62.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :visited pseudo-class</title>
+ <style type="text/css"><![CDATA[div.stub > * { background-color : red }
+div.stub *:not(:visited) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" history" />
+ </head>
+ <body>
+<div class="stub">
+<a href="http://unvisited.example.org/css3-modsel-62/">This anchor should have a green background</a>
+(Don&#39;t follow this link.)
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-63.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-63.xml
new file mode 100644
index 00000000000..7c4a34a9b29
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-63.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :hover pseudo-class</title>
+ <style type="text/css"><![CDATA[div.stub * { color: lime; text-decoration: none; }
+div.stub > * > *:not(:hover) { color: black }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+ <div class="stub">
+ <p> <span>The color of this text should be green when the pointing device hovers over it.</span> </p>
+ <p> <a href="http://dummy.example.org/dummy">The color of this text should be green when the pointing device hovers over it.</a> </p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-64.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-64.xml
new file mode 100644
index 00000000000..b1f00e49095
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-64.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :active pseudo-class</title>
+ <style type="text/css"><![CDATA[div.stub * { color : lime }
+div.stub > * > *:not(:active) { color : black }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+ <div class="stub">
+ <p> <a href="http://dummy.example.org/dummy">This text should turn green while it is active.</a> </p>
+ <p> <button>This text should turn green while it is active.</button> </p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-65.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-65.xml
new file mode 100644
index 00000000000..384c6bcd18b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-65.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :focus pseudo-class</title>
+ <style type="text/css"><![CDATA[a:not(:focus) { background-color: transparent; }
+a { background-color: lime; }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+<p>The background color of all <a href="#foo">anchors</a>
+ should become <a href="#foo"> green</a> when they have the
+ <a href="#foo">focus</a>.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-66.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-66.xml
new file mode 100644
index 00000000000..e7b9562ea35
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-66.xml
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :target pseudo-class</title>
+ <style type="text/css"><![CDATA[p { background-color: navy; color: white; }
+p:not(:target) { background-color: white; color: black; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" interact" />
+ </head>
+ <body>
+<p id="first">This paragraph should be unstyled.
+ The background of the following paragraph should become blue when
+ you follow <a href="#second">this link</a>.</p>
+<p id="second">This paragraph should initially be unstyled.
+ It should become blue when you select the link above. When you select
+ <a href="#third">this link</a>, it should return to being unstyled and the
+ background of the paragraph below should become blue.</p>
+<p id="third">This paragraph should initially be unstyled.
+ It should become blue when you select the link above. When you follow
+ <a href="#missing">this link</a>, the three paragraphs
+ should all return to being unstyled.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-66b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-66b.xml
new file mode 100644
index 00000000000..91fc0d324f9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-66b.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :target pseudo-class</title>
+ <style type="text/css"><![CDATA[p { background-color: red; }
+p:not(:target) { background-color: lime; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>This paragraph should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-67.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-67.xml
new file mode 100644
index 00000000000..4fbffc211f1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-67.xml
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :lang() pseudo-class</title>
+ <style type="text/css"><![CDATA[div.stub * { background-color : red }
+div.stub *:not(:lang(fr)) { background-color : green }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div lang="en" class="stub">
+<p>This paragraph should have a green background because the
+ enclosing div is in english.</p>
+<p lang="en">This paragraph should have a green background because
+ it is in english.</p>
+<div lang="fr">
+ <p lang="en">This paragraph should have a green background
+ because it is in english.</p>
+</div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-68.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-68.xml
new file mode 100644
index 00000000000..99c28261381
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-68.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :enabled pseudo-class</title>
+ <style type="text/css"><![CDATA[button { background-color : red }
+input { background-color : red }
+button:not(:enabled) { background-color : lime }
+input:not(:enabled) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>
+ <button disabled="disabled">A button (disabled) with green background</button>
+ <br></br>
+ <input disabled="disabled" type="text" size="36" value="a text area (disabled) with green background"></input>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-69.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-69.xml
new file mode 100644
index 00000000000..3da2a7f43c5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-69.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :disabled pseudo-class</title>
+ <style type="text/css"><![CDATA[button { background-color : red }
+input { background-color : red }
+button:not(:disabled) { background-color : lime }
+input:not(:disabled) { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>
+ <button>A button (enabled) with green background</button>
+ <br></br>
+ <input type="text" size="36" value="a text area (enabled) with green background"></input>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-7.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-7.xml
new file mode 100644
index 00000000000..a464ccdb771
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-7.xml
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute multivalue selector</title>
+ <style type="text/css"><![CDATA[p { background-color : red }
+p[class~="b"] { background-color : lime }
+address { background-color : red }
+address[title~="foo"] { background-color : lime }
+span[class~="b"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="a b c">This paragraph should have green background because CLASS
+ contains &quot;b&quot;</p>
+<address title="tot foo bar">
+<span class="a c">This address should also</span>
+ <span class="a bb c">have green background because the selector in the last
+ rule does not apply to the inner SPANs.</span>
+</address>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-70.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-70.xml
new file mode 100644
index 00000000000..1c18a1e9526
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-70.xml
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :checked pseudo-class</title>
+ <style type="text/css"><![CDATA[input, span { background-color : red }
+input:not(:checked), input:not(:checked) + span { background-color : lime}]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>
+<input type="checkbox"></input> <span>Everything in this paragraph should have a green background</span></p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-72.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-72.xml
new file mode 100644
index 00000000000..72bf8bc1077
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-72.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :root pseudo-class</title>
+ <style type="text/css"><![CDATA[p:not(:root) { background-color: lime; }
+div * { background-color: red; }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <p>This paragraph should have a green background and there should be no red anywhere.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-72b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-72b.xml
new file mode 100644
index 00000000000..ce912f0b701
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-72b.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :root pseudo-class</title>
+ <style type="text/css"><![CDATA[html:not(:root), test:not(:root) { background-color: red; }
+p { background-color: lime; }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <p>This paragraph should have a green background and there should be no red anywhere.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-73.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-73.xml
new file mode 100644
index 00000000000..84954c80f19
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-73.xml
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :nth-child() pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+ul > li:not(:nth-child(odd)) { background-color : lime }
+ol > li:not(:nth-child(even)) { background-color : lime }
+table.t1 tr:not(:nth-child(-n+4)) { background-color : lime }
+table.t2 td:not(:nth-child(3n+1)) { background-color : lime }
+table.t1 td, table.t2 td { border : thin black solid }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li>First list item</li>
+ <li class="red">This second list item should have a green background</li>
+ <li>Third list</li>
+ <li class="red">This fourth list item should have a green background</li>
+ <li>Fifth list item</li>
+ <li class="red">This sixth list item should have a green background</li>
+</ul>
+<ol>
+ <li class="red">This first list item should have a green background</li>
+ <li>Second list item</li>
+ <li class="red">This third list item should have a green background</li>
+ <li>Fourth list item</li>
+ <li class="red">This fifth list item should have a green background</li>
+ <li>Sixth list item</li>
+</ol>
+<div>
+<table border="1" class="t1">
+ <tr>
+<td>1.1</td>
+<td>1.2</td>
+ <td>1.3</td>
+</tr>
+ <tr>
+<td>2.1</td>
+<td>2.2</td>
+ <td>2.3</td>
+</tr>
+ <tr>
+<td>3.1</td>
+<td>3.2</td>
+ <td>3.3</td>
+</tr>
+ <tr>
+<td>4.1</td>
+<td>4.2</td>
+ <td>4.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 5.1</td>
+<td>5.2</td>
+<td>5.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 6.1</td>
+<td>6.2</td>
+<td>6.3</td>
+</tr>
+</table>
+<p></p>
+<table class="t2" border="1">
+ <tr>
+<td>1.1</td>
+<td class="red">green cell</td>
+<td class="red">green cell</td>
+ <td>1.4</td>
+<td class="red">green cell</td>
+<td class="red">green cell</td>
+ <td>1.7</td>
+<td class="red">green cell</td>
+</tr>
+ <tr>
+<td>2.1</td>
+<td class="red">green cell</td>
+<td class="red">green cell</td>
+ <td>2.4</td>
+<td class="red">green cell</td>
+<td class="red">green cell</td>
+ <td>2.7</td>
+<td class="red">green cell</td>
+</tr>
+ <tr>
+<td>3.1</td>
+<td class="red">green cell</td>
+<td class="red">green cell</td>
+ <td>3.4</td>
+<td class="red">green cell</td>
+<td class="red">green cell</td>
+ <td>3.7</td>
+<td class="red">green cell</td>
+</tr>
+</table>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-73b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-73b.xml
new file mode 100644
index 00000000000..d7e476c916c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-73b.xml
@@ -0,0 +1,101 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :nth-child() pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important; }
+ul > li:not(:nth-child(odd)) { background-color : red }
+ol > li:not(:nth-child(even)) { background-color : red }
+table.t1 tr:not(:nth-child(-n+4)) { background-color : red }
+table.t2 td:not(:nth-child(3n+1)) { background-color : red }
+table.t1 td, table.t2 td { border : thin black solid }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li>First list item</li>
+ <li class="green">This second list item should have a green background</li>
+ <li>Third list</li>
+ <li class="green">This fourth list item should have a green background</li>
+ <li>Fifth list item</li>
+ <li class="green">This sixth list item should have a green background</li>
+</ul>
+<ol>
+ <li class="green">This first list item should have a green background</li>
+ <li>Second list item</li>
+ <li class="green">This third list item should have a green background</li>
+ <li>Fourth list item</li>
+ <li class="green">This fifth list item should have a green background</li>
+ <li>Sixth list item</li>
+</ol>
+<div>
+<table border="1" class="t1">
+ <tr>
+<td>1.1</td>
+<td>1.2</td>
+ <td>1.3</td>
+</tr>
+ <tr>
+<td>2.1</td>
+<td>2.2</td>
+ <td>2.3</td>
+</tr>
+ <tr>
+<td>3.1</td>
+<td>3.2</td>
+ <td>3.3</td>
+</tr>
+ <tr>
+<td>4.1</td>
+<td>4.2</td>
+ <td>4.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 5.1</td>
+<td>5.2</td>
+<td>5.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 6.1</td>
+<td>6.2</td>
+<td>6.3</td>
+</tr>
+</table>
+<p></p>
+<table class="t2" border="1">
+ <tr>
+<td>1.1</td>
+<td class="green">green cell</td>
+<td class="green">green cell</td>
+ <td>1.4</td>
+<td class="green">green cell</td>
+<td class="green">green cell</td>
+ <td>1.7</td>
+<td class="green">green cell</td>
+</tr>
+ <tr>
+<td>2.1</td>
+<td class="green">green cell</td>
+<td class="green">green cell</td>
+ <td>2.4</td>
+<td class="green">green cell</td>
+<td class="green">green cell</td>
+ <td>2.7</td>
+<td class="green">green cell</td>
+</tr>
+ <tr>
+<td>3.1</td>
+<td class="green">green cell</td>
+<td class="green">green cell</td>
+ <td>3.4</td>
+<td class="green">green cell</td>
+<td class="green">green cell</td>
+ <td>3.7</td>
+<td class="green">green cell</td>
+</tr>
+</table>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-74.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-74.xml
new file mode 100644
index 00000000000..aff2e9b33c7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-74.xml
@@ -0,0 +1,101 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :nth-last-child() pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+ul > li:not(:nth-last-child(odd)) { background-color : lime }
+ol > li:not(:nth-last-child(even)) { background-color : lime }
+table.t1 tr:not(:nth-last-child(-n+4)) { background-color : lime }
+table.t2 td:not(:nth-last-child(3n+1)) { background-color : lime }
+table.t1 td, table.t2 td { border : thin black solid }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li class="red">This first list item should have a green background</li>
+ <li>Second list item</li>
+ <li class="red">This third list item should have a green background</li>
+ <li>Fourth list item</li>
+ <li class="red">This fifth list item should have a green background</li>
+ <li>Sixth list item</li>
+</ul>
+<ol>
+ <li>First list item</li>
+ <li class="red">This second list item should have a green background</li>
+ <li>Third list item</li>
+ <li class="red">This fourth list item should have a green background</li>
+ <li>Fifth list item</li>
+ <li class="red">This sixth list item should have a green background</li>
+</ol>
+<div>
+<table border="1" class="t1">
+ <tr class="red">
+<td>Green row : 1.1</td>
+<td>1.2</td>
+ <td>1.3</td>
+</tr>
+ <tr class="red">
+<td>Green row : 2.1</td>
+<td>2.2</td>
+ <td>2.3</td>
+</tr>
+ <tr>
+<td>3.1</td>
+<td>3.2</td>
+ <td>3.3</td>
+</tr>
+ <tr>
+<td>4.1</td>
+<td>4.2</td>
+ <td>4.3</td>
+</tr>
+ <tr>
+<td>5.1</td>
+<td>5.2</td>
+ <td>5.3</td>
+</tr>
+ <tr>
+<td>6.1</td>
+<td>6.2</td>
+ <td>6.3</td>
+</tr>
+</table>
+<p></p>
+<table class="t2" border="1">
+ <tr>
+<td class="red">green cell</td>
+<td>1.2</td>
+<td class="red">green cell</td>
+ <td class="red">green cell</td>
+<td>1.5</td>
+<td class="red">green cell</td>
+ <td class="red">green cell</td>
+<td>1.8</td>
+</tr>
+ <tr>
+<td class="red">green cell</td>
+<td>2.2</td>
+<td class="red">green cell</td>
+ <td class="red">green cell</td>
+<td>2.5</td>
+<td class="red">green cell</td>
+ <td class="red">green cell</td>
+<td>2.8</td>
+</tr>
+ <tr>
+<td class="red">green cell</td>
+<td>3.2</td>
+<td class="red">green cell</td>
+ <td class="red">green cell</td>
+<td>3.5</td>
+<td class="red">green cell</td>
+ <td class="red">green cell</td>
+<td>3.8</td>
+</tr>
+</table>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-74b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-74b.xml
new file mode 100644
index 00000000000..82cf0051f96
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-74b.xml
@@ -0,0 +1,102 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :nth-last-child() pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important; }
+ul > li:not(:nth-last-child(odd)) { background-color : red }
+ol > li:not(:nth-last-child(even)) { background-color : red }
+table.t1 tr:not(:nth-last-child(-n+4)) { background-color : red }
+table.t2 td:not(:nth-last-child(3n+1)) { background-color : red }
+table.t1 td, table.t2 td { border : thin black solid }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<ul>
+ <li class="green">This first list item should have a green background</li>
+ <li>Second list item</li>
+ <li class="green">This third list item should have a green background</li>
+ <li>Fourth list item</li>
+ <li class="green">This fifth list item should have a green background</li>
+ <li>Sixth list item</li>
+</ul>
+<ol>
+ <li>First list item</li>
+ <li class="green">This second list item should have a green background</li>
+ <li>Third list item</li>
+ <li class="green">This fourth list item should have a green background</li>
+ <li>Fifth list item</li>
+ <li class="green">This sixth list item should have a green background</li>
+</ol>
+<div>
+<table border="1" class="t1">
+ <tr class="green">
+<td>Green row : 1.1</td>
+<td>1.2</td>
+ <td>1.3</td>
+</tr>
+ <tr class="green">
+<td>Green row : 2.1</td>
+<td>2.2</td>
+ <td>2.3</td>
+</tr>
+ <tr>
+<td>3.1</td>
+<td>3.2</td>
+ <td>3.3</td>
+</tr>
+ <tr>
+<td>4.1</td>
+<td>4.2</td>
+ <td>4.3</td>
+</tr>
+ <tr>
+<td>5.1</td>
+<td>5.2</td>
+ <td>5.3</td>
+</tr>
+ <tr>
+<td>6.1</td>
+<td>6.2</td>
+ <td>6.3</td>
+</tr>
+</table>
+<p></p>
+<table class="t2" border="1">
+ <tr>
+<td class="green">green cell</td>
+<td>1.2</td>
+<td class="green">green cell</td>
+ <td class="green">green cell</td>
+<td>1.5</td>
+<td class="green">green cell</td>
+ <td class="green">green cell</td>
+<td>1.8</td>
+</tr>
+ <tr>
+<td class="green">green cell</td>
+<td>2.2</td>
+<td class="green">green cell</td>
+ <td class="green">green cell</td>
+<td>2.5</td>
+<td class="green">green cell</td>
+ <td class="green">green cell</td>
+<td>2.8</td>
+</tr>
+ <tr>
+<td class="green">green cell</td>
+<td>3.2</td>
+<td class="green">green cell</td>
+ <td class="green">green cell</td>
+<td>3.5</td>
+<td class="green">green cell</td>
+ <td class="green">green cell</td>
+<td>3.8</td>
+</tr>
+</table>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-75.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-75.xml
new file mode 100644
index 00000000000..235183445ac
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-75.xml
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :nth-of-type() pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+p:not(:nth-of-type(3)) { background-color : lime }
+dl > *:not(:nth-of-type(3n+1)) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="red">This paragraph should have green background</p>
+<address>And this address should be unstyled.</address>
+<p class="red">This paragraph should also have green background!</p>
+<p>But this one should be unstyled again.</p>
+<dl>
+ <dt>First definition term</dt>
+ <dd>First definition</dd>
+ <dt class="red">Second definition term that should have green background</dt>
+ <dd class="red">Second definition that should have green background</dd>
+ <dt class="red">Third definition term that should have green background</dt>
+ <dd class="red">Third definition that should have green background</dd>
+ <dt>Fourth definition term</dt>
+ <dd>Fourth definition</dd>
+ <dt class="red">Fifth definition term that should have green background</dt>
+ <dd class="red">Fifth definition that should have green background</dd>
+ <dt class="red">Sixth definition term that should have green background</dt>
+ <dd class="red">Sixth definition that should have green background</dd>
+</dl>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-75b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-75b.xml
new file mode 100644
index 00000000000..6d6345e6543
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-75b.xml
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :nth-of-type() pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important }
+p:not(:nth-of-type(3)) { background-color : red }
+dl > *:not(:nth-of-type(3n+1)) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p class="green">This paragraph should have green background</p>
+<address>And this address should be unstyled.</address>
+<p class="green">This paragraph should also have green background!</p>
+<p>But this one should be unstyled again.</p>
+<dl>
+ <dt>First definition term</dt>
+ <dd>First definition</dd>
+ <dt class="green">Second definition term that should have green background</dt>
+ <dd class="green">Second definition that should have green background</dd>
+ <dt class="green">Third definition term that should have green background</dt>
+ <dd class="green">Third definition that should have green background</dd>
+ <dt>Fourth definition term</dt>
+ <dd>Fourth definition</dd>
+ <dt class="green">Fifth definition term that should have green background</dt>
+ <dd class="green">Fifth definition that should have green background</dd>
+ <dt class="green">Sixth definition term that should have green background</dt>
+ <dd class="green">Sixth definition that should have green background</dd>
+</dl>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-76.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-76.xml
new file mode 100644
index 00000000000..d1181a4aaee
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-76.xml
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :nth-last-of-type() pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+p:not(:nth-last-of-type(3)) { background-color : lime }
+dl > *:not(:nth-last-of-type(3n+1)) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>This paragraph should be unstyled.</p>
+<address>This address should be unstyled.</address>
+<p class="red">This paragraph should have green background.</p>
+<p class="red">This paragraph should have green background.</p>
+<dl>
+ <dt class="red">First definition term that should have green background.</dt>
+ <dd class="red">First definition that should also have a green background.</dd>
+ <dt class="red">Second definition term that should have green background.</dt>
+ <dd class="red">Second definition that should have green background.</dd>
+ <dt>Third definition term.</dt>
+ <dd>Third definition.</dd>
+ <dt class="red">Fourth definition term that should have green background.</dt>
+ <dd class="red">Fourth definition that should have green background.</dd>
+ <dt class="red">Fifth definition term that should have green background.</dt>
+ <dd class="red">Fifth definition that should have green background.</dd>
+ <dt>Sixth definition term.</dt>
+ <dd>Sixth definition.</dd>
+</dl>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-76b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-76b.xml
new file mode 100644
index 00000000000..7ba99cc2ce0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-76b.xml
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :nth-last-of-type() pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important }
+p:not(:nth-last-of-type(3)) { background-color : red }
+dl > *:not(:nth-last-of-type(3n+1)) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p>This paragraph should be unstyled.</p>
+<address>This address should be unstyled.</address>
+<p class="green">This paragraph should have green background.</p>
+<p class="green">This paragraph should have green background.</p>
+<dl>
+ <dt class="green">First definition term that should have green background.</dt>
+ <dd class="green">First definition that should also have a green background.</dd>
+ <dt class="green">Second definition term that should have green background.</dt>
+ <dd class="green">Second definition that should have green background.</dd>
+ <dt>Third definition term.</dt>
+ <dd>Third definition.</dd>
+ <dt class="green">Fourth definition term that should have green background.</dt>
+ <dd class="green">Fourth definition that should have green background.</dd>
+ <dt class="green">Fifth definition term that should have green background.</dt>
+ <dd class="green">Fifth definition that should have green background.</dd>
+ <dt>Sixth definition term.</dt>
+ <dd>Sixth definition.</dd>
+</dl>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-77.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-77.xml
new file mode 100644
index 00000000000..c99fa70543a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-77.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :first-child pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+.t1 td:not(:first-child) { background-color : lime }
+p > *:not(:first-child) { background-color : lime }
+table.t1 td { border : thin black solid }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <table class="t1" border="1">
+ <tr>
+ <td>1.1</td>
+ <td class="red">green cell</td>
+ <td class="red">green cell</td>
+ </tr>
+ <tr>
+ <td>2.1</td>
+ <td class="red">green cell</td>
+ <td class="red">green cell</td>
+ </tr>
+ <tr>
+ <td>3.1</td>
+ <td class="red">green cell</td>
+ <td class="red">green cell</td>
+ </tr>
+ </table>
+ </div>
+ <p>This paragraph <span>should be</span> unstyled.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-77b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-77b.xml
new file mode 100644
index 00000000000..073579042b6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-77b.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :first-child pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important }
+.t1 td:not(:first-child) { background-color : red }
+p > *:not(:first-child) { background-color : red }
+table.t1 td { border : thin black solid }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <table class="t1" border="1">
+ <tr>
+ <td>1.1</td>
+ <td class="green">green cell</td>
+ <td class="green">green cell</td>
+ </tr>
+ <tr>
+ <td>2.1</td>
+ <td class="green">green cell</td>
+ <td class="green">green cell</td>
+ </tr>
+ <tr>
+ <td>3.1</td>
+ <td class="green">green cell</td>
+ <td class="green">green cell</td>
+ </tr>
+ </table>
+ </div>
+ <p>This paragraph <span>should be</span> unstyled.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-78.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-78.xml
new file mode 100644
index 00000000000..8e265200c65
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-78.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :last-child pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+.t1 td:not(:last-child) { background-color : lime }
+p > *:not(:last-child) { background-color : lime }
+table.t1 td { border : thin black solid }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <table class="t1" border="1">
+ <tr>
+ <td class="red">green cell</td>
+ <td class="red">green cell</td>
+ <td>1.3</td>
+ </tr>
+ <tr>
+ <td class="red">green cell</td>
+ <td class="red">green cell</td>
+ <td>2.3</td>
+ </tr>
+ <tr>
+ <td class="red">green cell</td>
+ <td class="red">green cell</td>
+ <td>3.3</td>
+ </tr>
+ </table>
+ </div>
+ <p>This <span>paragraph should</span> be unstyled.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-78b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-78b.xml
new file mode 100644
index 00000000000..2983d0ee2ac
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-78b.xml
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :last-child pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important }
+.t1 td:not(:last-child) { background-color : red }
+p > *:not(:last-child) { background-color : red }
+table.t1 td { border : thin black solid }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <div>
+ <table class="t1" border="1">
+ <tr>
+ <td class="green">green cell</td>
+ <td class="green">green cell</td>
+ <td>1.3</td>
+ </tr>
+ <tr>
+ <td class="green">green cell</td>
+ <td class="green">green cell</td>
+ <td>2.3</td>
+ </tr>
+ <tr>
+ <td class="green">green cell</td>
+ <td class="green">green cell</td>
+ <td>3.3</td>
+ </tr>
+ </table>
+ </div>
+ <p>This <span>paragraph should</span> be unstyled.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-79.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-79.xml
new file mode 100644
index 00000000000..4edac8d622b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-79.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :first-of-type pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+address { margin-bottom : 1em ; margin-left : 1em }
+address:not(:first-of-type) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div>This div contains 3 addresses :
+<address>A first address with normal background</address>
+<address class="red">A second address that should have a green background</address>
+<address class="red">A third address that should have a green background</address>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-7b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-7b.xml
new file mode 100644
index 00000000000..e1ad8d766d5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-7b.xml
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute multivalue selector</title>
+ <style type="text/css"><![CDATA[
+p { background: lime; }
+[title~="hello world"] { background: red; }
+/* Section 6.3.1: Represents the att attribute whose value is a
+space-separated list of words, one of which is exactly "val". If this
+selector is used, the words in the value must not contain spaces
+(since they are separated by spaces). */
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/this-line-lime-background.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p title="hello world">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-8.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-8.xml
new file mode 100644
index 00000000000..ce5a68ffec6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-8.xml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute value selectors (hyphen-separated attributes)</title>
+ <style type="text/css"><![CDATA[p { background-color : red }
+p[lang|="en"] { background-color : lime }
+address { background-color : red }
+address[lang="fi"] { background-color : lime }
+span[lang|="fr"] { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p lang="en-gb">This paragraph should have green background because its language is &quot;en-gb&quot;</p>
+<address lang="fi">
+<span lang="en-us">This address should also</span>
+ <span lang="en-fr">have green background because the language of the inner SPANs
+ is not French.</span>
+</address>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-80.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-80.xml
new file mode 100644
index 00000000000..b7c08e54cf1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-80.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :last-of-type pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+address { margin-bottom : 1em ; margin-left : 1em }
+address:not(:last-of-type) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div>
+<address class="red">A first address that should have a green background</address>
+<address class="red">A second address that should have a green background</address>
+<address>A third address with normal background</address>
+This div should have three addresses above it.</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-81.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-81.xml
new file mode 100644
index 00000000000..d27e3161095
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-81.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :only-child pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+p:not(:only-child) { background-color : lime }
+div.testText > div > p { margin-left : 1em }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="red">This paragraph should have a green background.</p>
+ <div>This div contains only one paragraph.
+ <p>This paragraph should be unstyled.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-81b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-81b.xml
new file mode 100644
index 00000000000..305cf9b63f7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-81b.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :only-child pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important }
+p:not(:only-child) { background-color : lime }
+div.testText > div > p { margin-left : 1em }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+ <p class="green">This paragraph should have a green background.</p>
+ <div>This div contains only one paragraph.
+ <p>This paragraph should be unstyled.</p>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-82.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-82.xml
new file mode 100644
index 00000000000..5b2202696a3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-82.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :only-of-type pseudo-class</title>
+ <style type="text/css"><![CDATA[.red { background-color : red }
+.t1 *:not(:only-of-type) { background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div class="t1">
+<p class="red">This paragraph should have green background.</p>
+<address>But this address should be unstyled.</address>
+<p class="red">This paragraph should have green background.</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-82b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-82b.xml
new file mode 100644
index 00000000000..1aafc549ea7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-82b.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED :only-of-type pseudo-class</title>
+ <style type="text/css"><![CDATA[.green { background-color : lime ! important }
+.t1 *:not(:only-of-type) { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<div class="t1">
+<p class="green">This paragraph should have green background.</p>
+<address>But this address should be unstyled.</address>
+<p class="green">This paragraph should have green background.</p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-83-ref.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-83-ref.xml
new file mode 100644
index 00000000000..6ab85b3239e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-83-ref.xml
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>This paragraph green background red</title>
+ <style type="text/css"><![CDATA[p { background-color : green }]]></style>
+ </head>
+ <body>
+ <p>This paragraph should have a green background</p>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-83.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-83.xml
new file mode 100644
index 00000000000..b5f10122624
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-83.xml
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Negation pseudo-class can be an argument of itself</title>
+ <style type="text/css"><![CDATA[p { background-color : red }
+p:not(:not(p)) { background-color : green }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://drafts.csswg.org/selectors-4/#negation-pseudo"/>
+ <link rel="match" href="css3-modsel-83-ref.xml"/>
+ </head>
+ <body>
+<p>This paragraph should have a green background</p>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-86.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-86.xml
new file mode 100644
index 00000000000..5d2355f7f70
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-86.xml
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Nondeterministic matching of descendant and child combinators</title>
+ <style type="text/css"><![CDATA[p { color: red; }
+blockquote > div p { color: green; }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<blockquote>
+<div>
+<div>
+<p>This text should be green.</p>
+</div>
+</div>
+</blockquote>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-87.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-87.xml
new file mode 100644
index 00000000000..da5adca13ad
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-87.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Nondeterministic matching of direct and indirect adjacent combinators</title>
+ <style type="text/css"><![CDATA[p { color: red; }
+blockquote + div ~ p { color: green; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/bq-u-u-u-green.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<blockquote><div>This text should be unstyled.</div></blockquote>
+<div>This text should be unstyled.</div>
+<div>This text should be unstyled.</div>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-87b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-87b.xml
new file mode 100644
index 00000000000..efdcb019b00
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-87b.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Nondeterministic matching of direct and indirect adjacent combinators</title>
+ <style type="text/css"><![CDATA[p { color: green ! important; }
+blockquote + div ~ p { color: red; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/bq-u-u-u-green.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<blockquote><div>This text should be unstyled.</div></blockquote>
+<div>This text should be unstyled.</div>
+<div>This text should be unstyled.</div>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-88.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-88.xml
new file mode 100644
index 00000000000..f354cf21a3d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-88.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Nondeterministic matching of descendant and direct adjacent combinators</title>
+ <style type="text/css"><![CDATA[p { color: red; }
+blockquote + div p { color: green; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<blockquote><div>This text should be unstyled.</div></blockquote>
+<div>
+<div>
+<p>This text should be green.</p>
+</div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-88b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-88b.xml
new file mode 100644
index 00000000000..2c10a61fd48
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-88b.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Nondeterministic matching of descendant and direct adjacent combinators</title>
+ <style type="text/css"><![CDATA[p { color: green ! important; }
+blockquote + div p { color: red; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<blockquote><div>This text should be unstyled.</div></blockquote>
+<div>
+<div>
+<p>This text should be green.</p>
+</div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-89.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-89.xml
new file mode 100644
index 00000000000..22ac828a827
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-89.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Simple combination of descendant and child combinators</title>
+ <style type="text/css"><![CDATA[p { color: red; }
+blockquote div > p { color: green; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<blockquote>
+<div>
+<div>
+<p>This text should be green.</p>
+</div>
+</div>
+</blockquote>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-9.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-9.xml
new file mode 100644
index 00000000000..e7eeba381c8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-9.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Substring matching attribute selector (beginning)</title>
+ <style type="text/css"><![CDATA[p { background-color : red }
+p[title^="foo"] { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<p title="foobar">This paragraph should have a green background<br></br>
+because its title attribute begins with &quot;foo&quot;</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-90.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-90.xml
new file mode 100644
index 00000000000..03973b90c43
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-90.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Simple combination of direct and indirect adjacent combinators</title>
+ <style type="text/css"><![CDATA[p { color: red; }
+blockquote ~ div + p { color: green; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/bq-u-u-u-green.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<blockquote><div>This text should be unstyled.</div></blockquote>
+<div>This text should be unstyled.</div>
+<div>This text should be unstyled.</div>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-90b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-90b.xml
new file mode 100644
index 00000000000..15e06bcfa40
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-90b.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Simple combination of direct and indirect adjacent combinators</title>
+ <style type="text/css"><![CDATA[p { color: green ! important; }
+blockquote ~ div + p { color: red; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/bq-u-u-u-green.xht"/>
+ <meta name="flags" content="" />
+ </head>
+ <body>
+<blockquote><div>This text should be unstyled.</div></blockquote>
+<div>This text should be unstyled.</div>
+<div>This text should be unstyled.</div>
+<p>This text should be green.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-91.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-91.xml
new file mode 100644
index 00000000000..2fc2ed6d730
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-91.xml
@@ -0,0 +1,14 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Type element selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace test url(http://www.example.org/a);
+testa { background-color : red }
+test|testa { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<testa xmlns="http://www.example.org/a">This paragraph should have a green background</testa>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-92.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-92.xml
new file mode 100644
index 00000000000..16883a4a423
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-92.xml
@@ -0,0 +1,16 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Type element selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace test url(http://www.example.org/b);
+div.myTest * { background-color : red }
+div.myTest *|testA { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="myTest">
+<testA xmlns="http://www.example.org/b">This paragraph should have a green background</testA>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-93.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-93.xml
new file mode 100644
index 00000000000..47f802396c3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-93.xml
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Type element selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace test url(http://www.example.org/b);
+*|testA { background-color : red }
+|testA {background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<testA xmlns="">This paragraph has no declared namespace and should have a green background.</testA>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-94.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-94.xml
new file mode 100644
index 00000000000..4bebf5303c5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-94.xml
@@ -0,0 +1,20 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Universal selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+p, q { display : block ; margin-bottom : 1em }
+b|* { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<p>This line should be unstyled.</p>
+<p xmlns="http://www.example.org/b">This line should have a green background.</p>
+<q xmlns="http://www.example.org/b">This line should have a green background.</q>
+<p xmlns="http://www.example.org/a">This line should be unstyleed.</p>
+<p xmlns="http://www.example.org/b">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-94b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-94b.xml
new file mode 100644
index 00000000000..d2ab44d297a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-94b.xml
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Universal selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+p, q { display : block ; margin-bottom : 1em }
+b|* { background-color : red }
+[test] { background-color: lime; }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<p>This line should be unstyled.</p>
+<p xmlns="http://www.example.org/b" test="test">This line should have a green background.</p>
+<q xmlns="http://www.example.org/b" test="test">This line should have a green background.</q>
+<p xmlns="http://www.example.org/a">This line should be unstyled.</p>
+<p xmlns="http://www.example.org/b" test="test">This line should have a green background.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-95.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-95.xml
new file mode 100644
index 00000000000..9ba5dd0e8f0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-95.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Universal selector with universal namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.test * { background-color : red ; display : block ; margin-bottom : 1em }
+div.test *|* { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+ <div class="test">
+ <p>This line should have a green background</p>
+ <p xmlns="http://www.example.org/b">This line should have a green background</p>
+ <q xmlns="http://www.example.org/b">This line should have a green background</q>
+ <p xmlns="http://www.example.org/a">This line should have a green background</p>
+ <foo xmlns="http://www.example.org/b">This line should have a green background</foo>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-96.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-96.xml
new file mode 100644
index 00000000000..8d62a81ea8c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-96.xml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Universal selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.green * { background-color : red }
+div.test * { display : block ; margin-bottom : 1em }
+div.test |* { background-color : lime }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="test">
+ <p>This line should be unstyled.</p>
+ <elementA xmlns="http://www.example.org/a">This line should be unstyled.</elementA>
+ <elementB xmlns="http://www.example.org/b">This line should be unstyled.</elementB>
+ <div class="green">
+ <p xmlns="">This line should have a green background</p>
+ <elementA xmlns="">This line should have a green background</elementA>
+ <elementB xmlns="">This line should have a green background</elementB>
+ </div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-96b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-96b.xml
new file mode 100644
index 00000000000..5c85d67f15b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-96b.xml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Universal selector without declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+div.green * { background-color : lime ! important }
+div.test * { display : block ; margin-bottom : 1em }
+div.test |* { background-color : red }]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body>
+<div class="test">
+ <p>This line should be unstyled.</p>
+ <elementA xmlns="http://www.example.org/a">This line should be unstyled.</elementA>
+ <elementB xmlns="http://www.example.org/b">This line should be unstyled.</elementB>
+ <div class="green">
+ <p xmlns="">This line should have a green background</p>
+ <elementA xmlns="">This line should have a green background</elementA>
+ <elementB xmlns="">This line should have a green background</elementB>
+ </div>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-97.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-97.xml
new file mode 100644
index 00000000000..a254bafb555
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-97.xml
@@ -0,0 +1,20 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute existence selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+*|p, *|q, *|r { display : block ; margin-bottom : 1em }
+*|q { background-color : red }
+*[a|title] {background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+ <p title="a paragraph">This paragraph should be unstyled.</p>
+ <q xmlns="http://www.example.org/a" a:title="a paragraph">This paragraph should have a green background.</q>
+ <r xmlns="http://www.example.org/b" b:title="a paragraph">This paragraph should be unstyled.</r>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-97b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-97b.xml
new file mode 100644
index 00000000000..71e3467f27c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-97b.xml
@@ -0,0 +1,20 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute existence selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+*|p, *|q, *|r { display : block ; margin-bottom : 1em }
+*|q { background-color : lime ! important }
+*[a|title] {background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+ <p title="a paragraph">This paragraph should be unstyled.</p>
+ <q xmlns="http://www.example.org/a" a:title="a paragraph">This paragraph should have a green background.</q>
+ <r xmlns="http://www.example.org/b" b:title="a paragraph">This paragraph should be unstyled.</r>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-98.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-98.xml
new file mode 100644
index 00000000000..9d68a22d6b5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-98.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q, *|t { background-color : red }
+*[a|title="foo"] {background-color : lime }
+*[a|title=footwo] {background-color : lime }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+ <p title="foo">This paragraph should be unstyled.</p>
+ <q xmlns="http://www.example.org/a" a:title="foo">This paragraph should have a green background</q>
+ <s xmlns="http://www.example.org/a" a:title="foobar">This paragraph should be unstyled.</s>
+ <r xmlns="http://www.example.org/b" b:title="foo">This paragraph should be unstyled.</r>
+ <t xmlns="http://www.example.org/a" a:title="footwo">This paragraph should have a green background</t>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-98b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-98b.xml
new file mode 100644
index 00000000000..bf416abf82a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-98b.xml
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|q { background-color : lime ! important }
+*[a|title="foo"] {background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+ <p title="foo">This paragraph should be unstyled.</p>
+ <q xmlns="http://www.example.org/a" a:title="foo">This paragraph should have a green background</q>
+ <s xmlns="http://www.example.org/a" a:title="foobar">This paragraph should be unstyled.</s>
+ <r xmlns="http://www.example.org/b" b:title="foo">This paragraph should be unstyled.</r>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-99.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-99.xml
new file mode 100644
index 00000000000..2d385fe6f47
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-99.xml
@@ -0,0 +1,24 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute space-separated value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : red }
+*|*[a|foo~="bar"], *|*[|class~="bar"] { background-color : lime }
+*|*[html|class~="bar"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+ <p class="t bar u">This paragraph should have a green background.</p>
+ <q xmlns="http://www.example.org/a" a:foo="hgt bardot f">This paragraph should be unstyled.</q>
+ <r xmlns="http://www.example.org/a" a:foo="hgt bar f">This paragraph should have a green background.</r>
+ <s xmlns="http://www.example.org/b" b:foo="hgt bar f">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-99b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-99b.xml
new file mode 100644
index 00000000000..f8aff417ef0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-99b.xml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Attribute space-separated value selector with declared namespace</title>
+ <style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
+@namespace b url(http://www.example.org/b);
+@namespace html url(http://www.w3.org/1999/xhtml);
+*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
+*|p, *|r { background-color : lime ! important }
+*|*[a|foo~="bar"], *|*[html|class~="bar"] { background-color : red }
+]]></style>
+ <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <link rel="match" href="reference/lime-bg-paras-g-u-g-u.xht"/>
+ <meta name="flags" content=" namespace" />
+ </head>
+ <body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
+ <p class="t bar u">This paragraph should have a green background.</p>
+ <q xmlns="http://www.example.org/a" a:foo="hgt bardot f">This paragraph should be unstyled.</q>
+ <r xmlns="http://www.example.org/a" a:foo="hgt bar f">This paragraph should have a green background.</r>
+ <s xmlns="http://www.example.org/b" b:foo="hgt bar f">This paragraph should be unstyled.</s>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d1.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d1.xml
new file mode 100644
index 00000000000..144cf0e0fd8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d1.xml
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>NEGATED Dynamic handling of :empty</title>
+ <style type="text/css"><![CDATA[
+ #test { background: red; display: block; padding: 1em; }
+ #test:not(:empty) { background: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" dom" />
+ </head>
+ <body>
+
+ <div>
+
+ <script type="text/javascript">
+ <![CDATA[
+
+ function test() {
+ document.getElementById('test').appendChild(document.createTextNode('This line should be green.'));
+ }
+
+ window.setTimeout("test()", 100);
+ ]]>
+ </script>
+
+ <p> The following bar should be green. </p>
+
+ <div id="test"></div>
+
+ </div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d1b.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d1b.xml
new file mode 100644
index 00000000000..f4583f843ca
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d1b.xml
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Dynamic handling of :empty</title>
+ <style type="text/css"><![CDATA[
+ #test1 { background: red; display: block; padding: 1em; margin: 1em; }
+ #test1:empty { background: lime; }
+ #test2 { background: lime; display: block; padding: 1em; margin: 1em; }
+ #test2:empty { background: red; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" dom" />
+ </head>
+ <body>
+
+ <div>
+
+ <script type="text/javascript">
+ <![CDATA[
+
+ function test() {
+ document.getElementById('test1').appendChild(document.createTextNode(''));
+ document.getElementById('test2').appendChild(document.createTextNode(' '));
+ }
+
+ window.setTimeout("test()", 100);
+ ]]>
+ </script>
+
+ <p> The following two bars should be green. </p>
+
+ <div id="test1"></div>
+ <div id="test2"></div>
+
+ </div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d2.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d2.xml
new file mode 100644
index 00000000000..aa24e959991
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d2.xml
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Dynamic handling of combinators</title>
+ <style type="text/css"><![CDATA[
+ #test { background: red; display: block; padding: 1em; }
+ #stub ~ div div + div > div { background: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" dom" />
+ </head>
+ <body>
+
+ <div>
+
+
+ <script type="text/javascript">
+ <![CDATA[
+
+ function test() {
+ el = document.getElementById('test');
+ el.parentNode.parentNode.insertBefore(document.createElementNS('http://www.w3.org/1999/xhtml', 'div'), el.parentNode);
+ }
+
+ window.setTimeout("test()", 100);
+ ]]>
+ </script>
+
+
+
+
+ <p> The following bar should be green. </p>
+
+ <div id="stub"></div>
+ <div></div>
+ <div><div><!-- <div/> --><div><div id="test"></div></div></div></div>
+
+ </div>
+
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d3.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d3.xml
new file mode 100644
index 00000000000..e8b15e96143
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d3.xml
@@ -0,0 +1,44 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Dynamic handling of attribute selectors</title>
+ <style type="text/css"><![CDATA[
+ [test] { background: red; display: block; padding: 1em; }
+ stub ~ [|attribute^=start]:not([|attribute~=mid])[|attribute*=dle][|attribute$=end] ~ t { background: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" dom namespace" />
+ </head>
+ <body>
+
+ <div>
+
+ <script type="text/javascript">
+ <![CDATA[
+
+ function test() {
+ document.getElementsByTagNameNS('', 't')[1].setAttributeNS('', 'attribute', 'start middle end');
+ }
+
+ window.setTimeout("test()", 100);
+ ]]>
+ </script>
+
+ <p> The following block should be green. </p>
+
+ <!-- root of selector -->
+ <stub xmlns=""></stub>
+
+ <!-- middle part of selector does not match this -->
+ <t xmlns="" attribute="fake"></t>
+
+ <!-- middle part of selector matches this once attribute is fixed -->
+ <t xmlns="" attribute="start mid dle end"></t>
+
+ <!-- subject of selector -->
+ <t xmlns="" test="test"></t>
+
+ </div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d4.xml b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d4.xml
new file mode 100644
index 00000000000..73fe3a73849
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/css3-modsel-d4.xml
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Dynamic updating of :first-child and :last-child</title>
+ <style type="text/css"><![CDATA[
+ #two:first-child { background: red; }
+ #three:last-child { background: lime; }
+]]></style>
+ <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+ <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
+ <meta name="flags" content=" dom" />
+ </head>
+ <body>
+
+ <div>
+
+ <script type="text/javascript">
+ <![CDATA[
+
+ function test() {
+ el2 = document.getElementById('two');
+ el3 = document.getElementById('three');
+ el2.parentNode.insertBefore(el3.nextSibling, el2);
+ }
+
+ window.setTimeout("test()", 100);
+ ]]>
+ </script>
+
+ <div><p id="two">This line should be unstyled. (2)</p><p id="three">This line should have a green background. (3)</p><p>This line should be unstyled. (4 moving to 1)</p></div>
+
+ </div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/bq-u-u-u-green.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/bq-u-u-u-green.xht
new file mode 100644
index 00000000000..17c893cd49f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/bq-u-u-u-green.xht
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Blockquote then green eventually</title>
+ <style type="text/css">
+ p { color: green; }
+ </style>
+ </head>
+ <body>
+ <blockquote><div>This text should be unstyled.</div></blockquote>
+ <div>This text should be unstyled.</div>
+ <div>This text should be unstyled.</div>
+ <p>This text should be green.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht
new file mode 100644
index 00000000000..aedd173524c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-g-u.xht
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Five paragraphs lime background g u g g u</title>
+ <style type="text/css">
+ .lime { background-color: lime }
+ </style>
+ </head>
+ <body>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht
new file mode 100644
index 00000000000..2782cfc8603
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u-u.xht
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Five paragraphs lime background g u g u u</title>
+ <style type="text/css">
+ .lime { background-color: lime }
+ </style>
+ </head>
+ <body>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p>This paragraph should be unstyled.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht
new file mode 100644
index 00000000000..ee174e00e64
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-g-u.xht
@@ -0,0 +1,14 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Four paragraphs lime background g u g u</title>
+ <style type="text/css">
+ .lime { background-color: lime }
+ </style>
+ </head>
+ <body>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht
new file mode 100644
index 00000000000..8d236dfc600
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-g-u-u-g-g.xht
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Five paragraphs lime background g u u g g</title>
+ <style type="text/css">
+ .lime { background-color: lime }
+ </style>
+ </head>
+ <body>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht
new file mode 100644
index 00000000000..1768b0ed27a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-u-g-g-u-u-g.xht
@@ -0,0 +1,16 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Six paragraphs lime background u g g u u g</title>
+ <style type="text/css">
+ .lime { background-color: lime }
+ </style>
+ </head>
+ <body>
+ <p>This paragraph should be unstyled.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht
new file mode 100644
index 00000000000..d565fc0e229
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/lime-bg-paras-u-g-u-g-g.xht
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Five paragraphs lime background u g u g g</title>
+ <style type="text/css">
+ .lime { background-color: lime }
+ </style>
+ </head>
+ <body>
+ <p>This paragraph should be unstyled.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/seven-green-divs.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/seven-green-divs.xht
new file mode 100644
index 00000000000..8daf6487500
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/seven-green-divs.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Seven green divs</title>
+ <style type="text/css">
+ div { color: green; }
+ </style>
+ </head>
+ <body>
+ <div>This should be green.</div>
+ <div>This should be green.</div>
+ <div>This should be green.</div>
+ <div>This should be green.</div>
+ <div>This should be green.</div>
+ <div>This should be green.</div>
+ <div>This should be green.</div>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-address-p-p-p-lime-background.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-address-p-p-p-lime-background.xht
new file mode 100644
index 00000000000..17f9b8c83d2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-address-p-p-p-lime-background.xht
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>"this line should have a green background" lime margin offset</title>
+ <style type="text/css">
+ div, address {
+ background-color: lime ;
+ display : block ;
+ margin-bottom : 1em }
+ </style>
+ </head>
+ <body>
+ <address>This address should have a green background</address>
+ <div>This paragraph should have a green background</div>
+ <div>This paragraph should have a green background</div>
+ <div>This paragraph should have a green background</div>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-green-background.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-green-background.xht
new file mode 100644
index 00000000000..35c264e1497
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-green-background.xht
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>"This line should be green." green</title>
+ <style type="text/css">
+ p { background: green; color: white; }
+ </style>
+ </head>
+ <body>
+ <p>This line should be green.</p>
+ <p>This line should be green.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-green-color.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-green-color.xht
new file mode 100644
index 00000000000..4ae49b1dca7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-green-color.xht
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>"This line" green color</title>
+ <style type="text/css"><![CDATA[
+ p { color: green }
+]]></style>
+ </head>
+ <body>
+ <p>This line should be green.</p>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-lime-background-offset.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-lime-background-offset.xht
new file mode 100644
index 00000000000..9fd7a450dfa
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-lime-background-offset.xht
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>"this line should have a green background" lime margin offset</title>
+ <style type="text/css">
+ .a { background: lime; margin: 0; height: 1em; }
+ .b { margin: -1em 0 0 0; }
+ </style>
+ </head>
+ <body>
+ <div class="a"></div>
+ <div class="b">This line should have a green background.</div>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-lime-background.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-lime-background.xht
new file mode 100644
index 00000000000..72fd9d88277
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-line-lime-background.xht
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>"this line should have a green background" lime</title>
+ <style type="text/css"><![CDATA[
+ p { background: lime; }
+]]></style>
+ </head>
+ <body>
+ <p>This line should have a green background.</p>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-test-has-passed-desc.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-test-has-passed-desc.xht
new file mode 100644
index 00000000000..1688ca62379
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/this-test-has-passed-desc.xht
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>This test has PASSED</title>
+ <style type="text/css">
+ span { background-color: lime; }
+ </style>
+ </head>
+ <body>
+ <p>This test has <span>PASSED</span>.</p>
+ <p>(If the previous line just reads &quot;This test has .&quot; then this test has failed.)</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht
new file mode 100644
index 00000000000..278fa2b7490
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/three-p-lime-background-except-middle.xht
@@ -0,0 +1,14 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Three paragraphs lime background middle unstyled</title>
+ <style type="text/css">
+ p { margin: 0 0 1em 0; }
+ .lime { background-color: lime }
+ </style>
+ </head>
+ <body>
+ <p class="lime">This paragraph should have a green background.</p>
+ <p>This paragraph should be unstyled.</p>
+ <p class="lime">This paragraph should have a green background.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/three-paragraph-lime-characters.xht b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/three-paragraph-lime-characters.xht
new file mode 100644
index 00000000000..46bfede1a5b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/old-tests/reference/three-paragraph-lime-characters.xht
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Three paragraphs, green</title>
+ <style type="text/css">
+ p { color: lime }
+ </style>
+ </head>
+ <body>
+ <p>This paragraph should be in green characters.</p>
+ <p>This paragraph should be in green characters.</p>
+ <p>This paragraph should be in green characters.</p>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/selectors/tng.css b/tests/wpt/web-platform-tests/css/selectors/tng.css
deleted file mode 100644
index 3f44bc73426..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/tng.css
+++ /dev/null
@@ -1,6 +0,0 @@
-BODY {color: black; background: #CCCCCC; margin:0;}
-A:link {color: blue;}
-A:visited {color: #006600;}
-.navigation { padding: 15px 10px;}
-OBJECT { border:none; width:100%;}
-
diff --git a/tests/wpt/web-platform-tests/css/selectors/utils/generators.pm b/tests/wpt/web-platform-tests/css/selectors/utils/generators.pm
deleted file mode 100644
index 987fcddd101..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/utils/generators.pm
+++ /dev/null
@@ -1,1319 +0,0 @@
-package utils::generators;
-use strict;
-use utils::helpers;
-1;
-
-sub extensions {
- my($type) = @_;
- return 'html' if $type eq 'tng';
- return $type =~ m/^(?:|.*[^x])html/o ? 'html' : 'xml';
-}
-
-##############################################################################
-# Index Generators #
-##############################################################################
-
-sub generateTopIndex { # points to test type indexes
- my($testDatabase) = @_;
- open(FILE, '>dist/index.html') or die "failed to open output file: $!";
- local $" = ', ';
- # XXX Hardcoded to say Selectors
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>CSS3 Selectors Test Suite Index</title>
- </head>
- <body>
- <h1><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/WWW/w3c_home" alt="W3C" width="72" height="48"></a> CSS3 Selectors Test Suite Index</h1>
- <p>The tests are available in several variants.</p>
- <ul>';
- foreach my $type (split ' ', $utils::helpers::types{'DESTINATION_TYPES'}) {
- print FILE "\n <li><a href=\"".&utils::helpers::escape("$type/index.html").'">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$type}).'</a></li>';
- }
- # XXX Most of the following should be stored in a config file or something
- print FILE '
- </ul>
- <p>A list of recent changes may be found in the <a
- href="CHANGES">CHANGES</a> file.</p>
- <h2>The Role Of This Test Suite</h2>
-
- <p>The role of this test is primarily to help implementors develop
- more comprehensive tests and to help authors gauge the level of
- support for the basics of the Selectors specification.</p>
-
- <p>It is also a key part of the Selectors specification exit
- criteria. For this specification to exit the CR stage, the following
- conditions shall be met:</p>
- <ol>
- <li><p> There must be at least two interoperable implementations for
- every feature in the Selectors Module.</p>
- <p>For the purposes of this criterion, we define the following terms:</p>
- <dl><dt>feature</dt><dd><p>a section or subsection in the Selectors Module.</p></dd>
- <dt>interoperable</dt><dd><p>passing the respective test case(s) in the
- Selectors Module test suite, or, if the implementation is not a
- web browser, an equivalent test. Every relevant test in the test
- suite should have an equivalent test created if such a UA is to
- be used to claim interoperability. In addition if such a UA is
- to be used to claim interoperability, then there must one or
- more additional UAs which can also pass those equivalent tests
- in the same way for the purpose of interoperability. The
- equivalent tests must be made publically available for the
- purposes of peer review.</p></dd>
- <dt>implementation</dt><dd><p>a user agent which:</p>
- <ol>
- <li>implements the feature.</li>
- <li>is available (i.e. publicly downloadable or available
- through some other public point of sale mechanism). This is
- the "show me" requirement.</li>
- <li>is shipping (i.e. development, private or unofficial
- versions are insufficient).</li>
- <li>is not experimental (i.e. is intended for a wide audience
- and could be used on a daily basis.)</li></ol></dd></dl>
- <li><p>A minimum of six months of the CR period must have elapsed.
- This is to ensure that enough time is given for any remaining
- major errors to be caught.</p>
- </li></ol>
-
- <h2>Contributors</h2>
- <p>The authors of the test suite are ';
- my %authors;
- foreach my $test (values(%$testDatabase)) {
- foreach my $author (@{$test->{'author'}}) {
- $authors{$author}++;
- }
- }
- my @authors = sort(keys(%authors));
- foreach my $index (0..$#authors) {
- if ($index > 0) {
- if ($index eq $#authors) {
- print FILE ' and ';
- } else {
- print FILE ', ';
- }
- }
- print FILE $authors[$index];
- }
- print FILE '.</p>
- <p class=copyright><a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Copyright">Copyright</a> &copy;2001 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>&reg;</sup> (<a href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.inria.fr/"><abbr lang=fr title="Institut National de Recherche en Informatique et Automatique">INRIA</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#W3C_Trademarks">trademark</a>, <a href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">document use</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">software licensing</a> rules apply.</p>
- </body>
-</html>';
- close(FILE);
-}
-
-sub generateSubIndex { # points to mini test index and all indexes for this test type
- my($destinationType, $testList, $testDatabase) = @_;
- open(FILE, ">dist/$destinationType/index.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Test Index</title>
- <link rel="top" href="../index.html">
- </head>
- <body>
- <h1>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Test Index</h1>
- <p>The '.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' tests are available in several variants.</p>
- <h2>Tests With Navigation Aids</h2>
- <p>Each category of test is available using several different harnesses. The name of the harness describes how the test markup is contained within it, for example the Xlink embed case uses an XLink with the show axis set to embed.</p>
- <ul>';
- foreach my $category (split ' ', $utils::helpers::types{'TEST_TYPES'}) {
- print FILE "\n <li><a href=\"".&utils::helpers::escape($category).'/index.html" title="'.&utils::helpers::escape($utils::helpers::TestTypeDescriptions{$category}).'">'.&utils::helpers::escape($utils::helpers::TestTypeShortTitles{$category}).'</a>: ';
- print FILE '<a href="'.&utils::helpers::escape("$category/flat/index.html").'">Self Contained</a>';
- foreach my $type (split ' ', $utils::helpers::types{'SHELL_TYPES'}) {
- print FILE ', <a href="'.&utils::helpers::escape("$category/$type/index.html").'" title="'.&utils::helpers::escape($utils::helpers::ShellTypeDescriptions{$type}).'">'.&utils::helpers::escape($utils::helpers::ShellTypeTitles{$type}).'</a>';
- }
- print FILE '</li>';
- }
- print FILE '
- </ul>
- <h2>Unadorned Tests</h2>
- <ul>';
- foreach my $test (@$testList) {
- print FILE "\n <li><a href=\"".&utils::helpers::escape("tests/$test.".&extensions($destinationType)).'">'.&utils::helpers::escape($testDatabase->{$test}->{'def'})."</a> (#".&utils::helpers::escape($testDatabase->{$test}->{'number'}).")</li>";
- }
- print FILE '
- </ul>
- <p>See also: <a href="../index.html">Index</a>';
- foreach my $type (split ' ', $utils::helpers::types{'DESTINATION_TYPES'}) {
- if ($type ne $destinationType) {
- print FILE ', <a href="'.&utils::helpers::escape("../$type/index.html").'">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$type}).'</a>';
- }
- }
- print FILE '</p>
- </body>
-</html>';
- close(FILE);
-}
-
-sub generateMiniTestIndex { # points to all mini tests
- my($destinationType, $testList, $testDatabase) = @_;
- open(FILE, ">dist/$destinationType/tests/index.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Unadorned Test Index</title>
- <link rel="up" href="../index.html">
- <link rel="top" href="../../index.html">
- </head>
- <body>
- <h1>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Unadorned Test Index</h1>
- <ul>';
- foreach my $test (@$testList) {
- print FILE "\n <li><a href=\"".&utils::helpers::escape("$test.".&extensions($destinationType)).'">'.&utils::helpers::escape($testDatabase->{$test}->{'def'})."</a> (#".&utils::helpers::escape($testDatabase->{$test}->{'number'}).")</li>";
- }
- print FILE '
- </ul>
- <p>See also: <a href="../../index.html">Index</a>, <a href="../index.html">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Index</a>';
- foreach my $type (split ' ', $utils::helpers::types{'DESTINATION_TYPES'}) {
- if ($type ne $destinationType) {
- print FILE ', <a href="'.&utils::helpers::escape("../../$type/index.html").'">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$type}).'</a>';
- }
- }
- print FILE '</p>
- </body>
-</html>';
- close(FILE);
-}
-
-sub generateTestTypeIndex { # points to flat test index and each shell index
- my($destinationType, $testType, $testList, $testDatabase) = @_;
- open(FILE, ">dist/$destinationType/$testType/index.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' '.&utils::helpers::escape($utils::helpers::TestTypeShortTitles{$testType}).' Index</title>
- <link rel="up" href="../index.html">
- <link rel="top" href="../../index.html">
- </head>
- <body>
- <h1>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' '.&utils::helpers::escape($utils::helpers::TestTypeShortTitles{$testType}).' Index</h1>
- <p>'.&utils::helpers::escape($utils::helpers::TestTypeDescriptions{$testType}).'</p>
- <p>Please select the type of test harness you wish to use to embed the tests inside the navigation aids:</p>
- <dl>
- <dt><a href="'.&utils::helpers::escape("flat/index.html").'">Self Contained</a></dt>
- <dd>Tests consist of an '.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' page describing the test and containing, inline, the test content.</dd>';
- foreach my $type (split ' ', $utils::helpers::types{'SHELL_TYPES'}) {
- print FILE "\n <dt><a href=\"".&utils::helpers::escape("$type/index.html").'">'.&utils::helpers::escape($utils::helpers::ShellTypeTitles{$type}).'</a></dt>
- <dd>'.&utils::helpers::escape($utils::helpers::ShellTypeDescriptions{$type}).'</dd>';
- }
- print FILE '
- </dl>
- <p>See also: <a href="../../index.html">Index</a>, <a href="../index.html">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Index</a>';
- foreach my $type (split ' ', $utils::helpers::types{'DESTINATION_TYPES'}) {
- if ($type ne $destinationType) {
- print FILE ', <a href="'.&utils::helpers::escape("../../../$type/index.html").'">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$type}).'</a>';
- }
- }
- print FILE '</p>
- </body>
-</html>';
- close(FILE);
-}
-
-sub generateFlatTestIndex { # points to flat tests
- my($destinationType, $testType, $testList, $testDatabase) = @_;
- open(FILE, ">dist/$destinationType/$testType/flat/index.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Self Contained '.&utils::helpers::escape($utils::helpers::TestTypeShortTitles{$testType}).' Index</title>
- <link rel="up" href="../index.html">
- <link rel="top" href="../../../index.html">
- </head>
- <body>
- <h1>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Self Contained '.&utils::helpers::escape($utils::helpers::TestTypeShortTitles{$testType}).' Index</h1>
- <ul>';
- foreach my $test (@$testList) {
- print FILE "\n <li><a href=\"".&utils::helpers::escape("$test.".&extensions($destinationType)).'">'.&utils::helpers::escape($testDatabase->{$test}->{'def'})."</a> (#".&utils::helpers::escape($testDatabase->{$test}->{'number'}).")</li>";
- }
- print FILE '
- </ul>
- <p>See also: <a href="../../../index.html">Index</a>, <a href="../../index.html">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Index</a>';
- foreach my $type (split ' ', $utils::helpers::types{'DESTINATION_TYPES'}) {
- if ($type ne $destinationType) {
- print FILE ', <a href="'.&utils::helpers::escape("../../../$type/index.html").'">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$type}).'</a>';
- }
- }
- print FILE '</p>
- </body>
-</html>';
- close(FILE);
-}
-
-sub generateShellTestIndex { # points to shell tests
- my($destinationType, $testType, $shellType, $testList, $testDatabase) = @_;
- open(FILE, ">dist/$destinationType/$testType/$shellType/index.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' '.&utils::helpers::escape($utils::helpers::ShellTypeTitles{$shellType}).' '.&utils::helpers::escape($utils::helpers::TestTypeShortTitles{$testType}).' Index</title>
- <link rel="up" href="../index.html">
- <link rel="top" href="../../../index.html">
- </head>
- <body>
- <h1>'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' '.&utils::helpers::escape($utils::helpers::ShellTypeTitles{$shellType}).' '.&utils::helpers::escape($utils::helpers::TestTypeShortTitles{$testType}).' Index</h1>
- <p>'.&utils::helpers::escape($utils::helpers::ShellTypeDescriptions{$shellType}).'</p>
- <ul>';
- foreach my $test (@$testList) {
- print FILE "\n <li><a href=\"".&utils::helpers::escape("$test.".&extensions($shellType)).'">'.&utils::helpers::escape($testDatabase->{$test}->{'def'})."</a> (#".&utils::helpers::escape($testDatabase->{$test}->{'number'}).")</li>";
- }
- print FILE '
- </ul>
- <p>See also: <a href="../../../index.html">Index</a>, <a href="../../index.html">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$destinationType}).' Index</a>';
- foreach my $type (split ' ', $utils::helpers::types{'DESTINATION_TYPES'}) {
- if ($type ne $destinationType) {
- print FILE ', <a href="'.&utils::helpers::escape("../../../$type/index.html").'">'.&utils::helpers::escape($utils::helpers::DestinationTypeTitles{$type}).'</a>';
- }
- }
- print FILE '</p>
- </body>
-</html>';
- close(FILE);
-}
-
-
-##############################################################################
-# Test Meta Generators #
-##############################################################################
-
-sub generateMiniTest {
- my($destinationType, $tests, $testDatabase, $testIndex) = @_;
- my $func = UNIVERSAL::can(__PACKAGE__, "print_mini_${destinationType}");
- if (defined($func)) {
- &$func($tests, $testDatabase, $testIndex);
- } else {
- die("No generator defined for mini $destinationType tests. Aborted while processing test $tests->[$testIndex]");
- }
-}
-
-sub generateFlatTest {
- my($destinationType, $testType, $tests, $testDatabase, $testIndex) = @_;
- my $func = UNIVERSAL::can(__PACKAGE__, "print_flat_${destinationType}");
- if (defined($func)) {
- &$func($testType, $tests, $testDatabase, $testIndex);
- } else {
- die("No generator defined for full $destinationType tests. Aborted while processing test $tests->[$testIndex]");
- }
-}
-
-sub generateShell {
- my($destinationType, $testType, $shellType, $tests, $testDatabase, $testIndex) = @_;
- my $func = UNIVERSAL::can(__PACKAGE__, "print_shell_${shellType}");
- if (defined($func)) {
- &$func($destinationType, $testType, $tests, $testDatabase, $testIndex);
- } else {
- die("No generator defined for $shellType shells of $destinationType tests. Aborted while processing test $tests->[$testIndex]");
- }
-}
-
-
-##############################################################################
-# Test Generators #
-##############################################################################
-
-sub print_mini_xhtml {
- my($tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/xhtml/tests/$name.xml") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n" unless defined($data->{'namespaced'});
- print FILE '<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <style type="text/css"><![CDATA['."$data->{cssrules}]]></style>";
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'"/>';
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'"/>';
- }
- # XXX shoud list alternates (i.e. flat and each shell)
- print FILE "
- <link rel=\"up\" href=\"./index.html\"/>
- <link rel=\"top\" href=\"../../index.html\"/>
- </head>
- <body$data->{'namespaces'}>$data->{'code-xhtml'}</body>
-</html>";
- close(FILE);
-}
-
-sub print_mini_html {
- my($tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/html/tests/$name.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <style type="text/css">'."$data->{cssrules}</style>";
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'">';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'">';
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'">';
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'">';
- }
- # XXX shoud list alternates (i.e. flat and each shell)
- print FILE "
- <link rel=\"up\" href=\"./index.html\">
- <link rel=\"top\" href=\"../../index.html\">
- </head>
- <body>$data->{'code-html'}</body>
-</html>";
- close(FILE);
-}
-
-sub print_mini_xml {
- my($tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/xml/tests/$name.xml") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<?xml-stylesheet href="'.&utils::helpers::escape($name).".css\" type=\"text/css\"?>
-<test$data->{'namespaces'}>$data->{'code-xml'}</test>";
- close(FILE);
- open(FILE, ">dist/xml/tests/$name.css") or die "failed to open output file: $!";
- print FILE $data->{cssrules};
- close(FILE);
-}
-
-
-sub print_flat_xhtml {
- my($testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/xhtml/$testType/flat/$name.xml") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE "<?xml-stylesheet href=\"../../../style/xhtml-full.css\" type=\"text/css\"?>\n";
- print FILE "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n" unless defined($data->{'namespaced'});
- print FILE '<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'"/>
- <link rel="stylesheet" type="text/css" href="../../../style/xhtml-full.css"/> <!-- yes this means compliant UAs get to import this twice -->
- <style type="text/css"><![CDATA['."$data->{cssrules}]]></style>";
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'"/>';
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'"/>';
- }
- # XXX shoud list alternates (i.e. mini and each shell)
- print FILE '
- <link rel="up" href="./index.html"/>
- <link rel="top" href="../../../index.html"/>
- </head>
- <body>
- <table class="testDescription">
- <tr>
- <th class="b">CSS 3 Module</th> <!-- XXX hard coded to say CSS 3 -->
- <th class="c" colspan="2">';
- if ($testIndex > 0) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\">&lt;==</a>";
- } else {
- print FILE "\n &lt;==";
- }
- print FILE "\n Test #";
- if ($testIndex < $#$tests) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\">==&gt;</a>";
- } else {
- print FILE "\n ==&gt;";
- }
- print FILE '
- </th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'module'}).'</td>
- <td class="c" colspan="2">'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</td>
- </tr>
- <tr>
- <th class="b">Testing</th>
- <th class="a">Date</th>
- <th class="a">Revision</th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'def'}).' (ID #'.&utils::helpers::escape($data->{'number'}).')</td>
- <td class="a">'.&utils::helpers::escape($data->{'date'}).'</td>
- <td class="a">'.&utils::helpers::escape($data->{'rev'}).'</td>
- </tr>
- </table>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: User interaction is required for this test.</p>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</p>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</p>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support namespaces for this test.</p>";
- }
- print FILE "
- <div class=\"testSource\">
- <div class=\"testText\"$data->{'namespaces'}>$data->{'code-xhtml'}</div>
- <pre class=\"rules\">$data->{'escapedcode-css'}</pre>
- <pre class=\"rules\">$data->{'escapedcode-xhtml'}</pre>
- </div>
- </body>
-</html>";
- close(FILE);
-}
-
-sub print_flat_html {
- my($testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/html/$testType/flat/$name.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'">
- <link rel="stylesheet" type="text/css" href="../../../style/html-full.css">
- <style type="text/css">'."$data->{cssrules}</style>";
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'">';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'">';
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'">';
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'">';
- }
- # XXX shoud list alternates (i.e. mini and each shell)
- print FILE '
- <link rel="up" href="./index.html">
- <link rel="top" href="../../../index.html">
- </head>
- <body>
- <table class="testDescription">
- <tr>
- <th class="b">CSS 3 Module</th> <!-- XXX hard coded to say CSS 3 -->
- <th class="c" colspan="2">';
- if ($testIndex > 0) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\">&lt;==</a>";
- } else {
- print FILE "\n &lt;==";
- }
- print FILE "\n Test #";
- if ($testIndex < $#$tests) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\">==&gt;</a>";
- } else {
- print FILE "\n ==&gt;";
- }
- print FILE '
- </th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'module'}).'</td>
- <td class="c" colspan="2">'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</td>
- </tr>
- <tr>
- <th class="b">Testing</th>
- <th class="a">Date</th>
- <th class="a">Revision</th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'def'}).' (ID #'.&utils::helpers::escape($data->{'number'}).')</td>
- <td class="a">'.&utils::helpers::escape($data->{'date'}).'</td>
- <td class="a">'.&utils::helpers::escape($data->{'rev'}).'</td>
- </tr>
- </table>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: User interaction is required for this test.</p>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</p>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</p>";
- }
- if (defined($data->{'only-xml'})) {
- die("Inconsistency error: XML-specific test $name passed to HTML test generator");
- }
- print FILE "
- <div class=\"testSource\">
- <div class=\"testText\">$data->{'code-html'}</div>
- <pre class=\"rules\">$data->{'escapedcode-css'}</pre>
- <pre class=\"rules\">$data->{'escapedcode-html'}</pre>
- </div>
- </body>
-</html>";
- close(FILE);
-}
-
-sub print_flat_xml {
- my($testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/xml/$testType/flat/$name.xml") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<?xml-stylesheet href="../../../style/xml-full.css" type="text/css"?>
-<?xml-stylesheet href="'.&utils::helpers::escape($name).'.css" type="text/css"?>
-<test xmlns:xlink="http://www.w3.org/1999/xlink">
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>';
- foreach my $author (@{$data->{'author'}}) {
- print FILE "\n <author>".&utils::helpers::escape($author).'</author>';
- }
- print FILE '
- <metadata>
- <item> <name>CSS 3 Module</name> <data>'.&utils::helpers::escape($data->{'module'}).'</data> </item>'; # XXX HARD CODED
- if ($testIndex < $#$tests) {
- print FILE "\n <item> <name>Next</name> <data xlink:type=\"simple\" xlink:href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml">'.($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'</data> </item>';
- }
- if ($testIndex > 0) {
- print FILE "\n <item> <name>Previous</name> <data xlink:type=\"simple\" xlink:href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml">'.($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'</data> </item>';
- }
- print FILE '
- <item> <name>Test #</name> <data>'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</data> </item>
- <item> <name>Testing</name> <data>'.&utils::helpers::escape($data->{'def'}).'</data> </item>
- <item> <name>ID</name> <data>'.&utils::helpers::escape($data->{'number'}).'</data> </item>
- <item> <name>Date</name> <data>'.&utils::helpers::escape($data->{'date'}).'</data> </item>
- <item> <name>Revision</name> <data>'.&utils::helpers::escape($data->{'rev'}).'</data> </item>
- </metadata>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <requirement>User interaction is required for this test.</requirement>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <requirement>The UA must support the concept of a session history for this test.</requirement>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <requirement>The UA must support ECMA-262 and DOM Level 2 Core for this test.</requirement>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n <requirement>The UA must support namespaces for this test.</requirement>";
- }
- print FILE "
- <content$data->{'namespaces'}>$data->{'code-xml'}</content>
- <source>
- <css>$data->{'escapedcode-css'}</css>
- <xml>$data->{'escapedcode-xml'}</xml>
- </source>
-</test>";
- close(FILE);
- # XXX we generate one of these for each test file --
- # XXX we could put them up one directory, or just use the stylesheets from the mini tests
- open(FILE, ">dist/xml/$testType/flat/$name.css") or die "failed to open output file: $!";
- print FILE $data->{cssrules};
- close(FILE);
-}
-
-
-sub print_shell_xhtml_iframe {
- my($destinationType, $testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/$destinationType/$testType/xhtml_iframe/$name.xml") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<?xml-stylesheet href="../../../style/xhtml-shell.css" type="text/css"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'"/>
- <link rel="stylesheet" type="text/css" href="../../../style/xhtml-shell.css"/> <!-- yes this means compliant UAs get to import this twice -->';
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'"/>';
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'"/>';
- }
- # XXX shoud list alternates (i.e. mini, flat and the other shells)
- print FILE '
- <link rel="up" href="./index.html"/>
- <link rel="top" href="../../../index.html"/>
- </head>
- <body>
- <table class="testDescription">
- <tr>
- <th class="b">CSS 3 Module</th> <!-- XXX hard coded to say CSS 3 -->
- <th class="c" colspan="2">';
- if ($testIndex > 0) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\">&lt;==</a>";
- } else {
- print FILE "\n &lt;==";
- }
- print FILE "\n Test #";
- if ($testIndex < $#$tests) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\">==&gt;</a>";
- } else {
- print FILE "\n ==&gt;";
- }
- print FILE '
- </th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'module'}).'</td>
- <td class="c" colspan="2">'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</td>
- </tr>
- <tr>
- <th class="b">Testing</th>
- <th class="a">Date</th>
- <th class="a">Revision</th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'def'}).' (ID #'.&utils::helpers::escape($data->{'number'}).')</td>
- <td class="a">'.&utils::helpers::escape($data->{'date'}).'</td>
- <td class="a">'.&utils::helpers::escape($data->{'rev'}).'</td>
- </tr>
- </table>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: User interaction is required for this test.</p>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</p>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</p>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support namespaces for this test.</p>";
- }
- my $extension = &extensions($destinationType); # having the extension in the filename is so wrong...
- print FILE "
- <iframe src=\"../../tests/$name.$extension\"/>
- </body>
-</html>";
- close(FILE);
-}
-
-sub print_shell_xhtml_object {
- my($destinationType, $testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/$destinationType/$testType/xhtml_object/$name.xml") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<?xml-stylesheet href="../../../style/xhtml-shell.css" type="text/css"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'"/>
- <link rel="stylesheet" type="text/css" href="../../../style/xhtml-shell.css"/> <!-- yes this means compliant UAs get to import this twice -->';
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'"/>';
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'"/>';
- }
- # XXX shoud list alternates (i.e. mini, flat and the other shells)
- print FILE '
- <link rel="up" href="./index.html"/>
- <link rel="top" href="../../../index.html"/>
- </head>
- <body>
- <table class="testDescription">
- <tr>
- <th class="b">CSS 3 Module</th> <!-- XXX hard coded to say CSS 3 -->
- <th class="c" colspan="2">';
- if ($testIndex > 0) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\">&lt;==</a>";
- } else {
- print FILE "\n &lt;==";
- }
- print FILE "\n Test #";
- if ($testIndex < $#$tests) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\">==&gt;</a>";
- } else {
- print FILE "\n ==&gt;";
- }
- print FILE '
- </th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'module'}).'</td>
- <td class="c" colspan="2">'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</td>
- </tr>
- <tr>
- <th class="b">Testing</th>
- <th class="a">Date</th>
- <th class="a">Revision</th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'def'}).' (ID #'.&utils::helpers::escape($data->{'number'}).')</td>
- <td class="a">'.&utils::helpers::escape($data->{'date'}).'</td>
- <td class="a">'.&utils::helpers::escape($data->{'rev'}).'</td>
- </tr>
- </table>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: User interaction is required for this test.</p>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</p>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</p>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support namespaces for this test.</p>";
- }
- my $extension = &extensions($destinationType); # having the extension in the filename is so wrong...
- print FILE "
- <object data=\"../../tests/$name.$extension\"/>
- </body>
-</html>";
- close(FILE);
-}
-
-sub print_shell_xhtml_frames {
- my($destinationType, $testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- my $extension = &extensions($destinationType); # having the extension in the filename is so wrong...
- my $topframe = &utils::helpers::escape("$name-top.xml");
- my $bottomframe = &utils::helpers::escape("../../tests/$name.$extension");
- open(FILE, ">dist/$destinationType/$testType/xhtml_frames/$name-top.xml") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<?xml-stylesheet href="../../../style/xhtml-shell.css" type="text/css"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'"/>
- <link rel="stylesheet" type="text/css" href="../../../style/xhtml-shell.css" target="_top"/> <!-- yes this means compliant UAs get to import this twice -->';
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'" target="_top"/>';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\" target=\"_top\"/>";
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\" target=\"_top\"/>";
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'" target="_top"/>';
- }
- # XXX shoud list alternates (i.e. mini, flat and the other shells)
- print FILE '
- <link rel="up" href="./index.html" target="_top"/>
- <link rel="top" href="../../../index.html" target="_top"/>
- </head>
- <body>
- <table class="testDescription">
- <tr>
- <th class="b">CSS 3 Module</th> <!-- XXX hard coded to say CSS 3 -->
- <th class="c" colspan="2">';
- if ($testIndex > 0) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\" target=\"_top\">&lt;==</a>";
- } else {
- print FILE "\n &lt;==";
- }
- print FILE "\n Test #";
- if ($testIndex < $#$tests) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\" target=\"_top\">==&gt;</a>";
- } else {
- print FILE "\n ==&gt;";
- }
- print FILE '
- </th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'module'}).'</td>
- <td class="c" colspan="2">'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</td>
- </tr>
- <tr>
- <th class="b">Testing</th>
- <th class="a">Date</th>
- <th class="a">Revision</th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'def'}).' (ID #'.&utils::helpers::escape($data->{'number'}).')</td>
- <td class="a">'.&utils::helpers::escape($data->{'date'}).'</td>
- <td class="a">'.&utils::helpers::escape($data->{'rev'}).'</td>
- </tr>
- </table>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: User interaction is required for this test.</p>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</p>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</p>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support namespaces for this test.</p>";
- }
- print FILE "
- </body>
-</html>";
- close(FILE);
- open(FILE, ">dist/$destinationType/$testType/xhtml_frames/$name.xml") or die "failed to open output file: $!";
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'"/>';
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'" target="_top"/>';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\" target=\"_top\"/>";
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\" target=\"_top\"/>";
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'" target="_top"/>';
- }
- print FILE "
- <link rel=\"up\" href=\"./index.html\" target=\"_top\"/>
- <link rel=\"top\" href=\"../../../index.html\" target=\"_top\"/>
- </head>
- <frameset rows=\"35%,*\" cols=\"*\">
- <frame src=\"$topframe\"/>
- <frame src=\"$bottomframe\"/>
- </frameset>
-</html>";
- close(FILE);
-}
-
-sub print_shell_html_iframe {
- my($destinationType, $testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/$destinationType/$testType/html_iframe/$name.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'">
- <link rel="stylesheet" type="text/css" href="../../../style/html-shell.css"> <!-- yes this means compliant UAs get to import this twice -->';
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'">';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'">';
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'">';
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'">';
- }
- # XXX shoud list alternates (i.e. mini, flat and the other shells)
- print FILE '
- <link rel="up" href="./index.html">
- <link rel="top" href="../../../index.html">
- </head>
- <body>
- <table class="testDescription">
- <tr>
- <th class="b">CSS 3 Module</th> <!-- XXX hard coded to say CSS 3 -->
- <th class="c" colspan="2">';
- if ($testIndex > 0) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\">&lt;==</a>";
- } else {
- print FILE "\n &lt;==";
- }
- print FILE "\n Test #";
- if ($testIndex < $#$tests) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\">==&gt;</a>";
- } else {
- print FILE "\n ==&gt;";
- }
- print FILE '
- </th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'module'}).'</td>
- <td class="c" colspan="2">'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</td>
- </tr>
- <tr>
- <th class="b">Testing</th>
- <th class="a">Date</th>
- <th class="a">Revision</th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'def'}).' (ID #'.&utils::helpers::escape($data->{'number'}).')</td>
- <td class="a">'.&utils::helpers::escape($data->{'date'}).'</td>
- <td class="a">'.&utils::helpers::escape($data->{'rev'}).'</td>
- </tr>
- </table>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: User interaction is required for this test.</p>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</p>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</p>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support namespaces for this test.</p>";
- }
- my $extension = &extensions($destinationType); # having the extension in the filename is so wrong...
- print FILE "
- <iframe src=\"../../tests/$name.$extension\">
- </body>
-</html>";
- close(FILE);
-}
-
-sub print_shell_html_object {
- my($destinationType, $testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/$destinationType/$testType/html_object/$name.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'">
- <link rel="stylesheet" type="text/css" href="../../../style/html-shell.css">';
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'">';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'">';
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'">';
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'">';
- }
- # XXX shoud list alternates (i.e. mini, flat and the other shells)
- print FILE '
- <link rel="up" href="./index.html">
- <link rel="top" href="../../../index.html">
- </head>
- <body>
- <table class="testDescription">
- <tr>
- <th class="b">CSS 3 Module</th> <!-- XXX hard coded to say CSS 3 -->
- <th class="c" colspan="2">';
- if ($testIndex > 0) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\">&lt;==</a>";
- } else {
- print FILE "\n &lt;==";
- }
- print FILE "\n Test #";
- if ($testIndex < $#$tests) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\">==&gt;</a>";
- } else {
- print FILE "\n ==&gt;";
- }
- print FILE '
- </th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'module'}).'</td>
- <td class="c" colspan="2">'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</td>
- </tr>
- <tr>
- <th class="b">Testing</th>
- <th class="a">Date</th>
- <th class="a">Revision</th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'def'}).' (ID #'.&utils::helpers::escape($data->{'number'}).')</td>
- <td class="a">'.&utils::helpers::escape($data->{'date'}).'</td>
- <td class="a">'.&utils::helpers::escape($data->{'rev'}).'</td>
- </tr>
- </table>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: User interaction is required for this test.</p>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</p>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</p>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support namespaces for this test.</p>";
- }
- my $extension = &extensions($destinationType); # having the extension in the filename is so wrong...
- print FILE "
- <object data=\"../../tests/$name.$extension\"></object>
- </body>
-</html>";
- close(FILE);
-}
-
-sub print_shell_tng {
- my($destinationType, $testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/$destinationType/$testType/tng/$name.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<HTML>
-<HEAD>
-<TITLE>CSS3 Test Suite: '.&utils::helpers::escape($data->{'def'}).'</TITLE>
-<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<META http-equiv="Content-Style-Type" content="text/css">
-
-<LINK rel="stylesheet" type="text/css" media="screen" href="../../../style/tng.css"></HEAD>
-
-<BODY>
-<DIV class="navigation">
-<H2>CSS3 Test Suite: '.&utils::helpers::escape($data->{'def'}).'</H2>
-
-<HR>';
- if ($testIndex > 0) {
- print FILE "\n[<A HREF=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\">Previous</A>]";
- } else {
- print FILE "\n[Previous]";
- }
- if ($testIndex < $#$tests) {
- print FILE ' <A HREF="'.&utils::helpers::escape($tests->[$testIndex+1]).'.html">[Next]</A>';
- } else {
- print FILE ' <A HREF="../index.html">[Next]</A>';
- }
- print FILE ' <A HREF="index.html">[Contents]</A>';
-
- my $extension = &extensions($destinationType); # having the extension in the filename is so wrong...
- print FILE '<BR>';
-
- if (defined($data->{'interactive'})) {
- print FILE "\n<P CLASS=\"WARNING\">NOTE: User interaction is required for this test.</P>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n<P CLASS=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</P>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n<P CLASS=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</P>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n<P CLASS=\"WARNING\">NOTE: The UA must support namespaces for this test.</P>";
-
- }
- print FILE '
-</DIV>
-<OBJECT height="100%" width="100%" border="0" type="text/html" data="'."../../tests/$name.$extension".'"><A class="navigation" href="'."../../tests/$name.$extension".'" target="testwindow">Test</A></OBJECT>
-</BODY>
-</HTML>';
- close(FILE);
-}
-
-sub print_shell_html_frames {
- my($destinationType, $testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- my $extension = &extensions($destinationType); # having the extension in the filename is so wrong...
- my $topframe = &utils::helpers::escape("$name-top.html");
- my $bottomframe = &utils::helpers::escape("../../tests/$name.$extension");
- open(FILE, ">dist/$destinationType/$testType/html_frames/$name-top.html") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'">
- <link rel="stylesheet" type="text/css" href="../../../style/html-shell.css" target="_top"> <!-- yes this means compliant UAs get to import this twice -->';
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'" target="_top">';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\" target=\"_top\">";
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\" target=\"_top\">";
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'" target="_top">';
- }
- # XXX shoud list alternates (i.e. mini, flat and the other shells)
- print FILE '
- <link rel="up" href="./index.html" target="_top">
- <link rel="top" href="../../../index.html" target="_top">
- </head>
- <body>
- <table class="testDescription">
- <tr>
- <th class="b">CSS 3 Module</th> <!-- XXX hard coded to say CSS 3 -->
- <th class="c" colspan="2">';
- if ($testIndex > 0) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\" target=\"_top\">&lt;==</a>";
- } else {
- print FILE "\n &lt;==";
- }
- print FILE "\n Test #";
- if ($testIndex < $#$tests) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\" target=\"_top\">==&gt;</a>";
- } else {
- print FILE "\n ==&gt;";
- }
- print FILE '
- </th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'module'}).'</td>
- <td class="c" colspan="2">'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</td>
- </tr>
- <tr>
- <th class="b">Testing</th>
- <th class="a">Date</th>
- <th class="a">Revision</th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'def'}).' (ID #'.&utils::helpers::escape($data->{'number'}).')</td>
- <td class="a">'.&utils::helpers::escape($data->{'date'}).'</td>
- <td class="a">'.&utils::helpers::escape($data->{'rev'}).'</td>
- </tr>
- </table>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: User interaction is required for this test.</p>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</p>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</p>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support namespaces for this test.</p>";
- }
- print FILE "
- </body>
-</html>";
- close(FILE);
- open(FILE, ">dist/$destinationType/$testType/html_frames/$name.html") or die "failed to open output file: $!";
- print FILE '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
-<html>
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'"/>';
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'" target="_top">';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\" target=\"_top\">";
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\" target=\"_top\">";
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).".html\" title=\"".&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'" target="_top">';
- }
- # XXX shoud list alternates (i.e. mini, flat and the other shells)
- print FILE "
- <link rel=\"up\" href=\"./index.html\" target=\"_top\">
- <link rel=\"top\" href=\"../../../index.html\" target=\"_top\">
- </head>
- <frameset rows=\"35%,*\" cols=\"*\">
- <frame src=\"$topframe\">
- <frame src=\"$bottomframe\">
- </frameset>
-</html>";
- close(FILE);
-}
-
-sub print_shell_xlink_embed {
- my($destinationType, $testType, $tests, $testDatabase, $testIndex) = @_;
- my $name = $tests->[$testIndex];
- my $data = $testDatabase->{$tests->[$testIndex]};
- open(FILE, ">dist/$destinationType/$testType/xlink_embed/$name.xml") or die "failed to open output file: $!";
- local $" = ', ';
- print FILE '<?xml-stylesheet href="../../../style/xhtml-shell.css" type="text/css"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>'.&utils::helpers::escape($data->{'def'}).'</title>
- <meta name="author" content="'.&utils::helpers::escape("@{$data->{'author'}}").'"/>
- <link rel="stylesheet" type="text/css" href="../../../style/xhtml-shell.css"/> <!-- yes this means compliant UAs get to import this twice -->';
- if ($testIndex > 0) {
- print FILE "\n <link rel=\"first\" href=\"".&utils::helpers::escape($tests->[0]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[0]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"prev\" href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'}).'"/>';
- }
- if ($testIndex < $#$tests) {
- print FILE "\n <link rel=\"next\" href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'}).'"/>';
- print FILE "\n <link rel=\"last\" href=\"".&utils::helpers::escape($tests->[$#$tests]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$#$tests]}->{'def'}).'"/>';
- }
- # XXX shoud list alternates (i.e. mini, flat and the other shells)
- print FILE '
- <link rel="up" href="./index.html"/>
- <link rel="top" href="../../../index.html"/>
- </head>
- <body>
- <table class="testDescription">
- <tr>
- <th class="b">CSS 3 Module</th> <!-- XXX hard coded to say CSS 3 -->
- <th class="c" colspan="2">';
- if ($testIndex > 0) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex-1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex-1]}->{'def'})."\">&lt;==</a>";
- } else {
- print FILE "\n &lt;==";
- }
- print FILE "\n Test #";
- if ($testIndex < $#$tests) {
- print FILE "\n <a href=\"".&utils::helpers::escape($tests->[$testIndex+1]).'.xml" title="'.&utils::helpers::escape($testDatabase->{$tests->[$testIndex+1]}->{'def'})."\">==&gt;</a>";
- } else {
- print FILE "\n ==&gt;";
- }
- print FILE '
- </th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'module'}).'</td>
- <td class="c" colspan="2">'.($testIndex+1).' of '.(scalar(@$tests));
- if ($utils::helpers::TestTypeTitles{$testType} ne '') {
- print FILE ' of the '.&utils::helpers::escape($utils::helpers::TestTypeTitles{$testType});
- }
- print FILE '</td>
- </tr>
- <tr>
- <th class="b">Testing</th>
- <th class="a">Date</th>
- <th class="a">Revision</th>
- </tr>
- <tr>
- <td class="b">'.&utils::helpers::escape($data->{'def'}).' (ID #'.&utils::helpers::escape($data->{'number'}).')</td>
- <td class="a">'.&utils::helpers::escape($data->{'date'}).'</td>
- <td class="a">'.&utils::helpers::escape($data->{'rev'}).'</td>
- </tr>
- </table>';
- if (defined($data->{'interactive'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: User interaction is required for this test.</p>";
- }
- if (defined($data->{'historyneeded'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support the concept of a session history for this test.</p>";
- }
- if (defined($data->{'dynamic'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.</p>";
- }
- if (defined($data->{'namespaced'})) {
- print FILE "\n <p class=\"WARNING\">NOTE: The UA must support namespaces for this test.</p>";
- }
- my $extension = &extensions($destinationType); # having the extension in the filename is so wrong...
- print FILE "
- <div xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:type=\"simple\" xlink:show=\"embed\" xlink:href=\"../../../tests/$name.$extension\"/>
- </body>
-</html>";
- close(FILE);
-}
-
-##############################################################################
diff --git a/tests/wpt/web-platform-tests/css/selectors/utils/helpers.pm b/tests/wpt/web-platform-tests/css/selectors/utils/helpers.pm
deleted file mode 100644
index 30c35d3425a..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/utils/helpers.pm
+++ /dev/null
@@ -1,219 +0,0 @@
-package utils::helpers;
-use Data::Dumper; # DEPENDENCY
-use strict;
-
-# The Test Type Hash
-# Note: Adding types to this hash is not enough... you also have to
-# add code to the Makefile, the parser, the shortlist functions in
-# this file, and the generators in the generator.pm module.
-%utils::helpers::types = (
- 'DESTINATION_TYPES' => 'xhtml html xml', # explicitly listed in Makefile, shortlister and generator
- 'SHELL_TYPES' => 'xhtml_iframe xhtml_object xhtml_frames html_iframe html_object html_frames xlink_embed tng', # explicitly listed in generator and just below
- 'TEST_TYPES' => 'full static history interactive', # explicitly listed in shortlister, generator, and just below
- 'TEST_TYPES' => 'full static history interactive dynamic', # explicitly listed in shortlister, generator, and just below
- );
-
-%utils::helpers::DestinationTypeTitles = (
- 'xhtml' => 'XHTML',
- 'html' => 'HTML',
- 'xml' => 'XML',
- );
-
-%utils::helpers::ShellTypeTitles = (
- 'xhtml_iframe' => 'XHTML <iframe>',
- 'xhtml_object' => 'XHTML <object>',
- 'xhtml_frames' => 'XHTML <frame>',
- 'html_iframe' => 'HTML <iframe>',
- 'html_object' => 'HTML <object>',
- 'html_frames' => 'HTML <frame>',
- 'xlink_embed' => 'XLink embed',
- 'tng' => 'TNG Format',
- );
-
-%utils::helpers::ShellTypeDescriptions = (
- 'xhtml_iframe' => 'Tests consist of an XHTML wrapper page summarising the test and linking to the actual test content using an <iframe> element.',
- 'xhtml_object' => 'Tests consist of an XHTML wrapper page summarising the test and linking to the actual test content using an <object> element.',
- 'xhtml_frames' => 'Tests consist of a two frame XHTML frameset, the top frame being an XHTML wrapper page summarising the test and the bottom frame being the actual test content.',
- 'html_iframe' => 'Tests consist of an HTML wrapper page summarising the test and linking to the actual test content using an <iframe> element.',
- 'html_object' => 'Tests consist of an HTML wrapper page summarising the test and linking to the actual test content using an <object> element.',
- 'html_frames' => 'Tests consist of a two frame HTML frameset, the top frame being an HTML wrapper page summarising the test and the bottom frame being the actual test content.',
- 'xlink_embed' => 'Tests consist of an XML page summarising the test and linking to the actual test content using an XLink with the show axis set to embed.',
- 'tng' => 'Tests consist of an HTML page with a brief test summary and navigation aids and a link to the test content using an <object> tag. This test format is designed to be stylistically compatible with the TNG test format used for other CSS test suites.',
- );
-
-%utils::helpers::TestTypeTitles = (
- 'full' => '',
- 'static' => 'static tests category',
- 'history' => 'history-related tests category',
- 'interactive' => 'interactive tests category',
- 'dynamic' => 'dynamic tests category',
- );
-
-%utils::helpers::TestTypeDescriptions = (
- 'full' => 'The complete set of tests.',
- 'static' => 'The list of static tests (those that involve in scripting and no user interaction).',
- 'history' => 'Tests requiring that the UA have some sort of session history.',
- 'interactive' => 'The tests that require user interaction.',
- 'dynamic' => 'Pages consisting of a script that dynamically modifies the document in order to complete the test.',
- );
-
-%utils::helpers::TestTypeShortTitles = (
- 'full' => 'full',
- 'static' => 'static',
- 'history' => 'history-related',
- 'interactive' => 'interactive',
- 'dynamic' => 'dynamic',
- );
-
-sub qualifyStartTag {
- my($parser, $localTagName, @localAttributes) = @_;
-
- # get the qualified tag name
- my $qualifiedTagName;
- my $namespace = $parser->namespace($localTagName);
- if (defined($namespace)) {
- $qualifiedTagName = "{$namespace}$localTagName";
- } else {
- $qualifiedTagName = $localTagName;
- }
-
- # get the qualified attributes
- my @qualifiedAttributes;
- my $isName = 1;
- foreach my $attribute (@localAttributes) {
- if ($isName) {
- $namespace = $parser->namespace($attribute);
- if (defined($namespace)) {
- push(@qualifiedAttributes, "{$namespace}$attribute");
- } else {
- push(@qualifiedAttributes, $attribute);
- }
- } else {
- #my $data = $attribute;
- #if ($data =~ s/^([^:]+)://o) {
- # $namespace = $parser->expand_ns_prefix($1);
- #} else {
- # $namespace = $parser->expand_ns_prefix('#default');
- #}
- #if (defined($namespace)) {
- # push(@qualifiedAttributes, "{$namespace}$data"); # value
- #} else {
- push(@qualifiedAttributes, $attribute); # value
- #}
- }
- $isName = not $isName;
- }
-
- # add the namespace declarations
- foreach my $prefix ($parser->new_ns_prefixes) {
- if ($prefix eq '#default') {
- push(@qualifiedAttributes, 'xmlns', $parser->expand_ns_prefix($prefix));
- } else {
- push(@qualifiedAttributes, "xmlns:$prefix", $parser->expand_ns_prefix($prefix));
- }
- }
-
- # return it all
- return ($qualifiedTagName, @qualifiedAttributes);
-}
-
-sub matchContext {
- my($parser, $match, $loose) = @_;
- my @context = $parser->context;
- if (defined($loose)) {
- return 0 unless (scalar(@context) >= scalar(@$match));
- } else {
- return 0 unless (scalar(@context) == scalar(@$match));
- }
- foreach my $element (@context[0..$#$match]) {
- my($namespace, $tagName) = @{shift(@$match)};
- return 0 unless ($element eq $tagName);
- my $matchNamespace = $parser->namespace($element);
- return 0 unless ((defined($matchNamespace) == defined($namespace)) and
- ($matchNamespace eq $namespace));
- }
- return 1;
-}
-
-sub shortlistTestsForDestination {
- my($type, $testList, $tests) = @_;
- my @result;
- foreach my $test (@$testList) {
- if (exists($tests->{$test})) {
- if ($type eq 'xhtml') {
- push(@result, $test);
- } elsif ($type eq 'xml') {
- push(@result, $test);
- } elsif ($type eq 'html') {
- if (not $tests->{$test}->{'only-xml'}) {
- push(@result, $test);
- }
- } else {
- die("Don't know how to shortlist tests for $type");
- }
- }
- }
- return @result;
-}
-
-sub shortlistTestsForTypes {
- my($type, $testList, $tests) = @_;
- my @result;
- foreach my $test (@$testList) {
- if (exists($tests->{$test})) {
- if ($type eq 'full') {
- push(@result, $test);
- } elsif ($type eq 'static') {
- if (not ($tests->{$test}->{'dynamic'} or $tests->{$test}->{'interactive'})) {
- push(@result, $test);
- }
- } elsif ($type eq 'history') {
- if ($tests->{$test}->{'historyneeded'}) {
- push(@result, $test);
- }
- } elsif ($type eq 'interactive') {
- if ($tests->{$test}->{'interactive'}) {
- push(@result, $test);
- }
- } elsif ($type eq 'dynamic') {
- if ($tests->{$test}->{'dynamic'}) {
- push(@result, $test);
- }
- } else {
- die("Don't know how to shortlist $type tests");
- }
- }
- }
- return @result;
-}
-
-sub readCache {
- open(CACHE, '<cache') or return {};
- local $/ = undef;
- my $data = <CACHE>;
- close(CACHE);
- if ($data) {
- return eval $data;
- } else {
- return {};
- }
-}
-
-sub writeCache {
- open(CACHE, '>cache');
- print CACHE Data::Dumper->new([@_])->Purity(1)->Terse(1)->Indent(0)->Dump;
- close(CACHE);
-}
-
-sub escape {
- $_ = shift;
- # because XML::Parser::Expat::escape() doesn't correctly escape "]]>"...
- s/&/&amp;/go;
- s/</&lt;/go;
- s/>/&gt;/go;
- s/"/&quot;/go; #"; # (reset fontlock)
- s/'/&#39;/go; #'; # (reset fontlock) # note -- this would be apos but apos is not in HTML 4.01
- return $_;
-}
-
-##############################################################################
diff --git a/tests/wpt/web-platform-tests/css/selectors/utils/parser.pm b/tests/wpt/web-platform-tests/css/selectors/utils/parser.pm
deleted file mode 100644
index 5ae4a740ed8..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/utils/parser.pm
+++ /dev/null
@@ -1,334 +0,0 @@
-##############################################################################
-# the processor #
-##############################################################################
-
-# This code is a mess and has numerous subtle bugs in its namespace
-# handling. Do not expect it to pass any tests of its own.
-
-package utils::parser;
-use utils::helpers;
-use strict;
-
-my $NAMESPACE = 'http://www.example.org/css3tests';
-my %months = (
- 'january' => 1,
- 'february' => 2,
- 'march' => 3,
- 'april' => 4,
- 'may' => 5,
- 'june' => 6,
- 'july' => 7,
- 'august' => 8,
- 'september' => 9,
- 'october' => 10,
- 'november' => 11,
- 'december' => 12,
- );
-
-sub Init {
- my $parser = shift;
- $parser->{'Walker Data'} = {};
-}
-
-# This is the big workhorse -- it gets called for each start tag.
-sub Start {
- my $parser = shift;
- my($tagName, @attrs) = @_;
- my @context = $parser->context;
- my($qualifiedTagName, @qualifiedAttrs) = &utils::helpers::qualifyStartTag($parser, $tagName, @attrs);
- my %qualifiedAttrs = (@qualifiedAttrs);
-
- # The root element
- if ((scalar(@context) == 0) and ($qualifiedTagName eq "{$NAMESPACE}csstest")) {
- foreach my $name (qw(def module modulename number rev)) {
- if (defined($qualifiedAttrs{$name})) {
- $parser->{'Walker Data'}->{$name} = $qualifiedAttrs{$name};
- }
- }
- if (defined($qualifiedAttrs{date})) {
- my $date = $qualifiedAttrs{date};
- $date =~ s/(.+)-(.+)-(.+)/sprintf('%02d-%02d-%02d', $3, $months{$2}, $1)/gose;
- $parser->{'Walker Data'}->{date} = $date;
- }
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest']]) and
- ($qualifiedTagName eq "{$NAMESPACE}author")) {
- if (defined($parser->{'Walker Data'}->{'author'})) {
- push(@{$parser->{'Walker Data'}->{'author'}}, '');
- } else {
- $parser->{'Walker Data'}->{'author'} = [''];
- }
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest']]) and
- ($qualifiedTagName eq "{$NAMESPACE}cssrules")) {
- # ok
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest']]) and
- ($qualifiedTagName eq "{$NAMESPACE}userinteraction")) {
- $parser->{'Walker Data'}->{'interactive'} = 1;
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest']]) and
- ($qualifiedTagName eq "{$NAMESPACE}dynamic")) {
- $parser->{'Walker Data'}->{'dynamic'} = 1;
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest']]) and
- ($qualifiedTagName eq "{$NAMESPACE}historyneeded")) {
- $parser->{'Walker Data'}->{'historyneeded'} = 1;
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest']]) and
- ($qualifiedTagName eq "{$NAMESPACE}code") and
- (not defined($parser->{'Walker Data'}->{'prefixes'}))) {
- # here we must begin to take stuff into account
- $parser->{'Walker Data'}->{'code-xml'} = '';
- $parser->{'Walker Data'}->{'code-xhtml'} = '';
- $parser->{'Walker Data'}->{'code-html'} = '';
- # first, all the namespace prefixes in scope
- $parser->{'Walker Data'}->{'prefixes'} = {};
- $parser->{'Walker Data'}->{'prefixesUsed'} = {};
- foreach my $prefix ($parser->current_ns_prefixes) {
- if ($prefix ne '#default') {
- $parser->{'Walker Data'}->{'prefixes'}->{$prefix} = $parser->expand_ns_prefix($prefix);
- $parser->{'Walker Data'}->{'prefixesUsed'}->{$prefix} = 0;
- }
- }
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest'],
- [$NAMESPACE, 'code']])) { # child of code element
- $parser->xpcroak('restrict cannot be a child of code') if $qualifiedTagName eq "{$NAMESPACE}restrict";
- &processElement($parser, $tagName, 1, @attrs);
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest'],
- [$NAMESPACE, 'code']], 1) and
- ($qualifiedTagName eq "{$NAMESPACE}restrict")) { # <restrict>, descendant of code element (must not be child)
- if (defined($parser->{'Walker Data'}->{'restrict'})) {
- $parser->xpcroak('<restrict> may not be nested');
- }
- if (defined($qualifiedAttrs{'for'})) {
- $parser->{'Walker Data'}->{'restrict'} = $qualifiedAttrs{'for'};
- } else {
- $parser->xpcroak('required attribute \'for\' missing');
- }
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest'],
- [$NAMESPACE, 'code']], 1)) { # descendant of code element
- &processElement($parser, $tagName, 0, @attrs);
- } else {
- $parser->xpcroak("unexpected element $tagName in namespace ".$parser->namespace($tagName));
- }
-}
-
-sub CdataStart {
- my $parser = shift;
- if (&utils::helpers::matchContext($parser, [
- [$NAMESPACE, 'csstest'], [$NAMESPACE, 'code']], 1)) {
- $parser->{'Walker Data'}->{'code-xml'} .= '<![CDATA[' if applicable($parser, 'xml');
- $parser->{'Walker Data'}->{'code-xhtml'} .= '<![CDATA[' if applicable($parser, 'xhtml');
- # $parser->{'Walker Data'}->{'code-html'} .= '' if applicable($parser, 'html'); # HTML has no CDATA blocks
- $parser->{'Walker Data'}->{'cdata'} = 1;
- } else {
- # not technically invalid...
- }
-}
-
-sub CdataEnd {
- my $parser = shift;
- if (&utils::helpers::matchContext($parser, [
- [$NAMESPACE, 'csstest'], [$NAMESPACE, 'code']], 1)) {
- $parser->{'Walker Data'}->{'code-xml'} .= ']]>' if applicable($parser, 'xml');
- $parser->{'Walker Data'}->{'code-xhtml'} .= ']]>' if applicable($parser, 'xhtml');
- # $parser->{'Walker Data'}->{'code-html'} .= '' if applicable($parser, 'html'); # HTML has no CDATA blocks
- $parser->{'Walker Data'}->{'cdata'} = 0;
- } else {
- # not technically invalid...
- }
-}
-
-sub Comment {
- my $parser = shift;
- my($comment) = @_;
- if (&utils::helpers::matchContext($parser, [
- [$NAMESPACE, 'csstest'], [$NAMESPACE, 'code']], 1)) {
- $parser->{'Walker Data'}->{'code-xml'} .= "<!--$comment-->" if applicable($parser, 'xml');
- $parser->{'Walker Data'}->{'code-xhtml'} .= "<!--$comment-->" if applicable($parser, 'xhtml');
- $parser->{'Walker Data'}->{'code-html'} .= "<!--$comment-->" if applicable($parser, 'html');
- } else {
- # not technically invalid...
- }
-}
-
-sub Proc {
- my $parser = shift;
- my($target, $data) = @_;
- if (&utils::helpers::matchContext($parser, [
- [$NAMESPACE, 'csstest'], [$NAMESPACE, 'code']], 1)) {
- $parser->{'Walker Data'}->{'code-xml'} .= "<?$target $data?>" if applicable($parser, 'xml');
- $parser->{'Walker Data'}->{'code-xhtml'} .= "<?$target $data?>" if applicable($parser, 'xhtml');
- $parser->{'Walker Data'}->{'code-html'} .= "<?$target $data>" if applicable($parser, 'html');
- } else {
- # not technically invalid...
- }
-}
-
-# This is called for each line of a string of text (as well as the contents of any CDATA blocks, etc)
-sub Char {
- my $parser = shift;
- my($text) = @_;
- if (&utils::helpers::matchContext($parser, [
- [$NAMESPACE, 'csstest'], [$NAMESPACE, 'author']])) {
- $parser->{'Walker Data'}->{'author'}->[$#{$parser->{'Walker Data'}->{'author'}}] .= $text;
- } elsif (&utils::helpers::matchContext($parser, [
- [$NAMESPACE, 'csstest'], [$NAMESPACE, 'cssrules']])) {
- $parser->{'Walker Data'}->{'cssrules'} .= $text;
- } elsif (&utils::helpers::matchContext($parser, [
- [$NAMESPACE, 'csstest']]) and ($text =~ /^\s+$/os)) {
- # ok
- } elsif (&utils::helpers::matchContext($parser, [
- [$NAMESPACE, 'csstest'], [$NAMESPACE, 'code']], 1)) {
- if (not $parser->{'Walker Data'}->{'cdata'}) {
- $text = &utils::helpers::escape($text);
- }
- $parser->{'Walker Data'}->{'code-xml'} .= $text if applicable($parser, 'xml');
- $parser->{'Walker Data'}->{'code-xhtml'} .= $text if applicable($parser, 'xhtml');
- $parser->{'Walker Data'}->{'code-html'} .= $text if applicable($parser, 'html');
- } else {
- $parser->xpcroak("found unexpected text");
- }
-}
-
-sub End {
- my $parser = shift;
- my($tagName) = @_;
- if (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest'],
- [$NAMESPACE, 'code']], 1) and
- (($tagName eq 'restrict') and ($parser->namespace($tagName) eq $NAMESPACE))) { # <restrict>, descendant of code element
- delete($parser->{'Walker Data'}->{'restrict'});
- } elsif (&utils::helpers::matchContext($parser, [[$NAMESPACE, 'csstest'],
- [$NAMESPACE, 'code']], 1)) {
- if ($parser->recognized_string ne '') {
- $parser->{'Walker Data'}->{'endTag'} = $parser->recognized_string;
- } else {
- # This was an empty tag with the short form <foo/>. This
- # guarentees that the element can have no children, so we
- # don't need to ensure the endTag bit is propagated
- # correctly across children.
- }
- # XML output
- $parser->{'Walker Data'}->{'code-xml'} .= $parser->{'Walker Data'}->{'endTag'} if applicable($parser, 'xml');
- # XHTML output
- $parser->{'Walker Data'}->{'code-xhtml'} .= $parser->{'Walker Data'}->{'endTag'} if applicable($parser, 'xhtml');
- # HTML output
- if (($parser->{'Walker Data'}->{'endTag'} ne '</input>') and
- ($parser->{'Walker Data'}->{'endTag'} ne '</br>')) {
- $parser->{'Walker Data'}->{'code-html'} .= $parser->{'Walker Data'}->{'endTag'} if applicable($parser, 'html');
- } # else HTML doesn't allow end tags for those
- } else {
- # ok
- }
-}
-
-sub Final {
- my $parser = shift;
- my $data = $parser->{'Walker Data'};
- $data->{'escapedcode-xml'} = &utils::helpers::escape($data->{'code-xml'});
- $data->{'escapedcode-xhtml'} = &utils::helpers::escape($data->{'code-xhtml'});
- $data->{'escapedcode-html'} = &utils::helpers::escape($data->{'code-html'});
- $data->{'escapedcode-css'} = &utils::helpers::escape($data->{'cssrules'});
- $data->{'namespaces'} = '';
- foreach my $prefix (keys %{$data->{'prefixes'}}) {
- if ($data->{'prefixesUsed'}->{$prefix}) {
- $data->{'namespaces'} .= " xmlns:${prefix}=\"$data->{'prefixes'}->{$prefix}\"";
- }
- }
- delete($parser->{'Walker Data'});
- return $data;
-}
-
-sub processElement {
- my $parser = shift;
- my($tagName, $child, @attrs) = @_;
- # $child is true if the element should declare its own default namespace if needed
- # (i.e. if element is a direct child of the <code> element)
- my @prefixes = $parser->current_ns_prefixes;
- # get the element stuff
- my $prefix = '';
- if ($parser->recognized_string =~ m/<([^\s:]+):/o) {
- $prefix = $1;
- }
- $parser->{'Walker Data'}->{'prefixesUsed'}->{$prefix} += 1 if exists $parser->{'Walker Data'}->{'prefixesUsed'}->{$prefix};
- my $default = $parser->expand_ns_prefix('#default');
- my $defaultXML = '';
- my $defaultXHTML = '';
- if ($child) {
- if (defined($default)) {
- if ($default ne 'http://www.w3.org/1999/xhtml') {
- $defaultXHTML = ' xmlns="'.&utils::helpers::escape($default).'"';
- }
- $defaultXML = ' xmlns="'.&utils::helpers::escape($default).'"';
- } else {
- $defaultXHTML = ' xmlns=""';
- }
- } # else handled as part of the new_ns_prefix fixup
- my $newNamespaces = '';
- my $newNamespacePrefixes = {};
- foreach my $newPrefix ($parser->new_ns_prefixes) {
- my $namespace = $parser->expand_ns_prefix($newPrefix);
- if (not defined($namespace)) {
- $namespace = '';
- }
- if ($newPrefix ne '#default') {
- $newNamespaces .= " xmlns:$newPrefix=\"".&utils::helpers::escape($namespace).'"';
- $newNamespacePrefixes->{$newPrefix} = $namespace;
- } elsif (not $child) {
- $newNamespaces .= ' xmlns="'.&utils::helpers::escape($namespace).'"';
- }
- }
- my %prefixLookup = map { if ($_ ne '#default') { $parser->expand_ns_prefix($_) => $_ } else { (); } } @prefixes;
- my $attributes = '';
- my $isName = 1;
- foreach my $attribute (@attrs) {
- if ($isName) {
- # we currently lose the actual prefix used and look it back up... this can be wrong if
- # there are multiple prefixes defined for the same namespace.
- my $attrNamespace;
- if ($attribute =~ s/^\|//o) {
- # this handles a bug in XML::Parser::Expat with attributes of the form:
- # <element xmlns="" xmlns:none="" none:this="will be called '|this' and not 'this' in $attribute" />
- # XXX actually the bug is that that doesn't throw a well-formedness exception XXX
- $attrNamespace = '';
- } else {
- $attrNamespace = $parser->namespace($attribute);
- }
- my $attrPrefix;
- if (defined($attrNamespace)) {
- $parser->{'Walker Data'}->{'namespaced'} = 1;
- $parser->{'Walker Data'}->{'only-xml'} = 1 if applicable($parser, 'html');
- if ($attrNamespace eq 'http://www.w3.org/XML/1998/namespace') {
- $attrPrefix = 'xml';
- } else {
- $attrPrefix = $prefixLookup{$attrNamespace};
- $parser->{'Walker Data'}->{'prefixesUsed'}->{$attrPrefix} += 1 if exists $parser->{'Walker Data'}->{'prefixesUsed'}->{$attrPrefix};
- }
- $attrPrefix .= ':';
- } else {
- $attrPrefix = '';
- }
- $attributes .= " $attrPrefix$attribute=\"";
- } else {
- $attributes .= &utils::helpers::escape($attribute).'"';
- }
- $isName = not($isName);
- }
- $prefix .= ':' if $prefix ne '';
- # XML output:
- $parser->{'Walker Data'}->{'code-xml'} .= "<$prefix$tagName$defaultXML$newNamespaces$attributes>" if applicable($parser, 'xml');
- # XHTML output
- $parser->{'Walker Data'}->{'code-xhtml'} .= "<$prefix$tagName$defaultXHTML$newNamespaces$attributes>" if applicable($parser, 'xhtml');
- # HTML output is same as XHTML output except for namespaces - flag if there are any
- $parser->{'Walker Data'}->{'code-html'} .= "<$tagName$attributes>" if applicable($parser, 'html');
-
- if ($prefix ne '' or $defaultXHTML ne '' or $newNamespaces ne '') {
- $parser->{'Walker Data'}->{'namespaced'} = 1;
- $parser->{'Walker Data'}->{'only-xml'} = 1 if applicable($parser, 'html');
- }
- $parser->{'Walker Data'}->{'endTag'} = "</$prefix$tagName>"; # used to regenerate the end tag if required (i.e. if this was originally an empty start tag)
-}
-
-sub applicable {
- my($parser, $for) = @_;
- return ((not defined($parser->{'Walker Data'}->{'restrict'})) or
- ($parser->{'Walker Data'}->{'restrict'} =~ m/\b # word boundary
- \Q$for\E # quote $for string (so that $for is not treated as regexp)
- \b # word boundary
- /x));
-}
diff --git a/tests/wpt/web-platform-tests/css/selectors/webkit-pseudo-element.html b/tests/wpt/web-platform-tests/css/selectors/webkit-pseudo-element.html
new file mode 100644
index 00000000000..8b4adddba8f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/webkit-pseudo-element.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<title>WebKit-prefixed pseudo-elements</title>
+<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/selectors-4/#compat">
+<meta name="assert" content="WebKit-prefixed pseudo-elements should always be valid">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style id="style">
+#test {
+ color: rgb(255, 0, 0);
+}
+span::-webkit-something-invalid, #test, ::-WeBkIt-sOmEtHiNg-NoNeXiSt123 {
+ color: rgb(0, 255, 0);
+}
+::-webkitfoo, #test {
+ color: rgb(255, 0, 0);
+}
+</style>
+<body>
+<div id="test"></div>
+<script>
+ test(() => {
+ let elem = document.getElementById("test");
+ assert_equals(getComputedStyle(elem).color, "rgb(0, 255, 0)");
+ }, "rules include webkit-prefixed pseudo-element should be cascaded");
+
+ test(() => {
+ let sheet = document.getElementById("style").sheet;
+ assert_equals(sheet.cssRules[1].selectorText,
+ "span::-webkit-something-invalid, " +
+ "#test, ::-webkit-something-nonexist123");
+ }, "webkit-prefixed pseudo-element selectors should be accessible from CSSOM");
+
+ test(() => {
+ document.querySelector("span::-webkit-something-invalid");
+ document.querySelectorAll("span::-webkit-something-invalid");
+ }, "qS and qSA shouldn't throw exception");
+
+ test(() => {
+ let sheet = document.getElementById("style").sheet;
+ assert_equals(sheet.cssRules.length, 2);
+ assert_throws("SyntaxError", () => document.querySelector("span::-webkitfoo"));
+ assert_throws("SyntaxError", () => document.querySelectorAll("span::-webkitfoo"));
+ }, "webkit-prefix without dash is invalid");
+</script>
+</body>
diff --git a/tests/wpt/web-platform-tests/css/selectors/x-pseudo-element.html b/tests/wpt/web-platform-tests/css/selectors/x-pseudo-element.html
new file mode 100644
index 00000000000..80ec44f9def
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/selectors/x-pseudo-element.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<title>CSS Test: 'x-' prefixed pseudo-elements don't parse correctly</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/selectors-4/">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+ p {
+ color: green;
+ }
+ ::x-something-nobody-would-think-of, p {
+ color: red;
+ }
+</style>
+<p>Should be green
+<script>
+ test(function() {
+ let p = document.querySelector('p');
+ assert_equals(getComputedStyle(p).color, "rgb(0, 128, 0)");
+ }, "x-prefixed pseudo-elements should make the whole rule invalid")
+</script>
diff --git a/tests/wpt/web-platform-tests/css/selectors/xhtml-full.css b/tests/wpt/web-platform-tests/css/selectors/xhtml-full.css
deleted file mode 100644
index 6d965486792..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/xhtml-full.css
+++ /dev/null
@@ -1,65 +0,0 @@
-@namespace url(http://www.w3.org/1999/xhtml);
-
-pre.rules {
- border : 1px solid black ;
- padding : 5px
-}
-
-.WARNING {
- background-color: black;
- color: white;
- font-weight: bold;
- margin-top: 1em;
-}
-
-div.testText {
- background: white;
- color: black;
-}
-
-div.testSource {
- border: thin black solid;
- padding-left: 1em;
- padding-right: 1em;
-}
-
-div.testDescription {
- border: thin black solid;
- background-color: red;
-}
-
-.testDescription {
- margin-top: 1em;
- width: 100%;
- border: thin solid black;
- margin-bottom: 1em;
-}
-
-.testDescription th,
-.testDescription td {
- text-align: center;
-}
-
-.testDescription th {
- background-color: silver;
-}
-
-.testDescription .a {
- width: 25%;
-}
-
-.testDescription .b {
- width: 50%;
-}
-
-.testDescription .c {
- width: 100%;
-}
-
-div.validator {
- margin-top: 1em;
-}
-
-div.validator img {
- border-width : 0;
-}
diff --git a/tests/wpt/web-platform-tests/css/selectors/xhtml-shell.css b/tests/wpt/web-platform-tests/css/selectors/xhtml-shell.css
deleted file mode 100644
index 957da843bb8..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/xhtml-shell.css
+++ /dev/null
@@ -1,74 +0,0 @@
-@namespace url(http://www.w3.org/1999/xhtml);
-
-pre.rules {
- border : 1px solid black ;
- padding : 5px
-}
-
-.WARNING {
- background-color: black;
- color: white;
- font-weight: bold;
- margin-top: 1em;
-}
-
-div.testSource {
- border: thin black solid;
- padding-left: 1em;
- padding-right: 1em;
-}
-
-div.testDescription {
- border: thin black solid;
- background-color: red;
-}
-
-.testDescription {
- margin-top: 1em;
- width: 100%;
- border: thin solid black;
- margin-bottom: 1em;
-}
-
-.testDescription th,
-.testDescription td {
- text-align: center;
-}
-
-.testDescription th {
- background-color: silver;
-}
-
-.testDescription .a {
- width: 25%;
-}
-
-.testDescription .b {
- width: 50%;
-}
-
-.testDescription .c {
- width: 100%;
-}
-
-div.validator {
- margin-top: 1em;
-}
-
-div.validator img {
- border-width : 0;
-}
-
-iframe, object {
- display: block;
- position: fixed;
- top: static-position;
- left: 1em;
- right: 1em;
- bottom: 1em;
- margin: 0;
- width: auto;
- height: auto;
- padding: 0;
- border: thin black solid;
-}
diff --git a/tests/wpt/web-platform-tests/css/selectors/xml-full.css b/tests/wpt/web-platform-tests/css/selectors/xml-full.css
deleted file mode 100644
index b4176074f4b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/xml-full.css
+++ /dev/null
@@ -1,15 +0,0 @@
-test { display: block; background: white; color: black; }
- title { display: block; border-bottom: solid; margin: 0 0 0.5em 0; padding: 0.5em 1em 0 1em; font-size: 1.5em; }
- author { display: none; }
- metadata { display: table; border-spacing: 1em 0.4em; }
- item { display: table-row; }
- name { display: table-cell; }
- data { display: table-cell; }
- data:link { color: blue; text-decoration: underline; }
- data:visited { color: navy; text-decoration: underline; }
- requirement { display: block; margin: 1em; background: black; color: white; }
- content { display: block; border: solid; margin: 1em; padding: 1em; }
- source { display: block; font-family: monospace; }
- css { display: block; white-space: pre; border: solid; margin: 1em; padding: 1em; }
- xml { display: block; white-space: pre; border: solid; margin: 1em; padding: 1em; }
-
diff --git a/tests/wpt/web-platform-tests/css/selectors/xml-shell.css b/tests/wpt/web-platform-tests/css/selectors/xml-shell.css
deleted file mode 100644
index b4176074f4b..00000000000
--- a/tests/wpt/web-platform-tests/css/selectors/xml-shell.css
+++ /dev/null
@@ -1,15 +0,0 @@
-test { display: block; background: white; color: black; }
- title { display: block; border-bottom: solid; margin: 0 0 0.5em 0; padding: 0.5em 1em 0 1em; font-size: 1.5em; }
- author { display: none; }
- metadata { display: table; border-spacing: 1em 0.4em; }
- item { display: table-row; }
- name { display: table-cell; }
- data { display: table-cell; }
- data:link { color: blue; text-decoration: underline; }
- data:visited { color: navy; text-decoration: underline; }
- requirement { display: block; margin: 1em; background: black; color: white; }
- content { display: block; border: solid; margin: 1em; padding: 1em; }
- source { display: block; font-family: monospace; }
- css { display: block; white-space: pre; border: solid; margin: 1em; padding: 1em; }
- xml { display: block; white-space: pre; border: solid; margin: 1em; padding: 1em; }
-
diff --git a/tests/wpt/web-platform-tests/css/compositing/parsing/support/parsing-testcommon.js b/tests/wpt/web-platform-tests/css/support/parsing-testcommon.js
index b075882f89a..b075882f89a 100644
--- a/tests/wpt/web-platform-tests/css/compositing/parsing/support/parsing-testcommon.js
+++ b/tests/wpt/web-platform-tests/css/support/parsing-testcommon.js
diff --git a/tests/wpt/web-platform-tests/docs/_writing-tests/h2tests.md b/tests/wpt/web-platform-tests/docs/_writing-tests/h2tests.md
new file mode 100644
index 00000000000..0d19f7de19c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/docs/_writing-tests/h2tests.md
@@ -0,0 +1,155 @@
+# Writing H2 Tests
+> <b>Important:</b> The HTTP/2.0 server requires you to have Python 2.7.10+
+and OpenSSL 1.0.2+. This is because HTTP/2.0 is negotiated using the
+[TLS ALPN](https://tools.ietf.org/html/rfc7301) extension, which is only supported in [OpenSSL 1.0.2](https://www.openssl.org/news/openssl-1.0.2-notes.html) and up.
+
+These instructions assume you are already familiar with the testing
+infrastructure and know how to write a standard HTTP/1.1 test.
+
+On top of the standard `main` handler that the H1 server offers, the
+H2 server also offers support for specific frame handlers in the Python
+scripts. Currently there is support for for `handle_headers` and `handle_data`.
+Unlike the `main` handler, these are run whenever the server receives a
+HEADERS frame (RequestReceived event) or a DATA frame (DataReceived event).
+`main` can still be used, but it will be run after the server has received
+the request in its entirety.
+
+Here is what a Python script for a test might look like:
+```python
+def handle_headers(frame, request, response):
+ if request.headers["test"] == "pass":
+ response.status = 200
+ response.headers.update([('test', 'passed')])
+ response.write_status_headers()
+ else:
+ response.status = 403
+ response.headers.update([('test', 'failed')])
+ response.write_status_headers()
+ response.writer.end_stream()
+
+def handle_data(frame, request, response):
+ response.writer.write_data(frame.data[::-1])
+
+def main(request, response):
+ response.writer.write_data('\nEnd of File', last=True)
+```
+
+The above script is fairly simple:
+1. Upon receiving the HEADERS frame, `handle_headers` is run.
+ - This checks for a header called 'test' and checks if it is set to 'pass'.
+ If true, it will immediately send a response header, otherwise it responds
+ with a 403 and ends the stream.
+2. Any DATA frames received will then be handled by `handle_data`. This will
+simply reverse the data and send it back.
+3. Once the request has been fully received, `main` is run which will send
+one last DATA frame and signal its the end of the stream.
+
+## Response Writer API ##
+
+The H2Response API is pretty much the same as the H1 variant, the main API
+difference lies in the H2ResponseWriter which is accessed through `response.writer`
+
+---
+
+#### `write_headers(self, headers, status_code, status_message=None, stream_id=None, last=False):`
+Write a HEADER frame using the H2 Connection object, will only work if the
+stream is in a state to send HEADER frames. This will automatically format
+the headers so that pseudo headers are at the start of the list and correctly
+prefixed with ':'. Since this using the H2 Connection object, it requires that
+the stream is in the correct state to be sending this frame.
+
+> <b>Note</b>: Will raise ProtocolErrors if pseudo headers are missing.
+
+- <b>Parameters</b>
+
+ - <b>headers</b>: List of (header, value) tuples
+ - <b>status_code</b>: The HTTP status code of the response
+ - <b>stream_id</b>: Id of stream to send frame on. Will use the request stream ID if None
+ - <b>last</b>: Flag to signal if this is the last frame in stream.
+
+---
+
+#### `write_data(self, item, last=False, stream_id=None):`
+Write a DATA frame using the H2 Connection object, will only work if the
+stream is in a state to send DATA frames. Uses flow control to split data
+into multiple data frames if it exceeds the size that can be in a single frame.
+Since this using the H2 Connection object, it requires that the stream is in
+the correct state to be sending this frame.
+
+- <b>Parameters</b>
+
+ - <b>item</b>: The content of the DATA frame
+ - <b>last</b>: Flag to signal if this is the last frame in stream.
+ - <b>stream_id</b>: Id of stream to send frame on. Will use the request stream ID if None
+
+---
+
+#### `write_push(self, promise_headers, push_stream_id=None, status=None, response_headers=None, response_data=None):`
+This will write a push promise to the request stream. If you do not provide
+headers and data for the response, then no response will be pushed, and you
+should send them yourself using the ID returned from this function.
+
+- <b>Parameters</b>
+ - <b>promise_headers</b>: A list of header tuples that matches what the client would use to
+ request the pushed response
+ - <b>push_stream_id</b>: The ID of the stream the response should be pushed to. If none given, will
+ use the next available id.
+ - <b>status</b>: The status code of the response, REQUIRED if response_headers given
+ - <b>response_headers</b>: The headers of the response
+ - <b>response_data</b>: The response data.
+
+- <b>Returns</b>: The ID of the push stream
+
+---
+
+#### `write_raw_header_frame(self, headers, stream_id=None, end_stream=False, end_headers=False, frame_cls=HeadersFrame):`
+Unlike `write_headers`, this does not check to see if a stream is in the
+correct state to have HEADER frames sent through to it. It also won't force
+the order of the headers or make sure pseudo headers are prefixed with ':'.
+It will build a HEADER frame and send it without using the H2 Connection
+object other than to HPACK encode the headers.
+
+> <b>Note</b>: The `frame_cls` parameter is so that this class can be reused
+by `write_raw_continuation_frame`, as their construction is identical.
+
+- <b>Parameters</b>
+ - <b>headers</b>: List of (header, value) tuples
+ - <b>stream_id</b>: Id of stream to send frame on. Will use the request stream ID if None
+ - <b>end_stream</b>: Set to `True` to add END_STREAM flag to frame
+ - <b>end_headers</b>: Set to `True` to add END_HEADERS flag to frame
+
+---
+
+#### `write_raw_data_frame(self, data, stream_id=None, end_stream=False):`
+Unlike `write_data`, this does not check to see if a stream is in the correct
+state to have DATA frames sent through to it. It will build a DATA frame and
+send it without using the H2 Connection object. It will not perform any flow control checks.
+
+- <b>Parameters</b>
+ - <b>data</b>: The data to be sent in the frame
+ - <b>stream_id</b>: Id of stream to send frame on. Will use the request stream ID if None
+ - <b>end_stream</b>: Set to True to add END_STREAM flag to frame
+
+---
+
+#### `write_raw_continuation_frame(self, headers, stream_id=None, end_headers=False):`
+This provides the ability to create and write a CONTINUATION frame to the
+stream, which is not exposed by `write_headers` as the h2 library handles
+the split between HEADER and CONTINUATION internally. Will perform HPACK
+encoding on the headers. It also ignores the state of the stream.
+
+This calls `write_raw_data_frame` with `frame_cls=ContinuationFrame` since
+the HEADER and CONTINUATION frames are constructed in the same way.
+
+- <b>Parameters</b>:
+ - <b>headers</b>: List of (header, value) tuples
+ - <b>stream_id</b>: Id of stream to send frame on. Will use the request stream ID if None
+ - <b>end_headers</b>: Set to True to add END_HEADERS flag to frame
+
+---
+
+#### `end_stream(self, stream_id=None):`
+Ends the stream with the given ID, or the one that request was made on if no ID given.
+
+- <b>Parameters</b>
+ - <b>stream_id</b>: Id of stream to send frame on. Will use the request stream ID if None \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/docs/_writing-tests/server-features.md b/tests/wpt/web-platform-tests/docs/_writing-tests/server-features.md
index a3cd4174d27..8798c2e6bdd 100644
--- a/tests/wpt/web-platform-tests/docs/_writing-tests/server-features.md
+++ b/tests/wpt/web-platform-tests/docs/_writing-tests/server-features.md
@@ -94,4 +94,17 @@ of the response. For details see the
[wptserve documentation](https://wptserve.readthedocs.org).
+### Writing tests for HTTP/2.0
+
+The server now has a prototype HTTP/2.0 server which gives you access to
+some of the HTTP/2.0 specific functionality. Currently, the server is off
+by default and needs to be run using `./wpt serve --h2` in order to enable it.
+The HTTP/2.0 server supports handlers that work per-frame; these, along with the
+API are documented in [Writing H2 Tests][h2tests]
+
+> <b>Important:</b> The HTTP/2.0 server requires you to have Python 2.7.10+
+and OpenSSL 1.0.2+. This is because HTTP/2.0 is negotiated using the
+[TLS ALPN](https://tools.ietf.org/html/rfc7301) extension, which is only supported in [OpenSSL 1.0.2](https://www.openssl.org/news/openssl-1.0.2-notes.html) and up.
+
[file names]: {{ site.baseurl }}{% link _writing-tests/file-names.md %}
+[h2tests]: {{ site.baseurl }}{% link _writing-tests/h2tests.md %}
diff --git a/tests/wpt/web-platform-tests/docs/_writing-tests/testdriver.md b/tests/wpt/web-platform-tests/docs/_writing-tests/testdriver.md
index a934e3278f1..eb9b9fb0413 100644
--- a/tests/wpt/web-platform-tests/docs/_writing-tests/testdriver.md
+++ b/tests/wpt/web-platform-tests/docs/_writing-tests/testdriver.md
@@ -18,9 +18,11 @@ the global scope.
NB: presently, testdriver.js only works in the top-level test browsing
context (and not therefore in any frame or window opened from it).
-### `test_driver.bless(intent, action)`
-#### `intent: a string describing the motivation for this invocation`
-#### `action: an optional function`
+### bless
+
+Usage: `test_driver.bless(intent, action)`
+ * `intent`: a string describing the motivation for this invocation
+ * `action`: an optional function
This function simulates [activation][activation], allowing tests to
perform privileged operations that require user interaction. For
@@ -44,8 +46,10 @@ test_driver.bless('initiate media playback', function () {
});
```
-### `test_driver.click(element)`
-#### `element: a DOM Element object`
+### click
+
+Usage: `test_driver.click(element)`
+ * `element`: a DOM Element object
This function causes a click to occur on the target element (an
`Element` object), potentially scrolling the document to make it
@@ -57,9 +61,11 @@ Note that if the element to be clicked does not have a unique ID, the
document must not have any DOM mutations made between the function
being called and the promise settling.
-### `test_driver.send_keys(element, keys)`
-#### `element: a DOM Element object`
-#### `keys: string to send to the element`
+### send_keys
+
+Usage: `test_driver.send_keys(element, keys)`
+ * `element`: a DOM Element object
+ * `keys`: string to send to the element
This function causes the string `keys` to be send to the target
element (an `Element` object), potentially scrolling the document to
diff --git a/tests/wpt/web-platform-tests/docs/_writing-tests/testharness-api.md b/tests/wpt/web-platform-tests/docs/_writing-tests/testharness-api.md
index bb552453291..952c8365fb7 100644
--- a/tests/wpt/web-platform-tests/docs/_writing-tests/testharness-api.md
+++ b/tests/wpt/web-platform-tests/docs/_writing-tests/testharness-api.md
@@ -161,9 +161,9 @@ Test is finished.
promise_test(test_function, name, properties)
```
-`test_function` is a function that receives a test as an argument and returns a
-promise. The test completes when the returned promise resolves. The test fails
-if the returned promise rejects.
+`test_function` is a function that receives a test as an argument. It must
+return a promise. The test completes when the returned promise resolves. The
+test fails if the returned promise rejects.
E.g.:
diff --git a/tests/wpt/web-platform-tests/docs/_writing-tests/testharness.md b/tests/wpt/web-platform-tests/docs/_writing-tests/testharness.md
index e91302f1d21..9c21452607e 100644
--- a/tests/wpt/web-platform-tests/docs/_writing-tests/testharness.md
+++ b/tests/wpt/web-platform-tests/docs/_writing-tests/testharness.md
@@ -24,7 +24,7 @@ with testharness.js. See also the [general guidelines][] for all test types.
A test file can have multiple variants by including `meta` elements,
for example:
-```
+```html
<meta name="variant" content="">
<meta name="variant" content="?wss">
```
@@ -36,7 +36,7 @@ There are two utility scripts in that work well together with variants,
a test that would otherwise have too many tests to be useful can be
split up in ranges of subtests. For example:
-```
+```html
<!doctype html>
<title>Testing variants</title>
<meta name="variant" content="?1-1000">
@@ -60,7 +60,7 @@ With `subsetTestByKey`, the key is given as the first argument, and the
query string can include or exclude a key (will be matched as a regular
expression).
-```
+```html
<!doctype html>
<title>Testing variants by key</title>
<meta name="variant" content="?include=Foo">
@@ -103,13 +103,15 @@ JavaScript file with the `.js` removed.
For example, one could write a test for the `FileReaderSync` API by
creating a `FileAPI/FileReaderSync.worker.js` as follows:
- importScripts("/resources/testharness.js");
- test(function () {
- var blob = new Blob(["Hello"]);
- var fr = new FileReaderSync();
- assert_equals(fr.readAsText(blob), "Hello");
- }, "FileReaderSync#readAsText.");
- done();
+```js
+importScripts("/resources/testharness.js");
+test(function () {
+ var blob = new Blob(["Hello"]);
+ var fr = new FileReaderSync();
+ assert_equals(fr.readAsText(blob), "Hello");
+}, "FileReaderSync#readAsText.");
+done();
+```
This test could then be run from `FileAPI/FileReaderSync.worker.html`.
@@ -124,29 +126,33 @@ By default, the test runs in a window scope and a dedicated worker scope.
For example, one could write a test for the `Blob` constructor by
creating a `FileAPI/Blob-constructor.any.js` as follows:
- test(function () {
- var blob = new Blob();
- assert_equals(blob.size, 0);
- assert_equals(blob.type, "");
- assert_false(blob.isClosed);
- }, "The Blob constructor.");
+```js
+test(function () {
+ var blob = new Blob();
+ assert_equals(blob.size, 0);
+ assert_equals(blob.type, "");
+ assert_false(blob.isClosed);
+}, "The Blob constructor.");
+```
This test could then be run from `FileAPI/Blob-constructor.any.worker.html` as well
as `FileAPI/Blob-constructor.any.html`.
It is possible to customize the set of scopes with a metadata comment, such as
- // META: global=sharedworker
- // ==> would run in the default window and dedicated worker scopes,
- // as well as the shared worker scope
- // META: global=!default,serviceworker
- // ==> would only run in the service worker scope
- // META: global=!window
- // ==> would run in the default dedicated worker scope, but not the
- // window scope
- // META: global=worker
- // ==> would run in the default window scope, as well as in the
- // dedicated, shared and service worker scopes
+```
+// META: global=sharedworker
+// ==> would run in the default window and dedicated worker scopes,
+// as well as the shared worker scope
+// META: global=!default,serviceworker
+// ==> would only run in the service worker scope
+// META: global=!window
+// ==> would run in the default dedicated worker scope, but not the
+// window scope
+// META: global=worker
+// ==> would run in the default window scope, as well as in the
+// dedicated, shared and service worker scopes
+```
For a test file <code><var>x</var>.any.js</code>, the available scope keywords
are:
@@ -172,8 +178,10 @@ Use `// META: title=This is the title of the test` at the beginning of the resou
Use `// META: script=link/to/resource.js` at the beginning of the resource. For example,
- // META: script=/common/utils.js
- // META: script=resources/utils.js
+```
+// META: script=/common/utils.js
+// META: script=resources/utils.js
+```
can be used to include both the global and a local `utils.js` in a test.
@@ -185,8 +193,10 @@ Use `// META: timeout=long` at the beginning of the resource.
Use `// META: variant=url-suffix` at the beginning of the resource. For example,
- // META: variant=
- // META: variant=?wss
+```
+// META: variant=
+// META: variant=?wss
+```
[general guidelines]: {{ site.baseurl }}{% link _writing-tests/general-guidelines.md %}
diff --git a/tests/wpt/web-platform-tests/dom/nodes/selectors.js b/tests/wpt/web-platform-tests/dom/nodes/selectors.js
index 587779b7da0..c4e87330b44 100644
--- a/tests/wpt/web-platform-tests/dom/nodes/selectors.js
+++ b/tests/wpt/web-platform-tests/dom/nodes/selectors.js
@@ -534,11 +534,13 @@ var scopedSelectors = [
{name: ":root pseudo-class selector, not matching document root element", selector: ":root", ctx: "#html", expect: [] /*no matches*/, exclude: ["fragment", "detached"], level: 3, testType: TEST_FIND},
// - :nth-child(n) (Level 3)
- {name: ":nth-child selector, matching the third child element", selector: ":nth-child(3)", ctx: "#pseudo-nth-table1", expect: ["pseudo-nth-td3", "pseudo-nth-td9", "pseudo-nth-tr3", "pseudo-nth-td15"], level: 3, testType: TEST_FIND | TEST_MATCH},
- {name: ":nth-child selector, matching every third child element", selector: "li:nth-child(3n)", ctx: "#pseudo-nth", expect: ["pseudo-nth-li3", "pseudo-nth-li6", "pseudo-nth-li9", "pseudo-nth-li12"], level: 3, testType: TEST_FIND | TEST_MATCH},
- {name: ":nth-child selector, matching every second child element, starting from the fourth", selector: "li:nth-child(2n+4)", ctx: "#pseudo-nth", expect: ["pseudo-nth-li4", "pseudo-nth-li6", "pseudo-nth-li8", "pseudo-nth-li10", "pseudo-nth-li12"], level: 3, testType: TEST_FIND | TEST_MATCH},
- {name: ":nth-child selector, matching every fourth child element, starting from the third", selector: ":nth-child(4n-1)", ctx: "#pseudo-nth-p1", expect: ["pseudo-nth-em2", "pseudo-nth-span3"], level: 3, testType: TEST_FIND | TEST_MATCH},
- {name: ":nth-child selector used twice, matching ", selector: ":nth-child(1) :nth-child(1)", ctx: "#pseudo-nth", expect: ["pseudo-nth-table1", "pseudo-nth-tr1"], level: 3, testType: TEST_FIND | TEST_MATCH},
+ {name: ":nth-child selector, matching the third child element", selector: ":nth-child(3)", ctx: "#pseudo-nth-table1", expect: ["pseudo-nth-td3", "pseudo-nth-td9", "pseudo-nth-tr3", "pseudo-nth-td15"], level: 3, testType: TEST_FIND | TEST_MATCH},
+ {name: ":nth-child selector, matching every third child element", selector: "li:nth-child(3n)", ctx: "#pseudo-nth", expect: ["pseudo-nth-li3", "pseudo-nth-li6", "pseudo-nth-li9", "pseudo-nth-li12"], level: 3, testType: TEST_FIND | TEST_MATCH},
+ {name: ":nth-child selector, matching every second child element, starting from the fourth", selector: "li:nth-child(2n+4)", ctx: "#pseudo-nth", expect: ["pseudo-nth-li4", "pseudo-nth-li6", "pseudo-nth-li8", "pseudo-nth-li10", "pseudo-nth-li12"], level: 3, testType: TEST_FIND | TEST_MATCH},
+ {name: ":nth-child selector, matching every second child element, starting from the fourth, with whitespace", selector: "li:nth-child(2n \t\r\n+ \t\r\n4)", ctx: "#pseudo-nth", expect: ["pseudo-nth-li4", "pseudo-nth-li6", "pseudo-nth-li8", "pseudo-nth-li10", "pseudo-nth-li12"], level: 3, testType: TEST_FIND | TEST_MATCH},
+ {name: ":nth-child selector, matching every fourth child element, starting from the third", selector: ":nth-child(4n-1)", ctx: "#pseudo-nth-p1", expect: ["pseudo-nth-em2", "pseudo-nth-span3"], level: 3, testType: TEST_FIND | TEST_MATCH},
+ {name: ":nth-child selector, matching every fourth child element, starting from the third, with whitespace", selector: ":nth-child(4n \t\r\n- \t\r\n1)", ctx: "#pseudo-nth-p1", expect: ["pseudo-nth-em2", "pseudo-nth-span3"], level: 3, testType: TEST_FIND | TEST_MATCH},
+ {name: ":nth-child selector used twice, matching ", selector: ":nth-child(1) :nth-child(1)", ctx: "#pseudo-nth", expect: ["pseudo-nth-table1", "pseudo-nth-tr1"], level: 3, testType: TEST_FIND | TEST_MATCH},
// - :nth-last-child (Level 3)
{name: ":nth-last-child selector, matching the third last child element", selector: ":nth-last-child(3)", ctx: "#pseudo-nth-table1", expect: ["pseudo-nth-tr1", "pseudo-nth-td4", "pseudo-nth-td10", "pseudo-nth-td16"], level: 3, testType: TEST_FIND | TEST_MATCH},
diff --git a/tests/wpt/web-platform-tests/editing/run/backcolor.html b/tests/wpt/web-platform-tests/editing/run/backcolor.html
index 3d337785efe..5911de309d0 100644
--- a/tests/wpt/web-platform-tests/editing/run/backcolor.html
+++ b/tests/wpt/web-platform-tests/editing/run/backcolor.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>backcolor - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/bold.html b/tests/wpt/web-platform-tests/editing/run/bold.html
index b439a11fdd8..390d6810d85 100644
--- a/tests/wpt/web-platform-tests/editing/run/bold.html
+++ b/tests/wpt/web-platform-tests/editing/run/bold.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-3000">
diff --git a/tests/wpt/web-platform-tests/editing/run/createlink.html b/tests/wpt/web-platform-tests/editing/run/createlink.html
index 98261697b35..b67357e684a 100644
--- a/tests/wpt/web-platform-tests/editing/run/createlink.html
+++ b/tests/wpt/web-platform-tests/editing/run/createlink.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>createlink - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/delete-list-items-in-table-cell.html b/tests/wpt/web-platform-tests/editing/run/delete-list-items-in-table-cell.html
index 409a844fc96..b765bc4b977 100644
--- a/tests/wpt/web-platform-tests/editing/run/delete-list-items-in-table-cell.html
+++ b/tests/wpt/web-platform-tests/editing/run/delete-list-items-in-table-cell.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>delete list items in table cells - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/delete.html b/tests/wpt/web-platform-tests/editing/run/delete.html
index 592c7bb9974..6d7a7c8f0c5 100644
--- a/tests/wpt/web-platform-tests/editing/run/delete.html
+++ b/tests/wpt/web-platform-tests/editing/run/delete.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-3000">
diff --git a/tests/wpt/web-platform-tests/editing/run/fontname.html b/tests/wpt/web-platform-tests/editing/run/fontname.html
index 491fbe55015..53800c540c4 100644
--- a/tests/wpt/web-platform-tests/editing/run/fontname.html
+++ b/tests/wpt/web-platform-tests/editing/run/fontname.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-last">
diff --git a/tests/wpt/web-platform-tests/editing/run/fontsize.html b/tests/wpt/web-platform-tests/editing/run/fontsize.html
index 35ef7015664..66ae99ebc10 100644
--- a/tests/wpt/web-platform-tests/editing/run/fontsize.html
+++ b/tests/wpt/web-platform-tests/editing/run/fontsize.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-last">
diff --git a/tests/wpt/web-platform-tests/editing/run/forecolor.html b/tests/wpt/web-platform-tests/editing/run/forecolor.html
index 4dd42bf6762..8594e061c14 100644
--- a/tests/wpt/web-platform-tests/editing/run/forecolor.html
+++ b/tests/wpt/web-platform-tests/editing/run/forecolor.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-last">
diff --git a/tests/wpt/web-platform-tests/editing/run/formatblock.html b/tests/wpt/web-platform-tests/editing/run/formatblock.html
index f117e77d7bf..5c97c08e732 100644
--- a/tests/wpt/web-platform-tests/editing/run/formatblock.html
+++ b/tests/wpt/web-platform-tests/editing/run/formatblock.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-3000">
diff --git a/tests/wpt/web-platform-tests/editing/run/forwarddelete.html b/tests/wpt/web-platform-tests/editing/run/forwarddelete.html
index 50850d13077..e17190053ac 100644
--- a/tests/wpt/web-platform-tests/editing/run/forwarddelete.html
+++ b/tests/wpt/web-platform-tests/editing/run/forwarddelete.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-3000">
diff --git a/tests/wpt/web-platform-tests/editing/run/hilitecolor.html b/tests/wpt/web-platform-tests/editing/run/hilitecolor.html
index e2de0d960ff..cd9e5528e56 100644
--- a/tests/wpt/web-platform-tests/editing/run/hilitecolor.html
+++ b/tests/wpt/web-platform-tests/editing/run/hilitecolor.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>hilitecolor - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/indent.html b/tests/wpt/web-platform-tests/editing/run/indent.html
index bf753e6efa2..13e98f5ea64 100644
--- a/tests/wpt/web-platform-tests/editing/run/indent.html
+++ b/tests/wpt/web-platform-tests/editing/run/indent.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>indent - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/insert-list-items-in-table-cell.html b/tests/wpt/web-platform-tests/editing/run/insert-list-items-in-table-cell.html
index 60b396dd347..8d08f8c3eb9 100644
--- a/tests/wpt/web-platform-tests/editing/run/insert-list-items-in-table-cell.html
+++ b/tests/wpt/web-platform-tests/editing/run/insert-list-items-in-table-cell.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>Insert list items in table cells - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/inserthorizontalrule.html b/tests/wpt/web-platform-tests/editing/run/inserthorizontalrule.html
index 5569e8f9a6b..6e3e5490a60 100644
--- a/tests/wpt/web-platform-tests/editing/run/inserthorizontalrule.html
+++ b/tests/wpt/web-platform-tests/editing/run/inserthorizontalrule.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>inserthorizontalrule - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/inserthtml.html b/tests/wpt/web-platform-tests/editing/run/inserthtml.html
index 59eaf4c59f1..f83102e6a9b 100644
--- a/tests/wpt/web-platform-tests/editing/run/inserthtml.html
+++ b/tests/wpt/web-platform-tests/editing/run/inserthtml.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>inserthtml - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/insertimage.html b/tests/wpt/web-platform-tests/editing/run/insertimage.html
index f34cad0d1f1..7a1f7b92266 100644
--- a/tests/wpt/web-platform-tests/editing/run/insertimage.html
+++ b/tests/wpt/web-platform-tests/editing/run/insertimage.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>insertimage - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/insertlinebreak.html b/tests/wpt/web-platform-tests/editing/run/insertlinebreak.html
index eb3df9dc523..ddab665084b 100644
--- a/tests/wpt/web-platform-tests/editing/run/insertlinebreak.html
+++ b/tests/wpt/web-platform-tests/editing/run/insertlinebreak.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>insertlinebreak - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/insertorderedlist.html b/tests/wpt/web-platform-tests/editing/run/insertorderedlist.html
index 53a9ababb23..68772355c24 100644
--- a/tests/wpt/web-platform-tests/editing/run/insertorderedlist.html
+++ b/tests/wpt/web-platform-tests/editing/run/insertorderedlist.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>insertorderedlist - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/insertparagraph.html b/tests/wpt/web-platform-tests/editing/run/insertparagraph.html
index 549878a08a5..173c5aea40b 100644
--- a/tests/wpt/web-platform-tests/editing/run/insertparagraph.html
+++ b/tests/wpt/web-platform-tests/editing/run/insertparagraph.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-3000">
diff --git a/tests/wpt/web-platform-tests/editing/run/inserttext.html b/tests/wpt/web-platform-tests/editing/run/inserttext.html
index 1a13919124e..a01293fcae0 100644
--- a/tests/wpt/web-platform-tests/editing/run/inserttext.html
+++ b/tests/wpt/web-platform-tests/editing/run/inserttext.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-last">
diff --git a/tests/wpt/web-platform-tests/editing/run/insertunorderedlist.html b/tests/wpt/web-platform-tests/editing/run/insertunorderedlist.html
index 24e4d00e3fb..b1f636b1095 100644
--- a/tests/wpt/web-platform-tests/editing/run/insertunorderedlist.html
+++ b/tests/wpt/web-platform-tests/editing/run/insertunorderedlist.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>insertunorderedlist - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/italic.html b/tests/wpt/web-platform-tests/editing/run/italic.html
index 1b363c28003..6185d553d02 100644
--- a/tests/wpt/web-platform-tests/editing/run/italic.html
+++ b/tests/wpt/web-platform-tests/editing/run/italic.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-last">
diff --git a/tests/wpt/web-platform-tests/editing/run/justifycenter.html b/tests/wpt/web-platform-tests/editing/run/justifycenter.html
index 68ade6b6e35..4902a302cca 100644
--- a/tests/wpt/web-platform-tests/editing/run/justifycenter.html
+++ b/tests/wpt/web-platform-tests/editing/run/justifycenter.html
@@ -1,6 +1,6 @@
<!doctype html>
<meta charset=utf-8>
-<meta name=timeout content=long>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-3000">
diff --git a/tests/wpt/web-platform-tests/editing/run/justifyfull.html b/tests/wpt/web-platform-tests/editing/run/justifyfull.html
index 5d2dad5e68e..c11befaf893 100644
--- a/tests/wpt/web-platform-tests/editing/run/justifyfull.html
+++ b/tests/wpt/web-platform-tests/editing/run/justifyfull.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-3000">
diff --git a/tests/wpt/web-platform-tests/editing/run/justifyleft.html b/tests/wpt/web-platform-tests/editing/run/justifyleft.html
index 37554844fec..f6b28185389 100644
--- a/tests/wpt/web-platform-tests/editing/run/justifyleft.html
+++ b/tests/wpt/web-platform-tests/editing/run/justifyleft.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-last">
diff --git a/tests/wpt/web-platform-tests/editing/run/justifyright.html b/tests/wpt/web-platform-tests/editing/run/justifyright.html
index ca69e328762..edd30b7f5f0 100644
--- a/tests/wpt/web-platform-tests/editing/run/justifyright.html
+++ b/tests/wpt/web-platform-tests/editing/run/justifyright.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-3000">
diff --git a/tests/wpt/web-platform-tests/editing/run/misc.html b/tests/wpt/web-platform-tests/editing/run/misc.html
index 2ebd68cda6e..5bf52682292 100644
--- a/tests/wpt/web-platform-tests/editing/run/misc.html
+++ b/tests/wpt/web-platform-tests/editing/run/misc.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>misc - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/multitest.html b/tests/wpt/web-platform-tests/editing/run/multitest.html
index 2c4b6611687..813b9edc034 100644
--- a/tests/wpt/web-platform-tests/editing/run/multitest.html
+++ b/tests/wpt/web-platform-tests/editing/run/multitest.html
@@ -11,7 +11,7 @@
<meta name="variant" content="?8001-9000">
<meta name="variant" content="?9001-last">
<link rel=stylesheet href=../include/reset.css>
-<meta name=timeout content=long>
+<meta name="timeout" content="long">
<title>multitest - HTML editing conformance tests</title>
<p id=timing></p>
diff --git a/tests/wpt/web-platform-tests/editing/run/outdent.html b/tests/wpt/web-platform-tests/editing/run/outdent.html
index 0329b6eb44a..f1f9fb491aa 100644
--- a/tests/wpt/web-platform-tests/editing/run/outdent.html
+++ b/tests/wpt/web-platform-tests/editing/run/outdent.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-last">
diff --git a/tests/wpt/web-platform-tests/editing/run/removeformat.html b/tests/wpt/web-platform-tests/editing/run/removeformat.html
index fb38a4457e8..0c38ff915fb 100644
--- a/tests/wpt/web-platform-tests/editing/run/removeformat.html
+++ b/tests/wpt/web-platform-tests/editing/run/removeformat.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>removeformat - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/strikethrough.html b/tests/wpt/web-platform-tests/editing/run/strikethrough.html
index ed0781fd16e..cb06c10d0c2 100644
--- a/tests/wpt/web-platform-tests/editing/run/strikethrough.html
+++ b/tests/wpt/web-platform-tests/editing/run/strikethrough.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-last">
diff --git a/tests/wpt/web-platform-tests/editing/run/subscript.html b/tests/wpt/web-platform-tests/editing/run/subscript.html
index 1655a822fdf..e0071d7a080 100644
--- a/tests/wpt/web-platform-tests/editing/run/subscript.html
+++ b/tests/wpt/web-platform-tests/editing/run/subscript.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>subscript - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/superscript.html b/tests/wpt/web-platform-tests/editing/run/superscript.html
index 4c1f04763b6..0c3519b288e 100644
--- a/tests/wpt/web-platform-tests/editing/run/superscript.html
+++ b/tests/wpt/web-platform-tests/editing/run/superscript.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>superscript - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/editing/run/underline.html b/tests/wpt/web-platform-tests/editing/run/underline.html
index 61f85a1fa82..f53add984bd 100644
--- a/tests/wpt/web-platform-tests/editing/run/underline.html
+++ b/tests/wpt/web-platform-tests/editing/run/underline.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<meta name="variant" content="?1-1000">
<meta name="variant" content="?1001-2000">
<meta name="variant" content="?2001-last">
diff --git a/tests/wpt/web-platform-tests/editing/run/unlink.html b/tests/wpt/web-platform-tests/editing/run/unlink.html
index 26d6e2d83ec..7cd0be939f1 100644
--- a/tests/wpt/web-platform-tests/editing/run/unlink.html
+++ b/tests/wpt/web-platform-tests/editing/run/unlink.html
@@ -1,5 +1,6 @@
<!doctype html>
<meta charset=utf-8>
+<meta name="timeout" content="long">
<link rel=stylesheet href=../include/reset.css>
<title>unlink - HTML editing conformance tests</title>
diff --git a/tests/wpt/web-platform-tests/encoding/streams/backpressure.any.js b/tests/wpt/web-platform-tests/encoding/streams/backpressure.any.js
new file mode 100644
index 00000000000..f17e149ed9e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/backpressure.any.js
@@ -0,0 +1,60 @@
+// META: global=worker
+
+'use strict';
+
+const classes = [
+ {
+ constructor: TextDecoderStream,
+ input: new Uint8Array([65])
+ },
+ {
+ constructor: TextEncoderStream,
+ input: 'A'
+ }
+];
+
+const microtasksRun = () => new Promise(resolve => step_timeout(resolve, 0));
+
+for (const streamClass of classes) {
+ promise_test(async () => {
+ const stream = new streamClass.constructor();
+ const writer = stream.writable.getWriter();
+ const reader = stream.readable.getReader();
+ const events = [];
+ await microtasksRun();
+ const writePromise = writer.write(streamClass.input);
+ writePromise.then(() => events.push('write'));
+ await microtasksRun();
+ events.push('paused');
+ await reader.read();
+ events.push('read');
+ await writePromise;
+ assert_array_equals(events, ['paused', 'read', 'write'],
+ 'write should happen after read');
+ }, 'write() should not complete until read relieves backpressure for ' +
+ `${streamClass.constructor.name}`);
+
+ promise_test(async () => {
+ const stream = new streamClass.constructor();
+ const writer = stream.writable.getWriter();
+ const reader = stream.readable.getReader();
+ const events = [];
+ await microtasksRun();
+ const readPromise1 = reader.read();
+ readPromise1.then(() => events.push('read1'));
+ const writePromise1 = writer.write(streamClass.input);
+ const writePromise2 = writer.write(streamClass.input);
+ writePromise1.then(() => events.push('write1'));
+ writePromise2.then(() => events.push('write2'));
+ await microtasksRun();
+ events.push('paused');
+ const readPromise2 = reader.read();
+ readPromise2.then(() => events.push('read2'));
+ await Promise.all([writePromise1, writePromise2,
+ readPromise1, readPromise2]);
+ assert_array_equals(events, ['read1', 'write1', 'paused', 'read2',
+ 'write2'],
+ 'writes should not happen before read2');
+ }, 'additional writes should wait for backpressure to be relieved for ' +
+ `class ${streamClass.constructor.name}`);
+}
diff --git a/tests/wpt/web-platform-tests/encoding/streams/decode-attributes.any.js b/tests/wpt/web-platform-tests/encoding/streams/decode-attributes.any.js
new file mode 100644
index 00000000000..21b70201271
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/decode-attributes.any.js
@@ -0,0 +1,71 @@
+// META: global=worker
+
+'use strict';
+
+// Verify that constructor arguments are correctly reflected in the attributes.
+
+// Mapping of the first argument to TextDecoderStream to the expected value of
+// the encoding attribute. We assume that if this subset works correctly, the
+// rest probably work too.
+const labelToName = {
+ 'unicode-1-1-utf-8': 'utf-8',
+ 'iso-8859-2': 'iso-8859-2',
+ 'ascii': 'windows-1252',
+ 'utf-16': 'utf-16le'
+};
+
+for (const label of Object.keys(labelToName)) {
+ test(() => {
+ const stream = new TextDecoderStream(label);
+ assert_equals(stream.encoding, labelToName[label], 'encoding should match');
+ }, `encoding attribute should have correct value for '${label}'`);
+}
+
+for (const falseValue of [false, 0, '', undefined, null]) {
+ test(() => {
+ const stream = new TextDecoderStream('utf-8', { fatal: falseValue });
+ assert_false(stream.fatal, 'fatal should be false');
+ }, `setting fatal to '${falseValue}' should set the attribute to false`);
+
+ test(() => {
+ const stream = new TextDecoderStream('utf-8', { ignoreBOM: falseValue });
+ assert_false(stream.ignoreBOM, 'ignoreBOM should be false');
+ }, `setting ignoreBOM to '${falseValue}' should set the attribute to false`);
+}
+
+for (const trueValue of [true, 1, {}, [], 'yes']) {
+ test(() => {
+ const stream = new TextDecoderStream('utf-8', { fatal: trueValue });
+ assert_true(stream.fatal, 'fatal should be true');
+ }, `setting fatal to '${trueValue}' should set the attribute to true`);
+
+ test(() => {
+ const stream = new TextDecoderStream('utf-8', { ignoreBOM: trueValue });
+ assert_true(stream.ignoreBOM, 'ignoreBOM should be true');
+ }, `setting ignoreBOM to '${trueValue}' should set the attribute to true`);
+}
+
+test(() => {
+ assert_throws(new RangeError(), () => new TextDecoderStream(''),
+ 'the constructor should throw');
+}, 'constructing with an invalid encoding should throw');
+
+test(() => {
+ assert_throws(new TypeError(), () => new TextDecoderStream({
+ toString() { return {}; }
+ }), 'the constructor should throw');
+}, 'constructing with a non-stringifiable encoding should throw');
+
+test(() => {
+ assert_throws(new Error(),
+ () => new TextDecoderStream('utf-8', {
+ get fatal() { throw new Error(); }
+ }), 'the constructor should throw');
+}, 'a throwing fatal member should cause the constructor to throw');
+
+test(() => {
+ assert_throws(new Error(),
+ () => new TextDecoderStream('utf-8', {
+ get ignoreBOM() { throw new Error(); }
+ }), 'the constructor should throw');
+}, 'a throwing ignoreBOM member should cause the constructor to throw');
diff --git a/tests/wpt/web-platform-tests/encoding/streams/decode-bad-chunks.any.js b/tests/wpt/web-platform-tests/encoding/streams/decode-bad-chunks.any.js
new file mode 100644
index 00000000000..101fb3aeb61
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/decode-bad-chunks.any.js
@@ -0,0 +1,72 @@
+// META: global=worker
+
+'use strict';
+
+const badChunks = [
+ {
+ name: 'undefined',
+ value: undefined
+ },
+ {
+ name: 'null',
+ value: null
+ },
+ {
+ name: 'numeric',
+ value: 3.14
+ },
+ {
+ name: 'object, not BufferSource',
+ value: {}
+ },
+ {
+ name: 'array',
+ value: [65]
+ },
+ {
+ name: 'detached ArrayBufferView',
+ value: (() => {
+ const u8 = new Uint8Array([65]);
+ const ab = u8.buffer;
+ const mc = new MessageChannel();
+ mc.port1.postMessage(ab, [ab]);
+ return u8;
+ })()
+ },
+ {
+ name: 'detached ArrayBuffer',
+ value: (() => {
+ const u8 = new Uint8Array([65]);
+ const ab = u8.buffer;
+ const mc = new MessageChannel();
+ mc.port1.postMessage(ab, [ab]);
+ return ab;
+ })()
+ },
+ {
+ name: 'SharedArrayBuffer',
+ // Use a getter to postpone construction so that all tests don't fail where
+ // SharedArrayBuffer is not yet implemented.
+ get value() {
+ return new SharedArrayBuffer();
+ }
+ },
+ {
+ name: 'shared Uint8Array',
+ get value() {
+ new Uint8Array(new SharedArrayBuffer())
+ }
+ }
+];
+
+for (const chunk of badChunks) {
+ promise_test(async t => {
+ const tds = new TextDecoderStream();
+ const reader = tds.readable.getReader();
+ const writer = tds.writable.getWriter();
+ const writePromise = writer.write(chunk.value);
+ const readPromise = reader.read();
+ await promise_rejects(t, new TypeError(), writePromise, 'write should reject');
+ await promise_rejects(t, new TypeError(), readPromise, 'read should reject');
+ }, `chunk of type ${chunk.name} should error the stream`);
+}
diff --git a/tests/wpt/web-platform-tests/encoding/streams/decode-ignore-bom.any.js b/tests/wpt/web-platform-tests/encoding/streams/decode-ignore-bom.any.js
new file mode 100644
index 00000000000..cbe26d71b13
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/decode-ignore-bom.any.js
@@ -0,0 +1,38 @@
+// META: global=worker
+// META: script=resources/readable-stream-from-array.js
+// META: script=resources/readable-stream-to-array.js
+
+const cases = [
+ {encoding: 'utf-8', bytes: [0xEF, 0xBB, 0xBF, 0x61, 0x62, 0x63]},
+ {encoding: 'utf-16le', bytes: [0xFF, 0xFE, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00]},
+ {encoding: 'utf-16be', bytes: [0xFE, 0xFF, 0x00, 0x61, 0x00, 0x62, 0x00, 0x63]}
+];
+const BOM = '\uFEFF';
+
+// |inputChunks| is an array of chunks, each represented by an array of
+// integers. |ignoreBOM| is true or false. The result value is the output of the
+// pipe, concatenated into a single string.
+async function pipeAndAssemble(inputChunks, encoding, ignoreBOM) {
+ const chunksAsUint8 = inputChunks.map(values => new Uint8Array(values));
+ const readable = readableStreamFromArray(chunksAsUint8);
+ const outputArray = await readableStreamToArray(readable.pipeThrough(
+ new TextDecoderStream(encoding, {ignoreBOM})));
+ return outputArray.join('');
+}
+
+for (const testCase of cases) {
+ for (let splitPoint = 0; splitPoint < 4; ++splitPoint) {
+ promise_test(async () => {
+ const inputChunks = [testCase.bytes.slice(0, splitPoint),
+ testCase.bytes.slice(splitPoint)];
+ const withIgnoreBOM =
+ await pipeAndAssemble(inputChunks, testCase.encoding, true);
+ assert_equals(withIgnoreBOM, BOM + 'abc', 'BOM should be preserved');
+
+ const withoutIgnoreBOM =
+ await pipeAndAssemble(inputChunks, testCase.encoding, false);
+ assert_equals(withoutIgnoreBOM, 'abc', 'BOM should be stripped')
+ }, `ignoreBOM should work for encoding ${testCase.encoding}, split at ` +
+ `character ${splitPoint}`);
+ }
+}
diff --git a/tests/wpt/web-platform-tests/encoding/streams/decode-incomplete-input.any.js b/tests/wpt/web-platform-tests/encoding/streams/decode-incomplete-input.any.js
new file mode 100644
index 00000000000..80dd016d491
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/decode-incomplete-input.any.js
@@ -0,0 +1,24 @@
+// META: global=worker
+// META: script=resources/readable-stream-from-array.js
+// META: script=resources/readable-stream-to-array.js
+
+'use strict';
+
+const inputBytes = [229];
+
+promise_test(async () => {
+ const input = readableStreamFromArray([new Uint8Array(inputBytes)]);
+ const output = input.pipeThrough(new TextDecoderStream());
+ const array = await readableStreamToArray(output);
+ assert_array_equals(array, ['\uFFFD'], 'array should have one element');
+}, 'incomplete input with error mode "replacement" should end with a ' +
+ 'replacement character');
+
+promise_test(async t => {
+ const input = readableStreamFromArray([new Uint8Array(inputBytes)]);
+ const output = input.pipeThrough(new TextDecoderStream(
+ 'utf-8', {fatal: true}));
+ const reader = output.getReader();
+ await promise_rejects(t, new TypeError(), reader.read(),
+ 'read should reject');
+}, 'incomplete input with error mode "fatal" should error the stream');
diff --git a/tests/wpt/web-platform-tests/encoding/streams/decode-non-utf8.any.js b/tests/wpt/web-platform-tests/encoding/streams/decode-non-utf8.any.js
new file mode 100644
index 00000000000..7f39cdc04ca
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/decode-non-utf8.any.js
@@ -0,0 +1,77 @@
+// META: global=worker
+
+'use strict';
+
+// The browser is assumed to use the same implementation as for TextDecoder, so
+// this file don't replicate the exhaustive checks it has. It is just a smoke
+// test that non-UTF-8 encodings work at all.
+
+const encodings = [
+ {
+ name: 'UTF-16BE',
+ value: [108, 52],
+ expected: "\u{6c34}",
+ invalid: [0xD8, 0x00]
+ },
+ {
+ name: 'UTF-16LE',
+ value: [52, 108],
+ expected: "\u{6c34}",
+ invalid: [0x00, 0xD8]
+ },
+ {
+ name: 'Shift_JIS',
+ value: [144, 133],
+ expected: "\u{6c34}",
+ invalid: [255]
+ },
+ {
+ name: 'ISO-8859-14',
+ value: [100, 240, 114],
+ expected: "d\u{0175}r",
+ invalid: undefined // all bytes are treated as valid
+ }
+];
+
+for (const encoding of encodings) {
+ promise_test(async () => {
+ const stream = new TextDecoderStream(encoding.name);
+ const reader = stream.readable.getReader();
+ const writer = stream.writable.getWriter();
+ const writePromise = writer.write(new Uint8Array(encoding.value));
+ const {value, done} = await reader.read();
+ assert_false(done, 'readable should not be closed');
+ assert_equals(value, encoding.expected, 'chunk should match expected');
+ await writePromise;
+ }, `TextDecoderStream should be able to decode ${encoding.name}`);
+
+ if (!encoding.invalid)
+ continue;
+
+ promise_test(async t => {
+ const stream = new TextDecoderStream(encoding.name);
+ const reader = stream.readable.getReader();
+ const writer = stream.writable.getWriter();
+ const writePromise = writer.write(new Uint8Array(encoding.invalid));
+ const closePromise = writer.close();
+ const {value, done} = await reader.read();
+ assert_false(done, 'readable should not be closed');
+ assert_equals(value, '\u{FFFD}', 'output should be replacement character');
+ await Promise.all([writePromise, closePromise]);
+ }, `TextDecoderStream should be able to decode invalid sequences in ` +
+ `${encoding.name}`);
+
+ promise_test(async t => {
+ const stream = new TextDecoderStream(encoding.name, {fatal: true});
+ const reader = stream.readable.getReader();
+ const writer = stream.writable.getWriter();
+ const writePromise = writer.write(new Uint8Array(encoding.invalid));
+ const closePromise = writer.close();
+ await promise_rejects(t, new TypeError(), reader.read(),
+ 'readable should be errored');
+ await promise_rejects(t, new TypeError(),
+ Promise.all([writePromise, closePromise]),
+ 'writable should be errored');
+ }, `TextDecoderStream should be able to reject invalid sequences in ` +
+ `${encoding.name}`);
+}
diff --git a/tests/wpt/web-platform-tests/encoding/streams/decode-split-character.any.js b/tests/wpt/web-platform-tests/encoding/streams/decode-split-character.any.js
new file mode 100644
index 00000000000..6c022697da6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/decode-split-character.any.js
@@ -0,0 +1,50 @@
+// META: global=worker
+// META: script=resources/readable-stream-from-array.js
+// META: script=resources/readable-stream-to-array.js
+
+'use strict';
+
+const inputBytes = [73, 32, 240, 159, 146, 153, 32, 115, 116, 114, 101,
+ 97, 109, 115];
+for (const splitPoint of [2, 3, 4, 5]) {
+ promise_test(async () => {
+ const input = readableStreamFromArray(
+ [new Uint8Array(inputBytes.slice(0, splitPoint)),
+ new Uint8Array(inputBytes.slice(splitPoint))]);
+ const expectedOutput = ['I ', '\u{1F499} streams'];
+ const output = input.pipeThrough(new TextDecoderStream());
+ const array = await readableStreamToArray(output);
+ assert_array_equals(array, expectedOutput,
+ 'the split code point should be in the second chunk ' +
+ 'of the output');
+ }, 'a code point split between chunks should not be emitted until all ' +
+ 'bytes are available; split point = ' + splitPoint);
+}
+
+promise_test(async () => {
+ const splitPoint = 6;
+ const input = readableStreamFromArray(
+ [new Uint8Array(inputBytes.slice(0, splitPoint)),
+ new Uint8Array(inputBytes.slice(splitPoint))]);
+ const output = input.pipeThrough(new TextDecoderStream());
+ const array = await readableStreamToArray(output);
+ assert_array_equals(array, ['I \u{1F499}', ' streams'],
+ 'the multibyte character should be in the first chunk ' +
+ 'of the output');
+}, 'a code point should be emitted as soon as all bytes are available');
+
+for (let splitPoint = 1; splitPoint < 7; ++splitPoint) {
+ promise_test(async () => {
+ const input = readableStreamFromArray(
+ [new Uint8Array(inputBytes.slice(0, splitPoint)),
+ new Uint8Array([]),
+ new Uint8Array(inputBytes.slice(splitPoint))]);
+ const concatenatedOutput = 'I \u{1F499} streams';
+ const output = input.pipeThrough(new TextDecoderStream());
+ const array = await readableStreamToArray(output);
+ assert_equals(array.length, 2, 'two chunks should be output');
+ assert_equals(array[0].concat(array[1]), concatenatedOutput,
+ 'output should be unchanged by the empty chunk');
+ }, 'an empty chunk inside a code point split between chunks should not ' +
+ 'change the output; split point = ' + splitPoint);
+}
diff --git a/tests/wpt/web-platform-tests/encoding/streams/decode-utf8.any.js b/tests/wpt/web-platform-tests/encoding/streams/decode-utf8.any.js
new file mode 100644
index 00000000000..34fa764bf0a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/decode-utf8.any.js
@@ -0,0 +1,41 @@
+// META: global=worker
+// META: script=resources/readable-stream-from-array.js
+// META: script=resources/readable-stream-to-array.js
+
+'use strict';
+
+const emptyChunk = new Uint8Array([]);
+const inputChunk = new Uint8Array([73, 32, 240, 159, 146, 153, 32, 115, 116,
+ 114, 101, 97, 109, 115]);
+const expectedOutputString = 'I \u{1F499} streams';
+
+promise_test(async () => {
+ const input = readableStreamFromArray([inputChunk]);
+ const output = input.pipeThrough(new TextDecoderStream());
+ const array = await readableStreamToArray(output);
+ assert_array_equals(array, [expectedOutputString],
+ 'the output should be in one chunk');
+}, 'decoding one UTF-8 chunk should give one output string');
+
+promise_test(async () => {
+ const input = readableStreamFromArray([emptyChunk]);
+ const output = input.pipeThrough(new TextDecoderStream());
+ const array = await readableStreamToArray(output);
+ assert_array_equals(array, [], 'no chunks should be output');
+}, 'decoding an empty chunk should give no output chunks');
+
+promise_test(async () => {
+ const input = readableStreamFromArray([emptyChunk, inputChunk]);
+ const output = input.pipeThrough(new TextDecoderStream());
+ const array = await readableStreamToArray(output);
+ assert_array_equals(array, [expectedOutputString],
+ 'the output should be in one chunk');
+}, 'an initial empty chunk should be ignored');
+
+promise_test(async () => {
+ const input = readableStreamFromArray([inputChunk, emptyChunk]);
+ const output = input.pipeThrough(new TextDecoderStream());
+ const array = await readableStreamToArray(output);
+ assert_array_equals(array, [expectedOutputString],
+ 'the output should be in one chunk');
+}, 'a trailing empty chunk should be ignored');
diff --git a/tests/wpt/web-platform-tests/encoding/streams/encode-bad-chunks.any.js b/tests/wpt/web-platform-tests/encoding/streams/encode-bad-chunks.any.js
new file mode 100644
index 00000000000..868e34b7342
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/encode-bad-chunks.any.js
@@ -0,0 +1,63 @@
+// META: global=worker
+// META: script=resources/readable-stream-from-array.js
+// META: script=resources/readable-stream-to-array.js
+
+'use strict';
+
+const error1 = new Error('error1');
+error1.name = 'error1';
+
+promise_test(t => {
+ const ts = new TextEncoderStream();
+ const writer = ts.writable.getWriter();
+ const reader = ts.readable.getReader();
+ const writePromise = writer.write({
+ toString() { throw error1; }
+ });
+ const readPromise = reader.read();
+ return Promise.all([
+ promise_rejects(t, error1, readPromise, 'read should reject with error1'),
+ promise_rejects(t, error1, writePromise, 'write should reject with error1'),
+ promise_rejects(t, error1, reader.closed, 'readable should be errored with error1'),
+ promise_rejects(t, error1, writer.closed, 'writable should be errored with error1'),
+ ]);
+}, 'a chunk that cannot be converted to a string should error the streams');
+
+const oddInputs = [
+ {
+ name: 'undefined',
+ value: undefined,
+ expected: 'undefined'
+ },
+ {
+ name: 'null',
+ value: null,
+ expected: 'null'
+ },
+ {
+ name: 'numeric',
+ value: 3.14,
+ expected: '3.14'
+ },
+ {
+ name: 'object',
+ value: {},
+ expected: '[object Object]'
+ },
+ {
+ name: 'array',
+ value: ['hi'],
+ expected: 'hi'
+ }
+];
+
+for (const input of oddInputs) {
+ promise_test(async () => {
+ const outputReadable = readableStreamFromArray([input.value])
+ .pipeThrough(new TextEncoderStream())
+ .pipeThrough(new TextDecoderStream());
+ const output = await readableStreamToArray(outputReadable);
+ assert_equals(output.length, 1, 'output should contain one chunk');
+ assert_equals(output[0], input.expected, 'output should be correct');
+ }, `input of type ${input.name} should be converted correctly to string`);
+}
diff --git a/tests/wpt/web-platform-tests/encoding/streams/encode-utf8.any.js b/tests/wpt/web-platform-tests/encoding/streams/encode-utf8.any.js
new file mode 100644
index 00000000000..74d1860e82b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/encode-utf8.any.js
@@ -0,0 +1,144 @@
+// META: global=worker
+// META: script=resources/readable-stream-from-array.js
+// META: script=resources/readable-stream-to-array.js
+
+'use strict';
+const inputString = 'I \u{1F499} streams';
+const expectedOutputBytes = [0x49, 0x20, 0xf0, 0x9f, 0x92, 0x99, 0x20, 0x73,
+ 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73];
+// This is a character that must be represented in two code units in a string,
+// ie. it is not in the Basic Multilingual Plane.
+const astralCharacter = '\u{1F499}'; // BLUE HEART
+const astralCharacterEncoded = [0xf0, 0x9f, 0x92, 0x99];
+const leading = astralCharacter[0];
+const trailing = astralCharacter[1];
+const replacementEncoded = [0xef, 0xbf, 0xbd];
+
+// These tests assume that the implementation correctly classifies leading and
+// trailing surrogates and treats all the code units in each set equivalently.
+
+const testCases = [
+ {
+ input: [inputString],
+ output: [expectedOutputBytes],
+ description: 'encoding one string of UTF-8 should give one complete chunk'
+ },
+ {
+ input: [leading, trailing],
+ output: [astralCharacterEncoded],
+ description: 'a character split between chunks should be correctly encoded'
+ },
+ {
+ input: [leading, trailing + astralCharacter],
+ output: [astralCharacterEncoded.concat(astralCharacterEncoded)],
+ description: 'a character following one split between chunks should be ' +
+ 'correctly encoded'
+ },
+ {
+ input: [leading, trailing + leading, trailing],
+ output: [astralCharacterEncoded, astralCharacterEncoded],
+ description: 'two consecutive astral characters each split down the ' +
+ 'middle should be correctly reassembled'
+ },
+ {
+ input: [leading, trailing + leading + leading, trailing],
+ output: [astralCharacterEncoded.concat(replacementEncoded), astralCharacterEncoded],
+ description: 'two consecutive astral characters each split down the ' +
+ 'middle with an invalid surrogate in the middle should be correctly ' +
+ 'encoded'
+ },
+ {
+ input: [leading],
+ output: [replacementEncoded],
+ description: 'a stream ending in a leading surrogate should emit a ' +
+ 'replacement character as a final chunk'
+ },
+ {
+ input: [leading, astralCharacter],
+ output: [replacementEncoded.concat(astralCharacterEncoded)],
+ description: 'an unmatched surrogate at the end of a chunk followed by ' +
+ 'an astral character in the next chunk should be replaced with ' +
+ 'the replacement character at the start of the next output chunk'
+ },
+ {
+ input: [leading, 'A'],
+ output: [replacementEncoded.concat([65])],
+ description: 'an unmatched surrogate at the end of a chunk followed by ' +
+ 'an ascii character in the next chunk should be replaced with ' +
+ 'the replacement character at the start of the next output chunk'
+ },
+ {
+ input: [leading, leading, trailing],
+ output: [replacementEncoded, astralCharacterEncoded],
+ description: 'an unmatched surrogate at the end of a chunk followed by ' +
+ 'a plane 1 character split into two chunks should result in ' +
+ 'the encoded plane 1 character appearing in the last output chunk'
+ },
+ {
+ input: [leading, leading],
+ output: [replacementEncoded, replacementEncoded],
+ description: 'two leading chunks should result in two replacement ' +
+ 'characters'
+ },
+ {
+ input: [leading + leading, trailing],
+ output: [replacementEncoded, astralCharacterEncoded],
+ description: 'a non-terminal unpaired leading surrogate should ' +
+ 'immediately be replaced'
+ },
+ {
+ input: [trailing, astralCharacter],
+ output: [replacementEncoded, astralCharacterEncoded],
+ description: 'a terminal unpaired trailing surrogate should ' +
+ 'immediately be replaced'
+ },
+ {
+ input: [leading, '', trailing],
+ output: [astralCharacterEncoded],
+ description: 'a leading surrogate chunk should be carried past empty chunks'
+ },
+ {
+ input: [leading, ''],
+ output: [replacementEncoded],
+ description: 'a leading surrogate chunk should error when it is clear ' +
+ 'it didn\'t form a pair'
+ },
+ {
+ input: [''],
+ output: [],
+ description: 'an empty string should result in no output chunk'
+ },
+ {
+ input: ['', inputString],
+ output: [expectedOutputBytes],
+ description: 'a leading empty chunk should be ignored'
+ },
+ {
+ input: [inputString, ''],
+ output: [expectedOutputBytes],
+ description: 'a trailing empty chunk should be ignored'
+ },
+ {
+ input: ['A'],
+ output: [[65]],
+ description: 'a plain ASCII chunk should be converted'
+ },
+ {
+ input: ['\xff'],
+ output: [[195, 191]],
+ description: 'characters in the ISO-8859-1 range should be encoded correctly'
+ },
+];
+
+for (const {input, output, description} of testCases) {
+ promise_test(async () => {
+ const inputStream = readableStreamFromArray(input);
+ const outputStream = inputStream.pipeThrough(new TextEncoderStream());
+ const chunkArray = await readableStreamToArray(outputStream);
+ assert_equals(chunkArray.length, output.length,
+ 'number of chunks should match');
+ for (let i = 0; i < output.length; ++i) {
+ assert_array_equals(chunkArray[i], output[i], `chunk ${i} should match`);
+ }
+ }, description);
+}
diff --git a/tests/wpt/web-platform-tests/encoding/streams/readable-writable-properties.any.js b/tests/wpt/web-platform-tests/encoding/streams/readable-writable-properties.any.js
new file mode 100644
index 00000000000..ad7cde32f68
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/readable-writable-properties.any.js
@@ -0,0 +1,22 @@
+// META: global=worker
+
+// This just tests that the "readable" and "writable" properties pass the brand
+// checks. All other relevant attributes are covered by the IDL tests.
+
+'use strict';
+
+test(() => {
+ const te = new TextEncoderStream();
+ assert_equals(typeof ReadableStream.prototype.getReader.call(te.readable),
+ 'object', 'readable property must pass brand check');
+ assert_equals(typeof WritableStream.prototype.getWriter.call(te.writable),
+ 'object', 'writable property must pass brand check');
+}, 'TextEncoderStream readable and writable properties must pass brand checks');
+
+test(() => {
+ const td = new TextDecoderStream();
+ assert_equals(typeof ReadableStream.prototype.getReader.call(td.readable),
+ 'object', 'readable property must pass brand check');
+ assert_equals(typeof WritableStream.prototype.getWriter.call(td.writable),
+ 'object', 'writable property must pass brand check');
+}, 'TextDecoderStream readable and writable properties must pass brand checks');
diff --git a/tests/wpt/web-platform-tests/encoding/streams/realms.window.js b/tests/wpt/web-platform-tests/encoding/streams/realms.window.js
new file mode 100644
index 00000000000..b1cc13e0b80
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/realms.window.js
@@ -0,0 +1,347 @@
+'use strict';
+
+// Test that objects created by the TextEncoderStream and TextDecoderStream APIs
+// are created in the correct realm. The tests work by creating an iframe for
+// each realm and then posting Javascript to them to be evaluated. Inputs and
+// outputs are passed around via global variables in each realm's scope.
+
+// Async setup is required before creating any tests, so require done() to be
+// called.
+setup({explicit_done: true});
+
+function createRealm() {
+ let iframe = document.createElement('iframe');
+ const scriptEndTag = '<' + '/script>';
+ iframe.srcdoc = `<!doctype html>
+<script>
+onmessage = event => {
+ if (event.source !== window.parent) {
+ throw new Error('unexpected message with source ' + event.source);
+ }
+ eval(event.data);
+};
+${scriptEndTag}`;
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+ let realmPromiseResolve;
+ const realmPromise = new Promise(resolve => {
+ realmPromiseResolve = resolve;
+ });
+ iframe.onload = () => {
+ realmPromiseResolve(iframe.contentWindow);
+ };
+ return realmPromise;
+}
+
+async function createRealms() {
+ // All realms are visible on the global object so they can access each other.
+
+ // The realm that the constructor function comes from.
+ window.constructorRealm = await createRealm();
+
+ // The realm in which the constructor object is called.
+ window.constructedRealm = await createRealm();
+
+ // The realm in which reading happens.
+ window.readRealm = await createRealm();
+
+ // The realm in which writing happens.
+ window.writeRealm = await createRealm();
+
+ // The realm that provides the definitions of Readable and Writable methods.
+ window.methodRealm = await createRealm();
+
+ await evalInRealmAndWait(methodRealm, `
+ window.ReadableStreamDefaultReader =
+ new ReadableStream().getReader().constructor;
+ window.WritableStreamDefaultWriter =
+ new WritableStream().getWriter().constructor;
+`);
+ window.readMethod = methodRealm.ReadableStreamDefaultReader.prototype.read;
+ window.writeMethod = methodRealm.WritableStreamDefaultWriter.prototype.write;
+}
+
+// In order for values to be visible between realms, they need to be
+// global. To prevent interference between tests, variable names are generated
+// automatically.
+const id = (() => {
+ let nextId = 0;
+ return () => {
+ return `realmsId${nextId++}`;
+ };
+})();
+
+// Eval string "code" in the content of realm "realm". Evaluation happens
+// asynchronously, meaning it hasn't happened when the function returns.
+function evalInRealm(realm, code) {
+ realm.postMessage(code, window.origin);
+}
+
+// Same as evalInRealm() but returns a Promise which will resolve when the
+// function has actually.
+async function evalInRealmAndWait(realm, code) {
+ const resolve = id();
+ const waitOn = new Promise(r => {
+ realm[resolve] = r;
+ });
+ evalInRealm(realm, code);
+ evalInRealm(realm, `${resolve}();`);
+ await waitOn;
+}
+
+// The same as evalInRealmAndWait but returns the result of evaluating "code" as
+// an expression.
+async function evalInRealmAndReturn(realm, code) {
+ const myId = id();
+ await evalInRealmAndWait(realm, `window.${myId} = ${code};`);
+ return realm[myId];
+}
+
+// Constructs an object in constructedRealm and copies it into readRealm and
+// writeRealm. Returns the id that can be used to access the object in those
+// realms. |what| can contain constructor arguments.
+async function constructAndStore(what) {
+ const objId = id();
+ // Call |constructorRealm|'s constructor from inside |constructedRealm|.
+ writeRealm[objId] = await evalInRealmAndReturn(
+ constructedRealm, `new parent.constructorRealm.${what}`);
+ readRealm[objId] = writeRealm[objId];
+ return objId;
+}
+
+// Calls read() on the readable side of the TransformStream stored in
+// readRealm[objId]. Locks the readable side as a side-effect.
+function readInReadRealm(objId) {
+ return evalInRealmAndReturn(readRealm, `
+parent.readMethod.call(window.${objId}.readable.getReader())`);
+}
+
+// Calls write() on the writable side of the TransformStream stored in
+// writeRealm[objId], passing |value|. Locks the writable side as a
+// side-effect.
+function writeInWriteRealm(objId, value) {
+ const valueId = id();
+ writeRealm[valueId] = value;
+ return evalInRealmAndReturn(writeRealm, `
+parent.writeMethod.call(window.${objId}.writable.getWriter(),
+ window.${valueId})`);
+}
+
+window.onload = () => {
+ createRealms().then(() => {
+ runGenericTests('TextEncoderStream');
+ runTextEncoderStreamTests();
+ runGenericTests('TextDecoderStream');
+ runTextDecoderStreamTests();
+ done();
+ });
+};
+
+function runGenericTests(classname) {
+ promise_test(async () => {
+ const obj = await evalInRealmAndReturn(
+ constructedRealm, `new parent.constructorRealm.${classname}()`);
+ assert_equals(obj.constructor, constructorRealm[classname],
+ 'obj should be in constructor realm');
+ }, `a ${classname} object should be associated with the realm the ` +
+ 'constructor came from');
+
+ promise_test(async () => {
+ const objId = await constructAndStore(classname);
+ const readableGetterId = id();
+ readRealm[readableGetterId] = Object.getOwnPropertyDescriptor(
+ methodRealm[classname].prototype, 'readable').get;
+ const writableGetterId = id();
+ writeRealm[writableGetterId] = Object.getOwnPropertyDescriptor(
+ methodRealm[classname].prototype, 'writable').get;
+ const readable = await evalInRealmAndReturn(
+ readRealm, `${readableGetterId}.call(${objId})`);
+ const writable = await evalInRealmAndReturn(
+ writeRealm, `${writableGetterId}.call(${objId})`);
+ assert_equals(readable.constructor, constructorRealm.ReadableStream,
+ 'readable should be in constructor realm');
+ assert_equals(writable.constructor, constructorRealm.WritableStream,
+ 'writable should be in constructor realm');
+ }, `${classname}'s readable and writable attributes should come from the ` +
+ 'same realm as the constructor definition');
+}
+
+function runTextEncoderStreamTests() {
+ promise_test(async () => {
+ const objId = await constructAndStore('TextEncoderStream');
+ const writePromise = writeInWriteRealm(objId, 'A');
+ const result = await readInReadRealm(objId);
+ await writePromise;
+ assert_equals(result.constructor, constructorRealm.Object,
+ 'result should be in constructor realm');
+ assert_equals(result.value.constructor, constructorRealm.Uint8Array,
+ 'chunk should be in constructor realm');
+ }, 'the output chunks when read is called after write should come from the ' +
+ 'same realm as the constructor of TextEncoderStream');
+
+ promise_test(async () => {
+ const objId = await constructAndStore('TextEncoderStream');
+ const chunkPromise = readInReadRealm(objId);
+ writeInWriteRealm(objId, 'A');
+ // Now the read() should resolve.
+ const result = await chunkPromise;
+ assert_equals(result.constructor, constructorRealm.Object,
+ 'result should be in constructor realm');
+ assert_equals(result.value.constructor, constructorRealm.Uint8Array,
+ 'chunk should be in constructor realm');
+ }, 'the output chunks when write is called with a pending read should come ' +
+ 'from the same realm as the constructor of TextEncoderStream');
+
+ // There is not absolute consensus regarding what realm exceptions should be
+ // created in. Implementations may vary. The expectations in exception-related
+ // tests may change in future once consensus is reached.
+ promise_test(async t => {
+ const objId = await constructAndStore('TextEncoderStream');
+ // Read first to relieve backpressure.
+ const readPromise = readInReadRealm(objId);
+ // promise_rejects() does not permit directly inspecting the rejection, so
+ // it's necessary to write it out long-hand.
+ let writeSucceeded = false;
+ try {
+ // Write an invalid chunk.
+ await writeInWriteRealm(objId, {
+ toString() { return {}; }
+ });
+ writeSucceeded = true;
+ } catch (err) {
+ assert_equals(err.constructor, constructorRealm.TypeError,
+ 'write TypeError should come from constructor realm');
+ }
+ assert_false(writeSucceeded, 'write should fail');
+
+ let readSucceeded = false;
+ try {
+ await readPromise;
+ readSucceeded = true;
+ } catch (err) {
+ assert_equals(err.constructor, constructorRealm.TypeError,
+ 'read TypeError should come from constructor realm');
+ }
+
+ assert_false(readSucceeded, 'read should fail');
+ }, 'TypeError for unconvertable chunk should come from constructor realm ' +
+ 'of TextEncoderStream');
+}
+
+function runTextDecoderStreamTests() {
+ promise_test(async () => {
+ const objId = await constructAndStore('TextDecoderStream');
+ const writePromise = writeInWriteRealm(objId, new Uint8Array([65]));
+ const result = await readInReadRealm(objId);
+ await writePromise;
+ assert_equals(result.constructor, constructorRealm.Object,
+ 'result should be in constructor realm');
+ // A string is not an object, so doesn't have an associated realm. Accessing
+ // string properties will create a transient object wrapper belonging to the
+ // current realm. So checking the realm of result.value is not useful.
+ }, 'the result object when read is called after write should come from the ' +
+ 'same realm as the constructor of TextDecoderStream');
+
+ promise_test(async () => {
+ const objId = await constructAndStore('TextDecoderStream');
+ const chunkPromise = readInReadRealm(objId);
+ writeInWriteRealm(objId, new Uint8Array([65]));
+ // Now the read() should resolve.
+ const result = await chunkPromise;
+ assert_equals(result.constructor, constructorRealm.Object,
+ 'result should be in constructor realm');
+ // A string is not an object, so doesn't have an associated realm. Accessing
+ // string properties will create a transient object wrapper belonging to the
+ // current realm. So checking the realm of result.value is not useful.
+ }, 'the result object when write is called with a pending ' +
+ 'read should come from the same realm as the constructor of TextDecoderStream');
+
+ promise_test(async t => {
+ const objId = await constructAndStore('TextDecoderStream');
+ // Read first to relieve backpressure.
+ const readPromise = readInReadRealm(objId);
+ // promise_rejects() does not permit directly inspecting the rejection, so
+ // it's necessary to write it out long-hand.
+ let writeSucceeded = false;
+ try {
+ // Write an invalid chunk.
+ await writeInWriteRealm(objId, {});
+ writeSucceeded = true;
+ } catch (err) {
+ assert_equals(err.constructor, constructorRealm.TypeError,
+ 'write TypeError should come from constructor realm');
+ }
+ assert_false(writeSucceeded, 'write should fail');
+
+ let readSucceeded = false;
+ try {
+ await readPromise;
+ readSucceeded = true;
+ } catch (err) {
+ assert_equals(err.constructor, constructorRealm.TypeError,
+ 'read TypeError should come from constructor realm');
+ }
+ assert_false(readSucceeded, 'read should fail');
+ }, 'TypeError for chunk with the wrong type should come from constructor ' +
+ 'realm of TextDecoderStream');
+
+ promise_test(async t => {
+ const objId =
+ await constructAndStore(`TextDecoderStream('utf-8', {fatal: true})`);
+ // Read first to relieve backpressure.
+ const readPromise = readInReadRealm(objId);
+ // promise_rejects() does not permit directly inspecting the rejection, so
+ // it's necessary to write it out long-hand.
+ let writeSucceeded = false;
+ try {
+ await writeInWriteRealm(objId, new Uint8Array([0xff]));
+ writeSucceeded = true;
+ } catch (err) {
+ assert_equals(err.constructor, constructorRealm.TypeError,
+ 'write TypeError should come from constructor realm');
+ }
+ assert_false(writeSucceeded, 'write should fail');
+
+ let readSucceeded = false;
+ try {
+ await readPromise;
+ readSucceeded = true;
+ } catch (err) {
+ assert_equals(err.constructor, constructorRealm.TypeError,
+ 'read TypeError should come from constructor realm');
+ }
+ assert_false(readSucceeded, 'read should fail');
+ }, 'TypeError for invalid chunk should come from constructor realm ' +
+ 'of TextDecoderStream');
+
+ promise_test(async t => {
+ const objId =
+ await constructAndStore(`TextDecoderStream('utf-8', {fatal: true})`);
+ // Read first to relieve backpressure.
+ readInReadRealm(objId);
+ // Write an unfinished sequence of bytes.
+ const incompleteBytesId = id();
+ writeRealm[incompleteBytesId] = new Uint8Array([0xf0]);
+ // promise_rejects() does not permit directly inspecting the rejection, so
+ // it's necessary to write it out long-hand.
+ let closeSucceeded = false;
+ try {
+ // Can't use writeInWriteRealm() here because it doesn't make it possible
+ // to reuse the writer.
+ await evalInRealmAndReturn(writeRealm, `
+(() => {
+ const writer = window.${objId}.writable.getWriter();
+ parent.writeMethod.call(writer, window.${incompleteBytesId});
+ return parent.methodRealm.WritableStreamDefaultWriter.prototype
+ .close.call(writer);
+})();
+`);
+ closeSucceeded = true;
+ } catch (err) {
+ assert_equals(err.constructor, constructorRealm.TypeError,
+ 'close TypeError should come from constructor realm');
+ }
+ assert_false(closeSucceeded, 'close should fail');
+ }, 'TypeError for incomplete input should come from constructor realm ' +
+ 'of TextDecoderStream');
+}
diff --git a/tests/wpt/web-platform-tests/encoding/streams/resources/readable-stream-from-array.js b/tests/wpt/web-platform-tests/encoding/streams/resources/readable-stream-from-array.js
new file mode 100644
index 00000000000..5c12ba8c8bb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/resources/readable-stream-from-array.js
@@ -0,0 +1,12 @@
+'use strict';
+
+function readableStreamFromArray(array) {
+ return new ReadableStream({
+ start(controller) {
+ for (let entry of array) {
+ controller.enqueue(entry);
+ }
+ controller.close();
+ }
+ });
+}
diff --git a/tests/wpt/web-platform-tests/encoding/streams/resources/readable-stream-to-array.js b/tests/wpt/web-platform-tests/encoding/streams/resources/readable-stream-to-array.js
new file mode 100644
index 00000000000..fda03e22644
--- /dev/null
+++ b/tests/wpt/web-platform-tests/encoding/streams/resources/readable-stream-to-array.js
@@ -0,0 +1,11 @@
+'use strict';
+
+function readableStreamToArray(stream) {
+ var array = [];
+ var writable = new WritableStream({
+ write(chunk) {
+ array.push(chunk);
+ }
+ });
+ return stream.pipeTo(writable).then(() => array);
+}
diff --git a/tests/wpt/web-platform-tests/encrypted-media/scripts/playback-temporary-expired.js b/tests/wpt/web-platform-tests/encrypted-media/scripts/playback-temporary-expired.js
index 5144ef967f7..3d1bd9591db 100644
--- a/tests/wpt/web-platform-tests/encrypted-media/scripts/playback-temporary-expired.js
+++ b/tests/wpt/web-platform-tests/encrypted-media/scripts/playback-temporary-expired.js
@@ -44,23 +44,26 @@ function runTest(config,qualifier) {
assert_in_array(event.messageType, ['license-request', 'individualization-request']);
+ // Generate a license that expires 1 second from now.
var expiration = Date.now().valueOf() + 1000;
config.messagehandler(event.messageType, event.message, { expiration: expiration }).then(function(response) {
- return event.target.update(response);
- }).then(test.step_func(function() {
- // License server may only have second granularity, so check
- // that session expiration time is close to the desired value.
- assert_approx_equals(event.target.expiration, expiration, 2000, "expiration attribute should equal provided expiration time");
-
- // Since the expiration time is in the future, wait 5 seconds
- // so that the license has expired before calling play().
+ // Wait 2 seconds before calling update() to ensure that the
+ // license has really expired. This is to avoid problems
+ // where the browser starts buffering frames as soon as a
+ // valid license is received.
test.step_timeout(function() {
- assert_greater_than(Date.now().valueOf(), expiration, "Starting play before license expired");
- _video.play();
- // Wait 2 seconds to ensure that the video does not play.
- test.step_timeout(function() { test.done(); }, 2000);
- }, 5000);
- })).catch(onFailure);
+ event.target.update(response).then(function() {
+ // License server may only have second granularity, so check
+ // that session expiration time is close to the desired value.
+ assert_approx_equals(event.target.expiration, expiration, 3000,
+ "expiration attribute should equal provided expiration time");
+ assert_greater_than(Date.now().valueOf(), expiration, "Starting play before license expired");
+ _video.play();
+ // Wait 2 seconds to ensure that the video does not play.
+ test.step_timeout(function() { test.done(); }, 2000);
+ }).catch(onFailure);
+ }, 2000);
+ }).catch(onFailure);
}
function onPlaying(event) {
diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicSize-with-responsive-images.tentative.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicSize-with-responsive-images.tentative.https.sub.html
new file mode 100644
index 00000000000..60bc00ddc3e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicSize-with-responsive-images.tentative.https.sub.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<body>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+'use strict';
+
+const srcs = [
+ "/feature-policy/experimental-features/resources/image.svg",
+ "/feature-policy/experimental-features/resources/image.jpg",
+ "/feature-policy/experimental-features/resources/image.png",
+];
+
+for (var src of srcs) {
+ async_test(t => {
+ var img = document.createElement('IMG');
+ img.intrinsicSize = '400 x 500';
+ var expected_intrinsic_width = 400;
+ var expected_intrinsic_height = 500;
+ var expected_width = expected_intrinsic_width;
+ var expected_height = expected_intrinsic_height;
+
+ document.body.appendChild(img);
+ img.addEventListener('load', t.step_func(() => {
+ assert_equals(img.width, expected_width, 'width');
+ assert_equals(img.height, expected_height, 'height');
+ assert_equals(img.naturalWidth, expected_intrinsic_width, 'naturalWidth');
+ assert_equals(img.naturalHeight, expected_intrinsic_height, 'naturalHeigh');
+ t.done();
+ }));
+ img.srcset = src + ' 3x';
+ }, 'Test image ' + src + ' with no specified sizes, width, or height');
+
+ async_test(t => {
+ var img = document.createElement('IMG');
+ img.intrinsicSize = '400 x 500';
+ img.width = '800'; /* 2x of intrinsic width */
+ var expected_intrinsic_width = 400;
+ var expected_intrinsic_height = 500;
+ var expected_width = expected_intrinsic_width * 2;
+ var expected_height = expected_intrinsic_height * 2;
+
+ document.body.appendChild(img);
+ img.addEventListener('load', t.step_func(() => {
+ assert_equals(img.width, expected_width, 'width');
+ assert_equals(img.height, expected_height, 'height');
+ assert_equals(img.naturalWidth, expected_intrinsic_width, 'naturalWidth');
+ assert_equals(img.naturalHeight, expected_intrinsic_height, 'naturalHeigh');
+ t.done();
+ }));
+ img.srcset = src + ' 3x';
+ }, 'Test image ' + src + ' with width = 800, no specified sizes, or height');
+
+ async_test(t => {
+ var img = document.createElement('IMG');
+ img.intrinsicSize = '400 x 500';
+ img.width = '800';
+ img.style = 'height:800px;';
+ var expected_intrinsic_width = 400;
+ var expected_intrinsic_height = 500;
+ var expected_width = 800;
+ var expected_height = 800;
+
+ document.body.appendChild(img);
+ img.addEventListener('load', t.step_func(() => {
+ assert_equals(img.width, expected_width, 'width');
+ assert_equals(img.height, expected_height, 'height');
+ assert_equals(img.naturalWidth, expected_intrinsic_width, 'naturalWidth');
+ assert_equals(img.naturalHeight, expected_intrinsic_height, 'naturalHeigh');
+ t.done();
+ }));
+ img.srcset = src + ' 3x';
+ }, 'Test image ' + src + ' with width = 800, height = 800, and no specified sizes');
+}
+
+async_test(t => {
+ var img = document.createElement('IMG');
+ img.intrinsicSize = '400 x 500';
+ img.sizes = '100px';
+ var expected_intrinsic_width = 100;
+ var expected_intrinsic_height = 125;
+ var expected_width = 100;
+ var expected_height = 125;
+
+ document.body.appendChild(img);
+ img.addEventListener('load', t.step_func(() => {
+ assert_equals(img.width, expected_width, 'width');
+ assert_equals(img.height, expected_height, 'height');
+ assert_equals(img.naturalWidth, expected_intrinsic_width, 'naturalWidth');
+ assert_equals(img.naturalHeight, expected_intrinsic_height, 'naturalHeigh');
+ t.done();
+ }));
+ img.srcset = srcs[2] + ' 32w';
+}, 'Test image (32 x 32) with sizes = 100 and srcset descriptor = 32w');
+
+</script>
+</body>
diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicSize-without-unsized-media.tentative.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicSize-without-unsized-media.tentative.https.sub.html
new file mode 100644
index 00000000000..4a3526425d7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicSize-without-unsized-media.tentative.https.sub.html
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<body>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+'use strict';
+
+const srcs = [
+ "/feature-policy/experimental-features/resources/image.svg",
+ "/feature-policy/experimental-features/resources/image.jpg",
+ "/feature-policy/experimental-features/resources/image.png",
+];
+
+// Set new attribute, and wait til the media element is repainted.
+function updateAttribute(e, attribute, value) {
+ return new Promise(resolve => {
+ requestAnimationFrame(() => requestAnimationFrame(() => resolve()));
+ e.setAttribute(attribute, value);
+ });
+}
+
+// Test intrinsicSize attribute with image element.
+for (var src of srcs) {
+ promise_test(async() => {
+ var img = document.createElement('IMG');
+ document.body.appendChild(img);
+ img.src = src;
+ await new Promise(resolve =>
+ img.addEventListener('load', () => resolve(), {once: true}));
+ await updateAttribute(img, 'intrinsicSize', '400 x 500');
+ assert_equals(img.width, 400, 'width');
+ assert_equals(img.height, 500, 'height');
+ assert_equals(img.naturalWidth, 400, 'naturalWidth');
+ assert_equals(img.naturalHeight, 500, 'naturalHeight');
+
+ await updateAttribute(img, 'width', '800');
+ assert_equals(img.width, 800, 'width');
+ assert_equals(img.height, 1000, 'height');
+ assert_equals(img.naturalWidth, 400, 'naturalWidth');
+ assert_equals(img.naturalHeight, 500, 'naturalHeight');
+
+ await updateAttribute(img, 'style', 'height:800px;');
+ assert_equals(img.width, 800, 'width');
+ assert_equals(img.height, 800, 'height');
+ assert_equals(img.naturalWidth, 400, 'naturalWidth');
+ assert_equals(img.naturalHeight, 500, 'naturalHeight');
+
+ await updateAttribute(img, 'width', '');
+ assert_equals(img.width, 640, 'width');
+ assert_equals(img.height, 800, 'height');
+ assert_equals(img.naturalWidth, 400, 'naturalWidth');
+ assert_equals(img.naturalHeight, 500, 'naturalHeight');
+
+ await updateAttribute(img, 'style', 'height:800px; writing-mode: vertical-rl;');
+ assert_equals(img.width, 640, 'width');
+ assert_equals(img.height, 800, 'height');
+ assert_equals(img.naturalWidth, 400, 'naturalWidth');
+ assert_equals(img.naturalHeight, 500, 'naturalHeight');
+
+ await updateAttribute(img, 'style', 'height:800px; writing-mode: horizontal-tb;');
+ assert_equals(img.width, 640, 'width');
+ assert_equals(img.height, 800, 'height');
+ assert_equals(img.naturalWidth, 400, 'naturalWidth');
+ assert_equals(img.naturalHeight, 500, 'naturalHeight');
+ }, 'Test image with src=' + src);
+}
+
+// Test intrinsicSize attribute with video element.
+promise_test(async() => {
+ var video = document.createElement('video');
+ document.body.appendChild(video);
+ video.src = "/feature-policy/experimental-features/resources/video.ogv";
+ await new Promise(resolve =>
+ video.addEventListener('canplaythrough', () => resolve(), {once: true}));
+ video.intrinsicSize = '400 x 500';
+ assert_equals(video.getBoundingClientRect().width, 400, 'width');
+ assert_equals(video.getBoundingClientRect().height, 500, 'height');
+ assert_equals(video.videoWidth, 400, 'naturalWidth');
+ assert_equals(video.videoHeight, 500, 'naturalHeight');
+
+ video.width = '800';
+ assert_equals(video.getBoundingClientRect().width, 800, 'width');
+ assert_equals(video.getBoundingClientRect().height, 1000, 'height');
+ assert_equals(video.videoWidth, 400, 'naturalWidth');
+ assert_equals(video.videoHeight, 500, 'naturalHeight');
+
+ video.style = 'height:800px;';
+ assert_equals(video.getBoundingClientRect().width, 800, 'width');
+ assert_equals(video.getBoundingClientRect().height, 800, 'height');
+ assert_equals(video.videoWidth, 400, 'naturalWidth');
+ assert_equals(video.videoHeight, 500, 'naturalHeight');
+
+ video.removeAttribute('width');
+ assert_equals(video.getBoundingClientRect().width, 640, 'width');
+ assert_equals(video.getBoundingClientRect().height, 800, 'height');
+ assert_equals(video.videoWidth, 400, 'naturalWidth');
+ assert_equals(video.videoHeight, 500, 'naturalHeight');
+}, 'Test video');
+</script>
+</body>
diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers b/tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers
new file mode 100644
index 00000000000..4fbf3f5addd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/experimental-features/intrinsicsize-without-unsized-media.tentative.https.sub.html.headers
@@ -0,0 +1 @@
+Feature-Policy: unsized-media *
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/camera-reporting.https.html b/tests/wpt/web-platform-tests/feature-policy/reporting/camera-reporting.https.html
new file mode 100644
index 00000000000..14b2ed1d37c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/camera-reporting.https.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <script>
+var t = async_test("Camera Report Format");
+
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "camera");
+ assert_equals(report.body.sourceFile, document.location.href);
+ assert_equals(typeof report.body.message, "string");
+ assert_equals(typeof report.body.lineNumber, "number");
+ assert_equals(typeof report.body.columnNumber, "number");
+};
+
+new ReportingObserver(t.step_func_done(check_report_format),
+ {types: ['feature-policy']}).observe();
+
+navigator.mediaDevices.getUserMedia({video: true}).then(
+ t.unreached_func("UserMedia camera access should not be allowed in this document.")
+).catch(() => {});
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/camera-reporting.https.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/camera-reporting.https.html.headers
new file mode 100644
index 00000000000..2adc5e237fc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/camera-reporting.https.html.headers
@@ -0,0 +1 @@
+Feature-Policy: camera 'none'
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/document-write-reporting.html b/tests/wpt/web-platform-tests/feature-policy/reporting/document-write-reporting.html
new file mode 100644
index 00000000000..cb08b8d72d1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/document-write-reporting.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <script>
+var t = async_test("Document-write Report Format");
+
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "document-write");
+ assert_equals(report.body.sourceFile, document.location.href);
+ assert_equals(typeof report.body.message, "string");
+ assert_equals(typeof report.body.lineNumber, "number");
+ assert_equals(typeof report.body.columnNumber, "number");
+};
+
+new ReportingObserver(t.step_func_done(check_report_format),
+ {types: ['feature-policy']}).observe();
+
+t.step_func(() => {
+ assert_throws('NotAllowedError',
+ () => document.write("This should not succeed"),
+ "document.write should throw an exception when disabled");
+})();
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/document-write-reporting.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/document-write-reporting.html.headers
new file mode 100644
index 00000000000..57102d5ee7c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/document-write-reporting.html.headers
@@ -0,0 +1 @@
+Feature-Policy: document-write 'none'
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/fullscreen-reporting.html b/tests/wpt/web-platform-tests/feature-policy/reporting/fullscreen-reporting.html
new file mode 100644
index 00000000000..83d97c91fab
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/fullscreen-reporting.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <div id='fs'></div>
+ <script>
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "fullscreen");
+ assert_equals(report.body.sourceFile, document.location.href);
+ assert_equals(typeof report.body.message, "string");
+ assert_equals(typeof report.body.lineNumber, "number");
+ assert_equals(typeof report.body.columnNumber, "number");
+};
+
+async_test(t => {
+ new ReportingObserver(t.step_func_done(check_report_format),
+ {types: ['feature-policy']}).observe();
+ document.getElementById('fs').requestFullscreen().then(t.unreached_func(
+ "Fullscreen should not be allowed in this document.")).catch(()=>{});
+}, "Fullscreen Report Format");
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/fullscreen-reporting.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/fullscreen-reporting.html.headers
new file mode 100644
index 00000000000..d35e48ba40d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/fullscreen-reporting.html.headers
@@ -0,0 +1 @@
+Feature-Policy: fullscreen 'none'
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/geolocation-reporting.https.html b/tests/wpt/web-platform-tests/feature-policy/reporting/geolocation-reporting.https.html
new file mode 100644
index 00000000000..22e258563b7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/geolocation-reporting.https.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <script>
+var t = async_test("Geolocation Report Format");
+
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "geolocation");
+ assert_equals(report.body.sourceFile, document.location.href);
+ assert_equals(typeof report.body.message, "string");
+ assert_equals(typeof report.body.lineNumber, "number");
+ assert_equals(typeof report.body.columnNumber, "number");
+};
+
+new ReportingObserver(t.step_func_done(check_report_format),
+ {types: ['feature-policy']}).observe();
+
+navigator.geolocation.getCurrentPosition(
+ t.unreached_func("geolocation should be disabled in this document"),
+ () => {});
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/geolocation-reporting.https.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/geolocation-reporting.https.html.headers
new file mode 100644
index 00000000000..7e75481ea6d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/geolocation-reporting.https.html.headers
@@ -0,0 +1 @@
+Feature-Policy: geolocation 'none'
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/image.jpg b/tests/wpt/web-platform-tests/feature-policy/reporting/image.jpg
new file mode 100644
index 00000000000..c059b96d97f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/image.jpg
Binary files differ
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/microphone-reporting.https.html b/tests/wpt/web-platform-tests/feature-policy/reporting/microphone-reporting.https.html
new file mode 100644
index 00000000000..7347a2332bc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/microphone-reporting.https.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <script>
+var t = async_test("Microphone Report Format");
+
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "microphone");
+ assert_equals(report.body.sourceFile, document.location.href);
+ assert_equals(typeof report.body.message, "string");
+ assert_equals(typeof report.body.lineNumber, "number");
+ assert_equals(typeof report.body.columnNumber, "number");
+};
+
+new ReportingObserver(t.step_func_done(check_report_format),
+ {types: ['feature-policy']}).observe();
+
+navigator.mediaDevices.getUserMedia({audio: true}).then(
+ t.unreached_func("UserMedia microphone access should not be allowed in this document.")
+).catch(() => {});
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/microphone-reporting.https.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/microphone-reporting.https.html.headers
new file mode 100644
index 00000000000..a86e0a07785
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/microphone-reporting.https.html.headers
@@ -0,0 +1 @@
+Feature-Policy: microphone 'none'
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/midi-reporting.html b/tests/wpt/web-platform-tests/feature-policy/reporting/midi-reporting.html
new file mode 100644
index 00000000000..8303b7adce4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/midi-reporting.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <script>
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "midi");
+ assert_equals(report.body.sourceFile, document.location.href);
+ assert_equals(typeof report.body.message, "string");
+ assert_equals(typeof report.body.lineNumber, "number");
+ assert_equals(typeof report.body.columnNumber, "number");
+};
+
+promise_test(async (t) => {
+ const report = new Promise(resolve => {
+ new ReportingObserver((reports, observer) => resolve([reports, observer]),
+ {types: ['feature-policy']}).observe();
+ });
+ await promise_rejects(t, 'SecurityError', navigator.requestMIDIAccess(),
+ "MIDI device access should not be allowed in this document.");
+ const [reports, observer] = await report;
+ check_report_format(reports, observer);
+}, "MIDI Report Format");
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/midi-reporting.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/midi-reporting.html.headers
new file mode 100644
index 00000000000..0e145978a01
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/midi-reporting.html.headers
@@ -0,0 +1 @@
+Feature-Policy: midi 'none'
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/payment-reporting.https.html b/tests/wpt/web-platform-tests/feature-policy/reporting/payment-reporting.https.html
new file mode 100644
index 00000000000..03eaebea58f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/payment-reporting.https.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <script>
+var t = async_test("PaymentRequest Report Format");
+
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "payment");
+ assert_equals(report.body.sourceFile, document.location.href);
+ assert_equals(typeof report.body.message, "string");
+ assert_equals(typeof report.body.lineNumber, "number");
+ assert_equals(typeof report.body.columnNumber, "number");
+};
+
+new ReportingObserver(t.step_func_done(check_report_format),
+ {types: ['feature-policy']}).observe();
+
+t.step_func(() => {
+ assert_throws('SecurityError',
+ () => new PaymentRequest(
+ [{ supportedMethods: 'basic-card' }],
+ { total: { label: 'Total', amount: { currency: 'USD', value: 0 }}},
+ {}).show(),
+ "PaymentRequest API should not be allowed in this document.");
+})();
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/payment-reporting.https.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/payment-reporting.https.html.headers
new file mode 100644
index 00000000000..a2836778bc5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/payment-reporting.https.html.headers
@@ -0,0 +1 @@
+Feature-Policy: payment 'none'
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/sync-xhr-reporting.html b/tests/wpt/web-platform-tests/feature-policy/reporting/sync-xhr-reporting.html
new file mode 100644
index 00000000000..2c76390847b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/sync-xhr-reporting.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <script>
+var t = async_test("Sync-xhr Report Format");
+
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "sync-xhr");
+ assert_equals(report.body.sourceFile, document.location.href);
+ assert_equals(typeof report.body.message, "string");
+ assert_equals(typeof report.body.lineNumber, "number");
+ assert_equals(typeof report.body.columnNumber, "number");
+};
+
+new ReportingObserver(t.step_func_done(check_report_format),
+ {types: ['feature-policy']}).observe();
+
+t.step_func(() => {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", document.location.href, false);
+ assert_throws('NetworkError',
+ () => xhr.send(),
+ "Synchronous XHR.send should throw an exception when disabled");
+})();
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/sync-xhr-reporting.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/sync-xhr-reporting.html.headers
new file mode 100644
index 00000000000..21a909e1fb6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/sync-xhr-reporting.html.headers
@@ -0,0 +1 @@
+Feature-Policy: sync-xhr 'none'
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/unsized-media-reporting.html b/tests/wpt/web-platform-tests/feature-policy/reporting/unsized-media-reporting.html
new file mode 100644
index 00000000000..8bd79318950
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/unsized-media-reporting.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <img src="image.jpg">
+ <script>
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "unsized-media");
+ assert_equals(typeof report.body.message, "string");
+};
+
+async_test(t => {
+ new ReportingObserver(t.step_func_done(check_report_format),
+ {types: ['feature-policy'], buffered: true}).observe();
+}, "Unsized-media Report Format");
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/unsized-media-reporting.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/unsized-media-reporting.html.headers
new file mode 100644
index 00000000000..db2dcbc1929
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/unsized-media-reporting.html.headers
@@ -0,0 +1 @@
+Feature-Policy: unsized-media 'none'
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/usb-reporting.https.html b/tests/wpt/web-platform-tests/feature-policy/reporting/usb-reporting.https.html
new file mode 100644
index 00000000000..f90c602e449
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/usb-reporting.https.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src='/resources/testharness.js'></script>
+ <script src='/resources/testharnessreport.js'></script>
+ </head>
+ <body>
+ <script>
+var t = async_test("USB Report Format");
+
+var check_report_format = (reports, observer) => {
+ let report = reports[0];
+ assert_equals(report.type, "feature-policy");
+ assert_equals(report.url, document.location.href);
+ assert_equals(report.body.feature, "usb");
+ assert_equals(report.body.sourceFile, document.location.href);
+ assert_equals(typeof report.body.message, "string");
+ assert_equals(typeof report.body.lineNumber, "number");
+ assert_equals(typeof report.body.columnNumber, "number");
+};
+
+new ReportingObserver(t.step_func_done(check_report_format),
+ {types: ['feature-policy']}).observe();
+
+navigator.usb.getDevices().then(
+ t.unreached_func("USB device access should not be allowed in this document.")
+).catch(() => {});
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/feature-policy/reporting/usb-reporting.https.html.headers b/tests/wpt/web-platform-tests/feature-policy/reporting/usb-reporting.https.html.headers
new file mode 100644
index 00000000000..4fd1e269362
--- /dev/null
+++ b/tests/wpt/web-platform-tests/feature-policy/reporting/usb-reporting.https.html.headers
@@ -0,0 +1 @@
+Feature-Policy: usb 'none'
diff --git a/tests/wpt/web-platform-tests/fetch/api/basic/header-value-null-byte.any.js b/tests/wpt/web-platform-tests/fetch/api/basic/header-value-null-byte.any.js
new file mode 100644
index 00000000000..9c223740c78
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/api/basic/header-value-null-byte.any.js
@@ -0,0 +1,5 @@
+// META: global=window,worker
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), fetch("../../../xhr/resources/parse-headers.py?my-custom-header="+encodeURIComponent("x\0x")));
+}, "Ensure fetch() rejects null bytes in headers");
diff --git a/tests/wpt/web-platform-tests/fetch/api/request/request-init-stream.any.js b/tests/wpt/web-platform-tests/fetch/api/request/request-init-stream.any.js
new file mode 100644
index 00000000000..22e3f41bc2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/api/request/request-init-stream.any.js
@@ -0,0 +1,51 @@
+// META: global=window,worker
+
+"use strict";
+
+async function assert_request(input, init) {
+ assert_throws(new TypeError(), () => new Request(input, init), "new Request()");
+ assert_throws(new TypeError(), async () => await fetch(input, init), "fetch()");
+}
+
+promise_test(async () => {
+ const stream = new ReadableStream();
+ stream.getReader();
+ await assert_request("...", { method:"POST", body: stream });
+}, "Constructing a Request with a stream on which getReader() is called");
+
+promise_test(async () => {
+ const stream = new ReadableStream();
+ stream.getReader().read();
+ await assert_request("...", { method:"POST", body: stream });
+}, "Constructing a Request with a stream on which read() is called");
+
+promise_test(async () => {
+ const stream = new ReadableStream({ pull: c => c.enqueue(new Uint8Array()) }),
+ reader = stream.getReader();
+ await reader.read();
+ reader.releaseLock();
+ await assert_request("...", { method:"POST", body: stream });
+}, "Constructing a Request with a stream on which read() and releaseLock() are called");
+
+promise_test(async () => {
+ const request = new Request("...", { method: "POST", body: "..." });
+ request.body.getReader();
+ await assert_request(request);
+ assert_class_string(new Request(request, { body: "..." }), "Request");
+}, "Constructing a Request with a Request on which body.getReader() is called");
+
+promise_test(async () => {
+ const request = new Request("...", { method: "POST", body: "..." });
+ request.body.getReader().read();
+ await assert_request(request);
+ assert_class_string(new Request(request, { body: "..." }), "Request");
+}, "Constructing a Request with a Request on which body.getReader().read() is called");
+
+promise_test(async () => {
+ const request = new Request("...", { method: "POST", body: "..." }),
+ reader = request.body.getReader();
+ await reader.read();
+ reader.releaseLock();
+ await assert_request(request);
+ assert_class_string(new Request(request, { body: "..." }), "Request");
+}, "Constructing a Request with a Request on which read() and releaseLock() are called");
diff --git a/tests/wpt/web-platform-tests/fetch/api/response/response-from-stream.any.js b/tests/wpt/web-platform-tests/fetch/api/response/response-from-stream.any.js
new file mode 100644
index 00000000000..93b29b42867
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/api/response/response-from-stream.any.js
@@ -0,0 +1,23 @@
+// META: global=window,worker
+
+"use strict";
+
+test(() => {
+ const stream = new ReadableStream();
+ stream.getReader();
+ assert_throws(new TypeError(), () => new Response(stream));
+}, "Constructing a Response with a stream on which getReader() is called");
+
+test(() => {
+ const stream = new ReadableStream();
+ stream.getReader().read();
+ assert_throws(new TypeError(), () => new Response(stream));
+}, "Constructing a Response with a stream on which read() is called");
+
+promise_test(async () => {
+ const stream = new ReadableStream({ pull: c => c.enqueue(new Uint8Array()) }),
+ reader = stream.getReader();
+ await reader.read();
+ reader.releaseLock();
+ assert_throws(new TypeError(), () => new Response(stream));
+}, "Constructing a Response with a stream on which read() and releaseLock() are called");
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/font.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/font.tentative.https.sub.html
index 65432b5bacf..0a75531c405 100644
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/font.tentative.https.sub.html
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/font.tentative.https.sub.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-
+<html>
<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
@@ -43,62 +43,42 @@
</body>
<script>
document.fonts.ready.then(function () {
- test_same_origin();
- test_same_site();
- test_cross_site();
- });
-
- function test_same_origin(){
- var same_origin_test = async_test("Same-Origin font");
- same_origin_test.step(function () {
- key = "font-same-origin";
- expected_same_origin = {"destination":"font", "site":"same-origin"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- same_origin_xhr = new XMLHttpRequest();
- same_origin_xhr.open("PUT", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
-
- // Async test step triggered when the response is loaded
- same_origin_xhr.onreadystatechange = same_origin_test.step_func(function () {
- verify_response(same_origin_xhr, same_origin_test, expected_same_origin)
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "font-same-origin";
+ let expected = {"destination":"font", "site":"same-origin"};
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
});
- same_origin_xhr.send();
- });
- }
-
- function test_same_site(){
- var same_site_test = async_test("Same-Site font");
- same_site_test.step(function () {
- key = "font-same-site";
- expected_same_site = {"destination":"font", "site":"same-site"};
+ }, "Same-Origin font");
- // Requests from the server the saved value of the Sec-Metadata header
- same_site_xhr = new XMLHttpRequest();
- same_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
-
- // Async test step triggered when the response is loaded
- same_site_xhr.onreadystatechange = same_site_test.step_func(function () {
- verify_response(same_site_xhr, same_site_test, expected_same_site)
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "font-same-site";
+ let expected = {"destination":"font", "site":"same-site"};
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
});
- same_site_xhr.send();
- });
- }
-
- function test_cross_site(){
- var cross_site_test = async_test("Cross-Site font");
- cross_site_test.step(function () {
- key = "font-cross-site";
- expected_cross_site = {"destination":"font", "site":"cross-site"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- cross_site_xhr = new XMLHttpRequest();
- cross_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
+ }, "Same-Site font");
- // Async test step triggered when the response is loaded
- cross_site_xhr.onreadystatechange = cross_site_test.step_func(function () {
- verify_response(cross_site_xhr, cross_site_test, expected_cross_site)
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "font-cross-site";
+ let expected = {"destination":"font", "site":"cross-site"};
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
});
- cross_site_xhr.send();
- });
- }
+ }, "Cross-Site font");
+
+ });
</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html
new file mode 100644
index 00000000000..9f497a9b62b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+
+<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=/fetch/sec-metadata/resources/helper.js></script>
+<body></body>
+<script>
+promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-cross-site-same-origin";
+
+ let e = document.createElement('img');
+ e.src = "https://{{hosts[alt][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ let expected = {"destination":"image", "site":"cross-site"};
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Cross-Site -> Same-Origin redirect");
+
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-cross-site-same-site";
+
+ let e = document.createElement('img');
+ e.src = "https://{{hosts[alt][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ let expected = {"destination":"image", "site":"cross-site"};
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Cross-Site -> Same-Site redirect");
+
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-cross-site-cross-site";
+
+ let e = document.createElement('img');
+ e.src = "https://{{hosts[alt][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ let expected = {"destination":"image", "site":"cross-site"};
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Cross-Site -> Cross-Site redirect");
+</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html
deleted file mode 100644
index e25fd3f61d5..00000000000
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-
-<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/fetch/sec-metadata/resources/helper.js></script>
-<body>
- <!-- redirect Cross-Site -> Cross-Site -->
- <img onload="test_cross_site()" onerror="test_cross_site()" src="https://{{hosts[alt][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=redirect-cross-site-cross-site"></img>
-</body>
-
-<script>
- function test_cross_site(){
- var cross_site_test = async_test("Cross-Site -> Cross-Site redirect");
- cross_site_test.step(function () {
- filename = "redirect-cross-site-cross-site";
- expected_cross_site = {"destination":"image", "site":"cross-site"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- cross_site_xhr = new XMLHttpRequest();
- cross_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + filename);
-
- // Async test step triggered when the response is loaded
- cross_site_xhr.onreadystatechange = cross_site_test.step_func(function () {
- verify_response(cross_site_xhr, cross_site_test, expected_cross_site)
- });
- cross_site_xhr.send();
- });
- }
-</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html
deleted file mode 100644
index ac5982d8956..00000000000
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-
-<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/fetch/sec-metadata/resources/helper.js></script>
-<body>
-
- <!-- redirect Cross-Site -> Same-Origin -->
- <img onload="test_same_origin()" onerror="test_same_origin()" src="https://{{hosts[alt][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=redirect-cross-site-same-origin"></img>
-</body>
-
-<script>
- function test_same_origin(){
- var same_origin_test = async_test("Cross-Site -> Same-Origin redirect");
- same_origin_test.step(function () {
- filename = "redirect-cross-site-same-origin";
- expected_same_origin = {"destination":"image", "site":"cross-site"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- same_origin_xhr = new XMLHttpRequest();
- same_origin_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + filename);
-
- // Async test step triggered when the response is loaded
- same_origin_xhr.onreadystatechange = same_origin_test.step_func(function () {
- verify_response(same_origin_xhr, same_origin_test, expected_same_origin)
- });
- same_origin_xhr.send();
- });
- }
-</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html
deleted file mode 100644
index 5b3b965f5e9..00000000000
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-
-<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/fetch/sec-metadata/resources/helper.js></script>
-<body>
- <!-- redirect Cross-Site -> Same-Site -->
- <img onload="test_same_site()" onerror="test_same_site()" src="https://{{hosts[alt][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=redirect-cross-site-same-site"></img>
-</body>
-
-<script>
- function test_same_site(){
- var same_site_test = async_test("Cross-Site -> Same-Site redirect");
- same_site_test.step(function () {
- filename = "redirect-cross-site-same-site";
- expected_same_site = {"destination":"image", "site":"cross-site"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- same_site_xhr = new XMLHttpRequest();
- same_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + filename);
-
- // Async test step triggered when the response is loaded
- same_site_xhr.onreadystatechange = same_site_test.step_func(function () {
- verify_response(same_site_xhr, same_site_test, expected_same_site)
- });
- same_site_xhr.send();
- });
- }
-</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html
new file mode 100644
index 00000000000..fdd8733ba6d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+
+<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=/fetch/sec-metadata/resources/helper.js></script>
+<body></body>
+<script>
+promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-multiple-cross-site";
+
+ let e = document.createElement('img');
+ e.src = "https://{{host}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=" +// same-origin
+ "https://{{hosts[alt][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=" +// cross-site
+ "https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;// same-origin
+ let expected = {"destination":"image", "site":"cross-site"};
+
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Same-Origin -> Cross-Site -> Same-Origin redirect");
+</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html
new file mode 100644
index 00000000000..8fdc943f4c9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+
+<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=/fetch/sec-metadata/resources/helper.js></script>
+<body></body>
+<script>
+promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-multiple-same-site";
+
+ let e = document.createElement('img');
+ e.src = "https://{{host}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=" +// same-origin
+ "https://{{hosts[][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=" +// same-site
+ "https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;// same-origin
+ let expected = {"destination":"image", "site":"same-site"};
+
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Same-Origin -> Same-Site -> Same-Origin redirect");
+</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html
new file mode 100644
index 00000000000..dea71c3f67d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+
+<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=/fetch/sec-metadata/resources/helper.js></script>
+<body></body>
+<script>
+promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-same-origin-same-origin";
+
+ let e = document.createElement('img');
+ e.src = "/xhr/resources/redirect.py?location=https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ let expected = {"destination":"image", "site":"same-origin"};
+
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Same-Origin -> Same-Origin redirect");
+
+promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-same-origin-same-site";
+
+ let e = document.createElement('img');
+ e.src = "/xhr/resources/redirect.py?location=https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ let expected = {"destination":"image", "site":"same-site"};
+
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Same-Origin -> Same-Site redirect");
+
+promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-same-origin-cross-site";
+
+ let e = document.createElement('img');
+ e.src = "/xhr/resources/redirect.py?location=https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ let expected = {"destination":"image", "site":"cross-site"};
+
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Same-Origin -> Cross-Site redirect");
+</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html
deleted file mode 100644
index ea6b167673f..00000000000
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-
-<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/fetch/sec-metadata/resources/helper.js></script>
-<body>
- <!-- redirect Same-Origin -> Cross-Site -->
- <img onload="test_cross_site()" onerror="test_cross_site()" src="https://{{host}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=redirect-same-origin-cross-site"></img>
-</body>
-
-<script>
- function test_cross_site(){
- var cross_site_test = async_test("Same-Origin -> Cross-Site redirect");
- cross_site_test.step(function () {
- filename = "redirect-same-origin-cross-site";
- expected_cross_site = {"destination":"image", "site":"same-origin"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- cross_site_xhr = new XMLHttpRequest();
- cross_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + filename);
-
- // Async test step triggered when the response is loaded
- cross_site_xhr.onreadystatechange = cross_site_test.step_func(function () {
- verify_response(cross_site_xhr, cross_site_test, expected_cross_site)
- });
- cross_site_xhr.send();
- });
- }
-</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html
deleted file mode 100644
index 430990a57c4..00000000000
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-
-<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/fetch/sec-metadata/resources/helper.js></script>
-<body>
-
- <!-- redirect Same-Origin -> Same-Origin -->
- <img onload="test_same_origin()" onerror="test_same_origin()" src="https://{{host}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=redirect-same-origin-same-origin"></img>
-</body>
-
-<script>
- function test_same_origin(){
- var same_origin_test = async_test("Same-Origin -> Same-Origin redirect");
- same_origin_test.step(function () {
- filename = "redirect-same-origin-same-origin";
- expected_same_origin = {"destination":"image", "site":"same-origin"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- same_origin_xhr = new XMLHttpRequest();
- same_origin_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + filename);
-
- // Async test step triggered when the response is loaded
- same_origin_xhr.onreadystatechange = same_origin_test.step_func(function () {
- verify_response(same_origin_xhr, same_origin_test, expected_same_origin)
- });
- same_origin_xhr.send();
- });
- }
-</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html
deleted file mode 100644
index 591cf67d181..00000000000
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-
-<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/fetch/sec-metadata/resources/helper.js></script>
-<body>
-
- <!-- redirect Same-Origin -> Same-Site -->
- <img onload="test_same_site()" onerror="test_same_site()" src="https://{{host}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=redirect-same-origin-same-site"></img>
-</body>
-
-<script>
- function test_same_site(){
- var same_site_test = async_test("Same-Origin -> Same-Site redirect");
- same_site_test.step(function () {
- filename = "redirect-same-origin-same-site";
- expected_same_site = {"destination":"image", "site":"same-origin"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- same_site_xhr = new XMLHttpRequest();
- same_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + filename);
-
- // Async test step triggered when the response is loaded
- same_site_xhr.onreadystatechange = same_site_test.step_func(function () {
- verify_response(same_site_xhr, same_site_test, expected_same_site)
- });
- same_site_xhr.send();
- });
- }
-</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html
new file mode 100644
index 00000000000..a71163a1bfc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+
+<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=/fetch/sec-metadata/resources/helper.js></script>
+<body></body>
+<script>
+promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-same-site-same-origin";
+
+ let e = document.createElement('img');
+ e.src = "https://{{hosts[][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ let expected = {"destination":"image", "site":"same-site"};
+
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Same-Site -> Same-Origin redirect");
+
+promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-same-site-same-site";
+
+ let e = document.createElement('img');
+ e.src = "https://{{hosts[][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ let expected = {"destination":"image", "site":"same-site"};
+
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Same-Site -> Same-Site redirect");
+
+promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "redirect-same-site-cross-site";
+
+ let e = document.createElement('img');
+ e.src = "https://{{hosts[][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ let expected = {"destination":"image", "site":"cross-site"};
+
+ e.onload = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+ e.onerror = e => {
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
+
+ document.body.appendChild(e);
+ })
+ }, "Same-Site -> Cross-Site redirect");
+</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html
deleted file mode 100644
index 8592d02c269..00000000000
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-
-<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/fetch/sec-metadata/resources/helper.js></script>
-<body>
-
- <!-- redirect Same-Site -> Cross-Site -->
- <img onload="test_cross_site()" onerror="test_cross_site()" src="https://{{hosts[][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=redirect-same-site-cross-site"></img>
-</body>
-
-<script>
- function test_cross_site(){
- var cross_site_test = async_test("Same-Site -> Cross-Site redirect");
- cross_site_test.step(function () {
- key = "redirect-same-site-cross-site";
- expected_cross_site = {"destination":"image", "site":"same-site"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- cross_site_xhr = new XMLHttpRequest();
- cross_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
-
- // Async test step triggered when the response is loaded
- cross_site_xhr.onreadystatechange = cross_site_test.step_func(function () {
- verify_response(cross_site_xhr, cross_site_test, expected_cross_site)
- });
- cross_site_xhr.send();
- });
- }
-</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html
deleted file mode 100644
index 191dbaa7f77..00000000000
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-
-<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/fetch/sec-metadata/resources/helper.js></script>
-<body>
-
- <!-- redirect Same-Site -> Same-Origin -->
- <img onload="test_same_origin()" onerror="test_same_origin()" src="https://{{hosts[][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=redirect-same-site-same-origin"></img>
-</body>
-
-<script>
- function test_same_origin(){
- var same_origin_test = async_test("Same-Site -> Same-Origin redirect");
- same_origin_test.step(function () {
- key = "redirect-same-site-same-origin";
- expected_same_origin = {"destination":"image", "site":"same-site"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- same_origin_xhr = new XMLHttpRequest();
- same_origin_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
-
- // Async test step triggered when the response is loaded
- same_origin_xhr.onreadystatechange = same_origin_test.step_func(function () {
- verify_response(same_origin_xhr, same_origin_test, expected_same_origin)
- });
- same_origin_xhr.send();
- });
- }
-</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html
deleted file mode 100644
index 11d60473981..00000000000
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-
-<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/fetch/sec-metadata/resources/helper.js></script>
-<body>
-
- <!-- redirect Same-Site -> Same-Site -->
- <img onload="test_same_site()" onerror="test_same_site()" src="https://{{hosts[][www]}}:{{ports[https][0]}}/xhr/resources/redirect.py?location=https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=redirect-same-site-same-site"></img>
-</body>
-
-<script>
- function test_same_site(){
- var same_site_test = async_test("Same-Site -> Same-Site redirect");
- same_site_test.step(function () {
- key = "redirect-same-site-same-site";
- expected_same_site = {"destination":"image", "site":"same-site"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- same_site_xhr = new XMLHttpRequest();
- same_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
-
- // Async test step triggered when the response is loaded
- same_site_xhr.onreadystatechange = same_site_test.step_func(function () {
- verify_response(same_site_xhr, same_site_test, expected_same_site)
- });
- same_site_xhr.send();
- });
- }
-</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/helper.js b/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/helper.js
index cbd96d06863..55e36d49fac 100644
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/helper.js
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/helper.js
@@ -17,10 +17,3 @@ function assert_header_equals(value, expected) {
assert_equals(result.target, expected.target, "target");
assert_equals(result.site, expected.site, "site");
}
-
-function verify_response(xhr, test, expected){
- if (xhr.readyState === 4) {
- assert_header_equals(xhr.responseText, expected);
- test.done();
- }
-}
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/post-to-owner.py b/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/post-to-owner.py
index fe08cd1cbca..5472aa5b47e 100644
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/post-to-owner.py
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/post-to-owner.py
@@ -12,5 +12,5 @@ def main(request, response):
if (window.top != window)
window.top.postMessage(data, "*");
</script>
- """ % json.dumps(request.headers["sec-metadata"])
+ """ % json.dumps(request.headers.get("Sec-Metadata", ""))
return headers, body
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/record-header.py b/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/record-header.py
index 06157e4cd8b..4c30d1e52ac 100644
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/record-header.py
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/record-header.py
@@ -21,20 +21,23 @@ def main(request, response):
if 'retrieve' in request.GET:
response.writer.write_status(200)
response.writer.end_headers()
- header_value = request.server.stash.take(testId)
- if header_value != None:
+ try:
+ header_value = request.server.stash.take(testId)
response.writer.write(header_value)
+ except (KeyError, ValueError) as e:
+ response.writer.write("No header has been recorded")
+ pass
response.close_connection = True
## Record incoming Sec-Metadata header value
else:
- ## Return empty string as a default value ##
- header = request.headers.get("Sec-Metadata", "")
try:
+ ## Return empty string as a default value ##
+ header = request.headers.get("Sec-Metadata", "")
request.server.stash.put(testId, header)
except KeyError:
- ## The header is already recorded
+ ## The header is already recorded or it doesn't exist
pass
## Prevent the browser from caching returned responses and allow CORS ##
@@ -61,6 +64,7 @@ def main(request, response):
## Return a valid font content and Content-Type ##
if key.startswith("font"):
+ response.headers.set("Content-Type", "application/x-font-ttf")
file = open("fonts/Ahem.ttf", "r")
font = file.read()
file.close()
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub.html
index 9d1fe2a3449..cefabb20aaa 100644
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub.html
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub.html
@@ -8,7 +8,7 @@
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
- navigator.serviceWorker.register('/fetch/sec-metadata/resources/record-header.py?file=serviceworker-same-origin').then(function(registration) {
+ navigator.serviceWorker.register('https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=serviceworker-same-origin').then(function(registration) {
test_same_origin();
// uninstall the serviceworker after the test
@@ -32,20 +32,16 @@
<script>
function test_same_origin(){
- var same_origin_test = async_test("Same-Origin serviceworker");
- same_origin_test.step(function () {
- key = "serviceworker-same-origin";
- expected_same_origin = {"destination":"serviceworker", "site":"same-origin"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- same_origin_xhr = new XMLHttpRequest();
- same_origin_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
-
- // Async test step triggered when the response is loaded
- same_origin_xhr.onreadystatechange = same_origin_test.step_func(function () {
- verify_response(same_origin_xhr, same_origin_test, expected_same_origin)
- });
- same_origin_xhr.send();
- });
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "serviceworker-same-origin";
+ let expected = {"destination":"serviceworker", "site":"same-origin"};
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ })
+ })
}
</script>
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/sharedworker.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/sharedworker.tentative.https.sub.html
index aa118e04239..09017ccbb3a 100644
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/sharedworker.tentative.https.sub.html
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/sharedworker.tentative.https.sub.html
@@ -23,22 +23,18 @@
}
function test_same_origin(){
- var same_origin_test = async_test("Same-Origin sharedworker");
- same_origin_test.step(function () {
- key = "sharedworker-same-origin";
- expected_same_origin = {"destination":"sharedworker", "site":"same-origin"};
-
- // Requests from the server the saved value of the Sec-Metadata header
- same_origin_xhr = new XMLHttpRequest();
- same_origin_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
-
- // Async test step triggered when the response is loaded
- same_origin_xhr.onreadystatechange = same_origin_test.step_func(function () {
- verify_response(same_origin_xhr, same_origin_test, expected_same_origin)
- });
- same_origin_xhr.send();
- });
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "sharedworker-same-origin";
+ let expected = {"destination":"sharedworker", "site":"same-origin"};
+
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ })
+ }, "Same-Origin sharedworker")
}
</script>
<body></body>
-
diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/style.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/style.tentative.https.sub.html
index 78fac567b43..609d5764f08 100644
--- a/tests/wpt/web-platform-tests/fetch/sec-metadata/style.tentative.https.sub.html
+++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/style.tentative.https.sub.html
@@ -1,75 +1,70 @@
<!DOCTYPE html>
-
+<html>
<link rel="author" href="mtrzos@google.com" title="Maciek Trzos">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/fetch/sec-metadata/resources/helper.js></script>
+<body></body>
<script>
- function test_same_origin() {
- var same_origin_test = async_test("Same-Origin style");
- same_origin_test.step(function () {
- key = "style-same-origin";
- expected_same_origin = {"destination":"style", "site":"same-origin"};
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "style-same-origin";
- // Requests from the server the saved value of the Sec-Metadata header
- same_origin_xhr = new XMLHttpRequest();
- same_origin_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
+ let e = document.createElement('link');
+ e.rel = "stylesheet";
+ e.href = "https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ e.onload = e => {
+ let expected = {"destination":"style", "site":"same-origin"};
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
- // Async test step triggered when the response is loaded
- same_origin_xhr.onreadystatechange = same_origin_test.step_func(function () {
- verify_response(same_origin_xhr, same_origin_test, expected_same_origin)
- });
- same_origin_xhr.send();
- });
- }
+ document.body.appendChild(e);
+ })
+ }, "Same-Origin style");
- function test_same_site() {
- var same_site_test = async_test("Same-Site style");
- same_site_test.step(function () {
- key = "style-same-site";
- expected_same_site = {"destination":"style", "site":"same-site"};
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "style-same-site";
- // Requests from the server the saved value of the Sec-Metadata header
- same_site_xhr = new XMLHttpRequest();
- same_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
+ let e = document.createElement('link');
+ e.rel = "stylesheet";
+ e.href = "https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ e.onload = e => {
+ let expected = {"destination":"style", "site":"same-site"};
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
- // Async test step triggered when the response is loaded
- same_site_xhr.onreadystatechange = same_site_test.step_func(function () {
- verify_response(same_site_xhr, same_site_test, expected_same_site)
- });
- same_site_xhr.send();
- });
- }
+ document.body.appendChild(e);
+ })
+ }, "Same-Site style");
- function test_cross_site() {
- var cross_site_test = async_test("Cross-Site style");
- cross_site_test.step(function () {
- key = "style-cross-site";
- expected_cross_site = {"destination":"style", "site":"cross-site"};
+ promise_test(t => {
+ return new Promise((resolve, reject) => {
+ let key = "style-cross-site";
- // Requests from the server the saved value of the Sec-Metadata header
- cross_site_xhr = new XMLHttpRequest();
- cross_site_xhr.open("GET", "/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key);
+ let e = document.createElement('link');
+ e.rel = "stylesheet";
+ e.href = "https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=" + key;
+ e.onload = e => {
+ let expected = {"destination":"style", "site":"cross-site"};
+ fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+ .then(response => response.text())
+ .then(text => assert_header_equals(text, expected))
+ .then(_ => resolve())
+ .catch(e => reject(e));
+ };
- // Async test step triggered when the response is loaded
- cross_site_xhr.onreadystatechange = cross_site_test.step_func(function () {
- verify_response(cross_site_xhr, cross_site_test, expected_cross_site)
- });
- cross_site_xhr.send();
- });
- }
+ document.body.appendChild(e);
+ })
+ }, "Cross-Site style");
</script>
-<body>
- <!-- Same-Origin request -->
- <link href="https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=style-same-origin"
- rel="stylesheet" onload="test_same_origin()" onerror="test_same_origin()">
-
- <!-- Same-Site request -->
- <link href="https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=style-same-site"
- rel="stylesheet" onload="test_same_site()" onerror="test_same_site()">
-
- <!-- Cross-Site request -->
- <link href="https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=style-cross-site"
- rel="stylesheet" onload="test_cross_site()" onerror="test_cross_site()">
-</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-containing-iframe-manual.html b/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-containing-iframe-manual.html
index 66f99688f14..8ba2ab71b15 100644
--- a/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-containing-iframe-manual.html
+++ b/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-containing-iframe-manual.html
@@ -13,9 +13,12 @@ async_test(function(t)
trusted_request(t, iframes[0].contentDocument.body, document.body);
iframes[0].contentDocument.onfullscreenchange = t.step_func(function()
{
+ assert_equals(document.fullscreenElement, iframes[0]);
trusted_request(t, iframes[1].contentDocument.body, iframes[0].contentDocument.body);
- iframes[1].contentDocument.onfullscreenchange = t.unreached_func("fullscreenchange event");
- iframes[1].contentDocument.onfullscreenerror = t.step_func_done();
+ iframes[1].contentDocument.onfullscreenchange = t.step_func_done(function() {
+ assert_equals(document.fullscreenElement, iframes[1]);
+ });
+ iframes[1].contentDocument.onfullscreenerror = t.unreached_func("fullscreenchange error");
});
});
</script>
diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-fullscreen-element-sibling-manual.html b/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-fullscreen-element-sibling-manual.html
index dc0c28c78e1..f800093ec8e 100644
--- a/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-fullscreen-element-sibling-manual.html
+++ b/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-fullscreen-element-sibling-manual.html
@@ -13,10 +13,12 @@ async_test(function(t)
var b = document.getElementById("b");
document.onfullscreenchange = t.step_func(function()
{
- assert_equals(document.fullscreenElement, a, "fullscreen element");
+ assert_equals(document.fullscreenElement, a, "fullscreen element is a");
trusted_request(t, b, a);
- document.onfullscreenchange = t.unreached_func("second fullscreenchange event");
- document.onfullscreenerror = t.step_func_done();
+ document.onfullscreenchange = t.step_func_done(function() {
+ assert_equals(document.fullscreenElement, b, "fullscreen element is b");
+ });
+ document.onfullscreenerror = t.unreached_func("second fullscreenchange event");
});
trusted_request(t, a);
});
diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-non-top-manual.html b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-non-top-manual.html
index 06c4c1b0367..0764e9c8423 100644
--- a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-non-top-manual.html
+++ b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-non-top-manual.html
@@ -21,7 +21,9 @@ async_test(function(t)
{
assert_equals(document.fullscreenElement, last);
trusted_request(t, first, last);
- document.onfullscreenerror = t.step_func_done();
+ document.onfullscreenchange = t.step_func_done(function() {
+ assert_equals(document.fullscreenElement, first);
+ });
});
});
});
diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.html b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.html
index 9611c816566..3291664c63a 100644
--- a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.html
+++ b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-elements-manual.html
@@ -19,8 +19,11 @@ async_test(t => {
assert_in_array(document.fullscreenElement, [a, b]);
order.push(document.fullscreenElement.id);
if (order.length == 2) {
- assert_array_equals(order, ['b', 'a'],
- 'fullscreenElement IDs in fullscreenchange events');
+ // Since fullscreenchange event occurs at animation frame timing we might
+ // have not seen the transition from null -> 'b' but just see the
+ // resulting 'a' transition twice.
+ assert_true(order[0] == 'a' || order[0] == 'b', 'first id seen is a or b');
+ assert_true(order[1] == 'a', 'second id seen is b');
t.done();
}
});
diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.html b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.html
index 99a7672e71c..94b38c0302a 100644
--- a/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.html
+++ b/tests/wpt/web-platform-tests/fullscreen/api/element-request-fullscreen-two-iframes-manual.html
@@ -21,8 +21,11 @@ async_test(t => {
assert_in_array(document.fullscreenElement, [a, b]);
order.push(document.fullscreenElement.id);
if (order.length == 2) {
- assert_array_equals(order, ['b', 'a'],
- 'fullscreenElement IDs in fullscreenchange events');
+ // Since fullscreenchange event occurs at animation frame timing we might
+ // have not seen the transition from null -> 'b' but just see the
+ // resulting 'a' transition twice.
+ assert_true(order[0] == 'a' || order[0] == 'b', 'first id seen is a or b');
+ assert_true(order[1] == 'a', 'second id seen is b');
t.done();
}
});
diff --git a/tests/wpt/web-platform-tests/fullscreen/rendering/fullscreen-root-block-scroll-manual.html b/tests/wpt/web-platform-tests/fullscreen/rendering/fullscreen-root-block-scroll-manual.html
new file mode 100644
index 00000000000..ae57d8a9f23
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fullscreen/rendering/fullscreen-root-block-scroll-manual.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<style>
+ body {
+ height: 10000px;
+ background: grey;
+ }
+</style>
+<title>fullscreen root block scrolling</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<div>This page tests that entering fullscreen doesn't adjust the scroll offset</div>
+<script>
+async_test(t => {
+ document.scrollingElement.scrollTop = 300;
+ document.onfullscreenchange = t.step_func_done(() => {
+ assert_equals(document.fullscreenElement, document.documentElement);
+ assert_not_equals(document.scrollingElement.scrollTop, 0);
+ });
+ document.documentElement.addEventListener('click', e => {
+ document.documentElement.requestFullscreen();
+ }, {once: true});
+ test_driver.click(document.documentElement);
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/fullscreen/rendering/fullscreen-root-block-size-manual.html b/tests/wpt/web-platform-tests/fullscreen/rendering/fullscreen-root-block-size-manual.html
new file mode 100644
index 00000000000..989a85d91c4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fullscreen/rendering/fullscreen-root-block-size-manual.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<style>
+ html, body {
+ margin: 0px;
+ }
+</style>
+<title>fullscreen root block sizing</title>
+<!-- This page intentionally has no content. It needs to have
+no width or height. This is to ensure that the root element
+gets sizing in fullscreen mode as it does in as it does not
+in fullscreen mode.
+-->
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script>
+async_test(t => {
+ document.onfullscreenchange = t.step_func_done(() => {
+ assert_equals(document.fullscreenElement, document.documentElement);
+ assert_true(document.documentElement.getBoundingClientRect().width > 0);
+ });
+ document.documentElement.addEventListener('click', e => {
+ document.documentElement.requestFullscreen();
+ }, {once: true});
+ test_driver.click(document.documentElement);
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/hr-time/resources/unload-a.html b/tests/wpt/web-platform-tests/hr-time/resources/unload-a.html
new file mode 100644
index 00000000000..40c1d061830
--- /dev/null
+++ b/tests/wpt/web-platform-tests/hr-time/resources/unload-a.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Helper page for ../unload-manual.html</title>
+</head>
+<body>
+ <script src="./unload.js"></script>
+ <script>
+ setupListeners("a", "./unload-b.html");
+ </script>
+ <button id="proceed">Click me!</button>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/hr-time/resources/unload-b.html b/tests/wpt/web-platform-tests/hr-time/resources/unload-b.html
new file mode 100644
index 00000000000..7c2d90df275
--- /dev/null
+++ b/tests/wpt/web-platform-tests/hr-time/resources/unload-b.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Helper page for ../unload-manual.html</title>
+</head>
+<body>
+ <script src="./unload.js"></script>
+ <script>
+ setupListeners("b", "./unload-c.html");
+ </script>
+ <button id="proceed">Click me again!</button>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/hr-time/resources/unload-c.html b/tests/wpt/web-platform-tests/hr-time/resources/unload-c.html
new file mode 100644
index 00000000000..731da9db758
--- /dev/null
+++ b/tests/wpt/web-platform-tests/hr-time/resources/unload-c.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Helper page for ../unload-manual.html</title>
+</head>
+<body>
+ <script src="./unload.js"></script>
+ <script>
+ setupListeners("c", null);
+ </script>
+ <button id="proceed">Click me, one last time!</button>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/hr-time/resources/unload.js b/tests/wpt/web-platform-tests/hr-time/resources/unload.js
new file mode 100644
index 00000000000..ab6b121c2b5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/hr-time/resources/unload.js
@@ -0,0 +1,51 @@
+const syncDelay = ms => {
+ const start = performance.now();
+ let elapsedTime;
+ do {
+ elapsedTime = performance.now() - start;
+ } while (elapsedTime < ms);
+};
+
+const markTime = (docName, lifecycleEventName) => {
+ // Calculating these values before the below `mark` invocation ensures that delays in
+ // reaching across to the other window object doesn't interfere with the correctness
+ // of the test.
+ const dateNow = Date.now();
+ const performanceNow = performance.now();
+
+ window.opener.mark({
+ docName,
+ lifecycleEventName,
+ performanceNow: performanceNow,
+ dateNow: dateNow
+ });
+};
+
+const setupUnloadPrompt = (docName, msg) => {
+ window.addEventListener("beforeunload", ev => {
+ markTime(docName, "beforeunload");
+ return ev.returnValue = msg || "Click OK to continue test."
+ });
+};
+
+const setupListeners = (docName, nextDocument) => {
+ window.addEventListener("load", () => {
+ markTime(docName, "load");
+ document.getElementById("proceed").addEventListener("click", ev => {
+ ev.preventDefault();
+ if (nextDocument) {
+ document.location = nextDocument;
+ } else {
+ window.close();
+ }
+ })
+ });
+
+ setupUnloadPrompt(docName);
+
+ window.addEventListener("unload", () => {
+ markTime(docName, "unload");
+ if (docName !== "c") { syncDelay(1000); }
+ });
+};
+
diff --git a/tests/wpt/web-platform-tests/hr-time/unload-manual.html b/tests/wpt/web-platform-tests/hr-time/unload-manual.html
new file mode 100644
index 00000000000..18c4e0dc327
--- /dev/null
+++ b/tests/wpt/web-platform-tests/hr-time/unload-manual.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>time origin value manual test</title>
+ <link rel="help" href="https://w3c.github.io/hr-time/#time-origin-1">
+ <link rel="prefetch" href="./resources/unload-a.html">
+ <link rel="prefetch" href="./resources/unload-b.html">
+ <link rel="prefetch" href="./resources/unload-c.html">
+</head>
+<body>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ setup({ explicit_timeout: true });
+
+ const ACCEPTABLE_VARIANCE = 400; // ms
+
+ const isRoughlyEqual = (a, b) => Math.abs(a - b) < ACCEPTABLE_VARIANCE;
+
+ const timings = { a: {}, b: {}, c: {} };
+ const t = async_test("hr-time time origin");
+
+ window.mark = msg => {
+ timings[msg.docName][msg.lifecycleEventName] = {
+ performanceNow: msg.performanceNow,
+ dateNow: msg.dateNow
+ };
+
+ if (msg.docName === "c" && msg.lifecycleEventName === "unload") {
+ setTimeout(makeAssertions, 0);
+ }
+ };
+
+ function makeAssertions () {
+ t.step(() => {
+ const loadTimeBetweenAandB = timings.b.load.dateNow - timings.a.unload.dateNow;
+ const loadTimeBetweenBandC = timings.c.load.dateNow - timings.b.unload.dateNow;
+
+ assert_true(
+ isRoughlyEqual(loadTimeBetweenAandB, timings.b.load.performanceNow),
+ "Document in reused window's time origin should be time of close of pop-up box."
+ );
+ assert_true(
+ isRoughlyEqual(loadTimeBetweenBandC, timings.c.load.performanceNow),
+ "Document in reused window's time origin should be time of close of pop-up box."
+ );
+ assert_true(
+ !isRoughlyEqual(timings.a.unload.performanceNow, 0),
+ "Time origin during unload event should match that of rest of document."
+ );
+ assert_true(
+ !isRoughlyEqual(timings.b.unload.performanceNow, 0),
+ "Time origin during unload event should match that of rest of document."
+ );
+ assert_true(
+ !isRoughlyEqual(timings.c.unload.performanceNow, 0),
+ "Time origin during unload event should match that of rest of document."
+ );
+ });
+ t.done();
+ }
+ </script>
+
+ <h2>Description</h2>
+ <p>This test validates the behavior of <code>performance.now()</code> with respect to its time origin.</p>
+ <div id="log">
+ <h2>Manual Test Steps</h2>
+ <ol>
+ <li><a href="resources/unload-a.html" target="_blank">Click here</a>
+ </ol>
+ </div>
+</body>
+<html>
diff --git a/tests/wpt/web-platform-tests/html/META.yml b/tests/wpt/web-platform-tests/html/META.yml
index d491c94e30c..636b42b68c1 100644
--- a/tests/wpt/web-platform-tests/html/META.yml
+++ b/tests/wpt/web-platform-tests/html/META.yml
@@ -5,6 +5,5 @@ suggested_reviewers:
- foolip
- jdm
- jgraham
- - sideshowbarker
- zcorpan
- zqzhang
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-does-not-match-disabled-selector.html b/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-does-not-match-disabled-selector.html
deleted file mode 100644
index defc7cd6c49..00000000000
--- a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-does-not-match-disabled-selector.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8" />
- <title>inert does not match :disabled selector</title>
- <link rel="author" title="Alice Boxhall" href="aboxhall@chromium.org">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- <style>
- button {
- color: green;
- }
-
- button:disabled {
- color: red;
- }
- </style>
- </head>
- <body>
- <button inert>The test passes if this is in green.</button>
- <script>
- test(function() {
- button = document.querySelector('button');
- var color = document.defaultView.getComputedStyle(button).getPropertyValue('color');
- assert_equals(color, 'rgb(0, 128, 0)');
- }, 'Tests that inert elements do not match the :disabled selector.');
- </script>
- </body>
-</html>
diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/sharedworker-failure.js b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/sharedworker-failure.js
index a11ccbc1f30..8472318abd5 100644
--- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/sharedworker-failure.js
+++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/sharedworker-failure.js
@@ -1,16 +1,17 @@
let state = "send-sw-failure"
onconnect = initialE => {
- initialE.source.postMessage(state)
- initialE.source.onmessage = e => {
+ let port = initialE.source;
+ port.postMessage(state)
+ port.onmessage = e => {
if(state === "" && e.data === "send-window-failure") {
- e.postMessage(new SharedArrayBuffer())
+ port.postMessage(new SharedArrayBuffer())
} else {
- e.postMessage("failure")
+ port.postMessage("failure")
}
}
- initialE.source.onmessageerror = e => {
+ port.onmessageerror = e => {
if(state === "send-sw-failure") {
- e.postMessage("send-sw-failure-success")
+ port.postMessage("send-sw-failure-success")
state = ""
}
}
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/composed.window.js b/tests/wpt/web-platform-tests/html/interaction/focus/composed.window.js
index 8951afc4e0c..8951afc4e0c 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/composed.window.js
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/composed.window.js
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/document-level-focus-apis/document-level-apis.html b/tests/wpt/web-platform-tests/html/interaction/focus/document-level-focus-apis/document-level-apis.html
index 2d8c49c7f61..2d8c49c7f61 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/document-level-focus-apis/document-level-apis.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/document-level-focus-apis/document-level-apis.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/document-level-focus-apis/test.html b/tests/wpt/web-platform-tests/html/interaction/focus/document-level-focus-apis/test.html
index 90d63e51e93..90d63e51e93 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/document-level-focus-apis/test.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/document-level-focus-apis/test.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/focus-01.html b/tests/wpt/web-platform-tests/html/interaction/focus/focus-01.html
index 9d1bf1b6c7d..9d1bf1b6c7d 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/focus-01.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/focus-01.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/focus-02.html b/tests/wpt/web-platform-tests/html/interaction/focus/focus-02.html
index 1858d6a21d2..1858d6a21d2 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/focus-02.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/focus-02.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/focus-management/focus-event-targets-simple.html b/tests/wpt/web-platform-tests/html/interaction/focus/focus-management/focus-event-targets-simple.html
index ab7bcfe6d0e..ab7bcfe6d0e 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/focus-management/focus-event-targets-simple.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/focus-management/focus-event-targets-simple.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/focus-management/focus-events.html b/tests/wpt/web-platform-tests/html/interaction/focus/focus-management/focus-events.html
index d63362aaa18..d63362aaa18 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/focus-management/focus-events.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/focus-management/focus-events.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/processing-model/focus-fixup-rule-one-no-dialogs.html b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html
index d8171abc715..d8171abc715 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/processing-model/focus-fixup-rule-one-no-dialogs.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html
diff --git a/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/legend-focusable.html b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/legend-focusable.html
new file mode 100644
index 00000000000..c9209d3cf62
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/legend-focusable.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>legend focusable</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+ const t = async_test();
+</script>
+<fieldset>
+ <legend tabindex=0 onfocus="t.step(() => { t.done(); })">
+ legend
+ <input onfocus="t.unreached_func('input in legend was focused')();">
+ </legend>
+ <input onfocus="t.unreached_func('input after legend was focused')();">
+</fieldset>
+<script>
+ document.querySelector('legend').focus();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/legend.html b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/legend.html
new file mode 100644
index 00000000000..b53839374df
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/legend.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<title>legend</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+ const t = async_test();
+</script>
+<fieldset>
+ <legend onfocus="t.unreached_func('legend was focused')()">
+ legend
+ <input onfocus="t.unreached_func('input in legend was focused')();">
+ </legend>
+ <input onfocus="t.unreached_func('input after legend was focused')();">
+</fieldset>
+<script>
+ document.querySelector('legend').focus();
+ t.step_timeout(() => {
+ t.done();
+ }, 500);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/processing-model/preventScroll.html b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/preventScroll.html
index 97d341b30ec..97d341b30ec 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/processing-model/preventScroll.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/preventScroll.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/processing-model/support/preventScroll-helper.html b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/support/preventScroll-helper.html
index 43c6d86a578..43c6d86a578 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/processing-model/support/preventScroll-helper.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/processing-model/support/preventScroll-helper.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html
index 25e359c2a25..25e359c2a25 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-default-value.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html
index 92bf1743142..92bf1743142 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-negative.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html
index 45429cc1a72..45429cc1a72 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html
index 9a131847703..9a131847703 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html
index c46acd0a413..c46acd0a413 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/tabindex-focus-flag.html b/tests/wpt/web-platform-tests/html/interaction/focus/tabindex-focus-flag.html
index e40bc077594..e40bc077594 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/tabindex-focus-flag.html
+++ b/tests/wpt/web-platform-tests/html/interaction/focus/tabindex-focus-flag.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/META.yml b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/META.yml
new file mode 100644
index 00000000000..f5b533c3771
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/META.yml
@@ -0,0 +1,4 @@
+suggested_reviewers:
+ - emilio
+ - mstensho
+ - zcorpan
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-block-formatting-context.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html
index c38944ae795..c38944ae795 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-block-formatting-context.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-block-formatting-context.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap-ref.html
index 95e2347121e..95e2347121e 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap-ref.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap-ref.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html
index 4d2269632c0..4d2269632c0 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-border-gap.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-gap.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html
new file mode 100644
index 00000000000..9ab10159d8c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-border-radius-hittest.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>fieldset, border-radius and hit testing</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<style>
+fieldset { width: 80px; height: 80px; border-radius: 100px; border: 10px solid; background: lime; }
+</style>
+<fieldset>
+</fieldset>
+<script>
+test(() => {
+ assert_equals(document.elementFromPoint(20, 20), document.body);
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block-ref.html
index ccb755b347c..ccb755b347c 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block-ref.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block-ref.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html
index e7529946a49..e7529946a49 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-containing-block.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-containing-block.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html
new file mode 100644
index 00000000000..4abd9ce533d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-content-before-legend.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<title>fieldset content before legend</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<fieldset id=test>
+ X
+ <legend>legend</legend>
+ Y
+</fieldset>
+<fieldset id=ref>
+ <legend>legend</legend>
+ X Y
+</fieldset>
+<script>
+ test(() => {
+ const testElm = document.getElementById('test');
+ const refElm = document.getElementById('ref');
+ assert_equals(testElm.clientHeight, refElm.clientHeight);
+ });
+</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html
index f07c84f406c..f07c84f406c 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-default-style.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-default-style.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-display.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html
index 95332898203..95332898203 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-display.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-div-display-contents.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-div-display-contents.html
index 5d17b91290f..5d17b91290f 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-div-display-contents.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-div-display-contents.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html
new file mode 100644
index 00000000000..07c73554e59
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<title>fieldset and CSS Flexbox</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<style>
+#test, #ref, #test-inline, #ref-inline {
+ display: flex;
+ justify-content: space-around;
+ margin: 0;
+ padding: 0;
+ border: none
+}
+#test-inline, #ref-inline { display: inline-flex }
+legend {
+ float: left; /* Makes it not the "rendered legend" */
+ padding: 0;
+}
+</style>
+<fieldset id=test>
+ <legend>1</legend>
+ <div>2</div>
+ <div>3</div>
+ <div>4</div>
+ <div>5</div>
+ <div>6</div>
+ <div>7</div>
+ <div>8</div>
+ <div>9</div>
+</fieldset>
+<hr>
+<div id=ref>
+ <legend>1</legend>
+ <div>2</div>
+ <div>3</div>
+ <div>4</div>
+ <div>5</div>
+ <div>6</div>
+ <div>7</div>
+ <div>8</div>
+ <div>9</div>
+</div>
+<hr>
+<fieldset id=test-inline>
+ <legend>1</legend>
+ <div>2</div>
+ <div>3</div>
+ <div>4</div>
+ <div>5</div>
+ <div>6</div>
+ <div>7</div>
+ <div>8</div>
+ <div>9</div>
+</fieldset>
+<div id=ref-inline>
+ <div>1</div>
+ <div>2</div>
+ <div>3</div>
+ <div>4</div>
+ <div>5</div>
+ <div>6</div>
+ <div>7</div>
+ <div>8</div>
+ <div>9</div>
+</div>
+<script>
+ test(() => {
+ const testElm = document.getElementById('test');
+ const refElm = document.getElementById('ref');
+ assert_equals(getComputedStyle(testElm).height,
+ getComputedStyle(refElm).height, 'height');
+ assert_equals(testElm.querySelector('legend').offsetTop,
+ testElm.querySelector('div').offsetTop, 'offsetTop')
+ }, "Flex");
+
+ test(() => {
+ const testElm = document.getElementById('test-inline');
+ const refElm = document.getElementById('ref-inline');
+ assert_equals(getComputedStyle(testElm).height,
+ getComputedStyle(refElm).height, 'height');
+ assert_equals(testElm.querySelector('legend').offsetTop,
+ testElm.querySelector('div').offsetTop, 'offsetTop')
+
+ }, "Inline flex");
+</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-foo-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-foo-ref.html
index cace814a8ce..cace814a8ce 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-foo-ref.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-foo-ref.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html
new file mode 100644
index 00000000000..bbb71dfa702
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-grid.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<title>fieldset and CSS Grid</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<style>
+#test, #ref, #test-inline, #ref-inline {
+ display: grid;
+ grid-template-columns: auto 50px auto;
+ grid-template-rows: auto 50px auto;
+ margin: 0;
+ padding: 0;
+ border: none
+}
+#test-inline, #ref-inline { display: inline-grid }
+legend {
+ float: left; /* Makes it not the "rendered legend" */
+ padding: 0;
+}
+</style>
+<fieldset id=test>
+ <legend>1</legend>
+ <div>2</div>
+ <div>3</div>
+ <div>4</div>
+ <div>5</div>
+ <div>6</div>
+ <div>7</div>
+ <div>8</div>
+ <div>9</div>
+</fieldset>
+<hr>
+<div id=ref>
+ <div>1</div>
+ <div>2</div>
+ <div>3</div>
+ <div>4</div>
+ <div>5</div>
+ <div>6</div>
+ <div>7</div>
+ <div>8</div>
+ <div>9</div>
+</div>
+<hr>
+<fieldset id=test-inline>
+ <legend>1</legend>
+ <div>2</div>
+ <div>3</div>
+ <div>4</div>
+ <div>5</div>
+ <div>6</div>
+ <div>7</div>
+ <div>8</div>
+ <div>9</div>
+</fieldset>
+<div id=ref-inline>
+ <div>1</div>
+ <div>2</div>
+ <div>3</div>
+ <div>4</div>
+ <div>5</div>
+ <div>6</div>
+ <div>7</div>
+ <div>8</div>
+ <div>9</div>
+</div>
+<script>
+ test(() => {
+ const testElm = document.getElementById('test');
+ const refElm = document.getElementById('ref');
+ assert_equals(getComputedStyle(testElm).height,
+ getComputedStyle(refElm).height, 'height');
+ assert_equals(testElm.querySelector('legend').offsetTop,
+ testElm.querySelector('div').offsetTop, 'offsetTop')
+ }, "Grid");
+
+ test(() => {
+ const testElm = document.getElementById('test-inline');
+ const refElm = document.getElementById('ref-inline');
+ assert_equals(getComputedStyle(testElm).height,
+ getComputedStyle(refElm).height, 'height');
+ assert_equals(testElm.querySelector('legend').offsetTop,
+ testElm.querySelector('div').offsetTop, 'offsetTop')
+
+ }, "Inline grid");
+</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item-ref.html
new file mode 100644
index 00000000000..05b8ca4770b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item-ref.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<title>Reference for fieldset and dipslay: list-item</title>
+<style>
+ fieldset { margin: 0 40px; }
+</style>
+<p>There should be no bullet points below.</p>
+<fieldset>
+ <legend>X</legend>
+</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html
new file mode 100644
index 00000000000..7726947beca
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-list-item.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>fieldset and dipslay: list-item</title>
+<link rel=match href=fieldset-list-item-ref.html>
+<style>
+ fieldset { margin: 0 40px; display: list-item; }
+</style>
+<p>There should be no bullet points below.</p>
+<fieldset>
+ <legend>X</legend>
+</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-multicol.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-multicol.html
index bdb2c2fd946..bdb2c2fd946 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-multicol.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-multicol.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden-ref.html
index 9fe632f7c20..9fe632f7c20 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden-ref.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden-ref.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html
index cacbdbae00d..cacbdbae00d 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-overflow-hidden.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-hidden.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-ref.html
new file mode 100644
index 00000000000..d9b36e530b4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<title>Reference for fieldset overflow</title>
+<style>
+.fieldset, .legend {
+ border: 1em solid;
+ background: lime;
+}
+.fieldset {
+ height: 1em;
+ margin-top: 2em;
+}
+.legend {
+ height: 1em;
+ width: 5em;
+ line-height: 1;
+ margin-top: -4em;
+ margin-left: 1em;
+}
+</style>
+<p>There should be no red.</p>
+<div class=fieldset>
+</div>
+<div class=legend></div>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html
new file mode 100644
index 00000000000..2599f2f0fa2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-overflow.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML>
+<title>fieldset overflow</title>
+<link rel=match href=fieldset-overflow-ref.html>
+<style>
+fieldset, legend {
+ border: 1em solid;
+ margin: 0;
+ padding: 0;
+ background: lime
+}
+fieldset {
+ overflow: auto;
+ height: 2em;
+}
+legend {
+ height: 1em;
+ width: 5em;
+}
+div {
+ background: red;
+ height: 2em;
+}
+
+</style>
+<p>There should be no red.</p>
+<fieldset>
+ <legend></legend>
+ <div></div>
+ <div id=last></div>
+</fieldset>
+<script>
+ document.getElementById('last').scrollIntoView();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order-ref.html
index 13b262a804a..13b262a804a 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order-ref.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order-ref.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html
index 7bd2cedb1b6..7bd2cedb1b6 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-painting-order.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-painting-order.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-shadow-dom.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-shadow-dom.html
index 3b46eb03c6c..3b46eb03c6c 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-shadow-dom.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-shadow-dom.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez-ref.html
new file mode 100644
index 00000000000..8200e671944
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez-ref.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<title>Reference for Fieldset and transform: translateZ(0)</title>
+<style>
+fieldset { background: #eee; margin: 0 0 10px; }
+</style>
+<p>It should say PASS below without anything obscuring the text.</p>
+
+<fieldset>
+ <legend>PASS</legend>
+</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html
index df30468b004..df30468b004 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-transform-translatez.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical-ref.html
new file mode 100644
index 00000000000..29c28ea5f89
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<title>Reference for fieldset vertical</title>
+<link rel=stylesheet href=resources/fieldset-vertical.css>
+<p>vertical-lr
+<div style="writing-mode: vertical-lr">
+ <div class=fieldset><div class="legend top">foo bar</div>normal</div>
+ <div class="fieldset rtl"><div class="legend bottom">foo bar</div>dir=rtl</div>
+ <div class="fieldset rtl"><div class="legend top">foo bar</div>dir=rtl align=left</div>
+ <div class="fieldset rtl"><div class="legend center">foo bar</div>dir=rtl align=center</div>
+ <div class="fieldset rtl"><div class="legend bottom">foo bar</div>dir=rtl align=right</div>
+ <div class=fieldset><div class="legend top">foo bar</div>align=left</div>
+ <div class=fieldset><div class="legend center">foo bar</div>align=center</div>
+ <div class=fieldset><div class="legend bottom">foo bar</div>align=right</div>
+</div>
+<hr>
+<p>vertical-rl
+<div style="writing-mode: vertical-rl">
+ <div class=fieldset><div class="legend top">foo bar</div>normal</div>
+ <div class="fieldset rtl"><div class="legend bottom">foo bar</div>dir=rtl</div>
+ <div class="fieldset rtl"><div class="legend top">foo bar</div>dir=rtl align=left</div>
+ <div class="fieldset rtl"><div class="legend center">foo bar</div>dir=rtl align=center</div>
+ <div class="fieldset rtl"><div class="legend bottom">foo bar</div>dir=rtl align=right</div>
+ <div class=fieldset><div class="legend top">foo bar</div>align=left</div>
+ <div class=fieldset><div class="legend center">foo bar</div>align=center</div>
+ <div class=fieldset><div class="legend bottom">foo bar</div>align=right</div></div>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html
new file mode 100644
index 00000000000..c11b4666696
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-vertical.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>fieldset vertical</title>
+<link rel=stylesheet href=resources/fieldset-vertical.css>
+<link rel=match href=fieldset-vertical-ref.html>
+<p>vertical-lr
+<div style="writing-mode: vertical-lr">
+ <fieldset><legend>foo bar</legend>normal</fieldset>
+ <fieldset dir=rtl><legend>foo bar</legend>dir=rtl</fieldset>
+ <fieldset dir=rtl><legend align=left>foo bar</legend>dir=rtl align=left</fieldset>
+ <fieldset dir=rtl><legend align=center>foo bar</legend>dir=rtl align=center</fieldset>
+ <fieldset dir=rtl><legend align=right>foo bar</legend>dir=rtl align=right</fieldset>
+ <fieldset><legend align=left>foo bar</legend>align=left</fieldset>
+ <fieldset><legend align=center>foo bar</legend>align=center</fieldset>
+ <fieldset><legend align=right>foo bar</legend>align=right</fieldset>
+</div>
+<hr>
+<p>vertical-rl
+<div style="writing-mode: vertical-rl">
+ <fieldset><legend>foo bar</legend>normal</fieldset>
+ <fieldset dir=rtl><legend>foo bar</legend>dir=rtl</fieldset>
+ <fieldset dir=rtl><legend align=left>foo bar</legend>dir=rtl align=left</fieldset>
+ <fieldset dir=rtl><legend align=center>foo bar</legend>dir=rtl align=center</fieldset>
+ <fieldset dir=rtl><legend align=right>foo bar</legend>dir=rtl align=right</fieldset>
+ <fieldset><legend align=left>foo bar</legend>align=left</fieldset>
+ <fieldset><legend align=center>foo bar</legend>align=center</fieldset>
+ <fieldset><legend align=right>foo bar</legend>align=right</fieldset>
+</div>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html
new file mode 100644
index 00000000000..01483bf8ad3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align-text-align.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<title>legend align does not map to text-align</title>
+<!-- See discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1488228 -->
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<style>
+ legend { width: 13em }
+</style>
+<fieldset><legend>foo bar abcdefghijklmnopqrstuvwxyz</legend></fieldset>
+<fieldset><legend align=left>foo bar abcdefghijklmnopqrstuvwxyz</legend></fieldset>
+<fieldset><legend align=center>foo bar abcdefghijklmnopqrstuvwxyz</legend></fieldset>
+<fieldset><legend align=right>foo bar abcdefghijklmnopqrstuvwxyz</legend></fieldset>
+<fieldset><legend align=justify>foo bar abcdefghijklmnopqrstuvwxyz</legend></fieldset>
+<script>
+function test_align(selectorTest, expectedAlign) {
+ const testElm = document.querySelector(selectorTest);
+ test(() => {
+ assert_equals(getComputedStyle(testElm).textAlign, expectedAlign);
+ }, selectorTest);
+}
+
+test_align('legend', 'start');
+
+for (const val of ['left', 'center', 'right', 'justify']) {
+ test_align(`legend[align=${val}]`, 'start');
+}
+</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align.html
new file mode 100644
index 00000000000..e7745998194
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-align.html
@@ -0,0 +1,50 @@
+<!doctype html>
+<title>legend align</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<fieldset><legend align=left>x</legend></fieldset>
+<fieldset><legend align=center>x</legend></fieldset>
+<fieldset><legend align=right>x</legend></fieldset>
+<fieldset><legend align=justify>x</legend></fieldset>
+<div align=left>
+ <fieldset><legend>x</legend></fieldset>
+</div>
+<div align=center>
+ <fieldset><legend>x</legend></fieldset>
+</div>
+<div align=right>
+ <fieldset><legend>x</legend></fieldset>
+</div>
+<div align=justify>
+ <fieldset><legend>x</legend></fieldset>
+</div>
+<div style="text-align: center">
+ <fieldset><legend>x</legend></fieldset>
+</div>
+<div style="text-align: center" align=center>
+ <fieldset><legend>x</legend></fieldset>
+</div>
+<fieldset><legend style="margin: 0 auto">x</legend></fieldset>
+<fieldset><legend style="margin: 0 0 0 auto">x</legend></fieldset>
+<fieldset dir=rtl><legend>x</legend></fieldset>
+<fieldset dir=rtl><legend style="text-align: left">x</legend></fieldset>
+<script>
+function test_align(selectorTest, selectorRef) {
+ const testElm = document.querySelector(selectorTest);
+ const refElm = document.querySelector(selectorRef);
+ test(() => {
+ assert_equals(testElm.offsetLeft, refElm.offsetLeft, `expected ${selectorRef}`);
+ }, selectorTest);
+}
+
+for (const val of ['left', 'center', 'right', 'justify']) {
+ test_align(`div[align=${val}] legend`, `legend[align=left]`);
+}
+
+test_align(`div[style="text-align: center"] legend`, `legend[align=left]`);
+test_align(`div[style="text-align: center"][align=center] legend`, `legend[align=left]`);
+test_align(`legend[style="margin: 0 auto"]`, `legend[align=center]`);
+test_align(`legend[style="margin: 0 0 0 auto"]`, `legend[align=right]`);
+test_align(`fieldset[dir=rtl] legend`, `legend[align=right]`);
+test_align(`fieldset[dir=rtl] legend[style="text-align: left"]`, `legend[align=right]`);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins-ref.html
new file mode 100644
index 00000000000..8b1258727fc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins-ref.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>legend inline auto margins</title>
+<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1488301">
+<style>
+body, html { padding:0; margin: 0; }
+div {
+ border: 1px solid black;
+ border-width: 10px 17px 7px 23px;
+ padding: 0;
+ margin: 0;
+ width: 448px;
+ height: 5px;
+ margin-top: 5px;
+ position: relative;
+}
+span {
+ position: absolute;
+ top: -15px;
+ width: 200px;
+ height: 20px;
+ padding: 0;
+ margin: 0;
+ background: grey;
+}
+center { width: 200px; height: 20px; background: red; }
+</style>
+</head>
+<body>
+ <div><span style="right:17px"></span></div>
+ <div><span style="left:31px"></span></div>
+ <div><span style="left:131px"></span></div>
+ <div><span style="right:32px"></span></div>
+ <div><span style="left:46px"></span></div>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html
new file mode 100644
index 00000000000..dd1964ba251
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-auto-margins.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>legend inline auto margins</title>
+<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1488301">
+<link rel="match" href="legend-auto-margins-ref.html">
+<style>
+body, html { padding:0; margin: 0; }
+fieldset {
+ border: 1px solid black;
+ border-width: 10px 17px 7px 23px;
+ padding: 0 17px 0 31px;
+ margin: 0;
+ width: 400px;
+}
+legend {
+ width: 200px;
+ height: 20px;
+ padding: 0;
+ margin: 0;
+ background: grey;
+}
+</style>
+</head>
+<body>
+ <fieldset><legend style="margin-left:auto"></legend></fieldset>
+ <fieldset><legend style="margin-right:auto"></legend></fieldset>
+ <fieldset><legend style="margin:0 auto"></legend></fieldset>
+ <fieldset><legend style="margin:0 15px 0 auto"></legend></fieldset>
+ <fieldset><legend style="margin:0 auto 0 15px"></legend></fieldset>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html
index 4e953917973..4e953917973 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-formatting-context.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering-ref.html
new file mode 100644
index 00000000000..e6eff47e53c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering-ref.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<title>Reference for Rendering of display: none legend</title>
+<style>
+ div { border: 2em solid lime; width: 0; }
+</style>
+<p>There should be a green box below.</p>
+<div></div>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering.html
new file mode 100644
index 00000000000..abf3c45df71
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none-rendering.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>Rendering of display: none legend</title>
+<link rel=match href=legend-display-none-rendering-ref.html>
+<style>
+ fieldset { border: 2em solid lime; width: 0; margin: 0; padding: 0; }
+ legend { display: none; background: red; }
+</style>
+<p>There should be a green box below.</p>
+<fieldset>
+ <legend>FAIL</legend>
+</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none.html
new file mode 100644
index 00000000000..689454ac493
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display-none.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>legend display: none</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<style>
+ legend { display: none; }
+</style>
+<fieldset>
+ <legend>Foo</legend>
+</fieldset>
+<script>
+ test(() => {
+ const display = getComputedStyle(document.querySelector('legend')).display;
+ assert_equals(display, 'none');
+ });
+</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-display.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html
index 914547fc6cd..914547fc6cd 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-display.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-dynamic-update.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-dynamic-update.html
new file mode 100644
index 00000000000..5dc68244fe0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-dynamic-update.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<title>legend and dynamic update</title>
+<link rel=fieldset-foo-ref.html>
+<p>There should be a normal fieldset below with the legend "Foo".</p>
+<fieldset>
+ <legend>F</legend>
+</fieldset>
+<script>
+ const legend = document.querySelector('legend');
+ // force layout
+ legend.offsetTop;
+ requestAnimationFrame(() => {
+ legend.textContent += "oo";
+ requestAnimationFrame(() => {
+ document.documentElement.removeAttribute('class');
+ });
+ });
+</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-abspos.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html
index 7979e1d03ec..7979e1d03ec 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-abspos.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-abspos.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-ref.html
index c51bca231e1..c51bca231e1 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float-ref.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float-ref.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float.html
index f70e952ed06..f70e952ed06 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-float.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-float.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-grid-flex-multicol.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html
index edd2600d4a0..edd2600d4a0 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-grid-flex-multicol.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item-ref.html
new file mode 100644
index 00000000000..ee76e93b64e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item-ref.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<title>Reference for legend and dipslay: list-item</title>
+<style>
+ div { margin: 0 40px; display: list-item; }
+</style>
+<p>There should be a bullet point below.</p>
+<div>X</div>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html
new file mode 100644
index 00000000000..c26b50ce662
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-list-item.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>legend and dipslay: list-item</title>
+<link rel=match href=fieldset-list-item-ref.html>
+<style>
+ fieldset { margin: 0; padding: 0; border: none; }
+ legend { margin: 0 40px; padding: 0; display: list-item; }
+</style>
+<p>There should be a bullet point below.</p>
+<fieldset>
+ <legend>X</legend>
+</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-ref.html
index fd6c11a0056..fd6c11a0056 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative-ref.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-ref.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html
new file mode 100644
index 00000000000..99383612614
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<title>legend position: relative</title>
+<link rel=match href=legend-position-relative-ref.html>
+<style>
+fieldset { border: 100px solid lime; width: 200px; padding: 0; margin: 0 }
+legend { position: relative; left: 100px; width: 100px; height: 100px; padding: 0 }
+.behind { position: absolute; left: 208px; width: 100px; height: 100px; background: red; z-index: -1 }
+</style>
+<p>There should be no red.</p>
+<div class=behind></div>
+<fieldset><legend></legend></fieldset>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-sans-fieldset-display.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html
index 5f27ca5c299..5f27ca5c299 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-sans-fieldset-display.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html
index 1cda91f32ba..1cda91f32ba 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/min-inline-size.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html
index 92c33029701..92c33029701 100644
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/min-inline-size.html
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/min-inline-size.html
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/resources/fieldset-vertical.css b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/resources/fieldset-vertical.css
new file mode 100644
index 00000000000..b358d925a76
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/resources/fieldset-vertical.css
@@ -0,0 +1,18 @@
+body > div { display: inline-block }
+fieldset, .fieldset { padding: 0; height:10em; width:2em; border:1em groove; margin: 0em; line-height:1 }
+legend, .legend { padding: 0; width: 1em }
+.legend {
+ background: white; /* overlap the border to emulate the border not being painted */
+ display: table; /* shrink-wrap */
+}
+
+[style="writing-mode: vertical-lr"] .legend {
+ margin-left: -1em;
+}
+[style="writing-mode: vertical-rl"] .legend {
+ margin-right: -1em;
+}
+.top { margin-bottom: auto }
+.center { margin-top: auto; margin-bottom: auto }
+.bottom { margin-top: auto }
+.rtl { direction: rtl }
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-flexbox.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-flexbox.html
deleted file mode 100644
index d2b1d30d8cc..00000000000
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-flexbox.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<title>fieldset and CSS Flexbox</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<style>
-#test, #ref, #test-inline, #ref-inline {
- display: flex;
- justify-content: space-around;
- margin: 0;
- padding: 0;
- border: none
-}
-#test-inline, #ref-inline { display: inline-flex }
-</style>
-<fieldset id=test>
- <div>1</div>
- <div>2</div>
- <div>3</div>
- <div>4</div>
- <div>5</div>
- <div>6</div>
- <div>7</div>
- <div>8</div>
- <div>9</div>
-</fieldset>
-<hr>
-<div id=ref>
- <div>1</div>
- <div>2</div>
- <div>3</div>
- <div>4</div>
- <div>5</div>
- <div>6</div>
- <div>7</div>
- <div>8</div>
- <div>9</div>
-</div>
-<hr>
-<fieldset id=test-inline>
- <div>1</div>
- <div>2</div>
- <div>3</div>
- <div>4</div>
- <div>5</div>
- <div>6</div>
- <div>7</div>
- <div>8</div>
- <div>9</div>
-</fieldset>
-<div id=ref-inline>
- <div>1</div>
- <div>2</div>
- <div>3</div>
- <div>4</div>
- <div>5</div>
- <div>6</div>
- <div>7</div>
- <div>8</div>
- <div>9</div>
-</div>
-<script>
- test(() => {
- assert_equals(getComputedStyle(document.getElementById('test')).height,
- getComputedStyle(document.getElementById('ref')).height);
- }, "Flex");
-
- test(() => {
- assert_equals(getComputedStyle(document.getElementById('test-inline')).height,
- getComputedStyle(document.getElementById('ref-inline')).height);
- }, "Inline flex");
-</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-grid.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-grid.html
deleted file mode 100644
index 7e9cf3643d0..00000000000
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-grid.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<title>fieldset and CSS Grid</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<style>
-#test, #ref, #test-inline, #ref-inline {
- display: grid;
- grid-template-columns: auto 50px auto;
- grid-template-rows: auto 50px auto;
- margin: 0;
- padding: 0;
- border: none
-}
-#test-inline, #ref-inline { display: inline-grid }
-</style>
-<fieldset id=test>
- <div>1</div>
- <div>2</div>
- <div>3</div>
- <div>4</div>
- <div>5</div>
- <div>6</div>
- <div>7</div>
- <div>8</div>
- <div>9</div>
-</fieldset>
-<hr>
-<div id=ref>
- <div>1</div>
- <div>2</div>
- <div>3</div>
- <div>4</div>
- <div>5</div>
- <div>6</div>
- <div>7</div>
- <div>8</div>
- <div>9</div>
-</div>
-<hr>
-<fieldset id=test-inline>
- <div>1</div>
- <div>2</div>
- <div>3</div>
- <div>4</div>
- <div>5</div>
- <div>6</div>
- <div>7</div>
- <div>8</div>
- <div>9</div>
-</fieldset>
-<div id=ref-inline>
- <div>1</div>
- <div>2</div>
- <div>3</div>
- <div>4</div>
- <div>5</div>
- <div>6</div>
- <div>7</div>
- <div>8</div>
- <div>9</div>
-</div>
-<script>
- test(() => {
- assert_equals(getComputedStyle(document.getElementById('test')).height,
- getComputedStyle(document.getElementById('ref')).height);
- }, "Grid");
-
- test(() => {
- assert_equals(getComputedStyle(document.getElementById('test-inline')).height,
- getComputedStyle(document.getElementById('ref-inline')).height);
- }, "Inline grid");
-</script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez-ref.html
deleted file mode 100644
index c0db2d7c71a..00000000000
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/fieldset-transform-translatez-ref.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<title>Reference for Fieldset and transform: translateZ(0)</title>
-<style>
-fieldset { background: #eee; }
-</style>
-<p>It should say PASS below without anything obscuring the text.</p>
-
-<fieldset>
- <legend>PASS</legend>
-</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative.html
deleted file mode 100644
index efd55ab22db..00000000000
--- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-position-relative.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<title>legend position: relative</title>
-<link rel=match href=legend-position-relative-ref.html>
-<style>
-fieldset { border: 100px solid lime; width: 200px; padding: 0; margin: 0 }
-legend { position: relative; left: 100px; width: 100px; padding: 0 }
-.behind { position: absolute; left: 208px; width: 100px; height: 100px; background: red; z-index: -1 }
-</style>
-<p>There should be no red.</p>
-<div class=behind></div>
-<fieldset><legend></legend></fieldset>
diff --git a/tests/wpt/web-platform-tests/html/rendering/the-details-element/details-display-property-is-ignored-ref.html b/tests/wpt/web-platform-tests/html/rendering/the-details-element/details-display-property-is-ignored-ref.html
new file mode 100644
index 00000000000..6ebed6075de
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/the-details-element/details-display-property-is-ignored-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" title="David Grogan" href="dgrogan@chromium.org">
+From <a href="https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements">html.spec.whatwg.org</a>:
+
+<blockquote>
+The details element is expected to render as a block box. The element's shadow
+tree is expected to take the element's first summary element child, if any, and
+place it in a first block box container, and then take the element's remaining
+descendants, if any, and place them in a second block box container.
+</blockquote>
+
+&lt;details display:flex> should be ignored. Otherwise details would render as
+something other than a block box.
+<hr>
+
+<details open>
+ <summary>This is the summary.</summary>
+ <div>thing 1</div>
+ thing 2
+</details>
diff --git a/tests/wpt/web-platform-tests/html/rendering/the-details-element/details-display-property-is-ignored.html b/tests/wpt/web-platform-tests/html/rendering/the-details-element/details-display-property-is-ignored.html
new file mode 100644
index 00000000000..445b4e483d0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/the-details-element/details-display-property-is-ignored.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" title="David Grogan" href="dgrogan@chromium.org">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements">
+<link rel="match" href="details-display-property-is-ignored-ref.html">
+<link rel="bookmark" href="https://bugs.chromium.org/p/chromium/issues/detail?id=635282" />
+<meta name="assert" content="The display property is ignored on details elements and is instead always rendered as a block box." />
+
+From <a href="https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements">html.spec.whatwg.org</a>:
+
+<blockquote>
+The details element is expected to render as a block box. The element's shadow
+tree is expected to take the element's first summary element child, if any, and
+place it in a first block box container, and then take the element's remaining
+descendants, if any, and place them in a second block box container.
+</blockquote>
+
+&lt;details display:flex> should be ignored. Otherwise details would render as
+something other than a block box.
+<hr>
+
+<details open style="display:flex;">
+ <summary>This is the summary.</summary>
+ <div>thing 1</div>
+ thing 2
+</details>
diff --git a/tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
index 6f11f8995b1..6f11f8995b1 100644
--- a/tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html
diff --git a/tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy-attribute.https.sub.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute.https.sub.html
index 59b33d7c4d2..59b33d7c4d2 100644
--- a/tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy-attribute.https.sub.html
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute.https.sub.html
diff --git a/tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy.https.sub.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html
index 63479c0cb6f..63479c0cb6f 100644
--- a/tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy.https.sub.html
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html
diff --git a/tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy.https.sub.html.headers b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html.headers
index 08461fadc28..08461fadc28 100644
--- a/tests/wpt/web-platform-tests/feature-policy/autoplay-allowed-by-feature-policy.https.sub.html.headers
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy.https.sub.html.headers
diff --git a/tests/wpt/web-platform-tests/feature-policy/autoplay-default-feature-policy.https.sub.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-default-feature-policy.https.sub.html
index 763073e437d..763073e437d 100644
--- a/tests/wpt/web-platform-tests/feature-policy/autoplay-default-feature-policy.https.sub.html
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-default-feature-policy.https.sub.html
diff --git a/tests/wpt/web-platform-tests/feature-policy/autoplay-disabled-by-feature-policy.https.sub.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html
index 3dd3afbf771..3dd3afbf771 100644
--- a/tests/wpt/web-platform-tests/feature-policy/autoplay-disabled-by-feature-policy.https.sub.html
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html
diff --git a/tests/wpt/web-platform-tests/feature-policy/autoplay-disabled-by-feature-policy.https.sub.html.headers b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html.headers
index 69ce436270a..69ce436270a 100644
--- a/tests/wpt/web-platform-tests/feature-policy/autoplay-disabled-by-feature-policy.https.sub.html.headers
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html.headers
diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html
index 21624712cf9..f6ae65708c6 100644
--- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html
@@ -39,7 +39,7 @@ onload = function() {
var expected = {wide:resolve(img.dataset.wide), narrow:resolve(img.dataset.narrow)};
var current = iframe.className;
var next = current === 'wide' ? 'narrow' : 'wide';
- var expect_change = expected[next].indexOf('broken.png') !== 0 && !('noChange' in img.dataset);
+ var expect_change = expected[next].indexOf('broken.png') === -1 && !('noChange' in img.dataset);
test(function() {
assert_equals(img.currentSrc, expected[current]);
diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html
index 771b8e1b80e..4be8d4db848 100644
--- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html
+++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/img.complete.html
@@ -38,8 +38,9 @@
assert_false(loaded);
loaded = true;
assert_true(document.getElementById("imgTestTag3").complete);
- var currentSrc = document.getElementById("imgTestTag3").currentSrc
- assert_equals(new URL(window.location.origin + "/" + currentSrc).pathname, "/3.jpg");
+ var currentSrc = document.getElementById("imgTestTag3").currentSrc;
+ var expectedUrl = new URL("3.jpg", window.location);
+ assert_equals(new URL(currentSrc).pathname, expectedUrl.pathname);
}, "Only one onload, despite setting the src twice");
document.getElementById("imgTestTag3").src = 'test' + Math.random();
diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/common/accesskey.js b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/common/accesskey.js
new file mode 100644
index 00000000000..f08761be8c1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/common/accesskey.js
@@ -0,0 +1,36 @@
+setup({explicit_done: true, explicit_timeout: true});
+
+const NOTRUN = 3;
+let status = NOTRUN;
+function notrun() {
+ return status === NOTRUN;
+}
+add_completion_callback(tests => {
+ status = tests[0].status;
+});
+
+function pass() {
+ // Wait a couple of frames in case fail() is also called.
+ requestAnimationFrame(() => {
+ requestAnimationFrame(() => {
+ if (notrun()) {
+ test(() => {});
+ done();
+ }
+ });
+ });
+}
+
+function fail(msg) {
+ if (notrun()) {
+ test(() => { assert_unreached(msg); });
+ done();
+ }
+}
+
+document.addEventListener('DOMContentLoaded', () => {
+ const accessKeyElement = document.querySelector('[accesskey]');
+ if (accessKeyElement.accessKeyLabel) {
+ document.querySelector('kbd').textContent = accessKeyElement.accessKeyLabel;
+ }
+});
diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-after-legend-manual.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-after-legend-manual.html
new file mode 100644
index 00000000000..521b4bb9755
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-after-legend-manual.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>First input after the legend</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=../common/accesskey.js></script>
+<p>Press the access key combination for "a". <kbd></kbd></p>
+<fieldset>
+ <legend accesskey=a>legend</legend>
+ <input onfocus="pass()">
+</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-before-legend-manual.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-before-legend-manual.html
new file mode 100644
index 00000000000..1c40cc7b81e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-before-legend-manual.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<title>First input before the legend</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=../common/accesskey.js></script>
+<p>Press the access key combination for "a". <kbd></kbd></p>
+<fieldset>
+ <input onfocus="pass()">
+ <legend accesskey=a>legend
+ <input onfocus="fail('input in legend was focused')">
+ </legend>
+ <input onfocus="fail('input after legend was focused')">
+</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-inside-legend-manual.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-inside-legend-manual.html
new file mode 100644
index 00000000000..abd3a3b2dfe
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/first-input-inside-legend-manual.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<title>First input inside the legend</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=../common/accesskey.js></script>
+<p>Press the access key combination for "a". <kbd></kbd></p>
+<fieldset>
+ <legend accesskey=a>legend
+ <input onfocus="pass()">
+ </legend>
+ <input onfocus="fail('input after legend was focused')">
+</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/focusable-legend-manual.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/focusable-legend-manual.html
new file mode 100644
index 00000000000..e2880a77bf9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/focusable-legend-manual.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>Focusable legend</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=../common/accesskey.js></script>
+<p>Press the access key combination for "a". <kbd></kbd></p>
+<fieldset>
+ <legend tabindex=0 onclick="fail('unexpected click event on legend')"
+ onfocus="fail('legend was focused')" accesskey=a>
+ legend
+ <input onfocus="pass()">
+ </legend>
+ <input onfocus="fail('input after legend was focused')">
+</fieldset>
diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/focusable-legend-sibling-manual.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/focusable-legend-sibling-manual.html
new file mode 100644
index 00000000000..49dcaaf7d54
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/focusable-legend-sibling-manual.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>Focusable legend sibling</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=../common/accesskey.js></script>
+<p>Press the access key combination for "a". <kbd></kbd></p>
+<fieldset>
+ <legend accesskey=a>first legend</legend>
+ <legend tabindex=0 onfocus="fail('sibling legend was focused')">second legend</legend>
+</fieldset>
+<script>
+ onkeyup = e => {
+ if (e.keyCode === 65) {
+ pass();
+ }
+ }
+</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/input-outside-fieldset-manual.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/input-outside-fieldset-manual.html
new file mode 100644
index 00000000000..dc6af48323e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/input-outside-fieldset-manual.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<title>Input outside fieldset</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=../common/accesskey.js></script>
+<p>Press the access key combination for "a". <kbd></kbd></p>
+<fieldset>
+ <legend accesskey=a>legend</legend>
+</fieldset>
+<input onfocus="fail('input outside fieldset was focused')">
+<script>
+ onkeyup = e => {
+ if (e.keyCode === 65) {
+ pass();
+ }
+ }
+</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/label-sibling-manual.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/label-sibling-manual.html
new file mode 100644
index 00000000000..8a7b20565f7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/label-sibling-manual.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<title>Label sibling</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=../common/accesskey.js></script>
+<p>Press the access key combination for "a". <kbd></kbd></p>
+<input id=x onfocus="fail('input associated with the label was focused')">
+<fieldset>
+ <legend accesskey=a>legend</legend>
+ <label for=x onclick="fail('label received a click event')">label</label>
+</fieldset>
+<script>
+ onkeyup = e => {
+ if (e.keyCode === 65) {
+ pass();
+ }
+ }
+</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/no-fieldset-parent-manual.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/no-fieldset-parent-manual.html
new file mode 100644
index 00000000000..e7abb71454a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/commands/legend/no-fieldset-parent-manual.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<title>No fieldset parent</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=../common/accesskey.js></script>
+<p>Press the access key combination for "a". <kbd></kbd></p>
+<legend accesskey=a>
+ legend
+ <input onfocus="fail('input in legend was focused')">
+</legend>
+<input onfocus="fail('input after legend was focused')">
+<script>
+ onkeyup = e => {
+ if (e.keyCode === 65) {
+ pass();
+ }
+ }
+</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/goal-parameter.htm b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/goal-parameter.htm
new file mode 100644
index 00000000000..fe4d6759b91
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/goal-parameter.htm
@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Goal Parameter on JavaScript MIME</title>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <meta description="This test checks the Async property on a dynamically-created script element. By default it should be true." />
+ <link rel="author" title="" href="http://www.microsoft.com/" />
+ <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-script-async"/>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <script type="module">
+
+ function makeTest({
+ fileName,
+ scriptType,
+ contentType,
+ shouldLoad
+ }) {
+ const elem = Object.assign(document.createElement("script"), {
+ type: scriptType,
+ src: `./serve-with-content-type.py?fn=${scriptType === "module" ? "is-module-goal.mjs" : "is-script-goal.js"}&ct=${contentType}`
+ });
+ const name = `${shouldLoad ? "Loads" : "Errors on"} type=${scriptType} when given content-type=${decodeURIComponent(contentType)}`;
+ const t = async_test(name);
+ if (!shouldLoad) {
+ elem.onload = t.unreached_func("Script should not load.");
+ elem.onerror = t.step_func_done();
+ } else {
+ elem.onload = t.step_func_done();
+ elem.onerror = t.unreached_func("Script should load.");
+ }
+ document.body.appendChild(elem);
+ }
+ makeTest({
+ scriptType: 'module',
+ contentType: 'text%2Fjavascript%3Bgoal=',
+ shouldLoad: false
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3Bgoal=',
+ shouldLoad: false
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fhtml%3Bgoal=script',
+ shouldLoad: false
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3Bgoal=%20script',
+ shouldLoad: false
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3Bgoal=script%20',
+ shouldLoad: false
+ });
+ makeTest({
+ scriptType: 'module',
+ contentType: 'text%2Fhtml%3Bgoal=module',
+ shouldLoad: false
+ });
+ makeTest({
+ scriptType: 'module',
+ contentType: 'text%2Fjavascript%3Bgoal=%20module',
+ shouldLoad: false
+ });
+ makeTest({
+ scriptType: 'module',
+ contentType: 'text%2Fjavascript%3Bgoal=module%20',
+ shouldLoad: false
+ });
+ makeTest({
+ scriptType: 'module',
+ contentType: 'text%2Fjavascript%3Bgoal=%22%20module%22',
+ shouldLoad: false
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3Bgoal=script',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3Bgoal=SCRIPT',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3BGOAL=script',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3BGoal=Script',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3BgOal=script',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3Bgoal=scrIpt',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3Bgoal=%22script%22',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'text/javascript',
+ contentType: 'text%2Fjavascript%3Bgoal=%22%5Cs%5Cc%5Cr%5Ci%5Cp%5Ct%22',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'module',
+ contentType: 'text%2Fjavascript%3Bgoal=%22%5Cm%5Co%5Cd%5Cu%5Cl%5Ce%22',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'module',
+ contentType: 'text%2Fjavascript%3Bgoal=module',
+ shouldLoad: true
+ });
+ makeTest({
+ scriptType: 'module',
+ contentType: 'text%2Fjavascript%3Bgoal=%22module%22',
+ shouldLoad: true
+ });
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-module-goal.mjs b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-module-goal.mjs
new file mode 100644
index 00000000000..b533fc2e906
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-module-goal.mjs
@@ -0,0 +1 @@
+import "./serve-with-content-type.py?fn=is-module-goal.mjs&ct=text%2Fjavascript%3Bgoal=module"; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-script-goal.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-script-goal.js
new file mode 100644
index 00000000000..069363dd400
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/is-script-goal.js
@@ -0,0 +1,3 @@
+with ({}) {
+ ;
+}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-2.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-2.html
index cefa053e754..0748b459092 100644
--- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-2.html
+++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-2.html
@@ -11,7 +11,7 @@
var test5_load = event_test('no src, parser-inserted, has style sheets blocking scripts, script nesting level == 1', false, false);
</script>
-<link rel="stylesheet" href="resources/slow.py"></link>
+<link rel="stylesheet" href="/common/slow.py"></link>
<!-- This is testing the case where an inline classic script is inserted
by parser while there is an loading stylesheet. Therefore, it is critical to
place a <link rel="stylesheet"> just above the <script> to be tested. -->
diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-3.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-3.html
index c2cf0dbdd98..83a752ce2cd 100644
--- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-3.html
+++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/load-error-events-3.html
@@ -13,7 +13,7 @@ var test6_load = event_test('no src, parser-inserted, has style sheets blocking
false, false);
document.write(
- `<link rel="stylesheet" href="resources/slow.py"></link>
+ `<link rel="stylesheet" href="/common/slow.py"></link>
<script onload="onLoad(test6_load);"
onerror="onError(test6_load);">
"use strict";
diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications.html
index 7278182e171..0066d3f4260 100644
--- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications.html
+++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text-modifications.html
@@ -12,7 +12,7 @@ var t = async_test("Modify inline script element's text " +
</script>
<!-- This is "a style sheet that is blocking scripts" and thus ... -->
-<link rel="stylesheet" href="resources/slow.py"></link>
+<link rel="stylesheet" href="/common/slow.py"></link>
<script src="resources/script-text-modifications.py" async></script>
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-1.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-1.html
deleted file mode 100644
index 317e13691d4..00000000000
--- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-1.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!doctype html>
-010-1
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-2.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-2.html
deleted file mode 100644
index ea537fcd601..00000000000
--- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-2.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<!doctype html>
-010-2
-<script>
-onload = function() {history.back()}
-</script>
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010.html
deleted file mode 100644
index d83d24f2414..00000000000
--- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<title>Salvagability of document.opened document</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<iframe src="010-1.html"></iframe>
-<script>
-var iframe;
-var t = async_test();
-onload = t.step_func(function() {
- iframe = document.getElementsByTagName("iframe")[0];
- assert_equals(iframe.contentDocument.open(), iframe.contentDocument);
- iframe.contentDocument.close();
-
- iframe.contentWindow.setTimeout(t.step_func(function() {t.done();}), 500);
-
- onload = null;
-
- iframe.src = "010-2.html"
- setTimeout(t.step_func(function() {assert_unreached()}), 1000)
-})
-</script>
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016-1.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016-1.html
index 12990a56070..ceeeb64df63 100644
--- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016-1.html
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016-1.html
@@ -11,7 +11,7 @@ onload = function() {
setTimeout(function() {
parent.tests[0].step(function() {
- parent.assert_equals(test_prop, 1, "Global scope from original window timeout");
+ parent.assert_equals(test_prop, 2, "Global scope from original window timeout");
parent.assert_equals(window.test_prop, 2, "Window property from original window timeout")
});
parent.tests[1].step(function() {
@@ -23,7 +23,7 @@ onload = function() {
window.setTimeout(function() {
parent.tests[2].step(function() {
- parent.assert_equals(test_prop, 1, "Global scope from original window timeout");
+ parent.assert_equals(test_prop, 2, "Global scope from original window timeout");
parent.assert_equals(window.test_prop, 2, "Window property from original window timeout")
});
parent.tests[3].step(function() {
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js
new file mode 100644
index 00000000000..8d045b9e0ab
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-immediate.window.js
@@ -0,0 +1,119 @@
+// The following tests deal with the <meta http-equiv=refresh> pragma and the
+// `Refresh` header. The spec is still hazy on the precise behavior in those
+// cases but we use https://github.com/whatwg/html/issues/4003 as a guideline.
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+
+ const client = new frame.contentWindow.XMLHttpRequest();
+ client.open("GET", "/common/blank.html");
+ client.onabort = t.step_func_done();
+ client.send();
+
+ frame.contentDocument.open();
+ });
+ frame.src = "resources/meta-refresh.py?0";
+}, "document.open() aborts documents that are queued for navigation through <meta> refresh with timeout 0 (XMLHttpRequest)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+
+ frame.contentWindow.fetch("/common/blank.html").then(
+ t.unreached_func("Fetch should have been aborted"),
+ t.step_func_done());
+
+ frame.contentDocument.open();
+ });
+ frame.src = "resources/meta-refresh.py?0";
+}, "document.open() aborts documents that are queued for navigation through <meta> refresh with timeout 0 (fetch())");
+
+// We cannot test for img element's error event for this test, as Firefox does
+// not fire the event if the fetch is aborted while Chrome does.
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+
+ let happened = false;
+ const img = frame.contentDocument.createElement("img");
+ img.src = new URL("resources/slow-png.py", document.URL);
+ img.onload = t.unreached_func("Image loading should not have succeeded");
+ // The image fetch starts in a microtask, so let's be sure to test after
+ // the fetch has started.
+ t.step_timeout(() => {
+ frame.contentDocument.open();
+ happened = true;
+ });
+ // If 3 seconds have passed and the image has still not loaded, we consider
+ // it aborted. slow-png.py only sleeps for 2 wallclock seconds.
+ t.step_timeout(t.step_func_done(() => {
+ assert_true(happened);
+ }), 3000);
+ });
+ frame.src = "resources/meta-refresh.py?0";
+}, "document.open() aborts documents that are queued for navigation through <meta> refresh with timeout 0 (image loading)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+
+ const client = new frame.contentWindow.XMLHttpRequest();
+ client.open("GET", "/common/blank.html");
+ client.onabort = t.step_func_done();
+ client.send();
+
+ frame.contentDocument.open();
+ });
+ frame.src = "resources/http-refresh.py?0";
+}, "document.open() aborts documents that are queued for navigation through Refresh header with timeout 0 (XMLHttpRequest)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+
+ frame.contentWindow.fetch("/common/blank.html").then(
+ t.unreached_func("Fetch should have been aborted"),
+ t.step_func_done());
+
+ frame.contentDocument.open();
+ });
+ frame.src = "resources/http-refresh.py?0";
+}, "document.open() aborts documents that are queued for navigation through Refresh header with timeout 0 (fetch())");
+
+// We cannot test for img element's error event for this test, as Firefox does
+// not fire the event if the fetch is aborted while Chrome does.
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+
+ let happened = false;
+ const img = frame.contentDocument.createElement("img");
+ img.src = new URL("resources/slow-png.py", document.URL);
+ img.onload = t.unreached_func("Image loading should not have succeeded");
+ // The image fetch starts in a microtask, so let's be sure to test after
+ // the fetch has started.
+ t.step_timeout(() => {
+ frame.contentDocument.open();
+ happened = true;
+ });
+ // If 3 seconds have passed and the image has still not loaded, we consider
+ // it aborted. slow-png.py only sleeps for 2 wallclock seconds.
+ t.step_timeout(t.step_func_done(() => {
+ assert_true(happened);
+ }), 3000);
+ });
+ frame.src = "resources/http-refresh.py?0";
+}, "document.open() aborts documents that are queued for navigation through Refresh header with timeout 0 (image loading)");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js
new file mode 100644
index 00000000000..8c6c1267c4e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-header.window.js
@@ -0,0 +1,69 @@
+// The following tests deal with the <meta http-equiv=refresh> pragma and the
+// `Refresh` header. The spec is still hazy on the precise behavior in those
+// cases but we use https://github.com/whatwg/html/issues/4003 as a guideline.
+//
+// This is separate from abort-refresh-multisecond-meta.window.js to avoid
+// browser interventions that limit the number of connections in a tab.
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+
+ const client = new frame.contentWindow.XMLHttpRequest();
+ client.open("GET", "/common/blank.html");
+ client.onload = t.step_func_done(() => {
+ assert_true(happened);
+ });
+ client.onerror = t.unreached_func("XMLHttpRequest should have succeeded");
+ client.onabort = t.unreached_func("XMLHttpRequest should have succeeded");
+ client.ontimeout = t.unreached_func("XMLHttpRequest should have succeeded");
+ client.send();
+
+ frame.contentDocument.open();
+ happened = true;
+ });
+ frame.src = "resources/http-refresh.py?1";
+}, "document.open() does NOT abort documents that are queued for navigation through Refresh header with 1-sec timeout (XMLHttpRequest)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ frame.contentWindow.fetch("/common/blank.html").then(
+ t.step_func_done(() => {
+ assert_true(happened);
+ }),
+ t.unreached_func("Fetch should have succeeded")
+ );
+ frame.contentDocument.open();
+ happened = true;
+ });
+ frame.src = "resources/http-refresh.py?1";
+}, "document.open() does NOT abort documents that are queued for navigation through Refresh header with 1-sec timeout (fetch())");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ const img = frame.contentDocument.createElement("img");
+ img.src = new URL("resources/slow-png.py", document.URL);
+ img.onload = t.step_func_done(() => {
+ assert_true(happened);
+ });
+ img.onerror = t.unreached_func("Image loading should not have errored");
+ // The image fetch starts in a microtask, so let's be sure to test after
+ // the fetch has started.
+ t.step_timeout(() => {
+ frame.contentDocument.open();
+ happened = true;
+ });
+ });
+ frame.src = "resources/http-refresh.py?4";
+}, "document.open() does NOT abort documents that are queued for navigation through Refresh header with 4-sec timeout (image loading)");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js
new file mode 100644
index 00000000000..2895f959e55
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-refresh-multisecond-meta.window.js
@@ -0,0 +1,69 @@
+// The following tests deal with the <meta http-equiv=refresh> pragma and the
+// `Refresh` header. The spec is still hazy on the precise behavior in those
+// cases but we use https://github.com/whatwg/html/issues/4003 as a guideline.
+//
+// This is separate from abort-refresh-multisecond-header.window.js to avoid
+// browser interventions that limit the number of connections in a tab.
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+
+ const client = new frame.contentWindow.XMLHttpRequest();
+ client.open("GET", "/common/blank.html");
+ client.onload = t.step_func_done(() => {
+ assert_true(happened);
+ });
+ client.onerror = t.unreached_func("XMLHttpRequest should have succeeded");
+ client.onabort = t.unreached_func("XMLHttpRequest should have succeeded");
+ client.ontimeout = t.unreached_func("XMLHttpRequest should have succeeded");
+ client.send();
+
+ frame.contentDocument.open();
+ happened = true;
+ });
+ frame.src = "resources/meta-refresh.py?1";
+}, "document.open() does NOT abort documents that are queued for navigation through <meta> refresh with 1-sec timeout (XMLHttpRequest)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ frame.contentWindow.fetch("/common/blank.html").then(
+ t.step_func_done(() => {
+ assert_true(happened);
+ }),
+ t.unreached_func("Fetch should have succeeded")
+ );
+ frame.contentDocument.open();
+ happened = true;
+ });
+ frame.src = "resources/meta-refresh.py?1";
+}, "document.open() does NOT abort documents that are queued for navigation through <meta> refresh with 1-sec timeout (fetch())");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ const img = frame.contentDocument.createElement("img");
+ img.src = new URL("resources/slow-png.py", document.URL);
+ img.onload = t.step_func_done(() => {
+ assert_true(happened);
+ });
+ img.onerror = t.unreached_func("Image loading should not have errored");
+ // The image fetch starts in a microtask, so let's be sure to test after
+ // the fetch has started.
+ t.step_timeout(() => {
+ frame.contentDocument.open();
+ happened = true;
+ });
+ });
+ frame.src = "resources/meta-refresh.py?4";
+}, "document.open() does NOT abort documents that are queued for navigation through <meta> refresh with 4-sec timeout (image loading)");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js
new file mode 100644
index 00000000000..e3efeffb8b3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort-while-navigating.window.js
@@ -0,0 +1,179 @@
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ const client = new frame.contentWindow.XMLHttpRequest();
+ client.open("GET", "/common/blank.html");
+ // The abort event handler is called synchronously in Chrome but
+ // asynchronously in Firefox. See https://crbug.com/879620.
+ client.onabort = t.step_func_done();
+ client.send();
+ frame.contentWindow.location.href = new URL("resources/dummy.html", document.URL);
+ frame.contentDocument.open();
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() aborts documents that are navigating through Location (XMLHttpRequest)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ frame.contentWindow.fetch("/common/blank.html").then(
+ t.unreached_func("Fetch should have been aborted"),
+ t.step_func_done(() => {
+ assert_true(happened);
+ }));
+ frame.contentWindow.location.href = new URL("resources/dummy.html", document.URL);
+ frame.contentDocument.open();
+ happened = true;
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() aborts documents that are navigating through Location (fetch())");
+
+// We cannot test for img element's error event for this test, as Firefox does
+// not fire the event if the fetch is aborted while Chrome does.
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ const img = frame.contentDocument.createElement("img");
+ img.src = new URL("resources/slow-png.py", document.URL);
+ img.onload = t.unreached_func("Image loading should not have succeeded");
+ // The image fetch starts in a microtask, so let's be sure to test after
+ // the fetch has started.
+ t.step_timeout(() => {
+ frame.contentWindow.location.href = new URL("resources/dummy.html", document.URL);
+ frame.contentDocument.open();
+ happened = true;
+ });
+ // If 3 seconds have passed and the image has still not loaded, we consider
+ // it aborted. slow-png.py only sleeps for 2 wallclock seconds.
+ t.step_timeout(t.step_func_done(() => {
+ assert_true(happened);
+ }), 3000);
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() aborts documents that are navigating through Location (image loading)");
+
+async_test(t => {
+ const div = document.body.appendChild(document.createElement("div"));
+ t.add_cleanup(() => div.remove());
+ div.innerHTML = "<iframe src='/common/slow.py'></iframe>";
+ const frame = div.childNodes[0];
+ const client = new frame.contentWindow.XMLHttpRequest();
+ client.open("GET", "/common/blank.html");
+ client.onabort = t.step_func_done();
+ client.send();
+ frame.contentDocument.open();
+}, "document.open() aborts documents that are navigating through iframe loading (XMLHttpRequest)");
+
+async_test(t => {
+ const div = document.body.appendChild(document.createElement("div"));
+ t.add_cleanup(() => div.remove());
+ div.innerHTML = "<iframe src='/common/slow.py'></iframe>";
+ const frame = div.childNodes[0];
+ frame.contentWindow.fetch("/common/blank.html").then(
+ t.unreached_func("Fetch should have been aborted"),
+ t.step_func_done());
+ frame.contentDocument.open();
+}, "document.open() aborts documents that are navigating through iframe loading (fetch())");
+
+// We cannot test for img element's error event for this test, as Firefox does
+// not fire the event if the fetch is aborted while Chrome does.
+//
+// We use /common/slow.py here as the source of the iframe, to prevent the
+// situation where when document.open() is called the initial about:blank
+// document has already become inactive.
+async_test(t => {
+ const div = document.body.appendChild(document.createElement("div"));
+ t.add_cleanup(() => div.remove());
+ div.innerHTML = "<iframe src='/common/slow.py'></iframe>";
+ const frame = div.childNodes[0];
+ let happened = false;
+ const img = frame.contentDocument.createElement("img");
+ img.src = new URL("resources/slow-png.py", document.URL);
+ img.onload = t.unreached_func("Image loading should not have succeeded");
+ // The image fetch starts in a microtask, so let's be sure to test after
+ // the fetch has started.
+ t.step_timeout(() => {
+ frame.contentDocument.open();
+ happened = true;
+ });
+ // If 3 seconds have passed and the image has still not loaded, we consider
+ // it aborted. slow-png.py only sleeps for 2 wallclock seconds.
+ t.step_timeout(t.step_func_done(() => {
+ assert_true(happened);
+ }), 3000);
+}, "document.open() aborts documents that are navigating through iframe loading (image loading)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ const link = frame.contentDocument.body.appendChild(frame.contentDocument.createElement("a"));
+ link.href = new URL("resources/dummy.html", document.URL);
+
+ const client = new frame.contentWindow.XMLHttpRequest();
+ client.open("GET", "/common/blank.html");
+ client.onabort = t.step_func_done();
+ client.send();
+
+ link.click();
+ frame.contentDocument.open();
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() aborts documents that are queued for navigation through .click() (XMLHttpRequest)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ const link = frame.contentDocument.body.appendChild(frame.contentDocument.createElement("a"));
+ link.href = new URL("resources/dummy.html", document.URL);
+
+ frame.contentWindow.fetch("/common/blank.html").then(
+ t.unreached_func("Fetch should have been aborted"),
+ t.step_func_done());
+
+ link.click();
+ frame.contentDocument.open();
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() aborts documents that are queued for navigation through .click() (fetch())");
+
+// We cannot test for img element's error event for this test, as Firefox does
+// not fire the event if the fetch is aborted while Chrome does.
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ const link = frame.contentDocument.body.appendChild(frame.contentDocument.createElement("a"));
+ link.href = new URL("resources/dummy.html", document.URL);
+
+ let happened = false;
+ const img = frame.contentDocument.createElement("img");
+ img.src = new URL("resources/slow-png.py", document.URL);
+ img.onload = t.unreached_func("Image loading should not have succeeded");
+ // The image fetch starts in a microtask, so let's be sure to test after
+ // the fetch has started.
+ t.step_timeout(() => {
+ link.click();
+ frame.contentDocument.open();
+ happened = true;
+ });
+ // If 3 seconds have passed and the image has still not loaded, we consider
+ // it aborted. slow-png.py only sleeps for 2 wallclock seconds.
+ t.step_timeout(t.step_func_done(() => {
+ assert_true(happened);
+ }), 3000);
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() aborts documents that are queued for navigation through .click() (image loading)");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js
new file mode 100644
index 00000000000..b2f05cf056d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/abort.sub.window.js
@@ -0,0 +1,104 @@
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ const client = new frame.contentWindow.XMLHttpRequest();
+ client.open("GET", "/common/blank.html");
+ client.onload = t.step_func_done(e => {
+ assert_true(happened);
+ });
+ client.onerror = t.unreached_func("XMLHttpRequest should have succeeded");
+ client.onabort = t.unreached_func("XMLHttpRequest should have succeeded");
+ client.ontimeout = t.unreached_func("XMLHttpRequest should have succeeded");
+ client.send();
+ frame.contentDocument.open();
+ happened = true;
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() does not abort documents that are not navigating (XMLHttpRequest)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ frame.contentWindow.fetch("/common/blank.html").then(
+ t.step_func_done(() => {
+ assert_true(happened);
+ }),
+ t.unreached_func("Fetch should have succeeded")
+ );
+ frame.contentDocument.open();
+ happened = true;
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() does not abort documents that are not navigating (fetch())");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ const img = frame.contentDocument.createElement("img");
+ img.src = new URL("resources/slow-png.py", document.URL);
+ img.onload = t.step_func_done(() => {
+ assert_true(happened);
+ });
+ img.onerror = t.unreached_func("Image loading should not have errored");
+ // The image fetch starts in a microtask, so let's be sure to test after
+ // the fetch has started.
+ t.step_timeout(() => {
+ frame.contentDocument.open();
+ happened = true;
+ });
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() does not abort documents that are not navigating (image loading)");
+
+async_test(t => {
+ const __SERVER__NAME = "{{host}}";
+ const __PORT = {{ports[ws][0]}};
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ const ws = new frame.contentWindow.WebSocket(`ws://${__SERVER__NAME}:${__PORT}/echo`);
+ ws.onopen = t.step_func_done(() => {
+ assert_true(happened);
+ });
+ ws.onclose = t.unreached_func("WebSocket fetch should have succeeded");
+ ws.onerror = t.unreached_func("WebSocket should have no error");
+ frame.contentDocument.open();
+ happened = true;
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() does not abort documents that are not navigating (establish a WebSocket connection)");
+
+// An already established WebSocket connection shouldn't be terminated during
+// an "abort a document" anyway. Test just for completeness.
+async_test(t => {
+ const __SERVER__NAME = "{{host}}";
+ const __PORT = {{ports[ws][0]}};
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ frame.onload = null;
+ let happened = false;
+ const ws = new frame.contentWindow.WebSocket(`ws://${__SERVER__NAME}:${__PORT}/echo`);
+ ws.onopen = t.step_func(() => {
+ t.step_timeout(t.step_func_done(() => {
+ assert_true(happened);
+ }), 100);
+ frame.contentDocument.open();
+ happened = true;
+ });
+ ws.onclose = t.unreached_func("WebSocket should not be closed");
+ ws.onerror = t.unreached_func("WebSocket should have no error");
+ });
+ frame.src = "/common/blank.html";
+}, "document.open() does not abort documents that are not navigating (already established WebSocket connection)");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js
new file mode 100644
index 00000000000..f96710999ad
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/active.window.js
@@ -0,0 +1,98 @@
+function assertOpenIsEffective(doc, initialNodeCount) {
+ assert_equals(doc.childNodes.length, initialNodeCount);
+
+ // Test direct document.open() call.
+ assert_equals(doc.open(), doc);
+ assert_equals(doc.childNodes.length, 0, "after open: no nodes in document");
+ doc.write("<!DOCTYPE html>");
+ assert_equals(doc.childNodes.length, 1, "after write: doctype node in document");
+ doc.close();
+ assert_equals(doc.childNodes.length, 2, "after parser close: doctype node and an html element in document");
+
+ // Test implicit document.open() call through write(). Since we called
+ // doc.close() above, which sets the insertion point of the parser to
+ // undefined, document.write() will run the document open steps.
+ doc.write();
+ assert_equals(doc.childNodes.length, 0, "after implicit open: no nodes in document");
+ doc.write("<!DOCTYPE html>");
+ assert_equals(doc.childNodes.length, 1, "after write: doctype node in document");
+ doc.close();
+ assert_equals(doc.childNodes.length, 2, "after parser close: doctype node and an html element in document");
+}
+
+test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ assertOpenIsEffective(frame.contentDocument, 1);
+}, "document.open() removes the document's children (fully active document)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ const childFrame = frame.contentDocument.querySelector("iframe");
+ const childDoc = childFrame.contentDocument;
+ const childWin = childFrame.contentWindow;
+
+ // Right now childDoc is still fully active.
+
+ frame.onload = t.step_func_done(() => {
+ // Now childDoc is still active but no longer fully active.
+ assertOpenIsEffective(childDoc, 1);
+ });
+ frame.src = "/common/blank.html";
+ });
+ frame.src = "resources/page-with-frame.html";
+}, "document.open() removes the document's children (active but not fully active document)");
+
+test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ const doc = frame.contentDocument;
+
+ // Right now the frame is connected and it has an active document.
+ frame.remove();
+
+ // Now the frame is no longer connected. Its document is no longer active.
+ assertOpenIsEffective(doc, 1);
+}, "document.open() removes the document's children (non-active document with an associated Window object; frame is removed)");
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.src = "resources/dummy.html";
+
+ frame.onload = t.step_func(() => {
+ const firstDocument = frame.contentDocument;
+ // Right now the frame is connected and it has an active document.
+
+ frame.onload = t.step_func_done(() => {
+ // Now even though the frame is still connected, its document is no
+ // longer active.
+ assert_not_equals(frame.contentDocument, firstDocument);
+ assertOpenIsEffective(firstDocument, 2);
+ });
+
+ frame.src = "/common/blank.html";
+ });
+}, "document.open() removes the document's children (non-active document with an associated Window object; navigated away)");
+
+test(t => {
+ const doc = document.implementation.createHTMLDocument();
+ assertOpenIsEffective(doc, 2);
+}, "document.open() removes the document's children (non-active document without an associated Window object; createHTMLDocument)");
+
+test(t => {
+ const doc = new DOMParser().parseFromString("", "text/html");
+ assertOpenIsEffective(doc, 1);
+}, "document.open() removes the document's children (non-active document without an associated Window object; DOMParser)");
+
+async_test(t => {
+ const xhr = new XMLHttpRequest();
+ xhr.onload = t.step_func_done(() => {
+ assert_equals(xhr.status, 200);
+ assertOpenIsEffective(xhr.responseXML, 2);
+ });
+ xhr.responseType = "document";
+ xhr.open("GET", "resources/dummy.html");
+ xhr.send();
+}, "document.open() removes the document's children (non-active document without an associated Window object; XMLHttpRequest)");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js
index 58ec08f9ff1..df07124d811 100644
--- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/event-listeners.window.js
@@ -1,3 +1,7 @@
+// Many of the active-related test cases in this file came from
+// active.window.js. However, we cannot test the "navigated away" non-active
+// case right now due to https://github.com/whatwg/html/issues/3997.
+
test(t => {
const frame = document.body.appendChild(document.createElement("iframe")),
body = frame.contentDocument.body;
@@ -36,6 +40,130 @@ test(t => {
frame.contentDocument.close();
}, "Standard event listeners are to be removed from Window");
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ const childFrame = frame.contentDocument.querySelector("iframe");
+ const childWin = childFrame.contentWindow;
+ const childDoc = childFrame.contentDocument;
+ const childBody = childDoc.body;
+
+ // Right now childDoc is still fully active.
+
+ frame.onload = t.step_func_done(() => {
+ // Focus on the current window so that the frame's window is blurred.
+ window.focus();
+ // Now childDoc is still active but no longer fully active.
+ childWin.addEventListener("focus", t.unreached_func("window event listener not removed"));
+ childBody.onfocus = t.unreached_func("body event listener not removed");
+
+ childDoc.open();
+ assert_equals(childBody.onfocus, null);
+
+ // Now try to fire the focus event two different ways.
+ childWin.focus();
+ const focusEvent = new FocusEvent("focus");
+ childWin.dispatchEvent(focusEvent);
+ childDoc.close();
+ });
+ frame.src = "/common/blank.html";
+ });
+ frame.src = "resources/page-with-frame.html";
+}, "Standard event listeners are to be removed from Window for an active but not fully active document");
+
+test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ const win = frame.contentWindow;
+ const doc = frame.contentDocument;
+ const body = doc.body;
+
+ // Right now the frame is connected and it has an active document.
+ frame.remove();
+
+ win.addEventListener("focus", t.unreached_func("window event listener not removed"));
+ body.onfocus = t.unreached_func("body event listener not removed");
+ doc.open();
+ assert_equals(body.onfocus, null);
+
+ // Now try to fire the focus event two different ways.
+ win.focus();
+ const focusEvent = new FocusEvent("focus");
+ win.dispatchEvent(focusEvent);
+ doc.close();
+}, "Standard event listeners are to be removed from Window for a non-active document that is the associated Document of a Window (frame is removed)");
+
+test(t => {
+ let winHappened = 0;
+ const winListener = t.step_func(() => { winHappened++; });
+ window.addEventListener("focus", winListener);
+ t.add_cleanup(() => { window.removeEventListener("focus", winListener); });
+
+ let bodyHappened = 0;
+ const bodyListener = t.step_func(() => { bodyHappened++; });
+ document.body.onfocus = bodyListener;
+ t.add_cleanup(() => { document.body.onfocus = null; });
+
+ const doc = document.implementation.createHTMLDocument();
+ doc.open();
+
+ const focusEvent = new FocusEvent("focus");
+ window.dispatchEvent(focusEvent);
+
+ assert_equals(winHappened, 1);
+ assert_equals(bodyHappened, 1);
+}, "Standard event listeners are NOT to be removed from Window for a Window-less document (createHTMLDocument)");
+
+test(t => {
+ let winHappened = 0;
+ const winListener = t.step_func(() => { winHappened++; });
+ window.addEventListener("focus", winListener);
+ t.add_cleanup(() => { window.removeEventListener("focus", winListener); });
+
+ let bodyHappened = 0;
+ const bodyListener = t.step_func(() => { bodyHappened++; });
+ document.body.onfocus = bodyListener;
+ t.add_cleanup(() => { document.body.onfocus = null; });
+
+ const doc = new DOMParser().parseFromString("", "text/html");
+ doc.open();
+
+ const focusEvent = new FocusEvent("focus");
+ window.dispatchEvent(focusEvent);
+
+ assert_equals(winHappened, 1);
+ assert_equals(bodyHappened, 1);
+}, "Standard event listeners are NOT to be removed from Window for a Window-less document (DOMParser)");
+
+async_test(t => {
+ const xhr = new XMLHttpRequest();
+ xhr.onload = t.step_func_done(() => {
+ assert_equals(xhr.status, 200);
+ const doc = xhr.responseXML;
+
+ let winHappened = 0;
+ const winListener = t.step_func(() => { winHappened++; });
+ window.addEventListener("focus", winListener);
+ t.add_cleanup(() => { window.removeEventListener("focus", winListener); });
+
+ let bodyHappened = 0;
+ const bodyListener = t.step_func(() => { bodyHappened++; });
+ document.body.onfocus = bodyListener;
+ t.add_cleanup(() => { document.body.onfocus = null; });
+
+ doc.open();
+
+ const focusEvent = new FocusEvent("focus");
+ window.dispatchEvent(focusEvent);
+
+ assert_equals(winHappened, 1);
+ assert_equals(bodyHappened, 1);
+ });
+ xhr.responseType = "document";
+ xhr.open("GET", "resources/dummy.html");
+ xhr.send();
+}, "Standard event listeners are NOT to be removed from Window for a Window-less document (XMLHttpRequest)");
+
test(t => {
const frame = document.body.appendChild(document.createElement("iframe"));
t.add_cleanup(() => frame.remove());
@@ -45,6 +173,76 @@ test(t => {
frame.contentDocument.close();
}, "Custom event listeners are to be removed from Window");
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.remove());
+ frame.onload = t.step_func(() => {
+ const childFrame = frame.contentDocument.querySelector("iframe");
+ const childDoc = childFrame.contentDocument;
+ const childWin = childFrame.contentWindow;
+
+ // Right now childDoc is still fully active.
+
+ frame.onload = t.step_func_done(() => {
+ // Now childDoc is still active but no longer fully active.
+ childWin.addEventListener("x", t.unreached_func("window event listener not removed"));
+ childDoc.open();
+ childWin.dispatchEvent(new Event("x"));
+ childDoc.close();
+ });
+ frame.src = "/common/blank.html";
+ });
+ frame.src = "resources/page-with-frame.html";
+}, "Custom event listeners are to be removed from Window for an active but not fully active document");
+
+test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ const win = frame.contentWindow;
+ const doc = frame.contentDocument;
+
+ // Right now the frame is connected and it has an active document.
+ frame.remove();
+
+ win.addEventListener("x", t.unreached_func("window event listener not removed"));
+ doc.open();
+ win.dispatchEvent(new Event("x"));
+ doc.close();
+}, "Custom event listeners are to be removed from Window for a non-active document that is the associated Document of a Window (frame is removed)");
+
+test(t => {
+ const doc = document.implementation.createHTMLDocument();
+ let happened = false;
+ window.addEventListener("createHTMLDocumentTest", t.step_func(() => { happened = true; }));
+ doc.open();
+ window.dispatchEvent(new Event("createHTMLDocumentTest"));
+ assert_true(happened);
+}, "Custom event listeners are NOT to be removed from Window for a Window-less document (createHTMLDocument)");
+
+test(t => {
+ const doc = new DOMParser().parseFromString("", "text/html");
+ let happened = false;
+ window.addEventListener("DOMParserTest", t.step_func(() => { happened = true; }));
+ doc.open();
+ window.dispatchEvent(new Event("DOMParserTest"));
+ assert_true(happened);
+}, "Custom event listeners are NOT to be removed from Window for a Window-less document (DOMParser)");
+
+async_test(t => {
+ const xhr = new XMLHttpRequest();
+ xhr.onload = t.step_func_done(() => {
+ assert_equals(xhr.status, 200);
+ const doc = xhr.responseXML;
+ let happened = false;
+ window.addEventListener("XHRTest", t.step_func(() => { happened = true; }));
+ doc.open();
+ window.dispatchEvent(new Event("XHRTest"));
+ assert_true(happened);
+ });
+ xhr.responseType = "document";
+ xhr.open("GET", "resources/dummy.html");
+ xhr.send();
+}, "Custom event listeners are NOT to be removed from Window for a Window-less document (XMLHttpRequest)");
+
test(t => {
const frame = document.body.appendChild(document.createElement("iframe")),
body = frame.contentDocument.body;
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/history.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/history.window.js
new file mode 100644
index 00000000000..0134da24f07
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/history.window.js
@@ -0,0 +1,29 @@
+// Historically, document.open() created an entry in the session history so
+// that the original page could be seen by going back. Test that this behavior
+// no longer occurs.
+//
+// This test uses window.open() for variety, as most other tests in this
+// directory use document.open(). An <iframe> would probably work also. We can
+// always add an <iframe>-based test later if it is deemed necessary.
+
+const t = async_test("document.open should not add an entry to the session history");
+
+const frameURL = new URL("resources/history-frame.html", document.URL).href;
+
+let origLength;
+window.onFrameLoaded = t.step_func(() => {
+ window.onFrameLoaded = t.unreached_func("onFrameLoaded should only be called once");
+ assert_equals(win.document.URL, frameURL);
+ assert_true(win.document.body.textContent.includes("Old"));
+ origLength = win.history.length;
+});
+window.onDocumentOpen = t.step_func_done(() => {
+ window.onDocumentOpen = t.unreached_func("onDocumentOpen should only be called once");
+ assert_equals(win.document.URL, frameURL);
+ assert_true(win.document.body.textContent.includes("New"));
+ assert_not_equals(origLength, undefined);
+ assert_equals(win.history.length, origLength);
+});
+
+const win = window.open(frameURL);
+t.add_cleanup(() => win.close());
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/mutation-observer.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/mutation-observer.window.js
new file mode 100644
index 00000000000..34e73146a9d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/mutation-observer.window.js
@@ -0,0 +1,19 @@
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => { frame.remove(); });
+ const originalHTMLElement = frame.contentDocument.documentElement;
+ assert_equals(originalHTMLElement.localName, "html");
+ const observer = new frame.contentWindow.MutationObserver(t.step_func_done(records => {
+ // Even though we passed `subtree: true` to observer.observe, due to the
+ // fact that "replace all" algorithm removes children with the "suppress
+ // observers flag" set, we still only get the html element as the sole
+ // removed node.
+ assert_equals(records.length, 1);
+ assert_equals(records[0].type, "childList");
+ assert_equals(records[0].target, frame.contentDocument);
+ assert_array_equals(records[0].addedNodes, []);
+ assert_array_equals(records[0].removedNodes, [originalHTMLElement]);
+ }));
+ observer.observe(frame.contentDocument, { childList: true, subtree: true });
+ assert_equals(frame.contentDocument.open(), frame.contentDocument);
+}, "document.open() should inform mutation observer of node removal");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js
new file mode 100644
index 00000000000..0ff0bb99443
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.js
@@ -0,0 +1,74 @@
+test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.contentDocument.close());
+ assert_equals(frame.contentDocument.compatMode, "BackCompat");
+ frame.contentDocument.open();
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+ frame.contentDocument.close();
+ assert_equals(frame.contentDocument.compatMode, "BackCompat");
+}, "document.open() sets document to no-quirks mode (write no doctype)");
+
+test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.contentDocument.close());
+ assert_equals(frame.contentDocument.compatMode, "BackCompat");
+ frame.contentDocument.open();
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+ frame.contentDocument.write("<!doctype html public");
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+ frame.contentDocument.write(" \"-//IETF//DTD HTML 3//\"");
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+ frame.contentDocument.write(">");
+ assert_equals(frame.contentDocument.compatMode, "BackCompat");
+ frame.contentDocument.close();
+ assert_equals(frame.contentDocument.compatMode, "BackCompat");
+}, "document.open() sets document to no-quirks mode (write old doctype)");
+
+test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.contentDocument.close());
+ assert_equals(frame.contentDocument.compatMode, "BackCompat");
+ frame.contentDocument.open();
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+ frame.contentDocument.write("<!doctype html");
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+ frame.contentDocument.write(">");
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+ frame.contentDocument.close();
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+}, "document.open() sets document to no-quirks mode (write new doctype)");
+
+// This tests the document.open() call in fact sets the document to no-quirks
+// mode, not limited-quirks mode. It is derived from
+// quirks/blocks-ignore-line-height.html in WPT, as there is no direct way to
+// distinguish between a no-quirks document and a limited-quirks document. It
+// assumes that the user agent passes the linked test, which at the time of
+// writing is all major web browsers.
+test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => frame.contentDocument.close());
+ assert_equals(frame.contentDocument.compatMode, "BackCompat");
+ frame.contentDocument.open();
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+
+ // Create the DOM tree manually rather than going through document.write() to
+ // bypass the parser, which resets the document mode.
+ const html = frame.contentDocument.appendChild(frame.contentDocument.createElement("html"));
+ const body = html.appendChild(frame.contentDocument.createElement("body"));
+ assert_equals(frame.contentDocument.body, body);
+ body.innerHTML = `
+ <style>#ref { display:block }</style>
+ <div id=test><font size=1>x</font></div>
+ <font id=ref size=1>x</font>
+ <div id=s_ref>x</div>
+ `;
+ assert_equals(frame.contentDocument.compatMode, "CSS1Compat");
+
+ const idTest = frame.contentDocument.getElementById("test");
+ const idRef = frame.contentDocument.getElementById("ref");
+ const idSRef = frame.contentDocument.getElementById("s_ref");
+ assert_equals(frame.contentWindow.getComputedStyle(idTest).height,
+ frame.contentWindow.getComputedStyle(idSRef).height);
+ assert_not_equals(frame.contentWindow.getComputedStyle(idTest).height,
+ frame.contentWindow.getComputedStyle(idRef).height);
+}, "document.open() sets document to no-quirks mode, not limited-quirks mode");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js
new file mode 100644
index 00000000000..729a958700b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/readiness.window.js
@@ -0,0 +1,25 @@
+// This tests the behavior of dynamic markup insertion APIs with a document's
+// readiness.
+
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"));
+ t.add_cleanup(() => { frame.remove(); });
+ frame.src = "/common/blank.html";
+ frame.onload = t.step_func_done(() => {
+ const states = [];
+ frame.contentDocument.onreadystatechange = t.step_func(() => {
+ states.push(frame.contentDocument.readyState);
+ });
+ assert_equals(frame.contentDocument.readyState, "complete");
+ assert_array_equals(states, []);
+
+ // When open() is called, it first removes the event listeners and handlers
+ // from all nodes in the DOM tree. Then, after a new parser is created and
+ // initialized, it changes the current document readiness to "loading".
+ // However, because all event listeners are removed, we cannot observe the
+ // readystatechange event fired for "loading" inside open().
+ frame.contentDocument.open();
+ assert_equals(frame.contentDocument.readyState, "loading");
+ assert_array_equals(states, []);
+ });
+}, "document.open() and readiness");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/reload.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/reload.window.js
index d6ff9dc7a45..279020f64da 100644
--- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/reload.window.js
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/reload.window.js
@@ -12,16 +12,16 @@
// that restriction.
//
// In any case, this test as the caller of `document.open()` would be used both
-// as the test file and as part of the test file. The `if (!opener)` condition
-// controls what role this file plays.
+// as the test file and as part of the test file. The `if (window.name !==
+// "opened-dummy-window")` condition controls what role this file plays.
-if (!opener) {
+if (window.name !== "opened-dummy-window") {
async_test(t => {
const testURL = document.URL;
const dummyURL = new URL("resources/dummy.html", document.URL).href;
// 1. Open an auxiliary window.
- const win = window.open("resources/dummy.html");
+ const win = window.open("resources/dummy.html", "opened-dummy-window");
t.add_cleanup(() => { win.close(); });
win.addEventListener("load", t.step_func(() => {
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/history-frame.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/history-frame.html
new file mode 100644
index 00000000000..2404105b09a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/history-frame.html
@@ -0,0 +1,20 @@
+<script>
+function queueTest() {
+ // The timeout is necessary to avoid the parser still being active when
+ // `document.open()` is called and becoming a no-op.
+ //
+ // We also cannot use setTimeout(..., 0), as the parser is terminated in a
+ // task with DOM manipulation task source while the timeout is run in a task
+ // on the timer task source. The order is therefore not guaranteed. Let's
+ // play it safer and use some actual timeout.
+ setTimeout(() => {
+ document.open();
+ document.write("<p>New content</p>");
+ document.close();
+ opener.onDocumentOpen();
+ }, 200);
+}
+</script>
+<body onload="opener.onFrameLoaded(); queueTest();">
+<p>Old content</p>
+</body>
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/http-refresh.py b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/http-refresh.py
new file mode 100644
index 00000000000..d2acd4361f9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/http-refresh.py
@@ -0,0 +1,3 @@
+def main(request, response):
+ time = request.url_parts.query if request.url_parts.query else '0'
+ return 200, [['Refresh', time]], ''
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/meta-refresh.py b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/meta-refresh.py
new file mode 100644
index 00000000000..dd3cef44b44
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/meta-refresh.py
@@ -0,0 +1,5 @@
+import time
+
+def main(request, response):
+ time = request.url_parts.query if request.url_parts.query else '0'
+ return 200, [['Content-Type', 'text/html']], '<meta http-equiv=refresh content=%s>' % time
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/page-with-frame.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/page-with-frame.html
new file mode 100644
index 00000000000..a1ab01e072b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/page-with-frame.html
@@ -0,0 +1 @@
+<iframe src="/common/blank.html"></iframe>
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py
new file mode 100644
index 00000000000..5fa2fd9a9d8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py
@@ -0,0 +1,8 @@
+from base64 import decodestring
+import time
+
+png_response = decodestring('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg==')
+
+def main(request, response):
+ time.sleep(2)
+ return 200, [], png_response
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/url-frame.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/url-frame.html
new file mode 100644
index 00000000000..be483ff0aea
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/url-frame.html
@@ -0,0 +1,9 @@
+<script>
+onload = () => {
+ const beforeURL = document.URL;
+ document.open();
+ const afterURL = document.URL;
+ document.close();
+ parent.testDone(beforeURL, afterURL);
+}
+</script>
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js
new file mode 100644
index 00000000000..0c528935b52
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-fragment.window.js
@@ -0,0 +1,26 @@
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe")),
+ urlSansHash = document.URL;
+ t.add_cleanup(() => { frame.remove(); });
+ assert_equals(frame.contentDocument.URL, "about:blank");
+ assert_equals(frame.contentWindow.location.href, "about:blank");
+ self.onhashchange = t.step_func_done(() => {
+ frame.contentDocument.open();
+ assert_equals(frame.contentDocument.URL, urlSansHash);
+ assert_equals(frame.contentWindow.location.href, urlSansHash);
+ });
+ self.location.hash = "heya";
+}, "document.open() and document's URL containing a fragment (entry is not relevant)");
+
+window.testDone = undefined;
+async_test(t => {
+ const frame = document.body.appendChild(document.createElement("iframe"))
+ t.add_cleanup(() => { frame.remove(); });
+ frame.src = "resources/url-frame.html#heya";
+ window.testDone = t.step_func_done((beforeURL, afterURL) => {
+ assert_equals(beforeURL, frame.src);
+ assert_equals(afterURL, frame.src);
+ assert_equals(frame.contentDocument.URL, frame.src);
+ assert_equals(frame.contentWindow.location.href, frame.src);
+ });
+}, "document.open() and document's URL containing a fragment (entry is relevant)");
diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js
index 282e58e9c38..4e7c649f453 100644
--- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js
+++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js
@@ -3,7 +3,7 @@ test(t => {
t.add_cleanup(() => frame.remove());
assert_equals(frame.contentDocument.URL, "about:blank");
assert_equals(frame.contentWindow.location.href, "about:blank");
- frame.contentDocument.open();
+ assert_equals(frame.contentDocument.open(), frame.contentDocument);
assert_equals(frame.contentDocument.URL, document.URL);
assert_equals(frame.contentWindow.location.href, document.URL);
}, "document.open() changes document's URL (fully active document)");
@@ -26,7 +26,7 @@ async_test(t => {
frame.onload = t.step_func_done(() => {
// Now childDoc is still active but no longer fully active.
- childDoc.open();
+ assert_equals(childDoc.open(), childDoc);
assert_equals(childDoc.URL, blankURL);
assert_equals(childWin.location.href, blankURL);
});
@@ -40,6 +40,9 @@ test(t => {
t.add_cleanup(() => frame.remove());
const doc = frame.contentDocument;
+ // We do not test for win.location.href in this test due to
+ // https://github.com/whatwg/html/issues/3959.
+
// Right now the frame is connected and it has an active document.
assert_equals(doc.URL, "about:blank");
@@ -55,6 +58,9 @@ async_test(t => {
const frame = document.createElement("iframe");
t.add_cleanup(() => frame.remove());
+ // We do not test for win.location.href in this test due to
+ // https://github.com/whatwg/html/issues/3959.
+
frame.onload = t.step_func(() => {
const doc = frame.contentDocument;
// Right now the frame is connected and it has an active document.
diff --git a/tests/wpt/web-platform-tests/dom/inert/inert-does-not-match-disabled-selector.html b/tests/wpt/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html
index 74b8ac3f7dd..74b8ac3f7dd 100644
--- a/tests/wpt/web-platform-tests/dom/inert/inert-does-not-match-disabled-selector.html
+++ b/tests/wpt/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-in-shadow-dom.html b/tests/wpt/web-platform-tests/inert/inert-in-shadow-dom.tentative.html
index 36c962b1fc7..36c962b1fc7 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-in-shadow-dom.html
+++ b/tests/wpt/web-platform-tests/inert/inert-in-shadow-dom.tentative.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-inlines.html b/tests/wpt/web-platform-tests/inert/inert-inlines.tentative.html
index b056c6495d2..b056c6495d2 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-inlines.html
+++ b/tests/wpt/web-platform-tests/inert/inert-inlines.tentative.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-label-focus.html b/tests/wpt/web-platform-tests/inert/inert-label-focus.tentative.html
index 8bbe1eca15c..8bbe1eca15c 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-label-focus.html
+++ b/tests/wpt/web-platform-tests/inert/inert-label-focus.tentative.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-node-is-uneditable.html b/tests/wpt/web-platform-tests/inert/inert-node-is-uneditable.tentative.html
index b18d9912eb2..b18d9912eb2 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-node-is-uneditable.html
+++ b/tests/wpt/web-platform-tests/inert/inert-node-is-uneditable.tentative.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-node-is-unfocusable.html b/tests/wpt/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html
index 8b5de37fdca..8b5de37fdca 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-node-is-unfocusable.html
+++ b/tests/wpt/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html
diff --git a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-node-is-unselectable.html b/tests/wpt/web-platform-tests/inert/inert-node-is-unselectable.tentative.html
index 7d5e90821bb..7d5e90821bb 100644
--- a/tests/wpt/web-platform-tests/html/editing/focus/inert/inert-node-is-unselectable.html
+++ b/tests/wpt/web-platform-tests/inert/inert-node-is-unselectable.tentative.html
diff --git a/tests/wpt/web-platform-tests/infrastructure/META.yml b/tests/wpt/web-platform-tests/infrastructure/META.yml
index 59b44af3351..c1d3b0c9ec4 100644
--- a/tests/wpt/web-platform-tests/infrastructure/META.yml
+++ b/tests/wpt/web-platform-tests/infrastructure/META.yml
@@ -2,4 +2,3 @@ suggested_reviewers:
- gsnedders
- jgraham
- jugglinmike
- - kereliuk
diff --git a/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch.html b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch.html
new file mode 100644
index 00000000000..b6b4847473d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch.html
@@ -0,0 +1,5 @@
+<title>Reftest chain with mismatch and mismatch</title>
+<link rel=mismatch href=reftest_and_mismatch_0.html>
+<style>
+:root {background-color:green}
+</style>
diff --git a/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch_0.html b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch_0.html
new file mode 100644
index 00000000000..f84ce6a13aa
--- /dev/null
+++ b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch_0.html
@@ -0,0 +1,5 @@
+<title>Reftest chain with mismatch and mismatch</title>
+<link rel=mismatch href=reftest_and_mismatch_1.html>
+<style>
+:root {background-color:blue}
+</style>
diff --git a/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch_1.html b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch_1.html
new file mode 100644
index 00000000000..05e905adafc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_and_mismatch_1.html
@@ -0,0 +1,4 @@
+<title>Reftest chain with match and mismatch</title>
+<style>
+:root {background-color:green}
+</style>
diff --git a/tests/wpt/web-platform-tests/input-device-capabilities/idlharness.window.js b/tests/wpt/web-platform-tests/input-device-capabilities/idlharness.window.js
new file mode 100644
index 00000000000..a57ae829936
--- /dev/null
+++ b/tests/wpt/web-platform-tests/input-device-capabilities/idlharness.window.js
@@ -0,0 +1,14 @@
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+'use strict';
+
+idl_test(
+ ['InputDeviceCapabilities'],
+ ['uievents', 'dom'],
+ idl_array => {
+ idl_array.add_objects({
+ InputDeviceCapabilities: ["new InputDeviceCapabilities"],
+ });
+ }
+);
diff --git a/tests/wpt/web-platform-tests/input-device-capabilities/interfaces.html b/tests/wpt/web-platform-tests/input-device-capabilities/interfaces.html
deleted file mode 100644
index 178ce5aa892..00000000000
--- a/tests/wpt/web-platform-tests/input-device-capabilities/interfaces.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<title>Input Device Capabilities IDL tests</title>
-<link rel="help" href="https://wicg.github.io/InputDeviceCapabilities/">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/WebIDLParser.js"></script>
-<script src="/resources/idlharness.js"></script>
-<script>
- "use strict";
-
- promise_test(async () => {
- const idl_array = new IdlArray();
- const idl = await (await fetch("/interfaces/InputDeviceCapabilities.idl")).text();
- const uievents = await (await fetch("/interfaces/uievents.idl")).text();
- const dom = await (await fetch("/interfaces/dom.idl")).text();
- idl_array.add_idls(idl);
- idl_array.add_dependency_idls(uievents);
- idl_array.add_dependency_idls(dom);
- idl_array.add_objects({
- InputDeviceCapabilities: ["new InputDeviceCapabilities"],
- });
- idl_array.test();
- }, "Test driver");
-</script>
diff --git a/tests/wpt/web-platform-tests/interfaces/background-fetch.idl b/tests/wpt/web-platform-tests/interfaces/background-fetch.idl
index 6957604e7df..130d5d825a5 100644
--- a/tests/wpt/web-platform-tests/interfaces/background-fetch.idl
+++ b/tests/wpt/web-platform-tests/interfaces/background-fetch.idl
@@ -19,11 +19,10 @@ interface BackgroundFetchManager {
Promise<BackgroundFetchRegistration> fetch(DOMString id, (RequestInfo or sequence<RequestInfo>) requests, optional BackgroundFetchOptions options);
Promise<BackgroundFetchRegistration?> get(DOMString id);
Promise<sequence<DOMString>> getIds();
- // TODO: in future this should become an async iterator for BackgroundFetchRegistration objects
};
dictionary BackgroundFetchUIOptions {
- sequence<IconDefinition> icons = [];
+ sequence<ImageResource> icons = [];
DOMString title = "";
};
@@ -31,14 +30,6 @@ dictionary BackgroundFetchOptions : BackgroundFetchUIOptions {
unsigned long long downloadTotal = 0;
};
-// This is taken from https://w3c.github.io/manifest/#icons-member.
-// This definition should probably be moved somewhere more general.
-dictionary IconDefinition {
- DOMString src;
- DOMString sizes = "";
- DOMString type = "";
-};
-
[Exposed=(Window,Worker)]
interface BackgroundFetchRegistration : EventTarget {
readonly attribute DOMString id;
@@ -46,8 +37,9 @@ interface BackgroundFetchRegistration : EventTarget {
readonly attribute unsigned long long uploaded;
readonly attribute unsigned long long downloadTotal;
readonly attribute unsigned long long downloaded;
- readonly attribute BackgroundFetchState state;
+ readonly attribute BackgroundFetchResult result;
readonly attribute BackgroundFetchFailureReason failureReason;
+ readonly attribute boolean recordsAvailable;
attribute EventHandler onprogress;
@@ -56,9 +48,10 @@ interface BackgroundFetchRegistration : EventTarget {
Promise<sequence<BackgroundFetchRecord>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
};
-enum BackgroundFetchState { "pending", "success", "failure" };
+enum BackgroundFetchResult { "", "success", "failure" };
enum BackgroundFetchFailureReason {
+ // The background fetch has not completed yet, or was successful.
"",
// The operation was aborted by the user, or abort() was called.
"aborted",
@@ -70,14 +63,13 @@ enum BackgroundFetchFailureReason {
// Storage quota was reached during the operation.
"quota-exceeded",
// The provided downloadTotal was exceeded.
- "total-download-exceeded"
+ "download-total-exceeded"
};
[Exposed=(Window,Worker)]
interface BackgroundFetchRecord {
readonly attribute Request request;
readonly attribute Promise<Response> responseReady;
- // TODO: In future this will include a fetch observer
};
[Constructor(DOMString type, BackgroundFetchEventInit init), Exposed=ServiceWorker]
diff --git a/tests/wpt/web-platform-tests/interfaces/cookie-store.idl b/tests/wpt/web-platform-tests/interfaces/cookie-store.idl
index 454da38b182..d872b7aadb2 100644
--- a/tests/wpt/web-platform-tests/interfaces/cookie-store.idl
+++ b/tests/wpt/web-platform-tests/interfaces/cookie-store.idl
@@ -1,48 +1,31 @@
-// https://github.com/WICG/cookie-store/blob/gh-pages/explainer.md
-
-enum CookieSameSite {
- "strict",
- "lax",
- "unrestricted"
-};
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into reffy-reports
+// (https://github.com/tidoust/reffy-reports)
+// Source: Cookie Store API (https://wicg.github.io/cookie-store/)
+
+[Exposed=(ServiceWorker,Window),
+ SecureContext]
+interface CookieStore : EventTarget {
+ Promise<CookieListItem?> get(USVString name);
+ Promise<CookieListItem?> get(optional CookieStoreGetOptions options);
-dictionary CookieListItem {
- required USVString name;
- USVString value;
- USVString? domain = null;
- USVString path = "/";
- DOMTimeStamp? expires = null;
- boolean secure = true;
- CookieSameSite sameSite = "strict";
-};
+ Promise<CookieList> getAll(USVString name);
+ Promise<CookieList> getAll(optional CookieStoreGetOptions options);
-typedef sequence<CookieListItem> CookieList;
+ Promise<void> set(USVString name, USVString value,
+ optional CookieStoreSetOptions options);
+ Promise<void> set(CookieStoreSetExtraOptions options);
-dictionary CookieChangeEventInit : EventInit {
- CookieList changed;
- CookieList deleted;
-};
+ Promise<void> delete(USVString name);
+ Promise<void> delete(CookieStoreDeleteOptions options);
-[
- Exposed=Window,
- SecureContext,
- Constructor(DOMString type, optional CookieChangeEventInit eventInitDict)
-] interface CookieChangeEvent : Event {
- readonly attribute CookieList changed;
- readonly attribute CookieList deleted;
-};
+ [Exposed=ServiceWorker]
+ Promise<void> subscribeToChanges(sequence<CookieStoreGetOptions> subscriptions);
-dictionary ExtendableCookieChangeEventInit : ExtendableEventInit {
- CookieList changed;
- CookieList deleted;
-};
+ [Exposed=ServiceWorker]
+ Promise<sequence<CookieStoreGetOptions>> getChangeSubscriptions();
-[
- Exposed=ServiceWorker,
- Constructor(DOMString type, optional ExtendableCookieChangeEventInit eventInitDict)
-] interface ExtendableCookieChangeEvent : ExtendableEvent {
- readonly attribute CookieList changed;
- readonly attribute CookieList deleted;
+ attribute EventHandler onchange;
};
enum CookieMatchType {
@@ -50,20 +33,18 @@ enum CookieMatchType {
"starts-with"
};
-dictionary CookieStoreDeleteOptions {
- required USVString name;
- USVString? domain = null;
- USVString path = "/";
- boolean secure = true;
- CookieSameSite sameSite = "strict";
-};
-
dictionary CookieStoreGetOptions {
USVString name;
USVString url;
CookieMatchType matchType = "equals";
};
+enum CookieSameSite {
+ "strict",
+ "lax",
+ "unrestricted"
+};
+
dictionary CookieStoreSetOptions {
DOMTimeStamp? expires = null;
USVString? domain = null;
@@ -77,27 +58,35 @@ dictionary CookieStoreSetExtraOptions : CookieStoreSetOptions {
required USVString value;
};
-[
- Exposed=(ServiceWorker,Window),
- SecureContext
-] interface CookieStore : EventTarget {
- Promise<CookieListItem?> get(USVString name);
- Promise<CookieListItem?> get(optional CookieStoreGetOptions options);
-
- Promise<CookieList> getAll(USVString name);
- Promise<CookieList> getAll(optional CookieStoreGetOptions options);
-
- Promise<void> set(USVString name, USVString value, optional CookieStoreSetOptions options);
- Promise<void> set(CookieStoreSetExtraOptions options);
+dictionary CookieStoreDeleteOptions {
+ required USVString name;
+ USVString? domain = null;
+ USVString path = "/";
+};
- Promise<void> delete(USVString name);
- Promise<void> delete(CookieStoreDeleteOptions options);
+dictionary CookieListItem {
+ required USVString name;
+ USVString value;
+ USVString? domain = null;
+ USVString path = "/";
+ DOMTimeStamp? expires = null;
+ boolean secure = true;
+ CookieSameSite sameSite = "strict";
+};
- [Exposed=ServiceWorker] Promise<void> subscribeToChanges(sequence<CookieStoreGetOptions> subscriptions);
+typedef sequence<CookieListItem> CookieList;
- [Exposed=ServiceWorker] Promise<sequence<CookieStoreGetOptions>> getChangeSubscriptions();
+[Exposed=(ServiceWorker,Window),
+ SecureContext,
+ Constructor(DOMString type, optional CookieChangeEventInit eventInitDict)]
+interface CookieChangeEvent : Event {
+ readonly attribute CookieList changed;
+ readonly attribute CookieList deleted;
+};
- [Exposed=Window] attribute EventHandler onchange;
+dictionary CookieChangeEventInit : EventInit {
+ CookieList changed;
+ CookieList deleted;
};
[SecureContext]
@@ -107,5 +96,6 @@ partial interface Window {
partial interface ServiceWorkerGlobalScope {
[Replaceable, SameObject] readonly attribute CookieStore cookieStore;
+
attribute EventHandler oncookiechange;
};
diff --git a/tests/wpt/web-platform-tests/interfaces/cssom-view.idl b/tests/wpt/web-platform-tests/interfaces/cssom-view.idl
index 0213a4090c7..2b5b381dfa4 100644
--- a/tests/wpt/web-platform-tests/interfaces/cssom-view.idl
+++ b/tests/wpt/web-platform-tests/interfaces/cssom-view.idl
@@ -3,7 +3,7 @@
// (https://github.com/tidoust/reffy-reports)
// Source: CSSOM View Module (https://drafts.csswg.org/cssom-view/)
-enum ScrollBehavior { "auto", "instant", "smooth" };
+enum ScrollBehavior { "auto", "smooth" };
dictionary ScrollOptions {
ScrollBehavior behavior = "auto";
diff --git a/tests/wpt/web-platform-tests/interfaces/encoding.idl b/tests/wpt/web-platform-tests/interfaces/encoding.idl
index 7d55ce7e190..b805363c534 100644
--- a/tests/wpt/web-platform-tests/interfaces/encoding.idl
+++ b/tests/wpt/web-platform-tests/interfaces/encoding.idl
@@ -3,6 +3,12 @@
// (https://github.com/tidoust/reffy-reports)
// Source: Encoding Standard (https://encoding.spec.whatwg.org/)
+interface mixin TextDecoderCommon {
+ readonly attribute DOMString encoding;
+ readonly attribute boolean fatal;
+ readonly attribute boolean ignoreBOM;
+};
+
dictionary TextDecoderOptions {
boolean fatal = false;
boolean ignoreBOM = false;
@@ -15,14 +21,36 @@ dictionary TextDecodeOptions {
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
Exposed=(Window,Worker)]
interface TextDecoder {
- readonly attribute DOMString encoding;
- readonly attribute boolean fatal;
- readonly attribute boolean ignoreBOM;
USVString decode(optional BufferSource input, optional TextDecodeOptions options);
};
+TextDecoder includes TextDecoderCommon;
+
+interface mixin TextEncoderCommon {
+ readonly attribute DOMString encoding;
+};
+
[Constructor,
Exposed=(Window,Worker)]
interface TextEncoder {
- readonly attribute DOMString encoding;
[NewObject] Uint8Array encode(optional USVString input = "");
};
+TextEncoder includes TextEncoderCommon;
+
+interface mixin GenericTransformStream {
+ readonly attribute ReadableStream readable;
+ readonly attribute WritableStream writable;
+};
+
+[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
+ Exposed=(Window,Worker)]
+interface TextDecoderStream {
+};
+TextDecoderStream includes TextDecoderCommon;
+TextDecoderStream includes GenericTransformStream;
+
+[Constructor,
+ Exposed=(Window,Worker)]
+interface TextEncoderStream {
+};
+TextEncoderStream includes TextEncoderCommon;
+TextEncoderStream includes GenericTransformStream;
diff --git a/tests/wpt/web-platform-tests/interfaces/intersection-observer.idl b/tests/wpt/web-platform-tests/interfaces/intersection-observer.idl
index b48e1cbab37..ffda8f5c64d 100644
--- a/tests/wpt/web-platform-tests/interfaces/intersection-observer.idl
+++ b/tests/wpt/web-platform-tests/interfaces/intersection-observer.idl
@@ -20,7 +20,7 @@ interface IntersectionObserver {
[Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit)]
interface IntersectionObserverEntry {
readonly attribute DOMHighResTimeStamp time;
- readonly attribute DOMRectReadOnly rootBounds;
+ readonly attribute DOMRectReadOnly? rootBounds;
readonly attribute DOMRectReadOnly boundingClientRect;
readonly attribute DOMRectReadOnly intersectionRect;
readonly attribute boolean isIntersecting;
@@ -30,7 +30,7 @@ interface IntersectionObserverEntry {
dictionary IntersectionObserverEntryInit {
required DOMHighResTimeStamp time;
- required DOMRectInit rootBounds;
+ required DOMRectInit? rootBounds;
required DOMRectInit boundingClientRect;
required DOMRectInit intersectionRect;
required boolean isIntersecting;
diff --git a/tests/wpt/web-platform-tests/interfaces/payment-handler.idl b/tests/wpt/web-platform-tests/interfaces/payment-handler.idl
index 9f10d7e7019..b19a7302dba 100644
--- a/tests/wpt/web-platform-tests/interfaces/payment-handler.idl
+++ b/tests/wpt/web-platform-tests/interfaces/payment-handler.idl
@@ -46,7 +46,6 @@ interface CanMakePaymentEvent : ExtendableEvent {
readonly attribute USVString topOrigin;
readonly attribute USVString paymentRequestOrigin;
readonly attribute FrozenArray<PaymentMethodData> methodData;
- readonly attribute FrozenArray<PaymentDetailsModifier> modifiers;
void respondWith(Promise<boolean> canMakePaymentResponse);
};
@@ -54,7 +53,6 @@ dictionary CanMakePaymentEventInit : ExtendableEventInit {
USVString topOrigin;
USVString paymentRequestOrigin;
sequence<PaymentMethodData> methodData;
- sequence<PaymentDetailsModifier> modifiers;
};
partial interface ServiceWorkerGlobalScope {
diff --git a/tests/wpt/web-platform-tests/interfaces/payment-request.idl b/tests/wpt/web-platform-tests/interfaces/payment-request.idl
index 3717d79476d..05790c7d76d 100644
--- a/tests/wpt/web-platform-tests/interfaces/payment-request.idl
+++ b/tests/wpt/web-platform-tests/interfaces/payment-request.idl
@@ -18,6 +18,7 @@ interface PaymentRequest : EventTarget {
readonly attribute DOMString? shippingOption;
readonly attribute PaymentShippingType? shippingType;
+ attribute EventHandler onmerchantvalidation;
attribute EventHandler onshippingaddresschange;
attribute EventHandler onshippingoptionchange;
attribute EventHandler onpaymentmethodchange;
@@ -89,6 +90,7 @@ interface PaymentAddress {
readonly attribute DOMString city;
readonly attribute DOMString country;
readonly attribute DOMString dependentLocality;
+ // "languageCode" is a feature at risk
readonly attribute DOMString languageCode;
readonly attribute DOMString organization;
readonly attribute DOMString phone;
@@ -177,6 +179,17 @@ dictionary PayerErrorFields {
DOMString phone;
};
+[Constructor(DOMString type, optional MerchantValidationEventInit eventInitDict),
+SecureContext, Exposed=Window]
+interface MerchantValidationEvent : Event {
+ readonly attribute USVString validationURL;
+ void complete(Promise<any> merchantSessionPromise);
+};
+
+dictionary MerchantValidationEventInit : EventInit {
+ USVString validationURL = "";
+};
+
[Constructor(DOMString type, optional PaymentMethodChangeEventInit eventInitDict), SecureContext, Exposed=Window]
interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent {
readonly attribute DOMString methodName;
@@ -184,8 +197,8 @@ interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent {
};
dictionary PaymentMethodChangeEventInit : PaymentRequestUpdateEventInit {
- required DOMString methodName;
- object? methodDetails;
+ DOMString methodName = "";
+ object? methodDetails = null;
};
[Constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict), SecureContext, Exposed=Window]
diff --git a/tests/wpt/web-platform-tests/interfaces/trusted-types.tentative.idl b/tests/wpt/web-platform-tests/interfaces/trusted-types.tentative.idl
new file mode 100644
index 00000000000..a3a635b9927
--- /dev/null
+++ b/tests/wpt/web-platform-tests/interfaces/trusted-types.tentative.idl
@@ -0,0 +1,53 @@
+// https://github.com/wicg/trusted-types
+
+typedef (DOMString or TrustedHTML) HTMLString;
+typedef (DOMString or TrustedScript) ScriptString;
+typedef (DOMString or TrustedScriptURL) ScriptURLString;
+typedef (USVString or TrustedURL) URLString;
+
+[Exposed=Window]
+interface TrustedHTML {
+ stringifier;
+};
+
+[Exposed=Window]
+interface TrustedScript {
+ stringifier;
+};
+
+[Exposed=Window]
+interface TrustedScriptURL {
+ stringifier;
+};
+
+[Exposed=Window]
+interface TrustedURL {
+ stringifier;
+};
+
+[Exposed=Window]
+interface TrustedTypePolicyFactory {
+ TrustedTypePolicy createPolicy(DOMString policyName, TrustedTypePolicyOptions policyOptions);
+ // All the policy object names that have been created
+ sequence<DOMString> getPolicyNames();
+};
+
+[Exposed=Window]
+interface TrustedTypePolicy {
+ readonly attribute DOMString name;
+ TrustedHTML createHTML(DOMString input);
+ TrustedScript createScript(DOMString input);
+ TrustedScriptURL createScriptURL(DOMString input);
+ TrustedURL createURL(DOMString input);
+};
+
+dictionary TrustedTypePolicyOptions {
+ CreateHTMLCallback createHTML;
+ CreateScriptCallback createScript;
+ CreateURLCallback createScriptURL;
+ CreateURLCallback createURL;
+};
+
+callback CreateHTMLCallback = DOMString (DOMString input);
+callback CreateScriptCallback = DOMString (DOMString input);
+callback CreateURLCallback = USVString (DOMString input);
diff --git a/tests/wpt/web-platform-tests/interfaces/wai-aria.idl b/tests/wpt/web-platform-tests/interfaces/wai-aria.idl
new file mode 100644
index 00000000000..c6ea9591f8d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/interfaces/wai-aria.idl
@@ -0,0 +1,59 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into reffy-reports
+// (https://github.com/tidoust/reffy-reports)
+// Source: Accessible Rich Internet Applications (WAI-ARIA) 1.2 (https://w3c.github.io/aria/)
+
+interface mixin AccessibilityRole {
+ attribute DOMString? role;
+};
+Element includes AccessibilityRole;
+
+interface mixin AriaAttributes {
+ attribute DOMString? ariaActiveDescendant;
+ attribute DOMString? ariaAtomic;
+ attribute DOMString? ariaAutoComplete;
+ attribute DOMString? ariaBusy;
+ attribute DOMString? ariaChecked;
+ attribute DOMString? ariaColCount;
+ attribute DOMString? ariaColIndex;
+ attribute DOMString? ariaColSpan;
+ attribute DOMString? ariaControls;
+ attribute DOMString? ariaCurrent;
+ attribute DOMString? ariaDescribedBy;
+ attribute DOMString? ariaDetails;
+ attribute DOMString? ariaDisabled;
+ attribute DOMString? ariaErrorMessage;
+ attribute DOMString? ariaExpanded;
+ attribute DOMString? ariaFlowTo;
+ attribute DOMString? ariaHasPopup;
+ attribute DOMString? ariaHidden;
+ attribute DOMString? ariaInvalid;
+ attribute DOMString? ariaKeyShortcuts;
+ attribute DOMString? ariaLabel;
+ attribute DOMString? ariaLabelledBy;
+ attribute DOMString? ariaLevel;
+ attribute DOMString? ariaLive;
+ attribute DOMString? ariaModal;
+ attribute DOMString? ariaMultiLine;
+ attribute DOMString? ariaMultiSelectable;
+ attribute DOMString? ariaOrientation;
+ attribute DOMString? ariaOwns;
+ attribute DOMString? ariaPlaceholder;
+ attribute DOMString? ariaPosInSet;
+ attribute DOMString? ariaPressed;
+ attribute DOMString? ariaReadOnly;
+ attribute DOMString? ariaRelevant;
+ attribute DOMString? ariaRequired;
+ attribute DOMString? ariaRoleDescription;
+ attribute DOMString? ariaRowCount;
+ attribute DOMString? ariaRowIndex;
+ attribute DOMString? ariaRowSpan;
+ attribute DOMString? ariaSelected;
+ attribute DOMString? ariaSetSize;
+ attribute DOMString? ariaSort;
+ attribute DOMString? ariaValueMax;
+ attribute DOMString? ariaValueMin;
+ attribute DOMString? ariaValueNow;
+ attribute DOMString? ariaValueText;
+};
+Element includes AriaAttributes;
diff --git a/tests/wpt/web-platform-tests/interfaces/wasm-js-api.idl b/tests/wpt/web-platform-tests/interfaces/wasm-js-api.idl
index 04c817dcb11..6de14fb8f08 100644
--- a/tests/wpt/web-platform-tests/interfaces/wasm-js-api.idl
+++ b/tests/wpt/web-platform-tests/interfaces/wasm-js-api.idl
@@ -41,9 +41,9 @@ dictionary ModuleImportDescriptor {
[LegacyNamespace=WebAssembly, Constructor(BufferSource bytes), Exposed=(Window,Worker,Worklet)]
interface Module {
- static sequence<ModuleExportDescriptor> exports(Module module);
- static sequence<ModuleImportDescriptor> imports(Module module);
- static sequence<ArrayBuffer> customSections(Module module, USVString sectionName);
+ static sequence<ModuleExportDescriptor> exports(Module moduleObject);
+ static sequence<ModuleImportDescriptor> imports(Module moduleObject);
+ static sequence<ArrayBuffer> customSections(Module moduleObject, USVString sectionName);
};
[LegacyNamespace=WebAssembly, Constructor(Module module, optional object importObject), Exposed=(Window,Worker,Worklet)]
@@ -87,7 +87,7 @@ dictionary GlobalDescriptor {
boolean mutable = false;
};
-[LegacyNamespace=WebAssembly, Constructor(GlobalDescriptor descriptor, optional any value), Exposed=(Window,Worker,Worklet)]
+[LegacyNamespace=WebAssembly, Constructor(GlobalDescriptor descriptor, optional any v), Exposed=(Window,Worker,Worklet)]
interface Global {
any valueOf();
attribute any value;
diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc-dscp.idl b/tests/wpt/web-platform-tests/interfaces/webrtc-dscp.idl
new file mode 100644
index 00000000000..718447bbf4a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/interfaces/webrtc-dscp.idl
@@ -0,0 +1,8 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into reffy-reports
+// (https://github.com/tidoust/reffy-reports)
+// Source: DSCP Control API (https://w3c.github.io/webrtc-dscp-exp/)
+
+partial dictionary RTCRtpEncodingParameters {
+ RTCPriorityType networkPriority; // Note: No default
+};
diff --git a/tests/wpt/web-platform-tests/interfaces/webxr.idl b/tests/wpt/web-platform-tests/interfaces/webxr.idl
index 00839eed1a2..ffa9ed4e91a 100644
--- a/tests/wpt/web-platform-tests/interfaces/webxr.idl
+++ b/tests/wpt/web-platform-tests/interfaces/webxr.idl
@@ -162,7 +162,7 @@ typedef (WebGLRenderingContext or
dictionary XRWebGLLayerInit {
boolean antialias = true;
- boolean depth = false;
+ boolean depth = true;
boolean stencil = false;
boolean alpha = true;
boolean multiview = false;
diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist
index 5e4d06c4a6b..7d579b6b343 100644
--- a/tests/wpt/web-platform-tests/lint.whitelist
+++ b/tests/wpt/web-platform-tests/lint.whitelist
@@ -100,7 +100,7 @@ INDENT TABS: html/semantics/embedded-content/the-canvas-element/size.attributes.
# Intentional use of print statements
PRINT STATEMENT: dom/nodes/Document-createElement-namespace-tests/generate.py
PRINT STATEMENT: encrypted-media/polyfill/make-polyfill-tests.py
-PRINT STATEMENT: webdriver/tests/support/fixtures.py
+PRINT STATEMENT: webdriver/tests/support/helpers.py
# semi-legitimate use of console.*
CONSOLE: console/*
@@ -162,6 +162,7 @@ SET TIMEOUT: html/semantics/embedded-content/the-iframe-element/*
SET TIMEOUT: html/semantics/embedded-content/the-img-element/*
SET TIMEOUT: html/semantics/scripting-1/the-script-element/*
SET TIMEOUT: html/webappapis/dynamic-markup-insertion/opening-the-input-stream/0*
+SET TIMEOUT: html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/history-frame.html
SET TIMEOUT: html/webappapis/dynamic-markup-insertion/opening-the-input-stream/tasks.window.js
SET TIMEOUT: html/webappapis/scripting/event-loops/*
SET TIMEOUT: html/webappapis/scripting/events/event-handler-processing-algorithm-error/*
@@ -264,6 +265,9 @@ GENERATE_TESTS: dom/traversal/TreeWalker.html
GENERATE_TESTS: domparsing/createContextualFragment.html
GENERATE_TESTS: domxpath/001.html
GENERATE_TESTS: domxpath/002.html
+GENERATE_TESTS: mediacapture-image/MediaStreamTrack-applyConstraints-reject.html
+GENERATE_TESTS: mediacapture-image/MediaStreamTrack-getConstraints-fast.html
+GENERATE_TESTS: mediacapture-image/setOptions-reject.html
GENERATE_TESTS: html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant.html
GENERATE_TESTS: html/syntax/parsing/Document.getElementsByTagName-foreign-01.html
GENERATE_TESTS: html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context.html
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-MediaTrackSupportedConstraints.html b/tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-MediaTrackSupportedConstraints.html
new file mode 100644
index 00000000000..59a54f51d60
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-MediaTrackSupportedConstraints.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+
+// Tests that getSupportedConstraints() returns what it should.
+test(function() {
+ supported_constraints = navigator.mediaDevices.getSupportedConstraints();
+
+ assert_true(supported_constraints.whiteBalanceMode);
+ assert_true(supported_constraints.exposureMode);
+ assert_true(supported_constraints.focusMode);
+ assert_true(supported_constraints.pointsOfInterest);
+ assert_true(supported_constraints.exposureCompensation);
+ assert_true(supported_constraints.colorTemperature);
+ assert_true(supported_constraints.iso);
+ assert_true(supported_constraints.brightness);
+ assert_true(supported_constraints.contrast);
+ assert_true(supported_constraints.saturation);
+ assert_true(supported_constraints.sharpness);
+ assert_true(supported_constraints.focusDistance);
+ assert_true(supported_constraints.zoom);
+ assert_true(supported_constraints.torch);
+}, 'Image Capture supported constraints');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-creation.https.html b/tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-creation.https.html
new file mode 100644
index 00000000000..9e8b5feeeb5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-creation.https.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+
+// This test verifies that ImageCapture can be created (or not) with different
+// Media Stream Track types (audio, video).
+
+function makeAsyncTest(modifyTrack, message) {
+ async_test(function(test) {
+
+ const gotStream = test.step_func(function(stream) {
+ assert_equals(stream.getAudioTracks().length, 0);
+ assert_equals(stream.getVideoTracks().length, 1);
+
+ var videoTrack = stream.getVideoTracks()[0];
+ assert_equals(videoTrack.readyState, 'live');
+ assert_true(videoTrack.enabled);
+ assert_false(videoTrack.muted);
+
+ var capturer = new ImageCapture(videoTrack);
+ assert_equals(capturer.track, videoTrack);
+
+ modifyTrack(videoTrack);
+
+ promise_rejects(test,
+ 'InvalidStateError',
+ capturer.grabFrame(),
+ 'Should throw InvalidStateError.')
+ .then(() => test.done());
+ });
+
+ const onError = test.unreached_func('Error creating MediaStream.');
+ navigator.mediaDevices.getUserMedia({video: true})
+ .then(gotStream)
+ .catch(onError);
+
+ }, message);
+}
+
+var disableTrack = function(videoTrack) {
+ // grabFrame() is rejected if the associated video track is disabled.
+ videoTrack.enabled = false;
+};
+
+var stopTrack = function(videoTrack) {
+ // grabFrame() is rejected if the associated video track is ended.
+ videoTrack.stop();
+ assert_equals(videoTrack.readyState, 'ended');
+};
+
+// Create the rejection tests. Note that grabFrame() would also be rejected if
+// the video Track was muted but that's a read-only property of the Track.
+makeAsyncTest(disableTrack, 'grabFrame() of a disabled Track');
+makeAsyncTest(stopTrack, 'grabFrame() of an ended Track');
+
+
+var testAudio = async_test(function() {
+ navigator.mediaDevices.getUserMedia({audio:true})
+ .then(
+ this.step_func(function(stream) {
+ assert_equals(stream.getAudioTracks().length, 1);
+ assert_equals(stream.getVideoTracks().length, 0);
+ assert_throws("NotSupportedError",
+ function() {
+ var capturer = new ImageCapture(stream.getAudioTracks()[0]);
+ },
+ 'an ImageCapturer can only be created from a video track');
+
+ this.done();
+ }))
+ .catch(
+ this.unreached_func('Error creating MediaStream.'));
+}, 'verifies that an ImageCapture cannot be created out of an Audio Track');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-grabFrame.html b/tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-grabFrame.html
new file mode 100644
index 00000000000..bf5e9400a03
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/ImageCapture-grabFrame.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<canvas id='canvas0' width=10 height=10/>
+<canvas id='canvas1' width=10 height=10/>
+</body>
+<script>
+
+// This test verifies that ImageCapture can grabFrame()s.
+
+var test = async_test(function() {
+ var canvas0 = document.getElementById('canvas0');
+ var context0 = canvas0.getContext("2d");
+ context0.fillStyle = "red";
+ context0.fillRect(0, 0, 10, 10);
+
+ var stream = canvas0.captureStream();
+
+ var capturer = new ImageCapture(stream.getVideoTracks()[0]);
+
+ capturer.grabFrame()
+ .then(bitmap => {
+ assert_equals(canvas0.width, bitmap.width);
+ assert_equals(canvas0.height, bitmap.height);
+
+ var context1 = document.getElementById('canvas1').getContext("2d");
+ context1.drawImage(bitmap, 0, 0);
+
+ var imageData0 = context0.getImageData(0, 0, 10, 10);
+ var imageData1 = context1.getImageData(0, 0, 10, 10);
+
+ assert_equals(imageData0.width, imageData1.width);
+ assert_equals(imageData0.height, imageData1.height);
+ assert_equals(imageData0.data.length, imageData1.data.length);
+ for (var i = 0; i < imageData0.data.length; i++)
+ assert_approx_equals(imageData0.data[i], imageData1.data[i], 5);
+
+ this.done();
+ })
+ .catch(error => {
+ assert_unreached('Error during grabFrame(): '+ error);
+ });
+}, 'exercises the ImageCapture API creation and grabFrame().');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-fast.html b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-fast.html
new file mode 100644
index 00000000000..75ed17a9e33
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-fast.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+// This test verifies that MediaStreamTrack.applyConstraints() exists and that,
+// when called with no parameters, returns a Promise that is resolved. This
+// might not make sense: https://github.com/w3c/mediacapture-main/issues/438 .
+// Other tests go deeper.
+promise_test(function(t) {
+ var canvas = document.getElementById('canvas');
+ var context = canvas.getContext("2d");
+ context.fillStyle = "red";
+ context.fillRect(0, 0, 10, 10);
+
+ var stream = canvas.captureStream();
+ assert_equals(stream.getAudioTracks().length, 0);
+ assert_equals(stream.getVideoTracks().length, 1);
+
+ var videoTrack = stream.getVideoTracks()[0];
+ return videoTrack.applyConstraints();
+}, 'MediaStreamTrack.applyConstraints()');
+
+// This test verifies that MediaStreamTrack.applyConstraints() exists and that,
+// when called with an empty advanced constraint set, returns a Promise that is
+// resolved.
+promise_test(function(t) {
+var canvas = document.getElementById('canvas');
+var context = canvas.getContext("2d");
+context.fillStyle = "red";
+context.fillRect(0, 0, 10, 10);
+
+var stream = canvas.captureStream();
+assert_equals(stream.getAudioTracks().length, 0);
+assert_equals(stream.getVideoTracks().length, 1);
+
+var videoTrack = stream.getVideoTracks()[0];
+return videoTrack.applyConstraints({advanced: []});
+}, 'MediaStreamTrack.applyConstraints({advanced: []})');
+
+// This test verifies that applyConstraints() rejects the returned Promise if
+// passed a non-supported image-capture constraint (https://crbug.com/711694).
+promise_test(function(t) {
+ var canvas = document.getElementById('canvas');
+ var context = canvas.getContext("2d");
+ context.fillStyle = "red";
+ context.fillRect(0, 0, 10, 10);
+
+ var stream = canvas.captureStream();
+ var videoTrack = stream.getVideoTracks()[0];
+
+ var expectedError =
+ new DOMException('Unsupported constraint(s)', 'NotSupportedError');
+
+ // Use e.g. |torch| as an example of unsupported constraint.
+ assert_false("torch" in videoTrack.getCapabilities());
+ return promise_rejects(
+ t, expectedError,
+ videoTrack.applyConstraints({advanced : [ {torch : true} ]}));
+}, 'MediaStreamTrack.applyConstraints() with unsupported constraint');
+
+// This test verifies that applyConstraints() rejects the returned Promise if
+// passed mixed ImageCapture and non-ImageCapture constraints.
+// TODO(mcasas): remove entirely after https://crbug.com/338503.
+promise_test(function(t) {
+ var canvas = document.getElementById('canvas');
+ var context = canvas.getContext("2d");
+ context.fillStyle = "red";
+ context.fillRect(0, 0, 10, 10);
+
+ var stream = canvas.captureStream();
+ var videoTrack = stream.getVideoTracks()[0];
+
+ var expectedError = new OverconstrainedError(
+ '', 'Mixing ImageCapture and non-ImageCapture constraints is not currently supported');
+
+ return promise_rejects(
+ t, expectedError,
+ videoTrack.applyConstraints({advanced : [ {width : 640, torch: true} ]}));
+}, 'MediaStreamTrack.applyConstraints() with non Image-Capture constraint');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.html b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.html
new file mode 100644
index 00000000000..1a1b58e5415
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.html
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+// This test verifies that the |constraints| configured in the mock Mojo
+// service implementation, are returned by MediaStreamTrack.getSettings().
+
+image_capture_test(async t => {
+ let canvas = document.getElementById('canvas');
+ let context = canvas.getContext('2d');
+ context.fillStyle = 'red';
+ context.fillRect(0, 0, 10, 10);
+
+ const constraints = { advanced : [{ whiteBalanceMode : 'single-shot',
+ exposureMode : 'continuous',
+ focusMode : 'single-shot',
+
+ pointsOfInterest : [{x : 0.1, y : 0.2},
+ {x : 0.3, y : 0.4}],
+
+ exposureCompensation : 133.77,
+ colorTemperature : 6000,
+ iso : 120.0,
+
+ brightness : 3,
+ contrast : 4,
+ saturation : 5,
+ sharpness : 6,
+ focusDistance : 7,
+
+ zoom : 3.141592,
+
+ torch : true
+ }]};
+
+ let stream = canvas.captureStream();
+ let videoTrack = stream.getVideoTracks()[0];
+
+ // |videoTrack|'s capabilities gathering, just like the actual capture, is
+ // a process kicked off right after creation, we introduce a small delay
+ // to allow for those to be collected, since they are needed to understand
+ // which constraints are supported in applyConstraints().
+ // TODO(mcasas): this shouldn't be needed, https://crbug.com/711524.
+ await new Promise(resolve => step_timeout(resolve, 100));
+
+ try {
+ await videoTrack.applyConstraints(constraints);
+ } catch (error) {
+ assert_unreached('Error applying constraints: ' + error.message);
+ }
+
+ let settings = videoTrack.getSettings();
+ assert_equals(typeof settings, 'object');
+
+ assert_equals(constraints.advanced[0].whiteBalanceMode,
+ settings.whiteBalanceMode, 'whiteBalanceMode');
+ assert_equals(constraints.advanced[0].exposureMode, settings.exposureMode,
+ 'exposureMode');
+ assert_equals(constraints.advanced[0].focusMode, settings.focusMode,
+ 'focusMode');
+
+ assert_point2d_array_approx_equals(
+ constraints.advanced[0].pointsOfInterest, settings.pointsOfInterest,
+ 0.01);
+
+ assert_equals(constraints.advanced[0].exposureCompensation,
+ settings.exposureCompensation, 'exposureCompensation');
+ assert_equals(constraints.advanced[0].colorTemperature,
+ settings.colorTemperature, 'colorTemperature');
+ assert_equals(constraints.advanced[0].iso, settings.iso, 'iso');
+
+ assert_equals(constraints.advanced[0].brightness, settings.brightness,
+ 'brightness');
+ assert_equals(constraints.advanced[0].contrast, settings.contrast,
+ 'contrast');
+ assert_equals(constraints.advanced[0].saturation, settings.saturation,
+ 'saturation');
+ assert_equals(constraints.advanced[0].sharpness, settings.sharpness,
+ 'sharpness');
+
+ assert_equals(constraints.advanced[0].focusDistance, settings.focusDistance,
+ 'focusDistance');
+ assert_equals(constraints.advanced[0].zoom, settings.zoom, 'zoom');
+
+ assert_equals(constraints.advanced[0].torch, settings.torch, 'torch');
+
+}, 'exercises an applyConstraints() - getSettings() cycle');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-reject.html b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-reject.html
new file mode 100644
index 00000000000..8f08d250fd1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints-reject.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+var canvas = document.getElementById('canvas');
+var context = canvas.getContext('2d');
+context.fillStyle = 'red';
+context.fillRect(0, 0, 10, 10);
+
+// This test verifies that MediaStreamTrack.applyConstraints() rejects if any
+// passed constraint is unsupported or outside its allowed range.
+var makePromiseTest = function(getConstraint) {
+ image_capture_test(async (t, imageCaptureTest) => {
+ imageCaptureTest.mockImageCapture().state().supportsTorch = false;
+
+ let stream = canvas.captureStream();
+ let videoTrack = stream.getVideoTracks()[0];
+
+ // |videoTrack|'s capabilities gathering, just like the actual capture,
+ // is a process kicked off right after creation, we introduce a small
+ // delay to allow for those to be collected, since they are needed to
+ // understand which constraints are supported in applyConstraints().
+ // TODO(mcasas): this shouldn't be needed, https://crbug.com/711524.
+ await new Promise(resolve => step_timeout(resolve, 100));
+
+ try {
+ const constraints = {
+ advanced : [ getConstraint(imageCaptureTest.mockImageCapture().state()) ]
+ };
+
+ await videoTrack.applyConstraints(constraints);
+ assert_unreached('expected applyConstraints to reject');
+ } catch (error) {
+ assert_equals(error.name, 'NotSupportedError');
+ }
+ });
+};
+
+const constraintGenerators = [
+ capabilities => ({ whiteBalanceMode: 'manual' }),
+ capabilities => ({ exposureMode: 'manual' }),
+ capabilities => ({ focusMode: 'continuous' }),
+ capabilities => ({
+ exposureCompensation: capabilities.exposureCompensation.max + 1
+ }),
+ capabilities => ({
+ exposureCompensation: capabilities.exposureCompensation.min - 1
+ }),
+ capabilities => ({
+ colorTemperature: capabilities.colorTemperature.max + 1
+ }),
+ capabilities => ({
+ colorTemperature: capabilities.colorTemperature.min - 1
+ }),
+ capabilities => ({ iso: capabilities.iso.max + 1 }),
+ capabilities => ({ iso: capabilities.iso.min - 1 }),
+ capabilities => ({ brightness: capabilities.brightness.max + 1 }),
+ capabilities => ({ brightness: capabilities.brightness.min - 1 }),
+ capabilities => ({ contrast: capabilities.contrast.max + 1 }),
+ capabilities => ({ contrast: capabilities.contrast.min - 1 }),
+ capabilities => ({ saturation: capabilities.saturation.max + 1 }),
+ capabilities => ({ saturation: capabilities.saturation.min - 1 }),
+ capabilities => ({ sharpness: capabilities.sharpness.max + 1 }),
+ capabilities => ({ sharpness: capabilities.sharpness.min - 1 }),
+ capabilities => ({ zoom: capabilities.zoom.max + 1 }),
+ capabilities => ({ zoom: capabilities.zoom.min - 1 }),
+ capabilities => ({ torch: true }),
+];
+
+for (key in constraintGenerators) {
+ generate_tests(
+ makePromiseTest, [[
+ 'MediaStreamTrack.applyConstraints(constraints) rejects with bad' +
+ ' constraints, #' + key,
+ constraintGenerators[key]
+ ]]);
+}
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints.html b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints.html
new file mode 100644
index 00000000000..8dcff926173
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-applyConstraints.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+const meteringModeNames = ['none', 'manual', 'single-shot', 'continuous'];
+
+// This test verifies that we can all MediaStreamTrack.applyConstraints(), with
+// a mock Mojo service implementation.
+
+image_capture_test(async (t, imageCaptureTest) => {
+ let canvas = document.getElementById('canvas');
+ let context = canvas.getContext('2d');
+ context.fillStyle = 'red';
+ context.fillRect(0, 0, 10, 10);
+
+ const constraints = { advanced : [{ whiteBalanceMode : 'single-shot',
+ exposureMode : 'continuous',
+ focusMode : 'single-shot',
+
+ pointsOfInterest : [{x : 0.1, y : 0.2},
+ {x : 0.3, y : 0.4}],
+
+ exposureCompensation : 133.77,
+ colorTemperature : 6000,
+ iso : 120.0,
+
+ brightness : 3,
+ contrast : 4,
+ saturation : 5,
+ sharpness : 6,
+ focusDistance : 7,
+
+ zoom : 3.141592,
+
+ torch : true
+ }]};
+
+ let stream = canvas.captureStream();
+ let videoTrack = stream.getVideoTracks()[0];
+
+ // |videoTrack|'s capabilities gathering, just like the actual capture, is
+ // a process kicked off right after creation, we introduce a small delay
+ // to allow for those to be collected, since they are needed to understand
+ // which constraints are supported in applyConstraints().
+ // TODO(mcasas): this shouldn't be needed, https://crbug.com/711524.
+ await new Promise(resolve => step_timeout(resolve, 100));
+
+ try {
+ await videoTrack.applyConstraints(constraints);
+ } catch (error) {
+ assert_unreached('applyConstraints(): ' + error.message);
+ }
+
+ const constraintsDict = constraints.advanced[0];
+ let appliedConstraints = videoTrack.getConstraints();
+ const appliedConstraintsDict = appliedConstraints.advanced[0];
+
+ // Check that |appliedConstraints| and |constraints| are equal.
+ assert_equals(constraintsDict.length, appliedConstraintsDict.length);
+ Object.keys(appliedConstraintsDict).forEach((key, value) => {
+ assert_not_equals(constraintsDict[key], undefined, 'key ' + key);
+ if (key != 'pointsOfInterest') {
+ assert_equals(constraintsDict[key], appliedConstraintsDict[key], key);
+ } else {
+ assert_point2d_array_approx_equals(constraintsDict[key],
+ appliedConstraintsDict[key], 0.01);
+ }
+ });
+
+ let theMock = imageCaptureTest.mockImageCapture();
+ assert_equals(constraintsDict.whiteBalanceMode,
+ meteringModeNames[theMock.options().whiteBalanceMode],
+ 'whiteBalanceMode');
+ assert_equals(constraintsDict.exposureMode,
+ meteringModeNames[theMock.options().exposureMode],
+ 'exposureMode');
+ assert_equals(constraintsDict.focusMode,
+ meteringModeNames[theMock.options().focusMode],
+ 'focusMode');
+
+ assert_point2d_array_approx_equals(constraintsDict.pointsOfInterest,
+ theMock.options().pointsOfInterest,
+ 0.01);
+
+ assert_equals(constraintsDict.exposureCompensation,
+ theMock.options().exposureCompensation,
+ 'exposureCompensation');
+ assert_equals(constraintsDict.colorTemperature,
+ theMock.options().colorTemperature, 'colorTemperature');
+ assert_equals(constraintsDict.iso, theMock.options().iso, 'iso');
+
+ assert_equals(constraintsDict.brightness, theMock.options().brightness,
+ 'brightness');
+ assert_equals(constraintsDict.contrast, theMock.options().contrast,
+ 'constrast');
+ assert_equals(constraintsDict.saturation, theMock.options().saturation,
+ 'saturation');
+ assert_equals(constraintsDict.sharpness, theMock.options().sharpness,
+ 'sharpness');
+ assert_equals(constraintsDict.focusDistance, theMock.options().focusDistance
+ ,'focusDistance');
+
+
+ assert_equals(constraintsDict.torch, theMock.options().torch, 'torch');
+
+}, 'exercises MediaStreamTrack.applyConstraints(constraints)');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getCapabilities-fast.html b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getCapabilities-fast.html
new file mode 100644
index 00000000000..55272d14995
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getCapabilities-fast.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+// This test verifies that MediaStreamTrack.getCapabilities() exists and that it
+// returns something. Other tests go deeper.
+test(function() {
+ var canvas = document.getElementById('canvas');
+ var context = canvas.getContext("2d");
+ context.fillStyle = "red";
+ context.fillRect(0, 0, 10, 10);
+
+ var stream = canvas.captureStream();
+ assert_equals(stream.getAudioTracks().length, 0);
+ assert_equals(stream.getVideoTracks().length, 1);
+
+ var videoTrack = stream.getVideoTracks()[0];
+
+ assert_equals(typeof videoTrack.getCapabilities, 'function');
+
+ capabilities = videoTrack.getCapabilities();
+ assert_equals(typeof capabilities, 'object');
+}, 'MediaStreamTrack.getCapabilities()');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getCapabilities.html b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getCapabilities.html
new file mode 100644
index 00000000000..eceaf5b1a86
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getCapabilities.html
@@ -0,0 +1,145 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+const meteringModeNames = ['none', 'manual', 'single-shot', 'continuous'];
+
+// This test verifies that MediaTrackCapabilities are returned upon
+// MediaStreamTrack.getCapabilities(), with a mock Mojo service implementation.
+
+image_capture_test(async (t, imageCaptureTest) => {
+ let canvas = document.getElementById('canvas');
+ let context = canvas.getContext('2d');
+ context.fillStyle = 'red';
+ context.fillRect(0, 0, 10, 10);
+
+ let mockCapabilities = imageCaptureTest.mockImageCapture().state();
+
+ // |stream| must be created _after_ |mock| is constructed to give the
+ // latter time to override the bindings.
+ let stream = canvas.captureStream();
+ assert_equals(stream.getAudioTracks().length, 0);
+ assert_equals(stream.getVideoTracks().length, 1);
+
+ let videoTrack = stream.getVideoTracks()[0];
+ assert_equals(typeof videoTrack.getCapabilities, 'function');
+
+ // |videoTrack|'s capabilities gathering, just like the actual capture, is
+ // a process kicked off right after creation, we introduce a small delay
+ // to allow for those to be collected.
+ // TODO(mcasas): this shouldn't be needed, https://crbug.com/711524.
+ await new Promise(resolve => step_timeout(resolve, 100));
+
+ let capabilities = videoTrack.getCapabilities();
+ assert_equals(typeof capabilities, 'object');
+
+ assert_equals(capabilities.whiteBalanceMode.length,
+ mockCapabilities.supportedWhiteBalanceModes.length,
+ 'whiteBalanceMode');
+ for (i = 0; i < capabilities.whiteBalanceMode.length; ++i) {
+ assert_equals(
+ capabilities.whiteBalanceMode[i],
+ meteringModeNames[mockCapabilities
+ .supportedWhiteBalanceModes[i]],
+ 'whiteBalanceMode');
+ }
+
+ assert_equals(capabilities.exposureMode.length,
+ mockCapabilities.supportedExposureModes.length,
+ 'exposureMode');
+ for (i = 0; i < capabilities.exposureMode.length; ++i) {
+ assert_equals(
+ capabilities.exposureMode[i],
+ meteringModeNames[mockCapabilities.supportedExposureModes[i]],
+ 'exposureMode');
+ }
+
+ assert_equals(capabilities.focusMode.length,
+ mockCapabilities.supportedFocusModes.length,
+ 'focusMode');
+ for (i = 0; i < capabilities.focusMode.length; ++i) {
+ assert_equals(
+ capabilities.focusMode[i],
+ meteringModeNames[mockCapabilities.supportedFocusModes[i]],
+ 'focusMode');
+ }
+
+ assert_true(capabilities.exposureCompensation instanceof
+ MediaSettingsRange);
+ assert_equals(capabilities.exposureCompensation.max,
+ mockCapabilities.exposureCompensation.max);
+ assert_equals(capabilities.exposureCompensation.min,
+ mockCapabilities.exposureCompensation.min);
+ assert_equals(capabilities.exposureCompensation.step,
+ mockCapabilities.exposureCompensation.step);
+
+ assert_true(capabilities.colorTemperature instanceof
+ MediaSettingsRange);
+ assert_equals(capabilities.colorTemperature.max,
+ mockCapabilities.colorTemperature.max);
+ assert_equals(capabilities.colorTemperature.min,
+ mockCapabilities.colorTemperature.min);
+ assert_equals(capabilities.colorTemperature.step,
+ mockCapabilities.colorTemperature.step);
+
+ assert_true(capabilities.iso instanceof MediaSettingsRange);
+ assert_equals(capabilities.iso.max, mockCapabilities.iso.max);
+ assert_equals(capabilities.iso.min, mockCapabilities.iso.min);
+ assert_equals(capabilities.iso.step, mockCapabilities.iso.step);
+
+ assert_true(capabilities.brightness instanceof MediaSettingsRange);
+ assert_equals(capabilities.brightness.max,
+ mockCapabilities.brightness.max);
+ assert_equals(capabilities.brightness.min,
+ mockCapabilities.brightness.min);
+ assert_equals(capabilities.brightness.step,
+ mockCapabilities.brightness.step);
+
+ assert_true(capabilities.contrast instanceof MediaSettingsRange);
+ assert_equals(capabilities.contrast.max,
+ mockCapabilities.contrast.max);
+ assert_equals(capabilities.contrast.min,
+ mockCapabilities.contrast.min);
+ assert_equals(capabilities.contrast.step,
+ mockCapabilities.contrast.step);
+
+ assert_true(capabilities.saturation instanceof MediaSettingsRange);
+ assert_equals(capabilities.saturation.max,
+ mockCapabilities.saturation.max);
+ assert_equals(capabilities.saturation.min,
+ mockCapabilities.saturation.min);
+ assert_equals(capabilities.saturation.step,
+ mockCapabilities.saturation.step);
+
+ assert_true(capabilities.sharpness instanceof MediaSettingsRange);
+ assert_equals(capabilities.sharpness.max,
+ mockCapabilities.sharpness.max);
+ assert_equals(capabilities.sharpness.min,
+ mockCapabilities.sharpness.min);
+ assert_equals(capabilities.sharpness.step,
+ mockCapabilities.sharpness.step);
+
+ assert_true(capabilities.focusDistance instanceof MediaSettingsRange);
+ assert_equals(capabilities.focusDistance.max,
+ mockCapabilities.focusDistance.max);
+ assert_equals(capabilities.focusDistance.min,
+ mockCapabilities.focusDistance.min);
+ assert_equals(capabilities.focusDistance.step,
+ mockCapabilities.focusDistance.step);
+
+ assert_true(capabilities.zoom instanceof MediaSettingsRange);
+ assert_equals(capabilities.zoom.max, mockCapabilities.zoom.max);
+ assert_equals(capabilities.zoom.min, mockCapabilities.zoom.min);
+ assert_equals(capabilities.zoom.step, mockCapabilities.zoom.step);
+
+ assert_equals(capabilities.torch, mockCapabilities.supportsTorch,
+ 'torch');
+
+}, 'exercises MediaStreamTrack.getCapabilities()');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getConstraints-fast.html b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getConstraints-fast.html
new file mode 100644
index 00000000000..5a5ce5f2dad
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getConstraints-fast.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+const constraints = { whiteBalanceMode : "manual",
+ exposureMode : "continuous",
+ focusMode : "single-shot",
+
+ exposureCompensation : 133.77,
+ colorTemperature : 6000,
+ iso : 120.0,
+
+ brightness : 3,
+ contrast : 4,
+ saturation : 5,
+ sharpness : 6,
+ focusDistance : 7,
+
+ zoom : 3.141592
+ // TODO: torch https://crbug.com/700607.
+ };
+
+var canvas = document.getElementById('canvas');
+var context = canvas.getContext("2d");
+context.fillStyle = "red";
+context.fillRect(0, 0, 10, 10);
+
+// These tests verify that MediaStreamTrack.getConstraints() exists and that,
+// returns the constraints passed beforehand with applyConstraints.
+var makeAsyncTest = function(c) {
+ async_test(function(t) {
+ var stream = canvas.captureStream();
+ var videoTrack = stream.getVideoTracks()[0];
+
+ const constraintsIn = { advanced : [ c ]};
+
+ // Method applyConstraints() will fail since there is no Image Capture
+ // service in this Layout Test, but |constraintsIn| should be cached.
+ videoTrack.applyConstraints(constraintsIn)
+ .then(() => { /* ignore */ })
+ .catch((e) => { /* ignore */ })
+ .then(() => {
+ const constraintsOut = videoTrack.getConstraints();
+ assert_object_equals(constraintsOut, constraintsIn, "constraints");
+ t.done();
+ });
+
+ // Clear constraints by sending an empty constraint set.
+ videoTrack.applyConstraints({})
+ .then(() => {
+ const constraintsOut = videoTrack.getConstraints();
+ assert_object_equals(constraintsOut, {}, "constraints");
+ t.done();
+ });
+ });
+};
+
+// Send each line of |constraints| in turn and then the whole dictionary.
+for (key in constraints) {
+ var one_constraint = {};
+ one_constraint[key] = constraints[key];
+ generate_tests(
+ makeAsyncTest,
+ [[ 'MediaStreamTrack.getConstraints(), key: ' + key, one_constraint ]]);
+}
+
+generate_tests(makeAsyncTest, [[
+ 'MediaStreamTrack.getConstraints(), complete ', constraints
+ ]]);
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getSettings-fast.html b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getSettings-fast.html
new file mode 100644
index 00000000000..a4ecbe61181
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getSettings-fast.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+// This test verifies that MediaStreamTrack.getSettings() exists and that it
+// returns something. Other tests go deeper.
+test(function() {
+ var canvas = document.getElementById('canvas');
+ var context = canvas.getContext("2d");
+ context.fillStyle = "red";
+ context.fillRect(0, 0, 10, 10);
+
+ var stream = canvas.captureStream();
+ assert_equals(stream.getAudioTracks().length, 0);
+ assert_equals(stream.getVideoTracks().length, 1);
+
+ var videoTrack = stream.getVideoTracks()[0];
+
+ assert_equals(typeof videoTrack.getSettings, 'function');
+
+ settings = videoTrack.getSettings();
+ assert_equals(typeof settings, 'object');
+}, 'MediaStreamTrack.getSettings()');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getSettings.html b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getSettings.html
new file mode 100644
index 00000000000..5e9256eeb74
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/MediaStreamTrack-getSettings.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+const meteringModeNames = ['none', 'manual', 'single-shot', 'continuous'];
+
+// This test verifies that the settings defined in the mock Mojo service
+// implementation are the same as those returned by the corresponding
+// MediaStreamTrack.getSettings().
+
+image_capture_test(async (t, imageCaptureTest) => {
+ let canvas = document.getElementById('canvas');
+ let context = canvas.getContext('2d');
+ context.fillStyle = 'red';
+ context.fillRect(0, 0, 10, 10);
+
+ let mockSettings = imageCaptureTest.mockImageCapture().state();
+
+ // |stream| must be created _after_ |mock| is constructed to give the
+ // latter time to override the bindings.
+ let stream = canvas.captureStream();
+ let videoTrack = stream.getVideoTracks()[0];
+
+ // |videoTrack|s settings retrieval, just like the actual capture, is a
+ // process kicked right after creation, we introduce a small delay to
+ // allow for those to be collected.
+ await new Promise(resolve => step_timeout(resolve, 100));
+
+ let settings = videoTrack.getSettings();
+ assert_equals(typeof settings, 'object');
+
+ assert_equals(settings.whiteBalanceMode,
+ meteringModeNames[mockSettings.currentWhiteBalanceMode],
+ 'whiteBalanceMode');
+ assert_equals(settings.exposureMode,
+ meteringModeNames[mockSettings.currentExposureMode],
+ 'exposureMode;');
+ assert_equals(settings.focusMode,
+ meteringModeNames[mockSettings.currentFocusMode],
+ 'focusMode');
+
+ assert_point2d_array_approx_equals(
+ settings.pointsOfInterest, mockSettings.pointsOfInterest, 0.01);
+
+ assert_equals(settings.exposureCompensation,
+ mockSettings.exposureCompensation.current);
+ assert_equals(settings.colorTemperature,
+ mockSettings.colorTemperature.current);
+ assert_equals(settings.iso, mockSettings.iso.current);
+
+ assert_equals(settings.brightness, mockSettings.brightness.current);
+ assert_equals(settings.contrast, mockSettings.contrast.current);
+ assert_equals(settings.saturation, mockSettings.saturation.current);
+ assert_equals(settings.sharpness, mockSettings.sharpness.current);
+
+ assert_equals(settings.focusDistance, mockSettings.focusDistance.current);
+ assert_equals(settings.zoom, mockSettings.zoom.current);
+
+ assert_equals(settings.torch, mockSettings.torch, 'torch');
+
+}, 'exercises MediaStreamTrack.getSettings()');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/detached-HTMLCanvasElement.html b/tests/wpt/web-platform-tests/mediacapture-image/detached-HTMLCanvasElement.html
new file mode 100644
index 00000000000..e27950fc5ed
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/detached-HTMLCanvasElement.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<script>
+
+async_test(t => {
+ let iframe = document.createElement('iframe');
+ let html = "<canvas id='canvas' width=10 height=10 />";
+ iframe.srcdoc = html;
+ iframe.onload = t.step_func_done(() => {
+ // This detaches the frame while retaining a reference to an
+ // HTMLCanvasElement from it.
+ let canvas = iframe.contentWindow.document.getElementById('canvas');
+ document.body.removeChild(iframe);
+
+ // Creation of the ImageCapture object (as part of the MediaStreamTrack)
+ // should be safe even if the frame is detached.
+ canvas.captureStream();
+ });
+
+ document.body.appendChild(iframe);
+}, 'MediaStreamTrack can be obtained from a detached frame');
+
+</script>
+</body>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/getPhotoCapabilities.html b/tests/wpt/web-platform-tests/mediacapture-image/getPhotoCapabilities.html
new file mode 100644
index 00000000000..83329fcac4a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/getPhotoCapabilities.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+// This test verifies that ImageCapture can get PhotoCapabilities(), with a mock
+// Mojo interface implementation.
+
+image_capture_test(async (t, imageCaptureTest) => {
+ let canvas = document.getElementById('canvas');
+ let context = canvas.getContext('2d');
+ context.fillStyle = 'red';
+ context.fillRect(0, 0, 10, 10);
+ let stream = canvas.captureStream();
+
+ let mockCapabilities = imageCaptureTest.mockImageCapture().state();
+ let capturer = new ImageCapture(stream.getVideoTracks()[0]);
+ assert_true(typeof capturer.getPhotoCapabilities == 'function');
+
+ let capabilities = await capturer.getPhotoCapabilities();
+ assert_true(capabilities instanceof PhotoCapabilities);
+
+ assert_equals(capabilities.redEyeReduction, 'controllable',
+ 'redEyeReduction');
+
+ assert_true(capabilities.imageHeight instanceof MediaSettingsRange);
+ assert_equals(capabilities.imageHeight.max, mockCapabilities.height.max);
+ assert_equals(capabilities.imageHeight.min, mockCapabilities.height.min);
+ assert_equals(capabilities.imageHeight.step, mockCapabilities.height.step);
+
+ assert_true(capabilities.imageWidth instanceof MediaSettingsRange);
+ assert_equals(capabilities.imageWidth.max, mockCapabilities.width.max);
+ assert_equals(capabilities.imageWidth.min, mockCapabilities.width.min);
+ assert_equals(capabilities.imageWidth.step, mockCapabilities.width.step);
+
+ assert_array_equals(capabilities.fillLightMode, [ 'auto', 'flash' ],
+ 'fillLightMode');
+
+}, 'exercises ImageCapture.getPhotoCapabilities()');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/getPhotoSettings.html b/tests/wpt/web-platform-tests/mediacapture-image/getPhotoSettings.html
new file mode 100644
index 00000000000..6a6184f17cb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/getPhotoSettings.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+const fillLightModeNames = ['off', 'auto', 'flash'];
+
+// This test verifies that ImageCapture can call getPhotoSettings(), with a
+// mock Mojo interface implementation.
+image_capture_test(async (t, imageCaptureTest) => {
+ let canvas = document.getElementById('canvas');
+ let context = canvas.getContext('2d');
+ context.fillStyle = 'red';
+ context.fillRect(0, 0, 10, 10);
+ let stream = canvas.captureStream();
+
+ let mockState = imageCaptureTest.mockImageCapture().state();
+ let capturer = new ImageCapture(stream.getVideoTracks()[0]);
+ let settings = await capturer.getPhotoSettings();
+ assert_equals(settings.imageWidth, mockState.width.current, 'width');
+ assert_equals(settings.imageHeight, mockState.height.current, 'height');
+ // TODO(mcasas): check the remaining two entries https://crbug.com/732521.
+
+}, 'exercises ImageCapture.getPhotoSettings()');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/resources/imagecapture-helpers.js b/tests/wpt/web-platform-tests/mediacapture-image/resources/imagecapture-helpers.js
new file mode 100644
index 00000000000..6d5ffa1695d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/resources/imagecapture-helpers.js
@@ -0,0 +1,69 @@
+'use strict';
+
+// These tests rely on the User Agent providing an implementation of
+// platform image capture backends.
+//
+// In Chromium-based browsers this implementation is provided by a polyfill
+// in order to reduce the amount of test-only code shipped to users. To enable
+// these tests the browser must be run with these options:
+//
+// --enable-blink-features=MojoJS,MojoJSTest
+
+let loadChromiumResources = Promise.resolve().then(() => {
+ if (!MojoInterfaceInterceptor) {
+ // Do nothing on non-Chromium-based browsers or when the Mojo bindings are
+ // not present in the global namespace.
+ return;
+ }
+
+ let chain = Promise.resolve();
+ [
+ '/resources/chromium/mojo_bindings.js',
+ '/resources/chromium/image_capture.mojom.js',
+ '/resources/chromium/mock-imagecapture.js',
+ ].forEach(path => {
+ // Use importScripts for workers.
+ if (typeof document === 'undefined') {
+ chain = chain.then(() => importScripts(path));
+ return;
+ }
+ let script = document.createElement('script');
+ script.src = path;
+ script.async = false;
+ chain = chain.then(() => new Promise(resolve => {
+ script.onload = () => resolve();
+ }));
+ document.head.appendChild(script);
+ });
+
+ return chain;
+});
+
+async function initialize_image_capture_tests() {
+ if (typeof ImageCaptureTest === 'undefined') {
+ await loadChromiumResources;
+ }
+ assert_true(typeof ImageCaptureTest !== 'undefined');
+ let imageCaptureTest = new ImageCaptureTest();
+ await imageCaptureTest.initialize();
+ return imageCaptureTest;
+}
+
+function image_capture_test(func, name, properties) {
+ promise_test(async (t) => {
+ let imageCaptureTest = await initialize_image_capture_tests();
+ try {
+ await func(t, imageCaptureTest);
+ } finally {
+ await imageCaptureTest.reset();
+ };
+ }, name, properties);
+}
+
+function assert_point2d_array_approx_equals(actual, expected, epsilon) {
+ assert_equals(actual.length, expected.length, 'length');
+ for (var i = 0; i < actual.length; ++i) {
+ assert_approx_equals(actual[i].x, expected[i].x, epsilon, 'x');
+ assert_approx_equals(actual[i].y, expected[i].y, epsilon, 'y');
+ }
+}
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/setOptions-reject.html b/tests/wpt/web-platform-tests/mediacapture-image/setOptions-reject.html
new file mode 100644
index 00000000000..4deee97d7bc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/setOptions-reject.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+let canvas = document.getElementById('canvas');
+let context = canvas.getContext('2d');
+context.fillStyle = 'red';
+context.fillRect(0, 0, 10, 10);
+
+// This test verifies that ImageCapture.takePhoto() rejects if any passed
+// option is unsupported or outside its allowed range.
+function makePromiseTest(getOption) {
+ image_capture_test(async (t, imageCaptureTest) => {
+ imageCaptureTest.mockImageCapture().state().redEyeReduction = 0;
+
+ let stream = canvas.captureStream();
+ let capturer = new ImageCapture(stream.getVideoTracks()[0]);
+ await capturer.getPhotoCapabilities();
+ const options = getOption(imageCaptureTest.mockImageCapture().state());
+
+ try {
+ await capturer.takePhoto(options);
+ assert_unreached('expected takePhoto to reject');
+ } catch (error) {
+ assert_equals(error.name, 'NotSupportedError');
+ }
+ });
+}
+
+const optionsGenerators = [
+ capabilities => ({ redEyeReduction: true }),
+ capabilities => ({ imageHeight: capabilities.height.max + 1 }),
+ capabilities => ({ imageHeight: capabilities.height.min - 1 }),
+ capabilities => ({ imageWidth: capabilities.width.max + 1 }),
+ capabilities => ({ imageWidth: capabilities.width.min - 1 }),
+ capabilities => ({ fillLightMode: 'off' }),
+];
+
+for (key in optionsGenerators) {
+ generate_tests(
+ makePromiseTest,
+ [[ 'ImageCapture.takePhoto(options) rejects with bad options, #' + key,
+ optionsGenerators[key] ]]);
+}
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/takePhoto-with-PhotoSettings.html b/tests/wpt/web-platform-tests/mediacapture-image/takePhoto-with-PhotoSettings.html
new file mode 100644
index 00000000000..58708612456
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/takePhoto-with-PhotoSettings.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+const fillLightModeNames = ['off', 'auto', 'flash'];
+
+// This test verifies that ImageCapture can call takePhoto with a PhotoSettings
+// argument, with a mock Mojo interface implementation.
+
+image_capture_test(async (t, imageCaptureTest) => {
+ let canvas = document.getElementById('canvas');
+ let context = canvas.getContext('2d');
+ context.fillStyle = 'red';
+ context.fillRect(0, 0, 10, 10);
+ let stream = canvas.captureStream();
+
+ const optionsDict = { imageWidth : 1080,
+ imageHeight : 100,
+ redEyeReduction : true,
+ fillLightMode : 'flash'
+ };
+
+ let capturer = new ImageCapture(stream.getVideoTracks()[0]);
+ let blob = await capturer.takePhoto(optionsDict);
+
+ // JS Blob is almost-opaque, can only check |type| and |size|.
+ assert_equals(blob.type, 'image/cat');
+ assert_equals(blob.size, 2);
+
+
+ assert_equals(true, imageCaptureTest.mockImageCapture().options().hasWidth,
+ 'hasWidth');
+ assert_equals(optionsDict.imageWidth,
+ imageCaptureTest.mockImageCapture().options().width,'width');
+ assert_equals(true, imageCaptureTest.mockImageCapture().options().hasHeight,
+ 'hasHeight');
+ assert_equals(optionsDict.imageHeight,
+ imageCaptureTest.mockImageCapture().options().height,
+ 'height');
+
+ // Depending on how mojo boolean packing in integers is arranged, this can
+ // be a number instead of a boolean, compare directly.
+ // TODO(mcasas): Revert to assert_equals() when yzshen@ has sorted it out.
+ assert_true(
+ optionsDict.redEyeReduction == imageCaptureTest.mockImageCapture().
+ options().redEyeReduction, 'redEyeReduction');
+
+ assert_equals(true,
+ imageCaptureTest.mockImageCapture().options().hasFillLightMode,
+ 'hasFillLightMode');
+ assert_equals(optionsDict.fillLightMode,
+ fillLightModeNames[
+ imageCaptureTest.mockImageCapture().options().fillLightMode],
+ 'fillLightMode');
+
+}, 'exercises ImageCapture.takePhoto(PhotoSettings dictionary)');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-image/takePhoto.html b/tests/wpt/web-platform-tests/mediacapture-image/takePhoto.html
new file mode 100644
index 00000000000..49926db1cde
--- /dev/null
+++ b/tests/wpt/web-platform-tests/mediacapture-image/takePhoto.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/mediacapture-image/resources/imagecapture-helpers.js"></script>
+<body>
+<canvas id='canvas' width=10 height=10/>
+</body>
+<script>
+
+// This test verifies that ImageCapture can takePhoto()s, with a mock Mojo
+// interface implementation.
+
+image_capture_test(async t => {
+ let canvas = document.getElementById('canvas');
+ let context = canvas.getContext('2d');
+ context.fillStyle = 'red';
+ context.fillRect(0, 0, 10, 10);
+ let stream = canvas.captureStream();
+
+ let capturer = new ImageCapture(stream.getVideoTracks()[0]);
+ let blob = await capturer.takePhoto();
+
+ // JS Blob is almost-opaque, can only check |type| and |size|.
+ assert_equals(blob.type, 'image/cat');
+ assert_equals(blob.size, 2);
+
+}, 'exercises ImageCapture.takePhoto()');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html
index f0f07da2122..0b45ac6f594 100644
--- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html
+++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html
@@ -13,7 +13,7 @@
// mic/camera has been explicitly allowed by feature policy.
function promise_factory(allowed_features) {
return new Promise((resolve, reject) => {
- navigator.getUserMedia({video: true, audio: true},
+ navigator.getUserMedia({video: true, audio: true}).then(
function(stream) {
// If microphone is allowed, there should be at least one microphone
// in the result. If camera is allowed, there should be at least one
diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/lock.py b/tests/wpt/web-platform-tests/network-error-logging/support/lock.py
index 8c88250bde0..d87b3aef0fb 100644
--- a/tests/wpt/web-platform-tests/network-error-logging/support/lock.py
+++ b/tests/wpt/web-platform-tests/network-error-logging/support/lock.py
@@ -1,4 +1,14 @@
-_LOCK_KEY = "network-error-logging:lock"
+# This file implements a shared lock that lets us ensure that the test cases in
+# this directory run serially. Each test case obtains this lock as its first
+# step, and releases it as its last. (The nel_test helper function in
+# nel.sub.js automates this process.) Because the lock needs to be shared
+# across all of the test cases, we use a hard-coded stash key. This hard-coded
+# key is a random UUID, which should not conflict with any other auto-generated
+# stash keys.
+
+import time
+
+_LOCK_KEY = "67966d2e-a847-41d8-b7c3-5f6aee3375ba"
_TIMEOUT = 5 # seconds
def wait_for_lock(request):
diff --git a/tests/wpt/web-platform-tests/payment-request/META.yml b/tests/wpt/web-platform-tests/payment-request/META.yml
index 74a165b1392..f8460d403ff 100644
--- a/tests/wpt/web-platform-tests/payment-request/META.yml
+++ b/tests/wpt/web-platform-tests/payment-request/META.yml
@@ -5,3 +5,4 @@ suggested_reviewers:
- domenic
- MSFTkihans
- mnoorenberghe
+ - romandev
diff --git a/tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html b/tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html
new file mode 100644
index 00000000000..99a10e9dc79
--- /dev/null
+++ b/tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="help" href="https://w3c.github.io/browser-payment-api/#dom-merchantvalidationevent-complete">
+<title>Test for the MerchantValidationEvent's complete() method.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<script>
+test(() => {
+ const event = new MerchantValidationEvent("test");
+ assert_throws(() => {
+ event.complete("");
+ })
+}, "If event's isTrusted attribute is false, then then throw an InvalidStateError DOMException.");
+</script>
diff --git a/tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http.html b/tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http.html
new file mode 100644
index 00000000000..8368c79a3b1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Test for MerchantValidationEvent Constructor (insecure)</title>
+<link rel="help" href="https://w3c.github.io/browser-payment-api/#merchantvalidationevent-interface">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ assert_false("MerchantValidationEvent" in Window);
+}, "MerchantValidationEvent constructor must not be exposed in insecure context");
+</script>
diff --git a/tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html b/tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html
new file mode 100644
index 00000000000..952c0f734a3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). -->
+<meta charset="utf-8">
+<title>Test for MerchantValidationEvent Constructor</title>
+<link rel="help" href="https://w3c.github.io/browser-payment-api/#merchantvalidationevent-constructor">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+const applePay = Object.freeze({ supportedMethods: "https://apple.com/apple-pay"});
+const basicCard = Object.freeze({ supportedMethods: "basic-card" });
+const defaultMethods = Object.freeze([basicCard, applePay]);
+const defaultDetails = Object.freeze({
+ total: {
+ label: "Total",
+ amount: {
+ currency: "USD",
+ value: "1.00",
+ },
+ },
+});
+
+test(() => {
+ new MerchantValidationEvent("test");
+}, "MerchantValidationEvent can be constructed in secure-context.");
+
+test(() => {
+ const ev = new MerchantValidationEvent("test", {
+ bubbles: true,
+ cancelable: true,
+ composed: true,
+ });
+ assert_false(ev.isTrusted, "constructed in script, so not trusted");
+ assert_true(ev.bubbles, "set by EventInitDict");
+ assert_true(ev.cancelable, "set by EventInitDict");
+ assert_true(ev.composed, "set by EventInitDict");
+ assert_equals(ev.target, null, "initially null");
+ assert_equals(ev.type, "test");
+}, "MerchantValidationEvent can be constructed with an EventInitDict, even if not trusted.");
+
+test(() => {
+ const request = new PaymentRequest(defaultMethods, defaultDetails);
+ const ev = new MerchantValidationEvent("test");
+ request.addEventListener("test", evt => {
+ assert_equals(ev, evt);
+ });
+ request.dispatchEvent(ev);
+}, "MerchantValidationEvent can be dispatched, even if not trusted.");
+
+test(() => {
+ const validationURL = "https://pass.com";
+ const event = new MerchantValidationEvent("test", { validationURL });
+ assert_idl_attribute(event, "validationURL");
+ assert_equals(event.validationURL, "https://pass.com/");
+}, "Must have a validationURL IDL attribute, which is initialized with to the validationURL dictionary value.");
+
+test(() => {
+ const validationURL = "http://\u005B"; // invalid URL
+ assert_throws(new TypeError(), () => {
+ new MerchantValidationEvent("test", { validationURL })
+ });
+}, "Must throw TypeError if initialized with an invalid URL.");
+
+test(() => {
+ const validationURL = "";
+ const relativePaths = [
+ "",
+ ".",
+ "/test",
+ ]
+ for(const path of relativePaths ) {
+ const event = new MerchantValidationEvent("test", { validationURL: path });
+ const expected = new URL(path, document.location.href).href;
+ assert_equals(event.validationURL, expected);
+ }
+}, "Relative validationURLs use the document as the base.");
+</script>
diff --git a/tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js b/tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js
index 85a08461fcb..a94bac064c9 100644
--- a/tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js
+++ b/tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js
@@ -5,41 +5,57 @@
const tests = {};
-window.onmessage = (e) => {
+window.onmessage = e => {
const result = e.data;
const tagName = result.urlQuery;
const t = tests[tagName];
t.step(() => {
if (expectSuccess[tagName]) {
- assert_equals(result.message, 'Success');
+ assert_equals(result.message, "Success");
+ if (result.message === "Exception") {
+ const [, code, name, stack] = result.details;
+ assert_unreached(`Unexpected exception "${name}" (${code}) ${stack}`);
+ }
} else {
- assert_equals(result.message, 'Exception');
- assert_array_equals(result.details, [true /*ex instanceof DOMException*/,
- DOMException.SECURITY_ERR /*ex.code*/,
- 'SecurityError' /*ex.name*/]);
+ assert_equals(result.message, "Exception");
+ const detailsArray = result.details.slice(0,3);
+ assert_array_equals(detailsArray, [
+ true /*ex instanceof DOMException*/,
+ DOMException.SECURITY_ERR /*ex.code*/,
+ "SecurityError" /*ex.name*/,
+ ]);
}
t.done();
});
};
-['iframe', 'frame', 'object', 'embed'].forEach((tagName, i) => {
- tests[tagName] = async_test((t) => {
+["iframe", "frame", "object", "embed"].forEach((tagName, i) => {
+ tests[tagName] = async_test(t => {
const elm = document.createElement(tagName);
if (setAllowPaymentRequest) {
- elm.setAttribute('allowpaymentrequest', '');
+ elm.setAttribute("allowpaymentrequest", "");
}
- const path = location.pathname.substring(0, location.pathname.lastIndexOf('/') + 1);
- const url = (testCrossOrigin ? "https://{{domains[www1]}}:{{ports[https][0]}}" : "") +
- path + "echo-PaymentRequest.html?" + tagName;
- if (tagName === 'object') {
+ const path = location.pathname.substring(
+ 0,
+ location.pathname.lastIndexOf("/") + 1
+ );
+ const url =
+ (testCrossOrigin ? "https://{{domains[www1]}}:{{ports[https][0]}}" : "") +
+ path +
+ "echo-PaymentRequest.html?" +
+ tagName;
+ if (tagName === "object") {
elm.data = url;
} else {
elm.src = url;
}
elm.onload = t.step_func(() => {
- window[i].postMessage('What is the result of new PaymentRequest(...)?', '*');
+ window[i].postMessage(
+ "What is the result of new PaymentRequest(...)?",
+ "*"
+ );
});
- elm.onerror = t.unreached_func('elm.onerror');
+ elm.onerror = t.unreached_func("elm.onerror");
document.body.appendChild(elm);
}, tagName);
});
diff --git a/tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html b/tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html
index f18b16ee31b..5211c7e5ce7 100644
--- a/tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html
+++ b/tests/wpt/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html
@@ -11,7 +11,9 @@ window.onmessage = (e) => {
e.source.postMessage(result, '*');
} catch(ex) {
result.message = 'Exception';
- result.details = [ex instanceof DOMException, ex.code, ex.name];
+ const isDomException = ex instanceof DOMException;
+ const stack = "stack" in ex ? ex.stack : "";
+ result.details = [ isDomException, ex.code, ex.name, stack ];
e.source.postMessage(result, '*');
}
} else {
diff --git a/tests/wpt/web-platform-tests/payment-request/idlharness.https.window.js b/tests/wpt/web-platform-tests/payment-request/idlharness.https.window.js
index 9a068c6d27f..53ae47e8921 100644
--- a/tests/wpt/web-platform-tests/payment-request/idlharness.https.window.js
+++ b/tests/wpt/web-platform-tests/payment-request/idlharness.https.window.js
@@ -25,6 +25,7 @@ idl_test(
PaymentRequest: ['paymentRequest'],
PaymentMethodChangeEvent: ['new PaymentMethodChangeEvent("paymentmethodchange")'],
PaymentRequestUpdateEvent: ['new PaymentRequestUpdateEvent("paymentrequestupdate")'],
+ MerchantValidationEvent: ['new MerchantValidationEvent("merchantvalidation")'],
});
}
);
diff --git a/tests/wpt/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html b/tests/wpt/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html
new file mode 100644
index 00000000000..c0ed23167ed
--- /dev/null
+++ b/tests/wpt/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Test for PaymentRequest's onmerchantvalidation attribute</title>
+<link rel="help" href="https://w3c.github.io/browser-payment-api/#dom-paymentrequest-onmerchantvalidation">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+"use strict";
+const testMethod = Object.freeze({ supportedMethods: "not-a-real-method" });
+const applePay = Object.freeze({ supportedMethods: "https://apple.com/apple-pay" });
+const defaultMethods = Object.freeze([testMethod, applePay]);
+const defaultDetails = Object.freeze({
+ total: {
+ label: "Total",
+ amount: {
+ currency: "USD",
+ value: "1.00",
+ },
+ },
+});
+const validationURL = "https://example.com";
+
+test(() => {
+ const request = new PaymentRequest(defaultMethods, defaultDetails);
+ assert_idl_attribute(request, "onmerchantvalidation");
+}, "Must have a onmerchantvalidation IDL attribute");
+
+test(() => {
+ const request = new PaymentRequest(defaultMethods, defaultDetails);
+ const ev = new Event("merchantvalidation");
+ let didHandle = false;
+ request.onmerchantvalidation = evt => {
+ assert_equals(ev, evt, "must be same event");
+ didHandle = true;
+ };
+ request.dispatchEvent(ev);
+ assert_true(didHandle, "event did not fire");
+}, `onmerchantvalidation attribute is a generic handler for "merchantvalidation"`);
+
+test(() => {
+ const request = new PaymentRequest(defaultMethods, defaultDetails);
+ const ev = new MerchantValidationEvent("merchantvalidation", { validationURL });
+ let didHandle = false;
+ request.onmerchantvalidation = evt => {
+ assert_equals(ev, evt, "must be same event");
+ didHandle = true;
+ };
+ request.dispatchEvent(ev);
+ assert_true(didHandle, "event did not fire");
+}, `onmerchantvalidation attribute is a handler for MerchantValidationEvent`);
+
+test(() => {
+ const request = new PaymentRequest(defaultMethods, defaultDetails);
+ const ev = new MerchantValidationEvent("merchantvalidation", { validationURL });
+ let didHandle = false;
+ let didListen = false;
+ request.onmerchantvalidation = evt => {
+ assert_equals(ev, evt, "must be same event");
+ didHandle = true;
+ };
+ request.addEventListener("merchantvalidation", evt => {
+ assert_equals(ev, evt, "must be same event");
+ didListen = true;
+ });
+ request.dispatchEvent(ev);
+ assert_true(didHandle, "onmerchantvalidation must receive the event");
+ assert_true(didListen, "addEventListener must receive the event");
+}, `onmerchantvalidation attribute and listeners both work`);
+</script>
diff --git a/tests/wpt/web-platform-tests/payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html b/tests/wpt/web-platform-tests/payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html
index 9f92d284063..c8dd92636c6 100644
--- a/tests/wpt/web-platform-tests/payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html
+++ b/tests/wpt/web-platform-tests/payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html
@@ -13,7 +13,7 @@ function runTest(button, options, expected){
response.addEventListener("payerdetailchange", resolve);
});
const error = button.previousElementSibling.textContent.trim();
- const retryPromise = response.retry({ error });
+ await response.retry({ error });
const event = await eventPromise;
assert_true(event instanceof PaymentRequestUpdateEvent);
for(const [prop, value] of Object.entries(expected)){
diff --git a/tests/wpt/web-platform-tests/pointerevents/extension/pointerevent_pointerrawmove-manual.html b/tests/wpt/web-platform-tests/pointerevents/extension/pointerevent_pointerrawmove-manual.html
new file mode 100644
index 00000000000..0c4ccf9ad48
--- /dev/null
+++ b/tests/wpt/web-platform-tests/pointerevents/extension/pointerevent_pointerrawmove-manual.html
@@ -0,0 +1,55 @@
+<!doctype html>
+<html>
+ <head>
+ <title>pointerrawmove</title>
+ <meta name="viewport" content="width=device-width">
+ <link rel="stylesheet" type="text/css" href="../pointerevent_styles.css">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Additional helper script for common checks across event types -->
+ <script type="text/javascript" src="../pointerevent_support.js"></script>
+ </head>
+ <body onload="run()">
+ <h2>pointerrawmove</h2>
+ <h4>Test Description: This test checks if pointerrawmove is dispatched correctly. </h4>
+ <p>Move your mouse within the black box.</p>
+ <p>Press left button down and then press middle button while holding down left button. Then release the buttons</p>
+ <div id="target0"></div>
+ <script>
+ var test_pointerrawmove = async_test("pointerrawmove event received");
+
+ var pointerrawmoveReceived = false;
+ var pointerdownReceived = false;
+ var pointerrawmoveFromButtonChangeReceived = false;
+
+ function run() {
+ var target0 = document.getElementById("target0");
+
+ on_event(target0, "pointerrawmove", function (event) {
+ pointerrawmoveReceived = true;
+ if (pointerdownReceived && event.button != -1)
+ pointerrawmoveFromButtonChangeReceived = true;
+ });
+ on_event(target0, "pointermove", function (event) {
+ test_pointerrawmove.step(function() {
+ assert_true(pointerrawmoveReceived,
+ "Pointerrawmove event should have been received before pointermove.");
+ }, "Pointerrawmove event should have been received before pointermove.");
+ });
+ on_event(target0, "pointerdown", function (event) {
+ pointerdownReceived = true;
+ });
+ on_event(target0, "pointerup", function (event) {
+ test_pointerrawmove.step(function() {
+ assert_true(pointerrawmoveFromButtonChangeReceived,
+ "Pointerrawmove event should have been received from chorded button changes.");
+ }, "Pointerrawmove event should have been received from chorded button changes.");
+ test_pointerrawmove.done();
+ });
+ }
+
+ </script>
+ <div id="complete-notice">
+ </div>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/preload/preload-strict-dynamic.html b/tests/wpt/web-platform-tests/preload/preload-strict-dynamic.html
index 5e473a1c894..76395656f9b 100644
--- a/tests/wpt/web-platform-tests/preload/preload-strict-dynamic.html
+++ b/tests/wpt/web-platform-tests/preload/preload-strict-dynamic.html
@@ -22,7 +22,7 @@
}
window.addEventListener("securitypolicyviolation", (e) => {
counter++;
- if (e.violatedDirective == "script-src" && e.blockedURI.includes("static-no-nonce")) {
+ if (e.violatedDirective == "script-src-elem" && e.blockedURI.includes("static-no-nonce")) {
cspViolation = true;
}
});
diff --git a/tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties-001.html b/tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties-001.html
new file mode 100644
index 00000000000..2e33cec0b33
--- /dev/null
+++ b/tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties-001.html
@@ -0,0 +1,78 @@
+<html>
+<head>
+<meta charset="utf-8">
+<title>Many properties do not support quirky-length</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://quirks.spec.whatwg.org/#the-unitless-length-quirk">
+<meta name="assert" content="quirky-length is not supported by properties not listed.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+'use strict';
+
+var properties = [
+ 'background-position-x',
+ 'background-position-y',
+ 'block-size',
+ 'border-bottom-left-radius',
+ 'border-bottom-right-radius',
+ 'border-top-left-radius',
+ 'border-top-right-radius',
+ 'column-gap',
+ 'column-rule-width',
+ 'column-width',
+ 'flex-basis',
+ 'grid-auto-columns',
+ 'grid-auto-rows',
+ 'grid-template-columns',
+ 'grid-template-rows',
+ 'inline-size',
+ 'margin-block-end',
+ 'margin-block-start',
+ 'margin-inline-end',
+ 'margin-inline-start',
+ 'min-block-size',
+ 'min-inline-size',
+ 'offset-distance',
+ 'outline-offset',
+ 'outline-width',
+ 'padding-block-end',
+ 'padding-block-start',
+ 'padding-inline-end',
+ 'padding-inline-start',
+ 'perspective',
+ 'row-gap',
+ 'scroll-margin-block-end',
+ 'scroll-margin-block-start',
+ 'scroll-margin-bottom',
+ 'scroll-margin-inline-end',
+ 'scroll-margin-inline-start',
+ 'scroll-margin-left',
+ 'scroll-margin-right',
+ 'scroll-margin-top',
+ 'scroll-padding-block-end',
+ 'scroll-padding-block-start',
+ 'scroll-padding-bottom',
+ 'scroll-padding-inline-end',
+ 'scroll-padding-inline-start',
+ 'scroll-padding-left',
+ 'scroll-padding-right',
+ 'scroll-padding-top',
+ 'shape-margin'
+];
+
+for (let property of properties) {
+ test(() => {
+ if (!getComputedStyle(target)[property])
+ return;
+ target.style[property] = '567px';
+ target.style[property] = '1234';
+ assert_equals(target.style[property], '567px');
+ }, 'Property ' + property + ' does not support quirky length');
+}
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties-002.html b/tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties-002.html
new file mode 100644
index 00000000000..5f98bc283eb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties-002.html
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta charset="utf-8">
+<title>Many properties do not support quirky-length</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://quirks.spec.whatwg.org/#the-unitless-length-quirk">
+<meta name="assert" content="quirky-length is not supported by properties not listed.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+'use strict';
+
+var properties = [
+ 'background-blend-mode',
+ 'background-size',
+ 'box-shadow',
+ 'clip-path',
+ 'column-span',
+ 'filter',
+ 'mask',
+ 'object-position',
+ 'perspective-origin',
+ 'text-shadow',
+ 'transform-origin'
+];
+
+for (let property of properties) {
+ test(() => {
+ if (!getComputedStyle(target)[property]) {
+ assert_unreached('Property ' + property + ' not supported');
+ }
+ target.style[property] = '1234';
+ assert_not_equals(target.style[property], '1234');
+ assert_not_equals(target.style[property], '1234px');
+ }, 'Property ' + property + ' does not support quirky length');
+}
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties.html b/tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties.html
deleted file mode 100644
index a1de182770a..00000000000
--- a/tests/wpt/web-platform-tests/quirks/unitless-length/excluded-properties.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<html>
-<head>
-<meta charset="utf-8">
-<title>Many properties do not support quirky-length</title>
-<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
-<link rel="help" href="https://quirks.spec.whatwg.org/#the-unitless-length-quirk">
-<meta name="assert" content="quirky-length is not supported by properties not listed.">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="target"></div>
-<script>
-'use strict';
-
-var properties = [
- 'block-size',
- 'inline-size',
- 'margin-block-end',
- 'margin-block-start',
- 'margin-inline-end',
- 'margin-inline-start',
- 'min-block-size',
- 'min-inline-size',
- 'offset-distance',
- 'padding-block-end',
- 'padding-block-start',
- 'padding-inline-end',
- 'padding-inline-start',
- 'scroll-margin-block-end',
- 'scroll-margin-block-start',
- 'scroll-margin-bottom',
- 'scroll-margin-inline-end',
- 'scroll-margin-inline-start',
- 'scroll-margin-left',
- 'scroll-margin-right',
- 'scroll-margin-top',
- 'scroll-padding-block-end',
- 'scroll-padding-block-start',
- 'scroll-padding-bottom',
- 'scroll-padding-inline-end',
- 'scroll-padding-inline-start',
- 'scroll-padding-left',
- 'scroll-padding-right',
- 'scroll-padding-top',
- 'shape-margin'
-];
-
-for (let property of properties) {
- test(() => {
- if (!getComputedStyle(target)[property])
- return;
- target.style[property] = '567px';
- target.style[property] = '1234';
- assert_equals(target.style[property], '567px');
- }, 'Property ' + property + ' does not support quirky length');
-}
-</script>
-</body>
-</html>
diff --git a/tests/wpt/web-platform-tests/resources/chromium/generic_sensor_mocks.js b/tests/wpt/web-platform-tests/resources/chromium/generic_sensor_mocks.js
index 24a469199ff..d9a23f44714 100644
--- a/tests/wpt/web-platform-tests/resources/chromium/generic_sensor_mocks.js
+++ b/tests/wpt/web-platform-tests/resources/chromium/generic_sensor_mocks.js
@@ -109,7 +109,7 @@ var GenericSensorTest = (() => {
this.readingSizeInBytes_ =
device.mojom.SensorInitParams.kReadBufferSizeForTests;
this.sharedBufferSizeInBytes_ = this.readingSizeInBytes_ *
- device.mojom.SensorType.LAST;
+ (device.mojom.SensorType.RELATIVE_ORIENTATION_QUATERNION + 1);
let rv = Mojo.createSharedBuffer(this.sharedBufferSizeInBytes_);
assert_equals(rv.result, Mojo.RESULT_OK, "Failed to create buffer");
this.sharedBufferHandle_ = rv.handle;
@@ -130,8 +130,7 @@ var GenericSensorTest = (() => {
}
async getSensor(type) {
- const offset = (device.mojom.SensorType.LAST - type) *
- this.readingSizeInBytes_;
+ const offset = type * this.readingSizeInBytes_;
const reportingMode = device.mojom.ReportingMode.ON_CHANGE;
let sensorPtr = new device.mojom.SensorPtr();
diff --git a/tests/wpt/web-platform-tests/resources/chromium/image_capture-mojom.js.headers b/tests/wpt/web-platform-tests/resources/chromium/image_capture-mojom.js.headers
new file mode 100644
index 00000000000..6c61a34a4ec
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/chromium/image_capture-mojom.js.headers
@@ -0,0 +1 @@
+Content-Type: text/javascript; charset=utf-8 \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/chromium/image_capture.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/image_capture.mojom.js
new file mode 100644
index 00000000000..11123feb87d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/chromium/image_capture.mojom.js
@@ -0,0 +1,1346 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+'use strict';
+
+(function() {
+ var mojomId = 'media/capture/mojom/image_capture.mojom';
+ if (mojo.internal.isMojomLoaded(mojomId)) {
+ console.warn('The following mojom is loaded multiple times: ' + mojomId);
+ return;
+ }
+ mojo.internal.markMojomLoaded(mojomId);
+ var bindings = mojo;
+ var associatedBindings = mojo;
+ var codec = mojo.internal;
+ var validator = mojo.internal;
+
+ var exports = mojo.internal.exposeNamespace('media.mojom');
+
+
+ var MeteringMode = {};
+ MeteringMode.NONE = 0;
+ MeteringMode.MANUAL = MeteringMode.NONE + 1;
+ MeteringMode.SINGLE_SHOT = MeteringMode.MANUAL + 1;
+ MeteringMode.CONTINUOUS = MeteringMode.SINGLE_SHOT + 1;
+
+ MeteringMode.isKnownEnumValue = function(value) {
+ switch (value) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ return true;
+ }
+ return false;
+ };
+
+ MeteringMode.validate = function(enumValue) {
+ var isExtensible = false;
+ if (isExtensible || this.isKnownEnumValue(enumValue))
+ return validator.validationError.NONE;
+
+ return validator.validationError.UNKNOWN_ENUM_VALUE;
+ };
+ var RedEyeReduction = {};
+ RedEyeReduction.NEVER = 0;
+ RedEyeReduction.ALWAYS = RedEyeReduction.NEVER + 1;
+ RedEyeReduction.CONTROLLABLE = RedEyeReduction.ALWAYS + 1;
+
+ RedEyeReduction.isKnownEnumValue = function(value) {
+ switch (value) {
+ case 0:
+ case 1:
+ case 2:
+ return true;
+ }
+ return false;
+ };
+
+ RedEyeReduction.validate = function(enumValue) {
+ var isExtensible = false;
+ if (isExtensible || this.isKnownEnumValue(enumValue))
+ return validator.validationError.NONE;
+
+ return validator.validationError.UNKNOWN_ENUM_VALUE;
+ };
+ var FillLightMode = {};
+ FillLightMode.OFF = 0;
+ FillLightMode.AUTO = FillLightMode.OFF + 1;
+ FillLightMode.FLASH = FillLightMode.AUTO + 1;
+
+ FillLightMode.isKnownEnumValue = function(value) {
+ switch (value) {
+ case 0:
+ case 1:
+ case 2:
+ return true;
+ }
+ return false;
+ };
+
+ FillLightMode.validate = function(enumValue) {
+ var isExtensible = false;
+ if (isExtensible || this.isKnownEnumValue(enumValue))
+ return validator.validationError.NONE;
+
+ return validator.validationError.UNKNOWN_ENUM_VALUE;
+ };
+
+ function Range(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ Range.prototype.initDefaults_ = function() {
+ this.max = 0;
+ this.min = 0;
+ this.current = 0;
+ this.step = 0;
+ };
+ Range.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ Range.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 40}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+
+
+
+ return validator.validationError.NONE;
+ };
+
+ Range.encodedSize = codec.kStructHeaderSize + 32;
+
+ Range.decode = function(decoder) {
+ var packed;
+ var val = new Range();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ val.max = decoder.decodeStruct(codec.Double);
+ val.min = decoder.decodeStruct(codec.Double);
+ val.current = decoder.decodeStruct(codec.Double);
+ val.step = decoder.decodeStruct(codec.Double);
+ return val;
+ };
+
+ Range.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(Range.encodedSize);
+ encoder.writeUint32(0);
+ encoder.encodeStruct(codec.Double, val.max);
+ encoder.encodeStruct(codec.Double, val.min);
+ encoder.encodeStruct(codec.Double, val.current);
+ encoder.encodeStruct(codec.Double, val.step);
+ };
+ function PhotoState(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ PhotoState.prototype.initDefaults_ = function() {
+ this.supportedWhiteBalanceModes = null;
+ this.currentWhiteBalanceMode = 0;
+ this.currentExposureMode = 0;
+ this.supportedExposureModes = null;
+ this.supportedFocusModes = null;
+ this.currentFocusMode = 0;
+ this.supportsTorch = false;
+ this.torch = false;
+ this.pointsOfInterest = null;
+ this.exposureCompensation = null;
+ this.colorTemperature = null;
+ this.iso = null;
+ this.brightness = null;
+ this.contrast = null;
+ this.saturation = null;
+ this.sharpness = null;
+ this.focusDistance = null;
+ this.zoom = null;
+ this.redEyeReduction = 0;
+ this.height = null;
+ this.width = null;
+ this.fillLightMode = null;
+ };
+ PhotoState.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ PhotoState.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 160}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.supportedWhiteBalanceModes
+ err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 4, new codec.Enum(MeteringMode), false, [0], 0);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.currentWhiteBalanceMode
+ err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 8, MeteringMode);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.supportedExposureModes
+ err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 4, new codec.Enum(MeteringMode), false, [0], 0);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.currentExposureMode
+ err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 12, MeteringMode);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.supportedFocusModes
+ err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 24, 4, new codec.Enum(MeteringMode), false, [0], 0);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.currentFocusMode
+ err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 32, MeteringMode);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.pointsOfInterest
+ err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 40, 8, new codec.PointerTo(Point2D), false, [0], 0);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.exposureCompensation
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 48, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.colorTemperature
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 56, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.iso
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 64, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.brightness
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 72, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.contrast
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 80, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.saturation
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 88, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.sharpness
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 96, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.focusDistance
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 104, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.zoom
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 112, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+
+
+ // validate PhotoState.redEyeReduction
+ err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 120, RedEyeReduction);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.height
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 128, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.width
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 136, Range, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoState.fillLightMode
+ err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 144, 4, new codec.Enum(FillLightMode), false, [0], 0);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ return validator.validationError.NONE;
+ };
+
+ PhotoState.encodedSize = codec.kStructHeaderSize + 152;
+
+ PhotoState.decode = function(decoder) {
+ var packed;
+ var val = new PhotoState();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ val.supportedWhiteBalanceModes = decoder.decodeArrayPointer(new codec.Enum(MeteringMode));
+ val.currentWhiteBalanceMode = decoder.decodeStruct(codec.Int32);
+ val.currentExposureMode = decoder.decodeStruct(codec.Int32);
+ val.supportedExposureModes = decoder.decodeArrayPointer(new codec.Enum(MeteringMode));
+ val.supportedFocusModes = decoder.decodeArrayPointer(new codec.Enum(MeteringMode));
+ val.currentFocusMode = decoder.decodeStruct(codec.Int32);
+ packed = decoder.readUint8();
+ val.supportsTorch = (packed >> 0) & 1 ? true : false;
+ val.torch = (packed >> 1) & 1 ? true : false;
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ val.pointsOfInterest = decoder.decodeArrayPointer(new codec.PointerTo(Point2D));
+ val.exposureCompensation = decoder.decodeStructPointer(Range);
+ val.colorTemperature = decoder.decodeStructPointer(Range);
+ val.iso = decoder.decodeStructPointer(Range);
+ val.brightness = decoder.decodeStructPointer(Range);
+ val.contrast = decoder.decodeStructPointer(Range);
+ val.saturation = decoder.decodeStructPointer(Range);
+ val.sharpness = decoder.decodeStructPointer(Range);
+ val.focusDistance = decoder.decodeStructPointer(Range);
+ val.zoom = decoder.decodeStructPointer(Range);
+ val.redEyeReduction = decoder.decodeStruct(codec.Int32);
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ val.height = decoder.decodeStructPointer(Range);
+ val.width = decoder.decodeStructPointer(Range);
+ val.fillLightMode = decoder.decodeArrayPointer(new codec.Enum(FillLightMode));
+ return val;
+ };
+
+ PhotoState.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(PhotoState.encodedSize);
+ encoder.writeUint32(0);
+ encoder.encodeArrayPointer(new codec.Enum(MeteringMode), val.supportedWhiteBalanceModes);
+ encoder.encodeStruct(codec.Int32, val.currentWhiteBalanceMode);
+ encoder.encodeStruct(codec.Int32, val.currentExposureMode);
+ encoder.encodeArrayPointer(new codec.Enum(MeteringMode), val.supportedExposureModes);
+ encoder.encodeArrayPointer(new codec.Enum(MeteringMode), val.supportedFocusModes);
+ encoder.encodeStruct(codec.Int32, val.currentFocusMode);
+ packed = 0;
+ packed |= (val.supportsTorch & 1) << 0
+ packed |= (val.torch & 1) << 1
+ encoder.writeUint8(packed);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.encodeArrayPointer(new codec.PointerTo(Point2D), val.pointsOfInterest);
+ encoder.encodeStructPointer(Range, val.exposureCompensation);
+ encoder.encodeStructPointer(Range, val.colorTemperature);
+ encoder.encodeStructPointer(Range, val.iso);
+ encoder.encodeStructPointer(Range, val.brightness);
+ encoder.encodeStructPointer(Range, val.contrast);
+ encoder.encodeStructPointer(Range, val.saturation);
+ encoder.encodeStructPointer(Range, val.sharpness);
+ encoder.encodeStructPointer(Range, val.focusDistance);
+ encoder.encodeStructPointer(Range, val.zoom);
+ encoder.encodeStruct(codec.Int32, val.redEyeReduction);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.encodeStructPointer(Range, val.height);
+ encoder.encodeStructPointer(Range, val.width);
+ encoder.encodeArrayPointer(new codec.Enum(FillLightMode), val.fillLightMode);
+ };
+ function Point2D(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ Point2D.prototype.initDefaults_ = function() {
+ this.x = 0;
+ this.y = 0;
+ };
+ Point2D.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ Point2D.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 16}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+
+ return validator.validationError.NONE;
+ };
+
+ Point2D.encodedSize = codec.kStructHeaderSize + 8;
+
+ Point2D.decode = function(decoder) {
+ var packed;
+ var val = new Point2D();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ val.x = decoder.decodeStruct(codec.Float);
+ val.y = decoder.decodeStruct(codec.Float);
+ return val;
+ };
+
+ Point2D.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(Point2D.encodedSize);
+ encoder.writeUint32(0);
+ encoder.encodeStruct(codec.Float, val.x);
+ encoder.encodeStruct(codec.Float, val.y);
+ };
+ function PhotoSettings(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ PhotoSettings.prototype.initDefaults_ = function() {
+ this.hasWhiteBalanceMode = false;
+ this.hasExposureMode = false;
+ this.hasFocusMode = false;
+ this.hasExposureCompensation = false;
+ this.hasColorTemperature = false;
+ this.hasIso = false;
+ this.hasBrightness = false;
+ this.hasContrast = false;
+ this.hasSaturation = false;
+ this.hasSharpness = false;
+ this.hasFocusDistance = false;
+ this.hasZoom = false;
+ this.hasTorch = false;
+ this.torch = false;
+ this.hasFillLightMode = false;
+ this.hasWidth = false;
+ this.hasHeight = false;
+ this.hasRedEyeReduction = false;
+ this.redEyeReduction = false;
+ this.whiteBalanceMode = 0;
+ this.exposureMode = 0;
+ this.focusMode = 0;
+ this.pointsOfInterest = null;
+ this.exposureCompensation = 0;
+ this.colorTemperature = 0;
+ this.iso = 0;
+ this.brightness = 0;
+ this.contrast = 0;
+ this.saturation = 0;
+ this.sharpness = 0;
+ this.focusDistance = 0;
+ this.zoom = 0;
+ this.fillLightMode = 0;
+ this.width = 0;
+ this.height = 0;
+ };
+ PhotoSettings.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ PhotoSettings.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 128}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+
+ // validate PhotoSettings.whiteBalanceMode
+ err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 4, MeteringMode);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+
+ // validate PhotoSettings.exposureMode
+ err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 8, MeteringMode);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+
+ // validate PhotoSettings.focusMode
+ err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 12, MeteringMode);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate PhotoSettings.pointsOfInterest
+ err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 8, new codec.PointerTo(Point2D), false, [0], 0);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ // validate PhotoSettings.fillLightMode
+ err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 96, FillLightMode);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+
+
+
+
+
+ return validator.validationError.NONE;
+ };
+
+ PhotoSettings.encodedSize = codec.kStructHeaderSize + 120;
+
+ PhotoSettings.decode = function(decoder) {
+ var packed;
+ var val = new PhotoSettings();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ packed = decoder.readUint8();
+ val.hasWhiteBalanceMode = (packed >> 0) & 1 ? true : false;
+ val.hasExposureMode = (packed >> 1) & 1 ? true : false;
+ val.hasFocusMode = (packed >> 2) & 1 ? true : false;
+ val.hasExposureCompensation = (packed >> 3) & 1 ? true : false;
+ val.hasColorTemperature = (packed >> 4) & 1 ? true : false;
+ val.hasIso = (packed >> 5) & 1 ? true : false;
+ val.hasBrightness = (packed >> 6) & 1 ? true : false;
+ val.hasContrast = (packed >> 7) & 1 ? true : false;
+ packed = decoder.readUint8();
+ val.hasSaturation = (packed >> 0) & 1 ? true : false;
+ val.hasSharpness = (packed >> 1) & 1 ? true : false;
+ val.hasFocusDistance = (packed >> 2) & 1 ? true : false;
+ val.hasZoom = (packed >> 3) & 1 ? true : false;
+ val.hasTorch = (packed >> 4) & 1 ? true : false;
+ val.torch = (packed >> 5) & 1 ? true : false;
+ val.hasFillLightMode = (packed >> 6) & 1 ? true : false;
+ val.hasWidth = (packed >> 7) & 1 ? true : false;
+ packed = decoder.readUint8();
+ val.hasHeight = (packed >> 0) & 1 ? true : false;
+ val.hasRedEyeReduction = (packed >> 1) & 1 ? true : false;
+ val.redEyeReduction = (packed >> 2) & 1 ? true : false;
+ decoder.skip(1);
+ val.whiteBalanceMode = decoder.decodeStruct(codec.Int32);
+ val.exposureMode = decoder.decodeStruct(codec.Int32);
+ val.focusMode = decoder.decodeStruct(codec.Int32);
+ val.pointsOfInterest = decoder.decodeArrayPointer(new codec.PointerTo(Point2D));
+ val.exposureCompensation = decoder.decodeStruct(codec.Double);
+ val.colorTemperature = decoder.decodeStruct(codec.Double);
+ val.iso = decoder.decodeStruct(codec.Double);
+ val.brightness = decoder.decodeStruct(codec.Double);
+ val.contrast = decoder.decodeStruct(codec.Double);
+ val.saturation = decoder.decodeStruct(codec.Double);
+ val.sharpness = decoder.decodeStruct(codec.Double);
+ val.focusDistance = decoder.decodeStruct(codec.Double);
+ val.zoom = decoder.decodeStruct(codec.Double);
+ val.fillLightMode = decoder.decodeStruct(codec.Int32);
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ val.width = decoder.decodeStruct(codec.Double);
+ val.height = decoder.decodeStruct(codec.Double);
+ return val;
+ };
+
+ PhotoSettings.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(PhotoSettings.encodedSize);
+ encoder.writeUint32(0);
+ packed = 0;
+ packed |= (val.hasWhiteBalanceMode & 1) << 0
+ packed |= (val.hasExposureMode & 1) << 1
+ packed |= (val.hasFocusMode & 1) << 2
+ packed |= (val.hasExposureCompensation & 1) << 3
+ packed |= (val.hasColorTemperature & 1) << 4
+ packed |= (val.hasIso & 1) << 5
+ packed |= (val.hasBrightness & 1) << 6
+ packed |= (val.hasContrast & 1) << 7
+ encoder.writeUint8(packed);
+ packed = 0;
+ packed |= (val.hasSaturation & 1) << 0
+ packed |= (val.hasSharpness & 1) << 1
+ packed |= (val.hasFocusDistance & 1) << 2
+ packed |= (val.hasZoom & 1) << 3
+ packed |= (val.hasTorch & 1) << 4
+ packed |= (val.torch & 1) << 5
+ packed |= (val.hasFillLightMode & 1) << 6
+ packed |= (val.hasWidth & 1) << 7
+ encoder.writeUint8(packed);
+ packed = 0;
+ packed |= (val.hasHeight & 1) << 0
+ packed |= (val.hasRedEyeReduction & 1) << 1
+ packed |= (val.redEyeReduction & 1) << 2
+ encoder.writeUint8(packed);
+ encoder.skip(1);
+ encoder.encodeStruct(codec.Int32, val.whiteBalanceMode);
+ encoder.encodeStruct(codec.Int32, val.exposureMode);
+ encoder.encodeStruct(codec.Int32, val.focusMode);
+ encoder.encodeArrayPointer(new codec.PointerTo(Point2D), val.pointsOfInterest);
+ encoder.encodeStruct(codec.Double, val.exposureCompensation);
+ encoder.encodeStruct(codec.Double, val.colorTemperature);
+ encoder.encodeStruct(codec.Double, val.iso);
+ encoder.encodeStruct(codec.Double, val.brightness);
+ encoder.encodeStruct(codec.Double, val.contrast);
+ encoder.encodeStruct(codec.Double, val.saturation);
+ encoder.encodeStruct(codec.Double, val.sharpness);
+ encoder.encodeStruct(codec.Double, val.focusDistance);
+ encoder.encodeStruct(codec.Double, val.zoom);
+ encoder.encodeStruct(codec.Int32, val.fillLightMode);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.encodeStruct(codec.Double, val.width);
+ encoder.encodeStruct(codec.Double, val.height);
+ };
+ function Blob(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ Blob.prototype.initDefaults_ = function() {
+ this.mimeType = null;
+ this.data = null;
+ };
+ Blob.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ Blob.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 24}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate Blob.mimeType
+ err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate Blob.data
+ err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ return validator.validationError.NONE;
+ };
+
+ Blob.encodedSize = codec.kStructHeaderSize + 16;
+
+ Blob.decode = function(decoder) {
+ var packed;
+ var val = new Blob();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ val.mimeType = decoder.decodeStruct(codec.String);
+ val.data = decoder.decodeArrayPointer(codec.Uint8);
+ return val;
+ };
+
+ Blob.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(Blob.encodedSize);
+ encoder.writeUint32(0);
+ encoder.encodeStruct(codec.String, val.mimeType);
+ encoder.encodeArrayPointer(codec.Uint8, val.data);
+ };
+ function ImageCapture_GetPhotoState_Params(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ ImageCapture_GetPhotoState_Params.prototype.initDefaults_ = function() {
+ this.sourceId = null;
+ };
+ ImageCapture_GetPhotoState_Params.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ ImageCapture_GetPhotoState_Params.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 16}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate ImageCapture_GetPhotoState_Params.sourceId
+ err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ return validator.validationError.NONE;
+ };
+
+ ImageCapture_GetPhotoState_Params.encodedSize = codec.kStructHeaderSize + 8;
+
+ ImageCapture_GetPhotoState_Params.decode = function(decoder) {
+ var packed;
+ var val = new ImageCapture_GetPhotoState_Params();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ val.sourceId = decoder.decodeStruct(codec.String);
+ return val;
+ };
+
+ ImageCapture_GetPhotoState_Params.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(ImageCapture_GetPhotoState_Params.encodedSize);
+ encoder.writeUint32(0);
+ encoder.encodeStruct(codec.String, val.sourceId);
+ };
+ function ImageCapture_GetPhotoState_ResponseParams(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ ImageCapture_GetPhotoState_ResponseParams.prototype.initDefaults_ = function() {
+ this.state = null;
+ };
+ ImageCapture_GetPhotoState_ResponseParams.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ ImageCapture_GetPhotoState_ResponseParams.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 16}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate ImageCapture_GetPhotoState_ResponseParams.state
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, PhotoState, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ return validator.validationError.NONE;
+ };
+
+ ImageCapture_GetPhotoState_ResponseParams.encodedSize = codec.kStructHeaderSize + 8;
+
+ ImageCapture_GetPhotoState_ResponseParams.decode = function(decoder) {
+ var packed;
+ var val = new ImageCapture_GetPhotoState_ResponseParams();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ val.state = decoder.decodeStructPointer(PhotoState);
+ return val;
+ };
+
+ ImageCapture_GetPhotoState_ResponseParams.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(ImageCapture_GetPhotoState_ResponseParams.encodedSize);
+ encoder.writeUint32(0);
+ encoder.encodeStructPointer(PhotoState, val.state);
+ };
+ function ImageCapture_SetOptions_Params(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ ImageCapture_SetOptions_Params.prototype.initDefaults_ = function() {
+ this.sourceId = null;
+ this.settings = null;
+ };
+ ImageCapture_SetOptions_Params.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ ImageCapture_SetOptions_Params.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 24}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate ImageCapture_SetOptions_Params.sourceId
+ err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate ImageCapture_SetOptions_Params.settings
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, PhotoSettings, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ return validator.validationError.NONE;
+ };
+
+ ImageCapture_SetOptions_Params.encodedSize = codec.kStructHeaderSize + 16;
+
+ ImageCapture_SetOptions_Params.decode = function(decoder) {
+ var packed;
+ var val = new ImageCapture_SetOptions_Params();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ val.sourceId = decoder.decodeStruct(codec.String);
+ val.settings = decoder.decodeStructPointer(PhotoSettings);
+ return val;
+ };
+
+ ImageCapture_SetOptions_Params.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(ImageCapture_SetOptions_Params.encodedSize);
+ encoder.writeUint32(0);
+ encoder.encodeStruct(codec.String, val.sourceId);
+ encoder.encodeStructPointer(PhotoSettings, val.settings);
+ };
+ function ImageCapture_SetOptions_ResponseParams(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ ImageCapture_SetOptions_ResponseParams.prototype.initDefaults_ = function() {
+ this.success = false;
+ };
+ ImageCapture_SetOptions_ResponseParams.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ ImageCapture_SetOptions_ResponseParams.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 16}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ return validator.validationError.NONE;
+ };
+
+ ImageCapture_SetOptions_ResponseParams.encodedSize = codec.kStructHeaderSize + 8;
+
+ ImageCapture_SetOptions_ResponseParams.decode = function(decoder) {
+ var packed;
+ var val = new ImageCapture_SetOptions_ResponseParams();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ packed = decoder.readUint8();
+ val.success = (packed >> 0) & 1 ? true : false;
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ decoder.skip(1);
+ return val;
+ };
+
+ ImageCapture_SetOptions_ResponseParams.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(ImageCapture_SetOptions_ResponseParams.encodedSize);
+ encoder.writeUint32(0);
+ packed = 0;
+ packed |= (val.success & 1) << 0
+ encoder.writeUint8(packed);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ encoder.skip(1);
+ };
+ function ImageCapture_TakePhoto_Params(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ ImageCapture_TakePhoto_Params.prototype.initDefaults_ = function() {
+ this.sourceId = null;
+ };
+ ImageCapture_TakePhoto_Params.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ ImageCapture_TakePhoto_Params.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 16}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate ImageCapture_TakePhoto_Params.sourceId
+ err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ return validator.validationError.NONE;
+ };
+
+ ImageCapture_TakePhoto_Params.encodedSize = codec.kStructHeaderSize + 8;
+
+ ImageCapture_TakePhoto_Params.decode = function(decoder) {
+ var packed;
+ var val = new ImageCapture_TakePhoto_Params();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ val.sourceId = decoder.decodeStruct(codec.String);
+ return val;
+ };
+
+ ImageCapture_TakePhoto_Params.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(ImageCapture_TakePhoto_Params.encodedSize);
+ encoder.writeUint32(0);
+ encoder.encodeStruct(codec.String, val.sourceId);
+ };
+ function ImageCapture_TakePhoto_ResponseParams(values) {
+ this.initDefaults_();
+ this.initFields_(values);
+ }
+
+
+ ImageCapture_TakePhoto_ResponseParams.prototype.initDefaults_ = function() {
+ this.blob = null;
+ };
+ ImageCapture_TakePhoto_ResponseParams.prototype.initFields_ = function(fields) {
+ for(var field in fields) {
+ if (this.hasOwnProperty(field))
+ this[field] = fields[field];
+ }
+ };
+
+ ImageCapture_TakePhoto_ResponseParams.validate = function(messageValidator, offset) {
+ var err;
+ err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ var kVersionSizes = [
+ {version: 0, numBytes: 16}
+ ];
+ err = messageValidator.validateStructVersion(offset, kVersionSizes);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+
+ // validate ImageCapture_TakePhoto_ResponseParams.blob
+ err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, Blob, false);
+ if (err !== validator.validationError.NONE)
+ return err;
+
+ return validator.validationError.NONE;
+ };
+
+ ImageCapture_TakePhoto_ResponseParams.encodedSize = codec.kStructHeaderSize + 8;
+
+ ImageCapture_TakePhoto_ResponseParams.decode = function(decoder) {
+ var packed;
+ var val = new ImageCapture_TakePhoto_ResponseParams();
+ var numberOfBytes = decoder.readUint32();
+ var version = decoder.readUint32();
+ val.blob = decoder.decodeStructPointer(Blob);
+ return val;
+ };
+
+ ImageCapture_TakePhoto_ResponseParams.encode = function(encoder, val) {
+ var packed;
+ encoder.writeUint32(ImageCapture_TakePhoto_ResponseParams.encodedSize);
+ encoder.writeUint32(0);
+ encoder.encodeStructPointer(Blob, val.blob);
+ };
+ var kImageCapture_GetPhotoState_Name = 0;
+ var kImageCapture_SetOptions_Name = 1;
+ var kImageCapture_TakePhoto_Name = 2;
+
+ function ImageCapturePtr(handleOrPtrInfo) {
+ this.ptr = new bindings.InterfacePtrController(ImageCapture,
+ handleOrPtrInfo);
+ }
+
+ function ImageCaptureAssociatedPtr(associatedInterfacePtrInfo) {
+ this.ptr = new associatedBindings.AssociatedInterfacePtrController(
+ ImageCapture, associatedInterfacePtrInfo);
+ }
+
+ ImageCaptureAssociatedPtr.prototype =
+ Object.create(ImageCapturePtr.prototype);
+ ImageCaptureAssociatedPtr.prototype.constructor =
+ ImageCaptureAssociatedPtr;
+
+ function ImageCaptureProxy(receiver) {
+ this.receiver_ = receiver;
+ }
+ ImageCapturePtr.prototype.getPhotoState = function() {
+ return ImageCaptureProxy.prototype.getPhotoState
+ .apply(this.ptr.getProxy(), arguments);
+ };
+
+ ImageCaptureProxy.prototype.getPhotoState = function(sourceId) {
+ var params_ = new ImageCapture_GetPhotoState_Params();
+ params_.sourceId = sourceId;
+ return new Promise(function(resolve, reject) {
+ var builder = new codec.MessageV1Builder(
+ kImageCapture_GetPhotoState_Name,
+ codec.align(ImageCapture_GetPhotoState_Params.encodedSize),
+ codec.kMessageExpectsResponse, 0);
+ builder.encodeStruct(ImageCapture_GetPhotoState_Params, params_);
+ var message = builder.finish();
+ this.receiver_.acceptAndExpectResponse(message).then(function(message) {
+ var reader = new codec.MessageReader(message);
+ var responseParams =
+ reader.decodeStruct(ImageCapture_GetPhotoState_ResponseParams);
+ resolve(responseParams);
+ }).catch(function(result) {
+ reject(Error("Connection error: " + result));
+ });
+ }.bind(this));
+ };
+ ImageCapturePtr.prototype.setOptions = function() {
+ return ImageCaptureProxy.prototype.setOptions
+ .apply(this.ptr.getProxy(), arguments);
+ };
+
+ ImageCaptureProxy.prototype.setOptions = function(sourceId, settings) {
+ var params_ = new ImageCapture_SetOptions_Params();
+ params_.sourceId = sourceId;
+ params_.settings = settings;
+ return new Promise(function(resolve, reject) {
+ var builder = new codec.MessageV1Builder(
+ kImageCapture_SetOptions_Name,
+ codec.align(ImageCapture_SetOptions_Params.encodedSize),
+ codec.kMessageExpectsResponse, 0);
+ builder.encodeStruct(ImageCapture_SetOptions_Params, params_);
+ var message = builder.finish();
+ this.receiver_.acceptAndExpectResponse(message).then(function(message) {
+ var reader = new codec.MessageReader(message);
+ var responseParams =
+ reader.decodeStruct(ImageCapture_SetOptions_ResponseParams);
+ resolve(responseParams);
+ }).catch(function(result) {
+ reject(Error("Connection error: " + result));
+ });
+ }.bind(this));
+ };
+ ImageCapturePtr.prototype.takePhoto = function() {
+ return ImageCaptureProxy.prototype.takePhoto
+ .apply(this.ptr.getProxy(), arguments);
+ };
+
+ ImageCaptureProxy.prototype.takePhoto = function(sourceId) {
+ var params_ = new ImageCapture_TakePhoto_Params();
+ params_.sourceId = sourceId;
+ return new Promise(function(resolve, reject) {
+ var builder = new codec.MessageV1Builder(
+ kImageCapture_TakePhoto_Name,
+ codec.align(ImageCapture_TakePhoto_Params.encodedSize),
+ codec.kMessageExpectsResponse, 0);
+ builder.encodeStruct(ImageCapture_TakePhoto_Params, params_);
+ var message = builder.finish();
+ this.receiver_.acceptAndExpectResponse(message).then(function(message) {
+ var reader = new codec.MessageReader(message);
+ var responseParams =
+ reader.decodeStruct(ImageCapture_TakePhoto_ResponseParams);
+ resolve(responseParams);
+ }).catch(function(result) {
+ reject(Error("Connection error: " + result));
+ });
+ }.bind(this));
+ };
+
+ function ImageCaptureStub(delegate) {
+ this.delegate_ = delegate;
+ }
+ ImageCaptureStub.prototype.getPhotoState = function(sourceId) {
+ return this.delegate_ && this.delegate_.getPhotoState && this.delegate_.getPhotoState(sourceId);
+ }
+ ImageCaptureStub.prototype.setOptions = function(sourceId, settings) {
+ return this.delegate_ && this.delegate_.setOptions && this.delegate_.setOptions(sourceId, settings);
+ }
+ ImageCaptureStub.prototype.takePhoto = function(sourceId) {
+ return this.delegate_ && this.delegate_.takePhoto && this.delegate_.takePhoto(sourceId);
+ }
+
+ ImageCaptureStub.prototype.accept = function(message) {
+ var reader = new codec.MessageReader(message);
+ switch (reader.messageName) {
+ default:
+ return false;
+ }
+ };
+
+ ImageCaptureStub.prototype.acceptWithResponder =
+ function(message, responder) {
+ var reader = new codec.MessageReader(message);
+ switch (reader.messageName) {
+ case kImageCapture_GetPhotoState_Name:
+ var params = reader.decodeStruct(ImageCapture_GetPhotoState_Params);
+ this.getPhotoState(params.sourceId).then(function(response) {
+ var responseParams =
+ new ImageCapture_GetPhotoState_ResponseParams();
+ responseParams.state = response.state;
+ var builder = new codec.MessageV1Builder(
+ kImageCapture_GetPhotoState_Name,
+ codec.align(ImageCapture_GetPhotoState_ResponseParams.encodedSize),
+ codec.kMessageIsResponse, reader.requestID);
+ builder.encodeStruct(ImageCapture_GetPhotoState_ResponseParams,
+ responseParams);
+ var message = builder.finish();
+ responder.accept(message);
+ });
+ return true;
+ case kImageCapture_SetOptions_Name:
+ var params = reader.decodeStruct(ImageCapture_SetOptions_Params);
+ this.setOptions(params.sourceId, params.settings).then(function(response) {
+ var responseParams =
+ new ImageCapture_SetOptions_ResponseParams();
+ responseParams.success = response.success;
+ var builder = new codec.MessageV1Builder(
+ kImageCapture_SetOptions_Name,
+ codec.align(ImageCapture_SetOptions_ResponseParams.encodedSize),
+ codec.kMessageIsResponse, reader.requestID);
+ builder.encodeStruct(ImageCapture_SetOptions_ResponseParams,
+ responseParams);
+ var message = builder.finish();
+ responder.accept(message);
+ });
+ return true;
+ case kImageCapture_TakePhoto_Name:
+ var params = reader.decodeStruct(ImageCapture_TakePhoto_Params);
+ this.takePhoto(params.sourceId).then(function(response) {
+ var responseParams =
+ new ImageCapture_TakePhoto_ResponseParams();
+ responseParams.blob = response.blob;
+ var builder = new codec.MessageV1Builder(
+ kImageCapture_TakePhoto_Name,
+ codec.align(ImageCapture_TakePhoto_ResponseParams.encodedSize),
+ codec.kMessageIsResponse, reader.requestID);
+ builder.encodeStruct(ImageCapture_TakePhoto_ResponseParams,
+ responseParams);
+ var message = builder.finish();
+ responder.accept(message);
+ });
+ return true;
+ default:
+ return false;
+ }
+ };
+
+ function validateImageCaptureRequest(messageValidator) {
+ var message = messageValidator.message;
+ var paramsClass = null;
+ switch (message.getName()) {
+ case kImageCapture_GetPhotoState_Name:
+ if (message.expectsResponse())
+ paramsClass = ImageCapture_GetPhotoState_Params;
+ break;
+ case kImageCapture_SetOptions_Name:
+ if (message.expectsResponse())
+ paramsClass = ImageCapture_SetOptions_Params;
+ break;
+ case kImageCapture_TakePhoto_Name:
+ if (message.expectsResponse())
+ paramsClass = ImageCapture_TakePhoto_Params;
+ break;
+ }
+ if (paramsClass === null)
+ return validator.validationError.NONE;
+ return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes());
+ }
+
+ function validateImageCaptureResponse(messageValidator) {
+ var message = messageValidator.message;
+ var paramsClass = null;
+ switch (message.getName()) {
+ case kImageCapture_GetPhotoState_Name:
+ if (message.isResponse())
+ paramsClass = ImageCapture_GetPhotoState_ResponseParams;
+ break;
+ case kImageCapture_SetOptions_Name:
+ if (message.isResponse())
+ paramsClass = ImageCapture_SetOptions_ResponseParams;
+ break;
+ case kImageCapture_TakePhoto_Name:
+ if (message.isResponse())
+ paramsClass = ImageCapture_TakePhoto_ResponseParams;
+ break;
+ }
+ if (paramsClass === null)
+ return validator.validationError.NONE;
+ return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes());
+ }
+
+ var ImageCapture = {
+ name: 'media.mojom.ImageCapture',
+ kVersion: 0,
+ ptrClass: ImageCapturePtr,
+ proxyClass: ImageCaptureProxy,
+ stubClass: ImageCaptureStub,
+ validateRequest: validateImageCaptureRequest,
+ validateResponse: validateImageCaptureResponse,
+ };
+ ImageCaptureStub.prototype.validator = validateImageCaptureRequest;
+ ImageCaptureProxy.prototype.validator = validateImageCaptureResponse;
+ exports.MeteringMode = MeteringMode;
+ exports.RedEyeReduction = RedEyeReduction;
+ exports.FillLightMode = FillLightMode;
+ exports.Range = Range;
+ exports.PhotoState = PhotoState;
+ exports.Point2D = Point2D;
+ exports.PhotoSettings = PhotoSettings;
+ exports.Blob = Blob;
+ exports.ImageCapture = ImageCapture;
+ exports.ImageCapturePtr = ImageCapturePtr;
+ exports.ImageCaptureAssociatedPtr = ImageCaptureAssociatedPtr;
+})(); \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/chromium/mock-imagecapture.js b/tests/wpt/web-platform-tests/resources/chromium/mock-imagecapture.js
new file mode 100644
index 00000000000..878f59eb009
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/chromium/mock-imagecapture.js
@@ -0,0 +1,236 @@
+"use strict";
+
+var ImageCaptureTest = (() => {
+ // Class that mocks ImageCapture interface defined in
+ // https://cs.chromium.org/chromium/src/media/capture/mojom/image_capture.mojom
+ class MockImageCapture {
+ constructor() {
+ this.interceptor_ = new MojoInterfaceInterceptor(
+ media.mojom.ImageCapture.name);
+ this.interceptor_.oninterfacerequest =
+ e => this.bindingSet_.addBinding(this, e.handle);
+ this.interceptor_.start();
+
+ this.state_ = {
+ state: {
+ supportedWhiteBalanceModes: [
+ media.mojom.MeteringMode.SINGLE_SHOT,
+ media.mojom.MeteringMode.CONTINUOUS
+ ],
+ currentWhiteBalanceMode: media.mojom.MeteringMode.CONTINUOUS,
+ supportedExposureModes: [
+ media.mojom.MeteringMode.SINGLE_SHOT,
+ media.mojom.MeteringMode.CONTINUOUS
+ ],
+ currentExposureMode: media.mojom.MeteringMode.SINGLE_SHOT,
+ supportedFocusModes: [
+ media.mojom.MeteringMode.MANUAL,
+ media.mojom.MeteringMode.SINGLE_SHOT
+ ],
+ currentFocusMode: media.mojom.MeteringMode.MANUAL,
+ pointsOfInterest: [{
+ x: 0.4,
+ y: 0.6
+ }],
+
+ exposureCompensation: {
+ min: -200.0,
+ max: 200.0,
+ current: 33.0,
+ step: 33.0
+ },
+ colorTemperature: {
+ min: 2500.0,
+ max: 6500.0,
+ current: 6000.0,
+ step: 1000.0
+ },
+ iso: {
+ min: 100.0,
+ max: 12000.0,
+ current: 400.0,
+ step: 1.0
+ },
+
+ brightness: {
+ min: 1.0,
+ max: 10.0,
+ current: 5.0,
+ step: 1.0
+ },
+ contrast: {
+ min: 2.0,
+ max: 9.0,
+ current: 5.0,
+ step: 1.0
+ },
+ saturation: {
+ min: 3.0,
+ max: 8.0,
+ current: 6.0,
+ step: 1.0
+ },
+ sharpness: {
+ min: 4.0,
+ max: 7.0,
+ current: 7.0,
+ step: 1.0
+ },
+
+ focusDistance: {
+ min: 1.0,
+ max: 10.0,
+ current: 3.0,
+ step: 1.0
+ },
+
+ zoom: {
+ min: 0.0,
+ max: 10.0,
+ current: 5.0,
+ step: 5.0
+ },
+
+ supportsTorch: true,
+ torch: false,
+
+ redEyeReduction: media.mojom.RedEyeReduction.CONTROLLABLE,
+ height: {
+ min: 240.0,
+ max: 2448.0,
+ current: 240.0,
+ step: 2.0
+ },
+ width: {
+ min: 320.0,
+ max: 3264.0,
+ current: 320.0,
+ step: 3.0
+ },
+ fillLightMode: [
+ media.mojom.FillLightMode.AUTO, media.mojom.FillLightMode.FLASH
+ ],
+ }
+ };
+ this.settings_ = null;
+ this.bindingSet_ = new mojo.BindingSet(media.mojom.ImageCapture);
+ }
+
+ reset() {
+ this.bindingSet_.closeAllBindings();
+ this.interceptor_.stop();
+ }
+
+ getPhotoState(source_id) {
+ return Promise.resolve(this.state_);
+ }
+
+ setOptions(source_id, settings) {
+ this.settings_ = settings;
+ if (settings.hasIso)
+ this.state_.state.iso.current = settings.iso;
+ if (settings.hasHeight)
+ this.state_.state.height.current = settings.height;
+ if (settings.hasWidth)
+ this.state_.state.width.current = settings.width;
+ if (settings.hasZoom)
+ this.state_.state.zoom.current = settings.zoom;
+ if (settings.hasFocusMode)
+ this.state_.state.currentFocusMode = settings.focusMode;
+ if (settings.hasFocusDistance)
+ this.state_.state.focusDistance.current = settings.focusDistance;
+
+ if (settings.pointsOfInterest.length > 0) {
+ this.state_.state.pointsOfInterest =
+ settings.pointsOfInterest;
+ }
+
+ if (settings.hasExposureMode)
+ this.state_.state.currentExposureMode = settings.exposureMode;
+
+ if (settings.hasExposureCompensation) {
+ this.state_.state.exposureCompensation.current =
+ settings.exposureCompensation;
+ }
+ if (settings.hasWhiteBalanceMode) {
+ this.state_.state.currentWhiteBalanceMode =
+ settings.whiteBalanceMode;
+ }
+ if (settings.hasFillLightMode)
+ this.state_.state.fillLightMode = [settings.fillLightMode];
+ if (settings.hasRedEyeReduction)
+ this.state_.state.redEyeReduction = settings.redEyeReduction;
+ if (settings.hasColorTemperature) {
+ this.state_.state.colorTemperature.current =
+ settings.colorTemperature;
+ }
+ if (settings.hasBrightness)
+ this.state_.state.brightness.current = settings.brightness;
+ if (settings.hasContrast)
+ this.state_.state.contrast.current = settings.contrast;
+ if (settings.hasSaturation)
+ this.state_.state.saturation.current = settings.saturation;
+ if (settings.hasSharpness)
+ this.state_.state.sharpness.current = settings.sharpness;
+
+ if (settings.hasTorch)
+ this.state_.state.torch = settings.torch;
+
+ return Promise.resolve({
+ success: true
+ });
+ }
+
+ takePhoto(source_id) {
+ return Promise.resolve({
+ blob: {
+ mimeType: 'image/cat',
+ data: new Array(2)
+ }
+ });
+ }
+
+ state() {
+ return this.state_.state;
+ }
+
+ options() {
+ return this.settings_;
+ }
+ }
+
+ let testInternal = {
+ initialized: false,
+ mockImageCapture: null
+ }
+
+ class ImageCaptureTestChromium {
+
+ constructor() {
+ Object.freeze(this); // Make it immutable.
+ }
+
+ initialize() {
+ if (testInternal.initialized)
+ throw new Error('Call reset() before initialize().');
+
+ testInternal.mockImageCapture = new MockImageCapture;
+ testInternal.initialized = true;
+ }
+ // Resets state of image capture mocks between test runs.
+ async reset() {
+ if (!testInternal.initialized)
+ throw new Error('Call initialize() before reset().');
+ testInternal.mockImageCapture.reset();
+ testInternal.mockImageCapture = null;
+ testInternal.initialized = false;
+
+ await new Promise(resolve => setTimeout(resolve, 0));
+ }
+ mockImageCapture() {
+ return testInternal.mockImageCapture;
+ }
+ }
+
+ return ImageCaptureTestChromium;
+})(); \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/resources/chromium/sensor.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/sensor.mojom.js
index daa99217335..ffbd25b57df 100644
--- a/tests/wpt/web-platform-tests/resources/chromium/sensor.mojom.js
+++ b/tests/wpt/web-platform-tests/resources/chromium/sensor.mojom.js
@@ -20,8 +20,7 @@
var SensorType = {};
- SensorType.FIRST = 1;
- SensorType.AMBIENT_LIGHT = SensorType.FIRST;
+ SensorType.AMBIENT_LIGHT = 0;
SensorType.PROXIMITY = SensorType.AMBIENT_LIGHT + 1;
SensorType.ACCELEROMETER = SensorType.PROXIMITY + 1;
SensorType.LINEAR_ACCELERATION = SensorType.ACCELEROMETER + 1;
@@ -32,10 +31,10 @@
SensorType.ABSOLUTE_ORIENTATION_QUATERNION = SensorType.ABSOLUTE_ORIENTATION_EULER_ANGLES + 1;
SensorType.RELATIVE_ORIENTATION_EULER_ANGLES = SensorType.ABSOLUTE_ORIENTATION_QUATERNION + 1;
SensorType.RELATIVE_ORIENTATION_QUATERNION = SensorType.RELATIVE_ORIENTATION_EULER_ANGLES + 1;
- SensorType.LAST = SensorType.RELATIVE_ORIENTATION_QUATERNION;
SensorType.isKnownEnumValue = function(value) {
switch (value) {
+ case 0:
case 1:
case 2:
case 3:
@@ -46,7 +45,6 @@
case 8:
case 9:
case 10:
- case 11:
return true;
}
return false;
diff --git a/tests/wpt/web-platform-tests/resources/chromium/webusb-child-test.js b/tests/wpt/web-platform-tests/resources/chromium/webusb-child-test.js
new file mode 100644
index 00000000000..add04fa5825
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/chromium/webusb-child-test.js
@@ -0,0 +1,40 @@
+'use strict';
+
+// This polyfill prepares a child context to be attached to a parent context.
+// The parent must call navigator.usb.test.attachToContext() to attach to the
+// child context.
+(() => {
+ if (this.constructor.name === 'DedicatedWorkerGlobalScope' ||
+ this !== window.top) {
+
+ // Run Chromium specific set up code.
+ if (typeof MojoInterfaceInterceptor !== 'undefined') {
+ let messageChannel = new MessageChannel();
+ messageChannel.port1.onmessage = async (messageEvent) => {
+ if (messageEvent.data.type === 'Attach') {
+ messageEvent.data.interfaces.forEach(interfaceName => {
+ let interfaceInterceptor =
+ new MojoInterfaceInterceptor(interfaceName);
+ interfaceInterceptor.oninterfacerequest =
+ e => messageChannel.port1.postMessage({
+ type: interfaceName,
+ handle: e.handle
+ }, [e.handle]);
+ interfaceInterceptor.start();
+ });
+
+ // Wait for a call to GetDevices() to ensure that the interface
+ // handles are forwarded to the parent context.
+ await navigator.usb.getDevices();
+ messageChannel.port1.postMessage({ type: 'Complete' });
+ }
+ };
+
+ let message = { type: 'ReadyForAttachment', port: messageChannel.port2 };
+ if (typeof Window !== 'undefined')
+ parent.postMessage(message, '*', [messageChannel.port2]);
+ else
+ postMessage(message, [messageChannel.port2]);
+ }
+ }
+})();
diff --git a/tests/wpt/web-platform-tests/resources/chromium/webusb-child-test.js.headers b/tests/wpt/web-platform-tests/resources/chromium/webusb-child-test.js.headers
new file mode 100644
index 00000000000..6805c323df5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/resources/chromium/webusb-child-test.js.headers
@@ -0,0 +1 @@
+Content-Type: text/javascript; charset=utf-8
diff --git a/tests/wpt/web-platform-tests/resources/chromium/webusb-test.js b/tests/wpt/web-platform-tests/resources/chromium/webusb-test.js
index 9037a109c91..5f9262655f3 100644
--- a/tests/wpt/web-platform-tests/resources/chromium/webusb-test.js
+++ b/tests/wpt/web-platform-tests/resources/chromium/webusb-test.js
@@ -12,9 +12,23 @@ let internal = {
webUsbService: null,
webUsbServiceInterceptor: null,
- webUsbServiceCrossFrameProxy: null,
+
+ messagePort: null,
};
+function getMessagePort(target) {
+ return new Promise(resolve => {
+ target.addEventListener('message', messageEvent => {
+ if (messageEvent.data.type === 'ReadyForAttachment') {
+ if (internal.messagePort === null) {
+ internal.messagePort = messageEvent.data.port;
+ }
+ resolve();
+ }
+ }, {once: true});
+ });
+}
+
// Converts an ECMAScript String object to an instance of
// mojo_base.mojom.String16.
function mojoString16ToString(string16) {
@@ -421,25 +435,6 @@ class FakeUSBDevice {
}
}
-// A helper for forwarding MojoHandle instances from one frame to another.
-class CrossFrameHandleProxy {
- constructor(callback) {
- let {handle0, handle1} = Mojo.createMessagePipe();
- this.sender_ = handle0;
- this.receiver_ = handle1;
- this.receiver_.watch({readable: true}, () => {
- let message = this.receiver_.readMessage();
- assert_equals(message.buffer.byteLength, 0);
- assert_equals(message.handles.length, 1);
- callback(message.handles[0]);
- });
- }
-
- forwardHandle(handle) {
- this.sender_.writeMessage(new ArrayBuffer, [handle]);
- }
-}
-
class USBTest {
constructor() {
this.onrequestdevice = undefined;
@@ -449,14 +444,17 @@ class USBTest {
if (internal.initialized)
return;
+ // Be ready to handle 'ReadyForAttachment' message from child iframes.
+ if ('window' in self) {
+ getMessagePort(window);
+ }
+
internal.webUsbService = new FakeWebUsbService();
internal.webUsbServiceInterceptor =
new MojoInterfaceInterceptor(blink.mojom.WebUsbService.name);
internal.webUsbServiceInterceptor.oninterfacerequest =
e => internal.webUsbService.addBinding(e.handle);
internal.webUsbServiceInterceptor.start();
- internal.webUsbServiceCrossFrameProxy = new CrossFrameHandleProxy(
- handle => internal.webUsbService.addBinding(handle));
// Wait for a call to GetDevices() to pass between the renderer and the
// mock in order to establish that everything is set up.
@@ -464,20 +462,32 @@ class USBTest {
internal.initialized = true;
}
- async attachToWindow(otherWindow) {
+ // Returns a promise that is resolved when the implementation of |usb| in the
+ // global scope for |context| is controlled by the current context.
+ attachToContext(context) {
if (!internal.initialized)
- throw new Error('Call initialize() before attachToWindow().');
-
- otherWindow.webUsbServiceInterceptor =
- new otherWindow.MojoInterfaceInterceptor(
- blink.mojom.WebUsbService.name);
- otherWindow.webUsbServiceInterceptor.oninterfacerequest =
- e => internal.webUsbServiceCrossFrameProxy.forwardHandle(e.handle);
- otherWindow.webUsbServiceInterceptor.start();
-
- // Wait for a call to GetDevices() to pass between the renderer and the
- // mock in order to establish that everything is set up.
- await otherWindow.navigator.usb.getDevices();
+ throw new Error('Call initialize() before attachToContext()');
+
+ let target = context.constructor.name === 'Worker' ? context : window;
+ return getMessagePort(target).then(() => {
+ return new Promise(resolve => {
+ internal.messagePort.onmessage = channelEvent => {
+ switch (channelEvent.data.type) {
+ case blink.mojom.WebUsbService.name:
+ internal.webUsbService.addBinding(channelEvent.data.handle);
+ break;
+ case 'Complete':
+ resolve();
+ break;
+ }
+ };
+ internal.messagePort.postMessage({
+ type: 'Attach' ,
+ interfaces: [
+ blink.mojom.WebUsbService.name,
+ ]});
+ });
+ });
}
addFakeDevice(deviceInit) {
@@ -501,6 +511,9 @@ class USBTest {
// the fact that this polyfill can do this synchronously.
return new Promise(resolve => {
setTimeout(() => {
+ if (internal.messagePort !== null)
+ internal.messagePort.close();
+ internal.messagePort = null;
internal.webUsbService.removeAllDevices();
resolve();
}, 0);
diff --git a/tests/wpt/web-platform-tests/resources/idlharness.js b/tests/wpt/web-platform-tests/resources/idlharness.js
index 368c96d70cf..746f3e65503 100644
--- a/tests/wpt/web-platform-tests/resources/idlharness.js
+++ b/tests/wpt/web-platform-tests/resources/idlharness.js
@@ -826,7 +826,7 @@ IdlArray.prototype.test = function()
this["includes"] = {};
// Assert B defined for A : B
- for (var member of Object.values(this.members).filter(m => m.base)) {
+ for (const member of Object.values(this.members).filter(m => m.base)) {
const lhs = member.name;
const rhs = member.base;
if (!(rhs in this.members)) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${rhs} is undefined.`);
@@ -2894,6 +2894,11 @@ IdlInterface.prototype.do_interface_attribute_asserts = function(obj, member, a_
// value 0."
assert_equals(desc.get.length, 0, "getter length must be 0");
+ // "Let name be the string "get " prepended to attribute’s identifier."
+ // "Perform ! SetFunctionName(F, name)."
+ assert_equals(desc.get.name, "get " + member.name,
+ "getter must have the name 'get " + member.name + "'");
+
// TODO: Test calling setter on the interface prototype (should throw
// TypeError in most cases).
@@ -2934,6 +2939,11 @@ IdlInterface.prototype.do_interface_attribute_asserts = function(obj, member, a_
// "The value of the Function object’s “length” property is the Number
// value 1."
assert_equals(desc.set.length, 1, "setter length must be 1");
+
+ // "Let name be the string "set " prepended to id."
+ // "Perform ! SetFunctionName(F, name)."
+ assert_equals(desc.set.name, "set " + member.name,
+ "The attribute setter must have the name 'set " + member.name + "'");
}
Promise.all(pendingPromises).then(a_test.done.bind(a_test));
diff --git a/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html
index bdf6dc3ec2a..9db1dec0f9e 100644
--- a/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html
+++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html
@@ -100,12 +100,16 @@ promise_test(
function() {
return true;
},
- "promise_test with function that doesn't return a Promise");
+ "promise_test with function that doesn't return a Promise (should FAIL)");
promise_test(function(){},
"promise_test with function that doesn't return anything");
promise_test(
+ function() { return { then: 23 }; },
+ "promise_test that returns a non-thenable (should FAIL)");
+
+promise_test(
function() {
return Promise.reject("Expected rejection");
},
@@ -170,15 +174,21 @@ promise_test(
"properties": {}
},
{
- "status_string": "PASS",
- "name": "promise_test with function that doesn't return a Promise",
- "message": null,
+ "status_string": "FAIL",
+ "name": "promise_test with function that doesn't return a Promise (should FAIL)",
+ "message": "promise_test: test body must return a 'thenable' object (received an object with no `then` method)",
"properties": {}
},
{
"status_string": "FAIL",
"name": "promise_test with function that doesn't return anything",
- "message": "assert_not_equals: got disallowed value undefined",
+ "message": "promise_test: test body must return a 'thenable' object (received undefined)",
+ "properties": {}
+ },
+ {
+ "status_string": "FAIL",
+ "name": "promise_test that returns a non-thenable (should FAIL)",
+ "message": "promise_test: test body must return a 'thenable' object (received an object with no `then` method)",
"properties": {}
},
{
diff --git a/tests/wpt/web-platform-tests/resources/testharness.js b/tests/wpt/web-platform-tests/resources/testharness.js
index f0c24635017..85e211ff60a 100644
--- a/tests/wpt/web-platform-tests/resources/testharness.js
+++ b/tests/wpt/web-platform-tests/resources/testharness.js
@@ -576,7 +576,12 @@ policies and contribution forms [3].
var promise = test.step(func, test, test);
test.step(function() {
- assert_not_equals(promise, undefined);
+ assert(!!promise, "promise_test", null,
+ "test body must return a 'thenable' object (received ${value})",
+ {value:promise});
+ assert(typeof promise.then === "function", "promise_test", null,
+ "test body must return a 'thenable' object (received an object with no `then` method)",
+ null);
});
// Test authors may use the `step` method within a
diff --git a/tests/wpt/web-platform-tests/screen-capture/getdisplaymedia.https.html b/tests/wpt/web-platform-tests/screen-capture/getdisplaymedia.https.html
index 3a0444733b5..9b66419cb0a 100644
--- a/tests/wpt/web-platform-tests/screen-capture/getdisplaymedia.https.html
+++ b/tests/wpt/web-platform-tests/screen-capture/getdisplaymedia.https.html
@@ -74,4 +74,18 @@ promise_test(function() {
});
}, 'getDisplayMedia() call with non-bool constraint');
+// Content shell picks a fake desktop device by default.
+promise_test(function() {
+ assert_idl_attribute(navigator, 'getDisplayMedia');
+
+ return navigator.getDisplayMedia({video: true}).then(function(s) {
+ assert_equals(s.getVideoTracks().length, 1);
+ assert_equals(s.getAudioTracks().length, 0);
+ var settings = s.getVideoTracks()[0].getSettings();
+ assert_equals(settings.displaySurface, "monitor");
+ assert_equals(settings.logicalSurface, true);
+ assert_equals(settings.cursor, "never");
+ });
+}, 'getDisplayMedia() with getSettings');
+
</script>
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https.html
index 9b67faccac8..73ae123ae4e 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https.html
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https.html
@@ -7,12 +7,19 @@
<script>
var worker = 'resources/fetch-event-test-worker.js';
+function do_test(referrer, value, expected, name)
+{
+ test(() => {
+ assert_equals(value, expected);
+ }, name + (referrer ? " - Custom Referrer" : " - Default Referrer"));
+}
+
function run_referrer_policy_tests(frame, referrer, href, origin) {
return frame.contentWindow.fetch('resources/simple.html?referrerFull',
{method: "GET", referrer: referrer})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + href + '\n' +
'ReferrerPolicy: no-referrer-when-downgrade',
@@ -24,7 +31,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: \n' +
'ReferrerPolicy: no-referrer-when-downgrade',
@@ -34,7 +41,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + href + '\n' +
'ReferrerPolicy: no-referrer-when-downgrade',
@@ -46,7 +53,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: \n' +
'ReferrerPolicy: no-referrer-when-downgrade',
@@ -56,7 +63,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + origin + '/' + '\n' +
'ReferrerPolicy: origin',
@@ -68,7 +75,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + origin + '/' + '\n' +
'ReferrerPolicy: origin',
@@ -78,7 +85,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + href + '\n' +
'ReferrerPolicy: origin-when-cross-origin',
@@ -90,7 +97,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + origin + '/' + '\n' +
'ReferrerPolicy: origin-when-cross-origin',
@@ -100,7 +107,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + href + '\n' +
'ReferrerPolicy: no-referrer-when-downgrade',
@@ -112,7 +119,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: \n' +
'ReferrerPolicy: no-referrer-when-downgrade',
@@ -123,7 +130,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + href + '\n' +
'ReferrerPolicy: unsafe-url',
@@ -133,7 +140,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: \n' +
'ReferrerPolicy: no-referrer',
@@ -143,7 +150,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + href + '\n' +
'ReferrerPolicy: same-origin',
@@ -155,7 +162,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: \n' +
'ReferrerPolicy: same-origin',
@@ -167,7 +174,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + origin + '/' + '\n' +
'ReferrerPolicy: strict-origin',
@@ -177,7 +184,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + origin + '/' + '\n' +
'ReferrerPolicy: strict-origin',
@@ -189,7 +196,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: \n' +
'ReferrerPolicy: strict-origin',
@@ -199,7 +206,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + href + '\n' +
'ReferrerPolicy: strict-origin-when-cross-origin',
@@ -211,7 +218,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: ' + origin + '/' + '\n' +
'ReferrerPolicy: strict-origin-when-cross-origin',
@@ -223,7 +230,7 @@ function run_referrer_policy_tests(frame, referrer, href, origin) {
})
.then(function(response) { return response.text(); })
.then(function(response_text) {
- assert_equals(
+ do_test(referrer,
response_text,
'Referrer: \n' +
'ReferrerPolicy: strict-origin-when-cross-origin',
@@ -241,17 +248,16 @@ async_test(function(t) {
.then(function() { return with_iframe(scope); })
.then(function(f) {
frame = f;
- assert_equals(
- frame.contentDocument.body.textContent,
- 'ReferrerPolicy: no-referrer-when-downgrade',
- 'Service Worker should respond to fetch with the default referrer policy');
+ test(() => {
+ assert_equals(frame.contentDocument.body.textContent, 'ReferrerPolicy: no-referrer-when-downgrade');
+ }, 'Service Worker should respond to fetch with the default referrer policy');
// First, run the referrer policy tests without passing a referrer in RequestInit.
return run_referrer_policy_tests(frame, undefined, frame.contentDocument.location.href,
frame.contentDocument.location.origin);
})
.then(function() {
// Now, run the referrer policy tests while passing a referrer in RequestInit.
- var referrer = get_host_info()['HTTPS_ORIGIN'] + base_path() + 'fake-referrer';
+ var referrer = get_host_info()['HTTPS_ORIGIN'] + base_path() + 'resources/fake-referrer';
return run_referrer_policy_tests(frame, 'fake-referrer', referrer,
frame.contentDocument.location.origin);
})
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-redirect.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-redirect.https.html
index ed300faf8e6..0490f2b4058 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-redirect.https.html
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-redirect.https.html
@@ -7,62 +7,51 @@
<script src="resources/test-helpers.sub.js"></script>
<body>
<script>
-var host_info = get_host_info();
+const host_info = get_host_info();
// This test registers three Service Workers at SCOPE1, SCOPE2 and
// OTHER_ORIGIN_SCOPE. And checks the redirected page's URL and the requests
// which are intercepted by Service Worker while loading redirect page.
-var BASE_URL = host_info['HTTPS_ORIGIN'] + base_path();
-var OTHER_BASE_URL = host_info['HTTPS_REMOTE_ORIGIN'] + base_path();
-
-var SCOPE1 = BASE_URL + 'resources/navigation-redirect-scope1.py?';
-var SCOPE2 = BASE_URL + 'resources/navigation-redirect-scope2.py?';
-var OUT_SCOPE = BASE_URL + 'resources/navigation-redirect-out-scope.py?';
-var SCRIPT = 'resources/redirect-worker.js';
-
-var OTHER_ORIGIN_IFRAME_URL =
- OTHER_BASE_URL + 'resources/navigation-redirect-other-origin.html';
-var OTHER_ORIGIN_SCOPE =
- OTHER_BASE_URL + 'resources/navigation-redirect-scope1.py?';
-var OTHER_ORIGIN_OUT_SCOPE =
- OTHER_BASE_URL + 'resources/navigation-redirect-out-scope.py?';
-
-var workers;
-var other_origin_frame;
-var setup_environment_promise;
-var message_resolvers = {};
-var next_message_id = 0;
-
-function setup_environment(t) {
- if (setup_environment_promise)
- return setup_environment_promise;
- setup_environment_promise =
- with_iframe(OTHER_ORIGIN_IFRAME_URL)
- .then(function(f) {
- // In this frame we register a Service Worker at OTHER_ORIGIN_SCOPE.
- // And will use this frame to communicate with the worker.
- other_origin_frame = f;
- return Promise.all(
- [service_worker_unregister_and_register(t, SCRIPT, SCOPE1),
- service_worker_unregister_and_register(t, SCRIPT, SCOPE2)]);
- })
- .then(function(registrations) {
- add_completion_callback(function() {
- registrations[0].unregister();
- registrations[1].unregister();
- send_to_iframe(other_origin_frame, 'unregister')
- .then(function() { other_origin_frame.remove(); });
- });
- workers = registrations.map(get_effective_worker);
- return Promise.all([
- wait_for_state(t, workers[0], 'activated'),
- wait_for_state(t, workers[1], 'activated'),
- // This promise will resolve when |wait_for_worker_promise|
- // in OTHER_ORIGIN_IFRAME_URL resolves.
- send_to_iframe(other_origin_frame, 'wait_for_worker')]);
- });
- return setup_environment_promise;
-}
+const BASE_URL = host_info['HTTPS_ORIGIN'] + base_path();
+const OTHER_BASE_URL = host_info['HTTPS_REMOTE_ORIGIN'] + base_path();
+
+const SCOPE1 = BASE_URL + 'resources/navigation-redirect-scope1.py?';
+const SCOPE2 = BASE_URL + 'resources/navigation-redirect-scope2.py?';
+const OUT_SCOPE = BASE_URL + 'resources/navigation-redirect-out-scope.py?';
+const SCRIPT = 'resources/redirect-worker.js';
+
+const OTHER_ORIGIN_IFRAME_URL =
+ OTHER_BASE_URL + 'resources/navigation-redirect-other-origin.html';
+const OTHER_ORIGIN_SCOPE =
+ OTHER_BASE_URL + 'resources/navigation-redirect-scope1.py?';
+const OTHER_ORIGIN_OUT_SCOPE =
+ OTHER_BASE_URL + 'resources/navigation-redirect-out-scope.py?';
+
+let registrations;
+let workers;
+let other_origin_frame;
+let message_resolvers = {};
+let next_message_id = 0;
+
+promise_test(async t => {
+ // In this frame we register a service worker at OTHER_ORIGIN_SCOPE.
+ // And will use this frame to communicate with the worker.
+ other_origin_frame = await with_iframe(OTHER_ORIGIN_IFRAME_URL);
+
+ // Register same-origin service workers.
+ registrations = await Promise.all([
+ service_worker_unregister_and_register(t, SCRIPT, SCOPE1),
+ service_worker_unregister_and_register(t, SCRIPT, SCOPE2)]);
+
+ // Wait for all workers to activate.
+ workers = registrations.map(get_effective_worker);
+ return Promise.all([
+ wait_for_state(t, workers[0], 'activated'),
+ wait_for_state(t, workers[1], 'activated'),
+ // This promise will resolve when |wait_for_worker_promise|
+ // in OTHER_ORIGIN_IFRAME_URL resolves.
+ send_to_iframe(other_origin_frame, {command: 'wait_for_worker'})]);
+}, 'initialize global state');
function get_effective_worker(registration) {
if (registration.active)
@@ -73,45 +62,52 @@ function get_effective_worker(registration) {
return registration.installing;
}
-function check_all_intercepted_urls(expected_urls) {
- var urls = [];
- return get_intercepted_urls(workers[0])
- .then(function(url) {
- urls.push(url);
- return get_intercepted_urls(workers[1]);
- }).then(function(url) {
- urls.push(url);
- // Gets the request URLs which are intercepted by OTHER_ORIGIN_SCOPE's
- // SW. This promise will resolve when get_intercepted_urls() in
- // OTHER_ORIGIN_IFRAME_URL resolves.
- return send_to_iframe(other_origin_frame, 'get_intercepted_urls');
- }).then(function(url) {
- urls.push(url);
- return urls;
- }).then(function(urls) {
- assert_object_equals(
- urls, expected_urls,
- 'Intercepted URLs should match.');
- });
+async function check_all_intercepted_urls(expected_urls) {
+ const urls = [];
+ urls.push(await get_intercepted_urls(workers[0]));
+ urls.push(await get_intercepted_urls(workers[1]));
+ // Gets the request URLs which are intercepted by OTHER_ORIGIN_SCOPE's
+ // SW. This promise will resolve when get_request_infos() in
+ // OTHER_ORIGIN_IFRAME_URL resolves.
+ const request_infos = await send_to_iframe(other_origin_frame,
+ {command: 'get_request_infos'});
+ urls.push(request_infos.map(info => { return info.url; }));
+
+ assert_object_equals(urls, expected_urls, 'Intercepted URLs should match.');
}
-function test_redirect(url, expected_last_url,
- expected_intercepted_urls) {
- var message_promise = new Promise(function(resolve) {
- // A message which ID is 'last_url' will be sent from the iframe.
- message_resolvers['last_url'] = resolve;
+// Creates an iframe and navigates to |url|, which is expected to start a chain
+// of redirects.
+// - |expected_last_url| is the expected window.location after the
+// navigation.
+// - |expected_request_infos| is the expected requests that the service workers
+// were dispatched fetch events for. The format is:
+// [
+// [{url: url1}, {url: url2}], // requests from workers[0],
+// [{url: url1}, // requests from workers[1],
+// [{url: url1}, {url: url2}] // requests from cross-origin worker
+// ]
+function redirect_test(url,
+ expected_last_url,
+ expected_request_infos,
+ test_name) {
+ promise_test(async t => {
+ const message_promise = new Promise(resolve => {
+ // A message with ID 'last_url' will be sent from the iframe.
+ message_resolvers['last_url'] = resolve;
});
- return with_iframe(url)
- .then(function(f) {
- f.remove();
- return check_all_intercepted_urls(expected_intercepted_urls);
- })
- .then(function() { return message_promise; })
- .then(function(last_url) {
- assert_equals(
- last_url, expected_last_url,
- 'Last URL should match.');
+ const frame = await with_iframe(url);
+ t.add_cleanup(() => { frame.remove(); });
+
+ const expected_intercepted_urls = expected_request_infos.map(requests => {
+ return requests.map(info => {
+ return info.url;
});
+ });
+ await check_all_intercepted_urls(expected_intercepted_urls);
+ const last_url = await message_promise;
+ assert_equals(last_url, expected_last_url, 'Last URL should match.');
+ }, test_name);
}
window.addEventListener('message', on_message, false);
@@ -129,400 +125,368 @@ function on_message(e) {
function send_to_iframe(frame, message) {
var message_id = next_message_id++;
- return new Promise(function(resolve) {
- message_resolvers[message_id] = resolve;
- frame.contentWindow.postMessage(
- {id: message_id, message: message},
- host_info['HTTPS_REMOTE_ORIGIN']);
- });
+ return new Promise(resolve => {
+ message_resolvers[message_id] = resolve;
+ frame.contentWindow.postMessage(
+ {id: message_id, message},
+ host_info['HTTPS_REMOTE_ORIGIN']);
+ });
}
-function get_intercepted_urls(worker) {
- return new Promise(function(resolve) {
- var channel = new MessageChannel();
- channel.port1.onmessage = function(msg) { resolve(msg.data.urls); };
- worker.postMessage({port: channel.port2}, [channel.port2]);
- });
+// Returns an array of the URLs that |worker| received fetch events for:
+// [url1, url2]
+async function get_intercepted_urls(worker) {
+ const infos = await get_request_infos(worker);
+ return infos.map(info => { return info.url; });
}
-// Normal redirect.
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- OUT_SCOPE + 'url=' + encodeURIComponent(SCOPE1),
- SCOPE1,
- [[SCOPE1], [], []]);
- });
- }, 'Normal redirect to same-origin scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- OUT_SCOPE + 'url=' + encodeURIComponent(SCOPE1) + '#ref',
- SCOPE1 + '#ref',
- [[SCOPE1 + '#ref'], [], []]);
- });
- }, 'Normal redirect to same-origin scope with a hash fragment.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- OUT_SCOPE + 'url=' + encodeURIComponent(SCOPE1 + '#ref2') + '#ref',
- SCOPE1 + '#ref2',
- [[SCOPE1 + '#ref2'], [], []]);
- });
- }, 'Normal redirect to same-origin scope with different hash fragments.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- OUT_SCOPE + 'url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE),
- OTHER_ORIGIN_SCOPE,
- [[], [], [OTHER_ORIGIN_SCOPE]]);
- });
- }, 'Normal redirect to other-origin scope.');
+// Returns the requests that |worker| received fetch events for. The return
+// value is an array of format:
+// [{url: url1}, {url: url2}]
+function get_request_infos(worker) {
+ return new Promise(resolve => {
+ var channel = new MessageChannel();
+ channel.port1.onmessage = (msg) => {
+ resolve(msg.data.requestInfos);
+ };
+ worker.postMessage({command: 'getRequestInfos', port: channel.port2},
+ [channel.port2]);
+ });
+}
+
+let url;
+let url1;
+let url2;
+
+// Normal redirect (from out-scope to in-scope).
+url = SCOPE1;
+redirect_test(
+ OUT_SCOPE + 'url=' + encodeURIComponent(url),
+ url,
+ [[{url}], [], []],
+ 'Normal redirect to same-origin scope.');
+
+
+url = SCOPE1 + '#ref';
+redirect_test(
+ OUT_SCOPE + 'url=' + encodeURIComponent(SCOPE1) + '#ref',
+ url,
+ [[{url}], [], []],
+ 'Normal redirect to same-origin scope with a hash fragment.');
+
+url = SCOPE1 + '#ref2';
+redirect_test(
+ OUT_SCOPE + 'url=' + encodeURIComponent(url) + '#ref',
+ url,
+ [[{url}], [], []],
+ 'Normal redirect to same-origin scope with different hash fragments.');
+
+url = OTHER_ORIGIN_SCOPE;
+redirect_test(
+ OUT_SCOPE + 'url=' + encodeURIComponent(url),
+ url,
+ [[], [], [{url}]],
+ 'Normal redirect to other-origin scope.');
+
// SW fallbacked redirect. SW doesn't handle the fetch request.
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'url=' + encodeURIComponent(OUT_SCOPE),
- OUT_SCOPE,
- [[SCOPE1 + 'url=' + encodeURIComponent(OUT_SCOPE)], [], []]);
- });
- }, 'SW-fallbacked redirect to same-origin out-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'url=' + encodeURIComponent(SCOPE1),
- SCOPE1,
- [[SCOPE1 + 'url=' + encodeURIComponent(SCOPE1), SCOPE1], [], []]);
- });
- }, 'SW-fallbacked redirect to same-origin same-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'url=' + encodeURIComponent(SCOPE1) + '#ref',
- SCOPE1 + '#ref',
- [[SCOPE1 + 'url=' + encodeURIComponent(SCOPE1) + '#ref',
- SCOPE1 + '#ref'],
- [], []]);
- });
- }, 'SW-fallbacked redirect to same-origin same-scope with a hash fragment.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'url=' + encodeURIComponent(SCOPE1 + '#ref2') + '#ref',
- SCOPE1 + '#ref2',
- [[SCOPE1 + 'url=' + encodeURIComponent(SCOPE1 + '#ref2') + '#ref',
- SCOPE1 + '#ref2'],
- [], []]);
- });
- }, 'SW-fallbacked redirect to same-origin same-scope with different hash ' +
- 'fragments.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'url=' + encodeURIComponent(SCOPE2),
- SCOPE2,
- [[SCOPE1 + 'url=' + encodeURIComponent(SCOPE2)], [SCOPE2], []]);
- });
- }, 'SW-fallbacked redirect to same-origin other-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'url=' + encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE),
- OTHER_ORIGIN_OUT_SCOPE,
- [[SCOPE1 + 'url=' + encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE)],
- [],
- []]);
- });
- }, 'SW-fallbacked redirect to other-origin out-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE),
- OTHER_ORIGIN_SCOPE,
- [[SCOPE1 + 'url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE)],
- [],
- [OTHER_ORIGIN_SCOPE]]);
- });
- }, 'SW-fallbacked redirect to other-origin in-scope.');
+url = SCOPE1 + 'url=' + encodeURIComponent(OUT_SCOPE);
+redirect_test(
+ url,
+ OUT_SCOPE,
+ [[{url}], [], []],
+ 'SW-fallbacked redirect to same-origin out-scope.');
+
+url1 = SCOPE1 + 'url=' + encodeURIComponent(SCOPE1);
+url2 = SCOPE1;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}, {url: url2}], [], []],
+ 'SW-fallbacked redirect to same-origin same-scope.');
+
+url1 = SCOPE1 + 'url=' + encodeURIComponent(SCOPE1) + '#ref';
+url2 = SCOPE1 + '#ref';
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}, {url: url2}], [], []],
+ 'SW-fallbacked redirect to same-origin same-scope with a hash fragment.');
+
+url1 = SCOPE1 + 'url=' + encodeURIComponent(SCOPE1 + '#ref2') + '#ref';
+url2 = SCOPE1 + '#ref2';
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}, {url: url2}], [], []],
+ 'SW-fallbacked redirect to same-origin same-scope with different hash ' +
+ 'fragments.');
+
+url1 = SCOPE1 + 'url=' + encodeURIComponent(SCOPE2);
+url2 = SCOPE2;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [{url: url2}], []],
+ 'SW-fallbacked redirect to same-origin other-scope.');
+
+url1 = SCOPE1 + 'url=' + encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE);
+url2 = OTHER_ORIGIN_OUT_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'SW-fallbacked redirect to other-origin out-scope.');
+
+url1 = SCOPE1 + 'url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE);
+url2 = OTHER_ORIGIN_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], [{url: url2}]],
+ 'SW-fallbacked redirect to other-origin in-scope.');
+
// SW generated redirect.
// SW: event.respondWith(Response.redirect(params['url']));
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OUT_SCOPE),
- OUT_SCOPE,
- [[SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OUT_SCOPE)], [], []]);
- });
- }, 'SW-generated redirect to same-origin out-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OUT_SCOPE) + '#ref',
- OUT_SCOPE + '#ref',
- [[SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OUT_SCOPE) + '#ref'],
- [], []]);
- });
- }, 'SW-generated redirect to same-origin out-scope with a hash fragment.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OUT_SCOPE + '#ref2') +
- '#ref',
- OUT_SCOPE + '#ref2',
- [[SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OUT_SCOPE + '#ref2') +
- '#ref'],
- [], []]);
- });
- }, 'SW-generated redirect to same-origin out-scope with different hash' +
- 'fragments.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=gen&url=' + encodeURIComponent(SCOPE1),
- SCOPE1,
- [[SCOPE1 + 'sw=gen&url=' + encodeURIComponent(SCOPE1), SCOPE1],
- [],
- []]);
- });
- }, 'SW-generated redirect to same-origin same-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=gen&url=' + encodeURIComponent(SCOPE2),
- SCOPE2,
- [[SCOPE1 + 'sw=gen&url=' + encodeURIComponent(SCOPE2)],
- [SCOPE2],
- []]);
- });
- }, 'SW-generated redirect to same-origin other-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE),
- OTHER_ORIGIN_OUT_SCOPE,
- [[SCOPE1 + 'sw=gen&url=' +
- encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE)],
- [],
- []]);
- });
- }, 'SW-generated redirect to other-origin out-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE),
- OTHER_ORIGIN_SCOPE,
- [[SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE)],
- [],
- [OTHER_ORIGIN_SCOPE]]);
- });
- }, 'SW-generated redirect to other-origin in-scope.');
+url1 = SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OUT_SCOPE);
+url2 = OUT_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'SW-generated redirect to same-origin out-scope.');
+
+url1 = SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OUT_SCOPE) + '#ref';
+url2 = OUT_SCOPE + '#ref';
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'SW-generated redirect to same-origin out-scope with a hash fragment.');
+
+url1 = SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OUT_SCOPE + '#ref2') + '#ref';
+url2 = OUT_SCOPE + '#ref2';
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'SW-generated redirect to same-origin out-scope with different hash ' +
+ 'fragments.');
+
+url1 = SCOPE1 + 'sw=gen&url=' + encodeURIComponent(SCOPE1);
+url2 = SCOPE1;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}, {url: url2}], [], []],
+ 'SW-generated redirect to same-origin same-scope.');
+
+url1 = SCOPE1 + 'sw=gen&url=' + encodeURIComponent(SCOPE2);
+url2 = SCOPE2;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [{url: url2}], []],
+ 'SW-generated redirect to same-origin other-scope.');
+
+url1 = SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE);
+url2 = OTHER_ORIGIN_OUT_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'SW-generated redirect to other-origin out-scope.');
+
+url1 = SCOPE1 + 'sw=gen&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE);
+url2 = OTHER_ORIGIN_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [
+ [{url: url1}],
+ [],
+ [{url: url2}]
+ ],
+ 'SW-generated redirect to other-origin in-scope.');
+
// SW fetched redirect.
// SW: event.respondWith(fetch(event.request));
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OUT_SCOPE),
- OUT_SCOPE,
- [[SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OUT_SCOPE)],
- [],
- []]);
- });
- }, 'SW-fetched redirect to same-origin out-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE1),
- SCOPE1,
- [[SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE1), SCOPE1],
- [],
- []]);
- });
- }, 'SW-fetched redirect to same-origin same-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE2),
- SCOPE2,
- [[SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE2)],
- [SCOPE2],
- []]);
- });
- }, 'SW-fetched redirect to same-origin other-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=fetch&url=' +
- encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE),
- OTHER_ORIGIN_OUT_SCOPE,
- [[SCOPE1 + 'sw=fetch&url=' +
- encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE)],
- [],
- []]);
- });
- }, 'SW-fetched redirect to other-origin out-scope.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE),
- OTHER_ORIGIN_SCOPE,
- [[SCOPE1 + 'sw=fetch&url=' +
- encodeURIComponent(OTHER_ORIGIN_SCOPE)],
- [],
- [OTHER_ORIGIN_SCOPE]]);
- });
- }, 'SW-fetched redirect to other-origin in-scope.');
+url1 = SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OUT_SCOPE)
+url2 = OUT_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'SW-fetched redirect to same-origin out-scope.');
+
+url1 = SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE1);
+url2 = SCOPE1;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}, {url: url2}], [], []],
+ 'SW-fetched redirect to same-origin same-scope.');
+
+url1 = SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE2);
+url2 = SCOPE2;
+redirect_test(
+ url1,
+ url2,
+ [
+ [{url: url1}],
+ [{url: url2}],
+ []
+ ],
+ 'SW-fetched redirect to same-origin other-scope.');
+
+url1 = SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE);
+url2 = OTHER_ORIGIN_OUT_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'SW-fetched redirect to other-origin out-scope.');
+
+url1 = SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE);
+url2 = OTHER_ORIGIN_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [
+ [{url: url1}],
+ [],
+ [{url: url2}]
+ ],
+ 'SW-fetched redirect to other-origin in-scope.');
+
// Opaque redirect.
// SW: event.respondWith(fetch(
// new Request(event.request.url, {redirect: 'manual'})));
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manual&url=' + encodeURIComponent(OUT_SCOPE),
- OUT_SCOPE,
- [[SCOPE1 + 'sw=manual&url=' + encodeURIComponent(OUT_SCOPE)],
- [],
- []]);
- });
- }, 'Redirect to same-origin out-scope with opaque redirect response.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manual&url=' + encodeURIComponent(SCOPE1),
- SCOPE1,
- [[SCOPE1 + 'sw=manual&url=' + encodeURIComponent(SCOPE1), SCOPE1],
- [],
- []]);
- });
- }, 'Redirect to same-origin same-scope with opaque redirect response.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manual&url=' + encodeURIComponent(SCOPE2),
- SCOPE2,
- [[SCOPE1 + 'sw=manual&url=' + encodeURIComponent(SCOPE2)],
- [SCOPE2],
- []]);
- });
- }, 'Redirect to same-origin other-scope with opaque redirect response.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manual&url=' +
- encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE),
- OTHER_ORIGIN_OUT_SCOPE,
- [[SCOPE1 + 'sw=manual&url=' +
- encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE)],
- [],
- []]);
- });
- }, 'Redirect to other-origin out-scope with opaque redirect response.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manual&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE),
- OTHER_ORIGIN_SCOPE,
- [[SCOPE1 + 'sw=manual&url=' +
- encodeURIComponent(OTHER_ORIGIN_SCOPE)],
- [],
- [OTHER_ORIGIN_SCOPE]]);
- });
- }, 'Redirect to other-origin in-scope with opaque redirect response.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manual&noLocationRedirect',
- SCOPE1 + 'sw=manual&noLocationRedirect',
- [[SCOPE1 + 'sw=manual&noLocationRedirect'],
- [],
- []]);
- });
- }, 'No location redirect response.');
+url1 = SCOPE1 + 'sw=manual&url=' + encodeURIComponent(OUT_SCOPE);
+url2 = OUT_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'Redirect to same-origin out-scope with opaque redirect response.');
+
+url1 = SCOPE1 + 'sw=manual&url=' + encodeURIComponent(SCOPE1);
+url2 = SCOPE1;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}, {url: url2}], [], []],
+ 'Redirect to same-origin same-scope with opaque redirect response.');
+
+url1 = SCOPE1 + 'sw=manual&url=' + encodeURIComponent(SCOPE2);
+url2 = SCOPE2;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [{url: url2}], []],
+ 'Redirect to same-origin other-scope with opaque redirect response.');
+
+url1 = SCOPE1 + 'sw=manual&url=' + encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE);
+url2 = OTHER_ORIGIN_OUT_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'Redirect to other-origin out-scope with opaque redirect response.');
+
+url1 = SCOPE1 + 'sw=manual&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE);
+url2 = OTHER_ORIGIN_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], [{url: url2}]],
+ 'Redirect to other-origin in-scope with opaque redirect response.');
+
+url= SCOPE1 + 'sw=manual&noLocationRedirect';
+redirect_test(
+ url, url, [[{url}], [], []],
+ 'No location redirect response.');
+
// Opaque redirect passed through Cache.
// SW responds with an opaque redirectresponse from the Cache API.
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(OUT_SCOPE),
- OUT_SCOPE,
- [[SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(OUT_SCOPE)],
- [],
- []]);
- });
- },
- 'Redirect to same-origin out-scope with opaque redirect response which ' +
- 'is passed through Cache.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(SCOPE1),
- SCOPE1,
- [[SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(SCOPE1), SCOPE1],
- [],
- []]);
- });
- },
- 'Redirect to same-origin same-scope with opaque redirect response which ' +
- 'is passed through Cache.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(SCOPE2),
- SCOPE2,
- [[SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(SCOPE2)],
- [SCOPE2],
- []]);
- });
- },
- 'Redirect to same-origin other-scope with opaque redirect response which ' +
- 'is passed through Cache.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE),
- OTHER_ORIGIN_OUT_SCOPE,
- [[SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE)],
- [],
- []]);
- });
- },
- 'Redirect to other-origin out-scope with opaque redirect response which ' +
- 'is passed through Cache.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(OTHER_ORIGIN_SCOPE),
- OTHER_ORIGIN_SCOPE,
- [[SCOPE1 + 'sw=manualThroughCache&url=' +
- encodeURIComponent(OTHER_ORIGIN_SCOPE)],
- [],
- [OTHER_ORIGIN_SCOPE]]);
- });
- },
- 'Redirect to other-origin in-scope with opaque redirect response which ' +
- 'is passed through Cache.');
-promise_test(function(t) {
- return setup_environment(t).then(function() {
- return test_redirect(
- SCOPE1 + 'sw=manualThroughCache&noLocationRedirect',
- SCOPE1 + 'sw=manualThroughCache&noLocationRedirect',
- [[SCOPE1 + 'sw=manualThroughCache&noLocationRedirect'],
- [],
- []]);
- });
- }, 'No location redirect response via Cache.');
+url1 = SCOPE1 + 'sw=manualThroughCache&url=' + encodeURIComponent(OUT_SCOPE);
+url2 = OUT_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'Redirect to same-origin out-scope with opaque redirect response which ' +
+ 'is passed through Cache.');
+
+url1 = SCOPE1 + 'sw=manualThroughCache&url=' + encodeURIComponent(SCOPE1);
+url2 = SCOPE1;
+redirect_test(
+ url1,
+ url2,
+ [
+ [{url: url1}, {url: url2}],
+ [],
+ []
+ ],
+ 'Redirect to same-origin same-scope with opaque redirect response which ' +
+ 'is passed through Cache.');
+
+url1 = SCOPE1 + 'sw=manualThroughCache&url=' + encodeURIComponent(SCOPE2);
+url2 = SCOPE2;
+redirect_test(
+ url1,
+ url2,
+ [
+ [{url: url1}],
+ [{url: url2}],
+ []
+ ],
+ 'Redirect to same-origin other-scope with opaque redirect response which ' +
+ 'is passed through Cache.');
+
+url1 = SCOPE1 + 'sw=manualThroughCache&url=' +
+ encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE);
+url2 = OTHER_ORIGIN_OUT_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [[{url: url1}], [], []],
+ 'Redirect to other-origin out-scope with opaque redirect response which ' +
+ 'is passed through Cache.');
+
+url1 = SCOPE1 + 'sw=manualThroughCache&url=' +
+ encodeURIComponent(OTHER_ORIGIN_SCOPE);
+url2 = OTHER_ORIGIN_SCOPE;
+redirect_test(
+ url1,
+ url2,
+ [
+ [{url: url1}],
+ [],
+ [{url: url2}],
+ ],
+ 'Redirect to other-origin in-scope with opaque redirect response which ' +
+ 'is passed through Cache.');
+
+url = SCOPE1 + 'sw=manualThroughCache&noLocationRedirect';
+redirect_test(
+ url,
+ url,
+ [[{url}], [], []],
+ 'No location redirect response via Cache.');
+
+// Clean up the test environment. This promise_test() needs to be the last one.
+promise_test(async t => {
+ registrations.forEach(async registration => {
+ if (registration)
+ await registration.unregister();
+ });
+ await send_to_iframe(other_origin_frame, {command: 'unregister'});
+ other_origin_frame.remove();
+}, 'clean up global state');
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/redirected-response.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/redirected-response.https.html
index f7370e023b1..05a94e2fd1d 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/redirected-response.https.html
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/redirected-response.https.html
@@ -49,12 +49,15 @@ function redirected_test(options) {
});
}
-function take_intercepted_urls() {
- return new Promise((resolve) => {
- let channel = new MessageChannel();
- channel.port1.onmessage = msg => { resolve(msg.data.urls); };
- worker.postMessage({port: channel.port2}, [channel.port2]);
- });
+async function take_intercepted_urls() {
+ const message = new Promise((resolve) => {
+ let channel = new MessageChannel();
+ channel.port1.onmessage = msg => { resolve(msg.data.requestInfos); };
+ worker.postMessage({command: 'getRequestInfos', port: channel.port2},
+ [channel.port2]);
+ });
+ const request_infos = await message;
+ return request_infos.map(info => { return info.url; });
}
function check_intercepted_urls(expected_urls) {
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/navigation-redirect-other-origin.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/navigation-redirect-other-origin.html
index a9483c65345..0d2825f3109 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/navigation-redirect-other-origin.html
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/navigation-redirect-other-origin.html
@@ -33,12 +33,15 @@ function send_result(message_id, result) {
host_info['HTTPS_ORIGIN']);
}
-function get_intercepted_urls(worker) {
+function get_request_infos(worker) {
return new Promise(function(resolve) {
- var channel = new MessageChannel();
- channel.port1.onmessage = function(msg) { resolve(msg.data.urls); };
- worker.postMessage({port: channel.port2}, [channel.port2]);
- });
+ var channel = new MessageChannel();
+ channel.port1.onmessage = (msg) => {
+ resolve(msg.data.requestInfos);
+ };
+ worker.postMessage({command: 'getRequestInfos', port: channel.port2},
+ [channel.port2]);
+ });
}
window.addEventListener('message', on_message, false);
@@ -48,14 +51,15 @@ function on_message(e) {
console.error('invalid origin: ' + e.origin);
return;
}
- if (e.data.message == 'wait_for_worker') {
+ const command = e.data.message.command;
+ if (command == 'wait_for_worker') {
wait_for_worker_promise.then(function() { send_result(e.data.id, 'ok'); });
- } else if (e.data.message == 'get_intercepted_urls') {
- get_intercepted_urls(worker)
- .then(function(urls) {
- send_result(e.data.id, urls);
+ } else if (command == 'get_request_infos') {
+ get_request_infos(worker)
+ .then(function(data) {
+ send_result(e.data.id, data);
});
- } else if (e.data.message == 'unregister') {
+ } else if (command == 'unregister') {
registration.unregister()
.then(function() {
send_result(e.data.id, 'ok');
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/redirect-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/redirect-worker.js
index 7e5ead19419..5258c5e7be4 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/redirect-worker.js
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/redirect-worker.js
@@ -5,20 +5,33 @@ var cacheName = 'urls-' + self.registration.scope;
var waitUntilPromiseList = [];
-self.addEventListener('message', function(event) {
- var urls;
- event.waitUntil(Promise.all(waitUntilPromiseList).then(function() {
- waitUntilPromiseList = [];
- return caches.open(cacheName);
- }).then(function(cache) {
- return cache.keys();
- }).then(function(requestList) {
- urls = requestList.map(function(request) { return request.url; });
- return caches.delete(cacheName);
- }).then(function() {
- event.data.port.postMessage({urls: urls});
- }));
- });
+async function getRequestInfos(event) {
+ // Wait for fetch events to finish.
+ await Promise.all(waitUntilPromiseList);
+ waitUntilPromiseList = [];
+
+ // Generate the message.
+ const cache = await caches.open(cacheName);
+ const requestList = await cache.keys();
+ const requestInfos = [];
+ for (let i = 0; i < requestList.length; i++) {
+ requestInfos[i] = {
+ url: requestList[i].url,
+ };
+ }
+ await caches.delete(cacheName);
+
+ event.data.port.postMessage({requestInfos});
+}
+
+self.addEventListener('message', async function(event) {
+ if (event.data.command == 'getRequestInfos') {
+ event.waitUntil(getRequestInfos(event));
+ return;
+ }
+
+ // TODO(falken): Add a getClientInfos command to test Clients API.
+});
function get_query_params(url) {
var search = (new URL(url)).search;
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-top-level-worker.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-top-level-worker.py
deleted file mode 100644
index f77ef284ac0..00000000000
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-top-level-worker.py
+++ /dev/null
@@ -1,18 +0,0 @@
-import time
-
-def main(request, response):
- # no-cache itself to ensure the user agent finds a new version for each update.
- headers = [('Cache-Control', 'no-cache, must-revalidate'),
- ('Pragma', 'no-cache')]
- content_type = 'application/javascript'
-
- headers.append(('Content-Type', content_type))
-
- body = '''
-let promise = self.registration.update()
-onmessage = (evt) => {
- promise.then(r => {
- evt.source.postMessage(self.registration === r ? 'PASS' : 'FAIL');
- });
-};'''
- return headers, '/* %s %s */ %s' % (time.time(), time.clock(), body)
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/update-top-level.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/update-top-level.https.html
deleted file mode 100644
index e382028b44a..00000000000
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/update-top-level.https.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<title>Service Worker: Registration update()</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="resources/test-helpers.sub.js"></script>
-<script>
-'use strict';
-
-function wait_for_message() {
- return new Promise(resolve => {
- navigator.serviceWorker.addEventListener("message",
- e => {
- resolve(e.data);
- }, { once: true });
- });
-}
-
-promise_test(async t => {
- const script = './resources/update-top-level-worker.py';
- const scope = './resources/empty.html?update-result';
-
- let reg = await navigator.serviceWorker.register(script, { scope });
- t.add_cleanup(async _ => await reg.unregister());
- await wait_for_state(t, reg.installing, 'activated');
-
- reg.addEventListener("updatefound",
- () => assert_unreached("shouldn't find an update"));
-
- reg.active.postMessage("ping");
- assert_equals(await wait_for_message(), 'PASS', 'did not hang');
-}, 'A serviceworker with a top-level update should not hang');
-</script>
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/webvtt-cross-origin.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/webvtt-cross-origin.https.html
index 637f494e4c1..9394ff75c4a 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/webvtt-cross-origin.https.html
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/webvtt-cross-origin.https.html
@@ -7,11 +7,14 @@
<script src="resources/test-helpers.sub.js?pipe=sub"></script>
<body>
<script>
-// This file tests opaque responses for WebVTT text track. It creates
-// an iframe with a <track> element, controlled by a service worker.
+// This file tests responses for WebVTT text track from a service worker. It
+// creates an iframe with a <track> element, controlled by a service worker.
// Each test tries to load a text track, the service worker intercepts the
-// requests and responds with opaque or non-opaque responses. The opaque
-// responses should result in load errors.
+// requests and responds with opaque or non-opaque responses. As the
+// crossorigin attribute is not set, request's mode is always "same-origin",
+// and as specified in https://fetch.spec.whatwg.org/#http-fetch,
+// a response from a service worker whose type is neither "basic" nor
+// "default" is rejected.
const host_info = get_host_info();
const kScript = 'resources/fetch-rewrite-worker.js';
@@ -100,9 +103,9 @@ promise_test(t => {
url += '&credentials=same-origin';
return load_track(url)
.then(result => {
- assert_equals(result, 'load event');
+ assert_equals(result, 'error event');
});
- }, 'cross-origin text track with approved cors request should load');
+ }, 'cross-origin text track with approved cors request should not load');
// Redirect tests.
@@ -165,8 +168,8 @@ promise_test(t => {
url += '&credentials=same-origin';
return load_track(url)
.then(result => {
- assert_equals(result, 'load event');
+ assert_equals(result, 'error event');
});
- }, 'same-origin text track that redirects to a cross-origin text track with approved cors should load');
+ }, 'same-origin text track that redirects to a cross-origin text track with approved cors should not load');
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html b/tests/wpt/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html
index 52cda0b6bb8..806d539cad4 100644
--- a/tests/wpt/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html
+++ b/tests/wpt/web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html
@@ -54,7 +54,7 @@ function testComposedEvent(mode) {
var expectedPath = ['A1a', 'A1-SR', 'A1', 'A-SR', 'A'];
assert_array_equals(log.eventPath, expectedPath);
- assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+ assert_equals(log.eventPath.length, log.pathAtTargets.length);
assert_array_equals(log.pathAtTargets[0], expectedPath);
assert_array_equals(log.pathAtTargets[1], expectedPath);
assert_array_equals(log.pathAtTargets[2], mode == 'open' ? expectedPath : ['A1', 'A-SR', 'A'],
@@ -82,7 +82,7 @@ function testNonComposedEvent(mode) {
var expectedPath = ['A1a', 'A1-SR'];
assert_array_equals(log.eventPath, expectedPath);
- assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+ assert_equals(log.eventPath.length, log.pathAtTargets.length);
assert_array_equals(log.pathAtTargets[0], expectedPath);
assert_array_equals(log.pathAtTargets[1], expectedPath);
}, 'The event must not propagate out of ' + mode + ' mode shadow boundaries when the composed flag is unset');
@@ -108,7 +108,7 @@ function testNonComposedEventWithRelatedTarget(mode) {
var expectedPath = ['A1a', 'A1-SR'];
assert_array_equals(log.eventPath, expectedPath);
- assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+ assert_equals(log.eventPath.length, log.pathAtTargets.length);
assert_array_equals(log.pathAtTargets[0], expectedPath);
assert_array_equals(log.pathAtTargets[1], expectedPath);
assert_array_equals(log.relatedTargets, ['A2-S', 'A2-S']);
@@ -136,7 +136,7 @@ function testScopedEventWithUnscopedRelatedTargetThroughSlot(mode) {
var expectedPath = ['B1a', 'B1c-S', 'B1-SR', 'B1', 'B-SR'];
var pathExposedToB1a = ['B1a', 'B1', 'B-SR'];
assert_array_equals(log.eventPath, expectedPath);
- assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+ assert_equals(log.eventPath.length, log.pathAtTargets.length);
assert_array_equals(log.pathAtTargets[0], mode == 'open' ? expectedPath : pathExposedToB1a);
assert_array_equals(log.pathAtTargets[1], expectedPath);
assert_array_equals(log.pathAtTargets[2], expectedPath);
@@ -167,7 +167,7 @@ function testComposedEventWithRelatedTarget(mode) {
var expectedPath = ['A1a', 'A1-SR', 'A1', 'A-SR'];
var pathExposedToA1 = ['A1', 'A-SR'];
assert_array_equals(log.eventPath, expectedPath);
- assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+ assert_equals(log.eventPath.length, log.pathAtTargets.length);
assert_array_equals(log.pathAtTargets[0], expectedPath);
assert_array_equals(log.pathAtTargets[1], expectedPath);
assert_array_equals(log.pathAtTargets[2], mode == 'open' ? expectedPath : pathExposedToA1);
@@ -202,7 +202,7 @@ function testComposedEventThroughSlot(mode) {
var pathExposedToA1 = [ 'B', 'A2-S', 'A-SR', 'A'];
assert_array_equals(log.eventPath, expectedPath);
- assert_array_equals(log.eventPath.length, log.pathAtTargets.length);
+ assert_equals(log.eventPath.length, log.pathAtTargets.length);
assert_array_equals(log.pathAtTargets[0], mode == 'open' ? expectedPath : pathExposedToB1a);
assert_array_equals(log.pathAtTargets[1], mode == 'open' ? expectedPath : pathExposedToB1cS);
assert_array_equals(log.pathAtTargets[2], mode == 'open' ? expectedPath : pathExposedToB1cS);
diff --git a/tests/wpt/web-platform-tests/shadow-dom/leaktests/get-elements.html b/tests/wpt/web-platform-tests/shadow-dom/leaktests/get-elements.html
index 2ce916a650e..40fa9b69314 100644
--- a/tests/wpt/web-platform-tests/shadow-dom/leaktests/get-elements.html
+++ b/tests/wpt/web-platform-tests/shadow-dom/leaktests/get-elements.html
@@ -85,12 +85,12 @@ test(function() {
assert_equals(doc.querySelectorAll('.bar').length, 1);
assert_equals(doc.getElementsByClassName('bar')[0].getAttribute('label'), 'doc-div');
- assert_array_equals(hostOpen.querySelectorAll('.bar').length, 0);
+ assert_equals(hostOpen.querySelectorAll('.bar').length, 0);
assert_equals(shadowOpen.querySelectorAll('.bar').length, 1);
assert_equals(shadowOpen.querySelectorAll('.bar')[0].getAttribute('label'), 'shadow-open-div');
- assert_array_equals(hostClosed.querySelectorAll('.bar').length, 0);
+ assert_equals(hostClosed.querySelectorAll('.bar').length, 0);
assert_equals(shadowClosed.querySelectorAll('.bar').length, 1);
assert_equals(shadowClosed.querySelectorAll('.bar')[0].getAttribute('label'), 'shadow-closed-div');
@@ -106,11 +106,11 @@ test(function() {
assert_equals(doc.querySelectorAll('[name=baz]').length, 1);
- assert_array_equals(hostOpen.querySelectorAll('[name=baz]').length, 0);
+ assert_equals(hostOpen.querySelectorAll('[name=baz]').length, 0);
assert_equals(shadowOpen.querySelectorAll('[name=baz]').length, 1);
assert_equals(shadowOpen.querySelectorAll('[name=baz]')[0].getAttribute('label'), 'shadow-open-form');
- assert_array_equals(hostClosed.querySelectorAll('[name=baz]').length, 0);
+ assert_equals(hostClosed.querySelectorAll('[name=baz]').length, 0);
assert_equals(shadowClosed.querySelectorAll('[name=baz]').length, 1);
assert_equals(shadowClosed.querySelectorAll('[name=baz]')[0].getAttribute('label'), 'shadow-closed-form');
}, 'getElementsByName() should not leak nodes in shadow tree');
@@ -126,12 +126,12 @@ test(function() {
assert_equals(doc.querySelectorAll('my-element').length, 1);
assert_equals(doc.getElementsByTagName('my-element')[0].getAttribute('label'), 'doc-my-element');
- assert_array_equals(hostOpen.querySelectorAll('my-element').length, 0);
+ assert_equals(hostOpen.querySelectorAll('my-element').length, 0);
// ShadowRoot isn't an Element, does not have getElementsByTagName().
assert_equals(shadowOpen.querySelectorAll('my-element').length, 1);
assert_equals(shadowOpen.querySelectorAll('my-element')[0].getAttribute('label'), 'shadow-open-my-element');
- assert_array_equals(hostClosed.querySelectorAll('my-element').length, 0);
+ assert_equals(hostClosed.querySelectorAll('my-element').length, 0);
assert_equals(shadowClosed.querySelectorAll('my-element').length, 1);
assert_equals(shadowClosed.querySelectorAll('my-element')[0].getAttribute('label'), 'shadow-closed-my-element');
}, 'getElementsByTagName() should not leak nodes in shadow tree');
diff --git a/tests/wpt/web-platform-tests/storage/estimate-indexeddb-worker.https.html b/tests/wpt/web-platform-tests/storage/estimate-indexeddb-worker.https.html
deleted file mode 100644
index 2366760bdbe..00000000000
--- a/tests/wpt/web-platform-tests/storage/estimate-indexeddb-worker.https.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>StorageManager: estimate() for indexeddb from worker</title>
- <meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-estimate">
- <meta name="author" title="Mozilla" href="https://www.mozilla.org">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <script>
- fetch_tests_from_worker(new Worker("storage-estimate-indexeddb.js"));
- </script>
- </body>
-</html>
diff --git a/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js b/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js
new file mode 100644
index 00000000000..3e34ad19bab
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js
@@ -0,0 +1,92 @@
+// META: title=StorageManager: estimate() for indexeddb
+
+test(t => {
+ assert_true('estimate' in navigator.storage);
+ assert_equals(typeof navigator.storage.estimate, 'function');
+ assert_true(navigator.storage.estimate() instanceof Promise);
+}, 'estimate() method exists and returns a Promise');
+
+promise_test(t => {
+ return navigator.storage.estimate().then(result => {
+ assert_true(typeof result === 'object');
+ assert_true('usage' in result);
+ assert_equals(typeof result.usage, 'number');
+ assert_true('quota' in result);
+ assert_equals(typeof result.quota, 'number');
+ });
+}, 'estimate() resolves to dictionary with members');
+
+promise_test(t => {
+ const arraySize = 1e6;
+ const objectStoreName = "storageManager";
+ const dbname = this.window ? window.location.pathname :
+ "estimate-worker.https.html";
+
+ let db;
+ let usageBeforeCreate, usageAfterCreate, usageAfterPut;
+
+ function deleteDB(name) {
+ return new Promise((resolve, reject) => {
+ let deleteRequest = indexedDB.deleteDatabase(name);
+ deleteRequest.onerror = () => { reject(deleteRequest.error); };
+ deleteRequest.onsuccess = () => { resolve(); };
+ });
+ }
+
+ return deleteDB(dbname)
+ .then(() => {
+ return navigator.storage.estimate();
+ })
+ .then(estimate => {
+ usageBeforeCreate = estimate.usage;
+ return new Promise((resolve, reject) => {
+ let openRequest = indexedDB.open(dbname);
+ openRequest.onerror = () => { reject(openRequest.error); };
+ openRequest.onupgradeneeded = event => {
+ openRequest.result.createObjectStore(objectStoreName);
+ };
+ openRequest.onsuccess = () => { resolve(openRequest.result); };
+ });
+ })
+ .then(connection => {
+ db = connection;
+ return navigator.storage.estimate();
+ })
+ .then(estimate => {
+ usageAfterCreate = estimate.usage;
+ assert_greater_than(
+ usageAfterCreate, usageBeforeCreate,
+ 'estimated usage should increase after object store is created');
+
+ let txn = db.transaction(objectStoreName, 'readwrite');
+ let buffer = new ArrayBuffer(arraySize);
+ let view = new Uint8Array(buffer);
+
+ for (let i = 0; i < arraySize; i++) {
+ view[i] = parseInt(Math.random() * 255);
+ }
+
+ let testBlob = new Blob([buffer], {type: "binary/random"});
+ txn.objectStore(objectStoreName).add(testBlob, 1);
+
+ return new Promise((resolve, reject) => {
+ txn.onabort = () => { reject(txn.error); };
+ txn.oncomplete = () => { resolve(); };
+ });
+ })
+ .then(() => {
+ return navigator.storage.estimate();
+ })
+ .then(estimate => {
+ usageAfterPut = estimate.usage;
+ assert_greater_than(
+ usageAfterPut, usageAfterCreate,
+ 'estimated usage should increase after large value is stored');
+
+ db.close();
+ return deleteDB(dbname);
+ })
+ .then(() => {
+ t.done();
+ });
+}, 'estimate() shows usage increase after large value is stored');
diff --git a/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.html b/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.html
deleted file mode 100644
index 3f5e1589d34..00000000000
--- a/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>StorageManager: estimate() for indexeddb</title>
- <meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-estimate">
- <meta name="author" title="Mozilla" href="https://www.mozilla.org">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <script src="storage-estimate-indexeddb.js"></script>
- </body>
-</html>
diff --git a/tests/wpt/web-platform-tests/storage/estimate-parallel.https.any.js b/tests/wpt/web-platform-tests/storage/estimate-parallel.https.any.js
new file mode 100644
index 00000000000..090f004b851
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/estimate-parallel.https.any.js
@@ -0,0 +1,13 @@
+// META: title=StorageManager: multiple estimate() calls in parallel
+
+promise_test(async t => {
+ let r1, r2;
+ await Promise.all([
+ navigator.storage.estimate().then(r => { r1 = r; }),
+ navigator.storage.estimate().then(r => { r2 = r; })
+ ]);
+ assert_true(('usage' in r1) && ('quota' in r1),
+ 'first response should have expected fields');
+ assert_true(('usage' in r2) && ('quota' in r2),
+ 'second response should have expected fields');
+}, 'Multiple estimate() calls in parallel should complete');
diff --git a/tests/wpt/web-platform-tests/storage/estimate-parallel.https.html b/tests/wpt/web-platform-tests/storage/estimate-parallel.https.html
deleted file mode 100644
index 571b08cd5e2..00000000000
--- a/tests/wpt/web-platform-tests/storage/estimate-parallel.https.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>StorageManager: multiple estimate() calls in parallel</title>
-<meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-estimate">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
-promise_test(async t => {
- let r1, r2;
- await Promise.all([
- navigator.storage.estimate().then(r => { r1 = r; }),
- navigator.storage.estimate().then(r => { r2 = r; })
- ]);
- assert_true(('usage' in r1) && ('quota' in r1),
- 'first response should have expected fields');
- assert_true(('usage' in r2) && ('quota' in r2),
- 'second response should have expected fields');
-}, 'Multiple estimate() calls in parallel should complete');
-</script>
diff --git a/tests/wpt/web-platform-tests/storage/opaque-origin.https.html b/tests/wpt/web-platform-tests/storage/opaque-origin.https.html
deleted file mode 100644
index 563f2fea3c5..00000000000
--- a/tests/wpt/web-platform-tests/storage/opaque-origin.https.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>StorageManager API and opaque origins</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
-
-function load_iframe(src, sandbox) {
- return new Promise(resolve => {
- const iframe = document.createElement('iframe');
- iframe.onload = () => { resolve(iframe); };
- if (sandbox)
- iframe.sandbox = sandbox;
- iframe.srcdoc = src;
- iframe.style.display = 'none';
- document.documentElement.appendChild(iframe);
- });
-}
-
-function wait_for_message(iframe) {
- return new Promise(resolve => {
- self.addEventListener('message', function listener(e) {
- if (e.source === iframe.contentWindow) {
- resolve(e.data);
- self.removeEventListener('message', listener);
- }
- });
- });
-}
-
-function make_script(snippet) {
- return '<script>' +
- ' window.onmessage = () => {' +
- ' try {' +
- ' (' + snippet + ')' +
- ' .then(' +
- ' result => {' +
- ' window.parent.postMessage({result: "no rejection"}, "*");' +
- ' }, ' +
- ' error => {' +
- ' window.parent.postMessage({result: error.name}, "*");' +
- ' });' +
- ' } catch (ex) {' +
- // Report if not implemented/exposed, rather than time out.
- ' window.parent.postMessage({result: ex.message}, "*");' +
- ' }' +
- ' };' +
- '<\/script>';
-}
-
-['navigator.storage.persist()',
- 'navigator.storage.persisted()',
- 'navigator.storage.estimate()'
-].forEach(snippet => {
- promise_test(t => {
- return load_iframe(make_script(snippet))
- .then(iframe => {
- iframe.contentWindow.postMessage({}, '*');
- return wait_for_message(iframe);
- })
- .then(message => {
- assert_equals(message.result, 'no rejection',
- `${snippet} should not reject`);
- });
- }, `${snippet} in non-sandboxed iframe should not reject`);
-
- promise_test(t => {
- return load_iframe(make_script(snippet), 'allow-scripts')
- .then(iframe => {
- iframe.contentWindow.postMessage({}, '*');
- return wait_for_message(iframe);
- })
- .then(message => {
- assert_equals(message.result, 'TypeError',
- `${snippet} should reject with TypeError`);
- });
- }, `${snippet} in sandboxed iframe should reject with TypeError`);
-});
-</script>
diff --git a/tests/wpt/web-platform-tests/storage/opaque-origin.https.window.js b/tests/wpt/web-platform-tests/storage/opaque-origin.https.window.js
new file mode 100644
index 00000000000..3e101dde675
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/opaque-origin.https.window.js
@@ -0,0 +1,73 @@
+// META: title=StorageManager API and opaque origins
+
+function load_iframe(src, sandbox) {
+ return new Promise(resolve => {
+ const iframe = document.createElement('iframe');
+ iframe.onload = () => { resolve(iframe); };
+ if (sandbox)
+ iframe.sandbox = sandbox;
+ iframe.srcdoc = src;
+ iframe.style.display = 'none';
+ document.documentElement.appendChild(iframe);
+ });
+}
+
+function wait_for_message(iframe) {
+ return new Promise(resolve => {
+ self.addEventListener('message', function listener(e) {
+ if (e.source === iframe.contentWindow) {
+ resolve(e.data);
+ self.removeEventListener('message', listener);
+ }
+ });
+ });
+}
+
+function make_script(snippet) {
+ return '<script>' +
+ ' window.onmessage = () => {' +
+ ' try {' +
+ ' (' + snippet + ')' +
+ ' .then(' +
+ ' result => {' +
+ ' window.parent.postMessage({result: "no rejection"}, "*");' +
+ ' }, ' +
+ ' error => {' +
+ ' window.parent.postMessage({result: error.name}, "*");' +
+ ' });' +
+ ' } catch (ex) {' +
+ // Report if not implemented/exposed, rather than time out.
+ ' window.parent.postMessage({result: ex.message}, "*");' +
+ ' }' +
+ ' };' +
+ '<\/script>';
+}
+
+['navigator.storage.persist()',
+ 'navigator.storage.persisted()',
+ 'navigator.storage.estimate()'
+].forEach(snippet => {
+ promise_test(t => {
+ return load_iframe(make_script(snippet))
+ .then(iframe => {
+ iframe.contentWindow.postMessage({}, '*');
+ return wait_for_message(iframe);
+ })
+ .then(message => {
+ assert_equals(message.result, 'no rejection',
+ `${snippet} should not reject`);
+ });
+ }, `${snippet} in non-sandboxed iframe should not reject`);
+
+ promise_test(t => {
+ return load_iframe(make_script(snippet), 'allow-scripts')
+ .then(iframe => {
+ iframe.contentWindow.postMessage({}, '*');
+ return wait_for_message(iframe);
+ })
+ .then(message => {
+ assert_equals(message.result, 'TypeError',
+ `${snippet} should reject with TypeError`);
+ });
+ }, `${snippet} in sandboxed iframe should reject with TypeError`);
+});
diff --git a/tests/wpt/web-platform-tests/storage/permission-query.https.any.js b/tests/wpt/web-platform-tests/storage/permission-query.https.any.js
new file mode 100644
index 00000000000..9984bdab793
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/permission-query.https.any.js
@@ -0,0 +1,10 @@
+// META: title=The Permission API registration for "persistent-storage"
+
+promise_test(async t => {
+ const status =
+ await navigator.permissions.query({name: 'persistent-storage'});
+ assert_equals(status.constructor, PermissionStatus,
+ 'query() result should resolve to a PermissionStatus');
+ assert_true(['granted','denied', 'prompt'].includes(status.state),
+ 'state should be a PermissionState');
+}, 'The "persistent-storage" permission is recognized');
diff --git a/tests/wpt/web-platform-tests/storage/persisted-worker.https.html b/tests/wpt/web-platform-tests/storage/persisted-worker.https.html
deleted file mode 100644
index 21f5c8bd92d..00000000000
--- a/tests/wpt/web-platform-tests/storage/persisted-worker.https.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>StorageManager: persisted() from worker</title>
- <meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-persisted">
- <meta name="author" title="Mozilla" href="https://www.mozilla.org">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <script>
- fetch_tests_from_worker(new Worker("storage-persisted.js"));
- </script>
- </body>
-</html>
diff --git a/tests/wpt/web-platform-tests/storage/persisted.https.any.js b/tests/wpt/web-platform-tests/storage/persisted.https.any.js
new file mode 100644
index 00000000000..57e15f0e811
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/persisted.https.any.js
@@ -0,0 +1,14 @@
+// META: title=StorageManager: persisted()
+
+test(function(t) {
+ assert_true('persisted' in navigator.storage);
+ assert_equals(typeof navigator.storage.persisted, 'function');
+ assert_true(navigator.storage.persisted() instanceof Promise);
+}, 'persisted() method exists and returns a Promise');
+
+promise_test(function(t) {
+ return navigator.storage.persisted().then(function(result) {
+ assert_equals(typeof result, 'boolean');
+ assert_equals(result, false);
+ });
+}, 'persisted() returns a promise and resolves as boolean with false');
diff --git a/tests/wpt/web-platform-tests/storage/persisted.https.html b/tests/wpt/web-platform-tests/storage/persisted.https.html
deleted file mode 100644
index a5a91ff0b26..00000000000
--- a/tests/wpt/web-platform-tests/storage/persisted.https.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>StorageManager: persisted()</title>
- <meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-persisted">
- <meta name="author" title="Mozilla" href="https://www.mozilla.org">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <script src="storage-persisted.js"></script>
- </body>
-</html>
diff --git a/tests/wpt/web-platform-tests/storage/resources/storagemanager-persist-worker.js b/tests/wpt/web-platform-tests/storage/resources/storagemanager-persist-worker.js
deleted file mode 100644
index 1152e4ec734..00000000000
--- a/tests/wpt/web-platform-tests/storage/resources/storagemanager-persist-worker.js
+++ /dev/null
@@ -1,7 +0,0 @@
-importScripts('/resources/testharness.js');
-
-test(function() {
- assert_false('persist' in navigator.storage);
-}, 'navigator.storage.persist should not exist in workers');
-
-done();
diff --git a/tests/wpt/web-platform-tests/storage/resources/storagemanager-persisted-worker.js b/tests/wpt/web-platform-tests/storage/resources/storagemanager-persisted-worker.js
deleted file mode 100644
index 979c8be3cd3..00000000000
--- a/tests/wpt/web-platform-tests/storage/resources/storagemanager-persisted-worker.js
+++ /dev/null
@@ -1,13 +0,0 @@
-importScripts('/resources/testharness.js');
-
-promise_test(function() {
- var promise = navigator.storage.persisted();
- assert_true(promise instanceof Promise,
- 'navigator.storage.persisted() returned a Promise.');
- return promise.then(function (result) {
- assert_equals(typeof result, 'boolean',
- result + ' should be a boolean');
- });
-}, 'navigator.storage.persisted returns a promise that resolves.');
-
-done();
diff --git a/tests/wpt/web-platform-tests/storage/storage-estimate-indexeddb.js b/tests/wpt/web-platform-tests/storage/storage-estimate-indexeddb.js
deleted file mode 100644
index 5f7895350ef..00000000000
--- a/tests/wpt/web-platform-tests/storage/storage-estimate-indexeddb.js
+++ /dev/null
@@ -1,94 +0,0 @@
-if (this.document === undefined) {
- importScripts("/resources/testharness.js");
-}
-
-test(function(t) {
- assert_true('estimate' in navigator.storage);
- assert_equals(typeof navigator.storage.estimate, 'function');
- assert_true(navigator.storage.estimate() instanceof Promise);
-}, 'estimate() method exists and returns a Promise');
-
-promise_test(function(t) {
- return navigator.storage.estimate().then(function(result) {
- assert_true(typeof result === 'object');
- assert_true('usage' in result);
- assert_equals(typeof result.usage, 'number');
- assert_true('quota' in result);
- assert_equals(typeof result.quota, 'number');
- });
-}, 'estimate() resolves to dictionary with members');
-
-promise_test(function(t) {
- const arraySize = 1e6;
- const objectStoreName = "storageManager";
- const dbname = this.window ? window.location.pathname :
- "estimate-worker.https.html";
-
- let db;
- let usageBeforeCreate, usageAfterCreate, usageAfterPut;
-
- function deleteDB(name) {
- return new Promise(function(resolve, reject) {
- let deleteRequest = indexedDB.deleteDatabase(name);
- deleteRequest.onerror = function() { reject(deleteRequest.error); };
- deleteRequest.onsuccess = function() { resolve(); };
- });
- }
-
- return deleteDB(dbname)
- .then(() => {
- return navigator.storage.estimate();
- })
- .then(estimate => {
- usageBeforeCreate = estimate.usage;
- return new Promise(function(resolve, reject) {
- let openRequest = indexedDB.open(dbname);
- openRequest.onerror = function() { reject(openRequest.error); };
- openRequest.onupgradeneeded = function(event) {
- openRequest.result.createObjectStore(objectStoreName);
- };
- openRequest.onsuccess = function() { resolve(openRequest.result); };
- });
- })
- .then(connection => {
- db = connection;
- return navigator.storage.estimate();
- })
- .then(estimate => {
- usageAfterCreate = estimate.usage;
- assert_greater_than(usageAfterCreate, usageBeforeCreate,
- 'estimated usage should increase after object store is created');
-
- let txn = db.transaction(objectStoreName, 'readwrite');
- let buffer = new ArrayBuffer(arraySize);
- let view = new Uint8Array(buffer);
-
- for (let i = 0; i < arraySize; i++) {
- view[i] = parseInt(Math.random() * 255);
- }
-
- let testBlob = new Blob([buffer], {type: "binary/random"});
- txn.objectStore(objectStoreName).add(testBlob, 1);
-
- return new Promise(function(resolve, reject) {
- txn.onabort = function() { reject(txn.error); };
- txn.oncomplete = function() { resolve(); };
- });
- })
- .then(() => {
- return navigator.storage.estimate();
- })
- .then(estimate => {
- usageAfterPut = estimate.usage;
- assert_greater_than(usageAfterPut, usageAfterCreate,
- 'estimated usage should increase after large value is stored');
-
- db.close();
- return deleteDB(dbname)
- })
- .then(() => {
- t.done();
- })
-}, 'estimate() shows usage increase after large value is stored');
-
-done();
diff --git a/tests/wpt/web-platform-tests/storage/storage-persisted.js b/tests/wpt/web-platform-tests/storage/storage-persisted.js
deleted file mode 100644
index 5bc86fea951..00000000000
--- a/tests/wpt/web-platform-tests/storage/storage-persisted.js
+++ /dev/null
@@ -1,18 +0,0 @@
-if (this.document === undefined) {
- importScripts("/resources/testharness.js");
-}
-
-test(function(t) {
- assert_true('persisted' in navigator.storage);
- assert_equals(typeof navigator.storage.persisted, 'function');
- assert_true(navigator.storage.persisted() instanceof Promise);
-}, 'persisted() method exists and returns a Promise');
-
-promise_test(function(t) {
- return navigator.storage.persisted().then(function(result) {
- assert_equals(typeof result, 'boolean');
- assert_equals(result, false);
- });
-}, 'persisted() returns a promise and resolves as boolean with false');
-
-done();
diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.any.js b/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.any.js
new file mode 100644
index 00000000000..d1d2e21924c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.any.js
@@ -0,0 +1,60 @@
+// META: title=StorageManager: estimate()
+
+test(function(t) {
+ assert_true(navigator.storage.estimate() instanceof Promise);
+}, 'estimate() method returns a Promise');
+
+promise_test(function(t) {
+ return navigator.storage.estimate().then(function(result) {
+ assert_true(typeof result === 'object');
+ assert_true('usage' in result);
+ assert_equals(typeof result.usage, 'number');
+ assert_true('quota' in result);
+ assert_equals(typeof result.quota, 'number');
+ });
+}, 'estimate() resolves to dictionary with members');
+
+promise_test(function(t) {
+ const large_value = new Uint8Array(1e6);
+ const dbname = `db-${location}-${t.name}`;
+ let db, before, after;
+
+ indexedDB.deleteDatabase(dbname);
+ return new Promise((resolve, reject) => {
+ const open = indexedDB.open(dbname);
+ open.onerror = () => { reject(open.error); };
+ open.onupgradeneeded = () => {
+ const connection = open.result;
+ connection.createObjectStore('store');
+ };
+ open.onsuccess = () => {
+ const connection = open.result;
+ t.add_cleanup(() => {
+ connection.close();
+ indexedDB.deleteDatabase(dbname);
+ });
+ resolve(connection);
+ };
+ })
+ .then(connection => {
+ db = connection;
+ return navigator.storage.estimate();
+ })
+ .then(estimate => {
+ before = estimate.usage;
+ return new Promise((resolve, reject) => {
+ const tx = db.transaction('store', 'readwrite');
+ tx.objectStore('store').put(large_value, 'key');
+ tx.onabort = () => { reject(tx.error); };
+ tx.oncomplete = () => { resolve(); };
+ });
+ })
+ .then(() => {
+ return navigator.storage.estimate();
+ })
+ .then(estimate => {
+ after = estimate.usage;
+ assert_greater_than(after, before,
+ 'estimated usage should increase');
+ });
+}, 'estimate() shows usage increase after 1MB IndexedDB record is stored');
diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.html b/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.html
deleted file mode 100644
index 08a699adfb0..00000000000
--- a/tests/wpt/web-platform-tests/storage/storagemanager-estimate.https.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>StorageManager: estimate()</title>
-<meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-estimate">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
-
-test(function(t) {
- assert_true(navigator.storage.estimate() instanceof Promise);
-}, 'estimate() method returns a Promise');
-
-promise_test(function(t) {
- return navigator.storage.estimate().then(function(result) {
- assert_true(typeof result === 'object');
- assert_true('usage' in result);
- assert_equals(typeof result.usage, 'number');
- assert_true('quota' in result);
- assert_equals(typeof result.quota, 'number');
- });
-}, 'estimate() resolves to dictionary with members');
-
-promise_test(function(t) {
- const large_value = new Uint8Array(1e6);
- const dbname = `db-${location}-${t.name}`;
- let db, before, after;
-
- indexedDB.deleteDatabase(dbname);
- return new Promise((resolve, reject) => {
- const open = indexedDB.open(dbname);
- open.onerror = () => { reject(open.error); };
- open.onupgradeneeded = () => {
- const connection = open.result;
- connection.createObjectStore('store');
- };
- open.onsuccess = () => {
- const connection = open.result;
- t.add_cleanup(() => {
- connection.close();
- indexedDB.deleteDatabase(dbname);
- });
- resolve(connection);
- };
- })
- .then(connection => {
- db = connection;
- return navigator.storage.estimate();
- })
- .then(estimate => {
- before = estimate.usage;
- return new Promise((resolve, reject) => {
- const tx = db.transaction('store', 'readwrite');
- tx.objectStore('store').put(large_value, 'key');
- tx.onabort = () => { reject(tx.error); };
- tx.oncomplete = () => { resolve(); };
- });
- })
- .then(() => {
- return navigator.storage.estimate();
- })
- .then(estimate => {
- after = estimate.usage;
- assert_greater_than(after, before,
- 'estimated usage should increase');
- });
-}, 'estimate() shows usage increase after 1MB IndexedDB record is stored');
-
-</script>
diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-persist-worker.https.html b/tests/wpt/web-platform-tests/storage/storagemanager-persist-worker.https.html
deleted file mode 100644
index 9c89a2f6712..00000000000
--- a/tests/wpt/web-platform-tests/storage/storagemanager-persist-worker.https.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>StorageManager: persist() (worker)</title>
-<meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-persist">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
-var worker = new Worker('resources/storagemanager-persist-worker.js');
-fetch_tests_from_worker(worker);
-</script>
diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-persist.https.html b/tests/wpt/web-platform-tests/storage/storagemanager-persist.https.html
deleted file mode 100644
index 61624fe272a..00000000000
--- a/tests/wpt/web-platform-tests/storage/storagemanager-persist.https.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>StorageManager: persist()</title>
-<meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-persist">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
-
-promise_test(function() {
- var promise = navigator.storage.persist();
- assert_true(promise instanceof Promise,
- 'navigator.storage.persist() returned a Promise.');
- return promise.then(function(result) {
- assert_equals(typeof result, 'boolean', result + ' should be boolean');
- });
-}, 'navigator.storage.persist() returns a promise that resolves.');
-
-</script>
diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-persist.https.window.js b/tests/wpt/web-platform-tests/storage/storagemanager-persist.https.window.js
new file mode 100644
index 00000000000..13e17a16e14
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/storagemanager-persist.https.window.js
@@ -0,0 +1,10 @@
+// META: title=StorageManager: persist()
+
+promise_test(function() {
+ var promise = navigator.storage.persist();
+ assert_true(promise instanceof Promise,
+ 'navigator.storage.persist() returned a Promise.');
+ return promise.then(function(result) {
+ assert_equals(typeof result, 'boolean', result + ' should be boolean');
+ });
+}, 'navigator.storage.persist() returns a promise that resolves.');
diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-persist.https.worker.js b/tests/wpt/web-platform-tests/storage/storagemanager-persist.https.worker.js
new file mode 100644
index 00000000000..fcf8175f706
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/storagemanager-persist.https.worker.js
@@ -0,0 +1,8 @@
+// META: title=StorageManager: persist() (worker)
+importScripts("/resources/testharness.js");
+
+test(function() {
+ assert_false('persist' in navigator.storage);
+}, 'navigator.storage.persist should not exist in workers');
+
+done();
diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-persisted-worker.https.html b/tests/wpt/web-platform-tests/storage/storagemanager-persisted-worker.https.html
deleted file mode 100644
index 75004946164..00000000000
--- a/tests/wpt/web-platform-tests/storage/storagemanager-persisted-worker.https.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>StorageManager: persisted() (worker)</title>
-<meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-persisted">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
-var worker = new Worker('resources/storagemanager-persisted-worker.js');
-fetch_tests_from_worker(worker);
-</script>
diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-persisted.https.any.js b/tests/wpt/web-platform-tests/storage/storagemanager-persisted.https.any.js
new file mode 100644
index 00000000000..70999406690
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/storagemanager-persisted.https.any.js
@@ -0,0 +1,10 @@
+// META: title=StorageManager: persisted()
+
+promise_test(function() {
+ var promise = navigator.storage.persisted();
+ assert_true(promise instanceof Promise,
+ 'navigator.storage.persisted() returned a Promise.');
+ return promise.then(function (result) {
+ assert_equals(typeof result, 'boolean', result + ' should be boolean');
+ });
+}, 'navigator.storage.persisted() returns a promise that resolves.');
diff --git a/tests/wpt/web-platform-tests/storage/storagemanager-persisted.https.html b/tests/wpt/web-platform-tests/storage/storagemanager-persisted.https.html
deleted file mode 100644
index 1d88c11bd8a..00000000000
--- a/tests/wpt/web-platform-tests/storage/storagemanager-persisted.https.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>StorageManager: persist()</title>
-<meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-persist">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
-
-promise_test(function() {
- var promise = navigator.storage.persisted();
- assert_true(promise instanceof Promise,
- 'navigator.storage.persisted() returned a Promise.');
- return promise.then(function (result) {
- assert_equals(typeof result, 'boolean', result + ' should be boolean');
- });
-}, 'navigator.storage.persisted() returns a promise that resolves.');
-
-</script>
diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/patched-global.js b/tests/wpt/web-platform-tests/streams/readable-streams/patched-global.js
index e8117c48048..c75b21e8c38 100644
--- a/tests/wpt/web-platform-tests/streams/readable-streams/patched-global.js
+++ b/tests/wpt/web-platform-tests/streams/readable-streams/patched-global.js
@@ -47,7 +47,6 @@ test(t => {
const oldReadableStream = self.ReadableStream;
- /* eslint-disable no-native-reassign */
self.ReadableStream = function() {
throw new Error('ReadableStream called on global object');
};
@@ -60,8 +59,6 @@ test(t => {
assert_true(isReadableStream(branch1), 'branch1 should be a ReadableStream');
assert_true(isReadableStream(branch2), 'branch2 should be a ReadableStream');
-
- /* eslint-enable no-native-reassign */
}, 'ReadableStream tee() should not call the global ReadableStream');
done();
diff --git a/tests/wpt/web-platform-tests/streams/transform-streams/patched-global.js b/tests/wpt/web-platform-tests/streams/transform-streams/patched-global.js
index d27b9cdd119..f5d32c08ea7 100644
--- a/tests/wpt/web-platform-tests/streams/transform-streams/patched-global.js
+++ b/tests/wpt/web-platform-tests/streams/transform-streams/patched-global.js
@@ -21,8 +21,6 @@ test(() => {
}, 'TransformStream constructor should not call setters for highWaterMark or size');
test(t => {
- /* eslint-disable no-native-reassign */
-
const oldReadableStream = ReadableStream;
const oldWritableStream = WritableStream;
const getReader = ReadableStream.prototype.getReader;
@@ -47,7 +45,6 @@ test(t => {
'getReader should work when called on ts.readable');
assert_not_equals(getWriter.call(ts.writable), undefined,
'getWriter should work when called on ts.writable');
- /* eslint-enable no-native-reassign */
}, 'TransformStream should use the original value of ReadableStream and WritableStream');
done();
diff --git a/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-discrete.svg b/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-discrete.svg
index aa9087395fb..5b20a589bb5 100644
--- a/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-discrete.svg
+++ b/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-discrete.svg
@@ -17,27 +17,27 @@
// Distinct number of path segments
test_no_interpolation({
property: 'd',
- from: "path('M 0 0 H 1 H 2')",
- to: "path('M 0 0 H 3')"
+ from: 'path("M 0 0 H 1 H 2")',
+ to: 'path("M 0 0 H 3")'
});
test_no_interpolation({
property: 'd',
- from: "path('M 1 2 L 3 4 Z')",
+ from: 'path("M 1 2 L 3 4 Z")',
to: "none"
});
// Distinct segment types
test_no_interpolation({
property: 'd',
- from: "path('M 10 0 H 11')",
- to: "path('M 20 0 V 2')"
+ from: 'path("M 10 0 H 11")',
+ to: 'path("M 20 0 V 2")'
});
test_no_interpolation({
property: 'd',
- from: "path('M 1 2 L 4 6 Z')",
- to: "path('M 1 2 H 4 V 6')"
+ from: 'path("M 1 2 L 4 6 Z")',
+ to: 'path("M 1 2 H 4 V 6")'
});
]]></script>
</svg>
diff --git a/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-relative-absolute.svg b/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-relative-absolute.svg
index 65d2f3b2eb6..09d4c70712f 100644
--- a/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-relative-absolute.svg
+++ b/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-relative-absolute.svg
@@ -17,106 +17,106 @@
// Mix relative and non-relative
test_interpolation({
property: 'd',
- from: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')",
- to: "path('M 0 0 L 100 100 m 0 100 l 100 0 z l 300 100 z')"
+ from: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z")',
+ to: 'path("M 0 0 L 100 100 m 0 100 l 100 0 z l 300 100 z")'
}, [
- {at: -1, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 0 -100 Z')"},
- {at: 0, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')"},
- {at: 0.125, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 225 125 Z')"},
- {at: 0.875, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 375 275 Z')"},
- {at: 1, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 400 300 Z')"},
- {at: 2, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 600 500 Z')"},
+ {at: -1, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 0 -100 Z")'},
+ {at: 0, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z")'},
+ {at: 0.125, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 225 125 Z")'},
+ {at: 0.875, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 375 275 Z")'},
+ {at: 1, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 400 300 Z")'},
+ {at: 2, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 600 500 Z")'},
]);
test_interpolation({
property: 'd',
- from: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')",
- to: "path('M 0 0 L 100 100 m 0 100 l 100 0 z l 100 -100 z')"
+ from: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z")',
+ to: 'path("M 0 0 L 100 100 m 0 100 l 100 0 z l 100 -100 z")'
}, [
- {at: -1, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')"},
- {at: 0, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')"},
- {at: 0.125, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')"},
- {at: 0.875, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')"},
- {at: 1, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')"},
- {at: 2, expect: "path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z')"},
+ {at: -1, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z")'},
+ {at: 0, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z")'},
+ {at: 0.125, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z")'},
+ {at: 0.875, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z")'},
+ {at: 1, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z")'},
+ {at: 2, expect: 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 200 100 Z")'},
]);
test_interpolation({
property: 'd',
- from: "path('m 10 20 l 40 50 z l 40 60 z m 60 70 l 90 60 z t 70 130')",
- to: "path('M 210 220 L 170 190 Z L 90 120 Z M 110 130 L 200 230 Z T 220 220')"
+ from: 'path("m 10 20 l 40 50 z l 40 60 z m 60 70 l 90 60 z t 70 130")',
+ to: 'path("M 210 220 L 170 190 Z L 90 120 Z M 110 130 L 200 230 Z T 220 220")'
}, [
- {at: -1, expect: "path('M -190 -180 L -70 -50 Z L 10 40 Z M 30 50 L 120 70 Z T 60 220')"},
- {at: 0, expect: "path('M 10 20 L 50 70 Z L 50 80 Z M 70 90 L 160 150 Z T 140 220')"},
- {at: 0.125, expect: "path('M 35 45 L 65 85 Z L 55 85 Z M 75 95 L 165 160 Z T 150 220')"},
- {at: 0.875, expect: "path('M 185 195 L 155 175 Z L 85 115 Z M 105 125 L 195 220 Z T 210 220')"},
- {at: 1, expect: "path('M 210 220 L 170 190 Z L 90 120 Z M 110 130 L 200 230 Z T 220 220')"},
- {at: 2, expect: "path('M 410 420 L 290 310 Z L 130 160 Z M 150 170 L 240 310 Z T 300 220')"}
+ {at: -1, expect: 'path("M -190 -180 L -70 -50 Z L 10 40 Z M 30 50 L 120 70 Z T 60 220")'},
+ {at: 0, expect: 'path("M 10 20 L 50 70 Z L 50 80 Z M 70 90 L 160 150 Z T 140 220")'},
+ {at: 0.125, expect: 'path("M 35 45 L 65 85 Z L 55 85 Z M 75 95 L 165 160 Z T 150 220")'},
+ {at: 0.875, expect: 'path("M 185 195 L 155 175 Z L 85 115 Z M 105 125 L 195 220 Z T 210 220")'},
+ {at: 1, expect: 'path("M 210 220 L 170 190 Z L 90 120 Z M 110 130 L 200 230 Z T 220 220")'},
+ {at: 2, expect: 'path("M 410 420 L 290 310 Z L 130 160 Z M 150 170 L 240 310 Z T 300 220")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 10 20 c 40 50 30 60 80 70 c 120 130 170 140 110 160')",
- to: "path('M 130 100 C 130 150 120 160 210 170 C 290 300 340 310 320 330')"
+ from: 'path("m 10 20 c 40 50 30 60 80 70 c 120 130 170 140 110 160")',
+ to: 'path("M 130 100 C 130 150 120 160 210 170 C 290 300 340 310 320 330")'
}, [
- {at: -1, expect: "path('M -110 -60 C -30 -10 -40 0 -30 10 C 130 140 180 150 80 170')"},
- {at: 0, expect: "path('M 10 20 C 50 70 40 80 90 90 C 210 220 260 230 200 250')"},
- {at: 0.125, expect: "path('M 25 30 C 60 80 50 90 105 100 C 220 230 270 240 215 260')"},
- {at: 0.875, expect: "path('M 115 90 C 120 140 110 150 195 160 C 280 290 330 300 305 320')"},
- {at: 1, expect: "path('M 130 100 C 130 150 120 160 210 170 C 290 300 340 310 320 330')"},
- {at: 2, expect: "path('M 250 180 C 210 230 200 240 330 250 C 370 380 420 390 440 410')"}
+ {at: -1, expect: 'path("M -110 -60 C -30 -10 -40 0 -30 10 C 130 140 180 150 80 170")'},
+ {at: 0, expect: 'path("M 10 20 C 50 70 40 80 90 90 C 210 220 260 230 200 250")'},
+ {at: 0.125, expect: 'path("M 25 30 C 60 80 50 90 105 100 C 220 230 270 240 215 260")'},
+ {at: 0.875, expect: 'path("M 115 90 C 120 140 110 150 195 160 C 280 290 330 300 305 320")'},
+ {at: 1, expect: 'path("M 130 100 C 130 150 120 160 210 170 C 290 300 340 310 320 330")'},
+ {at: 2, expect: 'path("M 250 180 C 210 230 200 240 330 250 C 370 380 420 390 440 410")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 10 20 q 30 60 40 50 q 110 80 90 80')",
- to: "path('M 130 100 Q 120 160 130 150 Q 200 150 180 190')"
+ from: 'path("m 10 20 q 30 60 40 50 q 110 80 90 80")',
+ to: 'path("M 130 100 Q 120 160 130 150 Q 200 150 180 190")'
}, [
- {at: -1, expect: "path('M -110 -60 Q -40 0 -30 -10 Q 120 150 100 110')"},
- {at: 0, expect: "path('M 10 20 Q 40 80 50 70 Q 160 150 140 150')"},
- {at: 0.125, expect: "path('M 25 30 Q 50 90 60 80 Q 165 150 145 155')"},
- {at: 0.875, expect: "path('M 115 90 Q 110 150 120 140 Q 195 150 175 185')"},
- {at: 1, expect: "path('M 130 100 Q 120 160 130 150 Q 200 150 180 190')"},
- {at: 2, expect: "path('M 250 180 Q 200 240 210 230 Q 240 150 220 230')"}
+ {at: -1, expect: 'path("M -110 -60 Q -40 0 -30 -10 Q 120 150 100 110")'},
+ {at: 0, expect: 'path("M 10 20 Q 40 80 50 70 Q 160 150 140 150")'},
+ {at: 0.125, expect: 'path("M 25 30 Q 50 90 60 80 Q 165 150 145 155")'},
+ {at: 0.875, expect: 'path("M 115 90 Q 110 150 120 140 Q 195 150 175 185")'},
+ {at: 1, expect: 'path("M 130 100 Q 120 160 130 150 Q 200 150 180 190")'},
+ {at: 2, expect: 'path("M 250 180 Q 200 240 210 230 Q 240 150 220 230")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 10 20 s 30 60 40 50 s 110 60 90 70')",
- to: "path('M 130 140 S 120 160 130 150 S 200 170 140 180')"
+ from: 'path("m 10 20 s 30 60 40 50 s 110 60 90 70")',
+ to: 'path("M 130 140 S 120 160 130 150 S 200 170 140 180")'
}, [
- {at: -1, expect: "path('M -110 -100 S -40 0 -30 -10 S 120 90 140 100')"},
- {at: 0, expect: "path('M 10 20 S 40 80 50 70 S 160 130 140 140')"},
- {at: 0.125, expect: "path('M 25 35 S 50 90 60 80 S 165 135 140 145')"},
- {at: 0.875, expect: "path('M 115 125 S 110 150 120 140 S 195 165 140 175')"},
- {at: 1, expect: "path('M 130 140 S 120 160 130 150 S 200 170 140 180')"},
- {at: 2, expect: "path('M 250 260 S 200 240 210 230 S 240 210 140 220')"}
+ {at: -1, expect: 'path("M -110 -100 S -40 0 -30 -10 S 120 90 140 100")'},
+ {at: 0, expect: 'path("M 10 20 S 40 80 50 70 S 160 130 140 140")'},
+ {at: 0.125, expect: 'path("M 25 35 S 50 90 60 80 S 165 135 140 145")'},
+ {at: 0.875, expect: 'path("M 115 125 S 110 150 120 140 S 195 165 140 175")'},
+ {at: 1, expect: 'path("M 130 140 S 120 160 130 150 S 200 170 140 180")'},
+ {at: 2, expect: 'path("M 250 260 S 200 240 210 230 S 240 210 140 220")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 10 20 h 30 v 60 h 10 v -10 l 110 60 Z')",
- to: "path('M 130 140 H 120 V 160 H 130 V 150 L 200 170 Z')"
+ from: 'path("m 10 20 h 30 v 60 h 10 v -10 l 110 60 Z")',
+ to: 'path("M 130 140 H 120 V 160 H 130 V 150 L 200 170 Z")'
}, [
- {at: -1, expect: "path('M -110 -100 H -40 V 0 H -30 V -10 L 120 90 Z')"},
- {at: 0, expect: "path('M 10 20 H 40 V 80 H 50 V 70 L 160 130 Z')"},
- {at: 0.125, expect: "path('M 25 35 H 50 V 90 H 60 V 80 L 165 135 Z')"},
- {at: 0.875, expect: "path('M 115 125 H 110 V 150 H 120 V 140 L 195 165 Z')"},
- {at: 1, expect: "path('M 130 140 H 120 V 160 H 130 V 150 L 200 170 Z')"},
- {at: 2, expect: "path('M 250 260 H 200 V 240 H 210 V 230 L 240 210 Z')"}
+ {at: -1, expect: 'path("M -110 -100 H -40 V 0 H -30 V -10 L 120 90 Z")'},
+ {at: 0, expect: 'path("M 10 20 H 40 V 80 H 50 V 70 L 160 130 Z")'},
+ {at: 0.125, expect: 'path("M 25 35 H 50 V 90 H 60 V 80 L 165 135 Z")'},
+ {at: 0.875, expect: 'path("M 115 125 H 110 V 150 H 120 V 140 L 195 165 Z")'},
+ {at: 1, expect: 'path("M 130 140 H 120 V 160 H 130 V 150 L 200 170 Z")'},
+ {at: 2, expect: 'path("M 250 260 H 200 V 240 H 210 V 230 L 240 210 Z")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 10 20 a 10 20 30 1 0 40 50 a 110 120 30 1 1 140 50')",
- to: "path('M 18 12 A 50 100 70 0 1 90 110 A 150 160 70 0 1 70 80')"
+ from: 'path("m 10 20 a 10 20 30 1 0 40 50 a 110 120 30 1 1 140 50")',
+ to: 'path("M 18 12 A 50 100 70 0 1 90 110 A 150 160 70 0 1 70 80")'
}, [
- {at: -1, expect: "path('M 2 28 A -30 -60 -10 1 0 10 30 A 70 80 -10 1 1 310 160')"},
- {at: 0, expect: "path('M 10 20 A 10 20 30 1 0 50 70 A 110 120 30 1 1 190 120')"},
- {at: 0.125, expect: "path('M 11 19 A 15 30 35 1 0 55 75 A 115 125 35 1 1 175 115')"},
- {at: 0.875, expect: "path('M 17 13 A 45 90 65 0 1 85 105 A 145 155 65 0 1 85 85')"},
- {at: 1, expect: "path('M 18 12 A 50 100 70 0 1 90 110 A 150 160 70 0 1 70 80')"},
- {at: 2, expect: "path('M 26 4 A 90 180 110 0 1 130 150 A 190 200 110 0 1 -50 40')"}
+ {at: -1, expect: 'path("M 2 28 A -30 -60 -10 1 0 10 30 A 70 80 -10 1 1 310 160")'},
+ {at: 0, expect: 'path("M 10 20 A 10 20 30 1 0 50 70 A 110 120 30 1 1 190 120")'},
+ {at: 0.125, expect: 'path("M 11 19 A 15 30 35 1 0 55 75 A 115 125 35 1 1 175 115")'},
+ {at: 0.875, expect: 'path("M 17 13 A 45 90 65 0 1 85 105 A 145 155 65 0 1 85 85")'},
+ {at: 1, expect: 'path("M 18 12 A 50 100 70 0 1 90 110 A 150 160 70 0 1 70 80")'},
+ {at: 2, expect: 'path("M 26 4 A 90 180 110 0 1 130 150 A 190 200 110 0 1 -50 40")'}
]);
]]></script>
</svg>
diff --git a/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-single.svg b/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-single.svg
index 25c523168a7..107b607beca 100644
--- a/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-single.svg
+++ b/tests/wpt/web-platform-tests/svg/path/property/d-interpolation-single.svg
@@ -17,229 +17,229 @@
// Exercise each segment type
test_interpolation({
property: 'd',
- from: "path('M 20 70')",
- to: "path('M 100 30')"
+ from: 'path("M 20 70")',
+ to: 'path("M 100 30")'
}, [
- {at: -1, expect: "path('M -60 110')"},
- {at: 0, expect: "path('M 20 70')"},
- {at: 0.125, expect: "path('M 30 65')"},
- {at: 0.875, expect: "path('M 90 35')"},
- {at: 1, expect: "path('M 100 30')"},
- {at: 2, expect: "path('M 180 -10')"}
+ {at: -1, expect: 'path("M -60 110")'},
+ {at: 0, expect: 'path("M 20 70")'},
+ {at: 0.125, expect: 'path("M 30 65")'},
+ {at: 0.875, expect: 'path("M 90 35")'},
+ {at: 1, expect: 'path("M 100 30")'},
+ {at: 2, expect: 'path("M 180 -10")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 20 70')",
- to: "path('m 100 30')"
+ from: 'path("m 20 70")',
+ to: 'path("m 100 30")'
}, [
- {at: -1, expect: "path('M -60 110')"},
- {at: 0, expect: "path('M 20 70')"},
- {at: 0.125, expect: "path('M 30 65')"},
- {at: 0.875, expect: "path('M 90 35')"},
- {at: 1, expect: "path('M 100 30')"},
- {at: 2, expect: "path('M 180 -10')"}
+ {at: -1, expect: 'path("M -60 110")'},
+ {at: 0, expect: 'path("M 20 70")'},
+ {at: 0.125, expect: 'path("M 30 65")'},
+ {at: 0.875, expect: 'path("M 90 35")'},
+ {at: 1, expect: 'path("M 100 30")'},
+ {at: 2, expect: 'path("M 180 -10")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 100 200 L 120 270')",
- to: "path('m 100 200 L 200 230')"
+ from: 'path("m 100 200 L 120 270")',
+ to: 'path("m 100 200 L 200 230")'
}, [
- {at: -1, expect: "path('M 100 200 L 40 310')"},
- {at: 0, expect: "path('M 100 200 L 120 270')"},
- {at: 0.125, expect: "path('M 100 200 L 130 265')"},
- {at: 0.875, expect: "path('M 100 200 L 190 235')"},
- {at: 1, expect: "path('M 100 200 L 200 230')"},
- {at: 2, expect: "path('M 100 200 L 280 190')"}
+ {at: -1, expect: 'path("M 100 200 L 40 310")'},
+ {at: 0, expect: 'path("M 100 200 L 120 270")'},
+ {at: 0.125, expect: 'path("M 100 200 L 130 265")'},
+ {at: 0.875, expect: 'path("M 100 200 L 190 235")'},
+ {at: 1, expect: 'path("M 100 200 L 200 230")'},
+ {at: 2, expect: 'path("M 100 200 L 280 190")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 100 200 l 20 70')",
- to: "path('m 100 200 l 100 30')"
+ from: 'path("m 100 200 l 20 70")',
+ to: 'path("m 100 200 l 100 30")'
}, [
- {at: -1, expect: "path('M 100 200 L 40 310')"},
- {at: 0, expect: "path('M 100 200 L 120 270')"},
- {at: 0.125, expect: "path('M 100 200 L 130 265')"},
- {at: 0.875, expect: "path('M 100 200 L 190 235')"},
- {at: 1, expect: "path('M 100 200 L 200 230')"},
- {at: 2, expect: "path('M 100 200 L 280 190')"}
+ {at: -1, expect: 'path("M 100 200 L 40 310")'},
+ {at: 0, expect: 'path("M 100 200 L 120 270")'},
+ {at: 0.125, expect: 'path("M 100 200 L 130 265")'},
+ {at: 0.875, expect: 'path("M 100 200 L 190 235")'},
+ {at: 1, expect: 'path("M 100 200 L 200 230")'},
+ {at: 2, expect: 'path("M 100 200 L 280 190")'}
]);
test_interpolation({
property: 'd',
- from: "path('M 20 10 C 32 42 52 62 120 2200')",
- to: "path('M 20 10 C 40 50 60 70 200 3000')",
+ from: 'path("M 20 10 C 32 42 52 62 120 2200")',
+ to: 'path("M 20 10 C 40 50 60 70 200 3000")',
}, [
- {at: -1, expect: "path('M 20 10 C 24 34 44 54 40 1400')"},
- {at: 0, expect: "path('M 20 10 C 32 42 52 62 120 2200')"},
- {at: 0.125, expect: "path('M 20 10 C 33 43 53 63 130 2300')"},
- {at: 0.875, expect: "path('M 20 10 C 39 49 59 69 190 2900')"},
- {at: 1, expect: "path('M 20 10 C 40 50 60 70 200 3000')"},
- {at: 2, expect: "path('M 20 10 C 48 58 68 78 280 3800')"}
+ {at: -1, expect: 'path("M 20 10 C 24 34 44 54 40 1400")'},
+ {at: 0, expect: 'path("M 20 10 C 32 42 52 62 120 2200")'},
+ {at: 0.125, expect: 'path("M 20 10 C 33 43 53 63 130 2300")'},
+ {at: 0.875, expect: 'path("M 20 10 C 39 49 59 69 190 2900")'},
+ {at: 1, expect: 'path("M 20 10 C 40 50 60 70 200 3000")'},
+ {at: 2, expect: 'path("M 20 10 C 48 58 68 78 280 3800")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 20 10 c 12 32 32 52 100 2190')",
- to: "path('m 20 10 c 20 40 40 60 180 2990')"
+ from: 'path("m 20 10 c 12 32 32 52 100 2190")',
+ to: 'path("m 20 10 c 20 40 40 60 180 2990")'
}, [
- {at: -1, expect: "path('M 20 10 C 24 34 44 54 40 1400')"},
- {at: 0, expect: "path('M 20 10 C 32 42 52 62 120 2200')"},
- {at: 0.125, expect: "path('M 20 10 C 33 43 53 63 130 2300')"},
- {at: 0.875, expect: "path('M 20 10 C 39 49 59 69 190 2900')"},
- {at: 1, expect: "path('M 20 10 C 40 50 60 70 200 3000')"},
- {at: 2, expect: "path('M 20 10 C 48 58 68 78 280 3800')"}
+ {at: -1, expect: 'path("M 20 10 C 24 34 44 54 40 1400")'},
+ {at: 0, expect: 'path("M 20 10 C 32 42 52 62 120 2200")'},
+ {at: 0.125, expect: 'path("M 20 10 C 33 43 53 63 130 2300")'},
+ {at: 0.875, expect: 'path("M 20 10 C 39 49 59 69 190 2900")'},
+ {at: 1, expect: 'path("M 20 10 C 40 50 60 70 200 3000")'},
+ {at: 2, expect: 'path("M 20 10 C 48 58 68 78 280 3800")'}
]);
test_interpolation({
property: 'd',
- from: "path('M 20 10 Q 32 42 120 2200')",
- to: "path('M 20 10 Q 40 50 200 3000')"
+ from: 'path("M 20 10 Q 32 42 120 2200")',
+ to: 'path("M 20 10 Q 40 50 200 3000")'
}, [
- {at: -1, expect: "path('M 20 10 Q 24 34 40 1400')"},
- {at: 0, expect: "path('M 20 10 Q 32 42 120 2200')"},
- {at: 0.125, expect: "path('M 20 10 Q 33 43 130 2300')"},
- {at: 0.875, expect: "path('M 20 10 Q 39 49 190 2900')"},
- {at: 1, expect: "path('M 20 10 Q 40 50 200 3000')"},
- {at: 2, expect: "path('M 20 10 Q 48 58 280 3800')"}
+ {at: -1, expect: 'path("M 20 10 Q 24 34 40 1400")'},
+ {at: 0, expect: 'path("M 20 10 Q 32 42 120 2200")'},
+ {at: 0.125, expect: 'path("M 20 10 Q 33 43 130 2300")'},
+ {at: 0.875, expect: 'path("M 20 10 Q 39 49 190 2900")'},
+ {at: 1, expect: 'path("M 20 10 Q 40 50 200 3000")'},
+ {at: 2, expect: 'path("M 20 10 Q 48 58 280 3800")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 20 10 q 12 32 100 2190')",
- to: "path('m 20 10 q 20 40 180 2990')"
+ from: 'path("m 20 10 q 12 32 100 2190")',
+ to: 'path("m 20 10 q 20 40 180 2990")'
}, [
- {at: -1, expect: "path('M 20 10 Q 24 34 40 1400')"},
- {at: 0, expect: "path('M 20 10 Q 32 42 120 2200')"},
- {at: 0.125, expect: "path('M 20 10 Q 33 43 130 2300')"},
- {at: 0.875, expect: "path('M 20 10 Q 39 49 190 2900')"},
- {at: 1, expect: "path('M 20 10 Q 40 50 200 3000')"},
- {at: 2, expect: "path('M 20 10 Q 48 58 280 3800')"}
+ {at: -1, expect: 'path("M 20 10 Q 24 34 40 1400")'},
+ {at: 0, expect: 'path("M 20 10 Q 32 42 120 2200")'},
+ {at: 0.125, expect: 'path("M 20 10 Q 33 43 130 2300")'},
+ {at: 0.875, expect: 'path("M 20 10 Q 39 49 190 2900")'},
+ {at: 1, expect: 'path("M 20 10 Q 40 50 200 3000")'},
+ {at: 2, expect: 'path("M 20 10 Q 48 58 280 3800")'}
]);
test_interpolation({
property: 'd',
- from: "path('M 100 400 A 10 20 30 1 0 140 450')",
- to: "path('M 300 200 A 50 60 70 0 1 380 290')"
+ from: 'path("M 100 400 A 10 20 30 1 0 140 450")',
+ to: 'path("M 300 200 A 50 60 70 0 1 380 290")'
}, [
- {at: -1, expect: "path('M -100 600 A -30 -20 -10 1 0 -100 610')"},
- {at: 0, expect: "path('M 100 400 A 10 20 30 1 0 140 450')"},
- {at: 0.125, expect: "path('M 125 375 A 15 25 35 1 0 170 430')"},
- {at: 0.875, expect: "path('M 275 225 A 45 55 65 0 1 350 310')"},
- {at: 1, expect: "path('M 300 200 A 50 60 70 0 1 380 290')"},
- {at: 2, expect: "path('M 500 0 A 90 100 110 0 1 620 130')"}
+ {at: -1, expect: 'path("M -100 600 A -30 -20 -10 1 0 -100 610")'},
+ {at: 0, expect: 'path("M 100 400 A 10 20 30 1 0 140 450")'},
+ {at: 0.125, expect: 'path("M 125 375 A 15 25 35 1 0 170 430")'},
+ {at: 0.875, expect: 'path("M 275 225 A 45 55 65 0 1 350 310")'},
+ {at: 1, expect: 'path("M 300 200 A 50 60 70 0 1 380 290")'},
+ {at: 2, expect: 'path("M 500 0 A 90 100 110 0 1 620 130")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 100 400 a 10 20 30 1 0 40 50')",
- to: "path('m 300 200 a 50 60 70 0 1 80 90')"
+ from: 'path("m 100 400 a 10 20 30 1 0 40 50")',
+ to: 'path("m 300 200 a 50 60 70 0 1 80 90")'
}, [
- {at: -1, expect: "path('M -100 600 A -30 -20 -10 1 0 -100 610')"},
- {at: 0, expect: "path('M 100 400 A 10 20 30 1 0 140 450')"},
- {at: 0.125, expect: "path('M 125 375 A 15 25 35 1 0 170 430')"},
- {at: 0.875, expect: "path('M 275 225 A 45 55 65 0 1 350 310')"},
- {at: 1, expect: "path('M 300 200 A 50 60 70 0 1 380 290')"},
- {at: 2, expect: "path('M 500 0 A 90 100 110 0 1 620 130')"}
+ {at: -1, expect: 'path("M -100 600 A -30 -20 -10 1 0 -100 610")'},
+ {at: 0, expect: 'path("M 100 400 A 10 20 30 1 0 140 450")'},
+ {at: 0.125, expect: 'path("M 125 375 A 15 25 35 1 0 170 430")'},
+ {at: 0.875, expect: 'path("M 275 225 A 45 55 65 0 1 350 310")'},
+ {at: 1, expect: 'path("M 300 200 A 50 60 70 0 1 380 290")'},
+ {at: 2, expect: 'path("M 500 0 A 90 100 110 0 1 620 130")'}
]);
test_interpolation({
property: 'd',
- from: "path('M 50 60 H 70')",
- to: "path('M 10 140 H 270')"
+ from: 'path("M 50 60 H 70")',
+ to: 'path("M 10 140 H 270")'
}, [
- {at: -1, expect: "path('M 90 -20 H -130')"},
- {at: 0, expect: "path('M 50 60 H 70')"},
- {at: 0.125, expect: "path('M 45 70 H 95')"},
- {at: 0.875, expect: "path('M 15 130 H 245')"},
- {at: 1, expect: "path('M 10 140 H 270')"},
- {at: 2, expect: "path('M -30 220 H 470')"}
+ {at: -1, expect: 'path("M 90 -20 H -130")'},
+ {at: 0, expect: 'path("M 50 60 H 70")'},
+ {at: 0.125, expect: 'path("M 45 70 H 95")'},
+ {at: 0.875, expect: 'path("M 15 130 H 245")'},
+ {at: 1, expect: 'path("M 10 140 H 270")'},
+ {at: 2, expect: 'path("M -30 220 H 470")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 50 60 h 20')",
- to: "path('m 10 140 h 260')"
+ from: 'path("m 50 60 h 20")',
+ to: 'path("m 10 140 h 260")'
}, [
- {at: -1, expect: "path('M 90 -20 H -130')"},
- {at: 0, expect: "path('M 50 60 H 70')"},
- {at: 0.125, expect: "path('M 45 70 H 95')"},
- {at: 0.875, expect: "path('M 15 130 H 245')"},
- {at: 1, expect: "path('M 10 140 H 270')"},
- {at: 2, expect: "path('M -30 220 H 470')"}
+ {at: -1, expect: 'path("M 90 -20 H -130")'},
+ {at: 0, expect: 'path("M 50 60 H 70")'},
+ {at: 0.125, expect: 'path("M 45 70 H 95")'},
+ {at: 0.875, expect: 'path("M 15 130 H 245")'},
+ {at: 1, expect: 'path("M 10 140 H 270")'},
+ {at: 2, expect: 'path("M -30 220 H 470")'}
]);
test_interpolation({
property: 'd',
- from: "path('M 50 60 V 70')",
- to: "path('M 10 140 V 270')"
+ from: 'path("M 50 60 V 70")',
+ to: 'path("M 10 140 V 270")'
}, [
- {at: -1, expect: "path('M 90 -20 V -130')"},
- {at: 0, expect: "path('M 50 60 V 70')"},
- {at: 0.125, expect: "path('M 45 70 V 95')"},
- {at: 0.875, expect: "path('M 15 130 V 245')"},
- {at: 1, expect: "path('M 10 140 V 270')"},
- {at: 2, expect: "path('M -30 220 V 470')"}
+ {at: -1, expect: 'path("M 90 -20 V -130")'},
+ {at: 0, expect: 'path("M 50 60 V 70")'},
+ {at: 0.125, expect: 'path("M 45 70 V 95")'},
+ {at: 0.875, expect: 'path("M 15 130 V 245")'},
+ {at: 1, expect: 'path("M 10 140 V 270")'},
+ {at: 2, expect: 'path("M -30 220 V 470")'}
]);
test_interpolation({
property: 'd',
- from: "path('m 50 60 v 10')",
- to: "path('m 10 140 v 130')"
+ from: 'path("m 50 60 v 10")',
+ to: 'path("m 10 140 v 130")'
}, [
- {at: -1, expect: "path('M 90 -20 V -130')"},
- {at: 0, expect: "path('M 50 60 V 70')"},
- {at: 0.125, expect: "path('M 45 70 V 95')"},
- {at: 0.875, expect: "path('M 15 130 V 245')"},
- {at: 1, expect: "path('M 10 140 V 270')"},
- {at: 2, expect: "path('M -30 220 V 470')"}
+ {at: -1, expect: 'path("M 90 -20 V -130")'},
+ {at: 0, expect: 'path("M 50 60 V 70")'},
+ {at: 0.125, expect: 'path("M 45 70 V 95")'},
+ {at: 0.875, expect: 'path("M 15 130 V 245")'},
+ {at: 1, expect: 'path("M 10 140 V 270")'},
+ {at: 2, expect: 'path("M -30 220 V 470")'}
]);
test_interpolation({
property: 'd',
- from: "path('M 12 34 S 45 67 89 123')",
- to: "path('M 20 26 S 61 51 113 99')"
+ from: 'path("M 12 34 S 45 67 89 123")',
+ to: 'path("M 20 26 S 61 51 113 99")'
}, [
- {at: -1, expect: "path('M 4 42 S 29 83 65 147')"},
- {at: 0, expect: "path('M 12 34 S 45 67 89 123')"},
- {at: 0.125, expect: "path('M 13 33 S 47 65 92 120')"},
- {at: 0.875, expect: "path('M 19 27 S 59 53 110 102')"},
- {at: 1, expect: "path('M 20 26 S 61 51 113 99')"},
- {at: 2, expect: "path('M 28 18 S 77 35 137 75')"},
+ {at: -1, expect: 'path("M 4 42 S 29 83 65 147")'},
+ {at: 0, expect: 'path("M 12 34 S 45 67 89 123")'},
+ {at: 0.125, expect: 'path("M 13 33 S 47 65 92 120")'},
+ {at: 0.875, expect: 'path("M 19 27 S 59 53 110 102")'},
+ {at: 1, expect: 'path("M 20 26 S 61 51 113 99")'},
+ {at: 2, expect: 'path("M 28 18 S 77 35 137 75")'},
]);
test_interpolation({
property: 'd',
- from: "path('m 12 34 s 33 33 77 89')",
- to: "path('m 20 26 s 41 25 93 73')"
+ from: 'path("m 12 34 s 33 33 77 89")',
+ to: 'path("m 20 26 s 41 25 93 73")'
}, [
- {at: -1, expect: "path('M 4 42 S 29 83 65 147')"},
- {at: 0, expect: "path('M 12 34 S 45 67 89 123')"},
- {at: 0.125, expect: "path('M 13 33 S 47 65 92 120')"},
- {at: 0.875, expect: "path('M 19 27 S 59 53 110 102')"},
- {at: 1, expect: "path('M 20 26 S 61 51 113 99')"},
- {at: 2, expect: "path('M 28 18 S 77 35 137 75')"},
+ {at: -1, expect: 'path("M 4 42 S 29 83 65 147")'},
+ {at: 0, expect: 'path("M 12 34 S 45 67 89 123")'},
+ {at: 0.125, expect: 'path("M 13 33 S 47 65 92 120")'},
+ {at: 0.875, expect: 'path("M 19 27 S 59 53 110 102")'},
+ {at: 1, expect: 'path("M 20 26 S 61 51 113 99")'},
+ {at: 2, expect: 'path("M 28 18 S 77 35 137 75")'},
]);
test_interpolation({
property: 'd',
- from: "path('M 12 34 T 45 67')",
- to: "path('M 20 26 T 61 51')"
+ from: 'path("M 12 34 T 45 67")',
+ to: 'path("M 20 26 T 61 51")'
}, [
- {at: -1, expect: "path('M 4 42 T 29 83')"},
- {at: 0, expect: "path('M 12 34 T 45 67')"},
- {at: 0.125, expect: "path('M 13 33 T 47 65')"},
- {at: 0.875, expect: "path('M 19 27 T 59 53')"},
- {at: 1, expect: "path('M 20 26 T 61 51')"},
- {at: 2, expect: "path('M 28 18 T 77 35')"},
+ {at: -1, expect: 'path("M 4 42 T 29 83")'},
+ {at: 0, expect: 'path("M 12 34 T 45 67")'},
+ {at: 0.125, expect: 'path("M 13 33 T 47 65")'},
+ {at: 0.875, expect: 'path("M 19 27 T 59 53")'},
+ {at: 1, expect: 'path("M 20 26 T 61 51")'},
+ {at: 2, expect: 'path("M 28 18 T 77 35")'},
]);
test_interpolation({
property: 'd',
- from: "path('m 12 34 t 33 33')",
- to: "path('m 20 26 t 41 25')"
+ from: 'path("m 12 34 t 33 33")',
+ to: 'path("m 20 26 t 41 25")'
}, [
- {at: -1, expect: "path('M 4 42 T 29 83')"},
- {at: 0, expect: "path('M 12 34 T 45 67')"},
- {at: 0.125, expect: "path('M 13 33 T 47 65')"},
- {at: 0.875, expect: "path('M 19 27 T 59 53')"},
- {at: 1, expect: "path('M 20 26 T 61 51')"},
- {at: 2, expect: "path('M 28 18 T 77 35')"},
+ {at: -1, expect: 'path("M 4 42 T 29 83")'},
+ {at: 0, expect: 'path("M 12 34 T 45 67")'},
+ {at: 0.125, expect: 'path("M 13 33 T 47 65")'},
+ {at: 0.875, expect: 'path("M 19 27 T 59 53")'},
+ {at: 1, expect: 'path("M 20 26 T 61 51")'},
+ {at: 2, expect: 'path("M 28 18 T 77 35")'},
]);
]]></script>
</svg>
diff --git a/tests/wpt/web-platform-tests/svg/path/property/getComputedStyle.svg b/tests/wpt/web-platform-tests/svg/path/property/getComputedStyle.svg
index af30862781a..5830191931f 100644
--- a/tests/wpt/web-platform-tests/svg/path/property/getComputedStyle.svg
+++ b/tests/wpt/web-platform-tests/svg/path/property/getComputedStyle.svg
@@ -39,14 +39,14 @@
var p6 = document.getElementById('p6');
var p7 = document.getElementById('p7');
- assert_equals(getComputedStyle(g0).d, "none");
- assert_equals(getComputedStyle(p1).d, "none");
- assert_equals(getComputedStyle(p2).d, "path('M 10 2 H 20')");
- assert_equals(getComputedStyle(p3).d, "path('M 10 3 H 30')");
- assert_equals(getComputedStyle(p4).d, "path('M 10 4 H 40')");
- assert_equals(getComputedStyle(g5).d, "path('M 10 5 H 50')");
- assert_equals(getComputedStyle(p6).d, "path('M 10 5 H 50')");
- assert_equals(getComputedStyle(p7).d, "none");
+ assert_equals(getComputedStyle(g0).d, 'none');
+ assert_equals(getComputedStyle(p1).d, 'none');
+ assert_equals(getComputedStyle(p2).d, 'path("M 10 2 H 20")');
+ assert_equals(getComputedStyle(p3).d, 'path("M 10 3 H 30")');
+ assert_equals(getComputedStyle(p4).d, 'path("M 10 4 H 40")');
+ assert_equals(getComputedStyle(g5).d, 'path("M 10 5 H 50")');
+ assert_equals(getComputedStyle(p6).d, 'path("M 10 5 H 50")');
+ assert_equals(getComputedStyle(p7).d, 'none');
});
]]></script>
</svg>
diff --git a/tests/wpt/web-platform-tests/tools/ci/check_stability.py b/tests/wpt/web-platform-tests/tools/ci/check_stability.py
index 3235cee5ac6..2b32eb50c0f 100644
--- a/tests/wpt/web-platform-tests/tools/ci/check_stability.py
+++ b/tests/wpt/web-platform-tests/tools/ci/check_stability.py
@@ -20,7 +20,7 @@ from tools.wpt import markdown
from tools import localpaths # noqa: F401
logger = None
-run_step, write_inconsistent, write_results = None, None, None
+run_step, write_inconsistent, write_slow_tests, write_results = None, None, None, None
wptrunner = None
def setup_logging():
@@ -35,9 +35,9 @@ def setup_logging():
def do_delayed_imports():
- global wptrunner, run_step, write_inconsistent, write_results
+ global wptrunner, run_step, write_inconsistent, write_slow_tests, write_results
from wptrunner import wptrunner
- from wptrunner.stability import run_step, write_inconsistent, write_results
+ from wptrunner.stability import run_step, write_inconsistent, write_slow_tests, write_results
class TravisFold(object):
@@ -266,8 +266,7 @@ def run(venv, wpt_args, **kwargs):
do_delayed_imports()
wpt_kwargs["prompt"] = False
- wpt_kwargs["install_browser"] = True
- wpt_kwargs["install"] = wpt_kwargs["product"].split(":")[0] == "firefox"
+ wpt_kwargs["install_browser"] = wpt_kwargs["product"].split(":")[0] == "firefox"
wpt_kwargs["pause_after_test"] = False
wpt_kwargs["verify_log_full"] = False
@@ -283,12 +282,15 @@ def run(venv, wpt_args, **kwargs):
logger.info("Starting tests")
wpt_logger = wptrunner.logger
- results, inconsistent, iterations = run_step(wpt_logger, wpt_kwargs["repeat"], True, {}, **wpt_kwargs)
+ results, inconsistent, slow, iterations = run_step(wpt_logger, wpt_kwargs["repeat"], True, {}, **wpt_kwargs)
if results:
if inconsistent:
write_inconsistent(logger.error, inconsistent, iterations)
retcode = 2
+ elif slow:
+ write_slow_tests(logger.error, slow)
+ retcode = 2
else:
logger.info("All results were stable\n")
with TravisFold("full_results"):
diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_resources_unittest.sh b/tests/wpt/web-platform-tests/tools/ci/ci_resources_unittest.sh
index 78868b93433..a13c60fbd8c 100755
--- a/tests/wpt/web-platform-tests/tools/ci/ci_resources_unittest.sh
+++ b/tests/wpt/web-platform-tests/tools/ci/ci_resources_unittest.sh
@@ -17,7 +17,7 @@ main() {
export PATH=$HOME/firefox:$PATH
cd $WPT_ROOT/resources/test
- tox -- --binary=$HOME/browsers/firefox/firefox
+ tox -- --binary=$HOME/browsers/nightly/firefox/firefox
}
main
diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_taskcluster.sh b/tests/wpt/web-platform-tests/tools/ci/ci_taskcluster.sh
index 118243881a9..901ae520c7f 100755
--- a/tests/wpt/web-platform-tests/tools/ci/ci_taskcluster.sh
+++ b/tests/wpt/web-platform-tests/tools/ci/ci_taskcluster.sh
@@ -1,10 +1,12 @@
#!/bin/bash
+set -ex
-./wpt manifest-download
+# This is allowed to fail
+./wpt manifest-download || echo
if [ $1 == "firefox" ]; then
- ./wpt run firefox --log-tbpl=../artifacts/log_tbpl.log --log-tbpl-level=info --log-wptreport=../artifacts/wpt_report.json --log-mach=- --this-chunk=$3 --total-chunks=$4 --test-type=$2 -y --install-browser --no-pause --no-restart-on-unexpected --reftest-internal --install-fonts --no-fail-on-unexpected
+ ./wpt run firefox --log-tbpl=../artifacts/log_tbpl.log --log-tbpl-level=info --log-wptreport=../artifacts/wpt_report.json --log-mach=- --this-chunk=$4 --total-chunks=$5 --test-type=$3 -y --install-browser --channel=$2 --no-pause --no-restart-on-unexpected --reftest-internal --install-fonts --no-fail-on-unexpected
elif [ $1 == "chrome" ]; then
- ./wpt run chrome --log-tbpl=../artifacts/log_tbpl.log --log-tbpl-level=info --log-wptreport=../artifacts/wpt_report.json --log-mach=- --this-chunk=$3 --total-chunks=$4 --test-type=$2 -y --no-pause --no-restart-on-unexpected --install-fonts --no-fail-on-unexpected
+ ./wpt run chrome --log-tbpl=../artifacts/log_tbpl.log --log-tbpl-level=info --log-wptreport=../artifacts/wpt_report.json --log-mach=- --channel=$2 --this-chunk=$4 --total-chunks=$5 --test-type=$3 -y --no-pause --no-restart-on-unexpected --install-fonts --no-fail-on-unexpected
fi
gzip ../artifacts/wpt_report.json
diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_wptrunner_infrastructure.sh b/tests/wpt/web-platform-tests/tools/ci/ci_wptrunner_infrastructure.sh
index d6d6803974f..c32c9438703 100755
--- a/tests/wpt/web-platform-tests/tools/ci/ci_wptrunner_infrastructure.sh
+++ b/tests/wpt/web-platform-tests/tools/ci/ci_wptrunner_infrastructure.sh
@@ -18,14 +18,14 @@ test_infrastructure() {
}
main() {
- PRODUCTS=( "firefox" "chrome" )
+ PRODUCTS=( "firefox" "chrome" "chrome_webdriver" )
for PRODUCT in "${PRODUCTS[@]}"; do
if [ "$PRODUCT" != "firefox" ]; then
# Firefox is expected to work using pref settings for DNS
# Don't adjust the hostnames in that case to ensure this keeps working
hosts_fixup
fi
- if [ "$PRODUCT" == "chrome" ]; then
+ if [[ "$PRODUCT" == "chrome"* ]]; then
install_chrome unstable
test_infrastructure "--binary=$(which google-chrome-unstable)"
else
diff --git a/tests/wpt/web-platform-tests/tools/ci/commands.json b/tests/wpt/web-platform-tests/tools/ci/commands.json
index 0f8f5823699..361c9e4f3de 100644
--- a/tests/wpt/web-platform-tests/tools/ci/commands.json
+++ b/tests/wpt/web-platform-tests/tools/ci/commands.json
@@ -1,7 +1,42 @@
{
- "test-jobs": {"path": "jobs.py", "script": "run", "parser": "create_parser", "help": "List test jobs that should run for a set of commits",
- "virtualenv": false},
- "check-stability": {"path": "check_stability.py", "script": "run", "parser": "get_parser", "parse_known": true, "help": "Check test stability",
- "virtualenv": true, "install": ["requests"], "requirements": ["../wptrunner/requirements.txt"]},
- "make-hosts-file": {"path": "make_hosts_file.py", "script": "run", "parser": "create_parser", "help": "Output a hosts file to stdout", "virtualenv": false}
+ "test-jobs": {
+ "path": "jobs.py",
+ "script": "run",
+ "parser": "create_parser",
+ "help": "List test jobs that should run for a set of commits",
+ "virtualenv": false
+ },
+ "check-stability": {
+ "path": "check_stability.py",
+ "script": "run",
+ "parser": "get_parser",
+ "parse_known": true,
+ "help": "Check test stability",
+ "virtualenv": true,
+ "install": [
+ "requests"
+ ],
+ "requirements": [
+ "../wptrunner/requirements.txt"
+ ]
+ },
+ "make-hosts-file": {
+ "path": "make_hosts_file.py",
+ "script": "run",
+ "parser": "create_parser",
+ "help": "Output a hosts file to stdout",
+ "virtualenv": false
+ },
+ "tc-download": {
+ "path": "tcdownload.py",
+ "script": "run",
+ "parser": "get_parser",
+ "parse_known": true,
+ "help": "Download logs from taskcluster",
+ "virtualenv": true,
+ "install": [
+ "requests",
+ "pygithub"
+ ]
+ }
}
diff --git a/tests/wpt/web-platform-tests/tools/ci/tcdownload.py b/tests/wpt/web-platform-tests/tools/ci/tcdownload.py
new file mode 100644
index 00000000000..8813dccc888
--- /dev/null
+++ b/tests/wpt/web-platform-tests/tools/ci/tcdownload.py
@@ -0,0 +1,95 @@
+import argparse
+import os
+import logging
+
+import requests
+
+import github
+
+
+logging.basicConfig()
+logger = logging.getLogger("tc-download")
+
+
+def get_parser():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--ref", action="store", default="master",
+ help="Branch (in the GitHub repository) or commit to fetch logs for")
+ parser.add_argument("--artifact-name", action="store", default="wpt_report.json.gz",
+ help="Log type to fetch")
+ parser.add_argument("--repo-name", action="store", default="web-platform-tests/wpt",
+ help="GitHub repo name in the format owner/repo. "
+ "This must be the repo from which the TaskCluster run was scheduled "
+ "(for PRs this is the repo into which the PR would merge)")
+ parser.add_argument("--token-file", action="store",
+ help="File containing GitHub token")
+ parser.add_argument("--out-dir", action="store", default=".",
+ help="Path to save the logfiles")
+ return parser
+
+
+def get_json(url, key=None):
+ resp = requests.get(url)
+ resp.raise_for_status()
+ data = resp.json()
+ if key:
+ data = data[key]
+ return data
+
+
+def get(url, dest, name):
+ resp = requests.get(url)
+ resp.raise_for_status()
+ path = os.path.join(dest, name)
+ with open(path, "w") as f:
+ f.write(resp.content)
+ return path
+
+
+def run(*args, **kwargs):
+ if not os.path.exists(kwargs["out_dir"]):
+ os.mkdir(kwargs["out_dir"])
+
+ if kwargs["token_file"]:
+ with open(kwargs["token_file"]) as f:
+ gh = github.Github(f.read().strip())
+ else:
+ gh = github.Github()
+
+ repo = gh.get_repo(kwargs["repo_name"])
+ commit = repo.get_commit(kwargs["ref"])
+ statuses = commit.get_statuses()
+ taskgroups = set()
+
+ for status in statuses:
+ if not status.context.startswith("Taskcluster "):
+ continue
+ if status.state == "pending":
+ continue
+ taskgroup_id = status.target_url.rsplit("/", 1)[1]
+ taskgroups.add(taskgroup_id)
+
+ if not taskgroups:
+ logger.error("No complete TaskCluster runs found for ref %s" % kwargs["ref"])
+ return
+
+ for taskgroup in taskgroups:
+ taskgroup_url = "https://queue.taskcluster.net/v1/task-group/%s/list"
+ artifacts_list_url = "https://queue.taskcluster.net/v1/task/%s/artifacts"
+ tasks = get_json(taskgroup_url % taskgroup, "tasks")
+ for task in tasks:
+ task_id = task["status"]["taskId"]
+ url = artifacts_list_url % (task_id,)
+ for artifact in get_json(url, "artifacts"):
+ if artifact["name"].endswith(kwargs["artifact_name"]):
+ filename = "%s-%s-%s" % (task["task"]["metadata"]["name"],
+ task_id,
+ kwargs["artifact_name"])
+ path = get("%s/%s" % (url, artifact["name"]), kwargs["out_dir"], filename)
+ logger.info(path)
+
+
+def __main__():
+ kwargs = get_parser().parse_args()
+
+ run(None, vars(kwargs))
diff --git a/tests/wpt/web-platform-tests/tools/docker/start.sh b/tests/wpt/web-platform-tests/tools/docker/start.sh
index 3325bb24f58..c2fd91d96d4 100755
--- a/tests/wpt/web-platform-tests/tools/docker/start.sh
+++ b/tests/wpt/web-platform-tests/tools/docker/start.sh
@@ -15,6 +15,7 @@ REMOTE=${1:-https://github.com/web-platform-tests/wpt}
BRANCH=${2:-master}
REV=${3:-FETCH_HEAD}
BROWSER=${4:-all}
+CHANNEL=${5:-nightly}
cd ~
@@ -32,10 +33,22 @@ git checkout -b build ${REV}
sudo sh -c './wpt make-hosts-file >> /etc/hosts'
-if [[ $BROWSER == "chrome"* ]] || [[ "$BROWSER" == all ]]
+if [[ $BROWSER == "chrome" ]] || [[ "$BROWSER" == all ]]
then
# Install Chrome dev
- deb_archive=google-chrome-unstable_current_amd64.deb
+ if [[ "$CHANNEL" == "dev" ]] || [[ "$CHANNEL" == "nightly" ]]
+ then
+ deb_archive=google-chrome-unstable_current_amd64.deb
+ elif [[ "$CHANNEL" == "beta" ]]
+ then
+ deb_archive=google-chrome-beta_current_amd64.deb
+ elif [[ "$CHANNEL" == "stable" ]]
+ then
+ deb_archive=google-chrome-stable_current_amd64.deb
+ else
+ echo Unrecognized release channel: $CHANNEL >&2
+ exit 1
+ fi
wget https://dl.google.com/linux/direct/$deb_archive
sudo apt-get -qqy update && sudo gdebi -n $deb_archive
diff --git a/tests/wpt/web-platform-tests/tools/lint/lint.py b/tests/wpt/web-platform-tests/tools/lint/lint.py
index 3f43b373abe..cf668faea6f 100644
--- a/tests/wpt/web-platform-tests/tools/lint/lint.py
+++ b/tests/wpt/web-platform-tests/tools/lint/lint.py
@@ -216,7 +216,8 @@ def check_css_globally_unique(repo_root, paths):
elif source_file.name_is_reference:
ref_files[source_file.name].add(path)
else:
- test_files[source_file.name].add(path)
+ name = source_file.name.replace('-manual', '')
+ test_files[name].add(path)
errors = []
diff --git a/tests/wpt/web-platform-tests/tools/manifest/item.py b/tests/wpt/web-platform-tests/tools/manifest/item.py
index 61919fcc31e..ddf046a68fa 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/item.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/item.py
@@ -234,7 +234,7 @@ class Stub(URLManifestItem):
item_type = "stub"
-class WebdriverSpecTest(URLManifestItem):
+class WebDriverSpecTest(URLManifestItem):
item_type = "wdspec"
def __init__(self, source_file, url, url_base="/", timeout=None, manifest=None):
diff --git a/tests/wpt/web-platform-tests/tools/manifest/manifest.py b/tests/wpt/web-platform-tests/tools/manifest/manifest.py
index 42a8e1ceb23..9b2f0a18a56 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/manifest.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/manifest.py
@@ -4,7 +4,7 @@ import os
from collections import defaultdict
from six import iteritems, itervalues, viewkeys, string_types
-from .item import ManualTest, WebdriverSpecTest, Stub, RefTestNode, RefTest, TestharnessTest, SupportFile, ConformanceCheckerTest, VisualTest
+from .item import ManualTest, WebDriverSpecTest, Stub, RefTestNode, RefTest, TestharnessTest, SupportFile, ConformanceCheckerTest, VisualTest
from .log import get_logger
from .utils import from_os_path, to_os_path
@@ -193,7 +193,7 @@ class Manifest(object):
"reftest_node": RefTestNode,
"manual": ManualTest,
"stub": Stub,
- "wdspec": WebdriverSpecTest,
+ "wdspec": WebDriverSpecTest,
"conformancechecker": ConformanceCheckerTest,
"visual": VisualTest,
"support": SupportFile}
diff --git a/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py b/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py
index 133f8b59828..9be0d8966ec 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py
@@ -12,7 +12,7 @@ except ImportError:
import html5lib
from . import XMLParser
-from .item import Stub, ManualTest, WebdriverSpecTest, RefTestNode, TestharnessTest, SupportFile, ConformanceCheckerTest, VisualTest
+from .item import Stub, ManualTest, WebDriverSpecTest, RefTestNode, TestharnessTest, SupportFile, ConformanceCheckerTest, VisualTest
from .utils import rel_path_to_url, ContextManagerBytesIO, cached_property
wd_pattern = "*.py"
@@ -645,7 +645,7 @@ class SourceFile(object):
rv = TestharnessTest.item_type, tests
elif self.name_is_webdriver:
- rv = WebdriverSpecTest.item_type, [WebdriverSpecTest(self, self.url,
+ rv = WebDriverSpecTest.item_type, [WebDriverSpecTest(self, self.url,
timeout=self.timeout)]
elif self.content_is_css_manual and not self.name_is_reference:
diff --git a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py
index 8bf7ef96c5f..f1241e04406 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py
@@ -43,7 +43,7 @@ def rel_dir_file_path(draw):
@hs.composite
def sourcefile_strategy(draw):
item_classes = [item.TestharnessTest, item.RefTest, item.RefTestNode,
- item.ManualTest, item.Stub, item.WebdriverSpecTest,
+ item.ManualTest, item.Stub, item.WebDriverSpecTest,
item.ConformanceCheckerTest, item.SupportFile]
cls = draw(hs.sampled_from(item_classes))
diff --git a/tests/wpt/web-platform-tests/tools/serve/serve.py b/tests/wpt/web-platform-tests/tools/serve/serve.py
index 97a5063c1b9..e66d38b3dae 100644
--- a/tests/wpt/web-platform-tests/tools/serve/serve.py
+++ b/tests/wpt/web-platform-tests/tools/serve/serve.py
@@ -100,9 +100,12 @@ class WrapperHandler(object):
:param request: The Request being processed.
"""
path = self._get_path(filesystem_path(self.base_path, request, self.url_base), False)
- with open(path, "rb") as f:
- for key, value in read_script_metadata(f, js_meta_re):
- yield key, value
+ try:
+ with open(path, "rb") as f:
+ for key, value in read_script_metadata(f, js_meta_re):
+ yield key, value
+ except IOError:
+ raise HTTPException(404)
def _get_meta(self, request):
"""Get an iterator over strings to inject into the wrapper document
@@ -378,15 +381,17 @@ def build_routes(aliases):
class ServerProc(object):
- def __init__(self):
+ def __init__(self, scheme=None):
self.proc = None
self.daemon = None
self.stop = Event()
+ self.scheme = scheme
def start(self, init_func, host, port, paths, routes, bind_address, config, **kwargs):
self.proc = Process(target=self.create_daemon,
args=(init_func, host, port, paths, routes, bind_address,
config),
+ name='%s on port %s' % (self.scheme, port),
kwargs=kwargs)
self.proc.daemon = True
self.proc.start()
@@ -507,7 +512,7 @@ def start_servers(host, ports, paths, routes, bind_address, config, **kwargs):
"ws":start_ws_server,
"wss":start_wss_server}[scheme]
- server_proc = ServerProc()
+ server_proc = ServerProc(scheme=scheme)
server_proc.start(init_func, host, port, paths, routes, bind_address,
config, **kwargs)
servers[scheme].append((port, server_proc))
@@ -828,9 +833,16 @@ def run(**kwargs):
servers = start(config, build_routes(config["aliases"]), **kwargs)
try:
- while any(item.is_alive() for item in iter_procs(servers)):
+ while all(item.is_alive() for item in iter_procs(servers)):
for item in iter_procs(servers):
item.join(1)
+ exited = [item for item in iter_procs(servers) if not item.is_alive()]
+ subject = "subprocess" if len(exited) == 1 else "subprocesses"
+
+ logger.info("%s %s exited:" % (len(exited), subject))
+
+ for item in iter_procs(servers):
+ logger.info("Status of %s:\t%s" % (item.name, "running" if item.is_alive() else "not running"))
except KeyboardInterrupt:
logger.info("Shutting down")
diff --git a/tests/wpt/web-platform-tests/tools/serve/test_functional.py b/tests/wpt/web-platform-tests/tools/serve/test_functional.py
new file mode 100644
index 00000000000..87268ffc00d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/tools/serve/test_functional.py
@@ -0,0 +1,77 @@
+try:
+ from importlib import reload
+except ImportError:
+ pass
+import json
+import os
+try:
+ import Queue as queue
+except ImportError:
+ import queue
+import tempfile
+import threading
+
+import pytest
+
+from . import serve
+from wptserve import logger
+
+
+class ServerProcSpy(serve.ServerProc):
+ instances = None
+
+ def start(self, *args, **kwargs):
+ result = super(ServerProcSpy, self).start(*args, **kwargs)
+
+ if ServerProcSpy.instances is not None:
+ ServerProcSpy.instances.put(self)
+
+ return result
+
+serve.ServerProc = ServerProcSpy
+
+@pytest.fixture()
+def server_subprocesses():
+ ServerProcSpy.instances = queue.Queue()
+ yield ServerProcSpy.instances
+ ServerProcSpy.instances = None
+
+@pytest.fixture()
+def tempfile_name():
+ name = tempfile.mkstemp()[1]
+ yield name
+ os.remove(name)
+
+
+def test_subprocess_exit(server_subprocesses, tempfile_name):
+ timeout = 30
+
+ def target():
+ # By default, the server initially creates a child process to validate
+ # local system configuration. That process is unrelated to the behavior
+ # under test, but at the time of this writing, the parent uses the same
+ # constructor that is also used to create the long-running processes
+ # which are relevant to this functionality. Disable the check so that
+ # the constructor is only used to create relevant processes.
+ with open(tempfile_name, 'w') as handle:
+ json.dump({"check_subdomains": False}, handle)
+
+ # The `logger` module from the wptserver package uses a singleton
+ # pattern which resists testing. In order to avoid conflicting with
+ # other tests which rely on that module, pre-existing state is
+ # discarded through an explicit "reload" operation.
+ reload(logger)
+
+ serve.run(config_path=tempfile_name)
+
+ thread = threading.Thread(target=target)
+
+ thread.start()
+
+ server_subprocesses.get(True, timeout)
+ subprocess = server_subprocesses.get(True, timeout)
+ subprocess.kill()
+
+ thread.join(timeout)
+
+ assert not thread.is_alive()
diff --git a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py
index b2337ff3b38..23ffc40b31f 100644
--- a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py
+++ b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py
@@ -6,8 +6,10 @@ class WebDriverException(Exception):
http_status = None
status_code = None
- def __init__(self, message=None, stacktrace=None):
+ def __init__(self, http_status=None, status_code=None, message=None, stacktrace=None):
super(WebDriverException, self)
+ self.http_status = http_status
+ self.status_code = status_code
self.message = message
self.stacktrace = stacktrace
@@ -113,7 +115,7 @@ class NoSuchWindowException(WebDriverException):
class ScriptTimeoutException(WebDriverException):
- http_status = 408
+ http_status = 500
status_code = "script timeout"
@@ -128,7 +130,7 @@ class StaleElementReferenceException(WebDriverException):
class TimeoutException(WebDriverException):
- http_status = 408
+ http_status = 500
status_code = "timeout"
@@ -171,6 +173,8 @@ def from_response(response):
"""
if response.status == 200:
raise UnknownErrorException(
+ response.status,
+ None,
"Response is not an error:\n"
"%s" % json.dumps(response.body))
@@ -178,6 +182,8 @@ def from_response(response):
value = response.body["value"]
else:
raise UnknownErrorException(
+ response.status,
+ None,
"Expected 'value' key in response body:\n"
"%s" % json.dumps(response.body))
@@ -187,7 +193,7 @@ def from_response(response):
stack = value["stacktrace"] or None
cls = get(code)
- return cls(message, stacktrace=stack)
+ return cls(response.status, code, message, stacktrace=stack)
def get(error_code):
diff --git a/tests/wpt/web-platform-tests/tools/wpt/browser.py b/tests/wpt/web-platform-tests/tools/wpt/browser.py
index 9834e5d53f3..7b943c2e73c 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/browser.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/browser.py
@@ -26,12 +26,12 @@ class Browser(object):
return NotImplemented
@abstractmethod
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
"""Install the WebDriver implementation for this browser."""
return NotImplemented
@abstractmethod
- def find_binary(self):
+ def find_binary(self, venv_path=None, channel=None):
"""Find the binary of the browser.
If the WebDriver for the browser is able to find the binary itself, this
@@ -84,9 +84,27 @@ class Firefox(Browser):
return "%s%s" % (platform, bits)
- def install(self, dest=None):
+ def install(self, dest=None, channel="nightly"):
"""Install Firefox."""
+ branch = {
+ "nightly": "mozilla-central",
+ "beta": "mozilla-beta",
+ "stable": "mozilla-stable"
+ }
+ scraper = {
+ "nightly": "daily",
+ "beta": "release",
+ "stable": "release"
+ }
+ version = {
+ "stable": "latest",
+ "beta": "latest-beta",
+ "nightly": "latest"
+ }
+ if channel not in branch:
+ raise ValueError("Unrecognised release channel: %s" % channel)
+
from mozdownload import FactoryScraper
import mozinstall
@@ -103,9 +121,12 @@ class Firefox(Browser):
# os.getcwd() doesn't include the venv path
dest = os.path.join(os.getcwd(), "_venv")
- dest = os.path.join(dest, "browsers")
+ dest = os.path.join(dest, "browsers", channel)
- filename = FactoryScraper("daily", branch="mozilla-central", destination=dest).download()
+ filename = FactoryScraper(scraper[channel],
+ branch=branch[channel],
+ version=version[channel],
+ destination=dest).download()
try:
mozinstall.install(filename, dest)
@@ -146,11 +167,14 @@ class Firefox(Browser):
return binary
- def find_binary(self, venv_path=None):
+ def find_binary(self, venv_path=None, channel=None):
if venv_path is None:
venv_path = os.path.join(os.getcwd(), "_venv")
- binary = self.find_binary_path(os.path.join(venv_path, "browsers"))
+ path = os.path.join(venv_path, "browsers")
+ if channel is not None:
+ path = os.path.join(path, channel)
+ binary = self.find_binary_path(path)
if not binary and uname[0] == "Darwin":
macpaths = ["/Applications/FirefoxNightly.app/Contents/MacOS",
@@ -190,6 +214,18 @@ class Firefox(Browser):
if channel == "stable":
repo = "https://hg.mozilla.org/releases/mozilla-release"
tag = "FIREFOX_%s_RELEASE" % version.replace(".", "_")
+ elif channel == "beta":
+ repo = "https://hg.mozilla.org/releases/mozilla-beta"
+ major_version = version.split(".", 1)[0]
+ # For beta we have a different format for betas that are now in stable releases
+ # vs those that are not
+ tags = get("https://hg.mozilla.org/releases/mozilla-beta/json-tags").json()["tags"]
+ tags = {item["tag"] for item in tags}
+ end_tag = "FIREFOX_BETA_%s_END" % major_version
+ if end_tag in tags:
+ tag = end_tag
+ else:
+ tag = "tip"
else:
repo = "https://hg.mozilla.org/mozilla-central"
if channel == "beta":
@@ -202,8 +238,14 @@ class Firefox(Browser):
return "%s/archive/%s.zip/testing/profiles/" % (repo, tag)
- def install_prefs(self, binary, dest=None):
- version, channel = self.get_version_and_channel(binary)
+ def install_prefs(self, binary, dest=None, channel=None):
+ version, channel_ = self.get_version_and_channel(binary)
+ if channel is not None and channel != channel_:
+ # Beta doesn't always seem to have the b in the version string, so allow the
+ # manually supplied value to override the one from the binary
+ logger.warning("Supplied channel doesn't match binary, using supplied channel")
+ elif channel is None:
+ channel = channel_
if dest is None:
dest = os.pwd
@@ -257,11 +299,18 @@ class Firefox(Browser):
assert latest_release != 0
return "v%s.%s.%s" % tuple(str(item) for item in latest_release)
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
"""Install latest Geckodriver."""
if dest is None:
dest = os.getcwd()
+ if channel == "nightly":
+ path = self.install_geckodriver_nightly(dest)
+ if path is not None:
+ return path
+ else:
+ logger.warning("Nightly webdriver not found; falling back to release")
+
version = self._latest_geckodriver_version()
format = "zip" if uname[0] == "Windows" else "tar.gz"
logger.debug("Latest geckodriver release %s" % version)
@@ -273,9 +322,39 @@ class Firefox(Browser):
untar(get(url).raw, dest=dest)
return find_executable(os.path.join(dest, "geckodriver"))
- def version(self, binary=None):
+ def install_geckodriver_nightly(self, dest):
+ import tarfile
+ import mozdownload
+ logger.info("Attempting to install webdriver from nightly")
+ try:
+ s = mozdownload.DailyScraper(branch="mozilla-central",
+ extension="common.tests.tar.gz",
+ destination=dest)
+ package_path = s.download()
+ except mozdownload.errors.NotFoundError:
+ return
+
+ try:
+ exe_suffix = ".exe" if uname[0] == "Windows" else ""
+ with tarfile.open(package_path, "r") as f:
+ try:
+ member = f.getmember("bin%sgeckodriver%s" % (os.path.sep,
+ exe_suffix))
+ except KeyError:
+ return
+ # Remove bin/ from the path.
+ member.name = os.path.basename(member.name)
+ f.extractall(members=[member], path=dest)
+ path = os.path.join(dest, member.name)
+ logger.info("Extracted geckodriver to %s" % path)
+ finally:
+ os.unlink(package_path)
+
+ return path
+
+ def version(self, binary=None, channel=None):
"""Retrieve the release version of the installed browser."""
- binary = binary or self.find_binary()
+ binary = binary or self.find_binary(channel)
version_string = call(binary, "--version").strip()
m = re.match(r"Mozilla Firefox (.*)", version_string)
if not m:
@@ -289,16 +368,16 @@ class Fennec(Browser):
product = "fennec"
requirements = "requirements_firefox.txt"
- def install(self, dest=None):
+ def install(self, dest=None, channel=None):
raise NotImplementedError
- def find_binary(self, venv_path=None):
+ def find_binary(self, venv_path=None, channel=None):
raise NotImplementedError
def find_webdriver(self):
raise NotImplementedError
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
raise NotImplementedError
def version(self, binary=None):
@@ -324,7 +403,7 @@ class Chrome(Browser):
logger.warn("Unable to find the browser binary.")
return None
- def install(self, dest=None):
+ def install(self, dest=None, channel=None):
raise NotImplementedError
def platform_string(self):
@@ -346,13 +425,13 @@ class Chrome(Browser):
return "%s%s" % (platform, bits)
- def find_binary(self):
+ def find_binary(self, venv_path=None, channel=None):
raise NotImplementedError
def find_webdriver(self):
return find_executable("chromedriver")
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
if dest is None:
dest = os.pwd
latest = get("http://chromedriver.storage.googleapis.com/LATEST_RELEASE").text.strip()
@@ -391,22 +470,28 @@ class ChromeAndroid(Browser):
product = "chrome_android"
requirements = "requirements_chrome_android.txt"
- def install(self, dest=None):
+ def install(self, dest=None, channel=None):
raise NotImplementedError
- def find_binary(self):
+ def find_binary(self, venv_path=None, channel=None):
raise NotImplementedError
def find_webdriver(self):
return find_executable("chromedriver")
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
chrome = Chrome()
- return chrome.install_webdriver(dest)
+ return chrome.install_webdriver(dest, channel)
def version(self, binary):
return None
+class ChromeWebDriver(Chrome):
+ """Chrome-specific interface for chrome without using selenium.
+
+ Includes webdriver installation.
+ """
+ product = "chrome_webdriver"
class Opera(Browser):
"""Opera-specific interface.
@@ -425,7 +510,7 @@ class Opera(Browser):
logger.warn("Unable to find the browser binary.")
return None
- def install(self, dest=None):
+ def install(self, dest=None, channel=None):
raise NotImplementedError
def platform_string(self):
@@ -447,13 +532,13 @@ class Opera(Browser):
return "%s%s" % (platform, bits)
- def find_binary(self):
+ def find_binary(self, venv_path=None, channel=None):
raise NotImplementedError
def find_webdriver(self):
return find_executable("operadriver")
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
if dest is None:
dest = os.pwd
latest = get("https://api.github.com/repos/operasoftware/operachromiumdriver/releases/latest").json()["tag_name"]
@@ -487,38 +572,42 @@ class Edge(Browser):
product = "edge"
requirements = "requirements_edge.txt"
- def install(self, dest=None):
+ def install(self, dest=None, channel=None):
raise NotImplementedError
- def find_binary(self):
+ def find_binary(self, venv_path=None, channel=None):
raise NotImplementedError
def find_webdriver(self):
return find_executable("MicrosoftWebDriver")
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
raise NotImplementedError
def version(self, binary):
return None
+class EdgeWebDriver(Edge):
+ product = "edge_webdriver"
+
+
class InternetExplorer(Browser):
"""Internet Explorer-specific interface."""
product = "ie"
requirements = "requirements_ie.txt"
- def install(self, dest=None):
+ def install(self, dest=None, channel=None):
raise NotImplementedError
- def find_binary(self):
+ def find_binary(self, venv_path=None, channel=None):
raise NotImplementedError
def find_webdriver(self):
return find_executable("IEDriverServer.exe")
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
raise NotImplementedError
def version(self, binary):
@@ -534,22 +623,26 @@ class Safari(Browser):
product = "safari"
requirements = "requirements_safari.txt"
- def install(self, dest=None):
+ def install(self, dest=None, channel=None):
raise NotImplementedError
- def find_binary(self):
+ def find_binary(self, venv_path=None, channel=None):
raise NotImplementedError
def find_webdriver(self):
return find_executable("safaridriver")
- def install_webdriver(self):
+ def install_webdriver(self, dest=None, channel=None):
raise NotImplementedError
def version(self, binary):
return None
+class SafariWebDriver(Safari):
+ product = "safari_webdriver"
+
+
class Servo(Browser):
"""Servo-specific interface."""
@@ -574,8 +667,10 @@ class Servo(Browser):
return (platform, extension, decompress)
- def install(self, dest=None):
+ def install(self, dest=None, channel="nightly"):
"""Install latest Browser Engine."""
+ if channel != "nightly":
+ raise ValueError("Only nightly versions of Servo are available")
if dest is None:
dest = os.pwd
@@ -588,13 +683,16 @@ class Servo(Browser):
os.chmod(path, st.st_mode | stat.S_IEXEC)
return path
- def find_binary(self):
- return find_executable("servo")
+ def find_binary(self, venv_path=None, channel=None):
+ path = find_executable("servo", os.path.join(venv_path, "servo"))
+ if path is None:
+ path = find_executable("servo")
+ return path
def find_webdriver(self):
return None
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
raise NotImplementedError
def version(self, binary):
@@ -609,16 +707,16 @@ class Sauce(Browser):
product = "sauce"
requirements = "requirements_sauce.txt"
- def install(self, dest=None):
+ def install(self, dest=None, channel=None):
raise NotImplementedError
- def find_binary(self):
+ def find_binary(self, venev_path=None, channel=None):
raise NotImplementedError
def find_webdriver(self):
raise NotImplementedError
- def install_webdriver(self, dest=None):
+ def install_webdriver(self, dest=None, channel=None):
raise NotImplementedError
def version(self, binary):
@@ -631,16 +729,16 @@ class WebKit(Browser):
product = "webkit"
requirements = "requirements_webkit.txt"
- def install(self, dest=None):
+ def install(self, dest=None, channel=None):
raise NotImplementedError
- def find_binary(self, path=None):
+ def find_binary(self, venv_path=None, channel=None):
return None
def find_webdriver(self):
return None
- def install_webdriver(self):
+ def install_webdriver(self, dest=None, channel=None):
raise NotImplementedError
def version(self, binary):
diff --git a/tests/wpt/web-platform-tests/tools/wpt/install.py b/tests/wpt/web-platform-tests/tools/wpt/install.py
index d779651c990..62c833aa3f0 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/install.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/install.py
@@ -2,20 +2,62 @@ import argparse
import browser
import sys
+
+latest_channels = {
+ 'firefox': 'nightly',
+ 'chrome': 'dev',
+ 'servo': 'nightly'
+}
+
+channel_by_name = {
+ 'stable': 'stable',
+ 'release': 'stable',
+ 'beta': 'beta',
+ 'nightly': latest_channels,
+ 'dev': latest_channels,
+ 'preview': latest_channels,
+ 'experimental': latest_channels,
+}
+
+
def get_parser():
- parser = argparse.ArgumentParser()
- parser.add_argument('browser', choices=['firefox', 'chrome'],
+ parser = argparse.ArgumentParser(description="""Install a given browser or webdriver frontend.
+
+ For convenience the release channel of the browser accepts various spellings,
+ but we actually support at most three variants; whatever the latest development
+ release is (e.g. Firefox nightly or Chrome dev), the latest beta release, and
+ the most recent stable release.""")
+ parser.add_argument('browser', choices=['firefox', 'chrome', 'servo'],
help='name of web browser product')
parser.add_argument('component', choices=['browser', 'webdriver'],
help='name of component')
+ parser.add_argument('--channel', choices=channel_by_name.keys(),
+ default="nightly", help='Name of browser release channel. '
+ '"stable" and "release" are synonyms for the latest browser stable release,'
+ '"nightly", "dev", "experimental", and "preview" are all synonyms for '
+ 'the latest available development release. For WebDriver installs, '
+ 'we attempt to select an appropriate, compatible, version for the '
+ 'latest browser release on the selected channel.')
parser.add_argument('-d', '--destination',
help='filesystem directory to place the component')
return parser
+def get_channel(browser, channel):
+ channel = channel_by_name[channel]
+ if isinstance(channel, dict):
+ channel = channel[browser]
+ return channel
+
+
def run(venv, **kwargs):
browser = kwargs["browser"]
destination = kwargs["destination"]
+ channel = get_channel(browser, kwargs["channel"])
+
+ if channel != kwargs["channel"]:
+ print "Interpreting channel '%s' as '%s'" % (kwargs["channel"],
+ channel)
if destination is None:
if venv:
@@ -27,10 +69,10 @@ def run(venv, **kwargs):
raise argparse.ArgumentError(None,
"No --destination argument, and no default for the environment")
- install(browser, kwargs["component"], destination)
+ install(browser, kwargs["component"], destination, channel)
-def install(name, component, destination):
+def install(name, component, destination, channel="nightly"):
if component == 'webdriver':
method = 'install_webdriver'
else:
@@ -38,4 +80,6 @@ def install(name, component, destination):
subclass = getattr(browser, name.title())
sys.stdout.write('Now installing %s %s...\n' % (name, component))
- getattr(subclass(), method)(dest=destination)
+ path = getattr(subclass(), method)(dest=destination, channel=channel)
+ if path:
+ sys.stdout.write('Binary installed as %s\n' % (path,))
diff --git a/tests/wpt/web-platform-tests/tools/wpt/run.py b/tests/wpt/web-platform-tests/tools/wpt/run.py
index 6b098b41f70..a1e5637bf1d 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/run.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/run.py
@@ -7,7 +7,7 @@ from distutils.spawn import find_executable
wpt_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
sys.path.insert(0, os.path.abspath(os.path.join(wpt_root, "tools")))
-from . import browser, utils, virtualenv
+from . import browser, install, utils, virtualenv
from ..serve import serve
logger = None
@@ -47,7 +47,15 @@ def create_parser():
parser.add_argument("--yes", "-y", dest="prompt", action="store_false", default=True,
help="Don't prompt before installing components")
parser.add_argument("--install-browser", action="store_true",
- help="Install the latest development version of the browser")
+ help="Install the browser")
+ parser.add_argument("--channel", action="store",
+ choices=install.channel_by_name.keys(),
+ default=None, help='Name of browser release channel.'
+ '"stable" and "release" are synonyms for the latest browser stable release,'
+ '"nightly", "dev", "experimental", and "preview" are all synonyms for '
+ 'the latest available development release. For WebDriver installs, '
+ 'we attempt to select an appropriate, compatible, version for the '
+ 'latest browser release on the selected channel.')
parser._add_container_actions(wptcommandline.create_parser())
return parser
@@ -105,7 +113,7 @@ def check_environ(product):
missing_hosts = set(expected_hosts)
if is_windows:
- hosts_path = "C:\Windows\System32\drivers\etc\hosts"
+ hosts_path = "%s\System32\drivers\etc\hosts" % os.environ.get("SystemRoot", "C:\Windows")
else:
hosts_path = "/etc/hosts"
@@ -120,7 +128,7 @@ def check_environ(product):
if is_windows:
message = """Missing hosts file configuration. Run
-python wpt make-hosts-file | Out-File %SystemRoot%\System32\drivers\etc\hosts -Encoding ascii -Append
+python wpt make-hosts-file | Out-File %s -Encoding ascii -Append
in PowerShell with Administrator privileges.""" % hosts_path
else:
@@ -150,9 +158,9 @@ class BrowserSetup(object):
elif resp == "n":
return False
- def install(self, venv):
+ def install(self, venv, channel=None):
if self.prompt_install(self.name):
- return self.browser.install(venv.path)
+ return self.browser.install(venv.path, channel)
def install_requirements(self):
self.venv.install_requirements(os.path.join(wpt_root, "tools", "wptrunner", self.browser.requirements))
@@ -167,7 +175,8 @@ class Firefox(BrowserSetup):
def setup_kwargs(self, kwargs):
if kwargs["binary"] is None:
- binary = self.browser.find_binary(self.venv.path)
+ binary = self.browser.find_binary(self.venv.path,
+ kwargs["browser_channel"])
if binary is None:
raise WptrunError("""Firefox binary not found on $PATH.
@@ -205,7 +214,9 @@ Consider installing certutil via your OS package manager or directly.""")
kwargs["test_types"].remove("wdspec")
if kwargs["prefs_root"] is None:
- prefs_root = self.browser.install_prefs(kwargs["binary"], self.venv.path)
+ prefs_root = self.browser.install_prefs(kwargs["binary"],
+ self.venv.path,
+ channel=kwargs["browser_channel"])
kwargs["prefs_root"] = prefs_root
@@ -262,6 +273,10 @@ class ChromeAndroid(BrowserSetup):
else:
raise WptrunError("Unable to locate or install chromedriver binary")
+class ChromeWebDriver(Chrome):
+ name = "chrome_webdriver"
+ browser_cls = browser.ChromeWebDriver
+
class Opera(BrowserSetup):
name = "opera"
@@ -290,7 +305,7 @@ class Edge(BrowserSetup):
name = "edge"
browser_cls = browser.Edge
- def install(self, venv):
+ def install(self, venv, channel=None):
raise NotImplementedError
def setup_kwargs(self, kwargs):
@@ -307,11 +322,16 @@ https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
kwargs["webdriver_binary"] = webdriver_binary
+class EdgeWebDriver(Edge):
+ name = "edge_webdriver"
+ browser_cls = browser.EdgeWebDriver
+
+
class InternetExplorer(BrowserSetup):
name = "ie"
browser_cls = browser.InternetExplorer
- def install(self, venv):
+ def install(self, venv, channel=None):
raise NotImplementedError
def setup_kwargs(self, kwargs):
@@ -332,7 +352,7 @@ class Safari(BrowserSetup):
name = "safari"
browser_cls = browser.Safari
- def install(self, venv):
+ def install(self, venv, channel=None):
raise NotImplementedError
def setup_kwargs(self, kwargs):
@@ -345,11 +365,16 @@ class Safari(BrowserSetup):
kwargs["webdriver_binary"] = webdriver_binary
+class SafariWebDriver(Safari):
+ name = "safari_webdriver"
+ browser_cls = browser.SafariWebDriver
+
+
class Sauce(BrowserSetup):
name = "sauce"
browser_cls = browser.Sauce
- def install(self, venv):
+ def install(self, venv, channel=None):
raise NotImplementedError
def setup_kwargs(self, kwargs):
@@ -362,13 +387,13 @@ class Servo(BrowserSetup):
name = "servo"
browser_cls = browser.Servo
- def install(self, venv):
+ def install(self, venv, channel=None):
if self.prompt_install(self.name):
return self.browser.install(venv.path)
def setup_kwargs(self, kwargs):
if kwargs["binary"] is None:
- binary = self.browser.find_binary()
+ binary = self.browser.find_binary(self.venv.path, None)
if binary is None:
raise WptrunError("Unable to find servo binary on the PATH")
@@ -379,7 +404,7 @@ class WebKit(BrowserSetup):
name = "webkit"
browser_cls = browser.WebKit
- def install(self, venv):
+ def install(self, venv, channel=None):
raise NotImplementedError
def setup_kwargs(self, kwargs):
@@ -391,9 +416,12 @@ product_setup = {
"firefox": Firefox,
"chrome": Chrome,
"chrome_android": ChromeAndroid,
+ "chrome_webdriver": ChromeWebDriver,
"edge": Edge,
+ "edge_webdriver": EdgeWebDriver,
"ie": InternetExplorer,
"safari": Safari,
+ "safari_webdriver": SafariWebDriver,
"servo": Servo,
"sauce": Sauce,
"opera": Opera,
@@ -401,7 +429,7 @@ product_setup = {
}
-def setup_wptrunner(venv, prompt=True, install=False, **kwargs):
+def setup_wptrunner(venv, prompt=True, install_browser=False, **kwargs):
from wptrunner import wptrunner, wptcommandline
global logger
@@ -424,9 +452,20 @@ def setup_wptrunner(venv, prompt=True, install=False, **kwargs):
setup_cls = product_setup[kwargs["product"]](venv, prompt, sub_product)
setup_cls.install_requirements()
- if install:
+ if install_browser and not kwargs["channel"]:
+ kwargs["channel"] = "nightly"
+
+ if kwargs["channel"]:
+ channel = install.get_channel(kwargs["product"], kwargs["channel"])
+ if channel != kwargs["channel"]:
+ logger.info("Interpreting channel '%s' as '%s'" % (kwargs["channel"],
+ channel))
+ kwargs["browser_channel"] = channel
+ del kwargs["channel"]
+
+ if install_browser:
logger.info("Installing browser")
- kwargs["binary"] = setup_cls.install(venv)
+ kwargs["binary"] = setup_cls.install(venv, channel=channel)
setup_cls.setup(kwargs)
@@ -447,7 +486,7 @@ def run(venv, **kwargs):
kwargs = setup_wptrunner(venv,
prompt=prompt,
- install=install_browser,
+ install_browser=install_browser,
**kwargs)
rv = run_single(venv, **kwargs) > 0
diff --git a/tests/wpt/web-platform-tests/tools/wpt/tests/test_run.py b/tests/wpt/web-platform-tests/tools/wpt/tests/test_run.py
new file mode 100644
index 00000000000..097131d7ba5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/tools/wpt/tests/test_run.py
@@ -0,0 +1,18 @@
+import mock
+
+import pytest
+
+from tools.wpt import run
+
+
+@pytest.mark.parametrize("platform", ["Windows", "Linux", "Darwin"])
+def test_check_environ_fail(platform):
+ m_open = mock.mock_open(read_data=b"")
+
+ with mock.patch.object(run, "open", m_open):
+ with mock.patch.object(run.platform, "uname",
+ return_value=(platform, "", "", "", "", "")):
+ with pytest.raises(run.WptrunError) as excinfo:
+ run.check_environ("foo")
+
+ assert "wpt make-hosts-file" in excinfo.value.message
diff --git a/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py b/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py
index b39173e64f2..8f8e5186c7c 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py
@@ -166,9 +166,9 @@ def test_run_firefox(manifest_dir):
os.environ["MOZ_HEADLESS"] = "1"
try:
if sys.platform == "darwin":
- fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "Firefox Nightly.app")
+ fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "nightly", "Firefox Nightly.app")
else:
- fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "firefox")
+ fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "nightly", "firefox")
if os.path.exists(fx_path):
shutil.rmtree(fx_path)
with pytest.raises(SystemExit) as excinfo:
@@ -294,15 +294,14 @@ def test_install_chromedriver():
@pytest.mark.xfail(sys.platform == "win32",
reason="Tests currently don't work on Windows for path reasons")
def test_install_firefox():
-
if sys.platform == "darwin":
- fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "Firefox Nightly.app")
+ fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "nightly", "Firefox Nightly.app")
else:
- fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "firefox")
+ fx_path = os.path.join(wpt.localpaths.repo_root, "_venv", "browsers", "nightly", "firefox")
if os.path.exists(fx_path):
shutil.rmtree(fx_path)
with pytest.raises(SystemExit) as excinfo:
- wpt.main(argv=["install", "firefox", "browser"])
+ wpt.main(argv=["install", "firefox", "browser", "--channel=nightly"])
assert excinfo.value.code == 0
assert os.path.exists(fx_path)
shutil.rmtree(fx_path)
diff --git a/tests/wpt/web-platform-tests/tools/wpt/tox.ini b/tests/wpt/web-platform-tests/tools/wpt/tox.ini
index e486bb221d7..cd45a76e179 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/tox.ini
+++ b/tests/wpt/web-platform-tests/tools/wpt/tox.ini
@@ -7,6 +7,7 @@ deps =
pytest
pytest-cov
hypothesis
+ mock
-r{toxinidir}/../wptrunner/requirements.txt
-r{toxinidir}/../wptrunner/requirements_chrome.txt
-r{toxinidir}/../wptrunner/requirements_firefox.txt
diff --git a/tests/wpt/web-platform-tests/tools/wpt/wpt.py b/tests/wpt/web-platform-tests/tools/wpt/wpt.py
index f4eecce22cf..55802461553 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/wpt.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/wpt.py
@@ -101,9 +101,6 @@ def main(prog=None, argv=None):
main_args, command_args = parse_args(argv, commands)
- if not(len(argv) and argv[0] in commands):
- sys.exit(1)
-
command = main_args.command
props = commands[command]
venv = None
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py
index d8682e16a55..08949f79483 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py
@@ -24,11 +24,14 @@ module global scope.
product_list = ["chrome",
"chrome_android",
+ "chrome_webdriver",
"edge",
+ "edge_webdriver",
"fennec",
"firefox",
"ie",
"safari",
+ "safari_webdriver",
"sauce",
"servo",
"servodriver",
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py
index dc03ef711b6..70324bec31f 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py
@@ -2,12 +2,32 @@ import os
import platform
import socket
from abc import ABCMeta, abstractmethod
+from copy import deepcopy
from ..wptcommandline import require_arg # noqa: F401
here = os.path.split(__file__)[0]
+def inherit(super_module, child_globals, product_name):
+ super_wptrunner = super_module.__wptrunner__
+ child_globals["__wptrunner__"] = child_wptrunner = deepcopy(super_wptrunner)
+
+ child_wptrunner["product"] = product_name
+
+ for k in ("check_args", "browser", "browser_kwargs", "executor_kwargs",
+ "env_extras", "env_options"):
+ attr = super_wptrunner[k]
+ child_globals[attr] = getattr(super_module, attr)
+
+ for v in super_module.__wptrunner__["executor"].values():
+ child_globals[v] = getattr(super_module, v)
+
+ if "run_info_extras" in super_wptrunner:
+ attr = super_wptrunner["run_info_extras"]
+ child_globals[attr] = getattr(super_module, attr)
+
+
def cmd_arg(name, value=None):
prefix = "-" if platform.system() == "Windows" else "--"
rv = prefix + name
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_webdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_webdriver.py
new file mode 100644
index 00000000000..a63460f4544
--- /dev/null
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_webdriver.py
@@ -0,0 +1,50 @@
+from .base import inherit
+from . import chrome
+
+from ..executors import executor_kwargs as base_executor_kwargs
+from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401
+ WebDriverRefTestExecutor) # noqa: F401
+
+
+inherit(chrome, globals(), "chrome_webdriver")
+
+# __wptrunner__ magically appears from inherit, F821 is undefined name
+__wptrunner__["executor_kwargs"] = "executor_kwargs" # noqa: F821
+__wptrunner__["executor"]["testharness"] = "WebDriverTestharnessExecutor" # noqa: F821
+__wptrunner__["executor"]["reftest"] = "WebDriverRefTestExecutor" # noqa: F821
+
+
+def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
+ **kwargs):
+ executor_kwargs = base_executor_kwargs(test_type, server_config,
+ cache_manager, run_info_data,
+ **kwargs)
+ executor_kwargs["close_after_done"] = True
+
+ capabilities = {
+ "browserName": "chrome",
+ "platform": "ANY",
+ "version": "",
+ "goog:chromeOptions": {
+ "prefs": {
+ "profile": {
+ "default_content_setting_values": {
+ "popups": 1
+ }
+ }
+ },
+ "w3c": True
+ }
+ }
+
+ for (kwarg, capability) in [("binary", "binary"), ("binary_args", "args")]:
+ if kwargs[kwarg] is not None:
+ capabilities["goog:chromeOptions"][capability] = kwargs[kwarg]
+
+ if test_type == "testharness":
+ capabilities["goog:chromeOptions"]["useAutomationExtension"] = False
+ capabilities["goog:chromeOptions"]["excludeSwitches"] = ["enable-automation"]
+
+ executor_kwargs["capabilities"] = capabilities
+
+ return executor_kwargs
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge_webdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge_webdriver.py
new file mode 100644
index 00000000000..c2545de46f0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge_webdriver.py
@@ -0,0 +1,12 @@
+from .base import inherit
+from . import edge
+
+from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401
+ WebDriverRefTestExecutor) # noqa: F401
+
+
+inherit(edge, globals(), "edge_webdriver")
+
+# __wptrunner__ magically appears from inherit, F821 is undefined name
+__wptrunner__["executor"]["testharness"] = "WebDriverTestharnessExecutor" # noqa: F821
+__wptrunner__["executor"]["reftest"] = "WebDriverRefTestExecutor" # noqa: F821
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari_webdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari_webdriver.py
new file mode 100644
index 00000000000..12735c141b3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari_webdriver.py
@@ -0,0 +1,12 @@
+from .base import inherit
+from . import safari
+
+from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401
+ WebDriverRefTestExecutor) # noqa: F401
+
+
+inherit(safari, globals(), "safari_webdriver")
+
+# __wptrunner__ magically appears from inherit, F821 is undefined name
+__wptrunner__["executor"]["testharness"] = "WebDriverTestharnessExecutor" # noqa: F821
+__wptrunner__["executor"]["reftest"] = "WebDriverRefTestExecutor" # noqa: F821
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py
index 9aa484accd4..02cc322aa35 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py
@@ -133,6 +133,7 @@ class SauceConnect():
self.sauce_key = kwargs["sauce_key"]
self.sauce_tunnel_id = kwargs["sauce_tunnel_id"]
self.sauce_connect_binary = kwargs.get("sauce_connect_binary")
+ self.sauce_init_timeout = kwargs.get("sauce_init_timeout")
self.sc_process = None
self.temp_dir = None
self.env_config = None
@@ -172,12 +173,9 @@ class SauceConnect():
",".join(self.env_config.domains_set)
])
- # Timeout config vars
- max_wait = 30
-
tot_wait = 0
while not os.path.exists('./sauce_is_ready') and self.sc_process.poll() is None:
- if tot_wait >= max_wait:
+ if tot_wait >= self.sauce_init_timeout:
self.quit()
raise SauceException("Sauce Connect Proxy was not ready after %d seconds" % tot_wait)
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py
index d9b67968ddf..0675461d5d8 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py
@@ -95,14 +95,14 @@ class SeleniumTestharnessProtocolPart(TestharnessProtocolPart):
def get_test_window(self, window_id, parent):
test_window = None
- if window_id:
- try:
- # Try this, it's in Level 1 but nothing supports it yet
- win_s = self.webdriver.execute_script("return window['%s'];" % self.window_id)
- win_obj = json.loads(win_s)
- test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"]
- except Exception:
- pass
+ try:
+ # Try using the JSON serialization of the WindowProxy object,
+ # it's in Level 1 but nothing supports it yet
+ win_s = self.webdriver.execute_script("return window['%s'];" % window_id)
+ win_obj = json.loads(win_s)
+ test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"]
+ except Exception:
+ pass
if test_window is None:
after = self.webdriver.window_handles
@@ -296,7 +296,7 @@ class SeleniumTestharnessExecutor(TestharnessExecutor):
parent_window = protocol.testharness.close_old_windows()
# Now start the test harness
protocol.base.execute_script(self.script % format_map)
- test_window = protocol.testharness.get_test_window(webdriver, parent_window)
+ test_window = protocol.testharness.get_test_window(self.window_id, parent_window)
handler = CallbackHandler(self.logger, protocol, test_window)
while True:
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py
new file mode 100644
index 00000000000..127c909e810
--- /dev/null
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py
@@ -0,0 +1,373 @@
+import json
+import os
+import socket
+import threading
+import traceback
+import urlparse
+import uuid
+
+from .base import (CallbackHandler,
+ RefTestExecutor,
+ RefTestImplementation,
+ TestharnessExecutor,
+ extra_timeout,
+ strip_server)
+from .protocol import (BaseProtocolPart,
+ TestharnessProtocolPart,
+ Protocol,
+ SelectorProtocolPart,
+ ClickProtocolPart,
+ SendKeysProtocolPart,
+ TestDriverProtocolPart)
+from ..testrunner import Stop
+
+import webdriver as client
+
+here = os.path.join(os.path.split(__file__)[0])
+
+class WebDriverBaseProtocolPart(BaseProtocolPart):
+ def setup(self):
+ self.webdriver = self.parent.webdriver
+
+ def execute_script(self, script, async=False):
+ method = self.webdriver.execute_async_script if async else self.webdriver.execute_script
+ return method(script)
+
+ def set_timeout(self, timeout):
+ try:
+ self.webdriver.timeouts.script = timeout
+ except client.WebDriverException:
+ # workaround https://bugs.chromium.org/p/chromedriver/issues/detail?id=2057
+ body = {"type": "script", "ms": timeout * 1000}
+ self.webdriver.send_session_command("POST", "timeouts", body)
+
+ @property
+ def current_window(self):
+ return self.webdriver.window_handle
+
+ def set_window(self, handle):
+ self.webdriver.window_handle = handle
+
+ def wait(self):
+ while True:
+ try:
+ self.webdriver.execute_async_script("")
+ except client.TimeoutException:
+ pass
+ except (socket.timeout, client.NoSuchWindowException,
+ client.UnknownErrorException, IOError):
+ break
+ except Exception as e:
+ self.logger.error(traceback.format_exc(e))
+ break
+
+
+class WebDriverTestharnessProtocolPart(TestharnessProtocolPart):
+ def setup(self):
+ self.webdriver = self.parent.webdriver
+
+ def load_runner(self, url_protocol):
+ url = urlparse.urljoin(self.parent.executor.server_url(url_protocol),
+ "/testharness_runner.html")
+ self.logger.debug("Loading %s" % url)
+
+ self.webdriver.url = url
+ self.webdriver.execute_script("document.title = '%s'" %
+ threading.current_thread().name.replace("'", '"'))
+
+ def close_old_windows(self):
+ exclude = self.webdriver.window_handle
+ handles = [item for item in self.webdriver.handles if item != exclude]
+ for handle in handles:
+ try:
+ self.webdriver.window_handle = handle
+ self.webdriver.close()
+ except client.NoSuchWindowException:
+ pass
+ self.webdriver.window_handle = exclude
+ return exclude
+
+ def get_test_window(self, window_id, parent):
+ test_window = None
+ try:
+ # Try using the JSON serialization of the WindowProxy object,
+ # it's in Level 1 but nothing supports it yet
+ win_s = self.webdriver.execute_script("return window['%s'];" % window_id)
+ win_obj = json.loads(win_s)
+ test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"]
+ except Exception:
+ pass
+
+ if test_window is None:
+ after = self.webdriver.handles
+ if len(after) == 2:
+ test_window = next(iter(set(after) - set([parent])))
+ elif after[0] == parent and len(after) > 2:
+ # Hope the first one here is the test window
+ test_window = after[1]
+ else:
+ raise Exception("unable to find test window")
+
+ assert test_window != parent
+ return test_window
+
+
+class WebDriverSelectorProtocolPart(SelectorProtocolPart):
+ def setup(self):
+ self.webdriver = self.parent.webdriver
+
+ def elements_by_selector(self, selector):
+ return self.webdriver.find.css(selector)
+
+
+class WebDriverClickProtocolPart(ClickProtocolPart):
+ def setup(self):
+ self.webdriver = self.parent.webdriver
+
+ def element(self, element):
+ return element.click()
+
+
+class WebDriverSendKeysProtocolPart(SendKeysProtocolPart):
+ def setup(self):
+ self.webdriver = self.parent.webdriver
+
+ def send_keys(self, element, keys):
+ try:
+ return element.send_keys(keys)
+ except client.UnknownErrorException as e:
+ # workaround https://bugs.chromium.org/p/chromedriver/issues/detail?id=1999
+ if (e.http_status != 500 or
+ e.status_code != "unknown error"):
+ raise
+ return element.send_element_command("POST", "value", {"value": list(keys)})
+
+
+class WebDriverTestDriverProtocolPart(TestDriverProtocolPart):
+ def setup(self):
+ self.webdriver = self.parent.webdriver
+
+ def send_message(self, message_type, status, message=None):
+ obj = {
+ "type": "testdriver-%s" % str(message_type),
+ "status": str(status)
+ }
+ if message:
+ obj["message"] = str(message)
+ self.webdriver.execute_script("window.postMessage(%s, '*')" % json.dumps(obj))
+
+
+class WebDriverProtocol(Protocol):
+ implements = [WebDriverBaseProtocolPart,
+ WebDriverTestharnessProtocolPart,
+ WebDriverSelectorProtocolPart,
+ WebDriverClickProtocolPart,
+ WebDriverSendKeysProtocolPart,
+ WebDriverTestDriverProtocolPart]
+
+ def __init__(self, executor, browser, capabilities, **kwargs):
+ super(WebDriverProtocol, self).__init__(executor, browser)
+ self.capabilities = capabilities
+ self.url = browser.webdriver_url
+ self.webdriver = None
+
+ def connect(self):
+ """Connect to browser via WebDriver."""
+ self.logger.debug("Connecting to WebDriver on URL: %s" % self.url)
+
+ host, port = self.url.split(":")[1].strip("/"), self.url.split(':')[-1].strip("/")
+
+ capabilities = {"alwaysMatch": self.capabilities}
+ self.webdriver = client.Session(host, port, capabilities=capabilities)
+ self.webdriver.start()
+
+
+ def after_conect(self):
+ pass
+
+ def teardown(self):
+ self.logger.debug("Hanging up on WebDriver session")
+ try:
+ self.webdriver.quit()
+ except Exception:
+ pass
+ del self.webdriver
+
+ def is_alive(self):
+ try:
+ # Get a simple property over the connection
+ self.webdriver.window_handle
+ except (socket.timeout, client.UnknownErrorException):
+ return False
+ return True
+
+ def after_connect(self):
+ self.testharness.load_runner(self.executor.last_environment["protocol"])
+
+
+class WebDriverRun(object):
+ def __init__(self, func, protocol, url, timeout):
+ self.func = func
+ self.result = None
+ self.protocol = protocol
+ self.url = url
+ self.timeout = timeout
+ self.result_flag = threading.Event()
+
+ def run(self):
+ timeout = self.timeout
+
+ try:
+ self.protocol.base.set_timeout((timeout + extra_timeout))
+ except client.UnknownErrorException:
+ self.logger.error("Lost WebDriver connection")
+ return Stop
+
+ executor = threading.Thread(target=self._run)
+ executor.start()
+
+ flag = self.result_flag.wait(timeout + 2 * extra_timeout)
+ if self.result is None:
+ assert not flag
+ self.result = False, ("EXTERNAL-TIMEOUT", None)
+
+ return self.result
+
+ def _run(self):
+ try:
+ self.result = True, self.func(self.protocol, self.url, self.timeout)
+ except client.TimeoutException:
+ self.result = False, ("EXTERNAL-TIMEOUT", None)
+ except (socket.timeout, client.UnknownErrorException):
+ self.result = False, ("CRASH", None)
+ except Exception as e:
+ if (isinstance(e, client.WebDriverException) and
+ e.http_status == 408 and
+ e.status_code == "asynchronous script timeout"):
+ # workaround for https://bugs.chromium.org/p/chromedriver/issues/detail?id=2001
+ self.result = False, ("EXTERNAL-TIMEOUT", None)
+ else:
+ message = getattr(e, "message", "")
+ if message:
+ message += "\n"
+ message += traceback.format_exc(e)
+ self.result = False, ("ERROR", message)
+ finally:
+ self.result_flag.set()
+
+
+class WebDriverTestharnessExecutor(TestharnessExecutor):
+ supports_testdriver = True
+
+ def __init__(self, browser, server_config, timeout_multiplier=1,
+ close_after_done=True, capabilities=None, debug_info=None,
+ **kwargs):
+ """WebDriver-based executor for testharness.js tests"""
+ TestharnessExecutor.__init__(self, browser, server_config,
+ timeout_multiplier=timeout_multiplier,
+ debug_info=debug_info)
+ self.protocol = WebDriverProtocol(self, browser, capabilities)
+ with open(os.path.join(here, "testharness_webdriver.js")) as f:
+ self.script = f.read()
+ with open(os.path.join(here, "testharness_webdriver_resume.js")) as f:
+ self.script_resume = f.read()
+ self.close_after_done = close_after_done
+ self.window_id = str(uuid.uuid4())
+
+ def is_alive(self):
+ return self.protocol.is_alive()
+
+ def on_environment_change(self, new_environment):
+ if new_environment["protocol"] != self.last_environment["protocol"]:
+ self.protocol.testharness.load_runner(new_environment["protocol"])
+
+ def do_test(self, test):
+ url = self.test_url(test)
+
+ success, data = WebDriverRun(self.do_testharness,
+ self.protocol,
+ url,
+ test.timeout * self.timeout_multiplier).run()
+
+ if success:
+ return self.convert_result(test, data)
+
+ return (test.result_cls(*data), [])
+
+ def do_testharness(self, protocol, url, timeout):
+ format_map = {"abs_url": url,
+ "url": strip_server(url),
+ "window_id": self.window_id,
+ "timeout_multiplier": self.timeout_multiplier,
+ "timeout": timeout * 1000}
+
+ parent_window = protocol.testharness.close_old_windows()
+ # Now start the test harness
+ protocol.base.execute_script(self.script % format_map)
+ test_window = protocol.testharness.get_test_window(self.window_id, parent_window)
+
+ handler = CallbackHandler(self.logger, protocol, test_window)
+ while True:
+ result = protocol.base.execute_script(
+ self.script_resume % format_map, async=True)
+ done, rv = handler(result)
+ if done:
+ break
+ return rv
+
+
+class WebDriverRefTestExecutor(RefTestExecutor):
+ def __init__(self, browser, server_config, timeout_multiplier=1,
+ screenshot_cache=None, close_after_done=True,
+ debug_info=None, capabilities=None, **kwargs):
+ """WebDriver-based executor for reftests"""
+ RefTestExecutor.__init__(self,
+ browser,
+ server_config,
+ screenshot_cache=screenshot_cache,
+ timeout_multiplier=timeout_multiplier,
+ debug_info=debug_info)
+ self.protocol = WebDriverProtocol(self, browser,
+ capabilities=capabilities)
+ self.implementation = RefTestImplementation(self)
+ self.close_after_done = close_after_done
+ self.has_window = False
+
+ with open(os.path.join(here, "reftest.js")) as f:
+ self.script = f.read()
+ with open(os.path.join(here, "reftest-wait_webdriver.js")) as f:
+ self.wait_script = f.read()
+
+ def is_alive(self):
+ return self.protocol.is_alive()
+
+ def do_test(self, test):
+ self.protocol.webdriver.window.size = (600, 600)
+
+ result = self.implementation.run_test(test)
+
+ return self.convert_result(test, result)
+
+ def screenshot(self, test, viewport_size, dpi):
+ # https://github.com/w3c/wptrunner/issues/166
+ assert viewport_size is None
+ assert dpi is None
+
+ return WebDriverRun(self._screenshot,
+ self.protocol,
+ self.test_url(test),
+ test.timeout).run()
+
+ def _screenshot(self, protocol, url, timeout):
+ webdriver = protocol.webdriver
+ webdriver.url = url
+
+ webdriver.execute_async_script(self.wait_script)
+
+ screenshot = webdriver.screenshot()
+
+ # strip off the data:img/png, part of the url
+ if screenshot.startswith("data:image/png;base64,"):
+ screenshot = screenshot.split(",", 1)[1]
+
+ return screenshot
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/stability.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/stability.py
index 859f01444d3..e684bf68076 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/stability.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/stability.py
@@ -15,6 +15,11 @@ localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os
from wpt.markdown import markdown_adjust, table
+# If a test takes more than (FLAKY_THRESHOLD*timeout) and does not consistently
+# time out, it is considered slow (potentially flaky).
+FLAKY_THRESHOLD = 0.8
+
+
class LogActionFilter(BaseHandler):
"""Handler that filters out messages not of a given set of actions.
@@ -53,7 +58,8 @@ class LogHandler(reader.LogHandler):
test = {
"subtests": OrderedDict(),
- "status": defaultdict(int)
+ "status": defaultdict(int),
+ "longest_duration": defaultdict(float),
}
self.results[test_name] = test
return test
@@ -73,6 +79,10 @@ class LogHandler(reader.LogHandler):
return subtest
+ def test_start(self, data):
+ test = self.find_or_create_test(data)
+ test["start_time"] = data["time"]
+
def test_status(self, data):
subtest = self.find_or_create_subtest(data)
subtest["status"][data["status"]] += 1
@@ -82,6 +92,16 @@ class LogHandler(reader.LogHandler):
def test_end(self, data):
test = self.find_or_create_test(data)
test["status"][data["status"]] += 1
+ # Timestamps are in ms since epoch.
+ duration = data["time"] - test.pop("start_time")
+ test["longest_duration"][data["status"]] = max(
+ duration, test["longest_duration"][data["status"]])
+ try:
+ # test_timeout is in seconds; convert it to ms.
+ test["timeout"] = data["extra"]["test_timeout"] * 1000
+ except KeyError:
+ # If a test is skipped, it won't have extra info.
+ pass
def is_inconsistent(results_dict, iterations):
@@ -91,9 +111,31 @@ def is_inconsistent(results_dict, iterations):
return len(results_dict) > 1 or sum(results_dict.values()) != iterations
+def find_slow_status(test):
+ """Check if a single test almost times out.
+
+ We are interested in tests that almost time out (i.e. likely to be flaky).
+ Therefore, timeout statuses are ignored, including (EXTERNAL-)TIMEOUT &
+ CRASH (tests that time out may be marked as CRASH if crashes are detected).
+
+ Returns:
+ A result status produced by a run that almost times out; None, if no
+ runs almost time out.
+ """
+ if "timeout" not in test:
+ return None
+ threshold = test["timeout"] * FLAKY_THRESHOLD
+ for status in ['PASS', 'FAIL', 'OK', 'ERROR']:
+ if (status in test["longest_duration"] and
+ test["longest_duration"][status] > threshold):
+ return status
+ return None
+
+
def process_results(log, iterations):
"""Process test log and return overall results and list of inconsistent tests."""
inconsistent = []
+ slow = []
handler = LogHandler()
reader.handle_log(reader.read(log), handler)
results = handler.results
@@ -103,7 +145,17 @@ def process_results(log, iterations):
for subtest_name, subtest in test["subtests"].iteritems():
if is_inconsistent(subtest["status"], iterations):
inconsistent.append((test_name, subtest_name, subtest["status"], subtest["messages"]))
- return results, inconsistent
+
+ slow_status = find_slow_status(test)
+ if slow_status is not None:
+ slow.append((
+ test_name,
+ slow_status,
+ test["longest_duration"][slow_status],
+ test["timeout"]
+ ))
+
+ return results, inconsistent, slow
def err_string(results_dict, iterations):
@@ -133,6 +185,17 @@ def write_inconsistent(log, inconsistent, iterations):
table(["Test", "Subtest", "Results", "Messages"], strings, log)
+def write_slow_tests(log, slow):
+ log("## Slow tests ##\n")
+ strings = [(
+ "`%s`" % markdown_adjust(test),
+ "`%s`" % status,
+ "`%.0f`" % duration,
+ "`%.0f`" % timeout)
+ for test, status, duration, timeout in slow]
+ table(["Test", "Result", "Longest duration (ms)", "Timeout (ms)"], strings, log)
+
+
def write_results(log, results, iterations, pr_number=None, use_details=False):
log("## All results ##\n")
if use_details:
@@ -202,8 +265,8 @@ def run_step(logger, iterations, restart_after_iteration, kwargs_extras, **kwarg
logger._state.suite_started = False
log.seek(0)
- results, inconsistent = process_results(log, iterations)
- return results, inconsistent, iterations
+ results, inconsistent, slow = process_results(log, iterations)
+ return results, inconsistent, slow, iterations
def get_steps(logger, repeat_loop, repeat_restart, kwargs_extras):
@@ -242,7 +305,6 @@ def write_summary(logger, step_results, final_result):
logger.info(':::')
-
def check_stability(logger, repeat_loop=10, repeat_restart=5, chaos_mode=True, max_time=None,
output_results=True, **kwargs):
kwargs_extras = [{}]
@@ -264,7 +326,7 @@ def check_stability(logger, repeat_loop=10, repeat_restart=5, chaos_mode=True, m
logger.info(':::')
logger.info('::: Running test verification step "%s"...' % desc)
logger.info(':::')
- results, inconsistent, iterations = step_func(**kwargs)
+ results, inconsistent, slow, iterations = step_func(**kwargs)
if output_results:
write_results(logger.info, results, iterations)
@@ -274,6 +336,12 @@ def check_stability(logger, repeat_loop=10, repeat_restart=5, chaos_mode=True, m
write_summary(logger, step_results, "FAIL")
return 1
+ if slow:
+ step_results.append((desc, "FAIL"))
+ write_slow_tests(logger.info, slow)
+ write_summary(logger, step_results, "FAIL")
+ return 1
+
step_results.append((desc, "PASS"))
write_summary(logger, step_results, "PASS")
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testloader.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testloader.py
index 018dc103983..2313a80c745 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testloader.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testloader.py
@@ -439,7 +439,10 @@ class ManifestLoader(object):
if (not os.path.exists(manifest_path) or
self.force_manifest_update):
self.update_manifest(manifest_path, tests_path, url_base, download=self.manifest_download)
- manifest_file = manifest.load(tests_path, manifest_path, types=self.types, meta_filters=self.meta_filters)
+ try:
+ manifest_file = manifest.load(tests_path, manifest_path, types=self.types, meta_filters=self.meta_filters)
+ except manifest.ManifestVersionMismatch:
+ manifest_file = manifest.Manifest(url_base)
if manifest_file.url_base != url_base:
self.logger.info("Updating url_base in manifest from %s to %s" % (manifest_file.url_base,
url_base))
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py
index 46d67e3c982..b4ce4381257 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py
@@ -590,6 +590,8 @@ class TestRunnerManager(threading.Thread):
test.min_assertion_count,
test.max_assertion_count)
+ file_result.extra["test_timeout"] = test.timeout * self.executor_kwargs['timeout_multiplier']
+
self.logger.test_end(test.id,
status,
message=file_result.message,
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/base.py
index b5173f3b513..84dc4f2e7f8 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/base.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/base.py
@@ -17,7 +17,9 @@ if "CURRENT_TOX_ENV" in os.environ:
current_tox_env_split = os.environ["CURRENT_TOX_ENV"].split("-")
tox_env_extra_browsers = {
- "chrome": {"chrome_android"},
+ "chrome": {"chrome_android", "chrome_webdriver"},
+ "edge": {"edge_webdriver"},
+ "safari": {"safari_webdriver"},
"servo": {"servodriver"},
}
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_stability.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_stability.py
index 72cff21016a..5a051b6c899 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_stability.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_stability.py
@@ -5,8 +5,29 @@ sys.path.insert(0, join(dirname(__file__), "..", ".."))
from wptrunner import stability
+
def test_is_inconsistent():
assert stability.is_inconsistent({"PASS": 10}, 10) is False
assert stability.is_inconsistent({"PASS": 9}, 10) is True
assert stability.is_inconsistent({"PASS": 9, "FAIL": 1}, 10) is True
assert stability.is_inconsistent({"PASS": 8, "FAIL": 1}, 10) is True
+
+
+def test_find_slow_status():
+ assert stability.find_slow_status({
+ "longest_duration": {"TIMEOUT": 10},
+ "timeout": 10}) is None
+ assert stability.find_slow_status({
+ "longest_duration": {"CRASH": 10},
+ "timeout": 10}) is None
+ assert stability.find_slow_status({
+ "longest_duration": {"PASS": 1},
+ "timeout": 10}) is None
+ assert stability.find_slow_status({
+ "longest_duration": {"PASS": 81},
+ "timeout": 100}) == "PASS"
+ assert stability.find_slow_status({
+ "longest_duration": {"TIMEOUT": 10, "FAIL": 81},
+ "timeout": 100}) == "FAIL"
+ assert stability.find_slow_status({
+ "longest_duration": {"SKIP": 0}}) is None
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_update.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_update.py
index 5c654c99a48..f8790815cf0 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_update.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_update.py
@@ -32,7 +32,7 @@ item_classes = {"testharness": manifest_item.TestharnessTest,
"reftest_node": manifest_item.RefTestNode,
"manual": manifest_item.ManualTest,
"stub": manifest_item.Stub,
- "wdspec": manifest_item.WebdriverSpecTest,
+ "wdspec": manifest_item.WebDriverSpecTest,
"conformancechecker": manifest_item.ConformanceCheckerTest,
"visual": manifest_item.VisualTest,
"support": manifest_item.SupportFile}
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/update.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/update.py
index 5685f840670..e5678be4f54 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/update.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/update.py
@@ -96,11 +96,38 @@ class UpdateMetadata(Step):
runner.run()
+class RemoveObsolete(Step):
+ """Remove metadata files that don't corespond to an existing test file"""
+
+ def create(self, state):
+ if not state.kwargs["remove_obsolete"]:
+ return
+
+ paths = state.kwargs["test_paths"]
+ state.tests_path = state.paths["/"]["tests_path"]
+ state.metadata_path = state.paths["/"]["metadata_path"]
+
+ for url_paths in paths.itervalues():
+ tests_path = url_paths["tests_path"]
+ metadata_path = url_paths["metadata_path"]
+ for dirpath, dirnames, filenames in os.walk(metadata_path):
+ for filename in filenames:
+ if filename == "__dir__.ini":
+ continue
+ if filename.endswith(".ini"):
+ full_path = os.path.join(dirpath, filename)
+ rel_path = os.path.relpath(full_path, metadata_path)
+ test_path = os.path.join(tests_path, rel_path[:-4])
+ if not os.path.exists(test_path):
+ os.unlink(full_path)
+
+
class UpdateRunner(StepRunner):
"""Runner for doing an overall update."""
steps = [LoadConfig,
LoadTrees,
SyncFromUpstream,
+ RemoveObsolete,
UpdateMetadata]
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py
index 7e18a8b4379..0075ad90962 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py
@@ -192,6 +192,12 @@ scheme host and port.""")
help="Path to directory containing extra json files to add to run info")
config_group.add_argument("--product", action="store", choices=product_choices,
default=None, help="Browser against which to run tests")
+ config_group.add_argument("--browser-version", action="store",
+ default=None, help="Informative string detailing the browser "
+ "release version. This is included in the run_info data.")
+ config_group.add_argument("--browser-channel", action="store",
+ default=None, help="Informative string detailing the browser "
+ "release channel. This is included in the run_info data.")
config_group.add_argument("--config", action="store", type=abs_path, dest="config",
help="Path to config file")
config_group.add_argument("--install-fonts", action="store_true",
@@ -287,6 +293,11 @@ scheme host and port.""")
sauce_group.add_argument("--sauce-connect-binary",
dest="sauce_connect_binary",
help="Path to Sauce Connect binary")
+ sauce_group.add_argument("--sauce-init-timeout", action="store",
+ type=int, default=30,
+ help="Number of seconds to wait for Sauce "
+ "Connect tunnel to be available before "
+ "aborting")
webkit_group = parser.add_argument_group("WebKit-specific")
webkit_group.add_argument("--webkit-port", dest="webkit_port",
@@ -554,8 +565,14 @@ def create_parser_update(product_choices=None):
parser.add_argument("--stability", nargs="?", action="store", const="unstable", default=None,
help=("Reason for disabling tests. When updating test results, disable tests that have "
"inconsistent results across many runs with the given reason."))
- parser.add_argument("--continue", action="store_true", help="Continue a previously started run of the update script")
- parser.add_argument("--abort", action="store_true", help="Clear state from a previous incomplete run of the update script")
+ parser.add_argument("--no-remove-obsolete", action="store_false", dest="remove_obsolete", default=True,
+ help=("Don't remove metadata files that no longer correspond to a test file"))
+ parser.add_argument("--no-store-state", action="store_false", dest="store_state",
+ help="Store state so that steps can be resumed after failure")
+ parser.add_argument("--continue", action="store_true",
+ help="Continue a previously started run of the update script")
+ parser.add_argument("--abort", action="store_true",
+ help="Clear state from a previous incomplete run of the update script")
parser.add_argument("--exclude", action="store", nargs="*",
help="List of glob-style paths to exclude when syncing tests")
parser.add_argument("--include", action="store", nargs="*",
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py
index 02420826d8a..a6a29724ad7 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py
@@ -47,6 +47,7 @@ def get_loader(test_paths, product, debug=None, run_info_extras=None, **kwargs):
run_info = wpttest.get_run_info(kwargs["run_info"], product,
browser_version=kwargs.get("browser_version"),
+ browser_channel=kwargs.get("browser_channel"),
debug=debug,
extras=run_info_extras)
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py
index c29ba974a99..4086a89e4cf 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py
@@ -67,7 +67,10 @@ def get_run_info(metadata_root, product, **kwargs):
class RunInfo(dict):
- def __init__(self, metadata_root, product, debug, browser_version=None, extras=None):
+ def __init__(self, metadata_root, product, debug,
+ browser_version=None,
+ browser_channel=None,
+ extras=None):
import mozinfo
self._update_mozinfo(metadata_root)
self.update(mozinfo.info)
@@ -89,6 +92,8 @@ class RunInfo(dict):
self["debug"] = False
if browser_version:
self["browser_version"] = browser_version
+ if browser_channel:
+ self["browser_channel"] = browser_channel
if extras is not None:
self.update(extras)
diff --git a/tests/wpt/web-platform-tests/trusted-types/DOMParser-parseFromString.tentative.html b/tests/wpt/web-platform-tests/trusted-types/DOMParser-parseFromString.tentative.html
index 2fe9b31b787..2dfc37686bc 100644
--- a/tests/wpt/web-platform-tests/trusted-types/DOMParser-parseFromString.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/DOMParser-parseFromString.tentative.html
@@ -4,14 +4,12 @@
<script src="support/helper.sub.js"></script>
<body>
<script>
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
- let parser = new DOMParser();
- let doc = parser.parseFromString(html, "text/html");
- assert_equals(doc.body.innerText, RESULTS.HTML);
- }));
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
+ let parser = new DOMParser();
+ let doc = parser.parseFromString(html, "text/html");
+ assert_equals(doc.body.innerText, RESULTS.HTML);
}, "document.innerText assigned via policy (successful HTML transformation).");
test(t => {
diff --git a/tests/wpt/web-platform-tests/trusted-types/Document-write.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Document-write.tentative.html
index 3a63e923543..79247fb4d68 100644
--- a/tests/wpt/web-platform-tests/trusted-types/Document-write.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/Document-write.tentative.html
@@ -4,12 +4,10 @@
<script src="support/helper.sub.js"></script>
<body>
<script>
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
- document.write(html);
- assert_equals(document.body.innerText, RESULTS.HTML);
- }));
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
+ document.write(html);
+ assert_equals(document.body.innerText, RESULTS.HTML);
}, "document.write with html assigned via policy (successful URL transformation).");
</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Element-insertAdjacentHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Element-insertAdjacentHTML.tentative.html
index 599ade44ec1..d5db7936b1f 100644
--- a/tests/wpt/web-platform-tests/trusted-types/Element-insertAdjacentHTML.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/Element-insertAdjacentHTML.tentative.html
@@ -7,32 +7,30 @@
<script>
var container = document.querySelector('#container');
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
- var d = document.createElement('div');
- container.appendChild(d);
+ var d = document.createElement('div');
+ container.appendChild(d);
- d.insertAdjacentHTML('beforebegin', html);
- assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
- assert_equals(d.previousSibling.data, RESULTS.HTML);
+ d.insertAdjacentHTML('beforebegin', html);
+ assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
+ assert_equals(d.previousSibling.data, RESULTS.HTML);
- d.insertAdjacentHTML('afterbegin', html);
- assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
- assert_equals(d.firstChild.data, RESULTS.HTML);
+ d.insertAdjacentHTML('afterbegin', html);
+ assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
+ assert_equals(d.firstChild.data, RESULTS.HTML);
- d.insertAdjacentHTML('beforeend', html);
- assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
- assert_equals(d.lastChild.data, RESULTS.HTML);
+ d.insertAdjacentHTML('beforeend', html);
+ assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
+ assert_equals(d.lastChild.data, RESULTS.HTML);
- d.insertAdjacentHTML('afterend', html);
- assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
- assert_equals(d.nextSibling.data, RESULTS.HTML);
+ d.insertAdjacentHTML('afterend', html);
+ assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
+ assert_equals(d.nextSibling.data, RESULTS.HTML);
- while (container.firstChild)
- container.firstChild.remove();
- }));
+ while (container.firstChild)
+ container.firstChild.remove();
}, "insertAdjacentHTML with html assigned via policy (successful HTML transformation).");
</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Element-outerHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Element-outerHTML.tentative.html
index a0bb6c1a5e3..c8daddfe995 100644
--- a/tests/wpt/web-platform-tests/trusted-types/Element-outerHTML.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/Element-outerHTML.tentative.html
@@ -5,20 +5,18 @@
<body>
<div id="container"></div>
<script>
- var container = document.querySelector('#container')
+ var container = document.querySelector('#container');
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
- var d = document.createElement('div');
- document.querySelector('#container').appendChild(d);
- d.outerHTML = html;
- assert_equals(container.innerText, RESULTS.HTML);
+ var d = document.createElement('div');
+ document.querySelector('#container').appendChild(d);
+ d.outerHTML = html;
+ assert_equals(container.innerText, RESULTS.HTML);
- while (container.firstChild)
- container.firstChild.remove();
- }));
+ while (container.firstChild)
+ container.firstChild.remove();
}, "outerHTML with html assigned via policy (successful HTML transformation).");
</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Element-setAttribute.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Element-setAttribute.tentative.html
new file mode 100644
index 00000000000..a284b2f8355
--- /dev/null
+++ b/tests/wpt/web-platform-tests/trusted-types/Element-setAttribute.tentative.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="support/helper.sub.js"></script>
+</head>
+<body>
+<script>
+ // TrustedURL Assignments
+ let testCases = [
+ [ 'a', 'href' ],
+ [ 'area', 'href' ],
+ [ 'base', 'href' ],
+ [ 'frame', 'src' ],
+ [ 'iframe', 'src' ],
+ [ 'img', 'src' ],
+ [ 'input', 'src' ],
+ [ 'link', 'href' ],
+ [ 'video', 'src' ],
+ [ 'object', 'data' ],
+ [ 'object', 'codeBase' ],
+ [ 'source', 'src' ],
+ [ 'track', 'src' ]
+ ];
+
+ testCases.forEach(c => {
+ test(t => {
+ assert_element_accepts_trusted_url_explicit_set(window, c, t, c[0], c[1], RESULTS.URL);
+ }, c[0] + "." + c[1] + " assigned via policy (successful URL transformation)");
+ });
+
+ // TrustedScriptURL Assignments
+ let scriptTestCases = [
+ [ 'embed', 'src' ],
+ [ 'script', 'src' ]
+ ];
+
+ scriptTestCases.forEach(c => {
+ test(t => {
+ assert_element_accepts_trusted_script_url_explicit_set(window, c, t, c[0], c[1], RESULTS.SCRIPTURL);
+ }, c[0] + "." + c[1] + " assigned via policy (successful ScriptURL transformation)");
+ });
+
+ // TrustedHTML Assignments
+ let HTMLTestCases = [
+ [ 'iframe', 'srcdoc' ]
+ ];
+
+ HTMLTestCases.forEach(c => {
+ test(t => {
+ assert_element_accepts_trusted_html_explicit_set(window, c, t, c[0], c[1], RESULTS.HTML);
+ }, c[0] + "." + c[1] + " assigned via policy (successful HTML transformation)");
+ });
+
+ // Other attributes can be assigned with TrustedTypes or strings or null values
+ test(t => {
+ assert_element_accepts_trusted_url_explicit_set(window, 'arel', t, 'a', 'rel', RESULTS.URL);
+ }, "a.rel assigned via policy (successful URL transformation)");
+
+ test(t => {
+ assert_element_accepts_non_trusted_type_explicit_set('a', 'rel', 'A string', 'A string');
+ }, "a.rel accepts strings");
+
+ test(t => {
+ assert_element_accepts_non_trusted_type_explicit_set('a', 'rel', null, 'null');
+ }, "a.rel accepts null");
+</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/HTMLElement-generic.tentative.html b/tests/wpt/web-platform-tests/trusted-types/HTMLElement-generic.tentative.html
index cea32a5a2df..2d381045118 100644
--- a/tests/wpt/web-platform-tests/trusted-types/HTMLElement-generic.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/HTMLElement-generic.tentative.html
@@ -6,6 +6,7 @@
</head>
<body>
<script>
+ var testnb = 0;
// TrustedURL Assignments
let testCases = [
[ 'a', 'href' ],
@@ -24,8 +25,8 @@
];
testCases.forEach(c => {
- async_test(t => {
- assert_element_accepts_trusted_url(window, t, c[0], c[1], RESULTS.URL);
+ test(t => {
+ assert_element_accepts_trusted_url(window, ++testnb, t, c[0], c[1], RESULTS.URL);
}, c[0] + "." + c[1] + " assigned via policy (successful URL transformation)");
});
@@ -35,9 +36,10 @@
[ 'script', 'src' ]
];
+ testnb = 0;
scriptTestCases.forEach(c => {
- async_test(t => {
- assert_element_accepts_trusted_script_url(window, t, c[0], c[1], RESULTS.SCRIPTURL);
+ test(t => {
+ assert_element_accepts_trusted_script_url(window, ++testnb, t, c[0], c[1], RESULTS.SCRIPTURL);
}, c[0] + "." + c[1] + " assigned via policy (successful ScriptURL transformation)");
});
@@ -47,9 +49,10 @@
[ 'iframe', 'srcdoc' ]
];
+ testnb = 0;
HTMLTestCases.forEach(c => {
- async_test(t => {
- assert_element_accepts_trusted_html(window, t, c[0], c[1], RESULTS.HTML);
+ test(t => {
+ assert_element_accepts_trusted_html(window, ++testnb, t, c[0], c[1], RESULTS.HTML);
}, c[0] + "." + c[1] + " assigned via policy (successful HTML transformation)");
});
</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Location-assign.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Location-assign.tentative.html
index 13cca567948..62f98e96d7f 100644
--- a/tests/wpt/web-platform-tests/trusted-types/Location-assign.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/Location-assign.tentative.html
@@ -4,12 +4,10 @@
<script src="support/helper.sub.js"></script>
<body>
<script>
- async_test(t => {
- createURL_policy(window)
- .then(t.step_func_done(p => {
- let url = p.createURL(location.href + "#xxx");
- location.assign(url);
- assert_equals("" + url, location.href, "location href");
- }));
+ test(t => {
+ let p = createURL_policy(window, 1);
+ let url = p.createURL(location.href + "#xxx");
+ location.assign(url);
+ assert_equals("" + url, location.href, "location href");
}, "location.assign via policy (successful URL transformation).");
</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Location-href.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Location-href.tentative.html
index d759d28593e..bacadf6a91b 100644
--- a/tests/wpt/web-platform-tests/trusted-types/Location-href.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/Location-href.tentative.html
@@ -4,12 +4,10 @@
<script src="support/helper.sub.js"></script>
<body>
<script>
- async_test(t => {
- createURL_policy(window)
- .then(t.step_func_done(p => {
- let url = p.createURL(location.href + "#xxx");
- location.href = url;
- assert_equals("" + url, location.href, "location href");
- }));
+ test(t => {
+ let p = createURL_policy(window, 1);
+ let url = p.createURL(location.href + "#xxx");
+ location.href = url;
+ assert_equals("" + url, location.href, "location href");
}, "location.href assigned via policy (successful URL transformation).");
</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Location-replace.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Location-replace.tentative.html
index 7d84905d198..4fb53d02609 100644
--- a/tests/wpt/web-platform-tests/trusted-types/Location-replace.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/Location-replace.tentative.html
@@ -4,12 +4,10 @@
<script src="support/helper.sub.js"></script>
<body>
<script>
- async_test(t => {
- createURL_policy(window)
- .then(t.step_func_done(p => {
- let url = p.createURL(location.href + "#xxx");
- location.replace(url);
- assert_equals("" + url, location.href, "location href");
- }));
+ test(t => {
+ let p = createURL_policy(window, 1);
+ let url = p.createURL(location.href + "#xxx");
+ location.replace(url);
+ assert_equals("" + url, location.href, "location href");
}, "location.replace via policy (successful URL transformation).");
</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Range-createContextualFragment.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Range-createContextualFragment.tentative.html
index 3d45b33486d..3a880a53778 100644
--- a/tests/wpt/web-platform-tests/trusted-types/Range-createContextualFragment.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/Range-createContextualFragment.tentative.html
@@ -4,14 +4,12 @@
<script src="support/helper.sub.js"></script>
<body>
<script>
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
- var range = document.createRange();
- range.selectNodeContents(document.documentElement);
- var result = range.createContextualFragment(html);
- assert_equals(result.textContent, RESULTS.HTML);
- }));
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
+ var range = document.createRange();
+ range.selectNodeContents(document.documentElement);
+ var result = range.createContextualFragment(html);
+ assert_equals(result.textContent, RESULTS.HTML);
}, "range.createContextualFragment assigned via policy (successful HTML transformation).");
</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html
new file mode 100644
index 00000000000..b20fcf2436e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html
@@ -0,0 +1,294 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js" ></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+ //HTML tests
+ function createHTMLTest(policyName, policy, expectedHTML, t) {
+ let p = window.TrustedTypes.createPolicy(policyName, policy);
+ assert_true(p.createHTML('whatever') instanceof TrustedHTML);
+ assert_equals(p.createHTML('whatever') + "", expectedHTML);
+ }
+
+ test(t => {
+ createHTMLTest('TestPolicyHTML1', { createHTML: s => s }, 'whatever', t);
+ }, "html = identity function");
+
+ test(t => {
+ createHTMLTest('TestPolicyHTML2', { createHTML: s => null }, "null", t);
+ }, "html = null");
+
+ var HTMLstr = 'well, ';
+ test(t => {
+ createHTMLTest('TestPolicyHTML3', { createHTML: s => HTMLstr + s }, HTMLstr + 'whatever', t);
+ }, "html = string + global string");
+
+ var HTMLx = 'global';
+ test(t => {
+ createHTMLTest('TestPolicyHTML4', { createHTML: s => { HTMLx = s; return s; } }, 'whatever', t);
+ assert_equals(HTMLx, 'whatever');
+ }, "html = identity function, global string changed");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyHTML5', { createHTML: s => { throw new Error(); }});
+ assert_throws(new Error(), _ => {
+ p.createHTML('whatever');
+ });
+ }, "html = callback that throws");
+
+ var obj = {
+ "foo": "well,"
+ }
+
+ function getHTML(s) {
+ return this.foo + " " + s;
+ }
+
+ test(t => {
+ createHTMLTest('TestPolicyHTML6', { createHTML: getHTML.bind(obj) }, 'well, whatever', t);
+ }, "html = this bound to an object");
+
+ var foo = "well,";
+ test(t => {
+ createHTMLTest('TestPolicyHTML7', { createHTML: s => getHTML(s) }, 'well, whatever', t);
+ }, "html = this without bind");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyHTML8', null);
+ assert_throws(new TypeError(), _ => {
+ p.createHTML('whatever');
+ });
+ }, "html - calling undefined callback throws");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyHTML9', { createHTML: createHTMLJS });
+ assert_throws(new TypeError(), _ => {
+ p.createScript(INPUTS.SCRIPT);
+ });
+ assert_throws(new TypeError(), _ => {
+ p.createScriptURL(INPUTS.SCRIPTURL);
+ });
+ assert_throws(new TypeError(), _ => {
+ p.createURL(INPUTS.URL);
+ });
+ }, "createHTML defined - calling undefined callbacks throws");
+
+ //Script tests
+ function createScriptTest(policyName, policy, expectedScript, t) {
+ let p = window.TrustedTypes.createPolicy(policyName, policy);
+ assert_true(p.createScript('whatever') instanceof TrustedScript);
+ assert_equals(p.createScript('whatever') + "", expectedScript);
+ }
+
+ test(t => {
+ createScriptTest('TestPolicyScript1', { createScript: s => s }, 'whatever', t);
+ }, "script = identity function");
+
+ test(t => {
+ createScriptTest('TestPolicyScript2', { createScript: s => null }, "null", t);
+ }, "script = null");
+
+ var Scriptstr = 'well, ';
+ test(t => {
+ createScriptTest('TestPolicyScript3', { createScript: s => Scriptstr + s }, Scriptstr + 'whatever', t);
+ }, "script = string + global string");
+
+ var Scriptx = 'global';
+ test(t => {
+ createScriptTest('TestPolicyScript4', { createScript: s => { Scriptx = s; return s; } }, 'whatever', t);
+ assert_equals(Scriptx, 'whatever');
+ }, "script = identity function, global string changed");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyScript5', {
+ createScript: s => { throw new Error(); }
+ });
+ assert_throws(new Error(), _ => {
+ p.createScript('whatever');
+ });
+ }, "script = callback that throws");
+
+ var obj = {
+ "foo": "well,"
+ }
+
+ function getScript(s) {
+ return this.foo + " " + s;
+ }
+
+ test(t => {
+ createScriptTest('TestPolicyScript6', { createScript: getScript.bind(obj) }, 'well, whatever', t);
+ }, "script = this bound to an object");
+
+ var foo = "well,";
+ test(t => {
+ createScriptTest('TestPolicyScript7', { createScript: s => getScript(s) }, 'well, whatever', t);
+ }, "script = this without bind");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyScript8', null);
+ assert_throws(new TypeError(), _ => {
+ p.createScript('whatever');
+ });
+ }, "script - calling undefined callback throws");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyScript9', { createScript: createScriptJS });
+ assert_throws(new TypeError(), _ => {
+ p.createHTML(INPUTS.HTML);
+ });
+ assert_throws(new TypeError(), _ => {
+ p.createScriptURL(INPUTS.SCRIPTURL);
+ });
+ assert_throws(new TypeError(), _ => {
+ p.createURL(INPUTS.URL);
+ });
+ }, "createScript defined - calling undefined callbacks throws");
+
+
+ //ScriptURL tests
+ function createScriptURLTest(policyName, policy, expectedScriptURL, t) {
+ let p = window.TrustedTypes.createPolicy(policyName, policy);
+ assert_true(p.createScriptURL(INPUTS.SCRIPTURL) instanceof TrustedScriptURL);
+ assert_equals(p.createScriptURL(INPUTS.SCRIPTURL) + "", expectedScriptURL);
+ }
+
+ test(t => {
+ createScriptURLTest('TestPolicyScriptURL1', { createScriptURL: s => s }, INPUTS.SCRIPTURL, t);
+ }, "script_url = identity function");
+
+ test(t => {
+ createScriptURLTest('TestPolicyScriptURL2', { createScriptURL: s => null }, "", t);
+ }, "script_url = null");
+
+ var scriptURLstr = '#duck';
+ test(t => {
+ createScriptURLTest('TestPolicyScriptURL3', { createScriptURL: s => s + scriptURLstr }, INPUTS.SCRIPTURL + scriptURLstr, t);
+ }, "script_url = string + global string");
+
+ var scriptURLx = 'global';
+ test(t => {
+ createScriptURLTest('TestPolicyScriptURL4', { createScriptURL: s => { ScriptURLx = s; return s; } }, INPUTS.SCRIPTURL, t);
+ assert_equals(ScriptURLx, INPUTS.SCRIPTURL);
+ }, "script_url = identity function, global string changed");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyScriptURL5', {
+ createScriptURL: s => { throw new Error(); }
+ });
+ assert_throws(new Error(), _ => {
+ p.createScriptURL(INPUTS.SCRIPTURL);
+ });
+ }, "script_url = callback that throws");
+
+ function getScriptURL(s) {
+ return s + this.baz;
+ }
+
+ var obj = {
+ "baz": "#duck"
+ }
+
+ test(t => {
+ createScriptURLTest('TestPolicyScriptURL6', { createScriptURL: getScriptURL.bind(obj) }, INPUTS.SCRIPTURL + "#duck", t);
+ }, "script_url = this bound to an object");
+
+ var baz = "#duck";
+ test(t => {
+ createScriptURLTest('TestPolicyScriptURL7', { createScriptURL: s => getScriptURL(s) }, INPUTS.SCRIPTURL + baz, t);
+ }, "script_url = this without bind");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyScriptURL8', null);
+ assert_throws(new TypeError(), _ => {
+ p.createScriptURL(INPUTS.SCRIPTURL);
+ });
+ }, "script_url - calling undefined callback throws");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyScriptURL9', { createScriptURL: createScriptURLJS });
+ assert_throws(new TypeError(), _ => {
+ p.createHTML(INPUTS.HTML);
+ });
+ assert_throws(new TypeError(), _ => {
+ p.createScript(INPUTS.SCRIPT);
+ });
+ assert_throws(new TypeError(), _ => {
+ p.createURL(INPUTS.URL);
+ });
+ }, "createScriptURL defined - calling undefined callbacks throws");
+
+
+ //URL tests
+ function createURLTest(policyName, policy, expectedURL, t) {
+ let p = window.TrustedTypes.createPolicy(policyName, policy);
+ assert_true(p.createURL(INPUTS.URL) instanceof TrustedURL);
+ assert_equals(p.createURL(INPUTS.URL) + "", expectedURL);
+ }
+
+ test(t => {
+ createURLTest('TestPolicyURL1', { createURL: s => s }, INPUTS.URL, t);
+ }, "url = identity function");
+
+ test(t => {
+ createURLTest('TestPolicyURL2', { createURL: s => null }, "", t);
+ }, "url = null");
+
+ var URLstr = '#x';
+ test(t => {
+ createURLTest('TestPolicyURL3', { createURL: s => s + URLstr }, INPUTS.URL + URLstr, t);
+ }, "url = string + global string");
+
+ var URLx = 'global';
+ test(t => {
+ createURLTest('TestPolicyURL4', { createURL: s => { URLx = s; return s; } }, INPUTS.URL, t);
+ assert_equals(URLx, INPUTS.URL);
+ }, "url = identity function, global string changed");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyURL5', {
+ createURL: s => { throw new Error(); }
+ });
+ assert_throws(new Error(), _ => {
+ p.createURL(INPUTS.URL);
+ });
+ }, "url = callback that throws");
+
+ function getURL(s) {
+ return s + this.bar;
+ }
+
+ var obj = {
+ "bar": "#x"
+ }
+
+ test(t => {
+ createURLTest('TestPolicyURL6', { createURL: getURL.bind(obj) }, INPUTS.URL + "#x", t);
+ }, "url = this bound to an object");
+
+ var bar = "#x";
+ test(t => {
+ createURLTest('TestPolicyURL7', { createURL: s => getURL(s) }, INPUTS.URL + bar, t);
+ }, "url = this without bind");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyURL8', null);
+ assert_throws(new TypeError(), _ => {
+ p.createURL(INPUTS.URL);
+ });
+ }, "url - calling undefined callback throws");
+
+ test(t => {
+ let p = window.TrustedTypes.createPolicy('TestPolicyURL9', { createURL: createURLJS });
+ assert_throws(new TypeError(), _ => {
+ p.createHTML(INPUTS.HTML);
+ });
+ assert_throws(new TypeError(), _ => {
+ p.createScript(INPUTS.SCRIPT);
+ });
+ assert_throws(new TypeError(), _ => {
+ p.createScriptURL(INPUTS.SCRIPTURL);
+ });
+ }, "createURL defined - calling undefined callbacks throws");
+</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html
new file mode 100644
index 00000000000..49a9506b5a7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js" ></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<meta http-equiv="Content-Security-Policy" content="trusted-types">
+<body>
+<script>
+ //No name given test
+ test(t => {
+ let policy = window.TrustedTypes.createPolicy('SomeName', { createHTML: s => s } );
+ assert_equals(policy.name, 'SomeName');
+ }, "No name list given - policy creation works");
+</script>
+
diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html
new file mode 100644
index 00000000000..9daf20ec186
--- /dev/null
+++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js" ></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<meta http-equiv="Content-Security-Policy" content="trusted-types SomeName JustOneMoreName">
+<body>
+<script>
+ //Whitelisted name test
+ test(t => {
+ let policy = window.TrustedTypes.createPolicy('SomeName', { createHTML: s => s } );
+ assert_equals(policy.name, 'SomeName');
+ }, "Whitelisted policy creation works");
+ //Another whitelisted name test
+ test(t => {
+ let policy = window.TrustedTypes.createPolicy('JustOneMoreName', { createHTML: s => s } );
+ assert_equals(policy.name, 'JustOneMoreName');
+ }, "Another whitelisted policy creation works");
+ //Non-whitelisted names test
+ test(t => {
+ assert_throws(new TypeError(), _ => {
+ window.TrustedTypes.createPolicy('SomeOtherName', { createURL: s => s } );
+ });
+ }, "Non-whitelisted policy creation throws");
+</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-exposedTests.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-exposedTests.tentative.html
new file mode 100644
index 00000000000..af6e04941c3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-exposedTests.tentative.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js" ></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+ //Not exposed policy test
+ test(t => {
+ let policy = window.TrustedTypes.createPolicy('SomeName', { createHTML: s => s } );
+ assert_equals(window.TrustedTypes.getExposedPolicy('SomeName'), null);
+ }, "Null is returned when policy is not exposed");
+
+ //Non-existent policy test
+ test(t => {
+ let policy = window.TrustedTypes.createPolicy('SomeOtherName', { createHTML: s => s } );
+ assert_equals(window.TrustedTypes.getExposedPolicy('JustAName'), null);
+ }, "Null is returned when policy is non-existent");
+
+ //Exposed policy test
+ test(t => {
+ let policy = window.TrustedTypes.createPolicy('EvenSomeOtherName', { createHTML: s => s }, true );
+ assert_equals(window.TrustedTypes.getExposedPolicy('EvenSomeOtherName'), policy);
+ }, "Policy is returned when exposed == true");
+</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html
new file mode 100644
index 00000000000..6d43e0bafc6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js" ></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+ //Policy name test
+ test(t => {
+ let policy = window.TrustedTypes.createPolicy('SomeName', { createHTML: s => s } );
+ assert_true(policy instanceof TrustedTypePolicy);
+ assert_equals(policy.name, 'SomeName');
+ }, "policy.name = name");
+
+ //Duplicate names test
+ test(t => {
+ assert_throws(new TypeError(), _ => {
+ window.TrustedTypes.createPolicy('SomeName', { createURL: s => s } );
+ });
+ }, "duplicate policy name attempt throws");
+
+ //Retrieve policy names tests
+ test(t => {
+ let policy = window.TrustedTypes.createPolicy('SomeOtherName', { createURL: s => s } );
+ let names = window.TrustedTypes.getPolicyNames();
+ assert_true(names.includes('SomeName'));
+ assert_true(names.includes('SomeOtherName'));
+ }, "Retrieving policy names");
+</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html
deleted file mode 100644
index 76e6d130b05..00000000000
--- a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html
+++ /dev/null
@@ -1,299 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js" ></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
- //Policy name test
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', { createHTML: s => s } )
- .then(t.step_func_done(policy => {
- assert_true(policy instanceof TrustedTypePolicy);
- assert_equals(policy.name, 'SomeName');
- }));
- }, "policy.name = name");
-
- //HTML tests
- function createHTMLTest(policy, expectedHTML, t) {
- window.trustedTypes.createPolicy('SomeName', policy)
- .then(t.step_func_done(p => {
- assert_true(p.createHTML('whatever') instanceof TrustedHTML);
- assert_equals(p.createHTML('whatever') + "", expectedHTML);
- }));
- }
-
- async_test(t => {
- createHTMLTest( { createHTML: s => s }, 'whatever', t);
- }, "html = identity function");
-
- async_test(t => {
- createHTMLTest( { createHTML: s => null }, "null", t);
- }, "html = null");
-
- var HTMLstr = 'well, ';
- async_test(t => {
- createHTMLTest( { createHTML: s => HTMLstr + s }, HTMLstr + 'whatever', t);
- }, "html = string + global string");
-
- var HTMLx = 'global';
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', {
- createHTML: s => { HTMLx = s; return s; }
- })
- .then(t.step_func_done(p => {
- assert_true(p.createHTML('whatever') instanceof TrustedHTML);
- assert_equals(p.createHTML('whatever') + "", 'whatever');
- assert_equals(HTMLx, 'whatever');
- }));
- }, "html = identity function, global string changed");
-
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', {
- createHTML: s => { throw new Error(); }
- })
- .then(t.step_func_done(p => {
- assert_throws(new Error(), _ => {
- p.createHTML('whatever');
- });
- }));
- }, "html = callback that throws");
-
- var obj = {
- "foo": "well,"
- }
-
- function getHTML(s) {
- return this.foo + " " + s;
- }
-
- async_test(t => {
- createHTMLTest( {
- createHTML: getHTML.bind(obj)},
- 'well, whatever', t);
- }, "html = this bound to an object");
-
- var foo = "well,";
- async_test(t => {
- createHTMLTest( { createHTML: s => getHTML(s) }, 'well, whatever', t);
- }, "html = this without bind");
-
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', null)
- .then(t.step_func_done(p => {
- assert_equals(p.createHTML('whatever'), null);
- }));
- }, "html - calling undefined callback");
-
- //Script tests
- function createScriptTest(policy, expectedScript, t) {
- let p = window.trustedTypes.createPolicy('SomeName', policy)
- .then(t.step_func_done(p => {
- assert_true(p.createScript('whatever') instanceof TrustedScript);
- assert_equals(p.createScript('whatever') + "", expectedScript);
- }));
- }
-
- async_test(t => {
- createScriptTest( { createScript: s => s }, 'whatever', t);
- }, "script = identity function");
-
- async_test(t => {
- createScriptTest( { createScript: s => null }, "null", t);
- }, "script = null");
-
- var Scriptstr = 'well, ';
- async_test(t => {
- createScriptTest( { createScript: s => Scriptstr + s }, Scriptstr + 'whatever', t);
- }, "script = string + global string");
-
- var Scriptx = 'global';
- async_test(t => {
- let p = window.trustedTypes.createPolicy('SomeName', {
- createScript: s => { Scriptx = s; return s; }
- })
- .then(t.step_func_done(p => {
- assert_true(p.createScript('whatever') instanceof TrustedScript);
- assert_equals(p.createScript('whatever') + "", 'whatever');
- assert_equals(Scriptx, 'whatever');
- }));
- }, "script = identity function, global string changed");
-
- async_test(t => {
- let p = window.trustedTypes.createPolicy('SomeName', {
- createScript: s => { throw new Error(); }
- })
- .then(t.step_func_done(p => {
- assert_throws(new Error(), _ => {
- p.createScript('whatever');
- });
- }));
- }, "script = callback that throws");
-
- var obj = {
- "foo": "well,"
- }
-
- function getScript(s) {
- return this.foo + " " + s;
- }
-
- async_test(t => {
- createScriptTest( {
- createScript: getScript.bind(obj)},
- 'well, whatever', t);
- }, "script = this bound to an object");
-
- var foo = "well,";
- async_test(t => {
- createScriptTest( { createScript: s => getScript(s) }, 'well, whatever', t);
- }, "script = this without bind");
-
- async_test(t => {
- let p = window.trustedTypes.createPolicy('SomeName', null)
- .then(t.step_func_done(p => {
- assert_equals(p.createScript('whatever'), null);
- }));
- }, "script - calling undefined callback");
-
- //ScriptURL tests
- function createScriptURLTest(policy, expectedScriptURL, t) {
- window.trustedTypes.createPolicy('SomeName', policy)
- .then(t.step_func_done(p => {
- assert_true(p.createScriptURL(INPUTS.SCRIPTURL) instanceof TrustedScriptURL);
- assert_equals(p.createScriptURL(INPUTS.SCRIPTURL) + "", expectedScriptURL);
- }));
- }
-
- async_test(t => {
- createScriptURLTest( { createScriptURL: s => s }, INPUTS.SCRIPTURL, t);
- }, "script_url = identity function");
-
- async_test(t => {
- createScriptURLTest( { createScriptURL: s => null }, "", t);
- }, "script_url = null");
-
- var scriptURLstr = '#duck';
- async_test(t => {
- createScriptURLTest( { createScriptURL: s => s + scriptURLstr }, INPUTS.SCRIPTURL + scriptURLstr, t);
- }, "script_url = string + global string");
-
- var scriptURLx = 'global';
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', {
- createScriptURL: s => { ScriptURLx = s; return s; }
- })
- .then(t.step_func_done(p => {
- assert_true(p.createScriptURL(INPUTS.SCRIPTURL) instanceof TrustedScriptURL);
- assert_equals(p.createScriptURL(INPUTS.SCRIPTURL) + "", INPUTS.SCRIPTURL);
- assert_equals(ScriptURLx, INPUTS.SCRIPTURL);
- }));
- }, "script_url = identity function, global string changed");
-
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', {
- createScriptURL: s => { throw new Error(); }
- })
- .then(t.step_func_done(p => {
- assert_throws(new Error(), _ => {
- p.createScriptURL(INPUTS.SCRIPTURL);
- });
- }));
- }, "script_url = callback that throws");
-
- function getScriptURL(s) {
- return s + this.baz;
- }
-
- var obj = {
- "baz": "#duck"
- }
-
- async_test(t => {
- createScriptURLTest( {
- createScriptURL: getScriptURL.bind(obj)},
- INPUTS.SCRIPTURL + "#duck", t);
- }, "script_url = this bound to an object");
-
- var baz = "#duck";
- async_test(t => {
- createScriptURLTest( { createScriptURL: s => getScriptURL(s) }, INPUTS.SCRIPTURL + baz, t);
- }, "script_url = this without bind");
-
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', null)
- .then(t.step_func_done(p => {
- assert_equals(p.createScriptURL(INPUTS.SCRIPTURL), null);
- }));
- }, "script_url - calling undefined callback");
-
- //URL tests
- function createURLTest(policy, expectedURL, t) {
- window.trustedTypes.createPolicy('SomeName', policy)
- .then(t.step_func_done(p => {
- assert_true(p.createURL(INPUTS.URL) instanceof TrustedURL);
- assert_equals(p.createURL(INPUTS.URL) + "", expectedURL);
- }));
- }
-
- async_test(t => {
- createURLTest( { createURL: s => s }, INPUTS.URL, t);
- }, "url = identity function");
-
- async_test(t => {
- createURLTest( { createURL: s => null }, "", t);
- }, "url = null");
-
- var URLstr = '#x';
- async_test(t => {
- createURLTest( { createURL: s => s + URLstr }, INPUTS.URL + URLstr, t);
- }, "url = string + global string");
-
- var URLx = 'global';
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', {
- createURL: s => { URLx = s; return s; }
- })
- .then(t.step_func_done(p => {
- assert_true(p.createURL(INPUTS.URL) instanceof TrustedURL);
- assert_equals(p.createURL(INPUTS.URL) + "", INPUTS.URL);
- assert_equals(URLx, INPUTS.URL);
- }));
- }, "url = identity function, global string changed");
-
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', {
- createURL: s => { throw new Error(); }
- })
- .then(t.step_func_done(p => {
- assert_throws(new Error(), _ => {
- p.createURL(INPUTS.URL);
- });
- }));
- }, "url = callback that throws");
-
- function getURL(s) {
- return s + this.bar;
- }
-
- var obj = {
- "bar": "#x"
- }
-
- async_test(t => {
- createURLTest( {
- createURL: getURL.bind(obj)},
- INPUTS.URL + "#x", t);
- }, "url = this bound to an object");
-
- var bar = "#x";
- async_test(t => {
- createURLTest( { createURL: s => getURL(s) }, INPUTS.URL + bar, t);
- }, "url = this without bind");
-
- async_test(t => {
- window.trustedTypes.createPolicy('SomeName', null)
- .then(t.step_func_done(p => {
- assert_equals(p.createURL(INPUTS.URL), null);
- }));
- }, "url - calling undefined callback");
-</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Window-TrustedTypes.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Window-TrustedTypes.tentative.html
new file mode 100644
index 00000000000..8e20e492e6a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/trusted-types/Window-TrustedTypes.tentative.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+ test(t => {
+ let factory = window.TrustedTypes;
+ assert_true(factory instanceof TrustedTypePolicyFactory);
+ }, "factory = window.TrustedTypes");
+</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Window-open.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Window-open.tentative.html
index c005fbba143..172d566e57f 100644
--- a/tests/wpt/web-platform-tests/trusted-types/Window-open.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/Window-open.tentative.html
@@ -5,23 +5,21 @@
<body>
<script>
// helper functions for the tests
- function testWindowOpen(t, win) {
- createURL_policy(window)
- .then(t.step_func_done(p => {
- let url = p.createURL(INPUTS.URL);
- let child_window = win.open(url, "", "");
- child_window.onload = t.step_func_done(_ => {
- assert_equals(child_window.location.href, "" + url);
- child_window.close();
- });
- }));
+ function testWindowOpen(t, win, testNumber) {
+ let p = createURL_policy(window, testNumber);
+ let url = p.createURL(INPUTS.URL);
+ let child_window = win.open(url, "", "");
+ child_window.onload = t.step_func_done(_ => {
+ assert_equals(child_window.location.href, "" + url);
+ child_window.close();
+ });
}
- async_test(t => {
- testWindowOpen(t, window);
+ test(t => {
+ testWindowOpen(t, window, 1);
}, "window.open via policy (successful URL transformation).");
- async_test(t => {
- testWindowOpen(t, document);
+ test(t => {
+ testWindowOpen(t, document, 2);
}, "document.open via policy (successful URL transformation).");
</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/Window-trustedTypes.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Window-trustedTypes.tentative.html
deleted file mode 100644
index ef4487749dd..00000000000
--- a/tests/wpt/web-platform-tests/trusted-types/Window-trustedTypes.tentative.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
- test(t => {
- let factory = window.trustedTypes;
- assert_true(factory instanceof TrustedTypePolicyFactory);
- }, "factory = window.trustedTypes");
-</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html
index cc575dc0085..366bdd2ab6d 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html
@@ -3,18 +3,16 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
-<meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+<meta http-equiv="Content-Security-Policy" content="trusted-types">
<body>
<script>
// Trusted HTML assignments do not throw.
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
- let parser = new DOMParser();
- let doc = parser.parseFromString(html, "text/html");
- assert_equals(doc.body.innerText, RESULTS.HTML);
- }));
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
+ let parser = new DOMParser();
+ let doc = parser.parseFromString(html, "text/html");
+ assert_equals(doc.body.innerText, RESULTS.HTML);
}, "document.innerText assigned via policy (successful HTML transformation).");
// String assignments throw.
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html
index 28813d72e0e..ce530d49bb6 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html
@@ -5,18 +5,16 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
- <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+ <meta http-equiv="Content-Security-Policy" content="trusted-types">
</head>
<body>
<script>
// TrustedURL assignments do not throw.
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
- document.write(html);
- assert_equals(document.body.innerText, RESULTS.HTML);
- }));
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
+ document.write(html);
+ assert_equals(document.body.innerText, RESULTS.HTML);
}, "document.write with html assigned via policy (successful URL transformation).");
// String assignments throw.
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html
index ad94b44e8fb..593d6c64a7c 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html
@@ -5,7 +5,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
- <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+ <meta http-equiv="Content-Security-Policy" content="trusted-types">
</head>
<body>
<div id="container"></div>
@@ -13,33 +13,31 @@
var container = document.querySelector('#container');
// Trusted HTML assignments do not throw.
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
- var d = document.createElement('div');
- container.appendChild(d);
+ var d = document.createElement('div');
+ container.appendChild(d);
- d.insertAdjacentHTML('beforebegin', html);
- assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
- assert_equals(d.previousSibling.data, RESULTS.HTML);
+ d.insertAdjacentHTML('beforebegin', html);
+ assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
+ assert_equals(d.previousSibling.data, RESULTS.HTML);
- d.insertAdjacentHTML('afterbegin', html);
- assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
- assert_equals(d.firstChild.data, RESULTS.HTML);
+ d.insertAdjacentHTML('afterbegin', html);
+ assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
+ assert_equals(d.firstChild.data, RESULTS.HTML);
- d.insertAdjacentHTML('beforeend', html);
- assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
- assert_equals(d.lastChild.data, RESULTS.HTML);
+ d.insertAdjacentHTML('beforeend', html);
+ assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
+ assert_equals(d.lastChild.data, RESULTS.HTML);
- d.insertAdjacentHTML('afterend', html);
- assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
- assert_equals(d.nextSibling.data, RESULTS.HTML);
+ d.insertAdjacentHTML('afterend', html);
+ assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
+ assert_equals(d.nextSibling.data, RESULTS.HTML);
- while (container.firstChild)
- container.firstChild.remove();
- }));
+ while (container.firstChild)
+ container.firstChild.remove();
}, "insertAdjacentHTML with html assigned via policy (successful HTML transformation).");
// String assignments throw.
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html
index 47f1165b1a6..c9bde5eb6d5 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html
@@ -5,7 +5,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
- <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+ <meta http-equiv="Content-Security-Policy" content="trusted-types">
</head>
<body>
<div id="container"></div>
@@ -13,19 +13,17 @@
var container = document.querySelector('#container')
// TrustedHTML assignments do not throw.
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
- var d = document.createElement('div');
- document.querySelector('#container').appendChild(d);
- d.outerHTML = html;
- assert_equals(container.innerText, RESULTS.HTML);
+ var d = document.createElement('div');
+ document.querySelector('#container').appendChild(d);
+ d.outerHTML = html;
+ assert_equals(container.innerText, RESULTS.HTML);
- while (container.firstChild)
- container.firstChild.remove();
- }));
+ while (container.firstChild)
+ container.firstChild.remove();
}, "outerHTML with html assigned via policy (successful HTML transformation).");
// String assignments throw.
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html
new file mode 100644
index 00000000000..52e31708331
--- /dev/null
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="support/helper.sub.js"></script>
+
+ <meta http-equiv="Content-Security-Policy" content="trusted-types">
+</head>
+<body>
+<script>
+ // TrustedURL Assignments
+ let testCases = [
+ [ 'a', 'href' ],
+ [ 'area', 'href' ],
+ [ 'base', 'href' ],
+ [ 'frame', 'src' ],
+ [ 'iframe', 'src' ],
+ [ 'img', 'src' ],
+ [ 'input', 'src' ],
+ [ 'link', 'href' ],
+ [ 'video', 'src' ],
+ [ 'object', 'data' ],
+ [ 'object', 'codeBase' ],
+ [ 'source', 'src' ],
+ [ 'track', 'src' ]
+ ];
+
+ testCases.forEach(c => {
+ test(t => {
+ assert_element_accepts_trusted_url_explicit_set(window, c, t, c[0], c[1], RESULTS.URL);
+ assert_throws_no_trusted_type_explicit_set(c[0], c[1], 'A string');
+ assert_throws_no_trusted_type_explicit_set(c[0], c[1], null);
+ }, c[0] + "." + c[1] + " accepts only TrustedURL");
+ });
+
+ // TrustedScriptURL Assignments
+ let scriptTestCases = [
+ [ 'embed', 'src' ],
+ [ 'script', 'src' ]
+ ];
+
+ scriptTestCases.forEach(c => {
+ test(t => {
+ assert_element_accepts_trusted_script_url_explicit_set(window, c, t, c[0], c[1], RESULTS.SCRIPTURL);
+ assert_throws_no_trusted_type_explicit_set(c[0], c[1], 'A string');
+ assert_throws_no_trusted_type_explicit_set(c[0], c[1], null);
+ }, c[0] + "." + c[1] + " accepts only TrustedScriptURL");
+ });
+
+ // TrustedHTML Assignments
+ let HTMLTestCases = [
+ [ 'iframe', 'srcdoc' ]
+ ];
+
+ HTMLTestCases.forEach(c => {
+ test(t => {
+ assert_element_accepts_trusted_html_explicit_set(window, c, t, c[0], c[1], RESULTS.HTML);
+ assert_throws_no_trusted_type_explicit_set(c[0], c[1], 'A string');
+ assert_throws_no_trusted_type_explicit_set(c[0], c[1], null);
+ }, c[0] + "." + c[1] + " accepts only TrustedHTML");
+ });
+
+ // Other attributes can be assigned with TrustedTypes or strings or null values
+ test(t => {
+ assert_element_accepts_trusted_url_explicit_set(window, 'arel', t, 'a', 'rel', RESULTS.URL);
+ }, "a.rel assigned via policy (successful URL transformation)");
+
+ test(t => {
+ assert_element_accepts_non_trusted_type_explicit_set('a', 'rel', 'A string', 'A string');
+ }, "a.rel accepts strings");
+
+ test(t => {
+ assert_element_accepts_non_trusted_type_explicit_set('a', 'rel', null, 'null');
+ }, "a.rel accepts null");
+</script>
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html
index eae52626190..f31fce629bc 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html
@@ -5,10 +5,11 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
- <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+ <meta http-equiv="Content-Security-Policy" content="trusted-types">
</head>
<body>
<script>
+ var testnb = 0;
// TrustedURL Assignments
let testCases = [
[ 'a', 'href' ],
@@ -27,8 +28,8 @@
];
testCases.forEach(c => {
- async_test(t => {
- assert_element_accepts_trusted_url(window, t, c[0], c[1], RESULTS.URL);
+ test(t => {
+ assert_element_accepts_trusted_url(window, ++testnb, t, c[0], c[1], RESULTS.URL);
assert_throws_no_trusted_type(c[0], c[1], 'A string');
assert_throws_no_trusted_type(c[0], c[1], null);
}, c[0] + "." + c[1] + " accepts only TrustedURL");
@@ -40,9 +41,10 @@
[ 'script', 'src' ]
];
+ testnb = 0;
scriptTestCases.forEach(c => {
- async_test(t => {
- assert_element_accepts_trusted_script_url(window, t, c[0], c[1], RESULTS.SCRIPTURL);
+ test(t => {
+ assert_element_accepts_trusted_script_url(window, ++testnb, t, c[0], c[1], RESULTS.SCRIPTURL);
assert_throws_no_trusted_type(c[0], c[1], 'A string');
assert_throws_no_trusted_type(c[0], c[1], null);
}, c[0] + "." + c[1] + " accepts only TrustedScriptURL");
@@ -54,9 +56,10 @@
[ 'iframe', 'srcdoc' ]
];
+ testnb = 0;
HTMLTestCases.forEach(c => {
- async_test(t => {
- assert_element_accepts_trusted_html(window, t, c[0], c[1], RESULTS.HTML);
+ test(t => {
+ assert_element_accepts_trusted_html(window, ++testnb, t, c[0], c[1], RESULTS.HTML);
assert_throws_no_trusted_type(c[0], c[1], 'A string');
assert_throws_no_trusted_type(c[0], c[1], null);
}, c[0] + "." + c[1] + " accepts only TrustedHTML");
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html
index 8079335bc58..5de5fecda0b 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html
@@ -5,18 +5,16 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
- <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+ <meta http-equiv="Content-Security-Policy" content="trusted-types">
</head>
<body>
<script>
// TrustedURL assignments do not throw.
- async_test(t => {
- createURL_policy(window)
- .then(t.step_func_done(p => {
- let url = p.createURL(location.href + "#xxx");
- location.assign(url);
- assert_equals("" + url, location.href, "location href");
- }));
+ test(t => {
+ let p = createURL_policy(window, 1);
+ let url = p.createURL(location.href + "#xxx");
+ location.assign(url);
+ assert_equals("" + url, location.href, "location href");
}, "location.assign via policy (successful URL transformation).");
// String assignments throw.
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-href.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-href.tentative.html
index 4e393f92506..24312617892 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-href.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-href.tentative.html
@@ -5,18 +5,16 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
- <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+ <meta http-equiv="Content-Security-Policy" content="trusted-types">
</head>
<body>
<script>
// TrustedURL assignments do not throw.
- async_test(t => {
- createURL_policy(window)
- .then(t.step_func_done(p => {
- let url = p.createURL(location.href + "#xxx");
- location.href = url;
- assert_equals("" + url, location.href, "location href");
- }));
+ test(t => {
+ let p = createURL_policy(window, 1);
+ let url = p.createURL(location.href + "#xxx");
+ location.href = url;
+ assert_equals("" + url, location.href, "location href");
}, "location.href assigned via policy (successful URL transformation).");
// String assignments throw.
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html
index 872f14e1448..40752157059 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html
@@ -5,18 +5,16 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
- <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+ <meta http-equiv="Content-Security-Policy" content="trusted-types">
</head>
<body>
<script>
// TrustedURL replacements do not throw.
- async_test(t => {
- createURL_policy(window)
- .then(t.step_func_done(p => {
- let url = p.createURL(location.href + "#xxx");
- location.replace(url);
- assert_equals("" + url, location.href, "location href");
- }));
+ test(t => {
+ let p = createURL_policy(window, 1);
+ let url = p.createURL(location.href + "#xxx");
+ location.replace(url);
+ assert_equals("" + url, location.href, "location href");
}, "location.replace via policy (successful URL transformation).");
// String replacements throw.
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html
index 2afa2572c35..1cae5c74e96 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html
@@ -3,19 +3,17 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
-<meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+<meta http-equiv="Content-Security-Policy" content="trusted-types">
<body>
<script>
// TrustedHTML assignments do not throw.
- async_test(t => {
- createHTML_policy(window)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
- var range = document.createRange();
- range.selectNodeContents(document.documentElement);
- var result = range.createContextualFragment(html);
- assert_equals(result.textContent, RESULTS.HTML);
- }));
+ test(t => {
+ let p = createHTML_policy(window, 1);
+ let html = p.createHTML(INPUTS.HTML);
+ var range = document.createRange();
+ range.selectNodeContents(document.documentElement);
+ var result = range.createContextualFragment(html);
+ assert_equals(result.textContent, RESULTS.HTML);
}, "range.createContextualFragment assigned via policy (successful HTML transformation).");
// String assignments throw.
diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html
index f5712295d30..8070b4a4896 100644
--- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html
+++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html
@@ -5,58 +5,55 @@
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
- <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+ <meta http-equiv="Content-Security-Policy" content="trusted-types">
</head>
<body>
<script>
+ var testnb = 0;
// helper functions for the tests
- function testWindowOpen(t, win) {
- createURL_policy(window)
- .then(t.step_func_done(p => {
- let url = p.createURL(INPUTS.URL);
- let child_window = win.open(url, "", "");
- child_window.onload = t.step_func_done(_ => {
- assert_equals(child_window.location.href, "" + url);
- child_window.close();
- });
- }));
+ function testWindowOpen(t, win, nb) {
+ let p = createURL_policy(window, nb);
+ let url = p.createURL(INPUTS.URL);
+ let child_window = win.open(url, "", "");
+ child_window.onload = t.step_func_done(_ => {
+ assert_equals(child_window.location.href, "" + url);
+ child_window.close();
+ });
}
- function testWindowThrows(t, url, win) {
- createURL_policy(window)
- .then(t.step_func_done(p => {
- assert_throws(new TypeError(), _ => {
- let child_window = win.open(url, "", "");
- child_window.close();
- });
- }));
+ function testWindowThrows(t, url, win, nb) {
+ let p = createURL_policy(window, nb);
+ assert_throws(new TypeError(), _ => {
+ let child_window = win.open(url, "", "");
+ child_window.close();
+ });
}
// TrustedURL assignments do not throw.
- async_test(t => {
- testWindowOpen(t, window);
+ test(t => {
+ testWindowOpen(t, window, ++testnb);
}, "window.open via policy (successful URL transformation).");
- async_test(t => {
- testWindowOpen(t, document);
+ test(t => {
+ testWindowOpen(t, document, ++testnb);
}, "document.open via policy (successful URL transformation).");
// String assignments throw.
- async_test(t => {
- testWindowThrows(t, 'A string', window);
+ test(t => {
+ testWindowThrows(t, 'A string', window, ++testnb);
}, "`window.open(string)` throws.");
- async_test(t => {
- testWindowThrows(t, 'A string', document);
+ test(t => {
+ testWindowThrows(t, 'A string', document, ++testnb);
}, "`document.open(string)` throws.");
// Null assignment throws.
- async_test(t => {
- testWindowThrows(t, null, window);
+ test(t => {
+ testWindowThrows(t, null, window, ++testnb);
}, "`window.open(null)` throws.");
- async_test(t => {
- testWindowThrows(t, null, document);
+ test(t => {
+ testWindowThrows(t, null, document, ++testnb);
}, "`document.open(null)` throws.");
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/trusted-types/idlharness.window.js b/tests/wpt/web-platform-tests/trusted-types/idlharness.window.js
new file mode 100644
index 00000000000..de13697764e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/trusted-types/idlharness.window.js
@@ -0,0 +1,18 @@
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+idl_test(
+ ['trusted-types.tentative'],
+ ['dom', 'html'],
+ idl_array => {
+ idl_array.add_objects({
+ TrustedTypePolicyFactory: ['window.TrustedTypes'],
+ TrustedTypePolicy: ['window.TrustedTypes.createPolicy("SomeName", { createHTML: s => s })'],
+ TrustedHTML: ['window.TrustedTypes.createPolicy("SomeName1", { createHTML: s => s }).createHTML("A string")'],
+ TrustedScript: ['window.TrustedTypes.createPolicy("SomeName2", { createScript: s => s }).createScript("A string")'],
+ TrustedScriptURL: ['window.TrustedTypes.createPolicy("SomeName3", { createScriptURL: s => s }).createScriptURL("A string")'],
+ TrustedURL: ['window.TrustedTypes.createPolicy("SomeName4", { createURL: s => s }).createURL("A string")']
+ });
+ },
+ 'Trusted Types'
+);
diff --git a/tests/wpt/web-platform-tests/trusted-types/support/helper.sub.js b/tests/wpt/web-platform-tests/trusted-types/support/helper.sub.js
index b5435917bec..1ad5b4ef0c6 100644
--- a/tests/wpt/web-platform-tests/trusted-types/support/helper.sub.js
+++ b/tests/wpt/web-platform-tests/trusted-types/support/helper.sub.js
@@ -31,52 +31,44 @@ function createURLJS(url) {
.replace("an.url", "successfully.transformed");
}
-function createHTML_policy(win) {
- return win.trustedTypes.createPolicy('SomeName', { createHTML: createHTMLJS });
+function createHTML_policy(win, c) {
+ return win.TrustedTypes.createPolicy('SomeHTMLPolicyName' + c, { createHTML: createHTMLJS });
}
-function createScript_policy(win) {
- return win.trustedTypes.createPolicy('SomeName', { createScript: createScriptJS });
+function createScript_policy(win, c) {
+ return win.TrustedTypes.createPolicy('SomeScriptPolicyName' + c, { createScript: createScriptJS });
}
-function createScriptURL_policy(win) {
- return win.trustedTypes.createPolicy('SomeName', { createScriptURL: createScriptURLJS });
+function createScriptURL_policy(win, c) {
+ return win.TrustedTypes.createPolicy('SomeScriptURLPolicyName' + c, { createScriptURL: createScriptURLJS });
}
-function createURL_policy(win) {
- return win.trustedTypes.createPolicy('SomeName', { createURL: createURLJS });
+function createURL_policy(win, c) {
+ return win.TrustedTypes.createPolicy('SomeURLPolicyName' + c, { createURL: createURLJS });
}
-function assert_element_accepts_trusted_html(win, t, tag, attribute, expected) {
- createHTML_policy(win)
- .then(t.step_func_done(p => {
- let html = p.createHTML(INPUTS.HTML);
- assert_element_accepts_trusted_type(tag, attribute, html, expected);
- }));
+function assert_element_accepts_trusted_html(win, c, t, tag, attribute, expected) {
+ let p = createHTML_policy(win, c);
+ let html = p.createHTML(INPUTS.HTML);
+ assert_element_accepts_trusted_type(tag, attribute, html, expected);
}
-function assert_element_accepts_trusted_script(win, t, tag, attribute, expected) {
- createScript_policy(win)
- .then(t.step_func_done(p => {
- let script = p.createScript(INPUTS.SCRIPT);
- assert_element_accepts_trusted_type(tag, attribute, script, expected);
- }));
+function assert_element_accepts_trusted_script(win, c, t, tag, attribute, expected) {
+ let p = createScript_policy(win, c);
+ let script = p.createScript(INPUTS.SCRIPT);
+ assert_element_accepts_trusted_type(tag, attribute, script, expected);
}
-function assert_element_accepts_trusted_script_url(win, t, tag, attribute, expected) {
- createScriptURL_policy(win)
- .then(t.step_func_done(p => {
- let scripturl = p.createScriptURL(INPUTS.SCRIPTURL);
- assert_element_accepts_trusted_type(tag, attribute, scripturl, expected);
- }));
+function assert_element_accepts_trusted_script_url(win, c, t, tag, attribute, expected) {
+ let p = createScriptURL_policy(win, c);
+ let scripturl = p.createScriptURL(INPUTS.SCRIPTURL);
+ assert_element_accepts_trusted_type(tag, attribute, scripturl, expected);
}
-function assert_element_accepts_trusted_url(win, t, tag, attribute, expected) {
- createURL_policy(win)
- .then(t.step_func_done(p => {
- let url = p.createURL(INPUTS.URL);
- assert_element_accepts_trusted_type(tag, attribute, url, expected);
- }));
+function assert_element_accepts_trusted_url(win, c, t, tag, attribute, expected) {
+ let p = createURL_policy(win, c);
+ let url = p.createURL(INPUTS.URL);
+ assert_element_accepts_trusted_type(tag, attribute, url, expected);
}
function assert_element_accepts_trusted_type(tag, attribute, value, expected) {
@@ -91,3 +83,46 @@ function assert_throws_no_trusted_type(tag, attribute, value) {
elem[attribute] = value;
});
}
+
+function assert_element_accepts_trusted_html_explicit_set(win, c, t, tag, attribute, expected) {
+ let p = createHTML_policy(win, c);
+ let html = p.createHTML(INPUTS.HTML);
+ assert_element_accepts_trusted_type_explicit_set(tag, attribute, html, expected);
+}
+
+function assert_element_accepts_trusted_script_explicit_set(win, c, t, tag, attribute, expected) {
+ let p = createScript_policy(win, c);
+ let script = p.createScript(INPUTS.SCRIPT);
+ assert_element_accepts_trusted_type_explicit_set(tag, attribute, script, expected);
+}
+
+function assert_element_accepts_trusted_script_url_explicit_set(win, c, t, tag, attribute, expected) {
+ let p = createScriptURL_policy(win, c);
+ let scripturl = p.createScriptURL(INPUTS.SCRIPTURL);
+ assert_element_accepts_trusted_type_explicit_set(tag, attribute, scripturl, expected);
+}
+
+function assert_element_accepts_trusted_url_explicit_set(win, c, t, tag, attribute, expected) {
+ let p = createURL_policy(win, c);
+ let url = p.createURL(INPUTS.URL);
+ assert_element_accepts_trusted_type_explicit_set(tag, attribute, url, expected);
+}
+
+function assert_element_accepts_trusted_type_explicit_set(tag, attribute, value, expected) {
+ let elem = document.createElement(tag);
+ elem.setAttribute(attribute, value);
+ assert_equals(elem[attribute] + "", expected);
+}
+
+function assert_throws_no_trusted_type_explicit_set(tag, attribute, value) {
+ let elem = document.createElement(tag);
+ assert_throws(new TypeError(), _ => {
+ elem.setAttribute(attribute, value);
+ });
+}
+
+function assert_element_accepts_non_trusted_type_explicit_set(tag, attribute, value, expected) {
+ let elem = document.createElement(tag);
+ elem.setAttribute(attribute, value);
+ assert_equals(elem[attribute] + "", expected);
+}
diff --git a/tests/wpt/web-platform-tests/wai-aria/idlharness.window.js b/tests/wpt/web-platform-tests/wai-aria/idlharness.window.js
new file mode 100644
index 00000000000..590bf9e2e9f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wai-aria/idlharness.window.js
@@ -0,0 +1,15 @@
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+'use strict';
+
+idl_test(
+ ['wai-aria'],
+ ['dom'],
+ idl_array => {
+ idl_array.add_objects({
+ Element: ['element'],
+ });
+ self.element = document.createElementNS(null, "test");
+ }
+);
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/assertions.js b/tests/wpt/web-platform-tests/wasm/jsapi/assertions.js
index 151a406655c..bda3ae7bc3c 100644
--- a/tests/wpt/web-platform-tests/wasm/jsapi/assertions.js
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/assertions.js
@@ -15,3 +15,59 @@ function assert_function_length(fn, length, description) {
assert_true(propdesc.configurable, "configurable", `${description} length should be configurable`);
assert_equals(propdesc.value, length, `${description} length should be ${length}`);
}
+
+function assert_exported_function(fn, { name, length }, description) {
+ assert_equals(Object.getPrototypeOf(fn), Function.prototype,
+ `${description}: prototype`);
+
+ assert_function_name(fn, name, description);
+ assert_function_length(fn, length, description);
+}
+
+function assert_Instance(instance, expected_exports) {
+ assert_equals(Object.getPrototypeOf(instance), WebAssembly.Instance.prototype,
+ "prototype");
+ assert_true(Object.isExtensible(instance), "extensible");
+
+ assert_equals(instance.exports, instance.exports, "exports should be idempotent");
+ const exports = instance.exports;
+
+ assert_equals(Object.getPrototypeOf(exports), null, "exports prototype");
+ assert_false(Object.isExtensible(exports), "extensible exports");
+ for (const [key, expected] of Object.entries(expected_exports)) {
+ const property = Object.getOwnPropertyDescriptor(exports, key);
+ assert_equals(typeof property, "object", `${key} should be present`);
+ assert_false(property.writable, `${key}: writable`);
+ assert_true(property.enumerable, `${key}: enumerable`);
+ assert_false(property.configurable, `${key}: configurable`);
+ const actual = property.value;
+ assert_true(Object.isExtensible(actual), `${key}: extensible`);
+
+ switch (expected.kind) {
+ case "function":
+ assert_exported_function(actual, expected, `value of ${key}`);
+ break;
+ case "global":
+ assert_equals(Object.getPrototypeOf(actual), WebAssembly.Global.prototype,
+ `value of ${key}: prototype`);
+ assert_equals(actual.value, expected.value, `value of ${key}: value`);
+ assert_equals(actual.valueOf(), expected.value, `value of ${key}: valueOf()`);
+ break;
+ case "memory":
+ assert_equals(Object.getPrototypeOf(actual), WebAssembly.Memory.prototype,
+ `value of ${key}: prototype`);
+ assert_equals(Object.getPrototypeOf(actual.buffer), ArrayBuffer.prototype,
+ `value of ${key}: prototype of buffer`);
+ assert_equals(actual.buffer.byteLength, 0x10000 * expected.size, `value of ${key}: size of buffer`);
+ const array = new Uint8Array(actual.buffer);
+ assert_equals(array[0], 0, `value of ${key}: first element of buffer`);
+ assert_equals(array[array.byteLength - 1], 0, `value of ${key}: last element of buffer`);
+ break;
+ case "table":
+ assert_equals(Object.getPrototypeOf(actual), WebAssembly.Table.prototype,
+ `value of ${key}: prototype`);
+ assert_equals(actual.length, expected.length, `value of ${key}: length of table`);
+ break;
+ }
+ }
+}
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/constructor/compile.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/constructor/compile.any.js
new file mode 100644
index 00000000000..0139a18fda3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/constructor/compile.any.js
@@ -0,0 +1,77 @@
+// META: global=jsshell
+// META: script=/wasm/jsapi/wasm-constants.js
+// META: script=/wasm/jsapi/wasm-module-builder.js
+
+function assert_Module(module) {
+ assert_equals(Object.getPrototypeOf(module), WebAssembly.Module.prototype,
+ "Prototype");
+ assert_true(Object.isExtensible(module), "Extensibility");
+}
+
+let emptyModuleBinary;
+setup(() => {
+ emptyModuleBinary = new WasmModuleBuilder().toBuffer();
+});
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), WebAssembly.compile());
+}, "Missing argument");
+
+promise_test(t => {
+ const invalidArguments = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ ArrayBuffer,
+ ArrayBuffer.prototype,
+ Array.from(emptyModuleBinary),
+ ];
+ return Promise.all(invalidArguments.map(argument => {
+ return promise_rejects(t, new TypeError(), WebAssembly.compile(argument),
+ `compile(${format_value(argument)})`);
+ }));
+}, "Invalid arguments");
+
+promise_test(() => {
+ const fn = WebAssembly.compile;
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly,
+ ];
+ return Promise.all(thisValues.map(thisValue => {
+ return fn.call(thisValue, emptyModuleBinary).then(assert_Module);
+ }));
+}, "Branding");
+
+test(() => {
+ const promise = WebAssembly.compile(emptyModuleBinary);
+ assert_equals(Object.getPrototypeOf(promise), Promise.prototype, "prototype");
+ assert_true(Object.isExtensible(promise), "extensibility");
+}, "Promise type");
+
+promise_test(t => {
+ const buffer = new Uint8Array();
+ return promise_rejects(t, new WebAssembly.CompileError(), WebAssembly.compile(buffer));
+}, "Invalid code");
+
+promise_test(() => {
+ return WebAssembly.compile(emptyModuleBinary).then(assert_Module);
+}, "Result type");
+
+promise_test(() => {
+ const buffer = new WasmModuleBuilder().toBuffer();
+ assert_equals(buffer[0], 0);
+ const promise = WebAssembly.compile(buffer);
+ buffer[0] = 1;
+ return promise.then(assert_Module);
+}, "Changing the buffer");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/constructor/instantiate.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/constructor/instantiate.any.js
new file mode 100644
index 00000000000..e90f21e28eb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/constructor/instantiate.any.js
@@ -0,0 +1,196 @@
+// META: global=jsshell
+// META: script=/wasm/jsapi/wasm-constants.js
+// META: script=/wasm/jsapi/wasm-module-builder.js
+// META: script=/wasm/jsapi/assertions.js
+
+function assert_WebAssemblyInstantiatedSource(actual, expected_exports={}) {
+ assert_equals(Object.getPrototypeOf(actual), Object.prototype,
+ "Prototype");
+ assert_true(Object.isExtensible(actual), "Extensibility");
+
+ const module = Object.getOwnPropertyDescriptor(actual, "module");
+ assert_equals(typeof module, "object", "module: type of descriptor");
+ assert_true(module.writable, "module: writable");
+ assert_true(module.enumerable, "module: enumerable");
+ assert_true(module.configurable, "module: configurable");
+ assert_equals(Object.getPrototypeOf(module.value), WebAssembly.Module.prototype,
+ "module: prototype");
+
+ const instance = Object.getOwnPropertyDescriptor(actual, "instance");
+ assert_equals(typeof instance, "object", "instance: type of descriptor");
+ assert_true(instance.writable, "instance: writable");
+ assert_true(instance.enumerable, "instance: enumerable");
+ assert_true(instance.configurable, "instance: configurable");
+ assert_Instance(instance.value, expected_exports);
+}
+
+let emptyModuleBinary;
+setup(() => {
+ emptyModuleBinary = new WasmModuleBuilder().toBuffer();
+});
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), WebAssembly.instantiate());
+}, "Missing arguments");
+
+promise_test(() => {
+ const fn = WebAssembly.instantiate;
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly,
+ ];
+ return Promise.all(thisValues.map(thisValue => {
+ return fn.call(thisValue, emptyModuleBinary).then(assert_WebAssemblyInstantiatedSource);
+ }));
+}, "Branding");
+
+promise_test(t => {
+ const invalidArguments = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Module,
+ WebAssembly.Module.prototype,
+ ArrayBuffer,
+ ArrayBuffer.prototype,
+ Array.from(emptyModuleBinary),
+ ];
+ return Promise.all(invalidArguments.map(argument => {
+ return promise_rejects(t, new TypeError(), WebAssembly.instantiate(argument),
+ `instantiate(${format_value(argument)})`);
+ }));
+}, "Invalid arguments");
+
+test(() => {
+ const promise = WebAssembly.instantiate(emptyModuleBinary);
+ assert_equals(Object.getPrototypeOf(promise), Promise.prototype, "prototype");
+ assert_true(Object.isExtensible(promise), "extensibility");
+}, "Promise type");
+
+const createModule = () => {
+ const builder = new WasmModuleBuilder();
+
+ builder
+ .addFunction("fn", kSig_v_d)
+ .addBody([
+ kExprEnd
+ ])
+ .exportFunc();
+ builder
+ .addFunction("fn2", kSig_v_v)
+ .addBody([
+ kExprEnd
+ ])
+ .exportFunc();
+
+ builder.setFunctionTableLength(1);
+ builder.addExportOfKind("table", kExternalTable, 0);
+
+ builder.addGlobal(kWasmI32, true)
+ .exportAs("global")
+ .init = 7;
+ builder.addGlobal(kWasmF64, true)
+ .exportAs("global2")
+ .init = 1.2;
+
+ builder.addMemory(4, 8, true);
+
+ const buffer = builder.toBuffer();
+
+ const exports = {
+ "fn": { "kind": "function", "name": "0", "length": 1 },
+ "fn2": { "kind": "function", "name": "1", "length": 0 },
+ "table": { "kind": "table", "length": 1 },
+ "global": { "kind": "global", "value": 7 },
+ "global2": { "kind": "global", "value": 1.2 },
+ "memory": { "kind": "memory", "size": 4 },
+ };
+
+ return [buffer, exports];
+}
+
+promise_test(() => {
+ const [buffer, expected] = createModule();
+ return WebAssembly.instantiate(buffer).then(result => assert_WebAssemblyInstantiatedSource(result, expected));
+}, "BufferSource argument");
+
+promise_test(() => {
+ const [buffer, expected] = createModule();
+ const module = new WebAssembly.Module(buffer);
+ return WebAssembly.instantiate(module).then(instance => assert_Instance(instance, expected));
+}, "Module argument");
+
+const createModuleWithImports = () => {
+ const builder = new WasmModuleBuilder();
+
+ const index = builder.addImportedGlobal("module", "global", kWasmI32);
+ builder
+ .addFunction("fn", kSig_i_v)
+ .addBody([
+ kExprGetGlobal,
+ index,
+ kExprReturn,
+ kExprEnd,
+ ])
+ .exportFunc();
+
+ const buffer = builder.toBuffer();
+
+ const expected = {
+ "fn": { "kind": "function", "name": "0", "length": 0 },
+ };
+
+ return [buffer, expected];
+};
+
+promise_test(() => {
+ const [buffer, expected] = createModuleWithImports();
+
+ const value = 102;
+ return WebAssembly.instantiate(buffer, {
+ "module": {
+ "global": value,
+ },
+ }).then(result => {
+ assert_WebAssemblyInstantiatedSource(result, expected)
+ assert_equals(result.instance.exports.fn(), value);
+ });
+}, "exports and imports: buffer argument");
+
+promise_test(() => {
+ const [buffer, expected] = createModuleWithImports();
+ const module = new WebAssembly.Module(buffer);
+
+ const value = 102;
+ return WebAssembly.instantiate(module, {
+ "module": {
+ "global": value,
+ },
+ }).then(instance => {
+ assert_Instance(instance, expected)
+ assert_equals(instance.exports.fn(), value);
+ });
+}, "exports and imports: Module argument");
+
+promise_test(t => {
+ const buffer = new Uint8Array();
+ return promise_rejects(t, new WebAssembly.CompileError(), WebAssembly.instantiate(buffer));
+}, "Invalid code");
+
+promise_test(() => {
+ const buffer = new WasmModuleBuilder().toBuffer();
+ assert_equals(buffer[0], 0);
+ const promise = WebAssembly.instantiate(buffer);
+ buffer[0] = 1;
+ return promise.then(assert_WebAssemblyInstantiatedSource);
+}, "Changing the buffer");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/constructor/validate.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/constructor/validate.any.js
new file mode 100644
index 00000000000..70bd9f7022a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/constructor/validate.any.js
@@ -0,0 +1,96 @@
+// META: global=jsshell
+// META: script=/wasm/jsapi/wasm-constants.js
+// META: script=/wasm/jsapi/wasm-module-builder.js
+
+let emptyModuleBinary;
+setup(() => {
+ emptyModuleBinary = new WasmModuleBuilder().toBuffer();
+});
+
+test(() => {
+ assert_throws(new TypeError(), () => WebAssembly.validate());
+}, "Missing argument");
+
+test(() => {
+ const invalidArguments = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ ArrayBuffer,
+ ArrayBuffer.prototype,
+ Array.from(emptyModuleBinary),
+ ];
+ for (const argument of invalidArguments) {
+ assert_throws(new TypeError(), () => WebAssembly.validate(argument),
+ `validate(${format_value(argument)})`);
+ }
+}, "Invalid arguments");
+
+test(() => {
+ const fn = WebAssembly.validate;
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly,
+ ];
+ for (const thisValue of thisValues) {
+ assert_true(fn.call(thisValue, emptyModuleBinary), `this=${format_value(thisValue)}`);
+ }
+}, "Branding");
+
+const modules = [
+ // Incomplete header.
+ [[], false],
+ [[0x00], false],
+ [[0x00, 0x61], false],
+ [[0x00, 0x61, 0x73], false],
+ [[0x00, 0x61, 0x73, 0x6d], false],
+ [[0x00, 0x61, 0x73, 0x6d, 0x01], false],
+ [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00], false],
+ [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00], false],
+
+ // Complete header.
+ [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00], true],
+
+ // Invalid version.
+ [[0x00, 0x61, 0x73, 0x6d, 0x00, 0x00, 0x00, 0x00], false],
+ [[0x00, 0x61, 0x73, 0x6d, 0x02, 0x00, 0x00, 0x00], false],
+
+ // Nameless custom section.
+ [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00], false],
+
+ // Custom section with empty name.
+ [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00], true],
+
+ // Custom section with name "a".
+ [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x61], true],
+];
+const bufferTypes = [
+ Uint8Array,
+ Int8Array,
+ Uint16Array,
+ Int16Array,
+ Uint32Array,
+ Int32Array,
+];
+for (const [module, expected] of modules) {
+ const name = module.map(n => n.toString(16)).join(" ");
+ for (const bufferType of bufferTypes) {
+ if (module.length % bufferType.BYTES_PER_ELEMENT === 0) {
+ test(() => {
+ const bytes = new Uint8Array(module);
+ const moduleBuffer = new bufferType(bytes.buffer);
+ assert_equals(WebAssembly.validate(moduleBuffer), expected);
+ }, `Validating module [${name}] in ${bufferType.name}`);
+ }
+ }
+}
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/global/constructor.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/global/constructor.any.js
new file mode 100644
index 00000000000..7a45cc4191c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/global/constructor.any.js
@@ -0,0 +1,121 @@
+// META: global=jsshell
+// META: script=/wasm/jsapi/assertions.js
+
+function assert_Global(actual, expected) {
+ assert_equals(Object.getPrototypeOf(actual), WebAssembly.Global.prototype,
+ "prototype");
+ assert_true(Object.isExtensible(actual), "extensible");
+
+ assert_equals(actual.value, expected, "value");
+ assert_equals(actual.valueOf(), expected, "valueOf");
+}
+
+test(() => {
+ assert_function_name(WebAssembly.Global, "Global", "WebAssembly.Global");
+}, "name");
+
+test(() => {
+ assert_function_length(WebAssembly.Global, 1, "WebAssembly.Global");
+}, "length");
+
+test(() => {
+ assert_throws(new TypeError(), () => new WebAssembly.Global());
+}, "No arguments");
+
+test(() => {
+ const argument = { "value": "i32" };
+ assert_throws(new TypeError(), () => WebAssembly.Global(argument));
+}, "Calling");
+
+test(() => {
+ const order = [];
+
+ new WebAssembly.Global({
+ get value() {
+ order.push("descriptor value");
+ return {
+ toString() {
+ order.push("descriptor value toString");
+ return "f64";
+ },
+ };
+ },
+
+ get mutable() {
+ order.push("descriptor mutable");
+ return false;
+ },
+ }, {
+ valueOf() {
+ order.push("value valueOf()");
+ }
+ });
+
+ assert_array_equals(order, [
+ "descriptor mutable",
+ "descriptor value",
+ "descriptor value toString",
+ "value valueOf()",
+ ]);
+}, "Order of evaluation");
+
+test(() => {
+ const invalidArguments = [
+ undefined,
+ null,
+ false,
+ true,
+ "",
+ "test",
+ Symbol(),
+ 1,
+ NaN,
+ {},
+ ];
+ for (const invalidArgument of invalidArguments) {
+ assert_throws(new TypeError(),
+ () => new WebAssembly.Global(invalidArgument),
+ `new Global(${format_value(invalidArgument)})`);
+ }
+}, "Invalid descriptor argument");
+
+test(() => {
+ const invalidTypes = ["i16", "i128", "f16", "f128", "u32", "u64", "i32\0"];
+ for (const value of invalidTypes) {
+ const argument = { value };
+ assert_throws(new TypeError(), () => new WebAssembly.Global(argument));
+ }
+}, "Invalid type argument");
+
+test(() => {
+ const argument = { "value": "i64" };
+ const global = new WebAssembly.Global(argument);
+ assert_throws(new TypeError(), () => global.value);
+ assert_throws(new TypeError(), () => global.valueOf());
+}, "i64 with default");
+
+for (const type of ["i32", "f32", "f64"]) {
+ test(() => {
+ const argument = { "value": type };
+ const global = new WebAssembly.Global(argument);
+ assert_Global(global, 0);
+ }, `Default value for type ${type}`);
+
+ const valueArguments = [
+ [undefined, 0],
+ [null, 0],
+ [true, 1],
+ [false, 0],
+ [2, 2],
+ ["3", 3],
+ [{ toString() { return "5" } }, 5, "object with toString"],
+ [{ valueOf() { return "8" } }, 8, "object with valueOf"],
+ ];
+ for (const [value, expected, name = format_value(value)] of valueArguments) {
+ test(() => {
+ const argument = { "value": type };
+ const global = new WebAssembly.Global(argument, value);
+ assert_Global(global, expected);
+ }, `Explicit value ${name} for type ${type}`);
+ }
+}
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/global/toString.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/global/toString.any.js
new file mode 100644
index 00000000000..ca025576c2b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/global/toString.any.js
@@ -0,0 +1,7 @@
+// META: global=jsshell
+
+test(() => {
+ const argument = { "value": "i32" };
+ const global = new WebAssembly.Global(argument);
+ assert_class_string(global, "WebAssembly.Global");
+}, "Object.prototype.toString on an Global");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/global/value-set.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/global/value-set.any.js
new file mode 100644
index 00000000000..b4e6770f10e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/global/value-set.any.js
@@ -0,0 +1,94 @@
+// META: global=jsshell
+
+test(() => {
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Global,
+ WebAssembly.Global.prototype,
+ ];
+
+ const desc = Object.getOwnPropertyDescriptor(WebAssembly.Global.prototype, "value");
+ assert_equals(typeof desc, "object");
+
+ const getter = desc.get;
+ assert_equals(typeof getter, "function");
+
+ const setter = desc.set;
+ assert_equals(typeof setter, "function");
+
+ for (const thisValue of thisValues) {
+ assert_throws(new TypeError(), () => getter.call(thisValue), `getter with this=${format_value(thisValue)}`);
+ assert_throws(new TypeError(), () => setter.call(thisValue, 1), `setter with this=${format_value(thisValue)}`);
+ }
+}, "Branding");
+
+for (const type of ["i32", "f32", "f64"]) {
+ const immutableOptions = [
+ [{}, "missing"],
+ [{ "mutable": undefined }, "undefined"],
+ [{ "mutable": null }, "null"],
+ [{ "mutable": false }, "false"],
+ [{ "mutable": "" }, "empty string"],
+ [{ "mutable": 0 }, "zero"],
+ ];
+ for (const [opts, name] of immutableOptions) {
+ test(() => {
+ opts.value = type;
+ const global = new WebAssembly.Global(opts);
+ assert_equals(global.value, 0, "initial value");
+ assert_equals(global.valueOf(), 0, "initial valueOf");
+
+ assert_throws(new TypeError(), () => global.value = 1);
+
+ assert_equals(global.value, 0, "post-set value");
+ assert_equals(global.valueOf(), 0, "post-set valueOf");
+ }, `Immutable ${type} (${name})`);
+ }
+
+ const mutableOptions = [
+ [{ "mutable": true }, "true"],
+ [{ "mutable": 1 }, "one"],
+ [{ "mutable": "x" }, "string"],
+ [Object.create({ "mutable": true }), "true on prototype"],
+ ];
+ for (const [opts, name] of mutableOptions) {
+ test(() => {
+ opts.value = type;
+ const global = new WebAssembly.Global(opts);
+ assert_equals(global.value, 0, "initial value");
+ assert_equals(global.valueOf(), 0, "initial valueOf");
+
+ global.value = 1;
+
+ assert_equals(global.value, 1, "post-set value");
+ assert_equals(global.valueOf(), 1, "post-set valueOf");
+ }, `Mutable ${type} (${name})`);
+ }
+}
+
+test(() => {
+ const argument = { "value": "i64", "mutable": true };
+ const global = new WebAssembly.Global(argument);
+ assert_throws(new TypeError(), () => global.value);
+ assert_throws(new TypeError(), () => global.value = 0);
+ assert_throws(new TypeError(), () => global.valueOf());
+}, "i64 with default");
+
+
+test(() => {
+ const argument = { "value": "i32", "mutable": true };
+ const global = new WebAssembly.Global(argument);
+ const desc = Object.getOwnPropertyDescriptor(WebAssembly.Global.prototype, "value");
+ assert_equals(typeof desc, "object");
+
+ const setter = desc.set;
+ assert_equals(typeof setter, "function");
+
+ assert_throws(new TypeError(), () => setter.call(global));
+}, "Calling setter without argument");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/global/valueOf.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/global/valueOf.any.js
new file mode 100644
index 00000000000..176c5a78469
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/global/valueOf.any.js
@@ -0,0 +1,22 @@
+// META: global=jsshell
+
+test(() => {
+ const argument = { "value": "i32" };
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Global,
+ WebAssembly.Global.prototype,
+ ];
+
+ const fn = WebAssembly.Global.prototype.valueOf;
+
+ for (const thisValue of thisValues) {
+ assert_throws(new TypeError(), () => fn.call(thisValue), `this=${format_value(thisValue)}`);
+ }
+}, "Branding");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/instance/constructor.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/instance/constructor.any.js
index 93a3ffda033..f9bd06ac8e9 100644
--- a/tests/wpt/web-platform-tests/wasm/jsapi/instance/constructor.any.js
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/instance/constructor.any.js
@@ -3,61 +3,6 @@
// META: script=/wasm/jsapi/wasm-module-builder.js
// META: script=/wasm/jsapi/assertions.js
-function assert_exported_function(fn, { name, length }, description) {
- assert_equals(Object.getPrototypeOf(fn), Function.prototype,
- `${description}: prototype`);
-
- assert_function_name(fn, name, description);
- assert_function_length(fn, length, description);
-}
-
-function assert_Instance(instance, expected_exports) {
- assert_equals(Object.getPrototypeOf(instance), WebAssembly.Instance.prototype,
- "prototype");
- assert_true(Object.isExtensible(instance), "extensible");
-
- assert_equals(instance.exports, instance.exports, "exports should be idempotent");
- const exports = instance.exports;
-
- assert_equals(Object.getPrototypeOf(exports), null, "exports prototype");
- assert_false(Object.isExtensible(exports), "extensible exports");
- for (const [key, expected] of Object.entries(expected_exports)) {
- const property = Object.getOwnPropertyDescriptor(exports, key);
- assert_equals(typeof property, "object", `${key} should be present`);
- assert_false(property.writable, `${key}: writable`);
- assert_true(property.enumerable, `${key}: enumerable`);
- assert_false(property.configurable, `${key}: configurable`);
- const actual = property.value;
-
- switch (expected.kind) {
- case "function":
- assert_exported_function(actual, expected, `value of ${key}`);
- break;
- case "global":
- assert_equals(Object.getPrototypeOf(actual), WebAssembly.Global.prototype,
- `value of ${key}: prototype`);
- assert_equals(actual.value, expected.value, `value of ${key}: value`);
- assert_equals(actual.valueOf(), expected.value, `value of ${key}: valueOf()`);
- break;
- case "memory":
- assert_equals(Object.getPrototypeOf(actual), WebAssembly.Memory.prototype,
- `value of ${key}: prototype`);
- assert_equals(Object.getPrototypeOf(actual.buffer), ArrayBuffer.prototype,
- `value of ${key}: prototype of buffer`);
- assert_equals(actual.buffer.byteLength, 0x10000 * expected.size, `value of ${key}: size of buffer`);
- const array = new Uint8Array(actual.buffer);
- assert_equals(array[0], 0, `value of ${key}: first element of buffer`);
- assert_equals(array[array.byteLength - 1], 0, `value of ${key}: last element of buffer`);
- break;
- case "table":
- assert_equals(Object.getPrototypeOf(actual), WebAssembly.Table.prototype,
- `value of ${key}: prototype`);
- assert_equals(actual.length, expected.length, `value of ${key}: length of table`);
- break;
- }
- }
-}
-
let emptyModuleBinary;
setup(() => {
emptyModuleBinary = new WasmModuleBuilder().toBuffer();
@@ -76,6 +21,39 @@ test(() => {
}, "No arguments");
test(() => {
+ const invalidArguments = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Module,
+ WebAssembly.Module.prototype,
+ ];
+ for (const argument of invalidArguments) {
+ assert_throws(new TypeError(), () => new WebAssembly.Instance(argument),
+ `new Instance(${format_value(argument)})`);
+ }
+}, "Non-Module arguments");
+
+test(() => {
+ const module = new WebAssembly.Module(emptyModuleBinary);
+ const invalidArguments = [
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ ];
+ for (const argument of invalidArguments) {
+ assert_throws(new TypeError(), () => new WebAssembly.Instance(module, argument),
+ `new Instance(module, ${format_value(argument)})`);
+ }
+}, "Non-object imports");
+
+test(() => {
const module = new WebAssembly.Module(emptyModuleBinary);
assert_throws(new TypeError(), () => WebAssembly.Instance(module));
}, "Calling");
@@ -96,6 +74,8 @@ test(() => {
test(() => {
const builder = new WasmModuleBuilder();
builder.addImportedGlobal("module", "global1", kWasmI32);
+ builder.addImportedGlobal("module2", "global3", kWasmI32);
+ builder.addImportedMemory("module", "memory", 0, 128);
builder.addImportedGlobal("module", "global2", kWasmI32);
const buffer = builder.toBuffer();
const module = new WebAssembly.Module(buffer);
@@ -112,6 +92,19 @@ test(() => {
order.push("global2 getter");
return 0;
},
+ get memory() {
+ order.push("memory getter");
+ return new WebAssembly.Memory({ "initial": 64, maximum: 128 });
+ },
+ }
+ },
+ get module2() {
+ order.push("module2 getter");
+ return {
+ get global3() {
+ order.push("global3 getter");
+ return 0;
+ },
}
},
};
@@ -119,6 +112,10 @@ test(() => {
const expected = [
"module getter",
"global1 getter",
+ "module2 getter",
+ "global3 getter",
+ "module getter",
+ "memory getter",
"module getter",
"global2 getter",
];
@@ -191,3 +188,34 @@ test(() => {
};
assert_Instance(instance, expected);
}, "exports");
+
+test(() => {
+ const value = 102;
+
+ const builder = new WasmModuleBuilder();
+
+ builder.addImportedGlobal("module", "global", kWasmI32);
+ builder
+ .addFunction("fn", kSig_i_v)
+ .addBody([
+ kExprGetGlobal,
+ 0,
+ kExprReturn,
+ kExprEnd,
+ ])
+ .exportFunc();
+
+ const buffer = builder.toBuffer();
+ const module = new WebAssembly.Module(buffer);
+ const instance = new WebAssembly.Instance(module, {
+ "module": {
+ "global": value,
+ },
+ });
+ const expected = {
+ "fn": { "kind": "function", "name": "0", "length": 0 },
+ };
+ assert_Instance(instance, expected);
+
+ assert_equals(instance.exports.fn(), value);
+}, "exports and imports");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/instance/exports.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/instance/exports.any.js
new file mode 100644
index 00000000000..31423918720
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/instance/exports.any.js
@@ -0,0 +1,53 @@
+// META: global=jsshell
+// META: script=/wasm/jsapi/wasm-constants.js
+// META: script=/wasm/jsapi/wasm-module-builder.js
+
+let emptyModuleBinary;
+setup(() => {
+ emptyModuleBinary = new WasmModuleBuilder().toBuffer();
+});
+
+test(() => {
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Instance,
+ WebAssembly.Instance.prototype,
+ ];
+
+ const desc = Object.getOwnPropertyDescriptor(WebAssembly.Instance.prototype, "exports");
+ assert_equals(typeof desc, "object");
+
+ const getter = desc.get;
+ assert_equals(typeof getter, "function");
+
+ assert_equals(typeof desc.set, "undefined");
+
+ for (const thisValue of thisValues) {
+ assert_throws(new TypeError(), () => getter.call(thisValue), `this=${format_value(thisValue)}`);
+ }
+}, "Branding");
+
+test(() => {
+ const module = new WebAssembly.Module(emptyModuleBinary);
+ const instance = new WebAssembly.Instance(module);
+ const exports = instance.exports;
+ instance.exports = {};
+ assert_equals(instance.exports, exports, "Should not change the exports");
+}, "Setting (sloppy mode)");
+
+test(() => {
+ const module = new WebAssembly.Module(emptyModuleBinary);
+ const instance = new WebAssembly.Instance(module);
+ const exports = instance.exports;
+ assert_throws(new TypeError(), () => {
+ "use strict";
+ instance.exports = {};
+ });
+ assert_equals(instance.exports, exports, "Should not change the exports");
+}, "Setting (strict mode)");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/instance/toString.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/instance/toString.any.js
new file mode 100644
index 00000000000..08dcb14a50d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/instance/toString.any.js
@@ -0,0 +1,10 @@
+// META: global=jsshell
+// META: script=/wasm/jsapi/wasm-constants.js
+// META: script=/wasm/jsapi/wasm-module-builder.js
+
+test(() => {
+ const emptyModuleBinary = new WasmModuleBuilder().toBuffer();
+ const module = new WebAssembly.Module(emptyModuleBinary);
+ const instance = new WebAssembly.Instance(module);
+ assert_class_string(instance, "WebAssembly.Instance");
+}, "Object.prototype.toString on an Instance");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/interface.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/interface.any.js
index 64c1f60da1c..5d76ac56ec5 100644
--- a/tests/wpt/web-platform-tests/wasm/jsapi/interface.any.js
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/interface.any.js
@@ -63,6 +63,10 @@ test(() => {
}, "WebAssembly: property descriptor");
test(() => {
+ assert_throws(new TypeError(), () => WebAssembly());
+}, "WebAssembly: calling");
+
+test(() => {
assert_throws(new TypeError(), () => new WebAssembly());
}, "WebAssembly: constructing");
@@ -89,6 +93,15 @@ for (const name of interfaces) {
test(() => {
const interface_object = WebAssembly[name];
+ const propdesc = Object.getOwnPropertyDescriptor(interface_object, "prototype");
+ assert_equals(typeof propdesc, "object");
+ assert_false(propdesc.writable, "writable");
+ assert_false(propdesc.enumerable, "enumerable");
+ assert_false(propdesc.configurable, "configurable");
+ }, `WebAssembly.${name}: prototype`);
+
+ test(() => {
+ const interface_object = WebAssembly[name];
const interface_prototype_object = interface_object.prototype;
const propdesc = Object.getOwnPropertyDescriptor(interface_prototype_object, "constructor");
assert_equals(typeof propdesc, "object");
@@ -96,7 +109,7 @@ for (const name of interfaces) {
assert_false(propdesc.enumerable, "enumerable");
assert_true(propdesc.configurable, "configurable");
assert_equals(propdesc.value, interface_object);
- }, `WebAssembly.${name}: prototype`);
+ }, `WebAssembly.${name}: prototype.constructor`);
}
test_operations(WebAssembly, "WebAssembly", [
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/memory/buffer.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/memory/buffer.any.js
new file mode 100644
index 00000000000..b04460b6c5e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/memory/buffer.any.js
@@ -0,0 +1,50 @@
+// META: global=jsshell
+
+test(() => {
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Memory,
+ WebAssembly.Memory.prototype,
+ ];
+
+ const desc = Object.getOwnPropertyDescriptor(WebAssembly.Memory.prototype, "buffer");
+ assert_equals(typeof desc, "object");
+
+ const getter = desc.get;
+ assert_equals(typeof getter, "function");
+
+ assert_equals(typeof desc.set, "undefined");
+
+ for (const thisValue of thisValues) {
+ assert_throws(new TypeError(), () => getter.call(thisValue), `this=${format_value(thisValue)}`);
+ }
+}, "Branding");
+
+test(() => {
+ const argument = { "initial": 0 };
+ const memory = new WebAssembly.Memory(argument);
+ const memory2 = new WebAssembly.Memory(argument);
+ const buffer = memory.buffer;
+ assert_not_equals(buffer, memory2.buffer, "Need two distinct buffers");
+ memory.buffer = memory2.buffer;
+ assert_equals(memory.buffer, buffer, "Should not change the buffer");
+}, "Setting (sloppy mode)");
+
+test(() => {
+ const argument = { "initial": 0 };
+ const memory = new WebAssembly.Memory(argument);
+ const memory2 = new WebAssembly.Memory(argument);
+ const buffer = memory.buffer;
+ assert_not_equals(buffer, memory2.buffer, "Need two distinct buffers");
+ assert_throws(new TypeError(), () => {
+ "use strict";
+ memory.buffer = memory2.buffer;
+ });
+ assert_equals(memory.buffer, buffer, "Should not change the buffer");
+}, "Setting (strict mode)");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/memory/constructor.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/memory/constructor.any.js
index 33256f85e45..f9907ca6104 100644
--- a/tests/wpt/web-platform-tests/wasm/jsapi/memory/constructor.any.js
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/memory/constructor.any.js
@@ -1,12 +1,23 @@
// META: global=jsshell
-// META: script=/wasm/jsapi/wasm-constants.js
-// META: script=/wasm/jsapi/wasm-module-builder.js
// META: script=/wasm/jsapi/assertions.js
-let emptyModuleBinary;
-setup(() => {
- emptyModuleBinary = new WasmModuleBuilder().toBuffer();
-});
+function assert_Memory(memory, expected) {
+ assert_equals(Object.getPrototypeOf(memory), WebAssembly.Memory.prototype,
+ "prototype");
+ assert_true(Object.isExtensible(memory), "extensible");
+
+ // https://github.com/WebAssembly/spec/issues/840
+ assert_equals(memory.buffer, memory.buffer, "buffer should be idempotent");
+ assert_equals(Object.getPrototypeOf(memory.buffer), ArrayBuffer.prototype,
+ "prototype of buffer");
+ assert_true(Object.isExtensible(memory.buffer), "buffer extensibility");
+ assert_equals(memory.buffer.byteLength, 0x10000 * expected.size, "size of buffer");
+ if (expected.size > 0) {
+ const array = new Uint8Array(memory.buffer);
+ assert_equals(array[0], 0, "first element of buffer");
+ assert_equals(array[array.byteLength - 1], 0, "last element of buffer");
+ }
+}
test(() => {
assert_function_name(WebAssembly.Memory, "Memory", "WebAssembly.Memory");
@@ -26,8 +37,24 @@ test(() => {
}, "Calling");
test(() => {
- assert_throws(new TypeError(), () => new WebAssembly.Memory({}));
-}, "Empty descriptor");
+ const invalidArguments = [
+ undefined,
+ null,
+ false,
+ true,
+ "",
+ "test",
+ Symbol(),
+ 1,
+ NaN,
+ {},
+ ];
+ for (const invalidArgument of invalidArguments) {
+ assert_throws(new TypeError(),
+ () => new WebAssembly.Memory(invalidArgument),
+ `new Memory(${format_value(invalidArgument)})`);
+ }
+}, "Invalid descriptor argument");
test(() => {
assert_throws(new TypeError(), () => new WebAssembly.Memory({ "initial": undefined }));
@@ -65,7 +92,46 @@ test(() => {
}, "Proxy descriptor");
test(() => {
+ const order = [];
+
+ new WebAssembly.Memory({
+ get maximum() {
+ order.push("maximum");
+ return {
+ valueOf() {
+ order.push("maximum valueOf");
+ return 1;
+ },
+ };
+ },
+
+ get initial() {
+ order.push("initial");
+ return {
+ valueOf() {
+ order.push("initial valueOf");
+ return 1;
+ },
+ };
+ },
+ });
+
+ assert_array_equals(order, [
+ "initial",
+ "initial valueOf",
+ "maximum",
+ "maximum valueOf",
+ ]);
+}, "Order of evaluation for descriptor");
+
+test(() => {
const argument = { "initial": 0 };
const memory = new WebAssembly.Memory(argument);
- assert_equals(Object.getPrototypeOf(memory), WebAssembly.Memory.prototype);
-}, "Prototype");
+ assert_Memory(memory, { "size": 0 });
+}, "Zero initial");
+
+test(() => {
+ const argument = { "initial": 4 };
+ const memory = new WebAssembly.Memory(argument);
+ assert_Memory(memory, { "size": 4 });
+}, "Non-zero initial");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/memory/grow.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/memory/grow.any.js
new file mode 100644
index 00000000000..95300399f19
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/memory/grow.any.js
@@ -0,0 +1,170 @@
+// META: global=jsshell
+
+function assert_ArrayBuffer(actual, expected, message) {
+ // https://github.com/WebAssembly/spec/issues/840
+ assert_equals(Object.getPrototypeOf(actual), ArrayBuffer.prototype,
+ `${message}: prototype`);
+ if (expected.detached) {
+ // https://github.com/tc39/ecma262/issues/678
+ let byteLength;
+ try {
+ byteLength = actual.byteLength;
+ } catch (e) {
+ byteLength = 0;
+ }
+ assert_equals(byteLength, 0, `${message}: detached size`);
+ } else {
+ assert_equals(actual.byteLength, 0x10000 * expected.size, `${message}: size`);
+ if (expected.size > 0) {
+ const array = new Uint8Array(actual);
+ assert_equals(array[0], 0, `${message}: first element`);
+ assert_equals(array[array.byteLength - 1], 0, `${message}: last element`);
+ }
+ }
+}
+
+test(() => {
+ const argument = { "initial": 0 };
+ const memory = new WebAssembly.Memory(argument);
+ assert_throws(new TypeError(), () => memory.grow());
+}, "Missing arguments");
+
+test(t => {
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Memory,
+ WebAssembly.Memory.prototype,
+ ];
+
+ const argument = {
+ valueOf: t.unreached_func("Should not touch the argument (valueOf)"),
+ toString: t.unreached_func("Should not touch the argument (toString)"),
+ };
+
+ const fn = WebAssembly.Memory.prototype.grow;
+
+ for (const thisValue of thisValues) {
+ assert_throws(new TypeError(), () => fn.call(thisValue, argument), `this=${format_value(thisValue)}`);
+ }
+}, "Branding");
+
+test(() => {
+ const argument = { "initial": 0 };
+ const memory = new WebAssembly.Memory(argument);
+ const oldMemory = memory.buffer;
+ assert_ArrayBuffer(oldMemory, { "size": 0 }, "Buffer before growing");
+
+ const result = memory.grow(2);
+ assert_equals(result, 0);
+
+ const newMemory = memory.buffer;
+ assert_not_equals(oldMemory, newMemory);
+ assert_ArrayBuffer(oldMemory, { "detached": true }, "Old buffer after growing");
+ assert_ArrayBuffer(newMemory, { "size": 2 }, "New buffer after growing");
+}, "Zero initial");
+
+test(() => {
+ const argument = { "initial": { valueOf() { return 0 } } };
+ const memory = new WebAssembly.Memory(argument);
+ const oldMemory = memory.buffer;
+ assert_ArrayBuffer(oldMemory, { "size": 0 }, "Buffer before growing");
+
+ const result = memory.grow({ valueOf() { return 2 } });
+ assert_equals(result, 0);
+
+ const newMemory = memory.buffer;
+ assert_not_equals(oldMemory, newMemory);
+ assert_ArrayBuffer(oldMemory, { "detached": true }, "Old buffer after growing");
+ assert_ArrayBuffer(newMemory, { "size": 2 }, "New buffer after growing");
+}, "Zero initial with valueOf");
+
+test(() => {
+ const argument = { "initial": 3 };
+ const memory = new WebAssembly.Memory(argument);
+ const oldMemory = memory.buffer;
+ assert_ArrayBuffer(oldMemory, { "size": 3 }, "Buffer before growing");
+
+ const result = memory.grow(2);
+ assert_equals(result, 3);
+
+ const newMemory = memory.buffer;
+ assert_not_equals(oldMemory, newMemory);
+ assert_ArrayBuffer(oldMemory, { "detached": true }, "Old buffer after growing");
+ assert_ArrayBuffer(newMemory, { "size": 5 }, "New buffer after growing");
+}, "Non-zero initial");
+
+test(() => {
+ const argument = { "initial": 0, "maximum": 2 };
+ const memory = new WebAssembly.Memory(argument);
+ const oldMemory = memory.buffer;
+ assert_ArrayBuffer(oldMemory, { "size": 0 }, "Buffer before growing");
+
+ const result = memory.grow(2);
+ assert_equals(result, 0);
+
+ const newMemory = memory.buffer;
+ assert_not_equals(oldMemory, newMemory);
+ assert_ArrayBuffer(oldMemory, { "detached": true }, "Old buffer after growing");
+ assert_ArrayBuffer(newMemory, { "size": 2 }, "New buffer after growing");
+}, "Zero initial with respected maximum");
+
+test(() => {
+ const argument = { "initial": 0, "maximum": 2 };
+ const memory = new WebAssembly.Memory(argument);
+ const oldMemory = memory.buffer;
+ assert_ArrayBuffer(oldMemory, { "size": 0 }, "Buffer before growing");
+
+ const result = memory.grow(1);
+ assert_equals(result, 0);
+
+ const newMemory = memory.buffer;
+ assert_not_equals(oldMemory, newMemory);
+ assert_ArrayBuffer(oldMemory, { "detached": true }, "Old buffer after growing once");
+ assert_ArrayBuffer(newMemory, { "size": 1 }, "New buffer after growing once");
+
+ const result2 = memory.grow(1);
+ assert_equals(result2, 1);
+
+ const newestMemory = memory.buffer;
+ assert_not_equals(newMemory, newestMemory);
+ assert_ArrayBuffer(oldMemory, { "detached": true }, "New buffer after growing twice");
+ assert_ArrayBuffer(newMemory, { "detached": true }, "New buffer after growing twice");
+ assert_ArrayBuffer(newestMemory, { "size": 2 }, "Newest buffer after growing twice");
+}, "Zero initial with respected maximum grown twice");
+
+test(() => {
+ const argument = { "initial": 1, "maximum": 2 };
+ const memory = new WebAssembly.Memory(argument);
+ const oldMemory = memory.buffer;
+ assert_ArrayBuffer(oldMemory, { "size": 1 }, "Buffer before growing");
+
+ assert_throws(new RangeError(), () => memory.grow(2));
+ assert_equals(memory.buffer, oldMemory);
+ assert_ArrayBuffer(memory.buffer, { "size": 1 }, "Buffer before trying to grow");
+}, "Zero initial growing too much");
+
+const outOfRangeValues = [
+ undefined,
+ NaN,
+ Infinity,
+ -Infinity,
+ -1,
+ 0x100000000,
+ 0x1000000000,
+ "0x100000000",
+ { valueOf() { return 0x100000000; } },
+];
+
+for (const value of outOfRangeValues) {
+ test(() => {
+ const argument = { "initial": 0 };
+ const memory = new WebAssembly.Memory(argument);
+ assert_throws(new TypeError(), () => memory.grow(value));
+ }, `Out-of-range argument: ${format_value(value)}`);
+}
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/memory/toString.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/memory/toString.any.js
new file mode 100644
index 00000000000..4e15d75ea20
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/memory/toString.any.js
@@ -0,0 +1,7 @@
+// META: global=jsshell
+
+test(() => {
+ const argument = { "initial": 0 };
+ const memory = new WebAssembly.Memory(argument);
+ assert_class_string(memory, "WebAssembly.Memory");
+}, "Object.prototype.toString on an Memory");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/module/constructor.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/module/constructor.any.js
index 0f5eecf957e..32f183fac87 100644
--- a/tests/wpt/web-platform-tests/wasm/jsapi/module/constructor.any.js
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/module/constructor.any.js
@@ -25,6 +25,26 @@ test(() => {
}, "Calling");
test(() => {
+ const invalidArguments = [
+ undefined,
+ null,
+ true,
+ "test",
+ Symbol(),
+ 7,
+ NaN,
+ {},
+ ArrayBuffer,
+ ArrayBuffer.prototype,
+ Array.from(emptyModuleBinary),
+ ];
+ for (const argument of invalidArguments) {
+ assert_throws(new TypeError(), () => new WebAssembly.Module(argument),
+ `new Module(${format_value(argument)})`);
+ }
+}, "Invalid arguments");
+
+test(() => {
const buffer = new Uint8Array();
assert_throws(new WebAssembly.CompileError(), () => new WebAssembly.Module(buffer));
}, "Empty buffer");
@@ -33,3 +53,8 @@ test(() => {
const module = new WebAssembly.Module(emptyModuleBinary);
assert_equals(Object.getPrototypeOf(module), WebAssembly.Module.prototype);
}, "Prototype");
+
+test(() => {
+ const module = new WebAssembly.Module(emptyModuleBinary);
+ assert_true(Object.isExtensible(module));
+}, "Extensibility");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/module/customSections.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/module/customSections.any.js
index 146aa7fd332..58ac63b61c9 100644
--- a/tests/wpt/web-platform-tests/wasm/jsapi/module/customSections.any.js
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/module/customSections.any.js
@@ -4,12 +4,14 @@
function assert_ArrayBuffer(buffer, expected) {
assert_equals(Object.getPrototypeOf(buffer), ArrayBuffer.prototype, "Prototype");
+ assert_true(Object.isExtensible(buffer), "isExtensible");
assert_array_equals(new Uint8Array(buffer), expected);
}
function assert_sections(sections, expected) {
assert_true(Array.isArray(sections), "Should be array");
assert_equals(Object.getPrototypeOf(sections), Array.prototype, "Prototype");
+ assert_true(Object.isExtensible(sections), "isExtensible");
assert_equals(sections.length, expected.length);
for (let i = 0; i < expected.length; ++i) {
@@ -29,10 +31,21 @@ test(() => {
}, "Missing arguments");
test(() => {
- assert_throws(new TypeError(), () => WebAssembly.Module.customSections({}, ""));
- assert_throws(new TypeError(), () => WebAssembly.Module.customSections("", ""));
- assert_throws(new TypeError(), () => WebAssembly.Module.customSections(undefined, ""));
- assert_throws(new TypeError(), () => WebAssembly.Module.customSections(null, ""));
+ const invalidArguments = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Module,
+ WebAssembly.Module.prototype,
+ ];
+ for (const argument of invalidArguments) {
+ assert_throws(new TypeError(), () => WebAssembly.Module.customSections(argument, ""),
+ `customSections(${format_value(argument)})`);
+ }
}, "Non-Module arguments");
test(() => {
@@ -102,3 +115,48 @@ test(() => {
assert_sections(WebAssembly.Module.customSections(module, "name\0"), [])
assert_sections(WebAssembly.Module.customSections(module, "foo\0"), [])
}, "Custom sections");
+
+test(() => {
+ const bytes = [87, 101, 98, 65, 115, 115, 101, 109, 98, 108, 121];
+ const name = "yee\uD801\uDC37eey"
+
+ const binary = new Binary;
+ binary.emit_section(kUnknownSectionCode, section => {
+ section.emit_string(name);
+ section.emit_bytes(bytes);
+ });
+
+ const builder = new WasmModuleBuilder();
+ builder.addExplicitSection(binary);
+ const buffer = builder.toBuffer();
+ const module = new WebAssembly.Module(buffer);
+
+ assert_sections(WebAssembly.Module.customSections(module, name), [
+ bytes,
+ ]);
+ assert_sections(WebAssembly.Module.customSections(module, "yee\uFFFDeey"), []);
+ assert_sections(WebAssembly.Module.customSections(module, "yee\uFFFD\uFFFDeey"), []);
+}, "Custom sections with surrogate pairs");
+
+test(() => {
+ const bytes = [87, 101, 98, 65, 115, 115, 101, 109, 98, 108, 121];
+
+ const binary = new Binary;
+ binary.emit_section(kUnknownSectionCode, section => {
+ section.emit_string("na\uFFFDme");
+ section.emit_bytes(bytes);
+ });
+
+ const builder = new WasmModuleBuilder();
+ builder.addExplicitSection(binary);
+ const buffer = builder.toBuffer();
+ const module = new WebAssembly.Module(buffer);
+
+ assert_sections(WebAssembly.Module.customSections(module, "name"), []);
+ assert_sections(WebAssembly.Module.customSections(module, "na\uFFFDme"), [
+ bytes,
+ ]);
+ assert_sections(WebAssembly.Module.customSections(module, "na\uDC01me"), [
+ bytes,
+ ]);
+}, "Custom sections with U+FFFD");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/module/exports.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/module/exports.any.js
index c7ecdcf6b61..e63a885a4c3 100644
--- a/tests/wpt/web-platform-tests/wasm/jsapi/module/exports.any.js
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/module/exports.any.js
@@ -7,15 +7,54 @@ setup(() => {
emptyModuleBinary = new WasmModuleBuilder().toBuffer();
});
+function assert_ModuleExportDescriptor(export_, expected) {
+ assert_equals(Object.getPrototypeOf(export_), Object.prototype, "Prototype");
+ assert_true(Object.isExtensible(export_), "isExtensible");
+
+ const name = Object.getOwnPropertyDescriptor(export_, "name");
+ assert_true(name.writable, "name: writable");
+ assert_true(name.enumerable, "name: enumerable");
+ assert_true(name.configurable, "name: configurable");
+ assert_equals(name.value, expected.name);
+
+ const kind = Object.getOwnPropertyDescriptor(export_, "kind");
+ assert_true(kind.writable, "kind: writable");
+ assert_true(kind.enumerable, "kind: enumerable");
+ assert_true(kind.configurable, "kind: configurable");
+ assert_equals(kind.value, expected.kind);
+}
+
+function assert_exports(exports, expected) {
+ assert_true(Array.isArray(exports), "Should be array");
+ assert_equals(Object.getPrototypeOf(exports), Array.prototype, "Prototype");
+ assert_true(Object.isExtensible(exports), "isExtensible");
+
+ assert_equals(exports.length, expected.length);
+ for (let i = 0; i < expected.length; ++i) {
+ assert_ModuleExportDescriptor(exports[i], expected[i]);
+ }
+}
+
test(() => {
assert_throws(new TypeError(), () => WebAssembly.Module.exports());
}, "Missing arguments");
test(() => {
- assert_throws(new TypeError(), () => WebAssembly.Module.exports({}));
- assert_throws(new TypeError(), () => WebAssembly.Module.exports(""));
- assert_throws(new TypeError(), () => WebAssembly.Module.exports(undefined));
- assert_throws(new TypeError(), () => WebAssembly.Module.exports(null));
+ const invalidArguments = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Module,
+ WebAssembly.Module.prototype,
+ ];
+ for (const argument of invalidArguments) {
+ assert_throws(new TypeError(), () => WebAssembly.Module.exports(argument),
+ `exports(${format_value(argument)})`);
+ }
}, "Non-Module arguments");
test(() => {
@@ -40,15 +79,7 @@ test(() => {
test(() => {
const module = new WebAssembly.Module(emptyModuleBinary);
const exports = WebAssembly.Module.exports(module);
- assert_true(Array.isArray(exports));
-}, "Return type");
-
-test(() => {
- const module = new WebAssembly.Module(emptyModuleBinary);
- const exports = WebAssembly.Module.exports(module);
- assert_true(Array.isArray(exports), "Should be array");
- assert_equals(Object.getPrototypeOf(exports), Array.prototype, "Prototype");
- assert_array_equals(exports, []);
+ assert_exports(exports, []);
}, "Empty module");
test(() => {
@@ -56,22 +87,6 @@ test(() => {
assert_not_equals(WebAssembly.Module.exports(module), WebAssembly.Module.exports(module));
}, "Empty module: array caching");
-function assert_ModuleExportDescriptor(export_, expected) {
- assert_equals(Object.getPrototypeOf(export_), Object.prototype, "Prototype");
-
- const name = Object.getOwnPropertyDescriptor(export_, "name");
- assert_true(name.writable, "name: writable");
- assert_true(name.enumerable, "name: enumerable");
- assert_true(name.configurable, "name: configurable");
- assert_equals(name.value, expected.name);
-
- const kind = Object.getOwnPropertyDescriptor(export_, "kind");
- assert_true(kind.writable, "kind: writable");
- assert_true(kind.enumerable, "kind: enumerable");
- assert_true(kind.configurable, "kind: configurable");
- assert_equals(kind.value, expected.kind);
-}
-
test(() => {
const builder = new WasmModuleBuilder();
@@ -103,9 +118,6 @@ test(() => {
const buffer = builder.toBuffer()
const module = new WebAssembly.Module(buffer);
const exports = WebAssembly.Module.exports(module);
- assert_true(Array.isArray(exports), "Should be array");
- assert_equals(Object.getPrototypeOf(exports), Array.prototype, "Prototype");
-
const expected = [
{ "kind": "function", "name": "fn" },
{ "kind": "function", "name": "fn2" },
@@ -114,8 +126,5 @@ test(() => {
{ "kind": "global", "name": "global2" },
{ "kind": "memory", "name": "memory" },
];
- assert_equals(exports.length, expected.length);
- for (let i = 0; i < expected.length; ++i) {
- assert_ModuleExportDescriptor(exports[i], expected[i]);
- }
+ assert_exports(exports, expected);
}, "exports");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/module/imports.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/module/imports.any.js
index 522b262f549..640da591d21 100644
--- a/tests/wpt/web-platform-tests/wasm/jsapi/module/imports.any.js
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/module/imports.any.js
@@ -2,6 +2,40 @@
// META: script=/wasm/jsapi/wasm-constants.js
// META: script=/wasm/jsapi/wasm-module-builder.js
+function assert_ModuleImportDescriptor(import_, expected) {
+ assert_equals(Object.getPrototypeOf(import_), Object.prototype, "Prototype");
+ assert_true(Object.isExtensible(import_), "isExtensible");
+
+ const module = Object.getOwnPropertyDescriptor(import_, "module");
+ assert_true(module.writable, "module: writable");
+ assert_true(module.enumerable, "module: enumerable");
+ assert_true(module.configurable, "module: configurable");
+ assert_equals(module.value, expected.module);
+
+ const name = Object.getOwnPropertyDescriptor(import_, "name");
+ assert_true(name.writable, "name: writable");
+ assert_true(name.enumerable, "name: enumerable");
+ assert_true(name.configurable, "name: configurable");
+ assert_equals(name.value, expected.name);
+
+ const kind = Object.getOwnPropertyDescriptor(import_, "kind");
+ assert_true(kind.writable, "kind: writable");
+ assert_true(kind.enumerable, "kind: enumerable");
+ assert_true(kind.configurable, "kind: configurable");
+ assert_equals(kind.value, expected.kind);
+}
+
+function assert_imports(imports, expected) {
+ assert_true(Array.isArray(imports), "Should be array");
+ assert_equals(Object.getPrototypeOf(imports), Array.prototype, "Prototype");
+ assert_true(Object.isExtensible(imports), "isExtensible");
+
+ assert_equals(imports.length, expected.length);
+ for (let i = 0; i < expected.length; ++i) {
+ assert_ModuleImportDescriptor(imports[i], expected[i]);
+ }
+}
+
let emptyModuleBinary;
setup(() => {
emptyModuleBinary = new WasmModuleBuilder().toBuffer();
@@ -12,10 +46,21 @@ test(() => {
}, "Missing arguments");
test(() => {
- assert_throws(new TypeError(), () => WebAssembly.Module.imports({}));
- assert_throws(new TypeError(), () => WebAssembly.Module.imports(""));
- assert_throws(new TypeError(), () => WebAssembly.Module.imports(undefined));
- assert_throws(new TypeError(), () => WebAssembly.Module.imports(null));
+ const invalidArguments = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Module,
+ WebAssembly.Module.prototype,
+ ];
+ for (const argument of invalidArguments) {
+ assert_throws(new TypeError(), () => WebAssembly.Module.imports(argument),
+ `imports(${format_value(argument)})`);
+ }
}, "Non-Module arguments");
test(() => {
@@ -46,9 +91,7 @@ test(() => {
test(() => {
const module = new WebAssembly.Module(emptyModuleBinary);
const imports = WebAssembly.Module.imports(module);
- assert_true(Array.isArray(imports), "Should be array");
- assert_equals(Object.getPrototypeOf(imports), Array.prototype, "Prototype");
- assert_array_equals(imports, []);
+ assert_imports(imports, []);
}, "Empty module");
test(() => {
@@ -56,28 +99,6 @@ test(() => {
assert_not_equals(WebAssembly.Module.imports(module), WebAssembly.Module.imports(module));
}, "Empty module: array caching");
-function assert_ModuleImportDescriptor(import_, expected) {
- assert_equals(Object.getPrototypeOf(import_), Object.prototype, "Prototype");
-
- const module = Object.getOwnPropertyDescriptor(import_, "module");
- assert_true(module.writable, "module: writable");
- assert_true(module.enumerable, "module: enumerable");
- assert_true(module.configurable, "module: configurable");
- assert_equals(module.value, expected.module);
-
- const name = Object.getOwnPropertyDescriptor(import_, "name");
- assert_true(name.writable, "name: writable");
- assert_true(name.enumerable, "name: enumerable");
- assert_true(name.configurable, "name: configurable");
- assert_equals(name.value, expected.name);
-
- const kind = Object.getOwnPropertyDescriptor(import_, "kind");
- assert_true(kind.writable, "kind: writable");
- assert_true(kind.enumerable, "kind: enumerable");
- assert_true(kind.configurable, "kind: configurable");
- assert_equals(kind.value, expected.kind);
-}
-
test(() => {
const builder = new WasmModuleBuilder();
@@ -89,17 +110,11 @@ test(() => {
const buffer = builder.toBuffer()
const module = new WebAssembly.Module(buffer);
const imports = WebAssembly.Module.imports(module);
- assert_true(Array.isArray(imports), "Should be array");
- assert_equals(Object.getPrototypeOf(imports), Array.prototype, "Prototype");
-
const expected = [
{ "module": "module", "kind": "function", "name": "fn" },
{ "module": "module", "kind": "global", "name": "global" },
{ "module": "module", "kind": "memory", "name": "memory" },
{ "module": "module", "kind": "table", "name": "table" },
];
- assert_equals(imports.length, expected.length);
- for (let i = 0; i < expected.length; ++i) {
- assert_ModuleImportDescriptor(imports[i], expected[i]);
- }
+ assert_imports(imports, expected);
}, "imports");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/module/toString.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/module/toString.any.js
new file mode 100644
index 00000000000..d9231a132ca
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/module/toString.any.js
@@ -0,0 +1,9 @@
+// META: global=jsshell
+// META: script=/wasm/jsapi/wasm-constants.js
+// META: script=/wasm/jsapi/wasm-module-builder.js
+
+test(() => {
+ const emptyModuleBinary = new WasmModuleBuilder().toBuffer();
+ const module = new WebAssembly.Module(emptyModuleBinary);
+ assert_class_string(module, "WebAssembly.Module");
+}, "Object.prototype.toString on an Module");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js b/tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js
new file mode 100644
index 00000000000..dde2fd77090
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/table/assertions.js
@@ -0,0 +1,11 @@
+function assert_equal_to_array(table, expected, message) {
+ assert_equals(table.length, expected.length, `${message}: length`);
+ assert_throws(new RangeError(), () => table.get(-1), `${message}: table.get(-1)`);
+ for (let i = 0; i < expected.length; ++i) {
+ assert_equals(table.get(i), expected[i], `${message}: table.get(${i} of ${expected.length})`);
+ }
+ assert_throws(new RangeError(), () => table.get(expected.length),
+ `${message}: table.get(${expected.length} of ${expected.length})`);
+ assert_throws(new RangeError(), () => table.get(expected.length + 1),
+ `${message}: table.get(${expected.length + 1} of ${expected.length})`);
+}
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/table/constructor.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/table/constructor.any.js
index 4aeac10f7ad..e924bdb2ba4 100644
--- a/tests/wpt/web-platform-tests/wasm/jsapi/table/constructor.any.js
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/table/constructor.any.js
@@ -1,12 +1,16 @@
// META: global=jsshell
-// META: script=/wasm/jsapi/wasm-constants.js
-// META: script=/wasm/jsapi/wasm-module-builder.js
// META: script=/wasm/jsapi/assertions.js
-let emptyModuleBinary;
-setup(() => {
- emptyModuleBinary = new WasmModuleBuilder().toBuffer();
-});
+function assert_Table(actual, expected) {
+ assert_equals(Object.getPrototypeOf(actual), WebAssembly.Table.prototype,
+ "prototype");
+ assert_true(Object.isExtensible(actual), "extensible");
+
+ assert_equals(actual.length, expected.length, "length");
+ for (let i = 0; i < expected.length; ++i) {
+ assert_equals(actual.get(i), null, `actual.get(${i})`);
+ }
+}
test(() => {
assert_function_name(WebAssembly.Table, "Table", "WebAssembly.Table");
@@ -21,7 +25,7 @@ test(() => {
}, "No arguments");
test(() => {
- const argument = { "initial": 0 };
+ const argument = { "element": "anyfunc", "initial": 0 };
assert_throws(new TypeError(), () => WebAssembly.Table(argument));
}, "Calling");
@@ -30,6 +34,26 @@ test(() => {
}, "Empty descriptor");
test(() => {
+ const invalidArguments = [
+ undefined,
+ null,
+ false,
+ true,
+ "",
+ "test",
+ Symbol(),
+ 1,
+ NaN,
+ {},
+ ];
+ for (const invalidArgument of invalidArguments) {
+ assert_throws(new TypeError(),
+ () => new WebAssembly.Table(invalidArgument),
+ `new Table(${format_value(invalidArgument)})`);
+ }
+}, "Invalid descriptor argument");
+
+test(() => {
assert_throws(new TypeError(), () => new WebAssembly.Table({ "element": "anyfunc", "initial": undefined }));
}, "Undefined initial value in descriptor");
@@ -57,6 +81,22 @@ for (const value of outOfRangeValues) {
}
test(() => {
+ assert_throws(new RangeError(), () => new WebAssembly.Table({ "element": "anyfunc", "initial": 10, "maximum": 9 }));
+}, "Initial value exceeds maximum");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 0 };
+ const table = new WebAssembly.Table(argument);
+ assert_Table(table, { "length": 0 });
+}, "Basic (zero)");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_Table(table, { "length": 5 });
+}, "Basic (non-zero)");
+
+test(() => {
const proxy = new Proxy({}, {
has(o, x) {
assert_unreached(`Should not call [[HasProperty]] with ${x}`);
@@ -73,11 +113,61 @@ test(() => {
}
},
});
- new WebAssembly.Table(proxy);
+ const table = new WebAssembly.Table(proxy);
+ assert_Table(table, { "length": 0 });
}, "Proxy descriptor");
test(() => {
- const argument = { "element": "anyfunc", "initial": 0 };
- const table = new WebAssembly.Table(argument);
- assert_equals(Object.getPrototypeOf(table), WebAssembly.Table.prototype);
-}, "Prototype");
+ const table = new WebAssembly.Table({
+ "element": {
+ toString() { return "anyfunc"; },
+ },
+ "initial": 1,
+ });
+ assert_Table(table, { "length": 1 });
+}, "Type conversion for descriptor.element");
+
+test(() => {
+ const order = [];
+
+ new WebAssembly.Table({
+ get maximum() {
+ order.push("maximum");
+ return {
+ valueOf() {
+ order.push("maximum valueOf");
+ return 1;
+ },
+ };
+ },
+
+ get initial() {
+ order.push("initial");
+ return {
+ valueOf() {
+ order.push("initial valueOf");
+ return 1;
+ },
+ };
+ },
+
+ get element() {
+ order.push("element");
+ return {
+ toString() {
+ order.push("element toString");
+ return "anyfunc";
+ },
+ };
+ },
+ });
+
+ assert_array_equals(order, [
+ "element",
+ "element toString",
+ "initial",
+ "initial valueOf",
+ "maximum",
+ "maximum valueOf",
+ ]);
+}, "Order of evaluation for descriptor");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/table/get-set.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/table/get-set.any.js
new file mode 100644
index 00000000000..2bb43a9308d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/table/get-set.any.js
@@ -0,0 +1,220 @@
+// META: global=jsshell
+// META: script=/wasm/jsapi/wasm-constants.js
+// META: script=/wasm/jsapi/wasm-module-builder.js
+// META: script=assertions.js
+
+let functions;
+setup(() => {
+ const builder = new WasmModuleBuilder();
+
+ builder
+ .addFunction("fn", kSig_v_d)
+ .addBody([
+ kExprEnd
+ ])
+ .exportFunc();
+ builder
+ .addFunction("fn2", kSig_v_v)
+ .addBody([
+ kExprEnd
+ ])
+ .exportFunc();
+
+ const buffer = builder.toBuffer()
+ const module = new WebAssembly.Module(buffer);
+ const instance = new WebAssembly.Instance(module, {});
+ functions = instance.exports;
+});
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_throws(new TypeError(), () => table.get());
+}, "Missing arguments: get");
+
+test(t => {
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Table,
+ WebAssembly.Table.prototype,
+ ];
+
+ const argument = {
+ valueOf: t.unreached_func("Should not touch the argument (valueOf)"),
+ toString: t.unreached_func("Should not touch the argument (toString)"),
+ };
+
+ const fn = WebAssembly.Table.prototype.get;
+
+ for (const thisValue of thisValues) {
+ assert_throws(new TypeError(), () => fn.call(thisValue, argument), `this=${format_value(thisValue)}`);
+ }
+}, "Branding: get");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_throws(new TypeError(), () => table.set());
+ assert_throws(new TypeError(), () => table.set(0));
+}, "Missing arguments: set");
+
+test(t => {
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Table,
+ WebAssembly.Table.prototype,
+ ];
+
+ const argument = {
+ valueOf: t.unreached_func("Should not touch the argument (valueOf)"),
+ toString: t.unreached_func("Should not touch the argument (toString)"),
+ };
+
+ const fn = WebAssembly.Table.prototype.set;
+
+ for (const thisValue of thisValues) {
+ assert_throws(new TypeError(), () => fn.call(thisValue, argument, null), `this=${format_value(thisValue)}`);
+ }
+}, "Branding: set");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_equal_to_array(table, [null, null, null, null, null]);
+
+ const {fn, fn2} = functions;
+
+ assert_equals(table.set(0, fn), undefined, "set() returns undefined.");
+ table.set(2, fn2);
+ table.set(4, fn);
+
+ assert_equal_to_array(table, [fn, null, fn2, null, fn]);
+
+ table.set(0, null);
+ assert_equal_to_array(table, [null, null, fn2, null, fn]);
+}, "Basic");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_equal_to_array(table, [null, null, null, null, null]);
+
+ const {fn, fn2} = functions;
+
+ table.set(0, fn);
+ table.set(2, fn2);
+ table.set(4, fn);
+
+ assert_equal_to_array(table, [fn, null, fn2, null, fn]);
+
+ table.grow(4);
+
+ assert_equal_to_array(table, [fn, null, fn2, null, fn, null, null, null, null]);
+}, "Growing");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_equal_to_array(table, [null, null, null, null, null]);
+
+ const {fn} = functions;
+
+ assert_throws(new RangeError(), () => table.set(-1, fn));
+ assert_throws(new RangeError(), () => table.set(5, fn));
+ assert_equal_to_array(table, [null, null, null, null, null]);
+}, "Setting out-of-bounds");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 1 };
+ const table = new WebAssembly.Table(argument);
+ assert_equal_to_array(table, [null]);
+
+ const invalidArguments = [
+ undefined,
+ true,
+ false,
+ "test",
+ Symbol(),
+ 7,
+ NaN,
+ {},
+ ];
+ for (const argument of invalidArguments) {
+ assert_throws(new TypeError(), () => table.set(0, argument),
+ `set(${format_value(argument)})`);
+ }
+ assert_equal_to_array(table, [null]);
+}, "Setting non-function");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 1 };
+ const table = new WebAssembly.Table(argument);
+ assert_equal_to_array(table, [null]);
+
+ const fn = function() {};
+ assert_throws(new TypeError(), () => table.set(0, fn));
+ assert_equal_to_array(table, [null]);
+}, "Setting non-wasm function");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 1 };
+ const table = new WebAssembly.Table(argument);
+ assert_equal_to_array(table, [null]);
+
+ const fn = () => {};
+ assert_throws(new TypeError(), () => table.set(0, fn));
+ assert_equal_to_array(table, [null]);
+}, "Setting non-wasm arrow function");
+
+const outOfRangeValues = [
+ undefined,
+ NaN,
+ Infinity,
+ -Infinity,
+ -1,
+ 0x100000000,
+ 0x1000000000,
+ "0x100000000",
+ { valueOf() { return 0x100000000; } },
+];
+
+for (const value of outOfRangeValues) {
+ test(() => {
+ const argument = { "element": "anyfunc", "initial": 1 };
+ const table = new WebAssembly.Table(argument);
+ assert_throws(new TypeError(), () => table.get(value));
+ }, `Getting out-of-range argument: ${format_value(value)}`);
+
+ test(() => {
+ const argument = { "element": "anyfunc", "initial": 1 };
+ const table = new WebAssembly.Table(argument);
+ assert_throws(new TypeError(), () => table.set(value, null));
+ }, `Setting out-of-range argument: ${format_value(value)}`);
+}
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 1 };
+ const table = new WebAssembly.Table(argument);
+ let called = 0;
+ const value = {
+ valueOf() {
+ called++;
+ return 0;
+ },
+ };
+ assert_throws(new TypeError(), () => table.set(value, {}));
+ assert_equals(called, 1);
+}, "Order of argument conversion");
+
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/table/grow.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/table/grow.any.js
new file mode 100644
index 00000000000..d3efb511e4b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/table/grow.any.js
@@ -0,0 +1,86 @@
+// META: global=jsshell
+// META: script=assertions.js
+
+function nulls(n) {
+ return Array(n).fill(null);
+}
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_throws(new TypeError(), () => table.grow());
+}, "Missing arguments");
+
+test(t => {
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Table,
+ WebAssembly.Table.prototype,
+ ];
+
+ const argument = {
+ valueOf: t.unreached_func("Should not touch the argument (valueOf)"),
+ toString: t.unreached_func("Should not touch the argument (toString)"),
+ };
+
+ const fn = WebAssembly.Table.prototype.grow;
+
+ for (const thisValue of thisValues) {
+ assert_throws(new TypeError(), () => fn.call(thisValue, argument), `this=${format_value(thisValue)}`);
+ }
+}, "Branding");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_equal_to_array(table, nulls(5), "before");
+
+ const result = table.grow(3);
+ assert_equals(result, 5);
+ assert_equal_to_array(table, nulls(8), "after");
+}, "Basic");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 3, "maximum": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_equal_to_array(table, nulls(3), "before");
+
+ const result = table.grow(2);
+ assert_equals(result, 3);
+ assert_equal_to_array(table, nulls(5), "after");
+}, "Reached maximum");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 2, "maximum": 5 };
+ const table = new WebAssembly.Table(argument);
+ assert_equal_to_array(table, nulls(2), "before");
+
+ assert_throws(new RangeError(), () => table.grow(4));
+ assert_equal_to_array(table, nulls(2), "after");
+}, "Exceeded maximum");
+
+const outOfRangeValues = [
+ undefined,
+ NaN,
+ Infinity,
+ -Infinity,
+ -1,
+ 0x100000000,
+ 0x1000000000,
+ "0x100000000",
+ { valueOf() { return 0x100000000; } },
+];
+
+for (const value of outOfRangeValues) {
+ test(() => {
+ const argument = { "element": "anyfunc", "initial": 1 };
+ const table = new WebAssembly.Table(argument);
+ assert_throws(new TypeError(), () => table.grow(value));
+ }, `Out-of-range argument: ${format_value(value)}`);
+}
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/table/length.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/table/length.any.js
new file mode 100644
index 00000000000..a6a9661dbad
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/table/length.any.js
@@ -0,0 +1,46 @@
+// META: global=jsshell
+
+test(() => {
+ const thisValues = [
+ undefined,
+ null,
+ true,
+ "",
+ Symbol(),
+ 1,
+ {},
+ WebAssembly.Table,
+ WebAssembly.Table.prototype,
+ ];
+
+ const desc = Object.getOwnPropertyDescriptor(WebAssembly.Table.prototype, "length");
+ assert_equals(typeof desc, "object");
+
+ const getter = desc.get;
+ assert_equals(typeof getter, "function");
+
+ assert_equals(typeof desc.set, "undefined");
+
+ for (const thisValue of thisValues) {
+ assert_throws(new TypeError(), () => getter.call(thisValue), `this=${format_value(thisValue)}`);
+ }
+}, "Branding");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 2 };
+ const table = new WebAssembly.Table(argument);
+ assert_equals(table.length, 2, "Initial length");
+ table.length = 4;
+ assert_equals(table.length, 2, "Should not change the length");
+}, "Setting (sloppy mode)");
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 2 };
+ const table = new WebAssembly.Table(argument);
+ assert_equals(table.length, 2, "Initial length");
+ assert_throws(new TypeError(), () => {
+ "use strict";
+ table.length = 4;
+ });
+ assert_equals(table.length, 2, "Should not change the length");
+}, "Setting (strict mode)");
diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/table/toString.any.js b/tests/wpt/web-platform-tests/wasm/jsapi/table/toString.any.js
new file mode 100644
index 00000000000..e576477910a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/jsapi/table/toString.any.js
@@ -0,0 +1,7 @@
+// META: global=jsshell
+
+test(() => {
+ const argument = { "element": "anyfunc", "initial": 0 };
+ const table = new WebAssembly.Table(argument);
+ assert_class_string(table, "WebAssembly.Table");
+}, "Object.prototype.toString on an Table");
diff --git a/tests/wpt/web-platform-tests/wasm/resources/frame.html b/tests/wpt/web-platform-tests/wasm/resources/frame.html
deleted file mode 100644
index d1c83e114a0..00000000000
--- a/tests/wpt/web-platform-tests/wasm/resources/frame.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<script>
-function listener(event) {
- var mod = event.data;
- try {
- var i = new WebAssembly.Instance(mod);
- var ans = i.exports.increment(42);
- event.source.postMessage(ans, event.origin);
- } catch (e) {
- event.source.postMessage(e, event.origin);
- }
-}
-
-if (window.addEventListener){
- addEventListener("message", listener, false)
-} else {
- attachEvent("onmessage", listener)
-}
-</script>
diff --git a/tests/wpt/web-platform-tests/wasm/resources/service-worker.js b/tests/wpt/web-platform-tests/wasm/resources/service-worker.js
deleted file mode 100644
index 684eaf64878..00000000000
--- a/tests/wpt/web-platform-tests/wasm/resources/service-worker.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var port;
-
-importScripts('load_wasm.js');
-
-self.onmessage = function(e) {
- var message = e.data;
- if ('port' in message) {
- port = message.port;
- }
-};
-
-// And an event listener:
-self.addEventListener('message', function(e) {
- var message = e.data;
- if ("compile" in message) {
- createWasmModule()
- .then(m => {
- try {
- port.postMessage({type:"OK", module:m});
- } catch (e) {
- port.postMessage({type:"SEND ERROR"});
- }
- })
- .catch(e => port.postMessage({type:"OTHER ERROR"}));
- }
-});
-
-self.addEventListener('messageerror', function(e) {
- port.postMessage({type:"RECEIVE ERROR"});
-});
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/broadcastchannel-success-and-failure.html b/tests/wpt/web-platform-tests/wasm/serialization/broadcastchannel-success-and-failure.html
new file mode 100644
index 00000000000..0d11cc595be
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/broadcastchannel-success-and-failure.html
@@ -0,0 +1,38 @@
+<!doctype html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<title>WebAssembly.Module cannot cross agent clusters, BroadcastChannel edition</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/test-incrementer.js"></script>
+<script>
+async_test(t => {
+ const channel = new BroadcastChannel("anne was here"),
+ dw = new Worker("resources/broadcastchannel-worker.js"),
+ sw = new SharedWorker("resources/broadcastchannel-sharedworker.js");
+ let startCounter = 0,
+ dwStatus = "unknown",
+ swStatus = "unknown";
+
+ channel.onmessage = t.step_func(({ data }) => {
+ if(data === "hi") {
+ startCounter++;
+ if(startCounter === 2) {
+ createWasmModule().then(module => {
+ channel.postMessage(module);
+ });
+ } else if(startCounter > 2) {
+ assert_unreached();
+ }
+ } else if(data === "dw-success") {
+ dwStatus = "success";
+ } else if(data === "sw-success") {
+ swStatus = "success";
+ } else {
+ assert_unreached();
+ }
+ if(dwStatus === "success" && swStatus === "success") {
+ t.done();
+ }
+ });
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/broadcastchannel-success.html b/tests/wpt/web-platform-tests/wasm/serialization/broadcastchannel-success.html
new file mode 100644
index 00000000000..cd5f8d0b56a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/broadcastchannel-success.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<meta charset="utf-8">
+<title>Structured cloning of WebAssembly.Module: BroadcastChannel within the same agent cluster</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/test-incrementer.js"></script>
+
+<div id="log"></div>
+
+<script>
+"use strict";
+
+promise_test(t => {
+ return createWasmModule().then(module => {
+ let loadedIframes = 0;
+ return Promise.all([
+ createIFrame("resources/broadcastchannel-iframe.html"),
+ createIFrame("resources/broadcastchannel-iframe.html"),
+ createIFrame("resources/broadcastchannel-iframe.html")
+ ]).then(() => {
+ const thisIframe = loadedIframes++;
+ const channel = new BroadcastChannel("channel name");
+
+ return new Promise(resolve => {
+ let soFar = 0;
+ channel.onmessage = t.step_func(msg => {
+ if (msg.module) {
+ // We only care about "broadcasts" from the workers.
+ return;
+ }
+
+ let {i, result} = msg;
+
+ assert_in_array(i, [0, 1, 2], "Any message events must come from expected sources");
+ assert_equals(result, i + 1, `iframe ${i} must return ${i+1}`);
+ ++soFar;
+
+ if (soFar === 3) {
+ resolve();
+ }
+ });
+
+ channel.postMessage({ module, i: thisIframe });
+ });
+ });
+ });
+});
+
+function createIFrame(src) {
+ return new Promise((resolve, reject) => {
+ const iframe = document.createElement("iframe");
+ iframe.src = src;
+ iframe.onload = () => resolve(iframe);
+ iframe.onerror = () => reject(`iframe with URL ${src} failed to load`);
+ document.body.appendChild(iframe);
+ });
+}
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/identity-not-preserved.html b/tests/wpt/web-platform-tests/wasm/serialization/identity-not-preserved.html
new file mode 100644
index 00000000000..24bb3b16d8c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/identity-not-preserved.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<meta charset="utf-8">
+<title>WebAssembly.Modules, when cloned, do not give back the same object</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/test-incrementer.js"></script>
+
+<div id="log"></div>
+
+<script>
+"use strict";
+
+async_test(t => {
+ createWasmModule().then(module => {
+ window.addEventListener("message", t.step_func(({ data }) => {
+ if (data.testId !== 1) {
+ return;
+ }
+
+ assert_not_equals(data.module, module);
+
+ t.done();
+ }));
+
+ window.postMessage({ module, testId: 1 }, "*");
+ });
+}, "postMessaging to this window does not give back the same WebAssembly.Module");
+
+async_test(t => {
+ createWasmModule().then(module => {
+ const worker = new Worker("resources/echo-worker.js");
+
+ worker.addEventListener("message", t.step_func(({ data }) => {
+ if (data.testId !== 2) {
+ return;
+ }
+
+ assert_not_equals(data.module, module);
+ t.done();
+ }));
+
+ worker.postMessage({ testId: 2, module });
+ });
+}, "postMessaging to a worker and back does not give back the same WebAssembly.Module");
+
+async_test(t => {
+ createWasmModule().then(module => {
+ window.addEventListener("message", t.step_func(({ data }) => {
+ if (data.testId !== 3) {
+ return;
+ }
+
+ assert_not_equals(data.module, module);
+ t.done();
+ }));
+
+ const iframe = document.createElement("iframe");
+ iframe.onload = t.step_func(() => {
+ iframe.contentWindow.postMessage({ testId: 3, module }, "*");
+ });
+ iframe.src = "resources/echo-iframe.html";
+ document.body.appendChild(iframe);
+ });
+}, "postMessaging to an iframe and back does not give back the same WebAssembly.Module");
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/resources/incrementer.wasm b/tests/wpt/web-platform-tests/wasm/serialization/incrementer.wasm
index 47afcdef2a2..47afcdef2a2 100644
--- a/tests/wpt/web-platform-tests/wasm/resources/incrementer.wasm
+++ b/tests/wpt/web-platform-tests/wasm/serialization/incrementer.wasm
Binary files differ
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/nested-worker-success.any.js b/tests/wpt/web-platform-tests/wasm/serialization/nested-worker-success.any.js
new file mode 100644
index 00000000000..5388ebcc39b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/nested-worker-success.any.js
@@ -0,0 +1,9 @@
+// META: global=!default,dedicatedworker,sharedworker
+// META: script=resources/test-incrementer.js
+"use strict";
+
+promise_test(t => {
+ const worker = new Worker("resources/incrementer-worker.js");
+
+ return testSharingViaIncrementerScript(t, worker, "parent worker", worker, "sub-worker");
+}, "postMessaging to a dedicated sub-worker allows them to see each others' modifications");
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/no-transferring.html b/tests/wpt/web-platform-tests/wasm/serialization/no-transferring.html
new file mode 100644
index 00000000000..a0bf11f01dd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/no-transferring.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<meta charset="utf-8">
+<title>WebAssembly.Modules cannot be transferred</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/create-empty-wasm-module.js"></script>
+
+<script>
+"use strict";
+
+test(() => {
+ const module = createEmptyWasmModule();
+ assert_throws("DataCloneError", () => window.postMessage(module, "*", [module]));
+ assert_throws("DataCloneError", () => window.postMessage("test", "*", [module]));
+}, "Trying to transfer a WebAssembly.Module to this window throws");
+
+test(() => {
+ const module = createEmptyWasmModule();
+ const worker = new Worker("resources/echo-worker.js");
+ assert_throws("DataCloneError", () => worker.postMessage(module, [module]));
+ assert_throws("DataCloneError", () => worker.postMessage("test", [module]));
+}, "Trying to transfer a WebAssembly.Module to a worker throws");
+
+test(() => {
+ const module = createEmptyWasmModule();
+ const channel = new MessageChannel();
+ assert_throws("DataCloneError", () => channel.port1.postMessage(module, [module]));
+ assert_throws("DataCloneError", () => channel.port1.postMessage("test", [module]));
+}, "Trying to transfer a WebAssembly.Module through a MessagePort throws");
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/resources/blank.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/blank.html
index a3c3a4689a6..a3c3a4689a6 100644
--- a/tests/wpt/web-platform-tests/wasm/resources/blank.html
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/blank.html
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-iframe.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-iframe.html
new file mode 100644
index 00000000000..83e347b5cb3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-iframe.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>A test page that uses a given WebAssembly.Module sent from a BroadcastChannel</title>
+
+<script>
+"use strict";
+const channel = new BroadcastChannel("channel name");
+
+channel.onmessage = ({ data: { module, i }, source }) => {
+ if (!module) {
+ // We only care about "broadcasts" from the window
+ return;
+ }
+
+ let instance = new WebAssembly.Instance(module);
+ let increment = instance.exports["increment"];
+ let result = increment(i);
+ channel.postMessage({i, result});
+};
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-sharedworker.js b/tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-sharedworker.js
new file mode 100644
index 00000000000..310e0e93584
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-sharedworker.js
@@ -0,0 +1,7 @@
+const channel = new BroadcastChannel("anne was here");
+channel.onmessageerror = ({ data }) => {
+ if(data === null) {
+ channel.postMessage("sw-success");
+ }
+}
+channel.postMessage("hi");
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-worker.js b/tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-worker.js
new file mode 100644
index 00000000000..76a81770604
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/broadcastchannel-worker.js
@@ -0,0 +1,9 @@
+const channel = new BroadcastChannel("anne was here");
+channel.onmessage = ({ data }) => {
+ if(data === "hi" || data === "sw-success") {
+ return;
+ } else if(data instanceof WebAssembly.Module) {
+ channel.postMessage("dw-success");
+ }
+}
+channel.postMessage("hi");
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/create-empty-wasm-module.js b/tests/wpt/web-platform-tests/wasm/serialization/resources/create-empty-wasm-module.js
new file mode 100644
index 00000000000..7326710c9e4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/create-empty-wasm-module.js
@@ -0,0 +1,4 @@
+function createEmptyWasmModule() {
+ return new WebAssembly.Module(
+ new Uint8Array([0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00]));
+}
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/echo-iframe.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/echo-iframe.html
new file mode 100644
index 00000000000..c4fd5824a1c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/echo-iframe.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>A test page that echos back anything postMessaged to it to its parent</title>
+
+<script>
+"use strict";
+
+window.onmessage = ({ data }) => {
+ parent.postMessage(data, "*");
+};
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/echo-worker.js b/tests/wpt/web-platform-tests/wasm/serialization/resources/echo-worker.js
new file mode 100644
index 00000000000..cbbde8a73c8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/echo-worker.js
@@ -0,0 +1,5 @@
+"use strict";
+
+self.onmessage = ({ data }) => {
+ self.postMessage(data);
+};
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-iframe-domain.sub.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-iframe-domain.sub.html
new file mode 100644
index 00000000000..d2d18de4995
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-iframe-domain.sub.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>A test page that is sent a WebAssembly Module</title>
+<script src="/resources/testharness.js"></script>
+<script src="test-incrementer.js"></script>
+
+<script>
+"use strict";
+
+document.domain = "{{host}}";
+setupDestinationIncrementer(self, parent, "*");
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-iframe.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-iframe.html
new file mode 100644
index 00000000000..5c8bc0735e2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-iframe.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>A test page that is sent a WebAssembly Module</title>
+<script src="/resources/testharness.js"></script>
+<script src="test-incrementer.js"></script>
+
+<script>
+"use strict";
+
+setupDestinationIncrementer(self, parent, "*");
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-popup.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-popup.html
new file mode 100644
index 00000000000..660e472b27c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-popup.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>A test page that is sent a WebAssembly Module</title>
+<script src="/resources/testharness.js"></script>
+<script src="test-incrementer.js"></script>
+
+<script>
+"use strict";
+
+setupDestinationIncrementer(self, opener, "*");
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-worker-with-channel.js b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-worker-with-channel.js
new file mode 100644
index 00000000000..0323b3e52e7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-worker-with-channel.js
@@ -0,0 +1,8 @@
+"use strict";
+importScripts("/resources/testharness.js");
+importScripts("./test-incrementer.js");
+
+self.onmessage = ({ data }) => {
+ // data will be a MessagePort
+ setupDestinationIncrementer(data, data);
+};
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-worker.js b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-worker.js
new file mode 100644
index 00000000000..1779ceea520
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer-worker.js
@@ -0,0 +1,5 @@
+"use strict";
+importScripts("/resources/testharness.js");
+importScripts("./test-incrementer.js");
+
+setupDestinationIncrementer(self, self);
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer.wasm b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer.wasm
new file mode 100644
index 00000000000..47afcdef2a2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/incrementer.wasm
Binary files differ
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-1.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-1.html
new file mode 100644
index 00000000000..fe93cc0c4b0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Nesting level 1</title>
+
+<iframe src="nested-iframe-2.html"></iframe>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-2.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-2.html
new file mode 100644
index 00000000000..fad52ce9de3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-2.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Nesting level 2</title>
+
+<iframe src="nested-iframe-3.html"></iframe>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-3.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-3.html
new file mode 100644
index 00000000000..7971022b2cd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-3.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Nesting level 3</title>
+
+<iframe src="nested-iframe-4-incrementer.html"></iframe>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-4-incrementer.html b/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-4-incrementer.html
new file mode 100644
index 00000000000..f419f4bc36c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/nested-iframe-4-incrementer.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>A test page that is sent a WebAssembly Module, nested 4 levels deep in iframes</title>
+<script src="/resources/testharness.js"></script>
+<script src="test-incrementer.js"></script>
+
+<script>
+"use strict";
+
+setupDestinationIncrementer(self, parent.parent.parent.parent.parent, "*");
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/serviceworker-failure.js b/tests/wpt/web-platform-tests/wasm/serialization/resources/serviceworker-failure.js
new file mode 100644
index 00000000000..39796f9d94a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/serviceworker-failure.js
@@ -0,0 +1,34 @@
+// Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/.
+"use strict";
+self.importScripts("/resources/testharness.js");
+self.importScripts("./create-empty-wasm-module.js");
+
+let state = "start in worker";
+
+self.onmessage = e => {
+ if (e.data === "start in window") {
+ assert_equals(state, "start in worker");
+ e.source.postMessage(state);
+ state = "we are expecting a messageerror due to the window sending us a WebAssembly.Module";
+ } else if (e.data === "we are expecting a messageerror due to the worker sending us a WebAssembly.Module") {
+ assert_equals(state, "onmessageerror was received in worker");
+ e.source.postMessage(createEmptyWasmModule());
+ state = "done in worker";
+ } else {
+ e.source.postMessage(`worker onmessage was reached when in state "${state}" and data ${e.data}`);
+ }
+};
+
+self.onmessageerror = e => {
+ if (state === "we are expecting a messageerror due to the window sending us a WebAssembly.Module") {
+ assert_equals(e.data, null, "data");
+ assert_equals(e.origin, self.origin, "origin");
+ assert_not_equals(e.source, null, "source");
+ assert_equals(e.ports.length, 0, "ports length");
+
+ state = "onmessageerror was received in worker";
+ e.source.postMessage(state);
+ } else {
+ e.source.postMessage(`worker onmessageerror was reached when in state "${state}" and data ${e.data}`);
+ }
+};
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/sharedworker-failure.js b/tests/wpt/web-platform-tests/wasm/serialization/resources/sharedworker-failure.js
new file mode 100644
index 00000000000..854c70b9e84
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/sharedworker-failure.js
@@ -0,0 +1,21 @@
+importScripts("./test-incrementer.js");
+importScripts("./create-empty-wasm-module.js");
+
+let state = "send-sw-failure"
+onconnect = initialE => {
+ let port = initialE.source;
+ port.postMessage(state)
+ port.onmessage = e => {
+ if(state === "" && e.data === "send-window-failure") {
+ port.postMessage(createEmptyWasmModule())
+ } else {
+ port.postMessage("failure")
+ }
+ }
+ port.onmessageerror = e => {
+ if(state === "send-sw-failure") {
+ port.postMessage("send-sw-failure-success")
+ state = ""
+ }
+ }
+}
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/resources/test-incrementer.js b/tests/wpt/web-platform-tests/wasm/serialization/resources/test-incrementer.js
new file mode 100644
index 00000000000..65cb33227a3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/resources/test-incrementer.js
@@ -0,0 +1,57 @@
+// Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/.
+//
+// This file is simplified from the one there, because it only tests that the
+// module can be passed and that functions can be run. The SharedArrayBuffer
+// version also tests that the memory is shared between the agents.
+
+"use strict";
+
+function createWasmModule() {
+ return fetch('incrementer.wasm')
+ .then(response => {
+ if (!response.ok)
+ throw new Error(response.statusText);
+ return response.arrayBuffer();
+ })
+ .then(WebAssembly.compile);
+}
+
+function testModule(module) {
+ let instance = new WebAssembly.Instance(module);
+ let increment = instance.exports["increment"];
+ assert_equals(typeof increment, "function", `The type of the increment export should be "function", got ${typeof increment}`);
+ let result = increment(42);
+ assert_equals(result, 43, `increment(42) should be 43, got ${result}`);
+}
+
+self.testSharingViaIncrementerScript = (t, whereToListen, whereToListenLabel, whereToSend, whereToSendLabel, origin) => {
+ return createWasmModule().then(module => {
+ return new Promise(resolve => {
+
+ whereToListen.onmessage = t.step_func(({ data }) => {
+ switch (data.message) {
+ case "module received": {
+ testModule(data.module);
+ resolve();
+ break;
+ }
+ }
+ });
+
+ whereToSend.postMessage({ message: "send module", module }, origin);
+ });
+ });
+};
+
+self.setupDestinationIncrementer = (whereToListen, whereToSendBackTo, origin) => {
+ whereToListen.onmessage = ({ data }) => {
+ switch (data.message) {
+ case "send module": {
+ let module = data.module;
+ testModule(data.module);
+ whereToSendBackTo.postMessage({ message: "module received", module }, origin);
+ break;
+ }
+ }
+ };
+};
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/serialization-via-history.html b/tests/wpt/web-platform-tests/wasm/serialization/serialization-via-history.html
new file mode 100644
index 00000000000..35dc17b6701
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/serialization-via-history.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<meta charset="utf-8">
+<title>WebAssembly.Module cloning via history's methods invoking StructuredSerializeForStorage</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/create-empty-wasm-module.js"></script>
+
+<script>
+"use strict";
+
+for (const method of ["pushState", "replaceState"]) {
+ test(() => {
+ assert_throws("DataCloneError", () => {
+ history[method](createEmptyWasmModule(), "dummy title");
+ });
+ }, `history.${method}(): simple case`);
+
+ test(() => {
+ let getter1Called = false;
+ let getter2Called = false;
+ assert_throws("DataCloneError", () => {
+ history[method]([
+ { get x() { getter1Called = true; return 5; } },
+ createEmptyWasmModule(),
+ { get x() { getter2Called = true; return 5; } }
+ ], "dummy title");
+ });
+
+ assert_true(getter1Called, "The getter before the WebAssembly.Module must have been called");
+ assert_false(getter2Called, "The getter after the WebAssembly.Module must not have been called");
+ }, `history.${method}(): is interleaved correctly`);
+}
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/serialization-via-idb.any.js b/tests/wpt/web-platform-tests/wasm/serialization/serialization-via-idb.any.js
new file mode 100644
index 00000000000..1d861c3d3aa
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/serialization-via-idb.any.js
@@ -0,0 +1,45 @@
+// META: script=/IndexedDB/support.js
+"use strict";
+
+function createEmptyWasmModule() {
+ return new WebAssembly.Module(
+ new Uint8Array([0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00]));
+}
+
+async_test(t => {
+ const openReq = createdb(t);
+
+ openReq.onupgradeneeded = e => {
+ const db = e.target.result;
+ const store = db.createObjectStore("store", { keyPath: "key" });
+
+ assert_throws("DataCloneError", () => {
+ store.put({ key: 1, property: createEmptyWasmModule() });
+ });
+ t.done();
+ };
+}, "WebAssembly.Module cloning via IndexedDB: basic case");
+
+async_test(t => {
+ const openReq = createdb(t);
+
+ openReq.onupgradeneeded = e => {
+ const db = e.target.result;
+ const store = db.createObjectStore("store", { keyPath: "key" });
+
+ let getter1Called = false;
+ let getter2Called = false;
+
+ assert_throws("DataCloneError", () => {
+ store.put({ key: 1, property: [
+ { get x() { getter1Called = true; return 5; } },
+ createEmptyWasmModule(),
+ { get x() { getter2Called = true; return 5; } }
+ ]});
+ });
+
+ assert_true(getter1Called, "The getter before the WebAssembly.Module must have been called");
+ assert_false(getter2Called, "The getter after the WebAssembly.Module must not have been called");
+ t.done();
+ };
+}, "WebAssembly.Module cloning via the IndexedDB: is interleaved correctly");
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/serialization-via-notifications-api.any.js b/tests/wpt/web-platform-tests/wasm/serialization/serialization-via-notifications-api.any.js
new file mode 100644
index 00000000000..84105651d3b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/serialization-via-notifications-api.any.js
@@ -0,0 +1,28 @@
+"use strict";
+
+function createEmptyWasmModule() {
+ return new WebAssembly.Module(
+ new Uint8Array([0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00]));
+}
+
+test(() => {
+ assert_throws("DataCloneError", () => {
+ new Notification("Bob: Hi", { data: createEmptyWasmModule() });
+ })
+}, "WebAssembly.Module cloning via the Notifications API's data member: basic case");
+
+test(() => {
+ let getter1Called = false;
+ let getter2Called = false;
+
+ assert_throws("DataCloneError", () => {
+ new Notification("Bob: Hi", { data: [
+ { get x() { getter1Called = true; return 5; } },
+ createEmptyWasmModule(),
+ { get x() { getter2Called = true; return 5; } }
+ ]});
+ });
+
+ assert_true(getter1Called, "The getter before the SAB must have been called");
+ assert_false(getter2Called, "The getter after the SAB must not have been called");
+}, "WebAssembly.Module cloning via the Notifications API's data member: is interleaved correctly");
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/window-domain-success.sub.html b/tests/wpt/web-platform-tests/wasm/serialization/window-domain-success.sub.html
new file mode 100644
index 00000000000..51d4c5cb0ea
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/window-domain-success.sub.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<meta charset="utf-8">
+<title>Structured cloning of WebAssembly.Module into same-origin-domain windows</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/test-incrementer.js"></script>
+
+<div id="log"></div>
+
+<script>
+"use strict";
+document.domain = "{{host}}";
+
+promise_test(t => {
+ return new Promise(resolve => {
+ const iframe = document.createElement("iframe");
+ iframe.onload = t.step_func(() => {
+ resolve(testSharingViaIncrementerScript(t, window, "window", iframe.contentWindow, "iframe", "*"));
+ });
+ iframe.src = "//{{domains[www1]}}:{{location[port]}}/wasm/serialization/resources/incrementer-iframe-domain.sub.html";
+ document.body.appendChild(iframe);
+ });
+}, "postMessaging to a same-origin-domain (but not same-origin) iframe allows them to instantiate");
+
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/window-messagechannel-success.html b/tests/wpt/web-platform-tests/wasm/serialization/window-messagechannel-success.html
new file mode 100644
index 00000000000..e686c811356
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/window-messagechannel-success.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<meta charset="utf-8">
+<title>Structured cloning of WebAssembly.Module using MessageChannel</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/test-incrementer.js"></script>
+
+<div id="log"></div>
+
+<script>
+"use strict";
+
+promise_test(t => {
+ const worker = new Worker("resources/incrementer-worker-with-channel.js");
+ const channel = new MessageChannel();
+ worker.postMessage(channel.port2, [channel.port2]);
+
+ return testSharingViaIncrementerScript(t, channel.port1, "window", channel.port1, "worker");
+}, "postMessaging to a dedicated worker via MessageChannel allows them to instantiate");
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/window-serviceworker-failure.https.html b/tests/wpt/web-platform-tests/wasm/serialization/window-serviceworker-failure.https.html
new file mode 100644
index 00000000000..97c5a1decdb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/window-serviceworker-failure.https.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<title>WebAssembly.Module cannot cross agent clusters, service worker edition</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
+<script src="./resources/create-empty-wasm-module.js"></script>
+
+<script>
+"use strict";
+promise_test(t => {
+ const scope = "resources/blank.html";
+ return service_worker_unregister_and_register(t, "resources/serviceworker-failure.js", scope).then(reg => {
+ return wait_for_state(t, reg.installing, "activated");
+ })
+ .then(() => {
+ return with_iframe(scope);
+ }).then(iframe => {
+ const sw = iframe.contentWindow.navigator.serviceWorker;
+ let state = "start in window";
+
+ return new Promise(resolve => {
+ sw.onmessage = t.step_func(e => {
+ if (e.data === "start in worker") {
+ assert_equals(state, "start in window");
+ sw.controller.postMessage(createEmptyWasmModule());
+ state = "we are expecting confirmation of an onmessageerror in the worker";
+ } else if (e.data === "onmessageerror was received in worker") {
+ assert_equals(state, "we are expecting confirmation of an onmessageerror in the worker");
+ state = "we are expecting a messageerror due to the worker sending us a WebAssembly.Module";
+ sw.controller.postMessage(state);
+ } else {
+ assert_unreached("Got an unexpected message from the service worker: " + e.data);
+ }
+ });
+
+ sw.onmessageerror = t.step_func(e => {
+ assert_equals(state, "we are expecting a messageerror due to the worker sending us a WebAssembly.Module");
+
+ assert_equals(e.data, null, "data");
+ assert_equals(e.origin, self.origin, "origin");
+ assert_equals(e.source, null, "source");
+ assert_equals(e.ports.length, 0, "ports length");
+
+ state = "done in window";
+ resolve();
+ });
+
+ sw.controller.postMessage(state);
+ });
+ });
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/window-sharedworker-failure.html b/tests/wpt/web-platform-tests/wasm/serialization/window-sharedworker-failure.html
new file mode 100644
index 00000000000..667e985a30b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/window-sharedworker-failure.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<title>WebAssembly.Modules cannot cross agent clusters, shared worker edition</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/create-empty-wasm-module.js"></script>
+<script>
+async_test(t => {
+ const sw = new SharedWorker("resources/sharedworker-failure.js")
+ let state = ""
+ sw.port.onmessage = t.step_func(e => {
+ if(e.data === "send-sw-failure") {
+ sw.port.postMessage(createEmptyWasmModule())
+ } else if(e.data === "send-sw-failure-success") {
+ state = "send-window-failure"
+ sw.port.postMessage(state)
+ } else {
+ assert_unreached()
+ }
+ })
+ sw.port.onmessageerror = t.step_func(e => {
+ if(state === "send-window-failure") {
+ assert_equals(e.data, null, "data")
+ assert_equals(e.origin, "", "origin")
+ assert_equals(e.source, null, "source")
+ assert_equals(e.ports.length, 0, "ports length")
+ t.done()
+ } else {
+ assert_unreached()
+ }
+ })
+})
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/window-similar-but-cross-origin-success.sub.html b/tests/wpt/web-platform-tests/wasm/serialization/window-similar-but-cross-origin-success.sub.html
new file mode 100644
index 00000000000..070cf0a49a8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/window-similar-but-cross-origin-success.sub.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<meta charset="utf-8">
+<title>Structured cloning of WebAssembly.Module to similar-origin, but not same-origin, windows</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/test-incrementer.js"></script>
+
+<div id="log"></div>
+
+<script>
+"use strict";
+document.domain = "{{host}}";
+
+promise_test(t => {
+ return new Promise(resolve => {
+ const iframe = document.createElement("iframe");
+ iframe.onload = t.step_func(() => {
+ resolve(testSharingViaIncrementerScript(t, window, "window", iframe.contentWindow, "iframe", "*"));
+ });
+ iframe.src = "//{{domains[www1]}}:{{location[port]}}/wasm/serialization/resources/incrementer-iframe.html";
+ document.body.appendChild(iframe);
+ });
+}, "postMessaging to a not same-origin-domain, but similar origin, iframe allows them to instantiate");
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/serialization/window-simple-success.html b/tests/wpt/web-platform-tests/wasm/serialization/window-simple-success.html
new file mode 100644
index 00000000000..6f2ccf465e9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/wasm/serialization/window-simple-success.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
+<meta charset="utf-8">
+<title>Structured cloning of WebAssembly.Module: simple success cases that don't need dedicated files</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/test-incrementer.js"></script>
+
+<div id="log"></div>
+
+<script>
+"use strict";
+
+promise_test(t => {
+ const worker = new Worker("resources/incrementer-worker.js");
+
+ return testSharingViaIncrementerScript(t, worker, "window", worker, "worker", undefined);
+}, "postMessaging to a dedicated worker allows them to instantiate");
+
+promise_test(t => {
+ return new Promise(resolve => {
+ const iframe = document.createElement("iframe");
+ iframe.onload = t.step_func(() => {
+ resolve(testSharingViaIncrementerScript(t, window, "window", iframe.contentWindow, "iframe", "*"));
+ });
+ iframe.src = "resources/incrementer-iframe.html";
+ document.body.appendChild(iframe);
+ });
+}, "postMessaging to a same-origin iframe allows them to instantiate");
+
+promise_test(t => {
+ return new Promise(resolve => {
+ const iframe = document.createElement("iframe");
+ iframe.onload = t.step_func(() => {
+ const level1 = iframe.contentWindow;
+ const level2 = level1.frames[0];
+ const level3 = level2.frames[0];
+ const targetWindow = level3.frames[0];
+ resolve(testSharingViaIncrementerScript(t, window, "window", targetWindow, "nested iframe", "*"));
+ });
+ iframe.src = "resources/nested-iframe-1.html";
+ document.body.appendChild(iframe);
+ });
+}, "postMessaging to a same-origin deeply-nested iframe allows them to instantiate");
+
+promise_test(t => {
+ return new Promise(resolve => {
+ const w = window.open("resources/incrementer-popup.html");
+ w.onload = t.step_func(() => {
+ resolve(testSharingViaIncrementerScript(t, window, "window", w, "popup window", "*").then(() => {
+ w.close();
+ }));
+ });
+ });
+}, "postMessaging to a same-origin opened window allows them to instantiate");
+
+</script>
diff --git a/tests/wpt/web-platform-tests/wasm/wasm_local_iframe_test.html b/tests/wpt/web-platform-tests/wasm/wasm_local_iframe_test.html
deleted file mode 100644
index 0f4fbd0c719..00000000000
--- a/tests/wpt/web-platform-tests/wasm/wasm_local_iframe_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="resources/load_wasm.js"></script>
-<script>
- function runTests(iframe) {
- iframe = iframe.contentWindow;
- promise_test(async function() {
- var mod = await createWasmModule();
- assert_true(mod instanceof WebAssembly.Module);
- var ans = await new Promise((resolve, reject) => {
- iframe.postMessage(mod, '*');
- window.addEventListener("message", (reply) => resolve(reply.data), false);
- });
- assert_equals(ans, 43);
- }, "send wasm module to iframe");
- }
-</script>
-<iframe src="resources/frame.html" onload="runTests(this)"></iframe>
diff --git a/tests/wpt/web-platform-tests/wasm/wasm_serialization_tests.html b/tests/wpt/web-platform-tests/wasm/wasm_serialization_tests.html
deleted file mode 100644
index 49766c77052..00000000000
--- a/tests/wpt/web-platform-tests/wasm/wasm_serialization_tests.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="resources/load_wasm.js"></script>
-<script src="wasm_serialization_tests.js"></script>
-<script>
- promise_test(TestInstantiateInWorker, "serialize wasm to worker");
-</script>
diff --git a/tests/wpt/web-platform-tests/wasm/wasm_serialization_tests.js b/tests/wpt/web-platform-tests/wasm/wasm_serialization_tests.js
deleted file mode 100644
index 3cc4166168b..00000000000
--- a/tests/wpt/web-platform-tests/wasm/wasm_serialization_tests.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-function TestInstantiateInWorker() {
- return createWasmModule()
- .then((mod) => {
- var worker = new Worker("wasm_serialization_worker.js");
- return new Promise((resolve, reject) => {
- worker.postMessage(mod);
- worker.onmessage = function(event) {
- resolve(event.data);
- }
- });
- })
- .then(data => assert_equals(data, 43))
- .catch(error => assert_unreached(error));
-}
diff --git a/tests/wpt/web-platform-tests/wasm/wasm_serialization_worker.js b/tests/wpt/web-platform-tests/wasm/wasm_serialization_worker.js
deleted file mode 100644
index 3361ed73951..00000000000
--- a/tests/wpt/web-platform-tests/wasm/wasm_serialization_worker.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-onmessage = function(e) {
- var compiled_module = e.data;
- var instance = new WebAssembly.Instance(compiled_module);
- if (instance === undefined) {
- postMessage("error!");
- return;
- }
- var entrypoint = instance.exports["increment"];
-
- if (typeof entrypoint !== "function") {
- postMessage("error!");
- return;
- }
-
- var ret = entrypoint(42);
- postMessage(ret);
-}
diff --git a/tests/wpt/web-platform-tests/wasm/wasm_service_worker_test.https.html b/tests/wpt/web-platform-tests/wasm/wasm_service_worker_test.https.html
deleted file mode 100644
index cced4b8f6ec..00000000000
--- a/tests/wpt/web-platform-tests/wasm/wasm_service_worker_test.https.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<title>Service Worker: postMessage with wasm</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/common/get-host-info.sub.js"></script>
-<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
-<script>
- promise_test(async test => {
- var registration = await service_worker_unregister_and_register(
- test, 'resources/service-worker.js', 'resources/blank.html');
- add_completion_callback(() => registration.unregister());
- var worker = registration.installing;
- var event = await new Promise((resolve, reject) => {
- var messageChannel = new MessageChannel();
- worker.postMessage({port: messageChannel.port2}, [messageChannel.port2]);
- worker.postMessage({compile: true});
- messageChannel.port1.onmessage = event => reject(event);
- messageChannel.port1.onmessageerror = event => resolve(event);
- });
- assert_equals(event.type, "messageerror");
- assert_equals(event.data, null);
- }, 'postMessaging wasm from a service worker should fail');
-</script>
diff --git a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js
index 8d027178351..e2f3adcd7af 100644
--- a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js
+++ b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js
@@ -361,13 +361,13 @@ const gCSSProperties = {
'color-interpolation': {
// https://svgwg.org/svg2-draft/painting.html#ColorInterpolationProperty
types: [
- { type: 'discrete', options: [ [ 'linearRGB', 'auto' ] ] }
+ { type: 'discrete', options: [ [ 'linearrgb', 'auto' ] ] }
]
},
'color-interpolation-filters': {
// https://drafts.fxtf.org/filters-1/#propdef-color-interpolation-filters
types: [
- { type: 'discrete', options: [ [ 'sRGB', 'linearRGB' ] ] }
+ { type: 'discrete', options: [ [ 'srgb', 'linearrgb' ] ] }
]
},
'column-count': {
diff --git a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-types.js b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-types.js
index 5bafb20dfcf..232a508e07c 100644
--- a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-types.js
+++ b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-types.js
@@ -1068,6 +1068,23 @@ const transformListType = {
{ time: 500, expected: [ 1, 1, 1, 1, 100, 100 ] },
{ time: 1000, expected: [ 1, 1, 1, 1, 100, 100 ] }]);
}, `${property}: non-invertible matrices in mismatched transform lists`);
+
+ test(t => {
+ const idlName = propertyToIDL(property);
+ const target = createTestElement(t, setup);
+ const animation = target.animate(
+ {
+ [idlName]: ['perspective(0)', 'perspective(10px)'],
+ },
+ 1000
+ );
+ testAnimationSampleMatrices(animation, idlName,
+ [{ time: 500, expected: [ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, -0.05,
+ 0, 0, 0, 1 ] }]);
+ }, `${property}: perspective`);
+
},
testAddition: function(property, setup) {
diff --git a/tests/wpt/web-platform-tests/webaudio/resources/audionodeoptions.js b/tests/wpt/web-platform-tests/webaudio/resources/audionodeoptions.js
index 0d90a9c6300..df0090c6d60 100644
--- a/tests/wpt/web-platform-tests/webaudio/resources/audionodeoptions.js
+++ b/tests/wpt/web-platform-tests/webaudio/resources/audionodeoptions.js
@@ -40,19 +40,19 @@ function testAudioNodeOptions(should, context, nodeName, expectedNodeOptions) {
{channelCount: testChannelCount}));
},
'new ' + nodeName + '(c, {channelCount: ' + testChannelCount + '}}')
- .throw(expectedNodeOptions.channelCount.errorType || TypeError);
+ .throw(DOMException,
+ expectedNodeOptions.channelCount.exceptionType);
} else {
// The channel count is not fixed. Try to set the count to invalid
// values and make sure an error is thrown.
- let errorType = 'NotSupportedError';
-
[0, 99].forEach(testValue => {
should(() => {
node = new window[nodeName](
context, Object.assign({}, expectedNodeOptions.additionalOptions, {
channelCount: testValue
}));
- }, `new ${nodeName}(c, {channelCount: ${testValue}})`).throw(errorType);
+ }, `new ${nodeName}(c, {channelCount: ${testValue}})`)
+ .throw(DOMException, 'NotSupportedError');
});
}
@@ -88,7 +88,8 @@ function testAudioNodeOptions(should, context, nodeName, expectedNodeOptions) {
{channelCountMode: testValue}));
},
`new ${nodeName}(c, {channelCountMode: "${testValue}"})`)
- .throw(expectedNodeOptions.channelCountMode.errorType);
+ .throw(DOMException,
+ expectedNodeOptions.channelCountMode.exceptionType);
}
});
} else {
@@ -140,7 +141,8 @@ function testAudioNodeOptions(should, context, nodeName, expectedNodeOptions) {
{channelInterpretation: testValue}));
},
`new ${nodeName}(c, {channelInterpretation: "${testValue}"})`)
- .throw(expectedNodeOptions.channelInterpretation.errorType);
+ .throw(DOMException,
+ expectedNodeOptions.channelCountMode.exceptionType);
}
});
} else {
diff --git a/tests/wpt/web-platform-tests/webaudio/resources/audit.js b/tests/wpt/web-platform-tests/webaudio/resources/audit.js
index 7ffa4392b05..b7ca0201610 100644
--- a/tests/wpt/web-platform-tests/webaudio/resources/audit.js
+++ b/tests/wpt/web-platform-tests/webaudio/resources/audit.js
@@ -274,21 +274,25 @@ window.Audit = (function() {
/**
* Check if |actual| operation wrapped in a function throws an exception
- * with a expected error type correctly. |expected| is optional. If it is a
- * String, then it is considered to be the name of a DOMException. It can
- * also be an instance of either an Error or a DOMException, to be more
- * strict about the actual error type.
+ * with a expected error type correctly. |expected| is optional. If it is an
+ * instance of DOMException, then the description (second argument) can be
+ * provided to be more strict about the expected exception type. |expected|
+ * also can be other generic error types such as TypeError, RangeError or
+ * etc.
*
* @example
* should(() => { let a = b; }, 'A bad code').throw();
- * should(() => { let c = d; }, 'Assigning d to c.')
- * .throw('ReferenceError');
- * should(() => { let e = f; }, 'Assigning e to f.')
- * .throw('ReferenceError', { omitErrorMessage: true });
+ * should(() => { new SomeConstructor(); }, 'A bad construction')
+ * .throw(DOMException, 'NotSupportedError');
+ * should(() => { let c = d; }, 'Assigning d to c')
+ * .throw(ReferenceError);
+ * should(() => { let e = f; }, 'Assigning e to f')
+ * .throw(ReferenceError, { omitErrorMessage: true });
*
* @result
* "PASS A bad code threw an exception of ReferenceError: b is not
* defined."
+ * "PASS A bad construction threw DOMException:NotSupportedError."
* "PASS Assigning d to c threw ReferenceError: d is not defined."
* "PASS Assigning e to f threw ReferenceError: [error message
* omitted]."
@@ -313,17 +317,16 @@ window.Audit = (function() {
// The expected error type was not given.
didThrowCorrectly = true;
passDetail = '${actual} threw ' + error.name + errorMessage + '.';
- } else if (typeof(this._expected) == "string" &&
- error instanceof DOMException &&
- error.name === this._expected) {
- // A DOMException was thrown and expected, and the names match
+ } else if (this._expected === DOMException &&
+ (this._expectedDescription === undefined ||
+ this._expectedDescription === error.name)) {
+ // Handles DOMException with the associated name.
didThrowCorrectly = true;
passDetail = '${actual} threw ${expected}' + errorMessage + '.';
- } else if (this._expected == error.constructor &&
- this._expected.name == error.name) {
- // The expected error type and names match the actual one.
+ } else if (this._expected == error.constructor) {
+ // Handler other error types.
didThrowCorrectly = true;
- passDetail = '${actual} threw ${expected}' + errorMessage + '.';
+ passDetail = '${actual} threw ' + error.name + errorMessage + '.';
} else {
didThrowCorrectly = false;
failDetail =
diff --git a/tests/wpt/web-platform-tests/webaudio/resources/start-stop-exceptions.js b/tests/wpt/web-platform-tests/webaudio/resources/start-stop-exceptions.js
index 9a77e67ed86..0d2ea12f6db 100644
--- a/tests/wpt/web-platform-tests/webaudio/resources/start-stop-exceptions.js
+++ b/tests/wpt/web-platform-tests/webaudio/resources/start-stop-exceptions.js
@@ -13,7 +13,7 @@ function testStartStop(should, node, options) {
should(() => {
node.stop();
- }, 'Calling stop() before start()').throw('InvalidStateError');
+ }, 'Calling stop() before start()').throw(DOMException, 'InvalidStateError');
should(() => {
node.start(-1);
@@ -29,7 +29,7 @@ function testStartStop(should, node, options) {
node.start();
should(() => {
node.start();
- }, 'Calling start() twice').throw('InvalidStateError');
+ }, 'Calling start() twice').throw(DOMException, 'InvalidStateError');
should(() => {
node.stop(-1);
}, 'stop(-1)').throw(RangeError);
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html
index 2112edeeffc..4e27f842dde 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html
@@ -91,25 +91,25 @@
node = new AnalyserNode(context, {fftSize: 33});
},
'node = new AnalyserNode(c, { fftSize: 33 })')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
should(
() => {
node = new AnalyserNode(context, {maxDecibels: -500});
},
'node = new AnalyserNode(c, { maxDecibels: -500 })')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
should(
() => {
node = new AnalyserNode(context, {minDecibels: -10});
},
'node = new AnalyserNode(c, { minDecibels: -10 })')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
should(
() => {
node = new AnalyserNode(context, {smoothingTimeConstant: 2});
},
'node = new AnalyserNode(c, { smoothingTimeConstant: 2 })')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
should(function() {
node = new AnalyserNode(context, {frequencyBinCount: 33});
}, 'node = new AnalyserNode(c, { frequencyBinCount: 33 })').notThrow();
@@ -164,7 +164,7 @@
node = new AnalyserNode(context, options);
},
'node = new AnalyserNode(c, ' + JSON.stringify(options) + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
options = {minDecibels: -10, maxDecibels: -150};
should(
@@ -172,7 +172,7 @@
node = new AnalyserNode(context, options);
},
'node = new AnalyserNode(c, ' + JSON.stringify(options) + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-sizing.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-sizing.html
index b3de37f119f..7ee6a2237ed 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-sizing.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-sizing.html
@@ -22,7 +22,7 @@
};
if (illegal) {
- should(tester, message).throw('IndexSizeError');
+ should(tester, message).throw(DOMException, 'IndexSizeError');
} else {
should(tester, message).notThrow();
}
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html
index b71078d8f80..e0359953d2e 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html
@@ -127,27 +127,27 @@
}, '2: buffer.copyFromChannel(context, 0)').throw(TypeError);
should(() => {
buffer.copyFromChannel(x, -1);
- }, '3: buffer.copyFromChannel(x, -1)').throw('IndexSizeError');
+ }, '3: buffer.copyFromChannel(x, -1)').throw(DOMException, 'IndexSizeError');
should(
() => {
buffer.copyFromChannel(x, numberOfChannels);
},
'4: buffer.copyFromChannel(x, ' + numberOfChannels + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
;
should(() => {
buffer.copyFromChannel(x, 0, -1);
- }, '5: buffer.copyFromChannel(x, 0, -1)').throw('IndexSizeError');
+ }, '5: buffer.copyFromChannel(x, 0, -1)').throw(DOMException, 'IndexSizeError');
should(
() => {
buffer.copyFromChannel(x, 0, bufferLength);
},
'6: buffer.copyFromChannel(x, 0, ' + bufferLength + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
should(() => {
buffer.copyFromChannel(x, 3);
- }, '7: buffer.copyFromChannel(x, 3)').throw('IndexSizeError');
+ }, '7: buffer.copyFromChannel(x, 3)').throw(DOMException, 'IndexSizeError');
if (window.SharedArrayBuffer) {
let shared_buffer = new Float32Array(new SharedArrayBuffer(32));
@@ -183,26 +183,26 @@
}, '1: buffer.copyToChannel(context, 0)').throw(TypeError);
should(() => {
buffer.copyToChannel(x, -1);
- }, '2: buffer.copyToChannel(x, -1)').throw('IndexSizeError');
+ }, '2: buffer.copyToChannel(x, -1)').throw(DOMException, 'IndexSizeError');
should(
() => {
buffer.copyToChannel(x, numberOfChannels);
},
'3: buffer.copyToChannel(x, ' + numberOfChannels + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
should(() => {
buffer.copyToChannel(x, 0, -1);
- }, '4: buffer.copyToChannel(x, 0, -1)').throw('IndexSizeError');
+ }, '4: buffer.copyToChannel(x, 0, -1)').throw(DOMException, 'IndexSizeError');
should(
() => {
buffer.copyToChannel(x, 0, bufferLength);
},
'5: buffer.copyToChannel(x, 0, ' + bufferLength + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
should(() => {
buffer.copyToChannel(x, 3);
- }, '6: buffer.copyToChannel(x, 3)').throw('IndexSizeError');
+ }, '6: buffer.copyToChannel(x, 3)').throw(DOMException, 'IndexSizeError');
if (window.SharedArrayBuffer) {
let shared_buffer = new Float32Array(new SharedArrayBuffer(32));
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html
index 07a34f07c18..a2c4581c4e8 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html
@@ -53,7 +53,7 @@
buffer.getChannelData(buffer.numberOfChannels);
},
'buffer.getChannelData(' + buffer.numberOfChannels + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
let buffer2 = context.createBuffer(1, 1000, 24576);
let expectedDuration = 1000 / 24576;
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html
index c5aae1ad532..9845d5eaba3 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html
@@ -96,7 +96,7 @@
let buffer = new AudioBuffer(options);
},
'new AudioBuffer(' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
options = {numberOfChannels: 99, length: 0, sampleRate: 16000};
should(
@@ -104,7 +104,7 @@
let buffer = new AudioBuffer(options);
},
'new AudioBuffer(' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
options = {numberOfChannels: 1, length: 0, sampleRate: 16000};
should(
@@ -112,7 +112,7 @@
let buffer = new AudioBuffer(options);
},
'new AudioBuffer(' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
options = {numberOfChannels: 1, length: 1, sampleRate: 100};
should(
@@ -120,7 +120,7 @@
let buffer = new AudioBuffer(options);
},
'new AudioBuffer(' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
task.done();
});
@@ -178,7 +178,7 @@
buffer.getChannelData(options.numberOfChannels);
},
'buffer.getChannelData(' + options.numberOfChannels + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html
index 5527f44cc9c..f3f16c4c648 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-channels.html
@@ -47,7 +47,7 @@
should(function() {
source.buffer =
new AudioBuffer({length: 128, sampleRate: context.sampleRate})
- }, 'source.buffer = new buffer').throw('InvalidStateError');
+ }, 'source.buffer = new buffer').throw(DOMException, 'InvalidStateError');
// The buffer has been set; it's ok to set it to null.
should(function() {
@@ -58,7 +58,7 @@
// again.
should(function() {
source.buffer = buffer;
- }, 'source.buffer = buffer again').throw('InvalidStateError');
+ }, 'source.buffer = buffer again').throw(DOMException, 'InvalidStateError');
// But setting to null is ok.
should(function() {
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html
new file mode 100644
index 00000000000..c181ceb8e0f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/buffer-resampling.html
@@ -0,0 +1,101 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Test Extrapolation at end of AudibBuffer in an AudioBufferSourceNode</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/webaudio/resources/audit-util.js"></script>
+ <script src="/webaudio/resources/audit.js"></script>
+ </head>
+ <body>
+ <script>
+ let audit = Audit.createTaskRunner();
+
+ const sampleRate = 48000;
+
+ // For testing we only need a few render quanta.
+ const renderSamples = 512
+
+ // Sample rate for our buffers. This is the lowest sample rate that is
+ // required to be supported.
+ const bufferRate = 8000;
+
+ // Number of samples in each AudioBuffer; this is fairly arbitrary but
+ // should be less than a render quantum.
+ const bufferLength = 30;
+
+ // Frequency of the sine wave for testing.
+ const frequency = 440;
+
+ audit.define(
+ {
+ label: 'interpolate',
+ description: 'Interpolation of AudioBuffers to context sample rate'
+ },
+ (task, should) => {
+ // The first channel is for the interpolated signal, and the second
+ // channel is for the reference signal from an oscillator.
+ let context = new OfflineAudioContext({
+ numberOfChannels: 2,
+ length: renderSamples,
+ sampleRate: sampleRate
+ });
+
+ let merger = new ChannelMergerNode(
+ context, {numberOfChannels: context.destination.channelCount});
+ merger.connect(context.destination);
+
+ // Create a set of AudioBuffers which are samples from a pure sine
+ // wave with frequency |frequency|.
+ const nBuffers = Math.floor(context.length / bufferLength);
+ const omega = 2 * Math.PI * frequency / bufferRate;
+
+ let frameNumber = 0;
+ let startTime = 0;
+
+ for (let k = 0; k < nBuffers; ++k) {
+ // let buffer = context.createBuffer(1, bufferLength,
+ // bufferRate);
+ let buffer = new AudioBuffer(
+ {length: bufferLength, sampleRate: bufferRate});
+ let data = buffer.getChannelData(0);
+ for (let n = 0; n < bufferLength; ++n) {
+ data[n] = Math.sin(omega * frameNumber);
+ ++frameNumber;
+ }
+ // Create a source using this buffer and start it at the end of
+ // the previous buffer.
+ let src = new AudioBufferSourceNode(context, {buffer: buffer});
+
+ src.connect(merger, 0, 0);
+ src.start(startTime);
+ startTime += buffer.duration;
+ }
+
+ // Create the reference sine signal using an oscillator.
+ let osc = new OscillatorNode(
+ context, {type: 'sine', frequency: frequency});
+ osc.connect(merger, 0, 1);
+ osc.start(0);
+
+ context.startRendering()
+ .then(audioBuffer => {
+ let actual = audioBuffer.getChannelData(0);
+ let expected = audioBuffer.getChannelData(1);
+
+ should(actual, 'Interpolated sine wave')
+ .beCloseToArray(expected, {absoluteThreshold: 9.0348e-2});
+
+ // Compute SNR between them.
+ let snr = 10 * Math.log10(computeSNR(actual, expected));
+
+ should(snr, `SNR (${snr.toPrecision(4)} dB)`)
+ .beGreaterThanOrEqualTo(37.17);
+ })
+ .then(() => task.done());
+ });
+
+ audit.run();
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining.html
index 0a8c73160e5..4163a8439cd 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-connect-method-chaining.html
@@ -114,7 +114,7 @@
// does not have the second output, so it should throw.
should(function() {
gain1.connect(gain2, 1).connect(contextA.destination);
- }, 'Connecting with an invalid output').throw('IndexSizeError');
+ }, 'Connecting with an invalid output').throw(DOMException, 'IndexSizeError');
// Test if the second connection throws correctly. The contextB's
// destination is not compatible with the nodes from contextA, thus the
@@ -124,7 +124,7 @@
gain1.connect(gain2).connect(contextB.destination);
},
'Connecting to a node from the different context')
- .throw('InvalidAccessError');
+ .throw(DOMException, 'InvalidAccessError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html
index c3d3fae2155..386614ff2e2 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html
@@ -193,17 +193,17 @@
// gain1 is not connected to gain3.gain. Exception should be thrown.
should(function() {
gain1.disconnect(gain3.gain);
- }, 'gain1.disconnect(gain3.gain)').throw('InvalidAccessError');
+ }, 'gain1.disconnect(gain3.gain)').throw(DOMException, 'InvalidAccessError');
// When the output index is good but the destination is invalid.
should(function() {
splitter.disconnect(gain1.gain, 1);
- }, 'splitter.disconnect(gain1.gain, 1)').throw('InvalidAccessError');
+ }, 'splitter.disconnect(gain1.gain, 1)').throw(DOMException, 'InvalidAccessError');
// When both arguments are wrong, throw IndexSizeError first.
should(function() {
splitter.disconnect(gain1.gain, 2);
- }, 'splitter.disconnect(gain1.gain, 2)').throw('IndexSizeError');
+ }, 'splitter.disconnect(gain1.gain, 2)').throw(DOMException, 'IndexSizeError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect.html
index b29c09d395f..65b93222d10 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect.html
@@ -230,7 +230,7 @@
// There is no output #2. An exception should be thrown.
should(function() {
splitter.disconnect(2);
- }, 'splitter.disconnect(2)').throw('IndexSizeError');
+ }, 'splitter.disconnect(2)').throw(DOMException, 'IndexSizeError');
// Disconnecting the output already disconnected should not throw.
should(function() {
@@ -241,34 +241,34 @@
// gain1 is not connected gain2. An exception should be thrown.
should(function() {
gain1.disconnect(gain2);
- }, 'gain1.disconnect(gain2)').throw('InvalidAccessError');
+ }, 'gain1.disconnect(gain2)').throw(DOMException, 'InvalidAccessError');
// gain1 and gain3 are not connected. An exception should be thrown.
should(function() {
gain1.disconnect(gain3);
- }, 'gain1.disconnect(gain3)').throw('InvalidAccessError');
+ }, 'gain1.disconnect(gain3)').throw(DOMException, 'InvalidAccessError');
// There is no output #2 in the splitter. An exception should be thrown.
should(function() {
splitter.disconnect(gain2, 2);
- }, 'splitter.disconnect(gain2, 2)').throw('IndexSizeError');
+ }, 'splitter.disconnect(gain2, 2)').throw(DOMException, 'IndexSizeError');
// The splitter and gain1 are not connected. An exception should be
// thrown.
should(function() {
splitter.disconnect(gain1, 0);
- }, 'splitter.disconnect(gain1, 0)').throw('InvalidAccessError');
+ }, 'splitter.disconnect(gain1, 0)').throw(DOMException, 'InvalidAccessError');
// The splitter output #0 and the gain3 output #0 are not connected. An
// exception should be thrown.
should(function() {
splitter.disconnect(gain3, 0, 0);
- }, 'splitter.disconnect(gain3, 0, 0)').throw('InvalidAccessError');
+ }, 'splitter.disconnect(gain3, 0, 0)').throw(DOMException, 'InvalidAccessError');
// The output index is out of bound. An exception should be thrown.
should(function() {
splitter.disconnect(merger, 3, 0);
- }, 'splitter.disconnect(merger, 3, 0)').throw('IndexSizeError');
+ }, 'splitter.disconnect(merger, 3, 0)').throw(DOMException, 'IndexSizeError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode.html
index 14cfbff7e27..0b57d27e8e1 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode.html
@@ -54,11 +54,11 @@
should(
() => audioNode.connect(context.destination, 5, 0),
'audioNode.connect(context.destination, 5, 0)')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
should(
() => audioNode.connect(context.destination, 0, 5),
'audioNode.connect(context.destination, 0, 5)')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
should(
() => audioNode.connect(context.destination, 0, 0),
@@ -71,7 +71,7 @@
should(
() => window.audioNode.connect(context2.destination),
'Connecting a node to a different context')
- .throw('InvalidAccessError');
+ .throw(DOMException, 'InvalidAccessError');
// 3-arg AudioContext doesn't create an offline context anymore.
should(
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html
index c928b3dc165..982731d3384 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values.html
@@ -174,11 +174,16 @@
},
]);
- // One final test for setValueCurve: duration can't be 0.
+ // Two final tests for setValueCurve: duration must be strictly
+ // positive.
should(
() => gain.gain.setValueCurveAtTime(curve, 1, 0),
'gain.gain.setValueCurveAtTime(curve, 1, 0)')
.throw(RangeError);
+ should(
+ () => gain.gain.setValueCurveAtTime(curve, 1, -1),
+ 'gain.gain.setValueCurveAtTime(curve, 1, -1)')
+ .throw(RangeError);
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html
index 31405ebfcd2..37062993f9d 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html
@@ -30,7 +30,7 @@
let curveStartTime = 0.1 * testDurationSec;
let duration = 0.1 * testDurationSec;
- // Some time that is known to during the setValueCurveTime interval.
+ // Some time that is known to be during the setValueCurveTime interval.
let automationTime = curveStartTime + duration / 2;
should(
@@ -46,28 +46,28 @@
g.gain.setValueAtTime(1, automationTime);
},
'setValueAtTime(1, ' + automationTime + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
should(
function() {
g.gain.linearRampToValueAtTime(1, automationTime);
},
'linearRampToValueAtTime(1, ' + automationTime + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
should(
function() {
g.gain.exponentialRampToValueAtTime(1, automationTime);
},
'exponentialRampToValueAtTime(1, ' + automationTime + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
should(
function() {
g.gain.setTargetAtTime(1, automationTime, 1);
},
'setTargetAtTime(1, ' + automationTime + ', 1)')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
should(
function() {
@@ -120,7 +120,7 @@
g.gain.setValueCurveAtTime(curve, time, 0.01);
},
'setValueCurveAtTime(curve, ' + time + ', 0.01)')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
}
// Elements of setValueCurve should be finite.
@@ -167,7 +167,7 @@
g.gain.setValueCurveAtTime(curve, time, 0.01);
},
'setValueCurveAtTime(curve, ' + time + ', 0.01)')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
task.done();
});
@@ -286,6 +286,83 @@
task.done();
});
+ audit.define('curve overlap', (task, should) => {
+ let context =
+ new OfflineAudioContext(1, testDurationFrames, sampleRate);
+ let g = context.createGain();
+ let startTime = 5;
+ let startTimeLater = 10;
+ let startTimeEarlier = 2.5;
+ let curveDuration = 10;
+ let curveDurationShorter = 5;
+ let curve = [1, 2, 3];
+
+ // An initial curve event
+ should(
+ () => {
+ g.gain.setValueCurveAtTime(curve, startTime, curveDuration);
+ },
+ `g.gain.setValueCurveAtTime([${curve}], ${startTime}, ${curveDuration})`)
+ .notThrow();
+
+ // Check that an exception is thrown when trying to overlap two curves,
+ // in various ways
+
+ // Same start time and end time (curve exactly overlapping)
+ should(
+ () => {
+ g.gain.setValueCurveAtTime(curve, startTime, curveDuration);
+ },
+ `second g.gain.setValueCurveAtTime([${curve}], ${startTime}, ${curveDuration})`)
+ .throw(DOMException, 'NotSupportedError');
+ // Same start time, shorter end time
+ should(
+ () => {
+ g.gain.setValueCurveAtTime(curve, startTime, curveDurationShorter);
+ },
+ `g.gain.setValueCurveAtTime([${curve}], ${startTime}, ${curveDurationShorter})`)
+ .throw(DOMException, 'NotSupportedError');
+ // Earlier start time, end time after the start time an another curve
+ should(
+ () => {
+ g.gain.setValueCurveAtTime(curve, startTimeEarlier, curveDuration);
+ },
+ `g.gain.setValueCurveAtTime([${curve}], ${startTimeEarlier}, ${curveDuration})`)
+ .throw(DOMException, 'NotSupportedError');
+ // Start time after the start time of the other curve, but earlier than
+ // its end.
+ should(
+ () => {
+ g.gain.setValueCurveAtTime(curve, startTimeLater, curveDuration);
+ },
+ `g.gain.setValueCurveAtTime([${curve}], ${startTimeLater}, ${curveDuration})`)
+ .throw(DOMException, 'NotSupportedError');
+
+ // New event wholly contained inside existing event
+ should(
+ () => {
+ g.gain.setValueCurveAtTime(curve, startTime + 1, curveDuration - 1);
+ },
+ `g.gain.setValueCurveAtTime([${curve}], ${startTime+1}, ${curveDuration-1})`)
+ .throw(DOMException, 'NotSupportedError');
+ // Old event completely contained inside new event
+ should(
+ () => {
+ g.gain.setValueCurveAtTime(curve, startTime - 1, curveDuration + 1);
+ },
+ `g.gain.setValueCurveAtTime([${curve}], ${startTime-1}, ${curveDuration+1})`)
+ .throw(DOMException, 'NotSupportedError');
+ // Setting an event exactly at the end of the curve should work.
+ should(
+ () => {
+ g.gain.setValueAtTime(1.0, startTime + curveDuration);
+ },
+ `g.gain.setValueAtTime(1.0, ${startTime + curveDuration})`)
+ .notThrow();
+
+ task.done();
+ });
+
audit.define('curve lengths', (task, should) => {
let context =
new OfflineAudioContext(1, testDurationFrames, sampleRate);
@@ -298,14 +375,14 @@
g.gain.setValueCurveAtTime(Float32Array.from([]), time, 0.01);
},
'setValueCurveAtTime([], ' + time + ', 0.01)')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
should(
() => {
g.gain.setValueCurveAtTime(Float32Array.from([1]), time, 0.01);
},
'setValueCurveAtTime([1], ' + time + ', 0.01)')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
should(() => {
g.gain.setValueCurveAtTime(Float32Array.from([1, 2]), time, 0.01);
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html
index a3c789e2f2c..a3c11994bbe 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html
@@ -151,7 +151,7 @@
if (param.isFixed) {
should(() => audioParam.automationRate = newRate, setMessage)
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
}
else {
should(() => audioParam.automationRate = newRate, setMessage)
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html
index eab77c494d1..688d0478235 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html
@@ -30,8 +30,8 @@
// An array of tests to be done. Each entry specifies the event
// type and the event time. The events are inserted in the order
- // given (in |values|), and the second event should replace the
- // first, as required by the spec.
+ // given (in |values|), and the second event should be inserted
+ // after the first one, as required by the spec.
let testCases = [
{
event: 'setValueAtTime',
@@ -57,7 +57,7 @@
{
event: 'setValueCurveAtTime',
frame: 3 * RENDER_QUANTUM_FRAMES,
- values: [[98, 99], [3, 4]],
+ values: [[3, 4]],
extraArgs: RENDER_QUANTUM_FRAMES / context.sampleRate,
outputTestFrame: 4 * RENDER_QUANTUM_FRAMES,
expectedOutputValue: 4
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-construction.https.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-construction.https.html
index 7cfd423c071..8b7704a781b 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-construction.https.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-construction.https.html
@@ -23,7 +23,7 @@
(task, should) => {
should(() => new AudioWorkletNode(realtimeContext, 'dummy'),
'Creating a node before loading a module should throw.')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html
index 31e204cdc8d..cee9ec82c20 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-constructor-options.https.html
@@ -90,13 +90,13 @@
should(
() => new AudioWorkletNode(context, 'dummy', options2),
'Creating AudioWorkletNode with channelCount 0')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
const options3 = {channelCount: 33};
should(
() => new AudioWorkletNode(context, 'dummy', options3),
'Creating AudioWorkletNode with channelCount 33')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html
index 83f53aafb19..441e98a2511 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-basic.html
@@ -110,7 +110,7 @@
'new Float32Array(10), ' +
'new Float32Array(1), ' +
'new Float32Array(20))')
- .throw('InvalidAccessError');
+ .throw(DOMException, 'InvalidAccessError');
should(
function() {
@@ -123,7 +123,7 @@
'new Float32Array(10), ' +
'new Float32Array(20), ' +
'new Float32Array(1))')
- .throw('InvalidAccessError');
+ .throw(DOMException, 'InvalidAccessError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html
index f967f0699a3..71a62f176f8 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-basic.html
@@ -24,7 +24,7 @@
should(function() {
merger = context.createChannelMerger(0);
- }, 'context.createChannelMerger(0)').throw('IndexSizeError');
+ }, 'context.createChannelMerger(0)').throw(DOMException, 'IndexSizeError');
should(function() {
merger = context.createChannelMerger(32);
@@ -34,7 +34,7 @@
// context has a 32-channel-limit in Chrome.
should(function() {
merger = context.createChannelMerger(33);
- }, 'context.createChannelMerger(33)').throw('IndexSizeError');
+ }, 'context.createChannelMerger(33)').throw(DOMException, 'IndexSizeError');
task.done();
});
@@ -49,14 +49,14 @@
should(function() {
merger.channelCount = 3;
- }, 'merger.channelCount = 3').throw('InvalidStateError');
+ }, 'merger.channelCount = 3').throw(DOMException, 'InvalidStateError');
should(merger.channelCountMode, 'merger.channelCountMode')
.beEqualTo('explicit');
should(function() {
merger.channelCountMode = 'max';
- }, 'merger.channelCountMode = "max"').throw('InvalidStateError');
+ }, 'merger.channelCountMode = "max"').throw(DOMException, 'InvalidStateError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html
index 115bd994349..0d6b45c56df 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelmergernode-interface/ctor-channelmerger.html
@@ -43,12 +43,15 @@
audit.define('test AudioNodeOptions', (task, should) => {
testAudioNodeOptions(should, context, 'ChannelMergerNode', {
- channelCount:
- {value: 1, isFixed: true, errorType: 'InvalidStateError'},
+ channelCount: {
+ value: 1,
+ isFixed: true,
+ exceptionType: 'InvalidStateError'
+ },
channelCountMode: {
value: 'explicit',
isFixed: true,
- errorType: 'InvalidStateError'
+ exceptionType: 'InvalidStateError'
}
});
task.done();
@@ -82,7 +85,7 @@
node = new ChannelMergerNode(context, options);
},
'new ChannelMergerNode(c, ' + JSON.stringify(options) + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
options = {channelCount: 3};
should(
@@ -90,7 +93,7 @@
node = new ChannelMergerNode(context, options);
},
'new ChannelMergerNode(c, ' + JSON.stringify(options) + ')')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
options = {channelCountMode: 'max'};
should(
@@ -98,7 +101,7 @@
node = new ChannelMergerNode(context, options);
},
'new ChannelMergerNode(c, ' + JSON.stringify(options) + ')')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html
index e0449919ad5..954c71a96b2 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/audiochannelsplitter.html
@@ -75,11 +75,11 @@ Tests that AudioChannelSplitter works correctly.
let splitternode;
should(() => {
let splitternode = context.createChannelSplitter(0);
- }, 'createChannelSplitter(0)').throw('IndexSizeError');
+ }, 'createChannelSplitter(0)').throw(DOMException, 'IndexSizeError');
should(() => {
splitternode = context.createChannelSplitter(33);
- }, 'createChannelSplitter(33)').throw('IndexSizeError');
+ }, 'createChannelSplitter(33)').throw(DOMException, 'IndexSizeError');
should(() => {
splitternode = context.createChannelSplitter(32);
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html
index 7fa9d6fa546..9cbb46b6d96 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-channelsplitternode-interface/ctor-channelsplitter.html
@@ -41,8 +41,11 @@
audit.define('test AudioNodeOptions', (task, should) => {
testAudioNodeOptions(should, context, 'ChannelSplitterNode', {
- channelCount:
- {value: 6, isFixed: true, errorType: 'InvalidStateError'},
+ channelCount: {
+ value: 6,
+ isFixed: true,
+ exceptionType: 'InvalidStateError'
+ },
channelCountMode: {
value: 'explicit',
isFixed: true,
@@ -50,7 +53,7 @@
channelInterpretation: {
value: 'discrete',
isFixed: true,
- errorType: 'InvalidStateError'
+ exceptionType: 'InvalidStateError'
},
});
task.done();
@@ -84,7 +87,7 @@
node = new ChannelSplitterNode(context, options);
},
'new ChannelSplitterNode(c, ' + JSON.stringify(options) + ')')
- .throw('IndexSizeError');
+ .throw(DOMException, 'IndexSizeError');
options = {channelCount: 3};
should(
@@ -92,7 +95,7 @@
node = new ChannelSplitterNode(context, options);
},
'new ChannelSplitterNode(c, ' + JSON.stringify(options) + ')')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
options = {channelCountMode: 'max'};
should(
@@ -100,7 +103,7 @@
node = new ChannelSplitterNode(context, options);
},
'new ChannelSplitterNode(c, ' + JSON.stringify(options) + ')')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-channels.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-channels.html
index 11d6f332a1b..ac4f198d7c1 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-channels.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-channels.html
@@ -30,7 +30,7 @@
should(() => convolver.buffer = buffer, message).notThrow();
} else {
should(() => convolver.buffer = buffer, message)
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
}
}
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-setBuffer-already-has-value.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-setBuffer-already-has-value.html
index 31f115da532..c8dbeb941bc 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-setBuffer-already-has-value.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-setBuffer-already-has-value.html
@@ -27,7 +27,7 @@
should(() => {
convolver.buffer = audioBuffer;
- }, 'Set buffer a second time').throw('InvalidStateError');
+ }, 'Set buffer a second time').throw(DOMException, 'InvalidStateError');
should(() => {
convolver.buffer = null;
@@ -40,7 +40,7 @@
should(() => {
convolver.buffer = audioBuffer;
}, 'Set buffer to non-null to verify to throw an error')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html
index cf818330060..935ceeb715e 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/ctor-convolver.html
@@ -46,12 +46,15 @@
audit.define('test AudioNodeOptions', (task, should) => {
testAudioNodeOptions(should, context, 'ConvolverNode', {
- channelCount:
- {value: 2, isFixed: true, errorType: 'NotSupportedError'},
+ channelCount: {
+ value: 2,
+ isFixed: true,
+ exceptionType: 'NotSupportedError'
+ },
channelCountMode: {
value: 'clamped-max',
isFixed: true,
- errorType: 'NotSupportedError'
+ exceptionType: 'NotSupportedError'
},
});
task.done();
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html
index 7bbff410650..caf2f85dfd4 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-delaynode-interface/delaynode-maxdelaylimit.html
@@ -32,14 +32,18 @@
bufferSource.buffer = toneBuffer;
window.context = context;
- should(() => context.createDelay(180)).throw("NotSupportedError",
- "Delay length cannot be 180 seconds or more");
- should(() => context.createDelay(0)).throw("NotSupportedError",
- "Delay length cannot be 0");
- should(() => context.createDelay(-1)).throw("NotSupportedError",
- "Delay length cannot be negative");
- should(() => context.createDelay(NaN)).throw(TypeError,
- "Delay length cannot be a NaN");
+ should(() => context.createDelay(180),
+ 'Setting Delay length to 180 seconds or more')
+ .throw(DOMException, 'NotSupportedError');
+ should(() => context.createDelay(0),
+ 'Setting Delay length to 0 seconds')
+ .throw(DOMException, 'NotSupportedError');
+ should(() => context.createDelay(-1),
+ 'Setting Delay length to negative')
+ .throw(DOMException, 'NotSupportedError');
+ should(() => context.createDelay(NaN),
+ 'Setting Delay length to NaN')
+ .throw(TypeError);
let delay = context.createDelay(179);
delay.delayTime.value = delayTimeSeconds;
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html
index 98d5dbfded1..c2460dfa1dd 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html
@@ -182,9 +182,12 @@
let message = 'new DynamicsCompressorNode(c, ' +
JSON.stringify(options.nodeOptions) + ')';
- if (options.expectedErrorType) {
+ if (options.expectedErrorType === TypeError) {
should(createNodeFunction(), message)
.throw(options.expectedErrorType);
+ } else if (options.expectedErrorType === 'NotSupportedError') {
+ should(createNodeFunction(), message)
+ .throw(DOMException, 'NotSupportedError');
} else {
should(createNodeFunction(), message).notThrow();
should(node[options.testAttribute], 'node.' + options.testAttribute)
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html
index 79c40dc0847..7828f052261 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html
@@ -66,17 +66,17 @@
should(function() {
// There has to be at least one coefficient.
context.createIIRFilter([], []);
- }, 'createIIRFilter([], [])').throw('NotSupportedError');
+ }, 'createIIRFilter([], [])').throw(DOMException, 'NotSupportedError');
should(function() {
// There has to be at least one coefficient.
context.createIIRFilter([1], []);
- }, 'createIIRFilter([1], [])').throw('NotSupportedError');
+ }, 'createIIRFilter([1], [])').throw(DOMException, 'NotSupportedError');
should(function() {
// There has to be at least one coefficient.
context.createIIRFilter([], [1]);
- }, 'createIIRFilter([], [1])').throw('NotSupportedError');
+ }, 'createIIRFilter([], [1])').throw(DOMException, 'NotSupportedError');
should(
function() {
@@ -96,7 +96,7 @@
context.createIIRFilter(coef, [1]);
},
'createIIRFilter(new Float32Array(21), [1])')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
should(
function() {
@@ -106,7 +106,7 @@
context.createIIRFilter([1], coef);
},
'createIIRFilter([1], new Float32Array(21))')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
should(
function() {
@@ -114,7 +114,7 @@
context.createIIRFilter([1], new Float32Array(2));
},
'createIIRFilter([1], new Float32Array(2))')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
should(
function() {
@@ -122,7 +122,7 @@
context.createIIRFilter(new Float32Array(10), [1]);
},
'createIIRFilter(new Float32Array(10), [1])')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
should(function() {
// Feedback coefficients must be finite.
@@ -183,7 +183,7 @@
new Float32Array(20));
},
'getFrequencyResponse(new Float32Array(10), new Float32Array(1), new Float32Array(20))')
- .throw('InvalidAccessError');
+ .throw(DOMException, 'InvalidAccessError');
should(
function() {
@@ -193,7 +193,7 @@
new Float32Array(1));
},
'getFrequencyResponse(new Float32Array(10), new Float32Array(20), new Float32Array(1))')
- .throw('InvalidAccessError');
+ .throw(DOMException, 'InvalidAccessError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html
index f480ec8ce51..4b686310362 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/ctor-offlineaudiocontext.html
@@ -129,7 +129,7 @@
new OfflineAudioContext(options);
},
'new OfflineAudioContext(' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
// length cannot be 0
options = {length: 0, sampleRate: 8000};
@@ -138,7 +138,7 @@
new OfflineAudioContext(options);
},
'new OfflineAudioContext(' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
// sampleRate outside valid range
options = {length: 1, sampleRate: 1};
@@ -147,7 +147,7 @@
new OfflineAudioContext(options);
},
'new OfflineAudioContext(' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
task.done();
});
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html
index aaf77aec555..36bf604b296 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/ctor-oscillator.html
@@ -87,7 +87,7 @@
node = new OscillatorNode(context, options);
},
'new OscillatorNode(c, ' + JSON.stringify(options) + ')')
- .throw('InvalidStateError');
+ .throw(DOMException, 'InvalidStateError');
options = {
type: 'custom',
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html
new file mode 100644
index 00000000000..81a1293d035
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-oscillatornode-interface/detune-limiting.html
@@ -0,0 +1,154 @@
+<!doctype html>
+<html>
+ <head>
+ <title>
+ Oscillator Detune Limits
+ </title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/webaudio/resources/audit.js"></script>
+ </head>
+
+ <body>
+ <script>
+ const sampleRate = 44100;
+ const renderLengthSeconds = 0.125;
+
+ let audit = Audit.createTaskRunner();
+
+ audit.define(
+ {
+ label: 'detune limits',
+ description:
+ 'Oscillator with detune and frequency at Nyquist or above'
+ },
+ (task, should) => {
+ let context = new OfflineAudioContext(
+ 2, renderLengthSeconds * sampleRate, sampleRate);
+
+ let merger = new ChannelMergerNode(
+ context, {numberOfInputs: context.destination.channelCount});
+ merger.connect(context.destination);
+
+ // For test oscillator, set the oscillator frequency to -Nyquist and
+ // set detune to be a large number that would cause the detuned
+ // frequency to be way above Nyquist.
+ const oscFrequency = 1;
+ const detunedFrequency = sampleRate;
+ const detuneValue = Math.fround(1200 * Math.log2(detunedFrequency));
+
+ let testOsc = new OscillatorNode(
+ context, {frequency: oscFrequency, detune: detuneValue});
+ testOsc.connect(merger, 0, 1);
+
+ // For the reference oscillator, determine the computed oscillator
+ // frequency using the values above and set that as the oscillator
+ // frequency.
+ let computedFreq = oscFrequency * Math.pow(2, detuneValue / 1200);
+
+ let refOsc = new OscillatorNode(context, {frequency: computedFreq});
+ refOsc.connect(merger, 0, 0);
+
+ // Start 'em up and render
+ testOsc.start();
+ refOsc.start();
+
+ context.startRendering()
+ .then(renderedBuffer => {
+ let expected = renderedBuffer.getChannelData(0);
+ let actual = renderedBuffer.getChannelData(1);
+
+ // Let user know about the smaple rate so following messages
+ // make more sense.
+ should(context.sampleRate, 'Context sample rate')
+ .beEqualTo(context.sampleRate);
+
+ // Since the frequency is at Nyquist, the reference oscillator
+ // output should be zero.
+ should(
+ refOsc.frequency.value, 'Reference oscillator frequency')
+ .beGreaterThanOrEqualTo(context.sampleRate / 2);
+ should(
+ expected, `Osc(freq: ${refOsc.frequency.value}) output`)
+ .beConstantValueOf(0);
+ // The output from each oscillator should be the same.
+ should(
+ actual,
+ 'Osc(freq: ' + oscFrequency + ', detune: ' + detuneValue +
+ ') output')
+ .beCloseToArray(expected, {absoluteThreshold: 0});
+
+ })
+ .then(() => task.done());
+ });
+
+ audit.define(
+ {
+ label: 'detune automation',
+ description:
+ 'Oscillator output with detune automation should be zero ' +
+ 'above Nyquist'
+ },
+ (task, should) => {
+ let context = new OfflineAudioContext(
+ 1, renderLengthSeconds * sampleRate, sampleRate);
+
+ const baseFrequency = 1;
+ const rampEnd = renderLengthSeconds / 2;
+ const detuneEnd = 1e7;
+
+ let src = new OscillatorNode(context, {frequency: baseFrequency});
+ src.detune.linearRampToValueAtTime(detuneEnd, rampEnd);
+
+ src.connect(context.destination);
+
+ src.start();
+
+ context.startRendering()
+ .then(renderedBuffer => {
+ let audio = renderedBuffer.getChannelData(0);
+
+ // At some point, the computed oscillator frequency will go
+ // above Nyquist. Determine at what time this occurrs. The
+ // computed frequency is f * 2^(d/1200) where |f| is the
+ // oscillator frequency and |d| is the detune value. Thus,
+ // find |d| such that Nyquist = f*2^(d/1200). That is, d =
+ // 1200*log2(Nyquist/f)
+ let criticalDetune =
+ 1200 * Math.log2(context.sampleRate / 2 / baseFrequency);
+
+ // Now figure out at what point on the linear ramp does the
+ // detune value reach this critical value. For a linear ramp:
+ //
+ // v(t) = V0+(V1-V0)*(t-T0)/(T1-T0)
+ //
+ // Thus,
+ //
+ // t = ((T1-T0)*v(t) + T0*V1 - T1*V0)/(V1-V0)
+ //
+ // In this test, T0 = 0, V0 = 0, T1 = rampEnd, V1 =
+ // detuneEnd, and v(t) = criticalDetune
+ let criticalTime = (rampEnd * criticalDetune) / detuneEnd;
+ let criticalFrame =
+ Math.ceil(criticalTime * context.sampleRate);
+
+ should(
+ criticalFrame,
+ `Frame where detuned oscillator reaches Nyquist`)
+ .beEqualTo(criticalFrame);
+
+ should(
+ audio.slice(0, criticalFrame),
+ `osc[0:${criticalFrame - 1}]`)
+ .notBeConstantValueOf(0);
+
+ should(audio.slice(criticalFrame), `osc[${criticalFrame}:]`)
+ .beConstantValueOf(0);
+ })
+ .then(() => task.done());
+ });
+
+ audit.run();
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html
index 5475a6210b7..d330c9c3de4 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/ctor-panner.html
@@ -107,7 +107,7 @@
node = new PannerNode(context, options);
},
'new PannerNode(c, ' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
options = {channelCount: 3};
should(
@@ -115,7 +115,7 @@
node = new PannerNode(context, options);
},
'new PannerNode(c, ' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
options = {channelCount: 99};
should(
@@ -123,7 +123,7 @@
node = new PannerNode(context, options);
},
'new PannerNode(c, ' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
// Test channelCountMode. A mode of "max" is illegal, but others are
// ok.
@@ -153,7 +153,7 @@
node = new PannerNode(context, options);
},
'new PannerNode(c, ' + JSON.stringify(options) + ')')
- .throw('NotSupportedError');
+ .throw(DOMException, 'NotSupportedError');
options = {channelCountMode: 'foobar'};
should(
@@ -192,6 +192,106 @@
'new PannerNode(c, ' + JSON.stringify(options) + ')')
.throw(TypeError);
+ // Test maxDistance
+ options = {maxDistance: -1};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .throw(RangeError);
+ options = {maxDistance: 100};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'node7 = new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .notThrow();
+ should(node.maxDistance, 'node7.maxDistance')
+ .beEqualTo(options.maxDistance);
+
+ // Test rolloffFactor
+ options = {rolloffFactor: -1};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .throw(RangeError);
+ options = {rolloffFactor: 0};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'node8 = new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .notThrow();
+ should(node.rolloffFactor, 'node8.rolloffFactor')
+ .beEqualTo(options.rolloffFactor);
+
+ options = {rolloffFactor: 0.5};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'node8 = new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .notThrow();
+ should(node.rolloffFactor, 'node8.rolloffFactor')
+ .beEqualTo(options.rolloffFactor);
+
+ options = {rolloffFactor: 100};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'node8 = new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .notThrow();
+ should(node.rolloffFactor, 'node8.rolloffFactor')
+ .beEqualTo(options.rolloffFactor);
+
+ // Test coneOuterGain
+ options = {coneOuterGain: -1};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .throw(DOMException, 'InvalidStateError');
+ options = {coneOuterGain: 1.1};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .throw(DOMException, 'InvalidStateError');
+ options = {coneOuterGain: 0.0};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'node9 = new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .notThrow();
+ should(node.coneOuterGain, 'node9.coneOuterGain')
+ .beEqualTo(options.coneOuterGain);
+ options = {coneOuterGain: 0.5};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'node9 = new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .notThrow();
+ should(node.coneOuterGain, 'node9.coneOuterGain')
+ .beEqualTo(options.coneOuterGain);
+
+ options = {coneOuterGain: 1.0};
+ should(
+ () => {
+ node = new PannerNode(context, options);
+ },
+ 'node9 = new PannerNode(c, ' + JSON.stringify(options) + ')')
+ .notThrow();
+ should(node.coneOuterGain, 'node9.coneOuterGain')
+ .beEqualTo(options.coneOuterGain);
+
task.done();
});
@@ -218,7 +318,7 @@
rolloffFactor: 3 * Math.PI,
coneInnerAngle: 4 * Math.PI,
coneOuterAngle: 5 * Math.PI,
- coneOuterGain: 6 * Math.PI
+ coneOuterGain: 0.1 * Math.PI
};
should(
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html
index e1519f8c302..387f8730109 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html
@@ -17,41 +17,19 @@
let audit = Audit.createTaskRunner();
- audit.define('linear-clamp-low', (task, should) => {
- runTest(should, {
- distanceModel: 'linear',
- // Fairly arbitrary value outside the nominal range
- rolloffFactor: -1,
- clampedRolloff: 0
- }).then(() => task.done());
- });
-
- audit.define('linear-clamp-high', (task, should) => {
- runTest(should, {
- distanceModel: 'linear',
- // Fairly arbitrary value outside the nominal range
- rolloffFactor: 2,
- clampedRolloff: 1
- }).then(() => task.done());
- });
-
- audit.define('inverse-clamp', (task, should) => {
- runTest(should, {
- distanceModel: 'inverse',
- // Fairly arbitrary value outside the nominal range
- rolloffFactor: -1,
- clampedRolloff: 0
- }).then(() => task.done());
- });
-
- audit.define('exponential-clamp', (task, should) => {
- runTest(should, {
- distanceModel: 'exponential',
- // Fairly arbitrary value outside the nominal range
- rolloffFactor: -2,
- clampedRolloff: 0
- }).then(() => task.done());
- });
+ audit.define(
+ {
+ label: 'linear-clamp-high',
+ description: 'rolloffFactor clamping for linear distance model'
+ },
+ (task, should) => {
+ runTest(should, {
+ distanceModel: 'linear',
+ // Fairly arbitrary value outside the nominal range
+ rolloffFactor: 2,
+ clampedRolloff: 1
+ }).then(() => task.done());
+ });
// Test clamping of the rolloffFactor. The test is done by comparing the
// output of a panner with the rolloffFactor set outside the nominal range
diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html
index caa99aa4031..9409f1ffce2 100644
--- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html
+++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/ctor-stereopanner.html
@@ -80,17 +80,23 @@
entry.tests.forEach(testItem => {
let options = {};
options[entry.attribute] = testItem.value;
- let method = testItem.error ? 'throw' : 'notThrow';
-
- should(
- () => {
- node = new StereoPannerNode(context, options);
- },
- `new StereoPannerNode(c, ${JSON.stringify(options)})`)[method](
- testItem.error);
- if (!testItem.error)
+
+ const testFunction = () => {
+ node = new StereoPannerNode(context, options);
+ };
+ const testDescription =
+ `new StereoPannerNode(c, ${JSON.stringify(options)})`;
+
+ if (testItem.error) {
+ testItem.error === TypeError
+ ? should(testFunction, testDescription).throw(TypeError)
+ : should(testFunction, testDescription)
+ .throw(DOMException, 'NotSupportedError');
+ } else {
+ should(testFunction, testDescription).notThrow();
should(node[entry.attribute], `node.${entry.attribute}`)
.beEqualTo(options[entry.attribute]);
+ }
});
});
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/actions/sequence.py b/tests/wpt/web-platform-tests/webdriver/tests/actions/sequence.py
index 426dbe82f48..b62d00c3e9b 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/actions/sequence.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/actions/sequence.py
@@ -1,15 +1,20 @@
# META: timeout=long
from tests.actions.support.refine import get_keys, filter_dict, get_events
-from tests.actions.support.keys import Keys
-def test_no_actions_send_no_events(session, key_reporter, key_chain):
+def test_perform_no_actions_send_no_events(session, key_reporter, key_chain):
key_chain.perform()
assert len(get_keys(key_reporter)) == 0
assert len(get_events(session)) == 0
+def test_release_no_actions_sends_no_events(session, key_reporter):
+ session.actions.release()
+ assert len(get_keys(key_reporter)) == 0
+ assert len(get_events(session)) == 0
+
+
def test_release_char_sequence_sends_keyup_events_in_reverse(session,
key_reporter,
key_chain):
@@ -26,14 +31,58 @@ def test_release_char_sequence_sends_keyup_events_in_reverse(session,
]
all_events = get_events(session)
events = [filter_dict(e, expected[0]) for e in all_events]
- if len(events) > 0 and events[0]["code"] == None:
+ if len(events) > 0 and events[0]["code"] is None:
# Remove 'code' entry if browser doesn't support it
expected = [filter_dict(e, {"key": "", "type": ""}) for e in expected]
events = [filter_dict(e, expected[0]) for e in events]
assert events == expected
-def test_release_no_actions_sends_no_events(session, key_reporter):
+def test_release_mouse_sequence_resets_dblclick_state(session,
+ test_actions_page,
+ mouse_chain):
+ reporter = session.find.css("#outer", all=False)
+
+ mouse_chain \
+ .click(element=reporter) \
+ .perform()
session.actions.release()
- assert len(get_keys(key_reporter)) == 0
- assert len(get_events(session)) == 0
+ mouse_chain \
+ .perform()
+ events = get_events(session)
+
+ expected = [
+ {"type": "mousedown", "button": 0},
+ {"type": "mouseup", "button": 0},
+ {"type": "click", "button": 0},
+ {"type": "mousedown", "button": 0},
+ {"type": "mouseup", "button": 0},
+ {"type": "click", "button": 0},
+ ]
+ filtered_events = [filter_dict(e, expected[0]) for e in events]
+ assert expected == filtered_events[1:]
+
+
+def test_no_release_mouse_sequence_keeps_dblclick_state(session,
+ test_actions_page,
+ mouse_chain):
+ reporter = session.find.css("#outer", all=False)
+
+ mouse_chain \
+ .click(element=reporter) \
+ .perform()
+ mouse_chain \
+ .perform()
+ events = get_events(session)
+
+ expected = [
+ {"type": "mousedown", "button": 0},
+ {"type": "mouseup", "button": 0},
+ {"type": "click", "button": 0},
+ {"type": "mousedown", "button": 0},
+ {"type": "mouseup", "button": 0},
+ {"type": "click", "button": 0},
+ {"type": "dblclick", "button": 0},
+ ]
+ filtered_events = [filter_dict(e, expected[0]) for e in events]
+ assert expected == filtered_events[1:]
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/actions/special_keys.py b/tests/wpt/web-platform-tests/webdriver/tests/actions/special_keys.py
index d2a44229ce0..416cbdcf20f 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/actions/special_keys.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/actions/special_keys.py
@@ -2,7 +2,6 @@
import pytest
import time
-from tests.support.fixtures import configuration
from tests.actions.support.keys import ALL_EVENTS, Keys
from tests.actions.support.refine import filter_dict, get_keys, get_events
from webdriver import error
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py b/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py
index 48fdf64f2f9..24ac645029e 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py
@@ -3,8 +3,7 @@ from datetime import datetime, timedelta
from webdriver.transport import Response
from tests.support.asserts import assert_error, assert_success
-from tests.support.fixtures import clear_all_cookies
-
+from tests.support.helpers import clear_all_cookies
def add_cookie(session, cookie):
return session.transport.send(
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/conftest.py
index c39671797f6..7e72eb9ca58 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/conftest.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/conftest.py
@@ -1,18 +1,20 @@
+import copy
+import json
+import os
+import urlparse
+
import pytest
+import webdriver
+
+from tests.support import defaults
+from tests.support.helpers import cleanup_session
+from tests.support.http_request import HTTPRequest
+from tests.support.wait import wait
+
+
+_current_session = None
+_custom_session = False
-from tests.support.fixtures import (
- add_event_listeners,
- configuration,
- closed_window,
- create_cookie,
- create_dialog,
- create_frame,
- create_window,
- current_session,
- http,
- server_config,
- session,
- url)
def pytest_configure(config):
# register the capabilities marker
@@ -33,17 +35,199 @@ def pytest_generate_tests(metafunc):
metafunc.parametrize("capabilities", marker.args, ids=None)
-pytest.fixture()(add_event_listeners)
-pytest.fixture(scope="session")(configuration)
-pytest.fixture()(create_cookie)
-pytest.fixture()(create_dialog)
-pytest.fixture()(create_frame)
-pytest.fixture()(create_window)
-pytest.fixture(scope="function")(current_session)
-pytest.fixture()(http)
-pytest.fixture()(server_config)
-pytest.fixture(scope="function")(session)
-pytest.fixture()(url)
-
-# Fixtures for specific tests
-pytest.fixture()(closed_window)
+@pytest.fixture
+def add_event_listeners(session):
+ """Register listeners for tracked events on element."""
+ def add_event_listeners(element, tracked_events):
+ element.session.execute_script("""
+ let element = arguments[0];
+ let trackedEvents = arguments[1];
+
+ if (!("events" in window)) {
+ window.events = [];
+ }
+
+ for (var i = 0; i < trackedEvents.length; i++) {
+ element.addEventListener(trackedEvents[i], function (event) {
+ window.events.push(event.type);
+ });
+ }
+ """, args=(element, tracked_events))
+ return add_event_listeners
+
+
+@pytest.fixture
+def create_cookie(session, url):
+ """Create a cookie"""
+ def create_cookie(name, value, **kwargs):
+ if kwargs.get("path", None) is not None:
+ session.url = url(kwargs["path"])
+
+ session.set_cookie(name, value, **kwargs)
+ return session.cookies(name)
+
+ return create_cookie
+
+
+@pytest.fixture
+def create_frame(session):
+ """Create an `iframe` element in the current browsing context and insert it
+ into the document. Return a reference to the newly-created element."""
+ def create_frame():
+ append = """
+ var frame = document.createElement('iframe');
+ document.body.appendChild(frame);
+ return frame;
+ """
+ return session.execute_script(append)
+
+ return create_frame
+
+
+@pytest.fixture
+def create_window(session):
+ """Open new window and return the window handle."""
+ def create_window():
+ windows_before = session.handles
+ name = session.execute_script("window.open()")
+ assert len(session.handles) == len(windows_before) + 1
+ new_windows = list(set(session.handles) - set(windows_before))
+ return new_windows.pop()
+ return create_window
+
+
+@pytest.fixture
+def http(configuration):
+ return HTTPRequest(configuration["host"], configuration["port"])
+
+
+@pytest.fixture
+def server_config():
+ return json.loads(os.environ.get("WD_SERVER_CONFIG"))
+
+
+@pytest.fixture(scope="session")
+def configuration():
+ host = os.environ.get("WD_HOST", defaults.DRIVER_HOST)
+ port = int(os.environ.get("WD_PORT", str(defaults.DRIVER_PORT)))
+ capabilities = json.loads(os.environ.get("WD_CAPABILITIES", "{}"))
+
+ return {
+ "host": host,
+ "port": port,
+ "capabilities": capabilities
+ }
+
+
+@pytest.fixture(scope="function")
+def session(capabilities, configuration, request):
+ """Create and start a session for a test that does not itself test session creation.
+
+ By default the session will stay open after each test, but we always try to start a
+ new one and assume that if that fails there is already a valid session. This makes it
+ possible to recover from some errors that might leave the session in a bad state, but
+ does not demand that we start a new session per test."""
+ global _current_session
+
+ # Update configuration capabilities with custom ones from the
+ # capabilities fixture, which can be set by tests
+ caps = copy.deepcopy(configuration["capabilities"])
+ caps.update(capabilities)
+ caps = {"alwaysMatch": caps}
+
+ # If there is a session with different capabilities active, end it now
+ if _current_session is not None and (
+ caps != _current_session.requested_capabilities):
+ _current_session.end()
+ _current_session = None
+
+ if _current_session is None:
+ _current_session = webdriver.Session(
+ configuration["host"],
+ configuration["port"],
+ capabilities=caps)
+ try:
+ _current_session.start()
+ except webdriver.error.SessionNotCreatedException:
+ if not _current_session.session_id:
+ raise
+
+ # Enforce a fixed default window size
+ _current_session.window.size = defaults.WINDOW_SIZE
+
+ yield _current_session
+
+ cleanup_session(_current_session)
+
+
+@pytest.fixture(scope="function")
+def current_session():
+ return _current_session
+
+
+@pytest.fixture
+def url(server_config):
+ def inner(path, protocol="http", query="", fragment=""):
+ port = server_config["ports"][protocol][0]
+ host = "%s:%s" % (server_config["browser_host"], port)
+ return urlparse.urlunsplit((protocol, host, path, query, fragment))
+
+ inner.__name__ = "url"
+ return inner
+
+
+@pytest.fixture
+def create_dialog(session):
+ """Create a dialog (one of "alert", "prompt", or "confirm") and provide a
+ function to validate that the dialog has been "handled" (either accepted or
+ dismissed) by returning some value."""
+
+ def create_dialog(dialog_type, text=None):
+ assert dialog_type in ("alert", "confirm", "prompt"), (
+ "Invalid dialog type: '%s'" % dialog_type)
+
+ if text is None:
+ text = ""
+
+ assert isinstance(text, basestring), "`text` parameter must be a string"
+
+ # Script completes itself when the user prompt has been opened.
+ # For prompt() dialogs, add a value for the 'default' argument,
+ # as some user agents (IE, for example) do not produce consistent
+ # values for the default.
+ session.execute_async_script("""
+ let dialog_type = arguments[0];
+ let text = arguments[1];
+
+ setTimeout(function() {
+ if (dialog_type == 'prompt') {
+ window.dialog_return_value = window[dialog_type](text, '');
+ } else {
+ window.dialog_return_value = window[dialog_type](text);
+ }
+ }, 0);
+ """, args=(dialog_type, text))
+
+ wait(session,
+ lambda s: s.alert.text == text,
+ "No user prompt with text '{}' detected".format(text),
+ timeout=15,
+ ignored_exceptions=webdriver.NoSuchAlertException)
+
+ return create_dialog
+
+
+@pytest.fixture
+def closed_window(session, create_window):
+ original_handle = session.window_handle
+
+ new_handle = create_window()
+ session.window_handle = new_handle
+
+ session.close()
+ assert new_handle not in session.handles, "Unable to close window {}".format(new_handle)
+
+ yield new_handle
+
+ session.window_handle = original_handle
+
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/scroll_into_view.py b/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/scroll_into_view.py
index 9ff0a9e2578..18f87ffaaec 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/scroll_into_view.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/scroll_into_view.py
@@ -1,8 +1,7 @@
from tests.support.asserts import assert_success
-from tests.support.fixtures import is_element_in_viewport
+from tests.support.helpers import is_element_in_viewport
from tests.support.inline import inline
-
def element_send_keys(session, element, text):
return session.transport.send(
"POST", "/session/{session_id}/element/{element_id}/value".format(
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py
index 9e220d02687..2af16c1e5e8 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py
@@ -27,6 +27,11 @@ def test_no_browsing_context(session, closed_window):
assert_error(response, "no such window")
+def test_ending_comment(session):
+ response = execute_script(session, "return 1; // foo")
+ assert_success(response, 1)
+
+
@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
def test_abort_by_user_prompt(session, dialog_type):
response = execute_script(
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/__init__.py
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/__init__.py
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/get.py b/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/get.py
new file mode 100644
index 00000000000..88a56e1ad45
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/get.py
@@ -0,0 +1,48 @@
+from tests.support.asserts import assert_error, assert_success
+from tests.support.inline import inline
+
+
+def get_element_css_value(session, element_id, prop):
+ return session.transport.send(
+ "GET",
+ "session/{session_id}/element/{element_id}/css/{prop}".format(
+ session_id=session.session_id,
+ element_id=element_id,
+ prop=prop
+ )
+ )
+
+
+def test_no_browsing_context(session, closed_window):
+ response = get_element_css_value(session, "foo", "bar")
+ assert_error(response, "no such window")
+
+
+def test_element_not_found(session):
+ result = get_element_css_value(session, "foo", "display")
+ assert_error(result, "no such element")
+
+
+def test_element_stale(session):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+ session.refresh()
+
+ result = get_element_css_value(session, element.id, "display")
+ assert_error(result, "stale element reference")
+
+
+def test_property_name_value(session):
+ session.url = inline("""<input style="display: block">""")
+ element = session.find.css("input", all=False)
+
+ result = get_element_css_value(session, element.id, "display")
+ assert_success(result, "block")
+
+
+def test_property_name_not_existent(session):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+
+ result = get_element_css_value(session, element.id, "foo")
+ assert_success(result, "")
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/user_prompts.py
new file mode 100644
index 00000000000..529b6ae9183
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/user_prompts.py
@@ -0,0 +1,121 @@
+# META: timeout=long
+
+import pytest
+
+from tests.support.asserts import assert_error, assert_success, assert_dialog_handled
+from tests.support.inline import inline
+
+
+def get_element_css_value(session, element_id, prop):
+ return session.transport.send(
+ "GET",
+ "session/{session_id}/element/{element_id}/css/{prop}".format(
+ session_id=session.session_id,
+ element_id=element_id,
+ prop=prop
+ )
+ )
+
+
+@pytest.fixture
+def check_user_prompt_closed_without_exception(session, create_dialog):
+ def check_user_prompt_closed_without_exception(dialog_type, retval):
+ session.url = inline("""<input style="display: block">""")
+ element = session.find.css("input", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = get_element_css_value(session, element.id, "display")
+ assert_success(response, "block")
+
+ assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval)
+
+ return check_user_prompt_closed_without_exception
+
+
+@pytest.fixture
+def check_user_prompt_closed_with_exception(session, create_dialog):
+ def check_user_prompt_closed_with_exception(dialog_type, retval):
+ session.url = inline("""<input style="display: block">""")
+ element = session.find.css("input", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = get_element_css_value(session, element.id, "display")
+ assert_error(response, "unexpected alert open")
+
+ assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval)
+
+ return check_user_prompt_closed_with_exception
+
+
+@pytest.fixture
+def check_user_prompt_not_closed_but_exception(session, create_dialog):
+ def check_user_prompt_not_closed_but_exception(dialog_type):
+ session.url = inline("""<input style="display: block">""")
+ element = session.find.css("input", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = get_element_css_value(session, element.id, "display")
+ assert_error(response, "unexpected alert open")
+
+ assert session.alert.text == dialog_type
+ session.alert.dismiss()
+
+ return check_user_prompt_not_closed_but_exception
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", True),
+ ("prompt", ""),
+])
+def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval):
+ check_user_prompt_closed_without_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", True),
+ ("prompt", ""),
+])
+def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval):
+ check_user_prompt_closed_with_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", False),
+ ("prompt", None),
+])
+def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval):
+ check_user_prompt_closed_without_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", False),
+ ("prompt", None),
+])
+def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval):
+ check_user_prompt_closed_with_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type):
+ check_user_prompt_not_closed_but_exception(dialog_type)
+
+
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", False),
+ ("prompt", None),
+])
+def test_default(check_user_prompt_closed_with_exception, dialog_type, retval):
+ check_user_prompt_closed_with_exception(dialog_type, retval)
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/__init__.py
new file mode 100644
index 00000000000..abf1a913675
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/__init__.py
@@ -0,0 +1,10 @@
+def retrieve_element_rect(session, element):
+ return session.execute_script("""
+ let rect = arguments[0].getBoundingClientRect();
+ return {
+ x: rect.left + window.pageXOffset,
+ y: rect.top + window.pageYOffset,
+ width: rect.width,
+ height: rect.height,
+ };
+ """, args=(element,))
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/get.py b/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/get.py
new file mode 100644
index 00000000000..433e2f6bf8b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/get.py
@@ -0,0 +1,41 @@
+from tests.support.asserts import assert_error, assert_success
+from tests.support.inline import inline
+
+from . import retrieve_element_rect
+
+
+def get_element_rect(session, element_id):
+ return session.transport.send(
+ "GET",
+ "session/{session_id}/element/{element_id}/rect".format(
+ session_id=session.session_id,
+ element_id=element_id,
+ )
+ )
+
+
+def test_no_browsing_context(session, closed_window):
+ response = get_element_rect(session, "foo")
+ assert_error(response, "no such window")
+
+
+def test_element_not_found(session):
+ result = get_element_rect(session, "foo")
+ assert_error(result, "no such element")
+
+
+def test_element_stale(session):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+ session.refresh()
+
+ result = get_element_rect(session, element.id)
+ assert_error(result, "stale element reference")
+
+
+def test_basic(session):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+
+ result = get_element_rect(session, element.id)
+ assert_success(result, retrieve_element_rect(session, element))
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/user_prompts.py
new file mode 100644
index 00000000000..ec1047bd389
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/user_prompts.py
@@ -0,0 +1,122 @@
+# META: timeout=long
+
+import pytest
+
+from tests.support.asserts import assert_error, assert_success, assert_dialog_handled
+from tests.support.inline import inline
+
+from . import retrieve_element_rect
+
+
+def get_element_rect(session, element_id):
+ return session.transport.send(
+ "GET",
+ "session/{session_id}/element/{element_id}/rect".format(
+ session_id=session.session_id,
+ element_id=element_id,
+ )
+ )
+
+
+@pytest.fixture
+def check_user_prompt_closed_without_exception(session, create_dialog):
+ def check_user_prompt_closed_without_exception(dialog_type, retval):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = get_element_rect(session, element.id)
+ assert_success(response, retrieve_element_rect(session, element))
+
+ assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval)
+
+ return check_user_prompt_closed_without_exception
+
+
+@pytest.fixture
+def check_user_prompt_closed_with_exception(session, create_dialog):
+ def check_user_prompt_closed_with_exception(dialog_type, retval):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = get_element_rect(session, element.id)
+ assert_error(response, "unexpected alert open")
+
+ assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval)
+
+ return check_user_prompt_closed_with_exception
+
+
+@pytest.fixture
+def check_user_prompt_not_closed_but_exception(session, create_dialog):
+ def check_user_prompt_not_closed_but_exception(dialog_type):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = get_element_rect(session, element.id)
+ assert_error(response, "unexpected alert open")
+
+ assert session.alert.text == dialog_type
+ session.alert.dismiss()
+
+ return check_user_prompt_not_closed_but_exception
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", True),
+ ("prompt", ""),
+])
+def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval):
+ check_user_prompt_closed_without_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", True),
+ ("prompt", ""),
+])
+def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval):
+ check_user_prompt_closed_with_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", False),
+ ("prompt", None),
+])
+def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval):
+ check_user_prompt_closed_without_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", False),
+ ("prompt", None),
+])
+def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval):
+ check_user_prompt_closed_with_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type):
+ check_user_prompt_not_closed_but_exception(dialog_type)
+
+
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", False),
+ ("prompt", None),
+])
+def test_default(check_user_prompt_closed_with_exception, dialog_type, retval):
+ check_user_prompt_closed_with_exception(dialog_type, retval)
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py b/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py
index 915f26c801b..50a46519168 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py
@@ -1,10 +1,9 @@
from datetime import datetime, timedelta
from tests.support.asserts import assert_error, assert_success
-from tests.support.fixtures import clear_all_cookies
+from tests.support.helpers import clear_all_cookies
from tests.support.inline import inline
-
def get_named_cookie(session, name):
return session.transport.send(
"GET", "session/{session_id}/cookie/{name}".format(
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/__init__.py
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/enabled.py b/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/enabled.py
new file mode 100644
index 00000000000..dd56084d8d0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/enabled.py
@@ -0,0 +1,109 @@
+import pytest
+
+from tests.support.asserts import assert_error, assert_success
+from tests.support.inline import inline
+
+
+def is_element_enabled(session, element_id):
+ return session.transport.send(
+ "GET",
+ "session/{session_id}/element/{element_id}/enabled".format(
+ session_id=session.session_id,
+ element_id=element_id
+ )
+ )
+
+
+def test_no_browsing_context(session, closed_window):
+ response = is_element_enabled(session, "foo")
+ assert_error(response, "no such window")
+
+
+def test_element_stale(session):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+ session.refresh()
+
+ result = is_element_enabled(session, element.id)
+ assert_error(result, "stale element reference")
+
+
+@pytest.mark.parametrize("element", ["button", "input", "select", "textarea"])
+def test_form_control_disabled(session, element):
+ session.url = inline("<{} disabled/>".format(element))
+ element = session.find.css(element, all=False)
+
+ result = is_element_enabled(session, element.id)
+ assert_success(result, False)
+
+
+@pytest.mark.parametrize("element", ["button", "input", "select", "textarea"])
+def test_form_control_enabled(session, element):
+ session.url = inline("<{}/>".format(element))
+ element = session.find.css(element, all=False)
+
+ result = is_element_enabled(session, element.id)
+ assert_success(result, True)
+
+
+@pytest.mark.parametrize("element", ["button", "input", "select", "textarea"])
+def test_fieldset_disabled_descendant(session, element):
+ session.url = inline("<fieldset disabled><{}/></fieldset>".format(element))
+ element = session.find.css(element, all=False)
+
+ result = is_element_enabled(session, element.id)
+ assert_success(result, False)
+
+
+@pytest.mark.parametrize("element", ["button", "input", "select", "textarea"])
+def test_fieldset_enabled_descendant(session, element):
+ session.url = inline("<fieldset><{}/></fieldset>".format(element))
+ element = session.find.css(element, all=False)
+
+ result = is_element_enabled(session, element.id)
+ assert_success(result, True)
+
+
+@pytest.mark.parametrize("element", ["button", "input", "select", "textarea"])
+def test_fieldset_disabled_descendant_legend(session, element):
+ session.url = inline("<fieldset disabled><legend><{}/></legend></fieldset>".format(element))
+ element = session.find.css(element, all=False)
+
+ result = is_element_enabled(session, element.id)
+ assert_success(result, True)
+
+
+@pytest.mark.parametrize("element", ["button", "input", "select", "textarea"])
+def test_fieldset_enabled_descendant_legend(session, element):
+ session.url = inline("<fieldset><legend><{}/></legend></fieldset>".format(element))
+ element = session.find.css(element, all=False)
+
+ result = is_element_enabled(session, element.id)
+ assert_success(result, True)
+
+
+@pytest.mark.parametrize("element", ["button", "input", "select", "textarea"])
+def test_xhtml_form_control_disabled(session, element):
+ session.url = inline("""<{} disabled="disabled"/>""".format(element),
+ doctype="xhtml")
+ element = session.find.css(element, all=False)
+
+ result = is_element_enabled(session, element.id)
+ assert_success(result, False)
+
+
+@pytest.mark.parametrize("element", ["button", "input", "select", "textarea"])
+def test_xhtml_form_control_enabled(session, element):
+ session.url = inline("""<{}/>""".format(element), doctype="xhtml")
+ element = session.find.css(element, all=False)
+
+ result = is_element_enabled(session, element.id)
+ assert_success(result, True)
+
+
+def test_xml_always_not_enabled(session):
+ session.url = inline("""<note></note>""", doctype="xml")
+ element = session.find.css("note", all=False)
+
+ result = is_element_enabled(session, element.id)
+ assert_success(result, False)
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/user_prompts.py
new file mode 100644
index 00000000000..bd8bc81bdfc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/user_prompts.py
@@ -0,0 +1,120 @@
+# META: timeout=long
+
+import pytest
+
+from tests.support.asserts import assert_error, assert_dialog_handled, assert_success
+from tests.support.inline import inline
+
+
+def is_element_enabled(session, element_id):
+ return session.transport.send(
+ "GET",
+ "session/{session_id}/element/{element_id}/enabled".format(
+ session_id=session.session_id,
+ element_id=element_id
+ )
+ )
+
+
+@pytest.fixture
+def check_user_prompt_closed_without_exception(session, create_dialog):
+ def check_user_prompt_closed_without_exception(dialog_type, retval):
+ session.url = inline("<input id=foo disabled>")
+ element = session.find.css("#foo", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = is_element_enabled(session, element.id)
+ assert_success(response, False)
+
+ assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval)
+
+ return check_user_prompt_closed_without_exception
+
+
+@pytest.fixture
+def check_user_prompt_closed_with_exception(session, create_dialog):
+ def check_user_prompt_closed_with_exception(dialog_type, retval):
+ session.url = inline("<input id=foo disabled>")
+ element = session.find.css("#foo", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = is_element_enabled(session, element.id)
+ assert_error(response, "unexpected alert open")
+
+ assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval)
+
+ return check_user_prompt_closed_with_exception
+
+
+@pytest.fixture
+def check_user_prompt_not_closed_but_exception(session, create_dialog):
+ def check_user_prompt_not_closed_but_exception(dialog_type):
+ session.url = inline("<input id=foo disabled>")
+ element = session.find.css("#foo", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = is_element_enabled(session, element.id)
+ assert_error(response, "unexpected alert open")
+
+ assert session.alert.text == dialog_type
+ session.alert.dismiss()
+
+ return check_user_prompt_not_closed_but_exception
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", True),
+ ("prompt", ""),
+])
+def test_accept(check_user_prompt_closed_without_exception, dialog_type, retval):
+ check_user_prompt_closed_without_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", True),
+ ("prompt", ""),
+])
+def test_accept_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval):
+ check_user_prompt_closed_with_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", False),
+ ("prompt", None),
+])
+def test_dismiss(check_user_prompt_closed_without_exception, dialog_type, retval):
+ check_user_prompt_closed_without_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"})
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", False),
+ ("prompt", None),
+])
+def test_dismiss_and_notify(check_user_prompt_closed_with_exception, dialog_type, retval):
+ check_user_prompt_closed_with_exception(dialog_type, retval)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type):
+ check_user_prompt_not_closed_but_exception(dialog_type)
+
+
+@pytest.mark.parametrize("dialog_type, retval", [
+ ("alert", None),
+ ("confirm", False),
+ ("prompt", None),
+])
+def test_default(check_user_prompt_closed_with_exception, dialog_type, retval):
+ check_user_prompt_closed_with_exception(dialog_type, retval)
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/invalid_capabilities.py b/tests/wpt/web-platform-tests/webdriver/tests/new_session/invalid_capabilities.py
index 83f93ea22f7..f31ce3b8b6f 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/invalid_capabilities.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/new_session/invalid_capabilities.py
@@ -1,8 +1,10 @@
import pytest
-from tests.support.asserts import assert_error
from conftest import product, flatten
+from tests.new_session.support.create import invalid_data, invalid_extensions
+from tests.support.asserts import assert_error
+
@pytest.mark.parametrize("value", [None, 1, "{}", []])
def test_invalid_capabilites(new_session, value):
@@ -26,29 +28,6 @@ def test_invalid_first_match(new_session, add_browser_capabilities, value):
assert_error(response, "invalid argument")
-invalid_data = [
- ("acceptInsecureCerts", [1, [], {}, "false"]),
- ("browserName", [1, [], {}, False]),
- ("browserVersion", [1, [], {}, False]),
- ("platformName", [1, [], {}, False]),
- ("pageLoadStrategy", [1, [], {}, False, "invalid", "NONE", "Eager", "eagerblah", "interactive",
- " eager", "eager "]),
- ("proxy", [1, [], "{}", {"proxyType": "SYSTEM"}, {"proxyType": "systemSomething"},
- {"proxy type": "pac"}, {"proxy-Type": "system"}, {"proxy_type": "system"},
- {"proxytype": "system"}, {"PROXYTYPE": "system"}, {"proxyType": None},
- {"proxyType": 1}, {"proxyType": []}, {"proxyType": {"value": "system"}},
- {" proxyType": "system"}, {"proxyType ": "system"}, {"proxyType ": " system"},
- {"proxyType": "system "}]),
- ("timeouts", [1, [], "{}", False, {"pageLOAD": 10}, {"page load": 10},
- {"page load": 10}, {"pageLoad": "10"}, {"pageLoad": {"value": 10}},
- {"invalid": 10}, {"pageLoad": -1}, {"pageLoad": 2**64},
- {"pageLoad": None}, {"pageLoad": 1.1}, {"pageLoad": 10, "invalid": 10},
- {" pageLoad": 10}, {"pageLoad ": 10}]),
- ("unhandledPromptBehavior", [1, [], {}, False, "DISMISS", "dismissABC", "Accept",
- " dismiss", "dismiss "])
-]
-
-
@pytest.mark.parametrize("body", [lambda key, value: {"alwaysMatch": {key: value}},
lambda key, value: {"firstMatch": [{key: value}]}])
@pytest.mark.parametrize("key,value", flatten(product(*item) for item in invalid_data))
@@ -63,31 +42,6 @@ def test_invalid_values(new_session, add_browser_capabilities, body, key, value)
assert_error(response, "invalid argument")
-invalid_extensions = [
- "firefox",
- "firefox_binary",
- "firefoxOptions",
- "chromeOptions",
- "automaticInspection",
- "automaticProfiling",
- "platform",
- "version",
- "browser",
- "platformVersion",
- "javascriptEnabled",
- "nativeEvents",
- "seleniumProtocol",
- "profile",
- "trustAllSSLCertificates",
- "initialBrowserUrl",
- "requireWindowFocus",
- "logFile",
- "logLevel",
- "safari.options",
- "ensureCleanSession",
-]
-
-
@pytest.mark.parametrize("body", [lambda key, value: {"alwaysMatch": {key: value}},
lambda key, value: {"firstMatch": [{key: value}]}])
@pytest.mark.parametrize("key", invalid_extensions)
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/support/create.py b/tests/wpt/web-platform-tests/webdriver/tests/new_session/support/create.py
index 85ae1cd4ea8..475fe5a424f 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/support/create.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/new_session/support/create.py
@@ -1,15 +1,130 @@
# Note that we can only test things here all implementations must support
valid_data = [
- ("acceptInsecureCerts", [False, None]),
- ("browserName", [None]),
- ("browserVersion", [None]),
- ("platformName", [None]),
- ("pageLoadStrategy", ["none", "eager", "normal", None]),
- ("proxy", [None]),
- ("timeouts", [{"script": 0, "pageLoad": 2.0, "implicit": 2**53 - 1},
- {"script": 50, "pageLoad": 25},
- {"script": 500},
- {}]),
- ("unhandledPromptBehavior", ["dismiss", "accept", None]),
- ("test:extension", [True, "abc", 123, [], {"key": "value"}, None]),
+ ("acceptInsecureCerts", [
+ False, None,
+ ]),
+ ("browserName", [
+ None,
+ ]),
+ ("browserVersion", [
+ None,
+ ]),
+ ("platformName", [
+ None,
+ ]),
+ ("pageLoadStrategy", [
+ None,
+ "none",
+ "eager",
+ "normal",
+ ]),
+ ("proxy", [
+ None,
+ ]),
+ ("timeouts", [
+ None, {},
+ {"script": 0, "pageLoad": 2.0, "implicit": 2**53 - 1},
+ {"script": 50, "pageLoad": 25},
+ {"script": 500},
+ ]),
+ ("unhandledPromptBehavior", [
+ "dismiss",
+ "accept",
+ None,
+ ]),
+ ("test:extension", [
+ None, False, "abc", 123, [],
+ {"key": "value"},
+ ]),
+]
+
+invalid_data = [
+ ("acceptInsecureCerts", [
+ 1, [], {}, "false",
+ ]),
+ ("browserName", [
+ 1, [], {}, False,
+ ]),
+ ("browserVersion", [
+ 1, [], {}, False,
+ ]),
+ ("platformName", [
+ 1, [], {}, False,
+ ]),
+ ("pageLoadStrategy", [
+ 1, [], {}, False,
+ "invalid",
+ "NONE",
+ "Eager",
+ "eagerblah",
+ "interactive",
+ " eager",
+ "eager "]),
+ ("proxy", [
+ 1, [], "{}",
+ {"proxyType": "SYSTEM"},
+ {"proxyType": "systemSomething"},
+ {"proxy type": "pac"},
+ {"proxy-Type": "system"},
+ {"proxy_type": "system"},
+ {"proxytype": "system"},
+ {"PROXYTYPE": "system"},
+ {"proxyType": None},
+ {"proxyType": 1},
+ {"proxyType": []},
+ {"proxyType": {"value": "system"}},
+ {" proxyType": "system"},
+ {"proxyType ": "system"},
+ {"proxyType ": " system"},
+ {"proxyType": "system "},
+ ]),
+ ("timeouts", [
+ 1, [], "{}", False,
+ {"invalid": 10},
+ {"PAGELOAD": 10},
+ {"page load": 10},
+ {" pageLoad": 10},
+ {"pageLoad ": 10},
+ {"pageLoad": None},
+ {"pageLoad": False},
+ {"pageLoad": []},
+ {"pageLoad": "10"},
+ {"pageLoad": 2.5},
+ {"pageLoad": -1},
+ {"pageLoad": 2**53},
+ {"pageLoad": {"value": 10}},
+ {"pageLoad": 10, "invalid": 10},
+ ]),
+ ("unhandledPromptBehavior", [
+ 1, [], {}, False,
+ "DISMISS",
+ "dismissABC",
+ "Accept",
+ " dismiss",
+ "dismiss ",
+ ])
+]
+
+invalid_extensions = [
+ "firefox",
+ "firefox_binary",
+ "firefoxOptions",
+ "chromeOptions",
+ "automaticInspection",
+ "automaticProfiling",
+ "platform",
+ "version",
+ "browser",
+ "platformVersion",
+ "javascriptEnabled",
+ "nativeEvents",
+ "seleniumProtocol",
+ "profile",
+ "trustAllSSLCertificates",
+ "initialBrowserUrl",
+ "requireWindowFocus",
+ "logFile",
+ "logLevel",
+ "safari.options",
+ "ensureCleanSession",
]
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py b/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py
index edc37d6edb4..6dbc03f9401 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py
@@ -6,6 +6,13 @@ from tests.support.asserts import assert_error, assert_success
from tests.support.inline import inline
+@pytest.fixture
+def page(session):
+ session.url = inline("""
+ <script>window.result = window.prompt('Enter Your Name: ', 'Name');</script>
+ """)
+
+
def send_alert_text(session, text=None):
return session.transport.send(
"POST", "session/{session_id}/alert/text".format(**vars(session)),
@@ -18,64 +25,41 @@ def test_null_parameter_value(session, http):
assert_error(Response.from_http(response), "invalid argument")
-def test_null_response_value(session, url):
- session.url = inline("<script>window.result = window.prompt('Enter Your Name: ', 'Name');</script>")
-
+def test_null_response_value(session, page):
response = send_alert_text(session, "Federer")
value = assert_success(response)
assert value is None
-def test_no_browsing_context(session, closed_window):
- response = send_alert_text(session, "foo")
- assert_error(response, "no such window")
-
-
@pytest.mark.parametrize("text", [None, {}, [], 42, True])
-def test_invalid_input(session, text):
- session.url = inline("<script>window.result = window.prompt('Enter Your Name: ', 'Name');</script>")
+def test_invalid_input(session, page, text):
response = send_alert_text(session, text)
assert_error(response, "invalid argument")
-def test_no_user_prompt(session):
+def test_no_browsing_context(session, closed_window):
response = send_alert_text(session, "Federer")
- assert_error(response, "no such alert")
-
+ assert_error(response, "no such window")
-def test_alert_element_not_interactable(session):
- session.url = inline("<script>window.alert('Hello');</script>")
+def test_no_user_prompt(session):
response = send_alert_text(session, "Federer")
- assert_error(response, "element not interactable")
+ assert_error(response, "no such alert")
-def test_confirm_element_not_interactable(session):
- session.url = inline("<script>window.confirm('Hello');</script>")
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm"])
+def test_alert_element_not_interactable(session, dialog_type):
+ session.url = inline("<script>window.{}('Hello');</script>".format(dialog_type))
response = send_alert_text(session, "Federer")
assert_error(response, "element not interactable")
-def test_send_alert_text(session):
- session.url = inline("<script>window.result = window.prompt('Enter Your Name: ', 'Name');</script>")
-
- send_response = send_alert_text(session, "Federer")
+@pytest.mark.parametrize("text", ["", "Federer", " Fed erer "])
+def test_send_alert_text(session, page, text):
+ send_response = send_alert_text(session, text)
assert_success(send_response)
- accept_response = session.transport.send("POST", "session/{session_id}/alert/accept"
- .format(session_id=session.session_id))
- assert_success(accept_response)
- assert session.execute_script("return window.result") == "Federer"
-
-
-def test_send_alert_text_with_whitespace(session):
- session.url = inline("<script>window.result = window.prompt('Enter Your Name: ', 'Name');</script>")
-
- send_response = send_alert_text(session, " Fed erer ")
- assert_success(send_response)
+ session.alert.accept()
- accept_response = session.transport.send("POST", "session/{session_id}/alert/accept"
- .format(session_id=session.session_id))
- assert_success(accept_response)
- assert session.execute_script("return window.result") == " Fed erer "
+ assert session.execute_script("return window.result") == text
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py b/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py
index e603e217ec7..a78ab2e68e8 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py
@@ -1,3 +1,5 @@
+import pytest
+
from webdriver.transport import Response
from tests.support.asserts import assert_error, assert_success
@@ -16,14 +18,60 @@ def test_null_parameter_value(session, http):
def test_null_response_value(session):
- response = set_timeouts(session, {"implicit": 1000})
+ timeouts = {"implicit": 10, "pageLoad": 10, "script": 10}
+ response = set_timeouts(session, timeouts)
value = assert_success(response)
assert value is None
- response = set_timeouts(session, {"pageLoad": 1000})
- value = assert_success(response)
- assert value is None
- response = set_timeouts(session, {"script": 1000})
- value = assert_success(response)
- assert value is None
+@pytest.mark.parametrize("value", [1, "{}", False, []])
+def test_parameters_invalid(session, value):
+ response = set_timeouts(session, value)
+ assert_error(response, "invalid argument")
+
+
+def test_parameters_empty_no_change(session):
+ original = session.timeouts._get()
+
+ response = set_timeouts(session, {})
+ assert_success(response)
+
+ assert session.timeouts._get() == original
+
+
+def test_key_invalid(session):
+ response = set_timeouts(session, {"foo": 1000})
+ assert_error(response, "invalid argument")
+
+
+@pytest.mark.parametrize("typ", ["implicit", "pageLoad", "script"])
+@pytest.mark.parametrize("value", [0, 2.0, 2**53 - 1])
+def test_positive_integer(session, typ, value):
+ response = set_timeouts(session, {typ: value})
+ assert_success(response)
+
+ assert session.timeouts._get(typ) == value
+
+
+@pytest.mark.parametrize("typ", ["implicit", "pageLoad", "script"])
+@pytest.mark.parametrize("value", [None, [], {}, False, "10"])
+def test_value_invalid_types(session, typ, value):
+ response = set_timeouts(session, {typ: value})
+ assert_error(response, "invalid argument")
+
+
+@pytest.mark.parametrize("typ", ["implicit", "pageLoad", "script"])
+@pytest.mark.parametrize("value", [-1, 2.5, 2**53])
+def test_value_positive_integer(session, typ, value):
+ response = set_timeouts(session, {typ: value})
+ assert_error(response, "invalid argument")
+
+
+def test_set_all_fields(session):
+ timeouts = {"implicit": 10, "pageLoad": 20, "script": 30}
+ response = set_timeouts(session, timeouts)
+ assert_success(response)
+
+ assert session.timeouts.implicit == 10
+ assert session.timeouts.page_load == 20
+ assert session.timeouts.script == 30
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/user_prompts.py
new file mode 100644
index 00000000000..a98d87e9b2e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/user_prompts.py
@@ -0,0 +1,62 @@
+# META: timeout=long
+
+import pytest
+
+from tests.support.asserts import assert_success
+
+
+def set_timeouts(session, timeouts):
+ return session.transport.send(
+ "POST", "session/{session_id}/timeouts".format(**vars(session)),
+ timeouts)
+
+
+@pytest.fixture
+def check_user_prompt_not_closed(session, create_dialog):
+ def check_user_prompt_not_closed(dialog_type):
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = set_timeouts(session, {"script": 100})
+ assert_success(response)
+
+ assert session.alert.text == dialog_type
+ session.alert.dismiss()
+
+ assert session.timeouts.script == 100
+
+ return check_user_prompt_not_closed
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_accept(check_user_prompt_not_closed, dialog_type):
+ check_user_prompt_not_closed(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_accept_and_notify(check_user_prompt_not_closed, dialog_type):
+ check_user_prompt_not_closed(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_dismiss(check_user_prompt_not_closed, dialog_type):
+ check_user_prompt_not_closed(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_dismiss_and_notify(check_user_prompt_not_closed, dialog_type):
+ check_user_prompt_not_closed(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_ignore(check_user_prompt_not_closed, dialog_type):
+ check_user_prompt_not_closed(dialog_type)
+
+
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_default(check_user_prompt_not_closed, dialog_type):
+ check_user_prompt_not_closed(dialog_type)
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py b/tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py
index 44c76a96b09..2d305a0f3be 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/support/asserts.py
@@ -20,10 +20,10 @@ errors = {
"no such element": 404,
"no such frame": 404,
"no such window": 404,
- "script timeout": 408,
+ "script timeout": 500,
"session not created": 500,
"stale element reference": 404,
- "timeout": 408,
+ "timeout": 500,
"unable to set cookie": 500,
"unable to capture screen": 500,
"unexpected alert open": 500,
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/defaults.py b/tests/wpt/web-platform-tests/webdriver/tests/support/defaults.py
new file mode 100644
index 00000000000..c2020527a6f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/support/defaults.py
@@ -0,0 +1,8 @@
+SCRIPT_TIMEOUT = 30
+PAGE_LOAD_TIMEOUT = 300
+IMPLICIT_WAIT_TIMEOUT = 0
+
+WINDOW_SIZE = (800, 600)
+
+DRIVER_HOST = '127.0.0.1'
+DRIVER_PORT = 4444
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py b/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py
deleted file mode 100644
index 64427b4670f..00000000000
--- a/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py
+++ /dev/null
@@ -1,323 +0,0 @@
-from __future__ import print_function
-
-import copy
-import json
-import os
-import urlparse
-import re
-import sys
-
-import webdriver
-
-from tests.support.http_request import HTTPRequest
-from tests.support.wait import wait
-
-default_host = "http://127.0.0.1"
-default_port = "4444"
-
-default_script_timeout = 30
-default_page_load_timeout = 300
-default_implicit_wait_timeout = 0
-
-default_window_size = (800, 600)
-
-_current_session = None
-_custom_session = False
-
-
-def ignore_exceptions(f):
- def inner(*args, **kwargs):
- try:
- return f(*args, **kwargs)
- except webdriver.error.WebDriverException as e:
- print("Ignored exception %s" % e, file=sys.stderr)
- inner.__name__ = f.__name__
- return inner
-
-
-def cleanup_session(session):
- """Clean-up the current session for a clean state."""
- @ignore_exceptions
- def _dismiss_user_prompts(session):
- """Dismiss any open user prompts in windows."""
- current_window = session.window_handle
-
- for window in _windows(session):
- session.window_handle = window
- try:
- session.alert.dismiss()
- except webdriver.NoSuchAlertException:
- pass
-
- session.window_handle = current_window
-
- @ignore_exceptions
- def _ensure_valid_window(session):
- """If current window was closed, ensure to have a valid one selected."""
- try:
- session.window_handle
- except webdriver.NoSuchWindowException:
- session.window_handle = session.handles[0]
-
- @ignore_exceptions
- def _restore_timeouts(session):
- """Restore modified timeouts to their default values."""
- session.timeouts.implicit = default_implicit_wait_timeout
- session.timeouts.page_load = default_page_load_timeout
- session.timeouts.script = default_script_timeout
-
- @ignore_exceptions
- def _restore_window_state(session):
- """Reset window to an acceptable size.
-
- This also includes bringing it out of maximized, minimized,
- or fullscreened state.
- """
- session.window.size = default_window_size
-
- @ignore_exceptions
- def _restore_windows(session):
- """Close superfluous windows opened by the test.
-
- It will not end the session implicitly by closing the last window.
- """
- current_window = session.window_handle
-
- for window in _windows(session, exclude=[current_window]):
- session.window_handle = window
- if len(session.handles) > 1:
- session.close()
-
- session.window_handle = current_window
-
- _restore_timeouts(session)
- _ensure_valid_window(session)
- _dismiss_user_prompts(session)
- _restore_windows(session)
- _restore_window_state(session)
- _switch_to_top_level_browsing_context(session)
-
-
-@ignore_exceptions
-def _switch_to_top_level_browsing_context(session):
- """If the current browsing context selected by WebDriver is a
- `<frame>` or an `<iframe>`, switch it back to the top-level
- browsing context.
- """
- session.switch_frame(None)
-
-
-def _windows(session, exclude=None):
- """Set of window handles, filtered by an `exclude` list if
- provided.
- """
- if exclude is None:
- exclude = []
- wins = [w for w in session.handles if w not in exclude]
- return set(wins)
-
-
-def add_event_listeners(session):
- """Register listeners for tracked events on element."""
- def add_event_listeners(element, tracked_events):
- element.session.execute_script("""
- let element = arguments[0];
- let trackedEvents = arguments[1];
-
- if (!("events" in window)) {
- window.events = [];
- }
-
- for (var i = 0; i < trackedEvents.length; i++) {
- element.addEventListener(trackedEvents[i], function (event) {
- window.events.push(event.type);
- });
- }
- """, args=(element, tracked_events))
- return add_event_listeners
-
-
-def create_cookie(session, url):
- """Create a cookie"""
- def create_cookie(name, value, **kwargs):
- if kwargs.get("path", None) is not None:
- session.url = url(kwargs["path"])
-
- session.set_cookie(name, value, **kwargs)
- return session.cookies(name)
-
- return create_cookie
-
-
-def create_frame(session):
- """Create an `iframe` element in the current browsing context and insert it
- into the document. Return a reference to the newly-created element."""
- def create_frame():
- append = """
- var frame = document.createElement('iframe');
- document.body.appendChild(frame);
- return frame;
- """
- return session.execute_script(append)
-
- return create_frame
-
-
-def create_window(session):
- """Open new window and return the window handle."""
- def create_window():
- windows_before = session.handles
- name = session.execute_script("window.open()")
- assert len(session.handles) == len(windows_before) + 1
- new_windows = list(set(session.handles) - set(windows_before))
- return new_windows.pop()
- return create_window
-
-
-def http(configuration):
- return HTTPRequest(configuration["host"], configuration["port"])
-
-
-def server_config():
- return json.loads(os.environ.get("WD_SERVER_CONFIG"))
-
-
-def configuration():
- host = os.environ.get("WD_HOST", default_host)
- port = int(os.environ.get("WD_PORT", default_port))
- capabilities = json.loads(os.environ.get("WD_CAPABILITIES", "{}"))
-
- return {
- "host": host,
- "port": port,
- "capabilities": capabilities
- }
-
-
-def session(capabilities, configuration, request):
- """Create and start a session for a test that does not itself test session creation.
-
- By default the session will stay open after each test, but we always try to start a
- new one and assume that if that fails there is already a valid session. This makes it
- possible to recover from some errors that might leave the session in a bad state, but
- does not demand that we start a new session per test."""
- global _current_session
-
- # Update configuration capabilities with custom ones from the
- # capabilities fixture, which can be set by tests
- caps = copy.deepcopy(configuration["capabilities"])
- caps.update(capabilities)
- caps = {"alwaysMatch": caps}
-
- # If there is a session with different capabilities active, end it now
- if _current_session is not None and (
- caps != _current_session.requested_capabilities):
- _current_session.end()
- _current_session = None
-
- if _current_session is None:
- _current_session = webdriver.Session(
- configuration["host"],
- configuration["port"],
- capabilities=caps)
- try:
- _current_session.start()
- except webdriver.error.SessionNotCreatedException:
- if not _current_session.session_id:
- raise
-
- # Enforce a fixed default window size
- _current_session.window.size = default_window_size
-
- yield _current_session
-
- cleanup_session(_current_session)
-
-
-def current_session():
- return _current_session
-
-
-def url(server_config):
- def inner(path, protocol="http", query="", fragment=""):
- port = server_config["ports"][protocol][0]
- host = "%s:%s" % (server_config["browser_host"], port)
- return urlparse.urlunsplit((protocol, host, path, query, fragment))
-
- inner.__name__ = "url"
- return inner
-
-
-def create_dialog(session):
- """Create a dialog (one of "alert", "prompt", or "confirm") and provide a
- function to validate that the dialog has been "handled" (either accepted or
- dismissed) by returning some value."""
-
- def create_dialog(dialog_type, text=None):
- assert dialog_type in ("alert", "confirm", "prompt"), (
- "Invalid dialog type: '%s'" % dialog_type)
-
- if text is None:
- text = ""
-
- assert isinstance(text, basestring), "`text` parameter must be a string"
-
- # Script completes itself when the user prompt has been opened.
- # For prompt() dialogs, add a value for the 'default' argument,
- # as some user agents (IE, for example) do not produce consistent
- # values for the default.
- session.execute_async_script("""
- let dialog_type = arguments[0];
- let text = arguments[1];
-
- setTimeout(function() {
- if (dialog_type == 'prompt') {
- window.dialog_return_value = window[dialog_type](text, '');
- } else {
- window.dialog_return_value = window[dialog_type](text);
- }
- }, 0);
- """, args=(dialog_type, text))
-
- wait(session,
- lambda s: s.alert.text == text,
- "No user prompt with text '{}' detected".format(text),
- timeout=15,
- ignored_exceptions=webdriver.NoSuchAlertException)
-
- return create_dialog
-
-
-def clear_all_cookies(session):
- """Removes all cookies associated with the current active document"""
- session.transport.send("DELETE", "session/%s/cookie" % session.session_id)
-
-
-def closed_window(session, create_window):
- original_handle = session.window_handle
-
- new_handle = create_window()
- session.window_handle = new_handle
-
- session.close()
- assert new_handle not in session.handles, "Unable to close window {}".format(new_handle)
-
- yield new_handle
-
- session.window_handle = original_handle
-
-
-def is_element_in_viewport(session, element):
- """Check if element is outside of the viewport"""
- return session.execute_script("""
- let el = arguments[0];
-
- let rect = el.getBoundingClientRect();
- let viewport = {
- height: window.innerHeight || document.documentElement.clientHeight,
- width: window.innerWidth || document.documentElement.clientWidth,
- };
-
- return !(rect.right < 0 || rect.bottom < 0 ||
- rect.left > viewport.width || rect.top > viewport.height)
- """, args=(element,))
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/helpers.py b/tests/wpt/web-platform-tests/webdriver/tests/support/helpers.py
new file mode 100644
index 00000000000..b2db3e7b0d3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/support/helpers.py
@@ -0,0 +1,119 @@
+from __future__ import print_function
+
+import sys
+
+import webdriver
+
+from tests.support import defaults
+
+def ignore_exceptions(f):
+ def inner(*args, **kwargs):
+ try:
+ return f(*args, **kwargs)
+ except webdriver.error.WebDriverException as e:
+ print("Ignored exception %s" % e, file=sys.stderr)
+ inner.__name__ = f.__name__
+ return inner
+
+
+def cleanup_session(session):
+ """Clean-up the current session for a clean state."""
+ @ignore_exceptions
+ def _dismiss_user_prompts(session):
+ """Dismiss any open user prompts in windows."""
+ current_window = session.window_handle
+
+ for window in _windows(session):
+ session.window_handle = window
+ try:
+ session.alert.dismiss()
+ except webdriver.NoSuchAlertException:
+ pass
+
+ session.window_handle = current_window
+
+ @ignore_exceptions
+ def _ensure_valid_window(session):
+ """If current window was closed, ensure to have a valid one selected."""
+ try:
+ session.window_handle
+ except webdriver.NoSuchWindowException:
+ session.window_handle = session.handles[0]
+
+ @ignore_exceptions
+ def _restore_timeouts(session):
+ """Restore modified timeouts to their default values."""
+ session.timeouts.implicit = defaults.IMPLICIT_WAIT_TIMEOUT
+ session.timeouts.page_load = defaults.PAGE_LOAD_TIMEOUT
+ session.timeouts.script = defaults.SCRIPT_TIMEOUT
+
+ @ignore_exceptions
+ def _restore_window_state(session):
+ """Reset window to an acceptable size.
+
+ This also includes bringing it out of maximized, minimized,
+ or fullscreened state.
+ """
+ session.window.size = defaults.WINDOW_SIZE
+
+ @ignore_exceptions
+ def _restore_windows(session):
+ """Close superfluous windows opened by the test.
+
+ It will not end the session implicitly by closing the last window.
+ """
+ current_window = session.window_handle
+
+ for window in _windows(session, exclude=[current_window]):
+ session.window_handle = window
+ if len(session.handles) > 1:
+ session.close()
+
+ session.window_handle = current_window
+
+ _restore_timeouts(session)
+ _ensure_valid_window(session)
+ _dismiss_user_prompts(session)
+ _restore_windows(session)
+ _restore_window_state(session)
+ _switch_to_top_level_browsing_context(session)
+
+
+@ignore_exceptions
+def _switch_to_top_level_browsing_context(session):
+ """If the current browsing context selected by WebDriver is a
+ `<frame>` or an `<iframe>`, switch it back to the top-level
+ browsing context.
+ """
+ session.switch_frame(None)
+
+
+def _windows(session, exclude=None):
+ """Set of window handles, filtered by an `exclude` list if
+ provided.
+ """
+ if exclude is None:
+ exclude = []
+ wins = [w for w in session.handles if w not in exclude]
+ return set(wins)
+
+
+def clear_all_cookies(session):
+ """Removes all cookies associated with the current active document"""
+ session.transport.send("DELETE", "session/%s/cookie" % session.session_id)
+
+
+def is_element_in_viewport(session, element):
+ """Check if element is outside of the viewport"""
+ return session.execute_script("""
+ let el = arguments[0];
+
+ let rect = el.getBoundingClientRect();
+ let viewport = {
+ height: window.innerHeight || document.documentElement.clientHeight,
+ width: window.innerWidth || document.documentElement.clientWidth,
+ };
+
+ return !(rect.right < 0 || rect.bottom < 0 ||
+ rect.left > viewport.width || rect.top > viewport.height)
+ """, args=(element,))
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py b/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py
index 2f8fe9b79e3..3bf56c84bed 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py
@@ -2,14 +2,14 @@ import urllib
def inline(doc, doctype="html", mime="text/html;charset=utf-8", protocol="http"):
- from .fixtures import server_config, url
+ from ..conftest import server_config, url
build_url = url(server_config())
if doctype == "html":
mime = "text/html;charset=utf-8"
elif doctype == "xhtml":
mime = "application/xhtml+xml"
- doc = r"""<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ doc = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@@ -20,6 +20,9 @@ def inline(doc, doctype="html", mime="text/html;charset=utf-8", protocol="http")
{}
</body>
</html>""".format(doc)
+ elif doctype == "xml":
+ mime = "text/xml"
+ doc = """<?xml version="1.0" encoding="UTF-8"?>{}""".format(doc)
query = {"doc": doc}
if mime != "text/html;charset=utf8":
@@ -41,8 +44,8 @@ def main(request, response):
rv = 404, [("Content-Type", "text/plain")], "Missing doc parameter in query"
else:
response.headers.update([
- ("Content-Type", content_type),
- ("X-XSS-Protection", "0")
+ ("Content-Type", content_type),
+ ("X-XSS-Protection", "0")
])
rv = doc
return rv
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/__init__.py
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/screenshot.py b/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/screenshot.py
new file mode 100644
index 00000000000..e4d2869af4f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/screenshot.py
@@ -0,0 +1,40 @@
+import base64
+import imghdr
+
+from tests.support.asserts import assert_error, assert_success
+from tests.support.inline import inline
+
+
+def take_element_screenshot(session, element_id):
+ return session.transport.send(
+ "GET",
+ "session/{session_id}/element/{element_id}/screenshot".format(
+ session_id=session.session_id,
+ element_id=element_id,
+ )
+ )
+
+
+def test_no_browsing_context(session, closed_window):
+ response = take_element_screenshot(session, "foo")
+ assert_error(response, "no such window")
+
+
+def test_screenshot(session):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+
+ response = take_element_screenshot(session, element.id)
+ value = assert_success(response)
+
+ image = base64.decodestring(value)
+ assert imghdr.what("", image) == "png"
+
+
+def test_stale(session):
+ session.url = inline("<input>")
+ element = session.find.css("input", all=False)
+ session.refresh()
+
+ result = take_element_screenshot(session, element.id)
+ assert_error(result, "stale element reference")
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/user_prompts.py
new file mode 100644
index 00000000000..fa239999e4f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/user_prompts.py
@@ -0,0 +1,74 @@
+# META: timeout=long
+
+import base64
+import imghdr
+
+import pytest
+
+from tests.support.asserts import assert_success
+from tests.support.inline import inline
+
+
+def take_element_screenshot(session, element_id):
+ return session.transport.send(
+ "GET",
+ "session/{session_id}/element/{element_id}/screenshot".format(
+ session_id=session.session_id,
+ element_id=element_id,
+ )
+ )
+
+
+@pytest.fixture
+def check_user_prompt_not_closed_without_exception(session, create_dialog):
+ def check_user_prompt_not_closed_without_exception(dialog_type):
+ session.url = inline("<input/>")
+ element = session.find.css("input", all=False)
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = take_element_screenshot(session, element.id)
+ value = assert_success(response)
+
+ image = base64.decodestring(value)
+ assert imghdr.what("", image) == "png"
+
+ assert session.alert.text == dialog_type
+ session.alert.dismiss()
+
+ return check_user_prompt_not_closed_without_exception
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_accept(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_accept_and_notify(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_dismiss(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_dismiss_and_notify(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_ignore(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_default(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/__init__.py
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/screenshot.py b/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/screenshot.py
new file mode 100644
index 00000000000..d3153710f7b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/screenshot.py
@@ -0,0 +1,25 @@
+import base64
+import imghdr
+
+from tests.support.asserts import assert_error, assert_success
+from tests.support.inline import inline
+
+
+def take_screenshot(session):
+ return session.transport.send(
+ "GET", "session/{session_id}/screenshot".format(**vars(session)))
+
+
+def test_no_browsing_context(session, closed_window):
+ response = take_screenshot(session)
+ assert_error(response, "no such window")
+
+
+def test_screenshot(session):
+ session.url = inline("<input>")
+
+ response = take_screenshot(session)
+ value = assert_success(response)
+
+ image = base64.decodestring(value)
+ assert imghdr.what("", image) == "png"
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/user_prompts.py
new file mode 100644
index 00000000000..4d4840f08ba
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/user_prompts.py
@@ -0,0 +1,68 @@
+# META: timeout=long
+
+import base64
+import imghdr
+
+import pytest
+
+from tests.support.asserts import assert_success
+from tests.support.inline import inline
+
+
+def take_screenshot(session):
+ return session.transport.send(
+ "GET", "session/{session_id}/screenshot".format(**vars(session)))
+
+
+@pytest.fixture
+def check_user_prompt_not_closed_without_exception(session, create_dialog):
+ def check_user_prompt_not_closed_without_exception(dialog_type):
+ session.url = inline("<input/>")
+
+ create_dialog(dialog_type, text=dialog_type)
+
+ response = take_screenshot(session)
+ value = assert_success(response)
+
+ image = base64.decodestring(value)
+ assert imghdr.what("", image) == "png"
+
+ assert session.alert.text == dialog_type
+ session.alert.dismiss()
+
+ return check_user_prompt_not_closed_without_exception
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_accept(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_accept_and_notify(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_dismiss(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_dismiss_and_notify(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"})
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_ignore(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
+
+
+@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"])
+def test_default(check_user_prompt_not_closed_without_exception, dialog_type):
+ check_user_prompt_not_closed_without_exception(dialog_type)
diff --git a/tests/wpt/web-platform-tests/webrtc/RTCConfiguration-iceServers.html b/tests/wpt/web-platform-tests/webrtc/RTCConfiguration-iceServers.html
index 42bc896349c..6069c25af4a 100644
--- a/tests/wpt/web-platform-tests/webrtc/RTCConfiguration-iceServers.html
+++ b/tests/wpt/web-platform-tests/webrtc/RTCConfiguration-iceServers.html
@@ -85,19 +85,6 @@
config_test(makePc => {
const pc = makePc({ iceServers: [{
- urls: []
- }] });
-
- const { iceServers } = pc.getConfiguration();
- assert_equals(iceServers.length, 1);
-
- const server = iceServers[0];
- assert_array_equals(server.urls, []);
- assert_equals(server.credentialType, 'password');
- }, 'with empty list urls should succeed');
-
- config_test(makePc => {
- const pc = makePc({ iceServers: [{
urls: 'stun:stun1.example.net'
}] });
@@ -322,32 +309,11 @@
}, 'with invalid stun url should throw SyntaxError');
config_test(makePc => {
- const pc = makePc({ iceServers: [{
- urls: [],
- credentialType: 'password'
- }] });
-
- const { iceServers } = pc.getConfiguration();
- assert_equals(iceServers.length, 1);
-
- const server = iceServers[0];
- assert_array_equals(server.urls, []);
- assert_equals(server.credentialType, 'password');
- }, `with empty urls and credentialType password should succeed`);
-
- config_test(makePc => {
- const pc = makePc({ iceServers: [{
- urls: [],
- credentialType: 'oauth'
- }] });
-
- const { iceServers } = pc.getConfiguration();
- assert_equals(iceServers.length, 1);
-
- const server = iceServers[0];
- assert_array_equals(server.urls, []);
- assert_equals(server.credentialType, 'oauth');
- }, `with empty urls and credentialType oauth should succeed`);
+ assert_throws('SyntaxError', () =>
+ makePc({ iceServers: [{
+ urls: []
+ }] }));
+ }, `with empty urls should throw SyntaxError`);
config_test(makePc => {
assert_throws(new TypeError(), () =>
diff --git a/tests/wpt/web-platform-tests/webrtc/RTCIceTransport-extension.https.html b/tests/wpt/web-platform-tests/webrtc/RTCIceTransport-extension.https.html
index 88a10bb464e..9c6cec7e1e4 100644
--- a/tests/wpt/web-platform-tests/webrtc/RTCIceTransport-extension.https.html
+++ b/tests/wpt/web-platform-tests/webrtc/RTCIceTransport-extension.https.html
@@ -17,7 +17,7 @@ function makeIceTransport(t) {
test(() => {
const iceTransport = new RTCIceTransport();
-}, 'RTCIceTransport constructor does not throw.');
+}, 'RTCIceTransport constructor does not throw');
test(() => {
const iceTransport = new RTCIceTransport();
@@ -35,7 +35,7 @@ test(() => {
'Expect local parameters generated');
assert_equals(iceTransport.getRemoteParameters(), null,
'Expect no remote parameters');
-}, 'RTCIceTransport initial properties are set.');
+}, 'RTCIceTransport initial properties are set');
test(t => {
const iceTransport = makeIceTransport(t);
@@ -125,4 +125,147 @@ promise_test(async t => {
}, `gather() returns no candidates with { gatherPolicy: 'relay'} and no turn` +
' servers');
+const dummyRemoteParameters = {
+ usernameFragment: 'dummyUsernameFragment',
+ password: 'dummyPassword',
+};
+
+test(() => {
+ const iceTransport = new RTCIceTransport();
+ iceTransport.stop();
+ assert_throws('InvalidStateError',
+ () => iceTransport.start(dummyRemoteParameters));
+ assert_equals(iceTransport.getRemoteParameters(), null);
+}, `start() throws if closed`);
+
+test(() => {
+ const iceTransport = new RTCIceTransport();
+ assert_throws(new TypeError(), () => iceTransport.start({}));
+ assert_throws(new TypeError(),
+ () => iceTransport.start({ usernameFragment: 'dummy' }));
+ assert_throws(new TypeError(),
+ () => iceTransport.start({ password: 'dummy' }));
+ assert_equals(iceTransport.getRemoteParameters(), null);
+}, 'start() throws if usernameFragment or password not set');
+
+const assert_ice_parameters_equals = (a, b) => {
+ assert_equals(a.usernameFragment, b.usernameFragment,
+ 'usernameFragments are equal');
+ assert_equals(a.password, b.password, 'passwords are equal');
+};
+
+test(t => {
+ const iceTransport = makeIceTransport(t);
+ iceTransport.start(dummyRemoteParameters);
+ assert_equals(iceTransport.state, 'new');
+ assert_ice_parameters_equals(iceTransport.getRemoteParameters(),
+ dummyRemoteParameters);
+}, `start() does not transition state to 'checking' if no remote candidates ` +
+ 'added');
+
+test(t => {
+ const iceTransport = makeIceTransport(t);
+ iceTransport.start(dummyRemoteParameters);
+ assert_equals(iceTransport.role, 'controlled');
+}, `start() with default role sets role attribute to 'controlled'`);
+
+test(t => {
+ const iceTransport = makeIceTransport(t);
+ iceTransport.start(dummyRemoteParameters, 'controlling');
+ assert_equals(iceTransport.role, 'controlling');
+}, `start() sets role attribute to 'controlling'`);
+
+const candidate1 = new RTCIceCandidate({
+ candidate: 'candidate:1 1 udp 2113929471 203.0.113.100 10100 typ host',
+});
+
+test(() => {
+ const iceTransport = new RTCIceTransport();
+ iceTransport.stop();
+ assert_throws('InvalidStateError',
+ () => iceTransport.addRemoteCandidate(candidate1));
+ assert_array_equals(iceTransport.getRemoteCandidates(), []);
+}, 'addRemoteCandidate() throws if closed');
+
+test(() => {
+ const iceTransport = new RTCIceTransport();
+ assert_throws('OperationError',
+ () => iceTransport.addRemoteCandidate(
+ new RTCIceCandidate({ candidate: 'invalid' })));
+ assert_array_equals(iceTransport.getRemoteCandidates(), []);
+}, 'addRemoteCandidate() throws on invalid candidate');
+
+test(t => {
+ const iceTransport = makeIceTransport(t);
+ iceTransport.addRemoteCandidate(candidate1);
+ iceTransport.start(dummyRemoteParameters);
+ assert_equals(iceTransport.state, 'checking');
+ assert_array_equals(iceTransport.getRemoteCandidates(), [candidate1]);
+}, `start() transitions state to 'checking' if one remote candidate had been ` +
+ 'added');
+
+test(t => {
+ const iceTransport = makeIceTransport(t);
+ iceTransport.start(dummyRemoteParameters);
+ iceTransport.addRemoteCandidate(candidate1);
+ assert_equals(iceTransport.state, 'checking');
+ assert_array_equals(iceTransport.getRemoteCandidates(), [candidate1]);
+}, `addRemoteCandidate() transitions state to 'checking' if start() had been ` +
+ 'called before');
+
+test(t => {
+ const iceTransport = makeIceTransport(t);
+ iceTransport.start(dummyRemoteParameters);
+ assert_throws('InvalidStateError',
+ () => iceTransport.start(dummyRemoteParameters, 'controlling'));
+}, 'start() throws if later called with a different role');
+
+test(t => {
+ const iceTransport = makeIceTransport(t);
+ iceTransport.start({
+ usernameFragment: 'user',
+ password: 'pass',
+ });
+ iceTransport.addRemoteCandidate(candidate1);
+ const changedRemoteParameters = {
+ usernameFragment: 'user2',
+ password: 'pass',
+ };
+ iceTransport.start(changedRemoteParameters);
+ assert_equals(iceTransport.state, 'new');
+ assert_array_equals(iceTransport.getRemoteCandidates(), []);
+ assert_ice_parameters_equals(iceTransport.getRemoteParameters(),
+ changedRemoteParameters);
+}, `start() flushes remote candidates and transitions state to 'new' if ` +
+ 'later called with different remote parameters');
+
+promise_test(async t => {
+ const localTransport = makeIceTransport(t);
+ const remoteTransport = makeIceTransport(t);
+ localTransport.onicecandidate = e => {
+ if (e.candidate) {
+ remoteTransport.addRemoteCandidate(e.candidate);
+ }
+ };
+ remoteTransport.onicecandidate = e => {
+ if (e.candidate) {
+ localTransport.addRemoteCandidate(e.candidate);
+ }
+ };
+ localTransport.gather({});
+ remoteTransport.gather({});
+ localTransport.start(remoteTransport.getLocalParameters(), 'controlling');
+ remoteTransport.start(localTransport.getLocalParameters(), 'controlled');
+ const localWatcher = new EventWatcher(t, localTransport, 'statechange');
+ const remoteWatcher = new EventWatcher(t, remoteTransport, 'statechange');
+ await Promise.all([
+ localWatcher.wait_for('statechange').then(() => {
+ assert_equals(localTransport.state, 'connected');
+ }),
+ remoteWatcher.wait_for('statechange').then(() => {
+ assert_equals(remoteTransport.state, 'connected');
+ }),
+ ]);
+}, 'Two RTCIceTransports connect to each other');
+
</script>
diff --git a/tests/wpt/web-platform-tests/webrtc/RTCQuicStream.https.html b/tests/wpt/web-platform-tests/webrtc/RTCQuicStream.https.html
new file mode 100644
index 00000000000..1e08016d75a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webrtc/RTCQuicStream.https.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>RTCQuicStream.https.html</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="RTCQuicTransport-helper.js"></script>
+<script>
+'use strict';
+
+// These tests are based on the following specification:
+// https://w3c.github.io/webrtc-quic/
+
+// The following helper functions are called from RTCQuicTransport-helper.js:
+// makeQuicTransport
+
+test(t => {
+ const quicTransport = makeQuicTransport(t, []);
+ const quicStream = quicTransport.createStream();
+ assert_equals(quicStream.transport, quicTransport,
+ 'Expect transport to be set to the creating RTCQuicTransport.');
+ assert_equals(quicStream.state, 'new', `Expect state to be 'new'.`);
+ assert_equals(quicStream.readBufferedAmount, 0,
+ 'Expect read buffered amount to be 0.');
+ assert_equals(quicStream.writeBufferedAmount, 0,
+ 'Expect write buffered amount to be 0.');
+}, 'createStream() returns an RTCQuicStream with initial properties set.');
+
+test(t => {
+ const quicTransport = makeQuicTransport(t, []);
+ quicTransport.stop();
+ assert_throws('InvalidStateError', () => quicTransport.createStream());
+}, 'createStream() throws if the transport is closed.');
+
+test(t => {
+ const quicTransport = makeQuicTransport(t, []);
+ const firstQuicStream = quicTransport.createStream();
+ const secondQuicStream = quicTransport.createStream();
+ quicTransport.stop();
+ assert_equals(firstQuicStream.state, 'closed');
+ assert_equals(secondQuicStream.state, 'closed');
+}, 'RTCQuicTransport.stop() closes all streams.');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/webrtc/RTCQuicTransport-helper.js b/tests/wpt/web-platform-tests/webrtc/RTCQuicTransport-helper.js
new file mode 100644
index 00000000000..50d9e6666a2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webrtc/RTCQuicTransport-helper.js
@@ -0,0 +1,10 @@
+'use strict';
+
+function makeQuicTransport(t, certificates) {
+ const iceTransport = new RTCIceTransport();
+ t.add_cleanup(() => iceTransport.stop());
+ const quicTransport = new RTCQuicTransport(iceTransport, certificates);
+ t.add_cleanup(() => quicTransport.stop());
+ return quicTransport;
+}
+
diff --git a/tests/wpt/web-platform-tests/webrtc/RTCQuicTransport.https.html b/tests/wpt/web-platform-tests/webrtc/RTCQuicTransport.https.html
new file mode 100644
index 00000000000..703f424a638
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webrtc/RTCQuicTransport.https.html
@@ -0,0 +1,91 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>RTCQuicTransport.https.html</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="RTCQuicTransport-helper.js"></script>
+<script>
+'use strict';
+
+// These tests are based on the following specification:
+// https://w3c.github.io/webrtc-quic/
+
+// The following helper functions are called from RTCQuicTransport-helper.js:
+// makeQuicTransport
+
+function generateCertificate(keygenAlgorithm) {
+ return RTCPeerConnection.generateCertificate({
+ name: 'ECDSA',
+ namedCurve: 'P-256',
+ ...keygenAlgorithm,
+ });
+}
+
+test(t => {
+ // Don't use the makeQuicTransport helper so that the transport property can
+ // be verified.
+ const iceTransport = new RTCIceTransport();
+ const quicTransport = new RTCQuicTransport(iceTransport, []);
+ t.add_cleanup(() => {
+ quicTransport.stop();
+ iceTransport.stop();
+ });
+ assert_equals(quicTransport.transport, iceTransport,
+ 'Expect transport to be the same as the one passed in the constructor.');
+ assert_equals(quicTransport.state, 'new', `Expect state to be 'new'.`);
+ assert_object_equals(quicTransport.getLocalParameters(),
+ { role: 'auto', fingerprints: [] },
+ 'Expect local parameters to be initialized.');
+ assert_equals(quicTransport.getRemoteParameters(), null,
+ 'Expect no remote parameters.');
+ assert_array_equals(quicTransport.getCertificates(), [],
+ 'Expect not certificates.');
+ assert_array_equals(quicTransport.getRemoteCertificates(), [],
+ 'Expect no remote certificates.');
+}, 'RTCQuicTransport initial properties are set.');
+
+promise_test(async t => {
+ const [ firstCertificate, secondCertificate ] =
+ await Promise.all([ generateCertificate(), generateCertificate() ]);
+ const quicTransport =
+ makeQuicTransport(t, [ firstCertificate, secondCertificate ]);
+ assert_array_equals(quicTransport.getCertificates(),
+ [ firstCertificate, secondCertificate ]);
+}, 'getCertificates() returns the certificates passed in the constructor.');
+
+promise_test(async t => {
+ const [ firstCertificate, secondCertificate ] =
+ await Promise.all([ generateCertificate(), generateCertificate() ]);
+ const quicTransport =
+ makeQuicTransport(t, [ firstCertificate, secondCertificate ]);
+ assert_object_equals(quicTransport.getLocalParameters(), {
+ role: 'auto',
+ fingerprints: [ firstCertificate.getFingerprints()[0],
+ secondCertificate.getFingerprints()[0] ],
+ });
+ assert_array_equals(quicTransport.getCertificates(),
+ [ firstCertificate, secondCertificate ]);
+}, 'getLocalParameters() has fingerprints for all certificates passed in the ' +
+ 'constructor.');
+
+promise_test(async t => {
+ const expiredCertificate = await generateCertificate({ expires: 0 });
+ assert_throws(new TypeError(),
+ () => makeQuicTransport(t, [ expiredCertificate ]));
+}, 'RTCQuicTransport constructor throws if passed an expired certificate.');
+
+test(t => {
+ const iceTransport = new RTCIceTransport();
+ iceTransport.stop();
+ assert_throws('InvalidStateError',
+ () => new RTCQuicTransport(iceTransport, []));
+}, 'RTCQuicTransport constructor throws if passed a closed RTCIceTransport.');
+
+test(t => {
+ const quicTransport = makeQuicTransport(t, []);
+ quicTransport.stop();
+ assert_equals(quicTransport.state, 'closed');
+}, `stop() changes state to 'closed'.`);
+
+</script>
+
diff --git a/tests/wpt/web-platform-tests/webrtc/no-media-call.html b/tests/wpt/web-platform-tests/webrtc/no-media-call.html
index c4979e85214..8f4f5962d4a 100644
--- a/tests/wpt/web-platform-tests/webrtc/no-media-call.html
+++ b/tests/wpt/web-platform-tests/webrtc/no-media-call.html
@@ -37,9 +37,9 @@ This test uses the legacy callback API with no media, and thus does not require
var parsedOffer = new RTCSessionDescription({ type: 'offer',
sdp: offerSdp });
// These functions use the legacy interface extensions to RTCPeerConnection.
- gSecondConnection.setRemoteDescription(parsedOffer,
+ gSecondConnection.setRemoteDescription(parsedOffer).then(
function() {
- gSecondConnection.createAnswer(onAnswerCreated,
+ gSecondConnection.createAnswer().then(onAnswerCreated,
failed('createAnswer'));
},
failed('setRemoteDescription second'));
@@ -56,7 +56,7 @@ This test uses the legacy callback API with no media, and thus does not require
function handleAnswer(answerSdp) {
var parsedAnswer = new RTCSessionDescription({ type: 'answer',
sdp: answerSdp });
- gFirstConnection.setRemoteDescription(parsedAnswer, ignoreSuccess,
+ gFirstConnection.setRemoteDescription(parsedAnswer).then(ignoreSuccess,
failed('setRemoteDescription first'));
};
@@ -125,8 +125,8 @@ This test uses the legacy callback API with no media, and thus does not require
// The offerToReceiveVideo is necessary and sufficient to make
// an actual connection.
- gFirstConnection.createOffer(onOfferCreated, failed('createOffer'),
- {offerToReceiveVideo: true});
+ gFirstConnection.createOffer({offerToReceiveVideo: true})
+ .then(onOfferCreated, failed('createOffer'));
});
</script>
diff --git a/tests/wpt/web-platform-tests/webrtc/simplecall.https.html b/tests/wpt/web-platform-tests/webrtc/simplecall.https.html
index 6adefe77492..681c42d4cd8 100644
--- a/tests/wpt/web-platform-tests/webrtc/simplecall.https.html
+++ b/tests/wpt/web-platform-tests/webrtc/simplecall.https.html
@@ -36,7 +36,7 @@
localStream.getTracks().forEach(function(track) {
gFirstConnection.addTrack(track, localStream);
});
- gFirstConnection.createOffer(onOfferCreated, failed('createOffer'));
+ gFirstConnection.createOffer().then(onOfferCreated, failed('createOffer'));
var videoTag = document.getElementById('local-view');
videoTag.srcObject = localStream;
@@ -59,7 +59,7 @@
sdp: offerSdp });
gSecondConnection.setRemoteDescription(parsedOffer);
- gSecondConnection.createAnswer(onAnswerCreated,
+ gSecondConnection.createAnswer().then(onAnswerCreated,
failed('createAnswer'));
};
diff --git a/tests/wpt/web-platform-tests/websockets/cookies/006.html b/tests/wpt/web-platform-tests/websockets/cookies/006.html
index 7e975879a35..0e958d25e5d 100644
--- a/tests/wpt/web-platform-tests/websockets/cookies/006.html
+++ b/tests/wpt/web-platform-tests/websockets/cookies/006.html
@@ -7,6 +7,9 @@
<meta name="variant" content="?wss">
<div id=log></div>
<script>
+// This test doesn't work as originally intended, because an insecure page
+// cannot set a secure cookie. See 006.https.html for a working version. This
+// version is retained for historical purposes.
var cookie_id = ((new Date())-0) + '.' + Math.random();
async_test(function(t) {
if (window.WebSocket) {
@@ -19,11 +22,8 @@ async_test(function(t) {
var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo-cookie');
ws.onmessage = t.step_func(function(e) {
ws.close();
- if (SCHEME_DOMAIN_PORT.substr(0,3) == 'wss') {
- assert_regexp_match(e.data, new RegExp('ws_test_'+cookie_id+'=test'));
- } else {
- assert_false(new RegExp('ws_test_'+cookie_id+'=test').test(e.data));
- }
+ assert_equals(e.data.indexOf('ws_test_'+cookie_id+'=test'), -1,
+ 'cookie should not have been set');
t.done();
})
ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
diff --git a/tests/wpt/web-platform-tests/websockets/cookies/006.https.html b/tests/wpt/web-platform-tests/websockets/cookies/006.https.html
new file mode 100644
index 00000000000..015eeb22f07
--- /dev/null
+++ b/tests/wpt/web-platform-tests/websockets/cookies/006.https.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<title>WebSockets: setting Secure cookie with document.cookie, checking ws request</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src=../constants.js?pipe=sub></script>
+<!--
+There's no "ws:" scheme variant of this test because mixed-content checks
+won't permit creating an insecure WebSocket on a secure page.
+-->
+<meta name="variant" content="?wss">
+<div id=log></div>
+<script>
+var cookie_id = ((new Date())-0) + '.' + Math.random();
+async_test(function(t) {
+ if (window.WebSocket) {
+ document.cookie = 'ws_test_'+cookie_id+'=test; Path=/; Secure';
+ }
+ t.add_cleanup(function() {
+ // remove cookie
+ document.cookie = 'ws_test_'+cookie_id+'=; Path=/; Secure; Expires=Sun, 06 Nov 1994 08:49:37 GMT';
+ });
+ var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo-cookie');
+ ws.onmessage = t.step_func(function(e) {
+ ws.close();
+ var cookie_was_seen = e.data.indexOf('ws_test_'+cookie_id+'=test') != -1;
+ if (SCHEME_DOMAIN_PORT.substr(0,3) == 'wss') {
+ assert_true(cookie_was_seen,
+ 'cookie should have been visible to wss');
+ } else {
+ assert_false(cookie_was_seen,
+ 'cookie should not have been visible to ws');
+ }
+ t.done();
+ })
+ ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/webusb/resources/open-in-iframe.html b/tests/wpt/web-platform-tests/webusb/resources/open-in-iframe.html
index 0b04a3e03aa..ec80bff3c23 100644
--- a/tests/wpt/web-platform-tests/webusb/resources/open-in-iframe.html
+++ b/tests/wpt/web-platform-tests/webusb/resources/open-in-iframe.html
@@ -1,4 +1,5 @@
<!DOCTYPE html>
+<script src="usb-helpers.js"></script>
<script>
'use strict';
window.onmessage = messageEvent => {
diff --git a/tests/wpt/web-platform-tests/webusb/resources/open-in-worker.js b/tests/wpt/web-platform-tests/webusb/resources/open-in-worker.js
new file mode 100644
index 00000000000..b715184e04d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webusb/resources/open-in-worker.js
@@ -0,0 +1,15 @@
+importScripts('/webusb/resources/usb-helpers.js');
+'use strict';
+
+onmessage = messageEvent => {
+ if (messageEvent.data.type === 'Ready') {
+ navigator.usb.addEventListener('connect', connectEvent => {
+ connectEvent.device.open().then(() => {
+ postMessage({ type: 'Success' });
+ }).catch(error => {
+ postMessage({ type: `FAIL: open rejected ${error}` });
+ });
+ });
+ postMessage({ type: 'Ready' });
+ }
+}; \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/webusb/resources/usb-helpers.js b/tests/wpt/web-platform-tests/webusb/resources/usb-helpers.js
index 93740920dee..a3a4a31ba88 100644
--- a/tests/wpt/web-platform-tests/webusb/resources/usb-helpers.js
+++ b/tests/wpt/web-platform-tests/webusb/resources/usb-helpers.js
@@ -8,6 +8,29 @@
// these tests the browser must be run with these options:
//
// --enable-blink-features=MojoJS,MojoJSTest
+
+(() => {
+ // Load scripts needed by the test API on context creation.
+ if ('MojoInterfaceInterceptor' in self) {
+ let prefix = '/resources/chromium';
+ if ('window' in self) {
+ if (window.location.pathname.includes('/LayoutTests/')) {
+ let root = window.location.pathname.match(/.*LayoutTests/);
+ prefix = `${root}/external/wpt/resources/chromium`;
+ }
+ }
+ let scriptPath = `${prefix}/webusb-child-test.js`;
+ if (typeof document == 'undefined') {
+ importScripts(scriptPath);
+ } else {
+ let script = document.createElement('script');
+ script.src = scriptPath;
+ script.async = false;
+ document.head.appendChild(script);
+ }
+ }
+})();
+
let loadChromiumResources = Promise.resolve().then(() => {
if (!('MojoInterfaceInterceptor' in self)) {
// Do nothing on non-Chromium-based browsers or when the Mojo bindings are
diff --git a/tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html b/tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html
index 3a8a9183591..97e66b2a373 100644
--- a/tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html
+++ b/tests/wpt/web-platform-tests/webusb/usb-disabled-by-feature-policy.https.sub.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<body>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/feature-policy/resources/featurepolicy.js></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/feature-policy/resources/featurepolicy.js"></script>
<script>
'use strict';
const sub = 'https://{{domains[www]}}:{{ports[https][0]}}';
@@ -19,7 +19,16 @@ promise_test(() => {
}, error => {
assert_equals(error.name, 'SecurityError');
});
-}, header + ' disallows the top-level document.');
+}, header + ' disallows getDevices in the top-level document.');
+
+promise_test(async () => {
+ try {
+ await navigator.usb.requestDevice({ filters: [] });
+ assert_unreached('expected promise to reject with SecurityError');
+ } catch(error) {
+ assert_equals(error.name, 'SecurityError');
+ }
+}, header + ' disallows requestDevice in the top-level document.');
async_test(t => {
test_feature_availability('usb.getDevices()', t, same_origin_src,
diff --git a/tests/wpt/web-platform-tests/webusb/usb.https.window.js b/tests/wpt/web-platform-tests/webusb/usb.https.window.js
index ee26619cf22..8c9e676cdfc 100644
--- a/tests/wpt/web-platform-tests/webusb/usb.https.window.js
+++ b/tests/wpt/web-platform-tests/webusb/usb.https.window.js
@@ -60,7 +60,8 @@ usb_test(() => {
usb_test(() => {
const expectedFilters = [
{ vendorId: 1234, classCode: 0xFF, serialNumber: "123ABC" },
- { vendorId: 5678, productId: 0xF00F }
+ { vendorId: 5678, productId: 0xF00F },
+ { vendorId: 9012, classCode: 0xFF, subclassCode: 0xEE, protocolCode: 0xDD },
];
navigator.usb.test.onrequestdevice = event => {
@@ -77,7 +78,8 @@ usb_test(() => {
return callWithTrustedClick(() => {
return navigator.usb.requestDevice({ filters: expectedFilters })
.then(device => {
- assert_unreachable('requestDevice should reject because no device selected');
+ assert_unreached(
+ 'requestDevice should reject because no device selected');
})
.catch(error => {
assert_equals(error.code, DOMException.NOT_FOUND_ERR);
@@ -85,6 +87,26 @@ usb_test(() => {
});
}, 'filters are sent correctly');
+usb_test(async () => {
+ const badFilters = [
+ { productId: 1234 }, // productId requires vendorId
+ { subclassCode: 5678 }, // subclassCode requires classCode
+ { protocolCode: 9012 }, // protocolCode requires subclassCode
+ ];
+
+ for (const filter of badFilters) {
+ await callWithTrustedClick(async () => {
+ try {
+ await navigator.usb.requestDevice({ filters: [filter] });
+ assert_unreached(
+ 'requestDevice should reject because of invalid filters');
+ } catch (error) {
+ assert_equals(error.name, 'TypeError');
+ }
+ });
+ }
+}, 'requestDevice rejects on invalid filters');
+
usb_test(() => {
return getFakeDevice().then(({ device, fakeDevice }) => {
navigator.usb.test.onrequestdevice = event => {
diff --git a/tests/wpt/web-platform-tests/webusb/usbAlternateInterface.https.any.js b/tests/wpt/web-platform-tests/webusb/usbAlternateInterface.https.any.js
new file mode 100644
index 00000000000..e5ef3844ae4
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webusb/usbAlternateInterface.https.any.js
@@ -0,0 +1,33 @@
+// META: script=/webusb/resources/fake-devices.js
+// META: script=/webusb/resources/usb-helpers.js
+'use strict';
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ let configuration = new USBConfiguration(
+ device, device.configurations[1].configurationValue);
+ let usbInterface = new USBInterface(
+ configuration, configuration.interfaces[0].interfaceNumber);
+ let alternateInterface = new USBAlternateInterface(
+ usbInterface, usbInterface.alternates[1].alternateSetting);
+ assertDeviceInfoEquals(
+ alternateInterface,
+ fakeDeviceInit.configurations[1].interfaces[0].alternates[1]);
+}, 'Can construct a USBAlternateInterface.');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ let configuration = new USBConfiguration(
+ device, device.configurations[1].configurationValue);
+ let usbInterface = new USBInterface(
+ configuration, configuration.interfaces[0].interfaceNumber);
+ try {
+ let alternateInterface = new USBAlternateInterface(
+ usbInterface, usbInterface.alternates.length);
+ assert_unreached(
+ 'USBAlternateInterface should reject an invalid alternate setting');
+ } catch (error) {
+ assert_equals(error.name, 'RangeError');
+ }
+}, 'Constructing a USBAlternateInterface with an invalid alternate setting ' +
+ 'throws a range error.');
diff --git a/tests/wpt/web-platform-tests/webusb/usbConfiguration.https.any.js b/tests/wpt/web-platform-tests/webusb/usbConfiguration.https.any.js
new file mode 100644
index 00000000000..e7d1c7fb146
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webusb/usbConfiguration.https.any.js
@@ -0,0 +1,23 @@
+// META: script=/webusb/resources/fake-devices.js
+// META: script=/webusb/resources/usb-helpers.js
+'use strict';
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ let configuration = new USBConfiguration(
+ device, device.configurations[1].configurationValue);
+ assertDeviceInfoEquals(configuration, fakeDeviceInit.configurations[1]);
+}, 'Can construct a USBConfiguration.');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ try {
+ let configuration =
+ new USBConfiguration(device, device.configurations.length + 1);
+ assert_unreached(
+ 'USBConfiguration should reject an invalid configuration value');
+ } catch (error) {
+ assert_equals(error.name, 'RangeError');
+ }
+}, 'Constructing a USBConfiguration with an invalid configuration value ' +
+ 'throws a range error.');
diff --git a/tests/wpt/web-platform-tests/webusb/usbDevice-iframe.https.html b/tests/wpt/web-platform-tests/webusb/usbDevice-iframe.https.html
index 02b2c5010fb..75bad9e0c9f 100644
--- a/tests/wpt/web-platform-tests/webusb/usbDevice-iframe.https.html
+++ b/tests/wpt/web-platform-tests/webusb/usbDevice-iframe.https.html
@@ -6,46 +6,39 @@
<script>
'use strict';
-function runIframeDisconnectTest(onDeviceConnected) {
- return new Promise((resolve, reject) => {
- let opened = false;
+async function connectInIframe() {
+ let iframe = document.createElement('iframe');
+ let opened = false;
- let iframe = document.createElement('iframe');
- iframe.src = 'resources/open-in-iframe.html';
- iframe.onload = () => {
- navigator.usb.test.attachToWindow(iframe.contentWindow).then(() => {
- iframe.contentWindow.postMessage('Ready', '*');
- });
- };
+ iframe.src = 'resources/open-in-iframe.html';
+ document.body.appendChild(iframe);
- window.onmessage = messageEvent => {
- if (messageEvent.data == 'Ready') {
- let fakeDevice = navigator.usb.test.addFakeDevice(fakeDeviceInit);
- fakeDevice.onclose = () => {
- assert_true(opened);
- resolve();
- };
- } else if (messageEvent.data == 'Success') {
- opened = true;
- onDeviceConnected(iframe);
- } else {
- reject(messageEvent.data);
- }
- };
+ await navigator.usb.test.attachToContext(iframe);
+ function nextIFrameMessage() {
+ return new Promise(resolve => window.addEventListener(
+ 'message', e => resolve(e.data)));
+ }
+ iframe.contentWindow.postMessage('Ready', '*');
- document.body.appendChild(iframe);
- });
+ assert_equals('Ready', (await nextIFrameMessage()));
+ let fakeDevice = navigator.usb.test.addFakeDevice(fakeDeviceInit);
+ let closedPromise = new Promise(resolve => fakeDevice.onclose = resolve)
+ .then(() => assert_true(opened));
+
+ assert_equals('Success', (await nextIFrameMessage()));
+ opened = true;
+ return { iframe, closedPromise };
}
-usb_test(() => {
- return runIframeDisconnectTest(iframe => {
- document.body.removeChild(iframe);
- });
+usb_test(async () => {
+ let { iframe, closedPromise } = await connectInIframe();
+ document.body.removeChild(iframe);
+ await closedPromise;
}, 'detaching iframe disconnects device.');
-usb_test(() => {
- return runIframeDisconnectTest(iframe => {
- iframe.src = 'about:blank';
- });
+usb_test(async () => {
+ let { iframe, closedPromise } = await connectInIframe();
+ iframe.src = 'about:blank';
+ await closedPromise;
}, 'navigating iframe disconnects device.');
</script>
diff --git a/tests/wpt/web-platform-tests/webusb/usbDevice-worker.https.html b/tests/wpt/web-platform-tests/webusb/usbDevice-worker.https.html
new file mode 100644
index 00000000000..119f5d66882
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webusb/usbDevice-worker.https.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/webusb/resources/fake-devices.js"></script>
+<script src="/webusb/resources/usb-helpers.js"></script>
+<script>
+'use strict';
+
+async function connectInWorker() {
+ let worker = new Worker('/webusb/resources/open-in-worker.js');
+ let opened = false;
+
+ await navigator.usb.test.attachToContext(worker);
+ function nextWorkerMessage() {
+ return new Promise(resolve => worker.addEventListener(
+ 'message', e => resolve(e.data)));
+ }
+ worker.postMessage({ type: 'Ready' });
+
+ assert_equals('Ready', (await nextWorkerMessage()).type);
+ let fakeDevice = navigator.usb.test.addFakeDevice(fakeDeviceInit);
+ let closedPromise = new Promise(resolve => fakeDevice.onclose = resolve)
+ .then(() => assert_true(opened));
+
+ assert_equals('Success', (await nextWorkerMessage()).type);
+ opened = true;
+ return { worker, closedPromise };
+}
+
+usb_test(async () => {
+ let { worker, closedPromise } = await connectInWorker();
+ worker.terminate();
+ await closedPromise;
+}, 'terminating worker disconnects device.');
+</script>
diff --git a/tests/wpt/web-platform-tests/webusb/usbDevice.https.any.js b/tests/wpt/web-platform-tests/webusb/usbDevice.https.any.js
index da7df081b8b..046de82b1bd 100644
--- a/tests/wpt/web-platform-tests/webusb/usbDevice.https.any.js
+++ b/tests/wpt/web-platform-tests/webusb/usbDevice.https.any.js
@@ -6,6 +6,10 @@ function assertRejectsWithNotFoundError(promise) {
return assertRejectsWithError(promise, 'NotFoundError');
}
+function assertRejectsWithTypeError(promise) {
+ return assertRejectsWithError(promise, 'TypeError');
+}
+
function assertRejectsWithNotOpenError(promise) {
return assertRejectsWithError(
promise, 'InvalidStateError', 'The device must be opened first.');
@@ -17,6 +21,18 @@ function assertRejectsWithNotConfiguredError(promise) {
'The device must have a configuration selected.');
}
+function assertRejectsWithDeviceStateChangeInProgressError(promise) {
+ return assertRejectsWithError(
+ promise, 'InvalidStateError',
+ 'An operation that changes the device state is in progress.');
+}
+
+function assertRejectsWithInterfaceStateChangeInProgressError(promise) {
+ return assertRejectsWithError(
+ promise, 'InvalidStateError',
+ 'An operation that changes interface state is in progress.');
+}
+
usb_test(() => {
return getFakeDevice().then(({ device, fakeDevice }) => {
return waitForDisconnect(fakeDevice)
@@ -59,22 +75,63 @@ usb_test(() => {
});
}, 'open and close can be called multiple times');
-usb_test(() => {
- return getFakeDevice().then(({ device }) => {
- const message =
- 'An operation that changes the device state is in progress.';
- return Promise.all([
- device.open(),
- assertRejectsWithError(device.open(), 'InvalidStateError', message),
- assertRejectsWithError(device.close(), 'InvalidStateError', message),
- ]).then(() => Promise.all([
- device.close(),
- assertRejectsWithError(device.open(), 'InvalidStateError', message),
- assertRejectsWithError(device.close(), 'InvalidStateError', message),
- ]));
- });
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await Promise.all([
+ device.open(),
+ assertRejectsWithDeviceStateChangeInProgressError(device.open()),
+ assertRejectsWithDeviceStateChangeInProgressError(device.close()),
+ ]);
+ await Promise.all([
+ device.close(),
+ assertRejectsWithDeviceStateChangeInProgressError(device.open()),
+ assertRejectsWithDeviceStateChangeInProgressError(device.close()),
+ ]);
}, 'open and close cannot be called again while open or close are in progress');
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await device.open();
+ return Promise.all([
+ device.selectConfiguration(1),
+ assertRejectsWithDeviceStateChangeInProgressError(
+ device.claimInterface(0)),
+ assertRejectsWithDeviceStateChangeInProgressError(
+ device.releaseInterface(0)),
+ assertRejectsWithDeviceStateChangeInProgressError(device.open()),
+ assertRejectsWithDeviceStateChangeInProgressError(
+ device.selectConfiguration(1)),
+ assertRejectsWithDeviceStateChangeInProgressError(device.reset()),
+ assertRejectsWithDeviceStateChangeInProgressError(
+ device.selectAlternateInterface(0, 0)),
+ assertRejectsWithDeviceStateChangeInProgressError(
+ device.controlTransferOut({
+ requestType: 'standard',
+ recipient: 'interface',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x0000,
+ })),
+ assertRejectsWithDeviceStateChangeInProgressError(
+ device.controlTransferOut({
+ requestType: 'standard',
+ recipient: 'interface',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x0000,
+ }, new Uint8Array([1, 2, 3]))),
+ assertRejectsWithDeviceStateChangeInProgressError(
+ device.controlTransferIn({
+ requestType: 'standard',
+ recipient: 'interface',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x0000
+ }, 0)),
+ assertRejectsWithDeviceStateChangeInProgressError(device.close()),
+ ]);
+}, 'device operations reject if an device state change is in progress');
+
usb_test(() => {
return getFakeDevice().then(({ device, fakeDevice }) => {
return device.open()
@@ -138,6 +195,21 @@ usb_test(() => {
});
}, 'device configuration can be set and queried');
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ assert_equals(device.configuration, null);
+ await device.open();
+ assert_equals(device.configuration, null);
+ await device.selectConfiguration(1);
+ await device.selectConfiguration(1);
+ assertDeviceInfoEquals(
+ device.configuration, fakeDeviceInit.configurations[0]);
+ await device.selectConfiguration(2);
+ assertDeviceInfoEquals(
+ device.configuration, fakeDeviceInit.configurations[1]);
+ await device.close();
+}, 'a device configuration value can be set again');
+
usb_test(() => {
return getFakeDevice().then(({ device }) => {
assert_equals(device.configuration, null);
@@ -198,19 +270,82 @@ usb_test(() => {
});
}, 'an interface can be claimed and released');
-usb_test(() => {
- return getFakeDevice().then(({ device }) => {
- return device.open()
- .then(() => device.selectConfiguration(1))
- .then(() => device.claimInterface(0))
- .then(() => {
- assert_true(device.configuration.interfaces[0].claimed);
- return device.close(0);
- })
- .then(() => {
- assert_false(device.configuration.interfaces[0].claimed);
- });
- });
+usb_test(async () => {
+ let { device } = await getFakeDevice()
+ await device.open();
+ await device.selectConfiguration(1);
+ await device.claimInterface(0);
+ assert_true(device.configuration.interfaces[0].claimed);
+ await device.claimInterface(0);
+ assert_true(device.configuration.interfaces[0].claimed);
+ await device.close();
+}, 'an interface can be claimed multiple times');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await device.open();
+ await device.selectConfiguration(1);
+ await device.claimInterface(0);
+ assert_true(device.configuration.interfaces[0].claimed);
+ await device.releaseInterface(0);
+ assert_false(device.configuration.interfaces[0].claimed);
+ await device.releaseInterface(0);
+ assert_false(device.configuration.interfaces[0].claimed);
+ await device.close();
+}, 'an interface can be released multiple times');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await device.open();
+ await device.selectConfiguration(1);
+ return Promise.all([
+ device.claimInterface(0),
+ assertRejectsWithInterfaceStateChangeInProgressError(
+ device.claimInterface(0)),
+ assertRejectsWithInterfaceStateChangeInProgressError(
+ device.releaseInterface(0)),
+ assertRejectsWithInterfaceStateChangeInProgressError(device.open()),
+ assertRejectsWithInterfaceStateChangeInProgressError(
+ device.selectConfiguration(1)),
+ assertRejectsWithInterfaceStateChangeInProgressError(device.reset()),
+ assertRejectsWithInterfaceStateChangeInProgressError(
+ device.selectAlternateInterface(0, 0)),
+ assertRejectsWithInterfaceStateChangeInProgressError(
+ device.controlTransferOut({
+ requestType: 'standard',
+ recipient: 'interface',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x0000,
+ })),
+ assertRejectsWithInterfaceStateChangeInProgressError(
+ device.controlTransferOut({
+ requestType: 'standard',
+ recipient: 'interface',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x0000,
+ }, new Uint8Array([1, 2, 3]))),
+ assertRejectsWithInterfaceStateChangeInProgressError(
+ device.controlTransferIn({
+ requestType: 'standard',
+ recipient: 'interface',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x0000
+ }, 0)),
+ assertRejectsWithInterfaceStateChangeInProgressError(device.close()),
+ ]);
+}, 'device operations reject if an interface state change is in progress');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await device.open();
+ await device.selectConfiguration(1);
+ await device.claimInterface(0);
+ assert_true(device.configuration.interfaces[0].claimed);
+ await device.close(0);
+ assert_false(device.configuration.interfaces[0].claimed);
}, 'interfaces are released on close');
usb_test(() => {
@@ -281,29 +416,35 @@ usb_test(() => {
});
}, 'selectAlternateInterface rejects when called on a disconnected device');
-usb_test(() => {
- return getFakeDevice().then(({ device }) => {
- return device.open()
- .then(() => device.selectConfiguration(1))
- .then(() => device.controlTransferIn({
- requestType: 'vendor',
- recipient: 'device',
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ let usbRequestTypes = ['standard', 'class', 'vendor'];
+ let usbRecipients = ['device', 'interface', 'endpoint', 'other'];
+ await device.open();
+ await device.selectConfiguration(1);
+ await device.claimInterface(0);
+ await device.selectAlternateInterface(0, 0);
+ for (const requestType of usbRequestTypes) {
+ for (const recipient of usbRecipients) {
+ let index = recipient === 'interface' ? 0x5600 : 0x5681;
+ let result = await device.controlTransferIn({
+ requestType: requestType,
+ recipient: recipient,
request: 0x42,
value: 0x1234,
- index: 0x5678
- }, 7))
- .then(result => {
- assert_true(result instanceof USBInTransferResult);
- assert_equals(result.status, 'ok');
- assert_equals(result.data.byteLength, 7);
- assert_equals(result.data.getUint16(0), 0x07);
- assert_equals(result.data.getUint8(2), 0x42);
- assert_equals(result.data.getUint16(3), 0x1234);
- assert_equals(result.data.getUint16(5), 0x5678);
- return device.close();
- });
- });
-}, 'can issue IN control transfer');
+ index: index
+ }, 7);
+ assert_true(result instanceof USBInTransferResult);
+ assert_equals(result.status, 'ok');
+ assert_equals(result.data.byteLength, 7);
+ assert_equals(result.data.getUint16(0), 0x07);
+ assert_equals(result.data.getUint8(2), 0x42);
+ assert_equals(result.data.getUint16(3), 0x1234);
+ assert_equals(result.data.getUint16(5), index);
+ }
+ }
+ await device.close();
+}, 'can issue all types of IN control transfers');
usb_test(() => {
return getFakeDevice().then(({ device, fakeDevice }) => {
@@ -320,25 +461,39 @@ usb_test(() => {
});
}, 'controlTransferIn rejects when called on a disconnected device');
-usb_test(() => {
- return getFakeDevice().then(({ device }) => {
- return device.open()
- .then(() => device.selectConfiguration(1))
- .then(() => device.controlTransferOut({
- requestType: 'vendor',
- recipient: 'device',
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ let usbRequestTypes = ['standard', 'class', 'vendor'];
+ let usbRecipients = ['device', 'interface', 'endpoint', 'other'];
+ let dataArray = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]);
+ let dataTypes = [dataArray, dataArray.buffer];
+ await device.open();
+ await device.selectConfiguration(1);
+ await device.claimInterface(0);
+ await device.selectAlternateInterface(0, 0);
+ for (const requestType of usbRequestTypes) {
+ for (const recipient of usbRecipients) {
+ let index = recipient === 'interface' ? 0x5600 : 0x5681;
+ let transferParams = {
+ requestType: requestType,
+ recipient: recipient,
request: 0x42,
value: 0x1234,
- index: 0x5678
- }, new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8])))
- .then(result => {
+ index: index
+ };
+ for (const data of dataTypes) {
+ let result = await device.controlTransferOut(transferParams, data);
+ assert_true(result instanceof USBOutTransferResult);
+ assert_equals(result.status, 'ok');
+ assert_equals(result.bytesWritten, 8);
+ }
+ let result = await device.controlTransferOut(transferParams);
assert_true(result instanceof USBOutTransferResult);
assert_equals(result.status, 'ok');
- assert_equals(result.bytesWritten, 8);
- return device.close();
- });
- });
-}, 'can issue OUT control transfer');
+ }
+ }
+ await device.close();
+}, 'can issue all types of OUT control transfers');
usb_test(() => {
return getFakeDevice().then(({ device, fakeDevice }) => {
@@ -355,6 +510,70 @@ usb_test(() => {
});
}, 'controlTransferOut rejects when called on a disconnected device');
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await device.open();
+ await device.selectConfiguration(1);
+ await device.claimInterface(0);
+ assertRejectsWithTypeError(device.controlTransferOut({
+ requestType: 'invalid',
+ recipient: 'device',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x5678
+ }, new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8])));
+ assertRejectsWithTypeError(device.controlTransferIn({
+ requestType: 'invalid',
+ recipient: 'device',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x5678
+ }, 0));
+ await device.close();
+}, 'control transfers with a invalid request type reject');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await device.open();
+ await device.selectConfiguration(1);
+ await device.claimInterface(0);
+ assertRejectsWithTypeError(device.controlTransferOut({
+ requestType: 'vendor',
+ recipient: 'invalid',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x5678
+ }, new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8])));
+ assertRejectsWithTypeError(device.controlTransferIn({
+ requestType: 'vendor',
+ recipient: 'invalid',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x5678
+ }, 0));
+}, 'control transfers with a invalid recipient type reject');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await device.open();
+ await device.selectConfiguration(1);
+ await device.claimInterface(0);
+ assertRejectsWithNotFoundError(device.controlTransferOut({
+ requestType: 'vendor',
+ recipient: 'interface',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x0002 // Last byte of index is interface number.
+ }, new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8])));
+ assertRejectsWithNotFoundError(device.controlTransferIn({
+ requestType: 'vendor',
+ recipient: 'interface',
+ request: 0x42,
+ value: 0x1234,
+ index: 0x0002 // Last byte of index is interface number.
+ }, 0));
+}, 'control transfers to a non-existant interface reject');
+
usb_test(() => {
return getFakeDevice().then(({ device }) => {
let interfaceRequest = {
diff --git a/tests/wpt/web-platform-tests/webusb/usbEndpoint.https.any.js b/tests/wpt/web-platform-tests/webusb/usbEndpoint.https.any.js
new file mode 100644
index 00000000000..e57639c3d4b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webusb/usbEndpoint.https.any.js
@@ -0,0 +1,45 @@
+// META: script=/webusb/resources/fake-devices.js
+// META: script=/webusb/resources/usb-helpers.js
+'use strict';
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ let configuration = new USBConfiguration(
+ device, device.configurations[1].configurationValue);
+ let usbInterface = new USBInterface(
+ configuration, configuration.interfaces[0].interfaceNumber);
+ let alternateInterface = new USBAlternateInterface(
+ usbInterface, usbInterface.alternates[1].alternateSetting);
+ let inEndpoint = new USBEndpoint(
+ alternateInterface, alternateInterface.endpoints[0].endpointNumber, 'in');
+ let outEndpoint = new USBEndpoint(
+ alternateInterface,
+ alternateInterface.endpoints[1].endpointNumber,
+ 'out');
+ assertDeviceInfoEquals(
+ inEndpoint,
+ fakeDeviceInit.configurations[1].interfaces[0].alternates[1]
+ .endpoints[0]);
+ assertDeviceInfoEquals(
+ outEndpoint,
+ fakeDeviceInit.configurations[1].interfaces[0].alternates[1]
+ .endpoints[1]);
+}, 'Can construct a USBEndpoint.');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ let configuration = new USBConfiguration(
+ device, device.configurations[1].configurationValue);
+ let usbInterface = new USBInterface(
+ configuration, configuration.interfaces[0].interfaceNumber);
+ let alternateInterface = new USBAlternateInterface(
+ usbInterface, usbInterface.alternates[1].alternateSetting);
+ try {
+ let endpoint = new USBEndpoint(
+ alternateInterface, alternateInterface.endpoints.length, 'in');
+ assert_unreached('USBEndpoint should reject an invalid endpoint number');
+ } catch (error) {
+ assert_equals(error.name, 'RangeError');
+ }
+}, 'Constructing a USBEndpoint with an invalid endpoint number throws a ' +
+ 'range error.');
diff --git a/tests/wpt/web-platform-tests/webusb/usbInterface.https.any.js b/tests/wpt/web-platform-tests/webusb/usbInterface.https.any.js
new file mode 100644
index 00000000000..7fbf660bbce
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webusb/usbInterface.https.any.js
@@ -0,0 +1,53 @@
+// META: script=/webusb/resources/fake-devices.js
+// META: script=/webusb/resources/usb-helpers.js
+'use strict';
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ let configuration = new USBConfiguration(
+ device, device.configurations[1].configurationValue);
+ let usbInterface = new USBInterface(
+ configuration, configuration.interfaces[0].interfaceNumber);
+ assertDeviceInfoEquals(
+ usbInterface, fakeDeviceInit.configurations[1].interfaces[0]);
+}, 'Can construct a USBInterface.');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ let configuration = new USBConfiguration(
+ device, device.configurations[1].configurationValue);
+ try {
+ let usbInterface = new USBInterface(
+ configuration, configuration.interfaces.length);
+ assert_unreached('USBInterface should reject an invalid interface number');
+ } catch (error) {
+ assert_equals(error.name, 'RangeError');
+ }
+}, 'Constructing a USBInterface with an invalid interface number ' +
+ 'throws a range error.');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await device.open();
+ await device.selectConfiguration(2);
+ let configuration = new USBConfiguration(
+ device, device.configurations[1].configurationValue);
+ let usbInterface = new USBInterface(
+ configuration, configuration.interfaces[0].interfaceNumber);
+ assert_equals(usbInterface.alternate, null);
+}, 'The alternate attribute of USBInterface returns null if the interface' +
+ 'has not been claimed.');
+
+usb_test(async () => {
+ let { device } = await getFakeDevice();
+ await device.open();
+ await device.selectConfiguration(2);
+ await device.claimInterface(0);
+ await device.selectAlternateInterface(0, 1);
+ let configuration = new USBConfiguration(
+ device, device.configurations[1].configurationValue);
+ let usbInterface = new USBInterface(
+ configuration, configuration.interfaces[0].interfaceNumber);
+ assert_equals(usbInterface.alternate.alternateSetting, 1);
+}, 'The alternate attribute of USBInterface returns the active alternate ' +
+ 'interface.');
diff --git a/tests/wpt/web-platform-tests/workers/importscripts_mime.tentative.any.js b/tests/wpt/web-platform-tests/workers/importscripts_mime.tentative.any.js
new file mode 100644
index 00000000000..04c63a3a5f6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/workers/importscripts_mime.tentative.any.js
@@ -0,0 +1,52 @@
+// META: global=!window,worker
+//
+// Tentative test for https://github.com/whatwg/html/issues/3255
+
+let test_cases = [
+ // Supported mimetypes:
+ ["text/javascript", true],
+ ["application/javascript", true],
+ ["text/ecmascript", true],
+
+ // Blocked mimetpyes:
+ ["image/png", false],
+ ["text/csv", false],
+ ["video/mpeg", false],
+
+ // Legacy mimetypes:
+ ["text/html", false],
+ ["text/plain", false],
+ ["application/xml", false],
+ ["application/octet-stream", false],
+
+ // Potato mimetypes:
+ ["text/potato", false],
+ ["potato/text", false],
+ ["aaa/aaa", false],
+ ["zzz/zzz", false],
+
+ // Parameterized mime types:
+ ["text/javascript; charset=utf-8", true],
+ ["text/javascript;charset=utf-8", true],
+ ["text/javascript;bla;bla", true],
+ ["text/csv; charset=utf-8", false],
+ ["text/csv;charset=utf-8", false],
+ ["text/csv;bla;bla", false],
+
+ // Funky capitalization:
+ ["Text/html", false],
+ ["text/Html", false],
+ ["TeXt/HtMl", false],
+ ["TEXT/HTML", false],
+];
+
+for (var test_case of test_cases) {
+ test(t => {
+ let import_url = "/workers/support/imported_script.py?mime=" + test_case[0];
+ if (test_case[1]) {
+ assert_equals(undefined, importScripts(import_url));
+ } else {
+ assert_throws("NetworkError", _ => { importScripts(import_url) })
+ }
+ }, "importScripts() requires scripty MIME types: " + test_case[0] + " is " + (test_case[1] ? "allowed" : "blocked") + ".");
+}
diff --git a/tests/wpt/web-platform-tests/workers/support/imported_script.py b/tests/wpt/web-platform-tests/workers/support/imported_script.py
new file mode 100644
index 00000000000..88cd2285e82
--- /dev/null
+++ b/tests/wpt/web-platform-tests/workers/support/imported_script.py
@@ -0,0 +1,2 @@
+def main(request, response):
+ return [('Content-Type', request.GET['mime'])], ""
diff --git a/tests/wpt/web-platform-tests/worklets/audio-worklet-credentials.https.html b/tests/wpt/web-platform-tests/worklets/audio-worklet-credentials.https.html
new file mode 100644
index 00000000000..9d867db7ce0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/worklets/audio-worklet-credentials.https.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/common/get-host-info.sub.js"></script>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/worklet-test-utils.js"></script>
+ <script src="resources/credentials-tests.js"></script>
+</head>
+<body>
+<script>
+ runCredentialsTests("audio");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/worklets/audio-worklet-csp.https.html b/tests/wpt/web-platform-tests/worklets/audio-worklet-csp.https.html
new file mode 100644
index 00000000000..ef148a4a098
--- /dev/null
+++ b/tests/wpt/web-platform-tests/worklets/audio-worklet-csp.https.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/common/get-host-info.sub.js"></script>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/worklet-test-utils.js"></script>
+ <script src="resources/csp-tests.js"></script>
+</head>
+<body>
+<script>
+ runContentSecurityPolicyTests("audio");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/worklets/audio-worklet-import.https.html b/tests/wpt/web-platform-tests/worklets/audio-worklet-import.https.html
new file mode 100644
index 00000000000..cff063a4361
--- /dev/null
+++ b/tests/wpt/web-platform-tests/worklets/audio-worklet-import.https.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/common/get-host-info.sub.js"></script>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/worklet-test-utils.js"></script>
+ <script src="resources/import-tests.js"></script>
+</head>
+<body>
+<script>
+ runImportTests("audio");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/worklets/audio-worklet-referrer.https.html b/tests/wpt/web-platform-tests/worklets/audio-worklet-referrer.https.html
new file mode 100644
index 00000000000..f258cd5a452
--- /dev/null
+++ b/tests/wpt/web-platform-tests/worklets/audio-worklet-referrer.https.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/common/get-host-info.sub.js"></script>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/worklet-test-utils.js"></script>
+ <script src="resources/referrer-tests.js"></script>
+</head>
+<body>
+<script>
+ runReferrerTests("audio");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/worklets/audio-worklet-service-worker-interception.https.html b/tests/wpt/web-platform-tests/worklets/audio-worklet-service-worker-interception.https.html
new file mode 100644
index 00000000000..479ae176f9d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/worklets/audio-worklet-service-worker-interception.https.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="resources/worklet-test-utils.js"></script>
+ <script src="resources/service-worker-interception-tests.js"></script>
+ <script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
+</head>
+<body>
+<script>
+ runServiceWorkerInterceptionTests("audio");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/worklets/resources/worklet-test-utils.js b/tests/wpt/web-platform-tests/worklets/resources/worklet-test-utils.js
index 499999f22df..797edc9e563 100644
--- a/tests/wpt/web-platform-tests/worklets/resources/worklet-test-utils.js
+++ b/tests/wpt/web-platform-tests/worklets/resources/worklet-test-utils.js
@@ -6,5 +6,7 @@ function get_worklet(type) {
return CSS.layoutWorklet;
if (type == 'paint')
return CSS.paintWorklet;
+ if (type == 'audio')
+ return new OfflineAudioContext(2,44100*40,44100).audioWorklet;
return undefined;
}
diff --git a/tests/wpt/web-platform-tests/xhr/abort-after-stop.htm b/tests/wpt/web-platform-tests/xhr/abort-after-stop.htm
index 7c5060fa4c6..d28d046fa98 100644
--- a/tests/wpt/web-platform-tests/xhr/abort-after-stop.htm
+++ b/tests/wpt/web-platform-tests/xhr/abort-after-stop.htm
@@ -13,7 +13,9 @@
window.onload = test.step_func(function() {
var client = new XMLHttpRequest();
var abortFired = false;
+ var sync = true;
client.onabort = test.step_func(function (e) {
+ assert_false(sync);
assert_equals(e.type, 'abort');
abortFired = true;
});
@@ -24,6 +26,7 @@
test.done();
}, 200);
window.stop();
+ sync = false;
});
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/xhr/headers-normalize-response.htm b/tests/wpt/web-platform-tests/xhr/headers-normalize-response.htm
index 466b0d977cc..84f2fc85821 100644
--- a/tests/wpt/web-platform-tests/xhr/headers-normalize-response.htm
+++ b/tests/wpt/web-platform-tests/xhr/headers-normalize-response.htm
@@ -3,13 +3,15 @@
<title>Whitespace and null in header values</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
-<script src=support.js?pipe=sub></script>
-
-<h1>Whitespace and null in response header values</h1>
-
<div id=log></div>
-
<script>
+function error(val) {
+ test(() => {
+ const client = new XMLHttpRequest();
+ client.open("GET", "resources/parse-headers.py?my-custom-header="+encodeURIComponent(val), false);
+ assert_throws("NetworkError", () => client.send());
+ }, "Header value: " + val.replace("\0", "\\0"));
+}
function matchHeaderValue(val) {
test(function () {
@@ -20,12 +22,12 @@ function matchHeaderValue(val) {
var r = client.getResponseHeader("My-Custom-Header");
assert_equals(r, trimmed);
- }, "Header value: " + val.replace(/\t/g, "[tab]").replace(/ /g, "_").replace("\0", "\\0"));
+ }, "Header value: " + val.replace(/\t/g, "[tab]").replace(/ /g, "_"));
}
-matchHeaderValue("hello world\0");
-matchHeaderValue("\0hello world");
-matchHeaderValue("hello\0world");
+error("hello world\0");
+error("\0hello world");
+error("hello\0world");
matchHeaderValue(" hello world");
matchHeaderValue("hello world ");
matchHeaderValue(" hello world ");
@@ -34,9 +36,8 @@ matchHeaderValue("hello world\t");
matchHeaderValue("\thello world\t");
matchHeaderValue("hello world");
matchHeaderValue("hello\tworld");
-matchHeaderValue("\0");
+error("\0");
matchHeaderValue(" ");
matchHeaderValue("\t");
matchHeaderValue("");
-
</script>
diff --git a/tests/wpt/web-platform-tests/xhr/open-after-abort.htm b/tests/wpt/web-platform-tests/xhr/open-after-abort.htm
index c9c63044228..c9ef6e7ac94 100644
--- a/tests/wpt/web-platform-tests/xhr/open-after-abort.htm
+++ b/tests/wpt/web-platform-tests/xhr/open-after-abort.htm
@@ -9,27 +9,69 @@
<body>
<div id="log"></div>
<script>
- var test = async_test()
- test.step(function() {
+ test(function(t) {
var client = new XMLHttpRequest(),
result = [],
- expected = [1, 4, 1] // open() -> 1,
- // abort() -> 4, open() -> 1
- client.onreadystatechange = function() {
- test.step(function() {
- result.push(client.readyState)
- })
- }
+ expected = [
+ 'readystatechange', 0, 1, // open()
+ 'readystatechange', 2, 4, // abort()
+ 'abort', 2, 4, // abort()
+ 'loadend', 2, 4, // abort()
+ 'readystatechange', 3, 1, // open()
+ ]
+
+ var state = 0
+
+ client.onreadystatechange = t.step_func(function() {
+ result.push('readystatechange', state, client.readyState)
+ })
+ client.onabort = t.step_func(function() {
+ // abort event must be fired synchronously from abort().
+ assert_equals(state, 2)
+
+ // readystatechange should be fired before abort.
+ assert_array_equals(result, [
+ 'readystatechange', 0, 1, // open()
+ 'readystatechange', 2, 4, // abort()
+ ])
+
+ // readyState should be set to unsent (0) at the very end of abort(),
+ // after this (and onloadend) is called.
+ assert_equals(client.readyState, 4)
+
+ result.push('abort', state, client.readyState)
+ })
+ client.onloadend = t.step_func(function() {
+ // abort event must be fired synchronously from abort().
+ assert_equals(state, 2)
+
+ // readystatechange should be fired before abort.
+ assert_array_equals(result, [
+ 'readystatechange', 0, 1, // open()
+ 'readystatechange', 2, 4, // abort()
+ 'abort', 2, 4, // abort()
+ ])
+
+ // readyState should be set to unsent (0) at the very end of abort(),
+ // after this is called.
+ assert_equals(client.readyState, 4)
+
+ result.push('loadend', state, client.readyState)
+ })
+
client.open("GET", "resources/well-formed.xml")
assert_equals(client.readyState, 1)
+
+ state = 1
client.send(null)
+ state = 2
client.abort()
assert_equals(client.readyState, 0)
+ state = 3
client.open("GET", "resources/well-formed.xml")
assert_equals(client.readyState, 1)
assert_array_equals(result, expected)
})
- test.done()
</script>
</body>
</html>
diff --git a/tests/wpt/web-platform-tests/xhr/open-after-stop.window.js b/tests/wpt/web-platform-tests/xhr/open-after-stop.window.js
new file mode 100644
index 00000000000..e836a523f86
--- /dev/null
+++ b/tests/wpt/web-platform-tests/xhr/open-after-stop.window.js
@@ -0,0 +1,43 @@
+// window.stop() below prevents the load event from firing, so wait until it is
+// fired to start the test.
+setup({explicit_done: true });
+
+onload = () => {
+ async_test(function(t) {
+ const client = new XMLHttpRequest();
+
+ const result = [];
+ const expected = [
+ 'readystatechange', 0, 1, // open()
+ ];
+
+ let state = 0;
+
+ client.onreadystatechange = t.step_func(() => {
+ result.push('readystatechange', state, client.readyState);
+ });
+ client.onabort = t.unreached_func("abort should not be fired after window.stop() and open()");
+ client.onloadend = t.unreached_func("loadend should not be fired after window.stop() and open()");
+
+ client.open("GET", "resources/well-formed.xml");
+ assert_equals(client.readyState, 1);
+
+ state = 1;
+ client.send(null);
+ state = 2;
+ window.stop();
+ // Unlike client.abort(), window.stop() does not change readyState
+ // immediately, rather through a task...
+ assert_equals(client.readyState, 1);
+ state = 3;
+ // ... which is then canceled when we open a new request anyway.
+ client.open("GET", "resources/well-formed.xml");
+ assert_equals(client.readyState, 1);
+ assert_array_equals(result, expected);
+
+ // Give the abort and loadend events a chance to fire (erroneously) before
+ // calling this a success.
+ t.step_timeout(t.step_func_done(), 1000);
+ }, "open() after window.stop()");
+ done();
+};
diff --git a/tests/wpt/web-platform-tests/xhr/send-data-readablestream.any.js b/tests/wpt/web-platform-tests/xhr/send-data-readablestream.any.js
new file mode 100644
index 00000000000..cca6e76a042
--- /dev/null
+++ b/tests/wpt/web-platform-tests/xhr/send-data-readablestream.any.js
@@ -0,0 +1,27 @@
+// META: global=window,dedicatedworker,sharedworker
+
+function assert_xhr(stream) {
+ const client = new XMLHttpRequest();
+ client.open("POST", "...");
+ assert_throws(new TypeError(), () => client.send(stream));
+}
+
+test(() => {
+ const stream = new ReadableStream();
+ stream.getReader();
+ assert_xhr(stream);
+}, "XMLHttpRequest: send() with a stream on which getReader() is called");
+
+test(() => {
+ const stream = new ReadableStream();
+ stream.getReader().read();
+ assert_xhr(stream);
+}, "XMLHttpRequest: send() with a stream on which read() is called");
+
+promise_test(async () => {
+ const stream = new ReadableStream({ pull: c => c.enqueue(new Uint8Array()) }),
+ reader = stream.getReader();
+ await reader.read();
+ reader.releaseLock();
+ assert_xhr(stream);
+}, "XMLHttpRequest: send() with a stream on which read() and releaseLock() are called");
diff --git a/tests/wpt/web-platform-tests/xhr/timeout-multiple-fetches.html b/tests/wpt/web-platform-tests/xhr/timeout-multiple-fetches.html
index 30d6b736c56..4f4998c4285 100644
--- a/tests/wpt/web-platform-tests/xhr/timeout-multiple-fetches.html
+++ b/tests/wpt/web-platform-tests/xhr/timeout-multiple-fetches.html
@@ -3,12 +3,13 @@
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/common/get-host-info.sub.js></script>
+<script src=/common/utils.js></script>
<div id=log></div>
<script>
async_test(t => {
const client = new XMLHttpRequest
client.open("GET", "resources/redirect.py?delay=500&location=delay.py") // 500 + 500 = 1000
- client.timeout = 1000
+ client.timeout = 750
client.send()
client.ontimeout = t.step_func_done(() => {
assert_equals(client.readyState, 4)
@@ -17,9 +18,11 @@ async_test(t => {
}, "Redirects should not reset the timer")
async_test(t => {
+ // Use a unique ID to prevent caching of the preflight making the test flaky.
+ const uuid = token();
const client = new XMLHttpRequest
- client.open("YO", get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/delay.py")
- client.timeout = 1000
+ client.open("YO", get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/delay.py?uuid=" + uuid)
+ client.timeout = 750
client.send()
client.ontimeout = t.step_func_done(() => {
assert_equals(client.readyState, 4)
diff --git a/tests/wpt/webgl/meta/MANIFEST.json b/tests/wpt/webgl/meta/MANIFEST.json
index 31f286ebea8..ee13046d7f2 100644
--- a/tests/wpt/webgl/meta/MANIFEST.json
+++ b/tests/wpt/webgl/meta/MANIFEST.json
@@ -10571,9 +10571,7 @@
"conformance/canvas/rapid-resizing.html": [
[
"/_webgl/conformance/canvas/rapid-resizing.html",
- {
- "timeout": "long"
- }
+ {}
]
],
"conformance/canvas/render-after-resize-test.html": [
@@ -10621,17 +10619,13 @@
"conformance/context/context-creation-and-destruction.html": [
[
"/_webgl/conformance/context/context-creation-and-destruction.html",
- {
- "timeout": "long"
- }
+ {}
]
],
"conformance/context/context-creation.html": [
[
"/_webgl/conformance/context/context-creation.html",
- {
- "timeout": "long"
- }
+ {}
]
],
"conformance/context/context-eviction-with-garbage-collection.html": [
@@ -15802,6 +15796,12 @@
{}
]
],
+ "conformance2/context/context-mode.html": [
+ [
+ "/_webgl/conformance2/context/context-mode.html",
+ {}
+ ]
+ ],
"conformance2/context/context-resize-changes-buffer-binding-bug.html": [
[
"/_webgl/conformance2/context/context-resize-changes-buffer-binding-bug.html",
@@ -27488,7 +27488,7 @@
"testharness"
],
"conformance/buffers/buffer-data-array-buffer-delete.html": [
- "c2a8d35e1a965eff1ea8d7117cf030a7471d6231",
+ "579aa2037882da16836eb1e5183afcc3b153d1f6",
"testharness"
],
"conformance/buffers/buffer-data-dynamic-delay.html": [
@@ -27540,7 +27540,7 @@
"testharness"
],
"conformance/canvas/canvas-test.html": [
- "e1a900a31b53eca74de2e6692fcd28533fe26f41",
+ "072f144888a7dad5ea71ddb941d49bf1c85a4131",
"testharness"
],
"conformance/canvas/canvas-zero-size.html": [
@@ -27548,11 +27548,11 @@
"testharness"
],
"conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html": [
- "0770cb5ffc303d66b92b9a9715190afb11485e6b",
+ "35bead3cc5eb245b055bdf312adb187329c4629b",
"testharness"
],
"conformance/canvas/draw-webgl-to-canvas-test.html": [
- "45b79bbde40f316699aae227160de34c14028092",
+ "27f01d41dfe211fbdafa44ead612daa820746a1e",
"testharness"
],
"conformance/canvas/drawingbuffer-hd-dpi-test.html": [
@@ -27568,7 +27568,7 @@
"testharness"
],
"conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html": [
- "9cb944a3392de4b14c728a067d01908d1e0e9c96",
+ "b09b00bfde56521dc1cf2bd269e3465fc01133e5",
"testharness"
],
"conformance/canvas/framebuffer-bindings-unaffected-on-resize.html": [
@@ -27576,7 +27576,7 @@
"testharness"
],
"conformance/canvas/rapid-resizing.html": [
- "9991e9beec6e5880a4f939d314acc7a76dd31527",
+ "cd3dbb8e9575036c33b12264e9c46b339336db7e",
"testharness"
],
"conformance/canvas/render-after-resize-test.html": [
@@ -27588,7 +27588,7 @@
"testharness"
],
"conformance/canvas/to-data-url-test.html": [
- "67e26a408ea461faa66394dad11d3efca1c712d9",
+ "d7e77c869899a9d8dfa15a2eb7068c95f66b1c0a",
"testharness"
],
"conformance/canvas/viewport-unchanged-upon-resize.html": [
@@ -27604,7 +27604,7 @@
"testharness"
],
"conformance/context/context-attribute-preserve-drawing-buffer.html": [
- "2726815a7c4ebf3d6a19c29a3e301830ef0ff11d",
+ "64b9e5bf377e131f9d10ef0a68282a485a63dd52",
"testharness"
],
"conformance/context/context-attributes-alpha-depth-stencil-antialias.html": [
@@ -27612,11 +27612,11 @@
"testharness"
],
"conformance/context/context-creation-and-destruction.html": [
- "3ad7a02d79cfbae4b9d7b6f6ee16cdc5d1a829dd",
+ "a3912fcf7eaaf2992ec4a82de0c7262d929b035d",
"testharness"
],
"conformance/context/context-creation.html": [
- "237258cc9d956acf6b821967c8010db22804e6df",
+ "d8685e48fcb8e5f74132501fa31e00163212be54",
"testharness"
],
"conformance/context/context-eviction-with-garbage-collection.html": [
@@ -27664,7 +27664,7 @@
"testharness"
],
"conformance/context/premultiplyalpha-test.html": [
- "4f63c2ef232a2e17a83d90d72ba2098c02bbb6a5",
+ "6bf9503c359d71f841fdd9724c3d12bafb006d28",
"testharness"
],
"conformance/context/resources/context-release-child-with-worker.html": [
@@ -36316,7 +36316,7 @@
"testharness"
],
"conformance/renderbuffers/framebuffer-state-restoration.html": [
- "4028029e468238e6506bef01797e6ad04b4fb784",
+ "dbef36b66f50a2715395c9773b48246b8b7d586f",
"testharness"
],
"conformance/renderbuffers/framebuffer-test.html": [
@@ -36420,7 +36420,7 @@
"testharness"
],
"conformance/rendering/multisample-corruption.html": [
- "d3d25e0a876973ea397097823ed9132dc892ddcc",
+ "7de9b47f229ac935cdb76b14e6237243ae14ce04",
"testharness"
],
"conformance/rendering/negative-one-index.html": [
@@ -36452,7 +36452,7 @@
"testharness"
],
"conformance/rendering/preservedrawingbuffer-leak.html": [
- "bd1dccbdeea10de6d62f31ce9e6c46048134b276",
+ "3df53551ef062f8c5a9b52003f2a564db14d990f",
"testharness"
],
"conformance/rendering/rendering-stencil-large-viewport.html": [
@@ -36976,7 +36976,7 @@
"testharness"
],
"conformance/textures/misc/tex-video-using-tex-unit-non-zero.html": [
- "8db7d43610e820a46b9662103cffe9c86f819edc",
+ "9abe3bd71772133857507f18a5a6fcfc95b080da",
"testharness"
],
"conformance/textures/misc/texparameter-test.html": [
@@ -37068,7 +37068,7 @@
"testharness"
],
"conformance/textures/misc/texture-upload-size.html": [
- "59934e4ede1ab612ad2c7342bac79ddbe4db4d68",
+ "8832033dd705cc6ccea02c58eff879a8f2f59e3e",
"testharness"
],
"conformance/textures/misc/texture-with-flip-y-and-premultiply-alpha.html": [
@@ -37432,7 +37432,7 @@
"testharness"
],
"conformance2/context/00_test_list.txt": [
- "c2d13238b2991ae4e3d0ea802f6a63c2c40dd455",
+ "fc4f8b8c07fcbe15156d55a4a58ddb2727567dc9",
"support"
],
"conformance2/context/constants-and-properties-2.html": [
@@ -37443,6 +37443,10 @@
"5476f4e3a68be618c89380128f77d0b97b333457",
"testharness"
],
+ "conformance2/context/context-mode.html": [
+ "fa44ce4c877adf82bf6245776b9b1237ad557d89",
+ "testharness"
+ ],
"conformance2/context/context-resize-changes-buffer-binding-bug.html": [
"c169eed8a573eed8ec12efea9093e55d477e8b44",
"testharness"
@@ -37940,7 +37944,7 @@
"testharness"
],
"conformance2/rendering/canvas-resizing-with-pbo-bound.html": [
- "bb303081fc8e012d03d2056f6c1028026eb91236",
+ "78f7f9da22268d73fddb2e33c9c08e929efe65ab",
"testharness"
],
"conformance2/rendering/clear-func-buffer-type-match.html": [
@@ -46420,7 +46424,7 @@
"support"
],
"js/js-test-pre.js": [
- "f2c8167240a232d1a5480a9b7635cc250062bbdb",
+ "294bd4c5a21ccfa8b1ec4369a960304c4b2cf0f6",
"support"
],
"js/pnglib.js": [
@@ -46540,7 +46544,7 @@
"support"
],
"js/tests/tex-image-and-sub-image-2d-with-webgl-canvas.js": [
- "61578ab040f12208119f9afbbf156a8aea47a9d4",
+ "8ade197c61c116a25bbb6dc380334b9cca1010de",
"support"
],
"js/tests/tex-image-and-sub-image-3d-with-canvas-sub-rectangle.js": [
@@ -46636,7 +46640,7 @@
"support"
],
"js/webgl-test-utils.js": [
- "5ab8b2cfd0794f3c15d7afad0fe98b0f75cff38b",
+ "0ef194eacc296f083fe86a03cdbdb5f72317b516",
"support"
],
"py/lint/LICENSE": [
diff --git a/tests/wpt/webgl/meta/conformance/attribs/gl-vertex-attrib-render.html.ini b/tests/wpt/webgl/meta/conformance/attribs/gl-vertex-attrib-render.html.ini
index fc428173245..e0b8587440f 100644
--- a/tests/wpt/webgl/meta/conformance/attribs/gl-vertex-attrib-render.html.ini
+++ b/tests/wpt/webgl/meta/conformance/attribs/gl-vertex-attrib-render.html.ini
@@ -1,6 +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/webgl/meta/conformance/attribs/gl-vertex-attrib.html.ini b/tests/wpt/webgl/meta/conformance/attribs/gl-vertex-attrib.html.ini
deleted file mode 100644
index e8cfa8be8e7..00000000000
--- a/tests/wpt/webgl/meta/conformance/attribs/gl-vertex-attrib.html.ini
+++ /dev/null
@@ -1,25 +0,0 @@
-[gl-vertex-attrib.html]
- [WebGL test #979: getError expected: INVALID_VALUE. Was INVALID_OPERATION : ]
- expected: FAIL
-
- [WebGL test #978: getError expected: INVALID_VALUE. Was INVALID_OPERATION : ]
- expected: FAIL
-
- [WebGL test #976: getError expected: INVALID_VALUE. Was INVALID_OPERATION : ]
- expected: FAIL
-
- [WebGL test #980: getError expected: INVALID_VALUE. Was INVALID_OPERATION : ]
- expected: FAIL
-
- [WebGL test #975: getError expected: INVALID_VALUE. Was INVALID_OPERATION : ]
- expected: FAIL
-
- [WebGL test #977: getError expected: INVALID_VALUE. Was INVALID_OPERATION : ]
- expected: FAIL
-
- [WebGL test #982: getError expected: INVALID_VALUE. Was INVALID_OPERATION : ]
- expected: FAIL
-
- [WebGL test #981: getError expected: INVALID_VALUE. Was INVALID_OPERATION : ]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/attribs/gl-vertexattribpointer.html.ini b/tests/wpt/webgl/meta/conformance/attribs/gl-vertexattribpointer.html.ini
deleted file mode 100644
index 3a5cca32db1..00000000000
--- a/tests/wpt/webgl/meta/conformance/attribs/gl-vertexattribpointer.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[gl-vertexattribpointer.html]
- [WebGL test #3: getError expected: NO_ERROR. Was INVALID_OPERATION : vertexAttribPointer should succeed if no buffer is bound and `offset` is zero.]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/buffers/buffer-data-and-buffer-sub-data.html.ini b/tests/wpt/webgl/meta/conformance/buffers/buffer-data-and-buffer-sub-data.html.ini
deleted file mode 100644
index 49412711fc1..00000000000
--- a/tests/wpt/webgl/meta/conformance/buffers/buffer-data-and-buffer-sub-data.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[buffer-data-and-buffer-sub-data.html]
- expected: ERROR
- [WebGL test #27: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/buffers/buffer-data-array-buffer-delete.html.ini b/tests/wpt/webgl/meta/conformance/buffers/buffer-data-array-buffer-delete.html.ini
index 32f41771f0e..4c895897d40 100644
--- a/tests/wpt/webgl/meta/conformance/buffers/buffer-data-array-buffer-delete.html.ini
+++ b/tests/wpt/webgl/meta/conformance/buffers/buffer-data-array-buffer-delete.html.ini
@@ -1,13 +1,8 @@
[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]
expected: FAIL
- [WebGL test #1: gl should be non-null. Was null]
+ [WebGL test #1: context does not exist]
expected: FAIL
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/canvas/canvas-test.html.ini b/tests/wpt/webgl/meta/conformance/canvas/canvas-test.html.ini
index 62980ecdfc8..23dbc28d1c9 100644
--- a/tests/wpt/webgl/meta/conformance/canvas/canvas-test.html.ini
+++ b/tests/wpt/webgl/meta/conformance/canvas/canvas-test.html.ini
@@ -1,6 +1,3 @@
[canvas-test.html]
- type: testharness
expected: ERROR
- [Overall test]
- expected: NOTRUN
diff --git a/tests/wpt/webgl/meta/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html.ini b/tests/wpt/webgl/meta/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html.ini
index 9c7f3f10b20..b1c37bcbb7e 100644
--- a/tests/wpt/webgl/meta/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html.ini
+++ b/tests/wpt/webgl/meta/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html.ini
@@ -1,6 +1,3 @@
[draw-static-webgl-to-multiple-canvas-test.html]
- type: testharness
expected: ERROR
- [Overall test]
- expected: NOTRUN
diff --git a/tests/wpt/webgl/meta/conformance/canvas/draw-webgl-to-canvas-test.html.ini b/tests/wpt/webgl/meta/conformance/canvas/draw-webgl-to-canvas-test.html.ini
index df8d2c898e6..bf750bfcf4c 100644
--- a/tests/wpt/webgl/meta/conformance/canvas/draw-webgl-to-canvas-test.html.ini
+++ b/tests/wpt/webgl/meta/conformance/canvas/draw-webgl-to-canvas-test.html.ini
@@ -1,6 +1,3 @@
[draw-webgl-to-canvas-test.html]
- type: testharness
expected: ERROR
- [Overall test]
- expected: NOTRUN
diff --git a/tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-static-canvas-test.html.ini b/tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-static-canvas-test.html.ini
index 64c90bdf140..42ce8b5d526 100644
--- a/tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-static-canvas-test.html.ini
+++ b/tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-static-canvas-test.html.ini
@@ -1,3 +1,2 @@
[drawingbuffer-static-canvas-test.html]
- type: testharness
expected: CRASH
diff --git a/tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-test.html.ini b/tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-test.html.ini
index 6570acb25a4..a03aad6f02d 100644
--- a/tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-test.html.ini
+++ b/tests/wpt/webgl/meta/conformance/canvas/drawingbuffer-test.html.ini
@@ -1,3 +1,2 @@
[drawingbuffer-test.html]
- type: testharness
expected: CRASH
diff --git a/tests/wpt/webgl/meta/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html.ini b/tests/wpt/webgl/meta/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html.ini
index 8a9c9cae380..dfb9898d3b0 100644
--- a/tests/wpt/webgl/meta/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html.ini
+++ b/tests/wpt/webgl/meta/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html.ini
@@ -1,8 +1,7 @@
[framebuffer-bindings-affected-by-to-data-url.html]
- expected: ERROR
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
+ [WebGL test #1: context does not exist]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/canvas/rapid-resizing.html.ini b/tests/wpt/webgl/meta/conformance/canvas/rapid-resizing.html.ini
index d5958c6cbe9..70e5ae46820 100644
--- a/tests/wpt/webgl/meta/conformance/canvas/rapid-resizing.html.ini
+++ b/tests/wpt/webgl/meta/conformance/canvas/rapid-resizing.html.ini
@@ -1,11 +1,3 @@
[rapid-resizing.html]
- expected: TIMEOUT
- [WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
- expected: FAIL
-
- [Overall test]
- expected: NOTRUN
-
- [WebGL test #1: context does not exist]
- expected: FAIL
+ disabled: https://github.com/servo/servo/issues/21132
diff --git a/tests/wpt/webgl/meta/conformance/canvas/to-data-url-test.html.ini b/tests/wpt/webgl/meta/conformance/canvas/to-data-url-test.html.ini
index 69d8b8e101a..14afaae8222 100644
--- a/tests/wpt/webgl/meta/conformance/canvas/to-data-url-test.html.ini
+++ b/tests/wpt/webgl/meta/conformance/canvas/to-data-url-test.html.ini
@@ -1,6 +1,2 @@
[to-data-url-test.html]
- type: testharness
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/context/constants-and-properties.html.ini b/tests/wpt/webgl/meta/conformance/context/constants-and-properties.html.ini
deleted file mode 100644
index 49434267629..00000000000
--- a/tests/wpt/webgl/meta/conformance/context/constants-and-properties.html.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[constants-and-properties.html]
- [WebGL test #2: Also found the following extra properties:]
- expected: FAIL
-
- [WebGL test #3: STENCIL_INDEX]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/context/context-attribute-preserve-drawing-buffer.html.ini b/tests/wpt/webgl/meta/conformance/context/context-attribute-preserve-drawing-buffer.html.ini
index 18cb75d37cc..38b543e7694 100644
--- a/tests/wpt/webgl/meta/conformance/context/context-attribute-preserve-drawing-buffer.html.ini
+++ b/tests/wpt/webgl/meta/conformance/context/context-attribute-preserve-drawing-buffer.html.ini
@@ -1,7 +1,3 @@
[context-attribute-preserve-drawing-buffer.html]
bug: https://github.com/servo/servo/issues/21132
- type: testharness
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/context/context-attributes-alpha-depth-stencil-antialias.html.ini b/tests/wpt/webgl/meta/conformance/context/context-attributes-alpha-depth-stencil-antialias.html.ini
index 7752255f254..7148f2289e2 100644
--- a/tests/wpt/webgl/meta/conformance/context/context-attributes-alpha-depth-stencil-antialias.html.ini
+++ b/tests/wpt/webgl/meta/conformance/context/context-attributes-alpha-depth-stencil-antialias.html.ini
@@ -1,6 +1,5 @@
[context-attributes-alpha-depth-stencil-antialias.html]
bug: https://github.com/servo/servo/issues/21285
- type: testharness
[WebGL test #96: redChannels[0\] != 255 && redChannels[0\] != 0 should be true. Was false.]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/context/context-creation-and-destruction.html.ini b/tests/wpt/webgl/meta/conformance/context/context-creation-and-destruction.html.ini
deleted file mode 100644
index fbdc89a8f0d..00000000000
--- a/tests/wpt/webgl/meta/conformance/context/context-creation-and-destruction.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[context-creation-and-destruction.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/context/context-creation.html.ini b/tests/wpt/webgl/meta/conformance/context/context-creation.html.ini
deleted file mode 100644
index 393e42df192..00000000000
--- a/tests/wpt/webgl/meta/conformance/context/context-creation.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[context-creation.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/context/context-lost.html.ini b/tests/wpt/webgl/meta/conformance/context/context-lost.html.ini
index 0b2ab4ba9fb..3f92b028f75 100644
--- a/tests/wpt/webgl/meta/conformance/context/context-lost.html.ini
+++ b/tests/wpt/webgl/meta/conformance/context/context-lost.html.ini
@@ -1,6 +1,5 @@
[context-lost.html]
bug: https://github.com/servo/servo/issues/15266
- type: testharness
[WebGL test #0: gl.isContextLost() should be false. Threw exception TypeError: gl.isContextLost is not a function]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/context/premultiplyalpha-test.html.ini b/tests/wpt/webgl/meta/conformance/context/premultiplyalpha-test.html.ini
index bbb8ef50003..5494eb69348 100644
--- a/tests/wpt/webgl/meta/conformance/context/premultiplyalpha-test.html.ini
+++ b/tests/wpt/webgl/meta/conformance/context/premultiplyalpha-test.html.ini
@@ -1,16 +1,74 @@
[premultiplyalpha-test.html]
bug: https://github.com/servo/servo/issues/21132
- type: testharness
- expected: ERROR
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [WebGL test #1: gl.getContextAttributes().premultipliedAlpha should be true. Threw exception TypeError: gl is null]
+ [WebGL test #5: context does not exist]
expected: FAIL
- [WebGL test #2: gl.getContextAttributes().preserveDrawingBuffer should be true. Threw exception TypeError: gl is null]
+ [WebGL test #3: context does not exist]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #6: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #11: context does not exist]
+ expected: FAIL
+
+ [WebGL test #13: context does not exist]
+ expected: FAIL
+
+ [WebGL test #18: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #14: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #20: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #4: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #15: context does not exist]
+ expected: FAIL
+
+ [WebGL test #23: context does not exist]
+ expected: FAIL
+
+ [WebGL test #17: context does not exist]
+ expected: FAIL
+
+ [WebGL test #8: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #22: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #10: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #21: context does not exist]
+ expected: FAIL
+
+ [WebGL test #2: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #1: context does not exist]
+ expected: FAIL
+
+ [WebGL test #19: context does not exist]
+ expected: FAIL
+
+ [WebGL test #7: context does not exist]
+ expected: FAIL
+
+ [WebGL test #9: context does not exist]
+ expected: FAIL
+
+ [WebGL test #16: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
+
+ [WebGL test #12: Unable to fetch WebGL rendering context for Canvas]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-canvas.html.ini b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-canvas.html.ini
index fd84608b919..0e07d05eaed 100644
--- a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-canvas.html.ini
+++ b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-canvas.html.ini
@@ -1,5 +1,423 @@
[oes-texture-float-with-canvas.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
+ bug: https://github.com/servo/servo/issues/11681
+ prefs: [dom.canvas-text.enabled:true]
+ [WebGL test #285: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #155: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #258: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #115: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #261: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #50: font missing]
+ expected: FAIL
+
+ [WebGL test #249: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #17: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #130: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #45: font missing]
+ expected: FAIL
+
+ [WebGL test #32: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #282: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #112: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #138: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #37: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #135: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #129: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #139: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #42: font missing]
+ expected: FAIL
+
+ [WebGL test #290: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #252: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #316: font missing]
+ expected: FAIL
+
+ [WebGL test #270: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #18: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #40: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #244: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #264: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #123: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #330: font missing]
+ expected: FAIL
+
+ [WebGL test #344: font missing]
+ expected: FAIL
+
+ [WebGL test #348: font missing]
+ expected: FAIL
+
+ [WebGL test #262: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #273: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #278: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #268: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #272: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #158: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #322: font missing]
+ expected: FAIL
+
+ [WebGL test #350: font missing]
+ expected: FAIL
+
+ [WebGL test #124: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #159: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #256: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #160: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #319: font missing]
+ expected: FAIL
+
+ [WebGL test #167: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #147: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #271: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #295: font missing]
+ expected: FAIL
+
+ [WebGL test #15: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #144: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #279: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #325: font missing]
+ expected: FAIL
+
+ [WebGL test #39: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #253: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #283: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #336: font missing]
+ expected: FAIL
+
+ [WebGL test #19: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #151: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #117: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #255: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #153: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #126: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #265: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #307: font missing]
+ expected: FAIL
+
+ [WebGL test #34: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #277: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #121: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #342: font missing]
+ expected: FAIL
+
+ [WebGL test #149: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #247: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #31: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #163: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #243: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #166: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #14: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #133: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #334: font missing]
+ expected: FAIL
+
+ [WebGL test #280: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #340: font missing]
+ expected: FAIL
+
+ [WebGL test #301: font missing]
+ expected: FAIL
+
+ [WebGL test #11: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #304: font missing]
+ expected: FAIL
+
+ [WebGL test #238: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #127: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #132: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #234: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #120: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #156: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #267: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #164: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #136: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #298: font missing]
+ expected: FAIL
+
+ [WebGL test #157: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #246: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #35: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #287: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #118: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #241: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #286: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #313: font missing]
+ expected: FAIL
+
+ [WebGL test #38: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #332: font missing]
+ expected: FAIL
+
+ [WebGL test #338: font missing]
+ expected: FAIL
+
+ [WebGL test #170: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #289: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #150: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #281: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #12: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #152: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #276: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #154: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #240: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #148: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #284: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #310: font missing]
+ expected: FAIL
+
+ [WebGL test #145: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #142: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #231: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #274: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #111: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #232: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #237: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #169: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #288: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #292: font missing]
+ expected: FAIL
+
+ [WebGL test #20: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #114: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #275: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #269: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #235: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #328: font missing]
+ expected: FAIL
+
+ [WebGL test #162: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #165: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #168: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #161: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #250: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #141: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #259: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #48: font missing]
+ expected: FAIL
+
+ [WebGL test #346: font missing]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-video.html.ini b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-video.html.ini
index 09a57e2fd03..33ad2bfcaa5 100644
--- a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-video.html.ini
+++ b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-float-with-video.html.ini
@@ -1,3 +1,2 @@
[oes-texture-float-with-video.html]
- type: testharness
disabled: flaky
diff --git a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-canvas.html.ini b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-canvas.html.ini
index c37d9af94f1..43b9bc28566 100644
--- a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-canvas.html.ini
+++ b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-canvas.html.ini
@@ -1,5 +1,423 @@
[oes-texture-half-float-with-canvas.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
+ bug: https://github.com/servo/servo/issues/11681
+ prefs: [dom.canvas-text.enabled:true]
+ [WebGL test #285: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #155: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #258: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #115: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #261: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #50: font missing]
+ expected: FAIL
+
+ [WebGL test #249: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #17: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #130: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #45: font missing]
+ expected: FAIL
+
+ [WebGL test #32: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #282: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #112: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #37: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #135: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #129: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #139: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #290: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #252: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #316: font missing]
+ expected: FAIL
+
+ [WebGL test #270: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #18: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #40: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #244: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #264: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #123: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #330: font missing]
+ expected: FAIL
+
+ [WebGL test #344: font missing]
+ expected: FAIL
+
+ [WebGL test #348: font missing]
+ expected: FAIL
+
+ [WebGL test #262: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #273: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #278: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #268: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #272: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #158: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #322: font missing]
+ expected: FAIL
+
+ [WebGL test #350: font missing]
+ expected: FAIL
+
+ [WebGL test #124: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #159: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #256: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #160: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #319: font missing]
+ expected: FAIL
+
+ [WebGL test #167: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #147: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #271: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #295: font missing]
+ expected: FAIL
+
+ [WebGL test #15: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #144: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #279: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #138: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #325: font missing]
+ expected: FAIL
+
+ [WebGL test #39: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #253: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #283: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #336: font missing]
+ expected: FAIL
+
+ [WebGL test #19: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #151: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #117: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #255: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #153: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #126: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #265: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #307: font missing]
+ expected: FAIL
+
+ [WebGL test #34: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #277: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #121: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #342: font missing]
+ expected: FAIL
+
+ [WebGL test #149: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #247: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #31: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #163: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #243: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #166: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #14: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #334: font missing]
+ expected: FAIL
+
+ [WebGL test #280: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #340: font missing]
+ expected: FAIL
+
+ [WebGL test #301: font missing]
+ expected: FAIL
+
+ [WebGL test #42: font missing]
+ expected: FAIL
+
+ [WebGL test #11: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #304: font missing]
+ expected: FAIL
+
+ [WebGL test #238: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #127: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #132: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #234: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #120: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #156: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #267: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #164: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #136: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #298: font missing]
+ expected: FAIL
+
+ [WebGL test #157: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #246: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #35: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #287: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #118: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #241: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #286: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #133: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #313: font missing]
+ expected: FAIL
+
+ [WebGL test #38: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #332: font missing]
+ expected: FAIL
+
+ [WebGL test #338: font missing]
+ expected: FAIL
+
+ [WebGL test #170: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #289: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #150: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #281: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #12: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #152: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #154: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #240: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #148: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #284: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #310: font missing]
+ expected: FAIL
+
+ [WebGL test #145: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #142: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #231: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #274: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #111: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #232: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #237: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #169: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #288: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #292: font missing]
+ expected: FAIL
+
+ [WebGL test #20: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #114: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #275: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #269: shouldBe 127,0,0,127\nat (0, 16) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #235: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #328: font missing]
+ expected: FAIL
+
+ [WebGL test #162: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #165: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #168: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #161: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #276: shouldBe 0,127,0,127\nat (0, 0) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #250: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #141: shouldBe 127,0,0,127\nat (0, 0) expected: 127,0,0,127 was 255,0,0,255]
+ expected: FAIL
+
+ [WebGL test #259: shouldBe 0,127,0,127\nat (0, 16) expected: 0,127,0,127 was 0,255,0,255]
+ expected: FAIL
+
+ [WebGL test #48: font missing]
+ expected: FAIL
+
+ [WebGL test #346: font missing]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-video.html.ini b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-video.html.ini
index d8fe0d94541..be102e25930 100644
--- a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-video.html.ini
+++ b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float-with-video.html.ini
@@ -1,3 +1,2 @@
[oes-texture-half-float-with-video.html]
- type: testharness
disabled: flaky
diff --git a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float.html.ini b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float.html.ini
index 7b42fd6ba4e..ae272da2b67 100644
--- a/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float.html.ini
+++ b/tests/wpt/webgl/meta/conformance/extensions/oes-texture-half-float.html.ini
@@ -1,2 +1,4 @@
[oes-texture-half-float.html]
- expected: CRASH
+ [WebGL test #72: RGBA/HALF_FLOAT_OES is color renderable but EXT_color_buffer_half_float not exposed]
+ expected: FAIL
+
diff --git a/tests/wpt/webgl/meta/conformance/extensions/oes-vertex-array-object.html.ini b/tests/wpt/webgl/meta/conformance/extensions/oes-vertex-array-object.html.ini
deleted file mode 100644
index 6afc852b104..00000000000
--- a/tests/wpt/webgl/meta/conformance/extensions/oes-vertex-array-object.html.ini
+++ /dev/null
@@ -1,25 +0,0 @@
-[oes-vertex-array-object.html]
- [WebGL test #74: References from unbound VAOs keep Color buffer alive]
- expected: FAIL
-
- [WebGL test #65: References from unbound VAOs keep Color buffer alive]
- expected: FAIL
-
- [WebGL test #68: References from unbound VAOs keep Color buffer alive]
- expected: FAIL
-
- [WebGL test #73: References from unbound VAOs keep Position buffer alive.]
- expected: FAIL
-
- [WebGL test #71: References from unbound VAOs keep Color buffer alive]
- expected: FAIL
-
- [WebGL test #70: References from unbound VAOs keep Position buffer alive.]
- expected: FAIL
-
- [WebGL test #64: References from unbound VAOs keep Position buffer alive.]
- expected: FAIL
-
- [WebGL test #67: References from unbound VAOs keep Position buffer alive.]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/extensions/webgl-compressed-texture-size-limit.html.ini b/tests/wpt/webgl/meta/conformance/extensions/webgl-compressed-texture-size-limit.html.ini
deleted file mode 100644
index 9c170c8b179..00000000000
--- a/tests/wpt/webgl/meta/conformance/extensions/webgl-compressed-texture-size-limit.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[webgl-compressed-texture-size-limit.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/glsl/misc/fragcolor-fragdata-invariant.html.ini b/tests/wpt/webgl/meta/conformance/glsl/misc/fragcolor-fragdata-invariant.html.ini
index f5143fe976b..fa994fe46fe 100644
--- a/tests/wpt/webgl/meta/conformance/glsl/misc/fragcolor-fragdata-invariant.html.ini
+++ b/tests/wpt/webgl/meta/conformance/glsl/misc/fragcolor-fragdata-invariant.html.ini
@@ -1,4 +1,5 @@
[fragcolor-fragdata-invariant.html]
+ bug: https://github.com/servo/servo/issues/20601
[WebGL test #0: [unexpected fragment shader compile status\] (expected: true) Declaring both gl_FragColor and gl_FragData invariant should succeed.]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-define-line-continuation.frag.html.ini b/tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-define-line-continuation.frag.html.ini
index 82784a41789..3cec98dc4f4 100644
--- a/tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-define-line-continuation.frag.html.ini
+++ b/tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-define-line-continuation.frag.html.ini
@@ -1,6 +1,5 @@
[shader-with-define-line-continuation.frag.html]
bug: https://github.com/servo/servo/issues/20601
- type: testharness
[WebGL test #0: [unexpected link status\] fragment shader that uses line continuation macro should fail]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html.ini b/tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html.ini
index ff4fa64687c..3dea79c1ee4 100644
--- a/tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html.ini
+++ b/tests/wpt/webgl/meta/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html.ini
@@ -1,6 +1,5 @@
[shader-with-global-variable-precision-mismatch.html]
bug: https://github.com/servo/servo/issues/20601
- type: testharness
[WebGL test #0: [unexpected link status\] mismatching precision for uniforms causes link error (as expected)]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-uniform-structs.html.ini b/tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-uniform-structs.html.ini
index 48290ecd18b..d850997fcfa 100644
--- a/tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-uniform-structs.html.ini
+++ b/tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-uniform-structs.html.ini
@@ -1,6 +1,5 @@
[shaders-with-uniform-structs.html]
bug: https://github.com/servo/servo/issues/20601
- type: testharness
[WebGL test #5: [unexpected link status\] Structures must have the same type definitions (including precision) to be considered the same type.]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-varyings.html.ini b/tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-varyings.html.ini
index 0563bd133c0..1908ca52e4d 100644
--- a/tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-varyings.html.ini
+++ b/tests/wpt/webgl/meta/conformance/glsl/misc/shaders-with-varyings.html.ini
@@ -1,6 +1,5 @@
[shaders-with-varyings.html]
bug: https://github.com/servo/servo/issues/20601
- type: testharness
[WebGL test #3: [unexpected link status\] vertex shader with unused varying and fragment shader with used varying must succeed]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/misc/expando-loss.html.ini b/tests/wpt/webgl/meta/conformance/misc/expando-loss.html.ini
deleted file mode 100644
index 2d422270afb..00000000000
--- a/tests/wpt/webgl/meta/conformance/misc/expando-loss.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[expando-loss.html]
- expected: CRASH
diff --git a/tests/wpt/webgl/meta/conformance/misc/type-conversion-test.html.ini b/tests/wpt/webgl/meta/conformance/misc/type-conversion-test.html.ini
deleted file mode 100644
index ee430a66dcd..00000000000
--- a/tests/wpt/webgl/meta/conformance/misc/type-conversion-test.html.ini
+++ /dev/null
@@ -1,21 +0,0 @@
-[type-conversion-test.html]
- bug: https://github.com/servo/servo/issues/20513
- type: testharness
- [WebGL test #340: context.bufferData(context.ARRAY_BUFFER, argument, context.STATIC_DRAW) should be undefined. Threw exception TypeError: Not an ArrayBufferView]
- expected: FAIL
-
- [WebGL test #407: context.bufferData(context.ARRAY_BUFFER, argument, context.STATIC_DRAW) should be undefined. Threw exception TypeError: Not an ArrayBufferView]
- expected: FAIL
-
- [WebGL test #474: context.bufferData(context.ARRAY_BUFFER, argument, context.STATIC_DRAW) should be undefined. Threw exception TypeError: Not an ArrayBufferView]
- expected: FAIL
-
- [WebGL test #541: context.bufferData(context.ARRAY_BUFFER, argument, context.STATIC_DRAW) should be undefined. Threw exception TypeError: Not an ArrayBufferView]
- expected: FAIL
-
- [WebGL test #608: context.bufferData(context.ARRAY_BUFFER, argument, context.STATIC_DRAW) should be undefined. Threw exception TypeError: Not an ArrayBufferView]
- expected: FAIL
-
- [WebGL test #675: context.bufferData(context.ARRAY_BUFFER, argument, context.STATIC_DRAW) should be undefined. Threw exception TypeError: Not an ArrayBufferView]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/misc/uninitialized-test.html.ini b/tests/wpt/webgl/meta/conformance/misc/uninitialized-test.html.ini
index e2c703fa830..801199f6c06 100644
--- a/tests/wpt/webgl/meta/conformance/misc/uninitialized-test.html.ini
+++ b/tests/wpt/webgl/meta/conformance/misc/uninitialized-test.html.ini
@@ -1,3 +1,2 @@
[uninitialized-test.html]
- type: testharness
disabled: https://github.com/servo/servo/issues/13710
diff --git a/tests/wpt/webgl/meta/conformance/more/conformance/methods.html.ini b/tests/wpt/webgl/meta/conformance/more/conformance/methods.html.ini
index d1512202b46..3e10a31ecb3 100644
--- a/tests/wpt/webgl/meta/conformance/more/conformance/methods.html.ini
+++ b/tests/wpt/webgl/meta/conformance/more/conformance/methods.html.ini
@@ -1,5 +1,5 @@
[methods.html]
- type: testharness
+ bug: https://github.com/servo/servo/issues/15266
[WebGL test #0: testOES20Methods]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/more/conformance/quickCheckAPI-S_V.html.ini b/tests/wpt/webgl/meta/conformance/more/conformance/quickCheckAPI-S_V.html.ini
index 4e8b19fdb8e..0f3b0f5348b 100644
--- a/tests/wpt/webgl/meta/conformance/more/conformance/quickCheckAPI-S_V.html.ini
+++ b/tests/wpt/webgl/meta/conformance/more/conformance/quickCheckAPI-S_V.html.ini
@@ -1,3 +1,2 @@
[quickCheckAPI-S_V.html]
- type: testharness
- expected: CRASH
+ disabled: https://github.com/servo/servo/issues/10656
diff --git a/tests/wpt/webgl/meta/conformance/more/functions/readPixelsBadArgs.html.ini b/tests/wpt/webgl/meta/conformance/more/functions/readPixelsBadArgs.html.ini
index 9a9f6552193..ad3520119fa 100644
--- a/tests/wpt/webgl/meta/conformance/more/functions/readPixelsBadArgs.html.ini
+++ b/tests/wpt/webgl/meta/conformance/more/functions/readPixelsBadArgs.html.ini
@@ -1,4 +1,5 @@
[readPixelsBadArgs.html]
+ bug: https://github.com/servo/servo/issues/21522
[WebGL test #1: testReadPixelsSOPIMG]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/more/functions/texImage2DHTML.html.ini b/tests/wpt/webgl/meta/conformance/more/functions/texImage2DHTML.html.ini
index dd19783929a..ba52b864738 100644
--- a/tests/wpt/webgl/meta/conformance/more/functions/texImage2DHTML.html.ini
+++ b/tests/wpt/webgl/meta/conformance/more/functions/texImage2DHTML.html.ini
@@ -1,4 +1,5 @@
[texImage2DHTML.html]
+ bug: https://github.com/servo/servo/issues/21522
[WebGL test #1: testTexImage2DNonSOP]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/more/functions/texSubImage2DHTML.html.ini b/tests/wpt/webgl/meta/conformance/more/functions/texSubImage2DHTML.html.ini
index fe1d4f074b1..823e2d127d3 100644
--- a/tests/wpt/webgl/meta/conformance/more/functions/texSubImage2DHTML.html.ini
+++ b/tests/wpt/webgl/meta/conformance/more/functions/texSubImage2DHTML.html.ini
@@ -1,4 +1,5 @@
[texSubImage2DHTML.html]
+ bug: https://github.com/servo/servo/issues/21522
[WebGL test #1: testTexImage2DNonSOP]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/more/functions/vertexAttribPointerBadArgs.html.ini b/tests/wpt/webgl/meta/conformance/more/functions/vertexAttribPointerBadArgs.html.ini
deleted file mode 100644
index bdc03ee11ea..00000000000
--- a/tests/wpt/webgl/meta/conformance/more/functions/vertexAttribPointerBadArgs.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[vertexAttribPointerBadArgs.html]
- [WebGL test #0: testVertexAttribPointerVBO]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/reading/read-pixels-pack-alignment.html.ini b/tests/wpt/webgl/meta/conformance/reading/read-pixels-pack-alignment.html.ini
index d5b3c59a27d..0109d0a68c1 100644
--- a/tests/wpt/webgl/meta/conformance/reading/read-pixels-pack-alignment.html.ini
+++ b/tests/wpt/webgl/meta/conformance/reading/read-pixels-pack-alignment.html.ini
@@ -1,5 +1,4 @@
[read-pixels-pack-alignment.html]
- type: testharness
[WebGL test #17: pixel should be 255,102,0,255. Was 0,0,0,0.]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/reading/read-pixels-test.html.ini b/tests/wpt/webgl/meta/conformance/reading/read-pixels-test.html.ini
index 22325f1fe6d..0766d440b08 100644
--- a/tests/wpt/webgl/meta/conformance/reading/read-pixels-test.html.ini
+++ b/tests/wpt/webgl/meta/conformance/reading/read-pixels-test.html.ini
@@ -1,4 +1,3 @@
[read-pixels-test.html]
- type: testharness
- expected: TIMEOUT
bug: https://github.com/servo/servo/issues/14380
+ expected: TIMEOUT
diff --git a/tests/wpt/webgl/meta/conformance/renderbuffers/depth-renderbuffer-initialization.html.ini b/tests/wpt/webgl/meta/conformance/renderbuffers/depth-renderbuffer-initialization.html.ini
index fd3c531dd7b..260119f179a 100644
--- a/tests/wpt/webgl/meta/conformance/renderbuffers/depth-renderbuffer-initialization.html.ini
+++ b/tests/wpt/webgl/meta/conformance/renderbuffers/depth-renderbuffer-initialization.html.ini
@@ -1,3 +1,2 @@
[depth-renderbuffer-initialization.html]
- type: testharness
disabled: https://github.com/servo/servo/issues/13710
diff --git a/tests/wpt/webgl/meta/conformance/renderbuffers/feedback-loop.html.ini b/tests/wpt/webgl/meta/conformance/renderbuffers/feedback-loop.html.ini
index 38e546a86c2..8f49daa21c3 100644
--- a/tests/wpt/webgl/meta/conformance/renderbuffers/feedback-loop.html.ini
+++ b/tests/wpt/webgl/meta/conformance/renderbuffers/feedback-loop.html.ini
@@ -1,6 +1,5 @@
[feedback-loop.html]
bug: https://github.com/servo/servo/issues/21288
- type: testharness
[WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : after draw with invalid feedback loop]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-object-attachment.html.ini b/tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-object-attachment.html.ini
index 07b83234bcd..13211175427 100644
--- a/tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-object-attachment.html.ini
+++ b/tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-object-attachment.html.ini
@@ -1,5 +1,4 @@
[framebuffer-object-attachment.html]
- type: testharness
expected: CRASH
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-state-restoration.html.ini b/tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-state-restoration.html.ini
index 5ce1ded25ed..8a7bc8a443f 100644
--- a/tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-state-restoration.html.ini
+++ b/tests/wpt/webgl/meta/conformance/renderbuffers/framebuffer-state-restoration.html.ini
@@ -1,9 +1,7 @@
[framebuffer-state-restoration.html]
- type: testharness
- expected: ERROR
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/renderbuffers/renderbuffer-initialization.html.ini b/tests/wpt/webgl/meta/conformance/renderbuffers/renderbuffer-initialization.html.ini
index f3b0b2e6ae9..526aac9b953 100644
--- a/tests/wpt/webgl/meta/conformance/renderbuffers/renderbuffer-initialization.html.ini
+++ b/tests/wpt/webgl/meta/conformance/renderbuffers/renderbuffer-initialization.html.ini
@@ -1,3 +1,2 @@
[renderbuffer-initialization.html]
- type: testharness
disabled: https://github.com/servo/servo/issues/13710
diff --git a/tests/wpt/webgl/meta/conformance/renderbuffers/stencil-renderbuffer-initialization.html.ini b/tests/wpt/webgl/meta/conformance/renderbuffers/stencil-renderbuffer-initialization.html.ini
index 1a24372dade..536f038a85d 100644
--- a/tests/wpt/webgl/meta/conformance/renderbuffers/stencil-renderbuffer-initialization.html.ini
+++ b/tests/wpt/webgl/meta/conformance/renderbuffers/stencil-renderbuffer-initialization.html.ini
@@ -1,3 +1,2 @@
[stencil-renderbuffer-initialization.html]
- type: testharness
disabled: https://github.com/servo/servo/issues/13710
diff --git a/tests/wpt/webgl/meta/conformance/rendering/draw-elements-out-of-bounds.html.ini b/tests/wpt/webgl/meta/conformance/rendering/draw-elements-out-of-bounds.html.ini
deleted file mode 100644
index d6d1e0ab2cb..00000000000
--- a/tests/wpt/webgl/meta/conformance/rendering/draw-elements-out-of-bounds.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[draw-elements-out-of-bounds.html]
- [WebGL test #0: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: gl.drawElements(gl.TRIANGLES, 0, gl.UNSIGNED_BYTE, 0)]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/rendering/framebuffer-switch.html.ini b/tests/wpt/webgl/meta/conformance/rendering/framebuffer-switch.html.ini
index caf83d8f27c..e6657730f7f 100644
--- a/tests/wpt/webgl/meta/conformance/rendering/framebuffer-switch.html.ini
+++ b/tests/wpt/webgl/meta/conformance/rendering/framebuffer-switch.html.ini
@@ -1,6 +1,3 @@
[framebuffer-switch.html]
- type: testharness
+ bug: https://github.com/servo/servo/issues/8984
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/rendering/framebuffer-texture-switch.html.ini b/tests/wpt/webgl/meta/conformance/rendering/framebuffer-texture-switch.html.ini
index 225cad06f3b..53a1115bd9e 100644
--- a/tests/wpt/webgl/meta/conformance/rendering/framebuffer-texture-switch.html.ini
+++ b/tests/wpt/webgl/meta/conformance/rendering/framebuffer-texture-switch.html.ini
@@ -1,6 +1,3 @@
[framebuffer-texture-switch.html]
- type: testharness
+ bug: https://github.com/servo/servo/issues/8984
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/rendering/multisample-corruption.html.ini b/tests/wpt/webgl/meta/conformance/rendering/multisample-corruption.html.ini
index 9daae1eb19c..a9db337a983 100644
--- a/tests/wpt/webgl/meta/conformance/rendering/multisample-corruption.html.ini
+++ b/tests/wpt/webgl/meta/conformance/rendering/multisample-corruption.html.ini
@@ -1,10 +1,8 @@
[multisample-corruption.html]
bug: https://github.com/servo/servo/issues/21132
- type: testharness
- expected: ERROR
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/rendering/preservedrawingbuffer-leak.html.ini b/tests/wpt/webgl/meta/conformance/rendering/preservedrawingbuffer-leak.html.ini
index fa212fcc5b5..74771cdf1ca 100644
--- a/tests/wpt/webgl/meta/conformance/rendering/preservedrawingbuffer-leak.html.ini
+++ b/tests/wpt/webgl/meta/conformance/rendering/preservedrawingbuffer-leak.html.ini
@@ -1,8 +1,8 @@
[preservedrawingbuffer-leak.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-alpha-alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-alpha-alpha-unsigned_byte.html.ini
deleted file mode 100644
index df505cbab41..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-alpha-alpha-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-alpha-alpha-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini
index d55c52bdf01..53ce1411a40 100644
--- a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini
@@ -1,11 +1,87 @@
[tex-2d-luminance-luminance-unsigned_byte.html]
- expected: TIMEOUT
- [WebGL test #1: shouldBe 0,0,0,255\nat (0, 0) expected: 0,0,0,255 was 182,182,182,255]
+ bug: https://github.com/servo/servo/issues/11681
+ prefs: [dom.canvas-text.enabled:true]
+ [WebGL test #33: font missing]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #245: font missing]
+ expected: FAIL
+
+ [WebGL test #39: font missing]
+ expected: FAIL
+
+ [WebGL test #251: font missing]
+ expected: FAIL
+
+ [WebGL test #275: font missing]
+ expected: FAIL
+
+ [WebGL test #273: font missing]
+ expected: FAIL
+
+ [WebGL test #237: font missing]
+ expected: FAIL
+
+ [WebGL test #233: font missing]
+ expected: FAIL
+
+ [WebGL test #249: font missing]
+ expected: FAIL
+
+ [WebGL test #265: font missing]
+ expected: FAIL
+
+ [WebGL test #269: font missing]
+ expected: FAIL
+
+ [WebGL test #255: font missing]
+ expected: FAIL
+
+ [WebGL test #277: font missing]
+ expected: FAIL
+
+ [WebGL test #259: font missing]
+ expected: FAIL
+
+ [WebGL test #253: font missing]
+ expected: FAIL
+
+ [WebGL test #271: font missing]
+ expected: FAIL
+
+ [WebGL test #247: font missing]
+ expected: FAIL
+
+ [WebGL test #263: font missing]
+ expected: FAIL
+
+ [WebGL test #235: font missing]
+ expected: FAIL
+
+ [WebGL test #37: font missing]
+ expected: FAIL
+
+ [WebGL test #35: font missing]
+ expected: FAIL
+
+ [WebGL test #241: font missing]
+ expected: FAIL
+
+ [WebGL test #267: font missing]
+ expected: FAIL
+
+ [WebGL test #261: font missing]
+ expected: FAIL
+
+ [WebGL test #279: font missing]
+ expected: FAIL
+
+ [WebGL test #257: font missing]
+ expected: FAIL
+
+ [WebGL test #243: font missing]
+ expected: FAIL
- [WebGL test #0: shouldBe 255,255,255,255\nat (0, 16) expected: 255,255,255,255 was 54,54,54,255]
+ [WebGL test #239: font missing]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
index c2c977c3f51..c50401634ea 100644
--- a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
@@ -1,11 +1,87 @@
[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
- expected: TIMEOUT
- [WebGL test #1: shouldBe 0,0,0,255\nat (0, 0) expected: 0,0,0,255 was 182,182,182,255]
+ bug: https://github.com/servo/servo/issues/11681
+ prefs: [dom.canvas-text.enabled:true]
+ [WebGL test #245: font missing]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #251: font missing]
+ expected: FAIL
+
+ [WebGL test #265: font missing]
+ expected: FAIL
+
+ [WebGL test #39: font missing]
+ expected: FAIL
+
+ [WebGL test #33: font missing]
+ expected: FAIL
+
+ [WebGL test #275: font missing]
+ expected: FAIL
+
+ [WebGL test #237: font missing]
+ expected: FAIL
+
+ [WebGL test #273: font missing]
+ expected: FAIL
+
+ [WebGL test #277: font missing]
+ expected: FAIL
+
+ [WebGL test #239: font missing]
+ expected: FAIL
+
+ [WebGL test #249: font missing]
+ expected: FAIL
+
+ [WebGL test #267: font missing]
+ expected: FAIL
+
+ [WebGL test #241: font missing]
+ expected: FAIL
+
+ [WebGL test #255: font missing]
+ expected: FAIL
+
+ [WebGL test #233: font missing]
+ expected: FAIL
+
+ [WebGL test #37: font missing]
+ expected: FAIL
+
+ [WebGL test #253: font missing]
+ expected: FAIL
+
+ [WebGL test #271: font missing]
+ expected: FAIL
+
+ [WebGL test #247: font missing]
+ expected: FAIL
+
+ [WebGL test #263: font missing]
+ expected: FAIL
+
+ [WebGL test #259: font missing]
+ expected: FAIL
+
+ [WebGL test #35: font missing]
+ expected: FAIL
+
+ [WebGL test #261: font missing]
+ expected: FAIL
+
+ [WebGL test #279: font missing]
+ expected: FAIL
+
+ [WebGL test #257: font missing]
+ expected: FAIL
+
+ [WebGL test #243: font missing]
+ expected: FAIL
+
+ [WebGL test #235: font missing]
+ expected: FAIL
- [WebGL test #0: shouldBe 255,255,255,255\nat (0, 16) expected: 255,255,255,255 was 54,54,54,255]
+ [WebGL test #269: font missing]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini
index db7310c69ac..b01cbb25241 100644
--- a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini
@@ -1,5 +1,339 @@
[tex-2d-rgb-rgb-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
+ bug: https://github.com/servo/servo/issues/11681
+ prefs: [dom.canvas-text.enabled:true]
+ [WebGL test #399: font missing]
+ expected: FAIL
+
+ [WebGL test #77: font missing]
+ expected: FAIL
+
+ [WebGL test #1095: font missing]
+ expected: FAIL
+
+ [WebGL test #159: font missing]
+ expected: FAIL
+
+ [WebGL test #635: font missing]
+ expected: FAIL
+
+ [WebGL test #841: font missing]
+ expected: FAIL
+
+ [WebGL test #839: font missing]
+ expected: FAIL
+
+ [WebGL test #75: font missing]
+ expected: FAIL
+
+ [WebGL test #377: font missing]
+ expected: FAIL
+
+ [WebGL test #877: font missing]
+ expected: FAIL
+
+ [WebGL test #619: font missing]
+ expected: FAIL
+
+ [WebGL test #1091: font missing]
+ expected: FAIL
+
+ [WebGL test #855: font missing]
+ expected: FAIL
+
+ [WebGL test #387: font missing]
+ expected: FAIL
+
+ [WebGL test #607: font missing]
+ expected: FAIL
+
+ [WebGL test #833: font missing]
+ expected: FAIL
+
+ [WebGL test #157: font missing]
+ expected: FAIL
+
+ [WebGL test #615: font missing]
+ expected: FAIL
+
+ [WebGL test #601: font missing]
+ expected: FAIL
+
+ [WebGL test #639: font missing]
+ expected: FAIL
+
+ [WebGL test #875: font missing]
+ expected: FAIL
+
+ [WebGL test #621: font missing]
+ expected: FAIL
+
+ [WebGL test #835: font missing]
+ expected: FAIL
+
+ [WebGL test #593: font missing]
+ expected: FAIL
+
+ [WebGL test #37: font missing]
+ expected: FAIL
+
+ [WebGL test #627: font missing]
+ expected: FAIL
+
+ [WebGL test #861: font missing]
+ expected: FAIL
+
+ [WebGL test #369: font missing]
+ expected: FAIL
+
+ [WebGL test #1117: font missing]
+ expected: FAIL
+
+ [WebGL test #637: font missing]
+ expected: FAIL
+
+ [WebGL test #629: font missing]
+ expected: FAIL
+
+ [WebGL test #79: font missing]
+ expected: FAIL
+
+ [WebGL test #371: font missing]
+ expected: FAIL
+
+ [WebGL test #1113: font missing]
+ expected: FAIL
+
+ [WebGL test #1073: font missing]
+ expected: FAIL
+
+ [WebGL test #397: font missing]
+ expected: FAIL
+
+ [WebGL test #1115: font missing]
+ expected: FAIL
+
+ [WebGL test #859: font missing]
+ expected: FAIL
+
+ [WebGL test #357: font missing]
+ expected: FAIL
+
+ [WebGL test #597: font missing]
+ expected: FAIL
+
+ [WebGL test #1101: font missing]
+ expected: FAIL
+
+ [WebGL test #603: font missing]
+ expected: FAIL
+
+ [WebGL test #613: font missing]
+ expected: FAIL
+
+ [WebGL test #843: font missing]
+ expected: FAIL
+
+ [WebGL test #871: font missing]
+ expected: FAIL
+
+ [WebGL test #625: font missing]
+ expected: FAIL
+
+ [WebGL test #35: font missing]
+ expected: FAIL
+
+ [WebGL test #1075: font missing]
+ expected: FAIL
+
+ [WebGL test #1119: font missing]
+ expected: FAIL
+
+ [WebGL test #595: font missing]
+ expected: FAIL
+
+ [WebGL test #867: font missing]
+ expected: FAIL
+
+ [WebGL test #385: font missing]
+ expected: FAIL
+
+ [WebGL test #119: font missing]
+ expected: FAIL
+
+ [WebGL test #863: font missing]
+ expected: FAIL
+
+ [WebGL test #623: font missing]
+ expected: FAIL
+
+ [WebGL test #1105: font missing]
+ expected: FAIL
+
+ [WebGL test #1097: font missing]
+ expected: FAIL
+
+ [WebGL test #153: font missing]
+ expected: FAIL
+
+ [WebGL test #1103: font missing]
+ expected: FAIL
+
+ [WebGL test #1085: font missing]
+ expected: FAIL
+
+ [WebGL test #115: font missing]
+ expected: FAIL
+
+ [WebGL test #1083: font missing]
+ expected: FAIL
+
+ [WebGL test #869: font missing]
+ expected: FAIL
+
+ [WebGL test #611: font missing]
+ expected: FAIL
+
+ [WebGL test #617: font missing]
+ expected: FAIL
+
+ [WebGL test #73: font missing]
+ expected: FAIL
+
+ [WebGL test #1111: font missing]
+ expected: FAIL
+
+ [WebGL test #599: font missing]
+ expected: FAIL
+
+ [WebGL test #365: font missing]
+ expected: FAIL
+
+ [WebGL test #375: font missing]
+ expected: FAIL
+
+ [WebGL test #361: font missing]
+ expected: FAIL
+
+ [WebGL test #879: font missing]
+ expected: FAIL
+
+ [WebGL test #1079: font missing]
+ expected: FAIL
+
+ [WebGL test #849: font missing]
+ expected: FAIL
+
+ [WebGL test #633: font missing]
+ expected: FAIL
+
+ [WebGL test #353: font missing]
+ expected: FAIL
+
+ [WebGL test #865: font missing]
+ expected: FAIL
+
+ [WebGL test #837: font missing]
+ expected: FAIL
+
+ [WebGL test #1081: font missing]
+ expected: FAIL
+
+ [WebGL test #847: font missing]
+ expected: FAIL
+
+ [WebGL test #389: font missing]
+ expected: FAIL
+
+ [WebGL test #33: font missing]
+ expected: FAIL
+
+ [WebGL test #117: font missing]
+ expected: FAIL
+
+ [WebGL test #113: font missing]
+ expected: FAIL
+
+ [WebGL test #1089: font missing]
+ expected: FAIL
+
+ [WebGL test #379: font missing]
+ expected: FAIL
+
+ [WebGL test #605: font missing]
+ expected: FAIL
+
+ [WebGL test #359: font missing]
+ expected: FAIL
+
+ [WebGL test #39: font missing]
+ expected: FAIL
+
+ [WebGL test #853: font missing]
+ expected: FAIL
+
+ [WebGL test #857: font missing]
+ expected: FAIL
+
+ [WebGL test #1099: font missing]
+ expected: FAIL
+
+ [WebGL test #393: font missing]
+ expected: FAIL
+
+ [WebGL test #395: font missing]
+ expected: FAIL
+
+ [WebGL test #1077: font missing]
+ expected: FAIL
+
+ [WebGL test #155: font missing]
+ expected: FAIL
+
+ [WebGL test #873: font missing]
+ expected: FAIL
+
+ [WebGL test #391: font missing]
+ expected: FAIL
+
+ [WebGL test #1087: font missing]
+ expected: FAIL
+
+ [WebGL test #381: font missing]
+ expected: FAIL
+
+ [WebGL test #367: font missing]
+ expected: FAIL
+
+ [WebGL test #373: font missing]
+ expected: FAIL
+
+ [WebGL test #631: font missing]
+ expected: FAIL
+
+ [WebGL test #383: font missing]
+ expected: FAIL
+
+ [WebGL test #1109: font missing]
+ expected: FAIL
+
+ [WebGL test #1107: font missing]
+ expected: FAIL
+
+ [WebGL test #609: font missing]
+ expected: FAIL
+
+ [WebGL test #363: font missing]
+ expected: FAIL
+
+ [WebGL test #851: font missing]
+ expected: FAIL
+
+ [WebGL test #1093: font missing]
+ expected: FAIL
+
+ [WebGL test #355: font missing]
+ expected: FAIL
+
+ [WebGL test #845: font missing]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
index a991e224bc2..6226d0542a1 100644
--- a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
@@ -1,5 +1,87 @@
[tex-2d-rgb-rgb-unsigned_short_5_6_5.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
+ bug: https://github.com/servo/servo/issues/11681
+ prefs: [dom.canvas-text.enabled:true]
+ [WebGL test #273: font missing]
+ expected: FAIL
+
+ [WebGL test #241: font missing]
+ expected: FAIL
+
+ [WebGL test #257: font missing]
+ expected: FAIL
+
+ [WebGL test #33: font missing]
+ expected: FAIL
+
+ [WebGL test #251: font missing]
+ expected: FAIL
+
+ [WebGL test #261: font missing]
+ expected: FAIL
+
+ [WebGL test #39: font missing]
+ expected: FAIL
+
+ [WebGL test #265: font missing]
+ expected: FAIL
+
+ [WebGL test #275: font missing]
+ expected: FAIL
+
+ [WebGL test #269: font missing]
+ expected: FAIL
+
+ [WebGL test #239: font missing]
+ expected: FAIL
+
+ [WebGL test #245: font missing]
+ expected: FAIL
+
+ [WebGL test #267: font missing]
+ expected: FAIL
+
+ [WebGL test #237: font missing]
+ expected: FAIL
+
+ [WebGL test #247: font missing]
+ expected: FAIL
+
+ [WebGL test #233: font missing]
+ expected: FAIL
+
+ [WebGL test #255: font missing]
+ expected: FAIL
+
+ [WebGL test #277: font missing]
+ expected: FAIL
+
+ [WebGL test #249: font missing]
+ expected: FAIL
+
+ [WebGL test #271: font missing]
+ expected: FAIL
+
+ [WebGL test #279: font missing]
+ expected: FAIL
+
+ [WebGL test #259: font missing]
+ expected: FAIL
+
+ [WebGL test #37: font missing]
+ expected: FAIL
+
+ [WebGL test #35: font missing]
+ expected: FAIL
+
+ [WebGL test #263: font missing]
+ expected: FAIL
+
+ [WebGL test #235: font missing]
+ expected: FAIL
+
+ [WebGL test #243: font missing]
+ expected: FAIL
+
+ [WebGL test #253: font missing]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini
index 8749093a15d..6f6121a6040 100644
--- a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini
@@ -1,5 +1,339 @@
[tex-2d-rgba-rgba-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
+ bug: https://github.com/servo/servo/issues/11681
+ prefs: [dom.canvas-text.enabled:true]
+ [WebGL test #399: font missing]
+ expected: FAIL
+
+ [WebGL test #77: font missing]
+ expected: FAIL
+
+ [WebGL test #1095: font missing]
+ expected: FAIL
+
+ [WebGL test #159: font missing]
+ expected: FAIL
+
+ [WebGL test #1105: font missing]
+ expected: FAIL
+
+ [WebGL test #635: font missing]
+ expected: FAIL
+
+ [WebGL test #841: font missing]
+ expected: FAIL
+
+ [WebGL test #839: font missing]
+ expected: FAIL
+
+ [WebGL test #75: font missing]
+ expected: FAIL
+
+ [WebGL test #1113: font missing]
+ expected: FAIL
+
+ [WebGL test #619: font missing]
+ expected: FAIL
+
+ [WebGL test #863: font missing]
+ expected: FAIL
+
+ [WebGL test #609: font missing]
+ expected: FAIL
+
+ [WebGL test #1091: font missing]
+ expected: FAIL
+
+ [WebGL test #855: font missing]
+ expected: FAIL
+
+ [WebGL test #387: font missing]
+ expected: FAIL
+
+ [WebGL test #607: font missing]
+ expected: FAIL
+
+ [WebGL test #155: font missing]
+ expected: FAIL
+
+ [WebGL test #615: font missing]
+ expected: FAIL
+
+ [WebGL test #849: font missing]
+ expected: FAIL
+
+ [WebGL test #601: font missing]
+ expected: FAIL
+
+ [WebGL test #397: font missing]
+ expected: FAIL
+
+ [WebGL test #639: font missing]
+ expected: FAIL
+
+ [WebGL test #875: font missing]
+ expected: FAIL
+
+ [WebGL test #621: font missing]
+ expected: FAIL
+
+ [WebGL test #835: font missing]
+ expected: FAIL
+
+ [WebGL test #593: font missing]
+ expected: FAIL
+
+ [WebGL test #861: font missing]
+ expected: FAIL
+
+ [WebGL test #37: font missing]
+ expected: FAIL
+
+ [WebGL test #1073: font missing]
+ expected: FAIL
+
+ [WebGL test #877: font missing]
+ expected: FAIL
+
+ [WebGL test #627: font missing]
+ expected: FAIL
+
+ [WebGL test #369: font missing]
+ expected: FAIL
+
+ [WebGL test #637: font missing]
+ expected: FAIL
+
+ [WebGL test #617: font missing]
+ expected: FAIL
+
+ [WebGL test #629: font missing]
+ expected: FAIL
+
+ [WebGL test #79: font missing]
+ expected: FAIL
+
+ [WebGL test #371: font missing]
+ expected: FAIL
+
+ [WebGL test #879: font missing]
+ expected: FAIL
+
+ [WebGL test #1115: font missing]
+ expected: FAIL
+
+ [WebGL test #859: font missing]
+ expected: FAIL
+
+ [WebGL test #357: font missing]
+ expected: FAIL
+
+ [WebGL test #1085: font missing]
+ expected: FAIL
+
+ [WebGL test #833: font missing]
+ expected: FAIL
+
+ [WebGL test #613: font missing]
+ expected: FAIL
+
+ [WebGL test #1087: font missing]
+ expected: FAIL
+
+ [WebGL test #597: font missing]
+ expected: FAIL
+
+ [WebGL test #1101: font missing]
+ expected: FAIL
+
+ [WebGL test #603: font missing]
+ expected: FAIL
+
+ [WebGL test #865: font missing]
+ expected: FAIL
+
+ [WebGL test #843: font missing]
+ expected: FAIL
+
+ [WebGL test #871: font missing]
+ expected: FAIL
+
+ [WebGL test #35: font missing]
+ expected: FAIL
+
+ [WebGL test #1075: font missing]
+ expected: FAIL
+
+ [WebGL test #1119: font missing]
+ expected: FAIL
+
+ [WebGL test #595: font missing]
+ expected: FAIL
+
+ [WebGL test #1093: font missing]
+ expected: FAIL
+
+ [WebGL test #385: font missing]
+ expected: FAIL
+
+ [WebGL test #119: font missing]
+ expected: FAIL
+
+ [WebGL test #623: font missing]
+ expected: FAIL
+
+ [WebGL test #153: font missing]
+ expected: FAIL
+
+ [WebGL test #1103: font missing]
+ expected: FAIL
+
+ [WebGL test #115: font missing]
+ expected: FAIL
+
+ [WebGL test #611: font missing]
+ expected: FAIL
+
+ [WebGL test #1083: font missing]
+ expected: FAIL
+
+ [WebGL test #869: font missing]
+ expected: FAIL
+
+ [WebGL test #157: font missing]
+ expected: FAIL
+
+ [WebGL test #1089: font missing]
+ expected: FAIL
+
+ [WebGL test #73: font missing]
+ expected: FAIL
+
+ [WebGL test #1111: font missing]
+ expected: FAIL
+
+ [WebGL test #599: font missing]
+ expected: FAIL
+
+ [WebGL test #365: font missing]
+ expected: FAIL
+
+ [WebGL test #375: font missing]
+ expected: FAIL
+
+ [WebGL test #361: font missing]
+ expected: FAIL
+
+ [WebGL test #605: font missing]
+ expected: FAIL
+
+ [WebGL test #1079: font missing]
+ expected: FAIL
+
+ [WebGL test #625: font missing]
+ expected: FAIL
+
+ [WebGL test #633: font missing]
+ expected: FAIL
+
+ [WebGL test #353: font missing]
+ expected: FAIL
+
+ [WebGL test #837: font missing]
+ expected: FAIL
+
+ [WebGL test #1081: font missing]
+ expected: FAIL
+
+ [WebGL test #853: font missing]
+ expected: FAIL
+
+ [WebGL test #867: font missing]
+ expected: FAIL
+
+ [WebGL test #389: font missing]
+ expected: FAIL
+
+ [WebGL test #1097: font missing]
+ expected: FAIL
+
+ [WebGL test #33: font missing]
+ expected: FAIL
+
+ [WebGL test #117: font missing]
+ expected: FAIL
+
+ [WebGL test #113: font missing]
+ expected: FAIL
+
+ [WebGL test #379: font missing]
+ expected: FAIL
+
+ [WebGL test #1109: font missing]
+ expected: FAIL
+
+ [WebGL test #359: font missing]
+ expected: FAIL
+
+ [WebGL test #39: font missing]
+ expected: FAIL
+
+ [WebGL test #847: font missing]
+ expected: FAIL
+
+ [WebGL test #857: font missing]
+ expected: FAIL
+
+ [WebGL test #1099: font missing]
+ expected: FAIL
+
+ [WebGL test #393: font missing]
+ expected: FAIL
+
+ [WebGL test #395: font missing]
+ expected: FAIL
+
+ [WebGL test #1077: font missing]
+ expected: FAIL
+
+ [WebGL test #377: font missing]
+ expected: FAIL
+
+ [WebGL test #873: font missing]
+ expected: FAIL
+
+ [WebGL test #391: font missing]
+ expected: FAIL
+
+ [WebGL test #381: font missing]
+ expected: FAIL
+
+ [WebGL test #367: font missing]
+ expected: FAIL
+
+ [WebGL test #373: font missing]
+ expected: FAIL
+
+ [WebGL test #631: font missing]
+ expected: FAIL
+
+ [WebGL test #383: font missing]
+ expected: FAIL
+
+ [WebGL test #1117: font missing]
+ expected: FAIL
+
+ [WebGL test #1107: font missing]
+ expected: FAIL
+
+ [WebGL test #363: font missing]
+ expected: FAIL
+
+ [WebGL test #355: font missing]
+ expected: FAIL
+
+ [WebGL test #845: font missing]
+ expected: FAIL
+
+ [WebGL test #851: font missing]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
index 73bba4ac28e..e66399ff638 100644
--- a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
@@ -1,5 +1,87 @@
[tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
+ bug: https://github.com/servo/servo/issues/11681
+ prefs: [dom.canvas-text.enabled:true]
+ [WebGL test #241: font missing]
+ expected: FAIL
+
+ [WebGL test #257: font missing]
+ expected: FAIL
+
+ [WebGL test #33: font missing]
+ expected: FAIL
+
+ [WebGL test #245: font missing]
+ expected: FAIL
+
+ [WebGL test #251: font missing]
+ expected: FAIL
+
+ [WebGL test #273: font missing]
+ expected: FAIL
+
+ [WebGL test #265: font missing]
+ expected: FAIL
+
+ [WebGL test #39: font missing]
+ expected: FAIL
+
+ [WebGL test #275: font missing]
+ expected: FAIL
+
+ [WebGL test #239: font missing]
+ expected: FAIL
+
+ [WebGL test #279: font missing]
+ expected: FAIL
+
+ [WebGL test #267: font missing]
+ expected: FAIL
+
+ [WebGL test #235: font missing]
+ expected: FAIL
+
+ [WebGL test #237: font missing]
+ expected: FAIL
+
+ [WebGL test #261: font missing]
+ expected: FAIL
+
+ [WebGL test #255: font missing]
+ expected: FAIL
+
+ [WebGL test #277: font missing]
+ expected: FAIL
+
+ [WebGL test #249: font missing]
+ expected: FAIL
+
+ [WebGL test #233: font missing]
+ expected: FAIL
+
+ [WebGL test #271: font missing]
+ expected: FAIL
+
+ [WebGL test #247: font missing]
+ expected: FAIL
+
+ [WebGL test #259: font missing]
+ expected: FAIL
+
+ [WebGL test #37: font missing]
+ expected: FAIL
+
+ [WebGL test #35: font missing]
+ expected: FAIL
+
+ [WebGL test #263: font missing]
+ expected: FAIL
+
+ [WebGL test #243: font missing]
+ expected: FAIL
+
+ [WebGL test #253: font missing]
+ expected: FAIL
+
+ [WebGL test #269: font missing]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
index d014f432f89..62f1079f2c2 100644
--- a/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
@@ -1,5 +1,87 @@
[tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
+ bug: https://github.com/servo/servo/issues/11681
+ prefs: [dom.canvas-text.enabled:true]
+ [WebGL test #241: font missing]
+ expected: FAIL
+
+ [WebGL test #273: font missing]
+ expected: FAIL
+
+ [WebGL test #257: font missing]
+ expected: FAIL
+
+ [WebGL test #33: font missing]
+ expected: FAIL
+
+ [WebGL test #245: font missing]
+ expected: FAIL
+
+ [WebGL test #261: font missing]
+ expected: FAIL
+
+ [WebGL test #249: font missing]
+ expected: FAIL
+
+ [WebGL test #39: font missing]
+ expected: FAIL
+
+ [WebGL test #271: font missing]
+ expected: FAIL
+
+ [WebGL test #269: font missing]
+ expected: FAIL
+
+ [WebGL test #265: font missing]
+ expected: FAIL
+
+ [WebGL test #275: font missing]
+ expected: FAIL
+
+ [WebGL test #267: font missing]
+ expected: FAIL
+
+ [WebGL test #251: font missing]
+ expected: FAIL
+
+ [WebGL test #233: font missing]
+ expected: FAIL
+
+ [WebGL test #239: font missing]
+ expected: FAIL
+
+ [WebGL test #255: font missing]
+ expected: FAIL
+
+ [WebGL test #277: font missing]
+ expected: FAIL
+
+ [WebGL test #279: font missing]
+ expected: FAIL
+
+ [WebGL test #235: font missing]
+ expected: FAIL
+
+ [WebGL test #237: font missing]
+ expected: FAIL
+
+ [WebGL test #247: font missing]
+ expected: FAIL
+
+ [WebGL test #263: font missing]
+ expected: FAIL
+
+ [WebGL test #259: font missing]
+ expected: FAIL
+
+ [WebGL test #37: font missing]
+ expected: FAIL
+
+ [WebGL test #35: font missing]
+ expected: FAIL
+
+ [WebGL test #253: font missing]
+ expected: FAIL
+
+ [WebGL test #243: font missing]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/copy-tex-image-2d-formats.html.ini b/tests/wpt/webgl/meta/conformance/textures/copy-tex-image-2d-formats.html.ini
deleted file mode 100644
index 0d115512ec1..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/copy-tex-image-2d-formats.html.ini
+++ /dev/null
@@ -1,29 +0,0 @@
-[copy-tex-image-2d-formats.html]
- type: testharness
- [WebGL test #16: Creating framebuffer from ALPHA texture succeeded even though it is not a renderable format]
- expected: FAIL
-
- [WebGL test #17: Creating framebuffer from LUMINANCE texture succeeded even though it is not a renderable format]
- expected: FAIL
-
- [WebGL test #18: Creating framebuffer from LUMINANCE_ALPHA texture succeeded even though it is not a renderable format]
- expected: FAIL
-
- [WebGL test #19: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D ALPHA from RGB]
- expected: FAIL
-
- [WebGL test #23: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D LUMINANCE_ALPHA from RGB]
- expected: FAIL
-
- [WebGL test #27: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D RGBA from RGB]
- expected: FAIL
-
- [WebGL test #44: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D ALPHA from RGB]
- expected: FAIL
-
- [WebGL test #48: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D LUMINANCE_ALPHA from RGB]
- expected: FAIL
-
- [WebGL test #52: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D RGBA from RGB]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/copy-tex-image-and-sub-image-2d.html.ini b/tests/wpt/webgl/meta/conformance/textures/copy-tex-image-and-sub-image-2d.html.ini
deleted file mode 100644
index dc04ea5dd65..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/copy-tex-image-and-sub-image-2d.html.ini
+++ /dev/null
@@ -1,578 +0,0 @@
-[copy-tex-image-and-sub-image-2d.html]
- type: testharness
- [WebGL test #85: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #90: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #94: at (0, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #95: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #99: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #100: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #104: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #105: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #109: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #110: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #114: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #119: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #133: at (1, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #135: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #138: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #140: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #142: at (0, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #143: at (1, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #144: at (0, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #145: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #147: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #148: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #149: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #150: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #152: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #153: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #154: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #155: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #157: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #158: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #159: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #160: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #162: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #164: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #165: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #167: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #169: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #170: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #174: at (0, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #175: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #179: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #180: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #183: at (1, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #184: at (0, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #185: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #188: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #189: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #190: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #192: at (0, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #193: at (1, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #194: at (0, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #195: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #197: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #198: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #199: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #200: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #202: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #203: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #204: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #205: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #207: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #208: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #209: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #210: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #212: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #213: at (1, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #214: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #215: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #217: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #218: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #219: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #220: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #222: at (0, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #223: at (1, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #224: at (0, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #225: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #227: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #228: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #229: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #230: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #232: at (0, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #233: at (1, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #234: at (0, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #235: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #237: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #238: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #239: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #240: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #242: at (0, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #243: at (1, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #244: at (0, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #245: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #247: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #248: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #249: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #250: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #336: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #341: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #345: at (0, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #346: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #350: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #351: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #355: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #356: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #360: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #361: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #365: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #370: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #384: at (1, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #386: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #389: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #391: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #393: at (0, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #394: at (1, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #395: at (0, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #396: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #398: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #399: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #400: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #401: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #403: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #404: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #405: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #406: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #408: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #409: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #410: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #411: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #413: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #415: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #416: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #418: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #420: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #421: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #425: at (0, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #426: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #430: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #431: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #434: at (1, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #435: at (0, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #436: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #439: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #440: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #441: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #443: at (0, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #444: at (1, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #445: at (0, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #446: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #448: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #449: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #450: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #451: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #453: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #454: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #455: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #456: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #458: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #459: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #460: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #461: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #463: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #464: at (1, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #465: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #466: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #468: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #469: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #470: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #471: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #473: at (0, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #474: at (1, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #475: at (0, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #476: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #478: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #479: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #480: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #481: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #483: at (0, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #484: at (1, 0) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #485: at (0, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #486: at (1, 1) expected: 0,0,0,0 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #488: at (0, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #489: at (1, 0) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #490: at (0, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #491: at (1, 1) expected: 0,0,0,0 was 128,128,128,128]
- expected: FAIL
-
- [WebGL test #493: at (0, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #494: at (1, 0) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #495: at (0, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #496: at (1, 1) expected: 0,0,0,0 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #498: at (0, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #499: at (1, 0) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #500: at (0, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #501: at (1, 1) expected: 0,0,0,0 was 0,255,0,255]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/gl-pixelstorei.html.ini b/tests/wpt/webgl/meta/conformance/textures/gl-pixelstorei.html.ini
deleted file mode 100644
index efae6fb14de..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/gl-pixelstorei.html.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[gl-pixelstorei.html]
- type: testharness
- expected: ERROR
- [WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
- [WebGL pixelStorei Test]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/image/tex-2d-luminance-luminance-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/image/tex-2d-luminance-luminance-unsigned_byte.html.ini
deleted file mode 100644
index f3a2412525e..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/image/tex-2d-luminance-luminance-unsigned_byte.html.ini
+++ /dev/null
@@ -1,25 +0,0 @@
-[tex-2d-luminance-luminance-unsigned_byte.html]
- [WebGL test #3: shouldBe 0,0,0\nat (4, 24) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #1: shouldBe 255,255,255\nat (4, 24) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #7: shouldBe 0,0,0\nat (4, 24) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #2: shouldBe 255,255,255\nat (4, 4) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #0: shouldBe 0,0,0\nat (4, 4) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #6: shouldBe 255,255,255\nat (4, 4) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #4: shouldBe 0,0,0\nat (4, 4) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #5: shouldBe 255,255,255\nat (4, 24) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/image/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/image/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
deleted file mode 100644
index 4a319cad454..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/image/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
+++ /dev/null
@@ -1,25 +0,0 @@
-[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
- [WebGL test #3: shouldBe 0,0,0\nat (4, 24) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #1: shouldBe 255,255,255\nat (4, 24) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #7: shouldBe 0,0,0\nat (4, 24) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #2: shouldBe 255,255,255\nat (4, 4) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #0: shouldBe 0,0,0\nat (4, 4) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #6: shouldBe 255,255,255\nat (4, 4) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #4: shouldBe 0,0,0\nat (4, 4) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #5: shouldBe 255,255,255\nat (4, 24) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/image_data/tex-2d-luminance-luminance-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/image_data/tex-2d-luminance-luminance-unsigned_byte.html.ini
deleted file mode 100644
index e4b4939efdc..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/image_data/tex-2d-luminance-luminance-unsigned_byte.html.ini
+++ /dev/null
@@ -1,505 +0,0 @@
-[tex-2d-luminance-luminance-unsigned_byte.html]
- [WebGL test #137: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #92: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #1: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #102: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #206: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #184: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #96: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #64: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #69: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #176: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #159: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #143: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #33: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #41: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #106: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #167: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #124: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #108: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #162: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #26: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #73: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #37: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #139: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #10: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #43: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #210: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #70: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #84: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #22: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #58: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #190: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #188: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #144: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #130: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #146: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #65: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #170: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #21: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #75: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #142: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #0: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #67: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #79: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #28: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #90: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #71: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #212: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #19: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #76: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #145: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #35: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #47: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #49: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #120: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #18: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #68: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #178: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #157: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #12: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #72: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #151: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #45: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #3: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #6: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #62: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #198: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #155: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #82: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #98: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #222: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #141: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #192: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #156: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #168: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #53: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #46: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #54: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #172: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #166: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #147: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #78: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #194: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #59: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #140: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #182: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #110: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #132: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #30: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #44: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #174: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #216: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #63: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #5: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #42: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #133: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #134: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #171: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #24: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #131: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #116: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #165: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #163: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #128: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #23: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #161: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #94: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #34: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #136: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #122: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #52: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #148: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #8: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #20: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #158: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #36: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #39: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #186: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #129: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #175: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #173: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #169: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #150: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #160: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #60: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #208: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #48: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #196: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #14: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #164: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #218: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #2: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #7: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #61: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #86: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #202: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #16: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #88: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #66: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #100: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #38: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #149: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #104: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #135: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #50: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #154: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #77: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #200: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #4: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #17: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #214: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #138: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #80: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #55: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #152: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #153: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #74: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #220: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #118: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #114: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #57: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #180: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #40: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #112: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #204: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #126: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #51: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #32: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #56: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/image_data/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/image_data/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
deleted file mode 100644
index a8b5b7d25a4..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/image_data/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
+++ /dev/null
@@ -1,505 +0,0 @@
-[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
- [WebGL test #137: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #92: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #1: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #102: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #206: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #184: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #96: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #64: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #69: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #176: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #159: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #143: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #33: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #41: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #106: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #167: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #124: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #108: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #162: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #26: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #73: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #37: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #139: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #10: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #43: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #210: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #70: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #84: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #22: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #58: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #190: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #188: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #144: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #130: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #146: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #65: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #170: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #21: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #75: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #142: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #0: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #67: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #79: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #28: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #90: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #71: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #212: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #19: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #76: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #145: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #35: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #47: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #49: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #120: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #18: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #68: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #178: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #157: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #12: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #72: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #151: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #45: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #3: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #6: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #62: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #198: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #155: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #82: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #98: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #222: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #141: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #192: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #156: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #168: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #53: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #46: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #54: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #172: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #166: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #147: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #78: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #194: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #59: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #140: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #182: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #110: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #132: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #30: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #44: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #174: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #216: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #63: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #5: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #42: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #133: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #134: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #171: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #24: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #131: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #116: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #165: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #163: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #128: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #23: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #161: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #94: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #34: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #136: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #122: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #52: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #148: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #8: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #20: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #158: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #36: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #39: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #186: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #129: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #175: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #173: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #169: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #150: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #160: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #60: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #208: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #48: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #196: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #14: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #164: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #218: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #2: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #7: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #61: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #86: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #202: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #16: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #88: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #66: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #100: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #38: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #149: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #104: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #135: shouldBe 255,255,255\nat (16, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #50: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #154: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #77: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #200: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #4: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #17: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #214: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #138: shouldBe 255,255,255\nat (0, 16) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #80: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #55: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #152: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #153: shouldBe 0,0,0\nat (16, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #74: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #220: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #118: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #114: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #57: shouldBe 255,255,255\nat (16, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #180: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #40: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #112: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #204: shouldBe 0,0,0\nat (0, 0) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #126: shouldBe 0,0,0\nat (0, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #51: shouldBe 0,0,0\nat (16, 16) expected: 0,0,0 was 182,182,182]
- expected: FAIL
-
- [WebGL test #32: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
- [WebGL test #56: shouldBe 255,255,255\nat (0, 0) expected: 255,255,255 was 54,54,54]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/gl-pixelstorei.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/gl-pixelstorei.html.ini
index d49f208d0e7..aa204678abd 100644
--- a/tests/wpt/webgl/meta/conformance/textures/misc/gl-pixelstorei.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/misc/gl-pixelstorei.html.ini
@@ -1,4 +1,5 @@
[gl-pixelstorei.html]
+ bug: https://github.com/servo/servo/issues/21556
expected: ERROR
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/tex-image-with-format-and-type.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/tex-image-with-format-and-type.html.ini
deleted file mode 100644
index 3394dfafb19..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/misc/tex-image-with-format-and-type.html.ini
+++ /dev/null
@@ -1,37 +0,0 @@
-[tex-image-with-format-and-type.html]
- [WebGL test #31: LUMINANCE_ALPHA/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #6: LUMINANCE/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #65: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_4_4_4_4]
- expected: FAIL
-
- [WebGL test #15: LUMINANCE_ALPHA/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #66: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_5_5_5_1]
- expected: FAIL
-
- [WebGL test #69: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_4_4_4_4]
- expected: FAIL
-
- [WebGL test #7: LUMINANCE_ALPHA/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #70: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_5_5_5_1]
- expected: FAIL
-
- [WebGL test #22: LUMINANCE/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #14: LUMINANCE/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #30: LUMINANCE/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #23: LUMINANCE_ALPHA/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html.ini
index aebccec6d32..9b47471145c 100644
--- a/tests/wpt/webgl/meta/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html.ini
@@ -1,8 +1,8 @@
[tex-video-using-tex-unit-non-zero.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/texture-copying-feedback-loops.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/texture-copying-feedback-loops.html.ini
index fafd1bf22cb..527b3d638d5 100644
--- a/tests/wpt/webgl/meta/conformance/textures/misc/texture-copying-feedback-loops.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/misc/texture-copying-feedback-loops.html.ini
@@ -1,4 +1,5 @@
[texture-copying-feedback-loops.html]
+ bug: https://github.com/servo/servo/issues/21288
[WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : after copyTexImage2D to same texture same level, invalid feedback loop]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/texture-corner-case-videos.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/texture-corner-case-videos.html.ini
index 77fda77e79d..82be9764f19 100644
--- a/tests/wpt/webgl/meta/conformance/textures/misc/texture-corner-case-videos.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/misc/texture-corner-case-videos.html.ini
@@ -1,5 +1,3 @@
[texture-corner-case-videos.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
+ disabled: https://github.com/servo/servo/issues/6711
diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/texture-npot-video.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/texture-npot-video.html.ini
index ea6d468782e..a9b07796ef5 100644
--- a/tests/wpt/webgl/meta/conformance/textures/misc/texture-npot-video.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/misc/texture-npot-video.html.ini
@@ -1,5 +1,3 @@
[texture-npot-video.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
+ disabled: https://github.com/servo/servo/issues/6711
diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/texture-size-limit.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/texture-size-limit.html.ini
deleted file mode 100644
index ed30fb1af9c..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/misc/texture-size-limit.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[texture-size-limit.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini
index acb21a9163d..917f7e454cf 100644
--- a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini
@@ -3,3 +3,6 @@
[Overall test]
expected: NOTRUN
+ [WebGL test #20: could not create image (SVG)]
+ expected: FAIL
+
diff --git a/tests/wpt/webgl/meta/conformance/textures/origin-clean-conformance.html.ini b/tests/wpt/webgl/meta/conformance/textures/origin-clean-conformance.html.ini
deleted file mode 100644
index 0390f6f22cd..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/origin-clean-conformance.html.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[origin-clean-conformance.html]
- type: testharness
- [WebGL test #2: texImage2D with cross-origin image should throw exception.]
- expected: FAIL
-
- [WebGL test #3: texSubImage2D with cross-origin image should throw exception.]
- expected: FAIL
-
- [WebGL test #7: texImage2D with NON origin clean canvas should throw exception.]
- expected: FAIL
-
- [WebGL test #8: texSubImage2D with NON origin clean canvas should throw exception.]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/svg_image/__dir__.ini b/tests/wpt/webgl/meta/conformance/textures/svg_image/__dir__.ini
new file mode 100644
index 00000000000..19de279b4ef
--- /dev/null
+++ b/tests/wpt/webgl/meta/conformance/textures/svg_image/__dir__.ini
@@ -0,0 +1 @@
+disabled: SVG support is not implemented yet
diff --git a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-alpha-alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-alpha-alpha-unsigned_byte.html.ini
deleted file mode 100644
index df505cbab41..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-alpha-alpha-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-alpha-alpha-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-luminance-luminance-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-luminance-luminance-unsigned_byte.html.ini
deleted file mode 100644
index 94b45973cb3..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-luminance-luminance-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-luminance-luminance-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
deleted file mode 100644
index 8c1ea97dfcb..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgb-rgb-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgb-rgb-unsigned_byte.html.ini
deleted file mode 100644
index db7310c69ac..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgb-rgb-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgb-rgb-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini b/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
deleted file mode 100644
index a991e224bc2..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgb-rgb-unsigned_short_5_6_5.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_byte.html.ini
deleted file mode 100644
index 8749093a15d..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgba-rgba-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini b/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
deleted file mode 100644
index 73bba4ac28e..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini b/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
deleted file mode 100644
index d014f432f89..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/svg_image/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html.ini
deleted file mode 100644
index 1d20e0565e2..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[tex-image-and-sub-image-2d-with-canvas-rgb565.html]
- type: testharness
- expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html.ini
deleted file mode 100644
index 00ae17a1715..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[tex-image-and-sub-image-2d-with-canvas-rgba4444.html]
- type: testharness
- expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html.ini
deleted file mode 100644
index 5adc2092e21..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[tex-image-and-sub-image-2d-with-canvas-rgba5551.html]
- type: testharness
- expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html.ini
deleted file mode 100644
index 468299a537d..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[tex-image-and-sub-image-2d-with-canvas.html]
- type: testharness
- expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html.ini
deleted file mode 100644
index 804deaf6a8f..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[tex-image-and-sub-image-2d-with-svg-image.html]
- type: testharness
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html.ini
deleted file mode 100644
index c1aaae7a577..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[tex-image-and-sub-image-2d-with-video-rgb565.html]
- type: testharness
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html.ini
deleted file mode 100644
index d64b5a2230b..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[tex-image-and-sub-image-2d-with-video-rgba4444.html]
- type: testharness
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html.ini
deleted file mode 100644
index d81e40d0a02..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[tex-image-and-sub-image-2d-with-video-rgba5551.html]
- type: testharness
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video.html.ini
deleted file mode 100644
index 7756d0a6fcf..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-video.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[tex-image-and-sub-image-2d-with-video.html]
- type: testharness
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html.ini
deleted file mode 100644
index 8c0e1708eb5..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html.ini
+++ /dev/null
@@ -1,197 +0,0 @@
-[tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html]
- type: testharness
- [WebGL test #0: at (0, 0) expected: 255,0,0 was 255,227,0]
- expected: FAIL
-
- [WebGL test #0: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #1: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #2: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #3: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #4: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #5: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #6: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #7: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #8: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #9: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #10: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #11: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #12: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #13: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #14: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #15: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #16: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #17: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #18: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #19: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #20: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #21: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #22: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #23: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #24: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #25: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #26: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #27: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #28: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #29: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #30: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #31: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #32: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #33: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #34: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #35: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #36: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #37: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #38: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #39: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #40: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #41: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #42: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #43: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #44: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #45: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #46: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #47: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #48: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #49: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #50: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #51: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #52: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #53: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #54: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #55: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #56: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #57: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #58: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #59: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #60: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #61: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #62: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #63: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html.ini
deleted file mode 100644
index 037794850f3..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html.ini
+++ /dev/null
@@ -1,197 +0,0 @@
-[tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html]
- type: testharness
- [WebGL test #0: at (0, 0) expected: 255,0,0 was 255,255,0]
- expected: FAIL
-
- [WebGL test #0: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #1: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #2: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #3: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #4: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #5: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #6: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #7: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #8: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #9: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #10: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #11: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #12: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #13: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #14: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #15: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #16: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #17: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #18: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #19: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #20: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #21: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #22: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #23: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #24: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #25: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #26: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #27: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #28: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #29: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #30: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #31: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #32: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #33: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #34: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #35: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #36: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #37: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #38: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #39: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #40: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #41: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #42: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #43: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #44: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #45: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #46: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #47: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #48: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #49: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #50: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #51: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #52: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #53: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #54: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #55: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #56: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #57: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #58: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #59: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #60: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #61: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #62: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #63: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html.ini
deleted file mode 100644
index 7d1b616ec7e..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html.ini
+++ /dev/null
@@ -1,200 +0,0 @@
-[tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html]
- type: testharness
- [WebGL test #0: at (0, 0) expected: 255,0,0 was 255,231,0]
- expected: FAIL
-
- [WebGL test #0: at (0, 0) expected: 255,0,0 was 255,230,0]
- expected: FAIL
-
- [WebGL test #0: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #1: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #2: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #3: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #4: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #5: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #6: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #7: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #8: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #9: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #10: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #11: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #12: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #13: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #14: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #15: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #16: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #17: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #18: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #19: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #20: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #21: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #22: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #23: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #24: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #25: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #26: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #27: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #28: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #29: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #30: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #31: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #32: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #33: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #34: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #35: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #36: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #37: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #38: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #39: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #40: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #41: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #42: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #43: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #44: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #45: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #46: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #47: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #48: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #49: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #50: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #51: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #52: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #53: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #54: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #55: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #56: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #57: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #58: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #59: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #60: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #61: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #62: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #63: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html.ini
deleted file mode 100644
index 6db32f7c194..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html.ini
+++ /dev/null
@@ -1,197 +0,0 @@
-[tex-image-and-sub-image-2d-with-webgl-canvas.html]
- type: testharness
- [WebGL test #0: at (0, 0) expected: 255,0,0 was 0,255,0]
- expected: FAIL
-
- [WebGL test #0: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #1: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #2: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #3: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #4: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #5: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #6: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #7: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #8: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #9: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #10: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #11: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #12: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #13: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #14: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #15: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #16: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #17: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #18: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #19: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #20: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #21: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #22: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #23: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #24: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #25: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #26: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #27: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #28: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #29: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #30: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #31: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #32: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #33: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #34: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #35: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #36: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #37: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #38: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #39: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #40: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #41: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #42: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #43: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #44: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #45: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #46: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #47: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #48: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #49: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #50: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #51: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #52: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #53: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #54: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #55: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #56: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #57: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #58: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #59: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #60: at (0, 0) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #61: at (0, 16) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #62: at (0, 16) expected: 255,0,0 was 0,0,0]
- expected: FAIL
-
- [WebGL test #63: at (0, 0) expected: 0,255,0 was 0,0,0]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-webgl.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-webgl.html.ini
deleted file mode 100644
index 1242ad05bad..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-webgl.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[tex-image-webgl.html]
- type: testharness
- [WebGL test #2: at (0, 0) expected: 255,0,0,255 was 0,0,0,255]
- expected: FAIL
-
- [WebGL test #3: at (0, 0) expected: 0,255,0,255 was 0,0,0,255]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-image-with-format-and-type.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-image-with-format-and-type.html.ini
deleted file mode 100644
index e9b1ef8bc8b..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-image-with-format-and-type.html.ini
+++ /dev/null
@@ -1,38 +0,0 @@
-[tex-image-with-format-and-type.html]
- type: testharness
- [WebGL test #6: LUMINANCE/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #7: LUMINANCE_ALPHA/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #14: LUMINANCE/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #15: LUMINANCE_ALPHA/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #22: LUMINANCE/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #23: LUMINANCE_ALPHA/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #30: LUMINANCE/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #31: LUMINANCE_ALPHA/UNSIGNED_BYTE should maintain full precision of data]
- expected: FAIL
-
- [WebGL test #65: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_4_4_4_4]
- expected: FAIL
-
- [WebGL test #66: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_5_5_5_1]
- expected: FAIL
-
- [WebGL test #69: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_4_4_4_4]
- expected: FAIL
-
- [WebGL test #70: UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_5_5_5_1]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/tex-input-validation.html.ini b/tests/wpt/webgl/meta/conformance/textures/tex-input-validation.html.ini
deleted file mode 100644
index f91c50e108b..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/tex-input-validation.html.ini
+++ /dev/null
@@ -1,16 +0,0 @@
-[tex-input-validation.html]
- [WebGL test #34: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB565 internalFormat: RGBA target: TEXTURE_2D border: 0]
- expected: FAIL
-
- [WebGL test #37: getError expected: NO_ERROR. Was INVALID_OPERATION : colorBufferFormat: RGB565 internalFormat: RGB target: TEXTURE_2D border: 0]
- expected: FAIL
-
- [WebGL test #45: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB565 internalFormat: RGBA target: TEXTURE_2D]
- expected: FAIL
-
- [WebGL test #53: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB internalFormat: RGBA]
- expected: FAIL
-
- [WebGL test #61: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB internalFormat: RGBA]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/texture-attachment-formats.html.ini b/tests/wpt/webgl/meta/conformance/textures/texture-attachment-formats.html.ini
deleted file mode 100644
index 57985f1badf..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/texture-attachment-formats.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[texture-attachment-formats.html]
- type: testharness
- [WebGL test #14: at (0, 0) expected: 63,63,63,255 was 64,0,0,255]
- expected: FAIL
-
- [WebGL test #16: at (0, 0) expected: 63,63,63,63 was 64,0,0,64]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/texture-copying-feedback-loops.html.ini b/tests/wpt/webgl/meta/conformance/textures/texture-copying-feedback-loops.html.ini
deleted file mode 100644
index bcbe5e893e6..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/texture-copying-feedback-loops.html.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[texture-copying-feedback-loops.html]
- bug: https://github.com/servo/servo/issues/21288
- type: testharness
- [WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : after copyTexImage2D to same texture same level, invalid feedback loop]
- expected: FAIL
-
- [WebGL test #6: getError expected: INVALID_OPERATION. Was NO_ERROR : after copyTexSubImage2D to same texture same level, invalid feedback loop]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/texture-fakeblack.html.ini b/tests/wpt/webgl/meta/conformance/textures/texture-fakeblack.html.ini
deleted file mode 100644
index e3213f8a1f9..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/texture-fakeblack.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[texture-fakeblack.html]
- type: testharness
- [WebGL test #1: at (0, 0) expected: 0,0,0,255 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #3: at (0, 0) expected: 0,0,0,255 was 255,0,0,255]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/texture-npot-video.html.ini b/tests/wpt/webgl/meta/conformance/textures/texture-npot-video.html.ini
deleted file mode 100644
index 2bfaf29fe82..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/texture-npot-video.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[texture-npot-video.html]
- type: testharness
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/texture-npot.html.ini b/tests/wpt/webgl/meta/conformance/textures/texture-npot.html.ini
deleted file mode 100644
index 93f3563ded7..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/texture-npot.html.ini
+++ /dev/null
@@ -1,23 +0,0 @@
-[texture-npot.html]
- type: testharness
- [WebGL test #4: at (0, 0) expected: 0,0,0,255 was 192,0,128,64]
- expected: FAIL
-
- [WebGL test #64: at (0, 0) expected: 0,0,0,255 was 0,192,128,255]
- expected: FAIL
-
- [WebGL test #76: at (0, 0) expected: 0,0,0,255 was 0,192,128,255]
- expected: FAIL
-
- [WebGL test #16: at (0, 0) expected: 0,0,0,255 was 192,0,128,255]
- expected: FAIL
-
- [WebGL test #28: at (0, 0) expected: 0,0,0,255 was 192,192,192,255]
- expected: FAIL
-
- [WebGL test #40: at (0, 0) expected: 0,0,0,255 was 0,0,0,64]
- expected: FAIL
-
- [WebGL test #52: at (0, 0) expected: 0,0,0,255 was 192,192,192,64]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/texture-size-cube-maps.html.ini b/tests/wpt/webgl/meta/conformance/textures/texture-size-cube-maps.html.ini
deleted file mode 100644
index 9466a6ef229..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/texture-size-cube-maps.html.ini
+++ /dev/null
@@ -1,146 +0,0 @@
-[texture-size-cube-maps.html]
- type: testharness
- [WebGL test #7: at (0, 1) expected: 0,255,255,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #8: at (0, 0) expected: 0,255,255,255 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #10: at (0, 0) expected: 255,0,255,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #13: at (0, 1) expected: 255,0,255,255 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #14: at (0, 0) expected: 255,255,0,255 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #17: at (0, 1) expected: 0,0,255,255 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #25: at (0, 1) expected: 255,0,255,255 was 0,255,255,255]
- expected: FAIL
-
- [WebGL test #26: at (0, 0) expected: 255,0,255,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #28: at (0, 0) expected: 255,0,0,255 was 0,255,255,255]
- expected: FAIL
-
- [WebGL test #31: at (0, 1) expected: 255,0,0,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #32: at (0, 0) expected: 0,255,255,255 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #35: at (0, 1) expected: 255,255,0,255 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #44: at (0, 1) expected: 255,0,0,255 was 255,0,255,255]
- expected: FAIL
-
- [WebGL test #45: at (0, 0) expected: 255,0,0,255 was 0,255,255,255]
- expected: FAIL
-
- [WebGL test #47: at (0, 0) expected: 0,255,0,255 was 255,0,255,255]
- expected: FAIL
-
- [WebGL test #50: at (0, 1) expected: 0,255,0,255 was 0,255,255,255]
- expected: FAIL
-
- [WebGL test #51: at (0, 0) expected: 255,0,255,255 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #54: at (0, 1) expected: 0,255,255,255 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #62: at (0, 1) expected: 0,255,0,255 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #63: at (0, 0) expected: 0,255,0,255 was 255,0,255,255]
- expected: FAIL
-
- [WebGL test #65: at (0, 0) expected: 0,0,255,255 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #68: at (0, 1) expected: 0,0,255,255 was 255,0,255,255]
- expected: FAIL
-
- [WebGL test #69: at (0, 0) expected: 255,0,0,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #72: at (0, 1) expected: 255,0,255,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #80: at (0, 1) expected: 0,0,255,255 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #81: at (0, 0) expected: 0,0,255,255 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #83: at (0, 0) expected: 255,255,0,255 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #86: at (0, 1) expected: 255,255,0,255 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #87: at (0, 0) expected: 0,255,0,255 was 0,255,255,255]
- expected: FAIL
-
- [WebGL test #90: at (0, 1) expected: 255,0,0,255 was 0,255,255,255]
- expected: FAIL
-
- [WebGL test #98: at (0, 1) expected: 255,255,0,255 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #99: at (0, 0) expected: 255,255,0,255 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #101: at (0, 0) expected: 0,255,255,255 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #104: at (0, 1) expected: 0,255,255,255 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #105: at (0, 0) expected: 0,0,255,255 was 255,0,255,255]
- expected: FAIL
-
- [WebGL test #108: at (0, 1) expected: 0,255,0,255 was 255,0,255,255]
- expected: FAIL
-
- [WebGL test #116: at (0, 1) expected: 0,255,255,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #117: at (0, 0) expected: 0,255,255,255 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #119: at (0, 0) expected: 255,0,255,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #122: at (0, 1) expected: 255,0,255,255 was 0,0,255,255]
- expected: FAIL
-
- [WebGL test #123: at (0, 0) expected: 255,255,0,255 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #126: at (0, 1) expected: 0,0,255,255 was 255,0,0,255]
- expected: FAIL
-
- [WebGL test #134: at (0, 1) expected: 255,0,255,255 was 0,255,255,255]
- expected: FAIL
-
- [WebGL test #135: at (0, 0) expected: 255,0,255,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #137: at (0, 0) expected: 255,0,0,255 was 0,255,255,255]
- expected: FAIL
-
- [WebGL test #140: at (0, 1) expected: 255,0,0,255 was 255,255,0,255]
- expected: FAIL
-
- [WebGL test #141: at (0, 0) expected: 0,255,255,255 was 0,255,0,255]
- expected: FAIL
-
- [WebGL test #144: at (0, 1) expected: 255,255,0,255 was 0,255,0,255]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/texture-sub-image-cube-maps.html.ini b/tests/wpt/webgl/meta/conformance/textures/texture-sub-image-cube-maps.html.ini
deleted file mode 100644
index 4f8e34db052..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/texture-sub-image-cube-maps.html.ini
+++ /dev/null
@@ -1,116 +0,0 @@
-[texture-sub-image-cube-maps.html]
- type: testharness
- [WebGL test #0: unexpected gl error: INVALID_VALUE]
- expected: FAIL
-
- [WebGL test #1: at (0, 0) expected: 255,0,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #2: at (0, 0) expected: 0,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #3: at (0, 0) expected: 0,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #4: at (0, 0) expected: 255,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #5: at (0, 0) expected: 0,255,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #6: at (0, 0) expected: 255,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #7: at (0, 0) expected: 255,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #8: at (0, 2) expected: 0,255,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #9: at (0, 0) expected: 0,255,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #10: at (0, 2) expected: 0,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #11: at (0, 0) expected: 255,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #12: at (0, 2) expected: 255,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #13: at (0, 0) expected: 0,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #14: at (0, 2) expected: 255,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #15: at (0, 0) expected: 255,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #16: at (0, 2) expected: 255,0,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #17: at (0, 0) expected: 255,0,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #18: at (0, 2) expected: 0,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #19: unexpected gl error: INVALID_VALUE]
- expected: FAIL
-
- [WebGL test #20: at (0, 0) expected: 0,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #21: at (0, 0) expected: 0,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #22: at (0, 0) expected: 255,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #23: at (0, 0) expected: 0,255,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #24: at (0, 0) expected: 255,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #25: at (0, 0) expected: 255,0,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #26: at (0, 0) expected: 0,255,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #27: at (0, 2) expected: 255,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #28: at (0, 0) expected: 255,0,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #29: at (0, 2) expected: 255,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #30: at (0, 0) expected: 255,0,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #31: at (0, 2) expected: 0,255,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #32: at (0, 0) expected: 255,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #33: at (0, 2) expected: 255,0,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #34: at (0, 0) expected: 0,255,255,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #35: at (0, 2) expected: 0,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #36: at (0, 0) expected: 0,255,0,255 was 0,0,0,0]
- expected: FAIL
-
- [WebGL test #37: at (0, 2) expected: 255,255,0,255 was 0,0,0,0]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/texture-upload-size.html.ini b/tests/wpt/webgl/meta/conformance/textures/texture-upload-size.html.ini
deleted file mode 100644
index 8e1092d6c32..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/texture-upload-size.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[texture-upload-size.html]
- type: testharness
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/video/__dir__.ini b/tests/wpt/webgl/meta/conformance/textures/video/__dir__.ini
new file mode 100644
index 00000000000..50edf46e40e
--- /dev/null
+++ b/tests/wpt/webgl/meta/conformance/textures/video/__dir__.ini
@@ -0,0 +1 @@
+disabled: https://github.com/servo/servo/issues/6711
diff --git a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-alpha-alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-alpha-alpha-unsigned_byte.html.ini
deleted file mode 100644
index df505cbab41..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-alpha-alpha-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-alpha-alpha-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html.ini
deleted file mode 100644
index 94b45973cb3..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-luminance-luminance-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
deleted file mode 100644
index 8c1ea97dfcb..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html.ini
deleted file mode 100644
index db7310c69ac..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgb-rgb-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini b/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
deleted file mode 100644
index a991e224bc2..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgb-rgb-unsigned_short_5_6_5.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_byte.html.ini
deleted file mode 100644
index 8749093a15d..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_byte.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgba-rgba-unsigned_byte.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini b/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
deleted file mode 100644
index 73bba4ac28e..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini b/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
deleted file mode 100644
index d014f432f89..00000000000
--- a/tests/wpt/webgl/meta/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-alpha-alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-alpha-alpha-unsigned_byte.html.ini
index ca71a6cfea9..12cb8560a34 100644
--- a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-alpha-alpha-unsigned_byte.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-alpha-alpha-unsigned_byte.html.ini
@@ -1,8 +1,8 @@
[tex-2d-alpha-alpha-unsigned_byte.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini
index d92f71199a8..8f783ef6cd4 100644
--- a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance-luminance-unsigned_byte.html.ini
@@ -1,8 +1,8 @@
[tex-2d-luminance-luminance-unsigned_byte.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
index 622bd20a935..3740984c243 100644
--- a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html.ini
@@ -1,8 +1,8 @@
[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini
index cd4a90bdeb0..165188da97a 100644
--- a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_byte.html.ini
@@ -1,8 +1,8 @@
[tex-2d-rgb-rgb-unsigned_byte.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
index 8db787d12ae..3a190189844 100644
--- a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html.ini
@@ -1,8 +1,8 @@
[tex-2d-rgb-rgb-unsigned_short_5_6_5.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini
index 31b05a79f9c..6ce29315c67 100644
--- a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_byte.html.ini
@@ -1,8 +1,8 @@
[tex-2d-rgba-rgba-unsigned_byte.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
index cc446c5d068..7e33894a200 100644
--- a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html.ini
@@ -1,8 +1,8 @@
[tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
index 12eb2792afb..40496fcde9c 100644
--- a/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html.ini
@@ -1,8 +1,8 @@
[tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html]
- expected: ERROR
+ bug: https://github.com/servo/servo/issues/21132
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
- [Overall test]
- expected: NOTRUN
+ [WebGL test #1: context does not exist]
+ expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance2/buffers/buffer-copying-restrictions.html.ini b/tests/wpt/webgl/meta/conformance2/buffers/buffer-copying-restrictions.html.ini
index e4789d83a93..0e7a8553461 100644
--- a/tests/wpt/webgl/meta/conformance2/buffers/buffer-copying-restrictions.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/buffers/buffer-copying-restrictions.html.ini
@@ -1,5 +1,2 @@
[buffer-copying-restrictions.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/buffers/buffer-type-restrictions.html.ini b/tests/wpt/webgl/meta/conformance2/buffers/buffer-type-restrictions.html.ini
index af0b120221d..c64b5cf871e 100644
--- a/tests/wpt/webgl/meta/conformance2/buffers/buffer-type-restrictions.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/buffers/buffer-type-restrictions.html.ini
@@ -1,5 +1,2 @@
[buffer-type-restrictions.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data-validity.html.ini b/tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data-validity.html.ini
index 6b5cc31216a..f257d44ffa7 100644
--- a/tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data-validity.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data-validity.html.ini
@@ -1,5 +1,2 @@
[get-buffer-sub-data-validity.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data.html.ini b/tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data.html.ini
index 49c14d0ef84..084047aa5aa 100644
--- a/tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/buffers/get-buffer-sub-data.html.ini
@@ -1,8 +1,5 @@
[get-buffer-sub-data.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
[WebGL test #2: gl.getBufferSubData(gl.ARRAY_BUFFER, 0, retArray) threw exception TypeError: gl.getBufferSubData is not a function]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance2/buffers/uniform-buffers-state-restoration.html.ini b/tests/wpt/webgl/meta/conformance2/buffers/uniform-buffers-state-restoration.html.ini
index de2c2b2cad6..7bd6d740747 100644
--- a/tests/wpt/webgl/meta/conformance2/buffers/uniform-buffers-state-restoration.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/buffers/uniform-buffers-state-restoration.html.ini
@@ -1,5 +1,2 @@
[uniform-buffers-state-restoration.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/glsl3/unary-minus-operator-in-dynamic-loop.html.ini b/tests/wpt/webgl/meta/conformance2/glsl3/unary-minus-operator-in-dynamic-loop.html.ini
index 7f0f3515e12..040678e09c8 100644
--- a/tests/wpt/webgl/meta/conformance2/glsl3/unary-minus-operator-in-dynamic-loop.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/glsl3/unary-minus-operator-in-dynamic-loop.html.ini
@@ -1,5 +1,2 @@
[unary-minus-operator-in-dynamic-loop.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/query/occlusion-query.html.ini b/tests/wpt/webgl/meta/conformance2/query/occlusion-query.html.ini
index aaecb221205..927ee6bab5f 100644
--- a/tests/wpt/webgl/meta/conformance2/query/occlusion-query.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/query/occlusion-query.html.ini
@@ -1,5 +1,2 @@
[occlusion-query.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/rendering/canvas-resizing-with-pbo-bound.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/canvas-resizing-with-pbo-bound.html.ini
index d6a3e8f1fcc..dddb52a9724 100644
--- a/tests/wpt/webgl/meta/conformance2/rendering/canvas-resizing-with-pbo-bound.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/rendering/canvas-resizing-with-pbo-bound.html.ini
@@ -1,11 +1,31 @@
[canvas-resizing-with-pbo-bound.html]
- expected: TIMEOUT
- [Overall test]
- expected: NOTRUN
-
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
[WebGL test #1: context does not exist]
expected: FAIL
+ [WebGL test #13: getError expected: NO_ERROR. Was INVALID_ENUM : No GL error]
+ expected: FAIL
+
+ [WebGL test #26: Pixel unpack buffer binding was lost]
+ expected: FAIL
+
+ [WebGL test #20: Pixel unpack buffer binding was lost]
+ expected: FAIL
+
+ [WebGL test #19: getError expected: NO_ERROR. Was INVALID_ENUM : No GL error]
+ expected: FAIL
+
+ [WebGL test #25: getError expected: NO_ERROR. Was INVALID_ENUM : No GL error]
+ expected: FAIL
+
+ [WebGL test #7: getError expected: NO_ERROR. Was INVALID_ENUM : No GL error]
+ expected: FAIL
+
+ [WebGL test #8: Pixel unpack buffer binding was lost]
+ expected: FAIL
+
+ [WebGL test #14: Pixel unpack buffer binding was lost]
+ expected: FAIL
+
diff --git a/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers-driver-hang.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers-driver-hang.html.ini
index a6cc4f523a5..b95640bd1e1 100644
--- a/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers-driver-hang.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers-driver-hang.html.ini
@@ -1,5 +1,2 @@
[draw-buffers-driver-hang.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/sync/sync-webgl-specific.html.ini b/tests/wpt/webgl/meta/conformance2/sync/sync-webgl-specific.html.ini
index 261b5db8e17..dffa002bc9d 100644
--- a/tests/wpt/webgl/meta/conformance2/sync/sync-webgl-specific.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/sync/sync-webgl-specific.html.ini
@@ -1,8 +1,5 @@
[sync-webgl-specific.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
[WebGL test #3: gl.getError() should be 0. Was 1280.]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance2/transform_feedback/same-buffer-two-binding-points.html.ini b/tests/wpt/webgl/meta/conformance2/transform_feedback/same-buffer-two-binding-points.html.ini
index 942d8ac93df..5d90cc6e16d 100644
--- a/tests/wpt/webgl/meta/conformance2/transform_feedback/same-buffer-two-binding-points.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/transform_feedback/same-buffer-two-binding-points.html.ini
@@ -1,5 +1,2 @@
[same-buffer-two-binding-points.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/transform_feedback/simultaneous_binding.html.ini b/tests/wpt/webgl/meta/conformance2/transform_feedback/simultaneous_binding.html.ini
index b16b96f8084..9d27715d328 100644
--- a/tests/wpt/webgl/meta/conformance2/transform_feedback/simultaneous_binding.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/transform_feedback/simultaneous_binding.html.ini
@@ -1,5 +1,2 @@
[simultaneous_binding.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/transform_feedback/switching-objects.html.ini b/tests/wpt/webgl/meta/conformance2/transform_feedback/switching-objects.html.ini
index 146c7c06d7a..3e85820845f 100644
--- a/tests/wpt/webgl/meta/conformance2/transform_feedback/switching-objects.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/transform_feedback/switching-objects.html.ini
@@ -1,5 +1,2 @@
[switching-objects.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/transform_feedback/too-small-buffers.html.ini b/tests/wpt/webgl/meta/conformance2/transform_feedback/too-small-buffers.html.ini
index 3571f1037b9..155f00d8737 100644
--- a/tests/wpt/webgl/meta/conformance2/transform_feedback/too-small-buffers.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/transform_feedback/too-small-buffers.html.ini
@@ -1,5 +1,2 @@
[too-small-buffers.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
diff --git a/tests/wpt/webgl/meta/conformance2/transform_feedback/transform_feedback.html.ini b/tests/wpt/webgl/meta/conformance2/transform_feedback/transform_feedback.html.ini
index 128a77b884d..8c99e9420d6 100644
--- a/tests/wpt/webgl/meta/conformance2/transform_feedback/transform_feedback.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/transform_feedback/transform_feedback.html.ini
@@ -1,8 +1,5 @@
[transform_feedback.html]
expected: ERROR
- [Overall test]
- expected: NOTRUN
-
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : TRANSFORM_FEEDBACK_BINDING query should succeed]
expected: FAIL
diff --git a/tests/wpt/webgl/tests/conformance/buffers/buffer-data-array-buffer-delete.html b/tests/wpt/webgl/tests/conformance/buffers/buffer-data-array-buffer-delete.html
index c2a8d35e1a9..579aa203788 100644
--- a/tests/wpt/webgl/tests/conformance/buffers/buffer-data-array-buffer-delete.html
+++ b/tests/wpt/webgl/tests/conformance/buffers/buffer-data-array-buffer-delete.html
@@ -56,24 +56,28 @@ canvas.addEventListener(
var wtu = WebGLTestUtils;
var gl = wtu.create3DContext(canvas, {preserveDrawingBuffer: true});
-shouldBeNonNull("gl");
-var array = new Float32Array([0]);
-var buf = gl.createBuffer();
-gl.bindBuffer(gl.ARRAY_BUFFER, buf);
-gl.bufferData(gl.ARRAY_BUFFER, array, gl.STATIC_DRAW);
-wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+} else {
+ var array = new Float32Array([0]);
+ var buf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ gl.bufferData(gl.ARRAY_BUFFER, array, gl.STATIC_DRAW);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
-var attribLocation = 1;
-gl.enableVertexAttribArray(attribLocation);
-gl.vertexAttribPointer(attribLocation, 1, gl.FLOAT, false, 0, 0);
+ var attribLocation = 1;
+ gl.enableVertexAttribArray(attribLocation);
+ gl.vertexAttribPointer(attribLocation, 1, gl.FLOAT, false, 0, 0);
-gl.deleteBuffer(buf);
+ gl.deleteBuffer(buf);
-setTimeout(function() {
- // Wait for possible context loss
- finishTest();
-}, 2000);
+ setTimeout(function() {
+ // Wait for possible context loss
+ finishTest();
+ }, 2000);
+}
var successfullyParsed = true;
</script>
diff --git a/tests/wpt/webgl/tests/conformance/canvas/canvas-test.html b/tests/wpt/webgl/tests/conformance/canvas/canvas-test.html
index e1a900a31b5..072f144888a 100644
--- a/tests/wpt/webgl/tests/conformance/canvas/canvas-test.html
+++ b/tests/wpt/webgl/tests/conformance/canvas/canvas-test.html
@@ -57,6 +57,7 @@ var ctx2d = canvas2d.getContext("2d");
var gl = wtu.create3DContext(canvas);
if (!gl) {
testFailed("context does not exist");
+ finishTest();
} else {
testPassed("context exists");
diff --git a/tests/wpt/webgl/tests/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html b/tests/wpt/webgl/tests/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html
index 0770cb5ffc3..35bead3cc5e 100644
--- a/tests/wpt/webgl/tests/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html
+++ b/tests/wpt/webgl/tests/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html
@@ -90,8 +90,8 @@ if (!gl) {
err = gl.getError();
debug("");
- finishTest();
}
+finishTest();
</script>
</body>
diff --git a/tests/wpt/webgl/tests/conformance/canvas/draw-webgl-to-canvas-test.html b/tests/wpt/webgl/tests/conformance/canvas/draw-webgl-to-canvas-test.html
index 45b79bbde40..27f01d41dfe 100644
--- a/tests/wpt/webgl/tests/conformance/canvas/draw-webgl-to-canvas-test.html
+++ b/tests/wpt/webgl/tests/conformance/canvas/draw-webgl-to-canvas-test.html
@@ -93,8 +93,8 @@ if (!gl) {
err = gl.getError();
debug("");
- finishTest();
}
+finishTest();
</script>
</body>
diff --git a/tests/wpt/webgl/tests/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html b/tests/wpt/webgl/tests/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html
index 9cb944a3392..b09b00bfde5 100644
--- a/tests/wpt/webgl/tests/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html
+++ b/tests/wpt/webgl/tests/conformance/canvas/framebuffer-bindings-affected-by-to-data-url.html
@@ -47,6 +47,11 @@ function test() {
var glCanvas = document.getElementById("example");
var gl = wtu.create3DContext(glCanvas, {preserveDrawingBuffer: true, premultipliedAlpha: true});
+ if (!gl) {
+ testFailed("context does not exist");
+ return;
+ }
+
var program = wtu.setupColorQuad(gl);
// Clear backbuffer in red.
diff --git a/tests/wpt/webgl/tests/conformance/canvas/rapid-resizing.html b/tests/wpt/webgl/tests/conformance/canvas/rapid-resizing.html
index 9991e9beec6..cd3dbb8e957 100644
--- a/tests/wpt/webgl/tests/conformance/canvas/rapid-resizing.html
+++ b/tests/wpt/webgl/tests/conformance/canvas/rapid-resizing.html
@@ -29,7 +29,6 @@
<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>
@@ -94,6 +93,8 @@ function nextTest() {
if (!gl) {
testFailed("context does not exist");
+
+ wtu.requestAnimFrame(nextTest);
} else {
testPassed("context exists");
diff --git a/tests/wpt/webgl/tests/conformance/canvas/to-data-url-test.html b/tests/wpt/webgl/tests/conformance/canvas/to-data-url-test.html
index 67e26a408ea..d7e77c86989 100644
--- a/tests/wpt/webgl/tests/conformance/canvas/to-data-url-test.html
+++ b/tests/wpt/webgl/tests/conformance/canvas/to-data-url-test.html
@@ -53,6 +53,7 @@ var main = function() {
if (!gl) {
testFailed("can't create 3d context");
+ finishTest();
return;
}
diff --git a/tests/wpt/webgl/tests/conformance/context/context-attribute-preserve-drawing-buffer.html b/tests/wpt/webgl/tests/conformance/context/context-attribute-preserve-drawing-buffer.html
index 2726815a7c4..64b9e5bf377 100644
--- a/tests/wpt/webgl/tests/conformance/context/context-attribute-preserve-drawing-buffer.html
+++ b/tests/wpt/webgl/tests/conformance/context/context-attribute-preserve-drawing-buffer.html
@@ -84,6 +84,15 @@ function runTest(preserve) {
var ctx1 = c1.getContext('2d');
var ctx2 = c2.getContext('2d');
var gl = wtu.create3DContext(c3, { alpha:false, preserveDrawingBuffer:preserve });
+ if (!gl) {
+ testFailed("context does not exist");
+ if (preserve) {
+ finishTest()
+ } else {
+ runTest(true);
+ }
+ return;
+ }
gl.clearColor(1, 0, 0, 1);
gl.clear(gl.COLOR_BUFFER_BIT);
ctx1.drawImage(c3, 0, 0);
diff --git a/tests/wpt/webgl/tests/conformance/context/context-creation-and-destruction.html b/tests/wpt/webgl/tests/conformance/context/context-creation-and-destruction.html
index 3ad7a02d79c..a3912fcf7ea 100644
--- a/tests/wpt/webgl/tests/conformance/context/context-creation-and-destruction.html
+++ b/tests/wpt/webgl/tests/conformance/context/context-creation-and-destruction.html
@@ -29,7 +29,6 @@
<html>
<head>
<meta charset="utf-8">
-<meta name="timeout" content="long">
<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/webgl/tests/conformance/context/context-creation.html b/tests/wpt/webgl/tests/conformance/context/context-creation.html
index 237258cc9d9..d8685e48fcb 100644
--- a/tests/wpt/webgl/tests/conformance/context/context-creation.html
+++ b/tests/wpt/webgl/tests/conformance/context/context-creation.html
@@ -29,7 +29,6 @@
<html>
<head>
<meta charset="utf-8">
-<meta name="timeout" content="long">
<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/webgl/tests/conformance/context/premultiplyalpha-test.html b/tests/wpt/webgl/tests/conformance/context/premultiplyalpha-test.html
index 4f63c2ef232..6bf9503c359 100644
--- a/tests/wpt/webgl/tests/conformance/context/premultiplyalpha-test.html
+++ b/tests/wpt/webgl/tests/conformance/context/premultiplyalpha-test.html
@@ -175,6 +175,12 @@ function doNextTest() {
+ ", antialias: " + antialias
+ ", imageFormat: " + test.imageFormat);
+ if (!gl) {
+ testFailed("context does not exist");
+ doNextTest();
+ return;
+ }
+
shouldBe('gl.getContextAttributes().premultipliedAlpha', premultipliedAlpha.toString());
shouldBeTrue('gl.getContextAttributes().preserveDrawingBuffer');
diff --git a/tests/wpt/webgl/tests/conformance/renderbuffers/framebuffer-state-restoration.html b/tests/wpt/webgl/tests/conformance/renderbuffers/framebuffer-state-restoration.html
index 4028029e468..dbef36b66f5 100644
--- a/tests/wpt/webgl/tests/conformance/renderbuffers/framebuffer-state-restoration.html
+++ b/tests/wpt/webgl/tests/conformance/renderbuffers/framebuffer-state-restoration.html
@@ -48,6 +48,11 @@ description();
function test() {
var gl = wtu.create3DContext("example", {preserveDrawingBuffer: true});
+ if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+ return;
+ }
var program = wtu.setupColorQuad(gl);
var colorLoc = gl.getUniformLocation(program, "u_color");
gl.enable(gl.DEPTH_TEST);
diff --git a/tests/wpt/webgl/tests/conformance/rendering/multisample-corruption.html b/tests/wpt/webgl/tests/conformance/rendering/multisample-corruption.html
index d3d25e0a876..7de9b47f229 100644
--- a/tests/wpt/webgl/tests/conformance/rendering/multisample-corruption.html
+++ b/tests/wpt/webgl/tests/conformance/rendering/multisample-corruption.html
@@ -51,9 +51,14 @@ debug('Regression test for <a href="https://code.google.com/p/chromium/issues/de
var wtu = WebGLTestUtils;
var gl = wtu.create3DContext("example", {antialias: true, preserveDrawingBuffer: true});
-var test = IterableTest.createMultisampleCorruptionTest(gl);
-var iterations = parseInt(wtu.getUrlOptions().iterations, 10) || 25;
-IterableTest.run(test, iterations);
+if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+} else {
+ var test = IterableTest.createMultisampleCorruptionTest(gl);
+ var iterations = parseInt(wtu.getUrlOptions().iterations, 10) || 25;
+ IterableTest.run(test, iterations);
+}
var successfullyParsed = true;
</script>
diff --git a/tests/wpt/webgl/tests/conformance/rendering/preservedrawingbuffer-leak.html b/tests/wpt/webgl/tests/conformance/rendering/preservedrawingbuffer-leak.html
index bd1dccbdeea..3df53551ef0 100644
--- a/tests/wpt/webgl/tests/conformance/rendering/preservedrawingbuffer-leak.html
+++ b/tests/wpt/webgl/tests/conformance/rendering/preservedrawingbuffer-leak.html
@@ -51,9 +51,14 @@ debug('Regression test for <a href="https://code.google.com/p/chromium/issues/de
var wtu = WebGLTestUtils;
var gl = wtu.create3DContext("example", {preserveDrawingBuffer: true});
-var test = IterableTest.createPreserveDrawingBufferLeakTest(gl);
-var iterations = parseInt(wtu.getUrlOptions().iterations, 10) || 50;
-IterableTest.run(test, iterations);
+if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+} else {
+ var test = IterableTest.createPreserveDrawingBufferLeakTest(gl);
+ var iterations = parseInt(wtu.getUrlOptions().iterations, 10) || 50;
+ IterableTest.run(test, iterations);
+}
var successfullyParsed = true;
</script>
diff --git a/tests/wpt/webgl/tests/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html b/tests/wpt/webgl/tests/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html
index 8db7d43610e..9abe3bd7177 100644
--- a/tests/wpt/webgl/tests/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html
+++ b/tests/wpt/webgl/tests/conformance/textures/misc/tex-video-using-tex-unit-non-zero.html
@@ -71,151 +71,164 @@
<script>
"use strict";
-var wtu = WebGLTestUtils;
-description("Regression test for crbug.com/676719");
+function test() {
+ var wtu = WebGLTestUtils;
+ description("Regression test for crbug.com/676719");
-var gl = wtu.create3DContext("example", {preserveDrawingBuffer: true});
+ var gl = wtu.create3DContext("example", {preserveDrawingBuffer: true});
-var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"],
- ["aVertexPosition", "aTextureCoord"], [0, 1]);
+ if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+ return;
+ }
-if (!gl || !program) {
- testFailed("Test setup failed");
-}
+ var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"],
+ ["aVertexPosition", "aTextureCoord"], [0, 1]);
-var loc0 = gl.getUniformLocation(program, "uTexture0");
-var loc1 = gl.getUniformLocation(program, "uTexture1");
-if (!loc0 || !loc1) {
- testFailed("Failed to query uniform locations");
-}
-gl.uniform1i(loc0, 0);
-gl.uniform1i(loc1, 1);
-
-wtu.setupUnitQuad(gl, 0, 1);
-
-// Load textures
-var imageSrc = "data:type/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AwVEx4QrzHJHAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAABm4SURBVHja7d15eN11nejxT3KSnGxN2qbpku5JWwpdkIIszuCwWWxlExFx7kVleUYF1OHqPMgz3AsyzAVRmasiijrORR2duV4Z2gLKUugIc1kKLWhZuqTQtE26pm3S7Nv9Q6cPe5vfSdq05/V6Hv6g7e8sv3PO97zPb/n+cqpufbovAICskmsVAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAAAQAFYBAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAABYBUAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAANkq70h4Epu/elJWvFjjb3vGOxbIekV5OTF3bEnMqyqN4/70X1VZ2tiajQEAwJEpJ/pixqiifV/27xtXGkeNKoq8lA3YAgAOA5lspbLlh2wypiQv3ldVuu8L/9ixJVGa9lUlAAA4oq34wvFWwkFiGwoACAAAQAAAAAIAABAAAIAAAAAEAAAwZJkHAIDDyt6O7vj9lpZYWd8SK+qbY2X9XvMHZGsADMZMaZleX8DsbQCZ6+7pjTU722Jl/d4//dcSq3e0Rl/kWDkCAIAjRUNTR6xs2Bsr/vRl/2LD3mjr7nvLv/LlLwAAOKKccNcLVoIAIKmRRamYO7YkZo8piemjimLcsIIYW1oQ5YWpKMzLjcK83Ojp64u2rt5o6eyNhubO2NzUEWvfsJltT0evFQkJDSvIjTNrhse88aVx1KjimDw8HaXpVJQWpKKnty9au3qisbU76vZ0xKW/WmMMQACQ3FGjCuP8Y0bFmdXlMXts6QG98Om8VAwvihhfno4TYti+v+vu6Y3lm5vjwdW74tertg/oQPC/PlIdH59TmWjZ2p2tMf8nq6K9py+jx1CYlxMPXzYnaiqKEi3/f/6wPa59YP3b/jzT40bezWBfSfBQX6nwUNz/YN3n8VUlcfXJVXF6dXkU5KXe8d/kpyIK81Mxsrggxg0ryLoxAAHAAMiJvjj/6Iq4/ISxcfz4YQP3pkjlximTyuOUSeVx/V9MjHtf2hHf/n+bo765K+Pbvv6h12JeVUnUVBT3e9maiuK44YxJccMjGzJ6DDeeMTnxl//aHa1x/UOvefPxJmNK8uL2BdVx1rQR/fsM52TfGMDQYR6Aw9TpU8vj0cvnxPfOnz6gH/y3Ki5IxX89bkz87q+Ojes+OCEKMnzHtHX3xefuWxftXT2Jlv/0caPjzycnf75nVJfHp+aNSfbYu3r++Ni7+7wB2eesmvJ47Mq5/f7y/8+v8GwbAxAAJFSezo1vn1MdP//EzJg5uuSg3W9Rfiq++IHx8dvL5sTRlUUZ3dbL29vi5sfqkr1hc3PjjoU1MSzBKDSiMBXfWlid+HHftHRDvLqjzZuQfT45d1T844UzYnhRfrJf8DnZOQYgAOin6RWF8ZvPzImLZlcessdwVGVxLL50VsyfNjyj27ln5bZ4cPXORMuOL0/H38+f0u/lvrGgOkaXJtvnuuSVnfHzF7Z7E7LPR48ZGd9cWBN5qeTDaE4WjwEIAA7QSRNKY/Gls2LyiMJD/liKC1Lx4wunxyVzRmV0O19+cH1s3N2eaNmPza6MhTMOfJPrJ+aMigVHjUx0X6/vaouv/Ga9NyH7nDihNKOtScYABAAHZN64kvjpx4+KssKhc8xmKjc3bl8wNRbMSP4roKmjN65atC66epIdYfz1D0+JUcX7XycTywvia2dOTnQfnd098flF62Jvp6Og36q3NzvXSVk6N+46b1qk3+Uo/35tAcjJ7jEAAcB7qBqWH/d8/KgoTQ+9EzZSublx57nTYs6Y4sS3saKhJb7+u42Jlh1ZXBDf3M+vsJzoi++cUxPDEg6c/3PZxvj9llZvxHeQrYdC3nb21BhXlh6Q28oxBiAAeCd5ORE//Oj0GFmcP2QfY2F+Ku46f1oU5yc/mvn7TzfEsvW7Ey37oWkj4pNz330z5NUnV8WJE8sS3fYjaxvjR89t9UZ8twDI0gI4/5iB2+yds59NANkyBnCIvmOsgqHr6pPHxXFVmZ3e09vbG8te2xOP1e6O5zbvjYbmztjd1h3pvNyoKM6L46pK44ya4XHezJHvOnHJ/lSPLIrrPjgxblya7Mj+yMmJLyxZF49ePifGDOv/L6ubzpwcT25oio17Ot/057NGF8WX/3x8ooe0eU9H/PUD9vvbAjC4cowBCADeqmpYflxzyviMbmPZ+t1xw8Ovx2u7O972d91dvdGypzPq9jTGolca4/bfbYrbzp4SZ9SMSHRfn543Jn66cmvUNnYkWr6xrSe+sKQ2fnnJzEjl9m/DVGk6L759Tk187J9f3neFsHQqJ+48d1qiAa27pzeuXrwudrf3eCO+5xYACZD5FgBjAAKAt/jiB8ZHcUHyg4xuXVYXdz7dcOC/eJs641O/Wh1fO2tyXHHCuH7fX34qN679swlxzZLaxI/5P+qa486n6uNLfzah38ueNLEsPnfiuPj+s1siIuJvT58YMyqT7Zf81pObYvnmvf1e7r2miD3U0+0Ohl7f/2/S09sbyzftjcfX746n65piW0tX7Gjtis7uvigvzIuqsoKYPaY4TplUFmfWDI/hRfnvuQUgG8cABEDWG1mUiotmJ9/PeMeTm/r1wd/3iy5y4sZHN8TE8nTMn97/U+bOmTkybnm8LrbsTT5d6Dee2BQnTyqLkxLst//KqRPisfW7Y0xpQVyWcLa/J17bHd99qj5cblQA9MdjtbvilsfrYvWOdz6tdWdbd+xs644/bG2NX/5+R6RyIs6ePiI+e+JYYwCHjIMAh6CPzRoVRfnJyn/F5ua448lNie+7L3Li+odeTzRVb34qNy7O8LzgvsiJqxeti8bW/g8ghfmpuPO8aXHHwurIze3/W3vb3s64enHtvt0I7Oe1sgsgenp747rfro9Lf7XmXb/833G5vogH1+yK83/+ijEAAcAbK7oi8bI3P1aX8RfYlr1dce9LyWbpW5hwsp03atjbFf/tgWSbEY8ZXZLoFK2e3t744pLa2NnW7Q1oC8CBPf/e3rh6ce2gzBCZ7WMAAiArjShMxbyqZPN7v7KtJdG+63eytHZXouXmjC2NMSWZ71l6pHZP/Gh5w0Fb73c+3RBPbGjyBuzXL8Xs9o/Pb40lrzYaAwZpDEAAZJ0Txpcm2nwdEfHw2l0D9jj+sDX55DfzxpcOyGO45bG6eLFh76Cv82c3NsU3n9jkzdfvLQDZmwCvNbbFrcs2GgMGeQxAAGSV4zK4rOezm5oH7HHsbE1+EM+8qoG5NGl3X8TnF62N5vbB2yzf2NoVVy1a54A2WwD69+v/uS3R0dNnDBjkMYDBZTvNEFMzMvmFPv75E0cPiecwdQAvVrJhd2d89aHX4nvnTx+Ux3rtA7XR4IjlZAGQpQXQ2tkd/3fVDmPAQRoDsAUga0wsTx/2z2FCecGA3t59rzTGL1/cNuCP84fPNsSjtXu86WwD6Jf/2NAUzYN4cShjAAIgS40pzT/sn8PokoF/Djc8/Hqs2T5wF+V5ob45/v5x05bSfyvr9xoDDsEYgAA44pXkpw7751A8CM+hvacvPnvf2mjtzHx63qb27vj8onXRbb8/SQKgocUYcAjGAATAEa8w//B/SYoG6Tms2dke//Zy5vteH1jdGHVvuXAQSWTnhEmb9nQYAw7RGIAAYIjLSw3O2+rYscXx8dmZzzJ28ZxRccpERyln/PU/AN//RXmHX0Q0dbhI1KEaAxAAR7S2rl4r4R2UpXPjBxdMT3y50jdK5ebGnefVxMgimykzGuQHoADK0offa9A8yAFgDEAAZKnWLr8u3skdC2ti0vCBO7Vo7LB0fPfcadl7LtsAKBiAX+9lhYffmciDdf6/MQABkOW2OSf9bS4/fkwsGIT5xU+rHh7XnFJlBSeUzktFToanAs4YVWRFGgM4REwENMRs3NMRc8clm0bz2O88Hztaj6yL2cwZUxw3nD5x0G7/b06dEM9sbB6w+dOzTVF+brR2JY+A2WNKrERjALYAEBGxfld74mVnjSk+otZFaUFu3H3B9EjnDd5+4rxUbtx1/rQYXpi9xwP09Cbf51yezuw3xIkTHIxpDEAAEBERKzL4JXqkDabfWlgdkw/ClKJVZen49jk1WXs8QEcGEyKMzmDSmvFlBXHiBBeNMQYgAIiIiOcz+PBfNHtUxvtkh4rPHDc6o2ui99dZ00bE504aN2i339WT/Fd2YWpwT5XL5KCzmork+/A/Obcy8VXvjAFH/hiAAMg6O9u6Y2V9sit6TSgvjAUzRh6Sxz1rdFH84uKjBuy2/vsZkxIt+1pjWzS2Jpvk57oPTojjxg3OPunO7uQBMG7Y4M6rvr0l+UFnSX9xVg3Lj8+eONYH3hiAAOCNlrzSmHjZv/vQ5BhWcPBe1hkVhfG9c2vit5+ZHX9RPTzj2yvJ/+N+/8IEU4l29fTGNUtq48sPvpbovgvyUvH986dFWXrg19+eDM4d/8DkskF9DRuak8+KuHDGiCjs5+mAOdEXt509NYoLHINsDEAA8Ca/fmlHtCfcLDt2WDp+9NHpg77Z+P3jS+MnF06PpVfMiQtmjRqwTbnfXDA1po5Mtln5H57cFC80tMTD63bHz1ZuTXQbE4cXxj98pGbA19eODH5lX3XyuChPD95Hde3O5AedVZQUxK1nTz3wBfr64o6F1XHmtBE+6MYABABv+7Jo7Y57X9qZePlTpw6Pf7lkZowvG9hNxyMKU3HZvNGx9PLZcd+ls+LsGSMH9EN/6fsq47xjkk31u3xjU3znqfp9/3/Toxti3Y5kVw/88IyRcfnxYwZ03dVlMH/8lBFFsfSKuXHNyePi+KqSqCjKi4H8gffy1swubnPxnMq45UOTY3/Tv08sL4hfXjIzLp472ofcGMAQYBvcEPXdpzbHhbMqEm0Kj4h4/8SyWHbl3Pj+Mw3xs5VbY3vCc4OrR6Tj1CnlsWDGiDhlUtmgzfF9TGVR3HTm5ETLNrd3xzVLaqPvDRenae/pi6sWr4sln5qV6DTCG06fGMs3Nccftg7MJYjX7mjLaPlxZem4/rT+HRcx/rZnDujfPbWxOePnd9nxY+ODU8rj5y9sjcdq90R9c0f09UWMKS2ImZVFce7Mipg/fUQUF5h+2Rjw3jZ/9aSDvq6T3ueBfsYEAP38xdgZdz5dH185NfkkOMUFqfjyqRPiSx+oiic3NMXTdU2xamtrrN/VFk3tPbG3syd6+iKK8nKjtCA3xpWlY3xZQcwYVRSzRpfEseNKoqosPejPtTg/J36QcL9/RMTfPvJ6bGp6+37sl7a1xdf/fVP8jwRhkc5LxQ8umBbzf7IqWgZgbvblm5uH7Httc1NnrNneGjMqMzuHvKaiKG48c0rceKbPrzEAAUBG7nyqPuZPG5F4VrB9L3IqN06rHh6nDdEDdG7/cHXi08kWv7wjfv0em0rvfrYhTqsujw9O7f9znzKiKL61sDo+t2hdxs/xmY3N0drZM2R/AS96ZWf8TaVJZIwBZBM7b4awrt6IK+5dk/i0tsPBXx5bGR+dlWy//+Y9HXHdQ/s54j8nJ750f23idXju0RXxqeMy32fd3t0Xj67bNWRfh1+8uC06ul2ExhiAAGDIqG/uik//ak00tx9583vPHFUUN5+VbL9/T29vfOn+2mjq2P/m+W0t3YlPDYyIuPGMSXFMZeYXrfnxc1uG7GuxraU7/uX32w/6/d79TL0PeRaPAQgA9mNFQ0v85b++GrvbjpyrhBXl5cTdF0yLooT7/e9+dku/Dl57eN3u+OmKZF/Ahfmp+MEF06Mow8vfPl/fEr9Z3ThkX5Pbf7fpoP7SvO+lHXHzY3U+4Fk6BiAA6McA8JF7XorV21uPiOdz24enxrRRyfY5r9qyN77+7xv7vdxNS+tiTcL1V1NRFLcvmJrx877+odeivqljSL4mu9t74q/vXx+9vb2Dfl/3vrQ9vnB/bUROjg93lo4BCAD64fXdHfGRe1bFPz2/JaMruA20rp7eWPTyjjjnnlUH9O8vmTMqLppdmei+Wjt74qrF6yLJ9Ws6evri6sXrEu/rvnBWZXxy7qiM1tX21u74L//66pCNgKXr98TXBvlX+Y+XN8QXl9RGrynrs3YMQACQQFt3X9zwyIY496cvxVN1ew7pY1nf2Ba3LauLk+5aGVctro2VDfufUGZGRWH83YemJL7PWx6vi9rG5F+eL29vi1uXbUy8/M1nTYkZFZldoXDNzvZY+L9XDdndAT9+bmt89bfro3OADwrc29EdVy1aGzcurXvTnA1k1xjA0OE0wMPUi1ta46JfvBonTSiNvzpxXJxRXR4FeYN/ilnd7vb4zerGuP/VxljRzw97YV5O3H3B9MSnwi1dtyvuWbkt4+fwo+Vb4vTq4YnmLS8uSMXdF0yPBfesivYMLqO7vbU7rvy3tXF8VUlcecLYOGva0Jok52cvbI9VW1vjGwumxtGjM79A0v2v7oyvLd0Q9c32YWfzGIAAYAA9s2lvPLNpbYwoTMW5R1fEGdXlccqksihND8xLu6OlM1bU740nX2+KJ17fE2symDf+1vlTEk82s6OlM659YP3ArLQ/nRq49Io5UVHS/6lSZ1QWx63zp8S1GZxZ8J+er2+J5xfXRmFeTpw4YVi8f8KwmF5RFJOGp6OyJD/K06koyMuN/NTB31i3sqEl5v/TqrjwmIq48v1jY87Y/p2L3tndEw+u3hU/XN4QL26x39oYwFCTU3Xr0/bEHWFSOREzK/84k9fM0cUxqTwdY0rzY3RpfpQUpCKdyo10Xk709kV0dPdGW1dv7Gjtih0tXbG5qTPWN7ZHbWNbrNra+o4z7JGdpg5Px2nV5TFvfGlUjyiMqrJ0lBakIp2XE21dvbGnvSfq9rTHq9vb4qm6pli2fs+AzKKIMQABAAAMEAcBAoAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAN7o/wMPKI9LWOVgigAAAABJRU5ErkJggg==";
-var imageElement = document.getElementById("src-image");
-var resourcePath = "../../../resources/";
-
-var videos = [
- { src: resourcePath + "red-green.mp4",
- type: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"' },
- { src: resourcePath + "red-green.webmvp8.webm",
- type: 'video/webm; codecs="vp8, vorbis"' },
- { src: resourcePath + "red-green.bt601.vp9.webm",
- type: 'video/webm; codecs="vp9"' },
- { src: resourcePath + "red-green.theora.ogv",
- type: 'video/ogg; codecs="theora, vorbis"' },
-];
-var currentVideo = null;
-
-function runAllTests() {
- return new Promise(function(resolve, reject) {
- var videoNdx = 0;
- var video;
- function runNextVideo() {
- if (video) {
- video.pause();
- }
- if (videoNdx == videos.length) {
- resolve("SUCCESS");
- return;
- }
- var info = videos[videoNdx++];
- currentVideo = info;
- debug("");
- debug("testing: " + info.type);
- video = document.createElement("video");
- var canPlay = true;
- if (!video.canPlayType) {
- testFailed("video.canPlayType required method missing");
- runNextVideo();
- return;
+ if (!program) {
+ testFailed("program does not exist");
+ finishTest();
+ return;
+ }
+
+ var loc0 = gl.getUniformLocation(program, "uTexture0");
+ var loc1 = gl.getUniformLocation(program, "uTexture1");
+ if (!loc0 || !loc1) {
+ testFailed("Failed to query uniform locations");
+ finishTest();
+ return;
+ }
+ gl.uniform1i(loc0, 0);
+ gl.uniform1i(loc1, 1);
+
+ wtu.setupUnitQuad(gl, 0, 1);
+
+ // Load textures
+ var imageSrc = "data:type/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AwVEx4QrzHJHAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAABm4SURBVHja7d15eN11nejxT3KSnGxN2qbpku5JWwpdkIIszuCwWWxlExFx7kVleUYF1OHqPMgz3AsyzAVRmasiijrORR2duV4Z2gLKUugIc1kKLWhZuqTQtE26pm3S7Nv9Q6cPe5vfSdq05/V6Hv6g7e8sv3PO97zPb/n+cqpufbovAICskmsVAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAAAQAFYBAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAABYBUAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAANkq70h4Epu/elJWvFjjb3vGOxbIekV5OTF3bEnMqyqN4/70X1VZ2tiajQEAwJEpJ/pixqiifV/27xtXGkeNKoq8lA3YAgAOA5lspbLlh2wypiQv3ldVuu8L/9ixJVGa9lUlAAA4oq34wvFWwkFiGwoACAAAQAAAAAIAABAAAIAAAAAEAAAwZJkHAIDDyt6O7vj9lpZYWd8SK+qbY2X9XvMHZGsADMZMaZleX8DsbQCZ6+7pjTU722Jl/d4//dcSq3e0Rl/kWDkCAIAjRUNTR6xs2Bsr/vRl/2LD3mjr7nvLv/LlLwAAOKKccNcLVoIAIKmRRamYO7YkZo8piemjimLcsIIYW1oQ5YWpKMzLjcK83Ojp64u2rt5o6eyNhubO2NzUEWvfsJltT0evFQkJDSvIjTNrhse88aVx1KjimDw8HaXpVJQWpKKnty9au3qisbU76vZ0xKW/WmMMQACQ3FGjCuP8Y0bFmdXlMXts6QG98Om8VAwvihhfno4TYti+v+vu6Y3lm5vjwdW74tertg/oQPC/PlIdH59TmWjZ2p2tMf8nq6K9py+jx1CYlxMPXzYnaiqKEi3/f/6wPa59YP3b/jzT40bezWBfSfBQX6nwUNz/YN3n8VUlcfXJVXF6dXkU5KXe8d/kpyIK81Mxsrggxg0ryLoxAAHAAMiJvjj/6Iq4/ISxcfz4YQP3pkjlximTyuOUSeVx/V9MjHtf2hHf/n+bo765K+Pbvv6h12JeVUnUVBT3e9maiuK44YxJccMjGzJ6DDeeMTnxl//aHa1x/UOvefPxJmNK8uL2BdVx1rQR/fsM52TfGMDQYR6Aw9TpU8vj0cvnxPfOnz6gH/y3Ki5IxX89bkz87q+Ojes+OCEKMnzHtHX3xefuWxftXT2Jlv/0caPjzycnf75nVJfHp+aNSfbYu3r++Ni7+7wB2eesmvJ47Mq5/f7y/8+v8GwbAxAAJFSezo1vn1MdP//EzJg5uuSg3W9Rfiq++IHx8dvL5sTRlUUZ3dbL29vi5sfqkr1hc3PjjoU1MSzBKDSiMBXfWlid+HHftHRDvLqjzZuQfT45d1T844UzYnhRfrJf8DnZOQYgAOin6RWF8ZvPzImLZlcessdwVGVxLL50VsyfNjyj27ln5bZ4cPXORMuOL0/H38+f0u/lvrGgOkaXJtvnuuSVnfHzF7Z7E7LPR48ZGd9cWBN5qeTDaE4WjwEIAA7QSRNKY/Gls2LyiMJD/liKC1Lx4wunxyVzRmV0O19+cH1s3N2eaNmPza6MhTMOfJPrJ+aMigVHjUx0X6/vaouv/Ga9NyH7nDihNKOtScYABAAHZN64kvjpx4+KssKhc8xmKjc3bl8wNRbMSP4roKmjN65atC66epIdYfz1D0+JUcX7XycTywvia2dOTnQfnd098flF62Jvp6Og36q3NzvXSVk6N+46b1qk3+Uo/35tAcjJ7jEAAcB7qBqWH/d8/KgoTQ+9EzZSublx57nTYs6Y4sS3saKhJb7+u42Jlh1ZXBDf3M+vsJzoi++cUxPDEg6c/3PZxvj9llZvxHeQrYdC3nb21BhXlh6Q28oxBiAAeCd5ORE//Oj0GFmcP2QfY2F+Ku46f1oU5yc/mvn7TzfEsvW7Ey37oWkj4pNz330z5NUnV8WJE8sS3fYjaxvjR89t9UZ8twDI0gI4/5iB2+yds59NANkyBnCIvmOsgqHr6pPHxXFVmZ3e09vbG8te2xOP1e6O5zbvjYbmztjd1h3pvNyoKM6L46pK44ya4XHezJHvOnHJ/lSPLIrrPjgxblya7Mj+yMmJLyxZF49ePifGDOv/L6ubzpwcT25oio17Ot/057NGF8WX/3x8ooe0eU9H/PUD9vvbAjC4cowBCADeqmpYflxzyviMbmPZ+t1xw8Ovx2u7O972d91dvdGypzPq9jTGolca4/bfbYrbzp4SZ9SMSHRfn543Jn66cmvUNnYkWr6xrSe+sKQ2fnnJzEjl9m/DVGk6L759Tk187J9f3neFsHQqJ+48d1qiAa27pzeuXrwudrf3eCO+5xYACZD5FgBjAAKAt/jiB8ZHcUHyg4xuXVYXdz7dcOC/eJs641O/Wh1fO2tyXHHCuH7fX34qN679swlxzZLaxI/5P+qa486n6uNLfzah38ueNLEsPnfiuPj+s1siIuJvT58YMyqT7Zf81pObYvnmvf1e7r2miD3U0+0Ohl7f/2/S09sbyzftjcfX746n65piW0tX7Gjtis7uvigvzIuqsoKYPaY4TplUFmfWDI/hRfnvuQUgG8cABEDWG1mUiotmJ9/PeMeTm/r1wd/3iy5y4sZHN8TE8nTMn97/U+bOmTkybnm8LrbsTT5d6Dee2BQnTyqLkxLst//KqRPisfW7Y0xpQVyWcLa/J17bHd99qj5cblQA9MdjtbvilsfrYvWOdz6tdWdbd+xs644/bG2NX/5+R6RyIs6ePiI+e+JYYwCHjIMAh6CPzRoVRfnJyn/F5ua448lNie+7L3Li+odeTzRVb34qNy7O8LzgvsiJqxeti8bW/g8ghfmpuPO8aXHHwurIze3/W3vb3s64enHtvt0I7Oe1sgsgenp747rfro9Lf7XmXb/833G5vogH1+yK83/+ijEAAcAbK7oi8bI3P1aX8RfYlr1dce9LyWbpW5hwsp03atjbFf/tgWSbEY8ZXZLoFK2e3t744pLa2NnW7Q1oC8CBPf/e3rh6ce2gzBCZ7WMAAiArjShMxbyqZPN7v7KtJdG+63eytHZXouXmjC2NMSWZ71l6pHZP/Gh5w0Fb73c+3RBPbGjyBuzXL8Xs9o/Pb40lrzYaAwZpDEAAZJ0Txpcm2nwdEfHw2l0D9jj+sDX55DfzxpcOyGO45bG6eLFh76Cv82c3NsU3n9jkzdfvLQDZmwCvNbbFrcs2GgMGeQxAAGSV4zK4rOezm5oH7HHsbE1+EM+8qoG5NGl3X8TnF62N5vbB2yzf2NoVVy1a54A2WwD69+v/uS3R0dNnDBjkMYDBZTvNEFMzMvmFPv75E0cPiecwdQAvVrJhd2d89aHX4nvnTx+Ux3rtA7XR4IjlZAGQpQXQ2tkd/3fVDmPAQRoDsAUga0wsTx/2z2FCecGA3t59rzTGL1/cNuCP84fPNsSjtXu86WwD6Jf/2NAUzYN4cShjAAIgS40pzT/sn8PokoF/Djc8/Hqs2T5wF+V5ob45/v5x05bSfyvr9xoDDsEYgAA44pXkpw7751A8CM+hvacvPnvf2mjtzHx63qb27vj8onXRbb8/SQKgocUYcAjGAATAEa8w//B/SYoG6Tms2dke//Zy5vteH1jdGHVvuXAQSWTnhEmb9nQYAw7RGIAAYIjLSw3O2+rYscXx8dmZzzJ28ZxRccpERyln/PU/AN//RXmHX0Q0dbhI1KEaAxAAR7S2rl4r4R2UpXPjBxdMT3y50jdK5ebGnefVxMgimykzGuQHoADK0offa9A8yAFgDEAAZKnWLr8u3skdC2ti0vCBO7Vo7LB0fPfcadl7LtsAKBiAX+9lhYffmciDdf6/MQABkOW2OSf9bS4/fkwsGIT5xU+rHh7XnFJlBSeUzktFToanAs4YVWRFGgM4REwENMRs3NMRc8clm0bz2O88Hztaj6yL2cwZUxw3nD5x0G7/b06dEM9sbB6w+dOzTVF+brR2JY+A2WNKrERjALYAEBGxfld74mVnjSk+otZFaUFu3H3B9EjnDd5+4rxUbtx1/rQYXpi9xwP09Cbf51yezuw3xIkTHIxpDEAAEBERKzL4JXqkDabfWlgdkw/ClKJVZen49jk1WXs8QEcGEyKMzmDSmvFlBXHiBBeNMQYgAIiIiOcz+PBfNHtUxvtkh4rPHDc6o2ui99dZ00bE504aN2i339WT/Fd2YWpwT5XL5KCzmork+/A/Obcy8VXvjAFH/hiAAMg6O9u6Y2V9sit6TSgvjAUzRh6Sxz1rdFH84uKjBuy2/vsZkxIt+1pjWzS2Jpvk57oPTojjxg3OPunO7uQBMG7Y4M6rvr0l+UFnSX9xVg3Lj8+eONYH3hiAAOCNlrzSmHjZv/vQ5BhWcPBe1hkVhfG9c2vit5+ZHX9RPTzj2yvJ/+N+/8IEU4l29fTGNUtq48sPvpbovgvyUvH986dFWXrg19+eDM4d/8DkskF9DRuak8+KuHDGiCjs5+mAOdEXt509NYoLHINsDEAA8Ca/fmlHtCfcLDt2WDp+9NHpg77Z+P3jS+MnF06PpVfMiQtmjRqwTbnfXDA1po5Mtln5H57cFC80tMTD63bHz1ZuTXQbE4cXxj98pGbA19eODH5lX3XyuChPD95Hde3O5AedVZQUxK1nTz3wBfr64o6F1XHmtBE+6MYABABv+7Jo7Y57X9qZePlTpw6Pf7lkZowvG9hNxyMKU3HZvNGx9PLZcd+ls+LsGSMH9EN/6fsq47xjkk31u3xjU3znqfp9/3/Toxti3Y5kVw/88IyRcfnxYwZ03dVlMH/8lBFFsfSKuXHNyePi+KqSqCjKi4H8gffy1swubnPxnMq45UOTY3/Tv08sL4hfXjIzLp472ofcGMAQYBvcEPXdpzbHhbMqEm0Kj4h4/8SyWHbl3Pj+Mw3xs5VbY3vCc4OrR6Tj1CnlsWDGiDhlUtmgzfF9TGVR3HTm5ETLNrd3xzVLaqPvDRenae/pi6sWr4sln5qV6DTCG06fGMs3Nccftg7MJYjX7mjLaPlxZem4/rT+HRcx/rZnDujfPbWxOePnd9nxY+ODU8rj5y9sjcdq90R9c0f09UWMKS2ImZVFce7Mipg/fUQUF5h+2Rjw3jZ/9aSDvq6T3ueBfsYEAP38xdgZdz5dH185NfkkOMUFqfjyqRPiSx+oiic3NMXTdU2xamtrrN/VFk3tPbG3syd6+iKK8nKjtCA3xpWlY3xZQcwYVRSzRpfEseNKoqosPejPtTg/J36QcL9/RMTfPvJ6bGp6+37sl7a1xdf/fVP8jwRhkc5LxQ8umBbzf7IqWgZgbvblm5uH7Httc1NnrNneGjMqMzuHvKaiKG48c0rceKbPrzEAAUBG7nyqPuZPG5F4VrB9L3IqN06rHh6nDdEDdG7/cHXi08kWv7wjfv0em0rvfrYhTqsujw9O7f9znzKiKL61sDo+t2hdxs/xmY3N0drZM2R/AS96ZWf8TaVJZIwBZBM7b4awrt6IK+5dk/i0tsPBXx5bGR+dlWy//+Y9HXHdQ/s54j8nJ750f23idXju0RXxqeMy32fd3t0Xj67bNWRfh1+8uC06ul2ExhiAAGDIqG/uik//ak00tx9583vPHFUUN5+VbL9/T29vfOn+2mjq2P/m+W0t3YlPDYyIuPGMSXFMZeYXrfnxc1uG7GuxraU7/uX32w/6/d79TL0PeRaPAQgA9mNFQ0v85b++GrvbjpyrhBXl5cTdF0yLooT7/e9+dku/Dl57eN3u+OmKZF/Ahfmp+MEF06Mow8vfPl/fEr9Z3ThkX5Pbf7fpoP7SvO+lHXHzY3U+4Fk6BiAA6McA8JF7XorV21uPiOdz24enxrRRyfY5r9qyN77+7xv7vdxNS+tiTcL1V1NRFLcvmJrx877+odeivqljSL4mu9t74q/vXx+9vb2Dfl/3vrQ9vnB/bUROjg93lo4BCAD64fXdHfGRe1bFPz2/JaMruA20rp7eWPTyjjjnnlUH9O8vmTMqLppdmei+Wjt74qrF6yLJ9Ws6evri6sXrEu/rvnBWZXxy7qiM1tX21u74L//66pCNgKXr98TXBvlX+Y+XN8QXl9RGrynrs3YMQACQQFt3X9zwyIY496cvxVN1ew7pY1nf2Ba3LauLk+5aGVctro2VDfufUGZGRWH83YemJL7PWx6vi9rG5F+eL29vi1uXbUy8/M1nTYkZFZldoXDNzvZY+L9XDdndAT9+bmt89bfro3OADwrc29EdVy1aGzcurXvTnA1k1xjA0OE0wMPUi1ta46JfvBonTSiNvzpxXJxRXR4FeYN/ilnd7vb4zerGuP/VxljRzw97YV5O3H3B9MSnwi1dtyvuWbkt4+fwo+Vb4vTq4YnmLS8uSMXdF0yPBfesivYMLqO7vbU7rvy3tXF8VUlcecLYOGva0Jok52cvbI9VW1vjGwumxtGjM79A0v2v7oyvLd0Q9c32YWfzGIAAYAA9s2lvPLNpbYwoTMW5R1fEGdXlccqksihND8xLu6OlM1bU740nX2+KJ17fE2symDf+1vlTEk82s6OlM659YP3ArLQ/nRq49Io5UVHS/6lSZ1QWx63zp8S1GZxZ8J+er2+J5xfXRmFeTpw4YVi8f8KwmF5RFJOGp6OyJD/K06koyMuN/NTB31i3sqEl5v/TqrjwmIq48v1jY87Y/p2L3tndEw+u3hU/XN4QL26x39oYwFCTU3Xr0/bEHWFSOREzK/84k9fM0cUxqTwdY0rzY3RpfpQUpCKdyo10Xk709kV0dPdGW1dv7Gjtih0tXbG5qTPWN7ZHbWNbrNra+o4z7JGdpg5Px2nV5TFvfGlUjyiMqrJ0lBakIp2XE21dvbGnvSfq9rTHq9vb4qm6pli2fs+AzKKIMQABAAAMEAcBAoAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAgAAEAAAAACAAAQAACAAAAABAAAIAAAAAEAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQAACAAAQAAAAAIAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAAQAACAAAAABAAAIAABAAAAAAgAAEAAAgAAAAN7o/wMPKI9LWOVgigAAAABJRU5ErkJggg==";
+ var imageElement = document.getElementById("src-image");
+ var resourcePath = "../../../resources/";
+
+ var videos = [
+ { src: resourcePath + "red-green.mp4",
+ type: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"' },
+ { src: resourcePath + "red-green.webmvp8.webm",
+ type: 'video/webm; codecs="vp8, vorbis"' },
+ { src: resourcePath + "red-green.bt601.vp9.webm",
+ type: 'video/webm; codecs="vp9"' },
+ { src: resourcePath + "red-green.theora.ogv",
+ type: 'video/ogg; codecs="theora, vorbis"' },
+ ];
+ var currentVideo = null;
+
+ function runAllTests() {
+ return new Promise(function(resolve, reject) {
+ var videoNdx = 0;
+ var video;
+ function runNextVideo() {
+ if (video) {
+ video.pause();
+ }
+ if (videoNdx == videos.length) {
+ resolve("SUCCESS");
+ return;
+ }
+ var info = videos[videoNdx++];
+ currentVideo = info;
+ debug("");
+ debug("testing: " + info.type);
+ video = document.createElement("video");
+ var canPlay = true;
+ if (!video.canPlayType) {
+ testFailed("video.canPlayType required method missing");
+ runNextVideo();
+ return;
+ }
+ if(!video.canPlayType(info.type).replace(/no/, '')) {
+ debug(info.type + " unsupported");
+ runNextVideo();
+ return;
+ };
+ document.body.appendChild(video);
+ video.type = info.type;
+ video.src = info.src;
+ wtu.startPlayingAndWaitForVideo(video, runTest);
}
- if(!video.canPlayType(info.type).replace(/no/, '')) {
- debug(info.type + " unsupported");
+ function runTest() {
+ video.pause();
+
+ var texture0 = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture0);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.bindTexture(gl.TEXTURE_2D, null);
+
+ var texture1 = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture1);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, imageElement);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.bindTexture(gl.TEXTURE_2D, null);
+
+ // <-- Begin Observed -->
+ gl.activeTexture(gl.TEXTURE1);
+ gl.bindTexture(gl.TEXTURE_2D, texture1);
+
+ gl.activeTexture(gl.TEXTURE0);
+ gl.bindTexture(gl.TEXTURE_2D, texture0);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);
+
+ wtu.clearAndDrawUnitQuad(gl, [255, 0, 255, 255]);
+
+ var observedPixels = new Uint8Array(640 * 480 * 4);
+ gl.readPixels(0, 0, 640, 480, gl.RGBA, gl.UNSIGNED_BYTE, observedPixels);
+ // <-- End Observed -->
+
+ // <-- Begin Expected -->
+ gl.activeTexture(gl.TEXTURE0);
+ gl.bindTexture(gl.TEXTURE_2D, texture0);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);
+
+ gl.activeTexture(gl.TEXTURE1);
+ gl.bindTexture(gl.TEXTURE_2D, texture1);
+
+ wtu.clearAndDrawUnitQuad(gl, [255, 0, 255, 255]);
+
+ var expectedPixels = new Uint8Array(640 * 480 * 4);
+ gl.readPixels(0, 0, 640, 480, gl.RGBA, gl.UNSIGNED_BYTE, expectedPixels);
+ // <-- End Expected -->
+
+ // Compare results
+ var numDifferentPixels = wtu.comparePixels(observedPixels, expectedPixels, 0, undefined);
+ if (numDifferentPixels) {
+ testFailed("Texture states were incorrect for " + currentVideo.type +
+ ", rendering was wrong: found " + numDifferentPixels + " differing pixels");
+ } else {
+ testPassed("Texture states were correct, rendering as expected");
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
runNextVideo();
- return;
- };
- document.body.appendChild(video);
- video.type = info.type;
- video.src = info.src;
- wtu.startPlayingAndWaitForVideo(video, runTest);
- }
- function runTest() {
- video.pause();
-
- var texture0 = gl.createTexture();
- gl.bindTexture(gl.TEXTURE_2D, texture0);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
- gl.bindTexture(gl.TEXTURE_2D, null);
-
- var texture1 = gl.createTexture();
- gl.bindTexture(gl.TEXTURE_2D, texture1);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, imageElement);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
- gl.bindTexture(gl.TEXTURE_2D, null);
-
- // <-- Begin Observed -->
- gl.activeTexture(gl.TEXTURE1);
- gl.bindTexture(gl.TEXTURE_2D, texture1);
-
- gl.activeTexture(gl.TEXTURE0);
- gl.bindTexture(gl.TEXTURE_2D, texture0);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);
-
- wtu.clearAndDrawUnitQuad(gl, [255, 0, 255, 255]);
-
- var observedPixels = new Uint8Array(640 * 480 * 4);
- gl.readPixels(0, 0, 640, 480, gl.RGBA, gl.UNSIGNED_BYTE, observedPixels);
- // <-- End Observed -->
-
- // <-- Begin Expected -->
- gl.activeTexture(gl.TEXTURE0);
- gl.bindTexture(gl.TEXTURE_2D, texture0);
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);
-
- gl.activeTexture(gl.TEXTURE1);
- gl.bindTexture(gl.TEXTURE_2D, texture1);
-
- wtu.clearAndDrawUnitQuad(gl, [255, 0, 255, 255]);
-
- var expectedPixels = new Uint8Array(640 * 480 * 4);
- gl.readPixels(0, 0, 640, 480, gl.RGBA, gl.UNSIGNED_BYTE, expectedPixels);
- // <-- End Expected -->
-
- // Compare results
- var numDifferentPixels = wtu.comparePixels(observedPixels, expectedPixels, 0, undefined);
- if (numDifferentPixels) {
- testFailed("Texture states were incorrect for " + currentVideo.type +
- ", rendering was wrong: found " + numDifferentPixels + " differing pixels");
- } else {
- testPassed("Texture states were correct, rendering as expected");
}
- wtu.glErrorShouldBe(gl, gl.NO_ERROR);
runNextVideo();
- }
+ });
+ }
- runNextVideo();
- });
+ imageElement.onload = function() {
+ runAllTests().then(function(val) {
+ debug("");
+ finishTest();
+ });
+ };
+ imageElement.src = imageSrc;
}
-
-imageElement.onload = function() {
- runAllTests().then(function(val) {
- debug("");
- finishTest();
- });
-};
-imageElement.src = imageSrc;
+test();
</script>
</body>
diff --git a/tests/wpt/webgl/tests/conformance/textures/misc/texture-upload-size.html b/tests/wpt/webgl/tests/conformance/textures/misc/texture-upload-size.html
index 59934e4ede1..8832033dd70 100644
--- a/tests/wpt/webgl/tests/conformance/textures/misc/texture-upload-size.html
+++ b/tests/wpt/webgl/tests/conformance/textures/misc/texture-upload-size.html
@@ -137,6 +137,9 @@ var runNextTest = function() {
var img = wtu.makeImage(test.src, function() {
testImage(test, img);
setTimeout(runNextTest, 0);
+ }, function () {
+ testFailed("could not create image" + (test.isSVG ? " (SVG)" : ""));
+ setTimeout(runNextTest, 0);
});
} else if (test.type == "video") {
debug("HTMLVideoElement (" + test.videoType + ")");
diff --git a/tests/wpt/webgl/tests/conformance2/context/00_test_list.txt b/tests/wpt/webgl/tests/conformance2/context/00_test_list.txt
index c2d13238b29..fc4f8b8c07f 100644
--- a/tests/wpt/webgl/tests/conformance2/context/00_test_list.txt
+++ b/tests/wpt/webgl/tests/conformance2/context/00_test_list.txt
@@ -1,5 +1,6 @@
constants-and-properties-2.html
context-attributes-depth-stencil-antialias-obeyed.html
+--min-version 2.0.1 context-mode.html
--min-version 2.0.1 context-sharing-texture2darray-texture3d-data-bug.html
context-type-test-2.html
--min-version 2.0.1 context-resize-changes-buffer-binding-bug.html
diff --git a/tests/wpt/webgl/tests/conformance2/context/context-mode.html b/tests/wpt/webgl/tests/conformance2/context/context-mode.html
new file mode 100644
index 00000000000..fa44ce4c877
--- /dev/null
+++ b/tests/wpt/webgl/tests/conformance2/context/context-mode.html
@@ -0,0 +1,79 @@
+<!--
+
+/*
+** Copyright (c) 2018 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL2 Canvas Context Mode Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../js/js-test-pre.js"></script>
+<script src="../../js/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test ensures WebGL 2.0 implementations respect the canvas's context mode.");
+
+debug("");
+
+assertMsg(window.WebGLRenderingContext,
+ "WebGL2RenderingContext should be a member of window");
+assertMsg('WebGL2RenderingContext' in window,
+ "WebGL2RenderingContext should be 'in' window");
+
+function testContextMode(mode, altMode) {
+ debug("Testing " + mode + " context type");
+
+ let c = document.createElement('canvas');
+ c.width = 2;
+ c.height = 2;
+ let gl = c.getContext(mode);
+ assertMsg(c.getContext(mode) == gl,
+ "Canvas.getContext('" + mode + "') should return the same value every time");
+ try {
+ assertMsg(c.getContext(altMode) == null,
+ "Canvas.getContext('" + altMode + "') after getContext('" + mode + "') should return null");
+ } catch (e) {
+ testFailed("Canvas.getContext('" + altMode + "') after getContext('" + mode + "') should not throw an exception");
+ }
+}
+
+testContextMode('webgl2', 'webgl');
+testContextMode('webgl', 'webgl2');
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../js/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/tests/wpt/webgl/tests/conformance2/rendering/canvas-resizing-with-pbo-bound.html b/tests/wpt/webgl/tests/conformance2/rendering/canvas-resizing-with-pbo-bound.html
index bb303081fc8..78f7f9da222 100644
--- a/tests/wpt/webgl/tests/conformance2/rendering/canvas-resizing-with-pbo-bound.html
+++ b/tests/wpt/webgl/tests/conformance2/rendering/canvas-resizing-with-pbo-bound.html
@@ -78,6 +78,8 @@ function nextTest() {
if (!gl) {
testFailed("context does not exist");
+
+ wtu.requestAnimFrame(nextTest);
} else {
testPassed("context exists");
diff --git a/tests/wpt/webgl/tests/js/js-test-pre.js b/tests/wpt/webgl/tests/js/js-test-pre.js
index f2c8167240a..294bd4c5a21 100644
--- a/tests/wpt/webgl/tests/js/js-test-pre.js
+++ b/tests/wpt/webgl/tests/js/js-test-pre.js
@@ -142,9 +142,10 @@ function notifyFinishedToHarness() {
}
(function () {
- var oldNotify = notifyFinishedToHarness;
var t = async_test("Overall test");
- window.notifyFinishedToHarness = t.step_func_done(oldNotify);
+ var done = t.step_func_done(notifyFinishedToHarness);
+ window.notifyFinishedToHarness = done;
+ window.addEventListener("error", done);
}())
var _bufferedConsoleLogs = [];
diff --git a/tests/wpt/webgl/tests/js/tests/tex-image-and-sub-image-2d-with-webgl-canvas.js b/tests/wpt/webgl/tests/js/tests/tex-image-and-sub-image-2d-with-webgl-canvas.js
index 61578ab040f..8ade197c61c 100644
--- a/tests/wpt/webgl/tests/js/tests/tex-image-and-sub-image-2d-with-webgl-canvas.js
+++ b/tests/wpt/webgl/tests/js/tests/tex-image-and-sub-image-2d-with-webgl-canvas.js
@@ -225,6 +225,11 @@ function generateTest(internalFormat, pixelFormat, pixelType, prologue, resource
// Note: We use preserveDrawingBuffer:true to prevent canvas
// visibility from interfering with the tests.
var visibleCtx = wtu.create3DContext(null, { preserveDrawingBuffer:true });
+ if (!visibleCtx) {
+ testFailed("context does not exist");
+ finishTest();
+ return;
+ }
var visibleCanvas = visibleCtx.canvas;
var descriptionNode = document.getElementById("description");
document.body.insertBefore(visibleCanvas, descriptionNode);
diff --git a/tests/wpt/webgl/tests/js/webgl-test-utils.js b/tests/wpt/webgl/tests/js/webgl-test-utils.js
index 5ab8b2cfd07..0ef194eacc2 100644
--- a/tests/wpt/webgl/tests/js/webgl-test-utils.js
+++ b/tests/wpt/webgl/tests/js/webgl-test-utils.js
@@ -2876,34 +2876,9 @@ var waitForComposite = function(callback) {
countDown();
};
-var setZeroTimeout = (function() {
- // See https://dbaron.org/log/20100309-faster-timeouts
-
- var timeouts = [];
- var messageName = "zero-timeout-message";
-
- // Like setTimeout, but only takes a function argument. There's
- // no time argument (always zero) and no arguments (you have to
- // use a closure).
- function setZeroTimeout(fn) {
- timeouts.push(fn);
- window.postMessage(messageName, "*");
- }
-
- function handleMessage(event) {
- if (event.source == window && event.data == messageName) {
- event.stopPropagation();
- if (timeouts.length > 0) {
- var fn = timeouts.shift();
- fn();
- }
- }
- }
-
- window.addEventListener("message", handleMessage, true);
-
- return setZeroTimeout;
-})();
+var setZeroTimeout = function(handler) {
+ window.setTimeout(handler, 0);
+}
/**
* Runs an array of functions, yielding to the browser between each step.
diff --git a/tests/wpt/webgl/tools/import-conformance-tests.py b/tests/wpt/webgl/tools/import-conformance-tests.py
index 56d9ac2f61a..58afe1ddc77 100755
--- a/tests/wpt/webgl/tools/import-conformance-tests.py
+++ b/tests/wpt/webgl/tools/import-conformance-tests.py
@@ -13,8 +13,8 @@ KHRONOS_REPO_URL = "https://github.com/KhronosGroup/WebGL.git"
PATCHES = [
("js-test-pre.patch", "js/js-test-pre.js"),
("unit.patch", "conformance/more/unit.js"),
- ("unit2.patch", "conformance/more/unit.js"),
- ("timeout.patch", None)
+ ("timeout.patch", None),
+ ("set-zero-timeout.patch", "js/webgl-test-utils.js"),
]
# Fix for 'UnicodeDecodeError: 'ascii' codec can't decode byte'
diff --git a/tests/wpt/webgl/tools/js-test-pre.patch b/tests/wpt/webgl/tools/js-test-pre.patch
index 0d615f2e163..a824bfbf679 100644
--- a/tests/wpt/webgl/tools/js-test-pre.patch
+++ b/tests/wpt/webgl/tools/js-test-pre.patch
@@ -30,14 +30,15 @@
function reportSkippedTestResultsToHarness(success, msg) {
if (window.parent.webglTestHarness) {
-@@ -127,6 +141,12 @@
+@@ -127,6 +141,13 @@
}
}
+(function () {
-+ var oldNotify = notifyFinishedToHarness;
+ var t = async_test("Overall test");
-+ window.notifyFinishedToHarness = t.step_func_done(oldNotify);
++ var done = t.step_func_done(notifyFinishedToHarness);
++ window.notifyFinishedToHarness = done;
++ window.addEventListener("error", done);
+}())
+
var _bufferedConsoleLogs = [];
diff --git a/tests/wpt/webgl/tools/js-test-pre2.patch b/tests/wpt/webgl/tools/js-test-pre2.patch
deleted file mode 100644
index 13cb667374c..00000000000
--- a/tests/wpt/webgl/tools/js-test-pre2.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff --git a/conformance-suites/2.0.0/js/js-test-pre.js b/conformance-suites/2.0.0/js/js-test-pre.js
-index df30a6f..7ca8559 100644
---- a/conformance-suites/2.0.0/js/js-test-pre.js
-+++ b/conformance-suites/2.0.0/js/js-test-pre.js
-@@ -111,11 +111,25 @@ function nonKhronosFrameworkNotifyDone() {
- }
- }
-
--function reportTestResultsToHarness(success, msg) {
-- if (window.parent.webglTestHarness) {
-- window.parent.webglTestHarness.reportResults(window.location.pathname, success, msg);
-- }
--}
-+(function() {
-+ var WPT_TEST_ID = 0;
-+
-+ // Store the current WPT test harness `test` function
-+ // if found, since it's overriden by some tests.
-+ var wpt_test = window.test;
-+ var wpt_assert_true = window.assert_true;
-+ var wt_async_test = window.async_test;
-+
-+ window.reportTestResultsToHarness = function reportTestResultsToHarness(success, msg) {
-+ if (window.parent.webglTestHarness) {
-+ window.parent.webglTestHarness.reportResults(window.location.pathname, success, msg);
-+ } else if (wpt_test) { // WPT test harness
-+ wpt_test(function () {
-+ wpt_assert_true(success, msg);
-+ }, "WebGL test #" + (WPT_TEST_ID++) + ": " + msg);
-+ }
-+ }
-+ }())
-
- function reportSkippedTestResultsToHarness(success, msg) {
- if (window.parent.webglTestHarness) {
-@@ -132,6 +146,12 @@ function notifyFinishedToHarness() {
- }
- }
-
-+(function() {
-+ var oldNotify = notifyFinishedToHarness;
-+ var t = async_test("Overall test");
-+ window.notifyFinishedToHarness = t.step_func_done(oldNotify);
-+}())
-+
- var _bufferedConsoleLogs = [];
-
- function _bufferedLogToConsole(msg)
-@@ -162,7 +182,7 @@ function _flushBufferedLogsToConsole()
- }
- }
-
--var _jsTestPreVerboseLogging = false;
-+var _jsTestPreVerboseLogging = true;
-
- function enableJSTestPreVerboseLogging()
- {
-@@ -175,24 +195,12 @@ function description(msg)
- if (msg === undefined) {
- msg = document.title;
- }
-- // For MSIE 6 compatibility
-- var span = document.createElement("span");
-- span.innerHTML = '<p>' + msg + '</p><p>On success, you will see a series of "<span class="pass">PASS</span>" messages, followed by "<span class="pass">TEST COMPLETE</span>".</p>';
-- var description = document.getElementById("description");
-- if (description.firstChild)
-- description.replaceChild(span, description.firstChild);
-- else
-- description.appendChild(span);
-- if (_jsTestPreVerboseLogging) {
-- _bufferedLogToConsole(msg);
-- }
-+
-+ _bufferedLogToConsole("DESCRIPTION: " +msg);
- }
-
- function _addSpan(contents)
- {
-- var span = document.createElement("span");
-- document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace
-- span.innerHTML = contents + '<br />';
- }
-
- function debug(msg)
diff --git a/tests/wpt/webgl/tools/set-zero-timeout.patch b/tests/wpt/webgl/tools/set-zero-timeout.patch
new file mode 100644
index 00000000000..94b4ae8bbe2
--- /dev/null
+++ b/tests/wpt/webgl/tools/set-zero-timeout.patch
@@ -0,0 +1,40 @@
+--- js/webgl-test-utils.js
++++ js/webgl-test-utils.js
+@@ -2876,34 +2876,9 @@ var waitForComposite = function(callback) {
+ countDown();
+ };
+
+-var setZeroTimeout = (function() {
+- // See https://dbaron.org/log/20100309-faster-timeouts
+-
+- var timeouts = [];
+- var messageName = "zero-timeout-message";
+-
+- // Like setTimeout, but only takes a function argument. There's
+- // no time argument (always zero) and no arguments (you have to
+- // use a closure).
+- function setZeroTimeout(fn) {
+- timeouts.push(fn);
+- window.postMessage(messageName, "*");
+- }
+-
+- function handleMessage(event) {
+- if (event.source == window && event.data == messageName) {
+- event.stopPropagation();
+- if (timeouts.length > 0) {
+- var fn = timeouts.shift();
+- fn();
+- }
+- }
+- }
+-
+- window.addEventListener("message", handleMessage, true);
+-
+- return setZeroTimeout;
+-})();
++var setZeroTimeout = function(handler) {
++ window.setTimeout(handler, 0);
++}
+
+ /**
+ * Runs an array of functions, yielding to the browser between each step.
diff --git a/tests/wpt/webgl/tools/timeout.patch b/tests/wpt/webgl/tools/timeout.patch
index 112dc9965e8..5198156de9d 100644
--- a/tests/wpt/webgl/tools/timeout.patch
+++ b/tests/wpt/webgl/tools/timeout.patch
@@ -10,42 +10,6 @@ index de45ce308c..11a83ac00a 100644
<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" content="long">
- <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" content="long">
- <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
diff --git a/tests/wpt/webgl/tools/unit.patch b/tests/wpt/webgl/tools/unit.patch
index 43c57b9dbb4..95eaedb59ad 100644
--- a/tests/wpt/webgl/tools/unit.patch
+++ b/tests/wpt/webgl/tools/unit.patch
@@ -1,11 +1,20 @@
-diff --git a/conformance-suites/1.0.3/conformance/more/unit.js b/conformance-suites/1.0.3/conformance/more/unit.js
-index 89f4e87..742f8d7 100644
---- a/conformance-suites/1.0.3/conformance/more/unit.js
-+++ b/conformance-suites/1.0.3/conformance/more/unit.js
+--- a/conformance/conformance/more/unit.js
++++ b/conformance/conformance/more/unit.js
+@@ -53,6 +53,10 @@ if (window.internals) {
+ window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
+ }
+
++if (window.async_test) {
++ var __overall_test = async_test('Overall test');
++}
++
+ /* -- end platform specific code --*/
+ Tests = {
+ autorun : true,
@@ -892,9 +892,14 @@ GLConstants = [
0x809D
];
-
+
+var WPT_TEST_ID = 0;
function reportTestResultsToHarness(success, msg) {
if (window.parent.webglTestHarness) {
@@ -17,3 +26,13 @@ index 89f4e87..742f8d7 100644
}
}
+@@ -907,6 +911,9 @@ function notifyFinishedToHarness() {
+ if (window.parent.webglTestHarness) {
+ window.parent.webglTestHarness.notifyFinished(window.location.pathname);
+ }
++ if (window.__overall_test) {
++ window.__overall_test.done();
++ }
+ }
+
+ function initTests() {
diff --git a/tests/wpt/webgl/tools/unit2.patch b/tests/wpt/webgl/tools/unit2.patch
deleted file mode 100644
index 7678d4ae72a..00000000000
--- a/tests/wpt/webgl/tools/unit2.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/conformance-suites/1.0.3/conformance/more/unit.js b/conformance-suits/1.0.3/conformance/more/unit.js
-index 742f8d7b9d..428c164699 100644
---- a/conformance-suites/1.0.3/conformance/more/unit.js
-+++ b/conformance-suites/1.0.3/conformance/more/unit.js
-@@ -53,6 +53,10 @@ if (window.internals) {
- window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
- }
-
-+if (window.async_test) {
-+ var __overall_test = async_test('Overall test');
-+}
-+
- /* -- end platform specific code --*/
- Tests = {
- autorun : true,
-@@ -907,6 +911,9 @@ function notifyFinishedToHarness() {
- if (window.parent.webglTestHarness) {
- window.parent.webglTestHarness.notifyFinished(window.location.pathname);
- }
-+ if (window.__overall_test) {
-+ window.__overall_test.done();
-+ }
- }
-
- function initTests() {