diff options
53 files changed, 614 insertions, 1472 deletions
diff --git a/Cargo.lock b/Cargo.lock index 0d5553c9c73..12433965aa8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -393,9 +393,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-lc-rs" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b756939cb2f8dc900aa6dcd505e6e2428e9cae7ff7b028c49e3946efa70878" +checksum = "93fcc8f365936c834db5514fc45aee5b1202d677e6b40e48468aaaa8183ca8c7" dependencies = [ "aws-lc-sys", "zeroize", @@ -403,9 +403,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa9b6986f250236c27e5a204062434a773a13243d2ffc2955f37bdba4c5c6a1" +checksum = "61b1d86e7705efe1be1b569bab41d4fa1e14e220b60a160f78de2db687add079" dependencies = [ "bindgen 0.69.5", "cc", @@ -844,9 +844,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.21" +version = "1.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0" +checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" dependencies = [ "jobserver", "libc", @@ -1065,7 +1065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -2022,7 +2022,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2549,7 +2549,7 @@ dependencies = [ "gobject-sys", "libc", "system-deps", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3991,7 +3991,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi 0.5.0", "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4253,7 +4253,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -6139,7 +6139,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -6177,9 +6177,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.2" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7149975849f1abb3832b246010ef62ccc80d3a76169517ada7188252b9cfb437" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ "aws-lc-rs", "ring", @@ -7507,7 +7507,7 @@ dependencies = [ "getrandom", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -8864,7 +8864,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/components/devtools/actors/browsing_context.rs b/components/devtools/actors/browsing_context.rs index 5de0855df4a..81a00e82d47 100644 --- a/components/devtools/actors/browsing_context.rs +++ b/components/devtools/actors/browsing_context.rs @@ -149,10 +149,6 @@ impl ResourceAvailable for BrowsingContextActor { fn actor_name(&self) -> String { self.name.clone() } - - fn get_streams(&self) -> &RefCell<HashMap<StreamId, TcpStream>> { - &self.streams - } } impl Actor for BrowsingContextActor { diff --git a/components/devtools/actors/console.rs b/components/devtools/actors/console.rs index 3897ffa0fce..fd0bd184bfa 100644 --- a/components/devtools/actors/console.rs +++ b/components/devtools/actors/console.rs @@ -252,6 +252,7 @@ impl ConsoleActor { page_error: PageError, id: UniqueId, registry: &ActorRegistry, + stream: &mut TcpStream, ) { self.cached_events .borrow_mut() @@ -262,7 +263,11 @@ impl ConsoleActor { if let Root::BrowsingContext(bc) = &self.root { registry .find::<BrowsingContextActor>(bc) - .resource_available(PageErrorWrapper { page_error }, "error-message".into()) + .resource_available( + PageErrorWrapper { page_error }, + "error-message".into(), + stream, + ) }; } } @@ -272,6 +277,7 @@ impl ConsoleActor { console_message: ConsoleMessage, id: UniqueId, registry: &ActorRegistry, + stream: &mut TcpStream, ) { let log_message: ConsoleLog = console_message.into(); self.cached_events @@ -283,7 +289,7 @@ impl ConsoleActor { if let Root::BrowsingContext(bc) = &self.root { registry .find::<BrowsingContextActor>(bc) - .resource_available(log_message, "console-message".into()) + .resource_available(log_message, "console-message".into(), stream) }; } } diff --git a/components/devtools/actors/watcher.rs b/components/devtools/actors/watcher.rs index b0b2c755fd8..061ffc92336 100644 --- a/components/devtools/actors/watcher.rs +++ b/components/devtools/actors/watcher.rs @@ -31,7 +31,7 @@ use crate::actors::watcher::thread_configuration::{ ThreadConfigurationActor, ThreadConfigurationActorMsg, }; use crate::protocol::JsonPacketStream; -use crate::resource::{ResourceAvailable, ResourceAvailableReply}; +use crate::resource::ResourceAvailable; use crate::{EmptyReplyMsg, StreamId, WorkerActor}; pub mod network_parent; @@ -291,28 +291,28 @@ impl Actor for WatcherActor { title: Some(target.title.borrow().clone()), url: Some(target.url.borrow().clone()), }; - target.resource_available(event, "document-event".into()); + target.resource_available(event, "document-event".into(), stream); } }, "source" => { let thread_actor = registry.find::<ThreadActor>(&target.thread); let sources = thread_actor.source_manager.sources(); - target.resources_available(sources.iter().collect(), "source".into()); + target.resources_available( + sources.iter().collect(), + "source".into(), + stream, + ); for worker_name in &root.workers { let worker = registry.find::<WorkerActor>(worker_name); let thread = registry.find::<ThreadActor>(&worker.thread); let worker_sources = thread.source_manager.sources(); - let msg = ResourceAvailableReply { - from: worker.name(), - type_: "resources-available-array".into(), - array: vec![( - "source".to_string(), - worker_sources.iter().cloned().collect(), - )], - }; - let _ = stream.write_json_packet(&msg); + worker.resources_available( + worker_sources.iter().collect(), + "source".into(), + stream, + ); } }, "console-message" | "error-message" => {}, diff --git a/components/devtools/actors/worker.rs b/components/devtools/actors/worker.rs index 68ff56fb3b2..f3ca4f2aed7 100644 --- a/components/devtools/actors/worker.rs +++ b/components/devtools/actors/worker.rs @@ -17,7 +17,7 @@ use servo_url::ServoUrl; use crate::StreamId; use crate::actor::{Actor, ActorMessageStatus, ActorRegistry}; use crate::protocol::JsonPacketStream; -use crate::resource::{ResourceAvailable, ResourceAvailableReply}; +use crate::resource::ResourceAvailable; #[derive(Clone, Copy)] #[allow(dead_code)] @@ -60,10 +60,6 @@ impl ResourceAvailable for WorkerActor { fn actor_name(&self) -> String { self.name.clone() } - - fn get_streams(&self) -> &RefCell<HashMap<StreamId, TcpStream>> { - &self.streams - } } impl Actor for WorkerActor { @@ -133,28 +129,6 @@ impl Actor for WorkerActor { } } -impl WorkerActor { - pub(crate) fn resource_available<T: Serialize>(&self, resource: T, resource_type: String) { - self.resources_available(vec![resource], resource_type); - } - - pub(crate) fn resources_available<T: Serialize>( - &self, - resources: Vec<T>, - resource_type: String, - ) { - let msg = ResourceAvailableReply::<T> { - from: self.name(), - type_: "resources-available-array".into(), - array: vec![(resource_type, resources)], - }; - - for stream in self.streams.borrow_mut().values_mut() { - let _ = stream.write_json_packet(&msg); - } - } -} - #[derive(Serialize)] struct DetachedReply { from: String, diff --git a/components/devtools/lib.rs b/components/devtools/lib.rs index 5fb9485e9d3..d097cb25e9d 100644 --- a/components/devtools/lib.rs +++ b/components/devtools/lib.rs @@ -414,7 +414,7 @@ impl DevtoolsInstance { } fn handle_page_error( - &self, + &mut self, pipeline_id: PipelineId, worker_id: Option<WorkerId>, page_error: PageError, @@ -426,11 +426,13 @@ impl DevtoolsInstance { let actors = self.actors.lock().unwrap(); let console_actor = actors.find::<ConsoleActor>(&console_actor_name); let id = worker_id.map_or(UniqueId::Pipeline(pipeline_id), UniqueId::Worker); - console_actor.handle_page_error(page_error, id, &actors); + for stream in self.connections.values_mut() { + console_actor.handle_page_error(page_error.clone(), id.clone(), &actors, stream); + } } fn handle_console_message( - &self, + &mut self, pipeline_id: PipelineId, worker_id: Option<WorkerId>, console_message: ConsoleMessage, @@ -442,7 +444,9 @@ impl DevtoolsInstance { let actors = self.actors.lock().unwrap(); let console_actor = actors.find::<ConsoleActor>(&console_actor_name); let id = worker_id.map_or(UniqueId::Pipeline(pipeline_id), UniqueId::Worker); - console_actor.handle_console_api(console_message, id, &actors); + for stream in self.connections.values_mut() { + console_actor.handle_console_api(console_message.clone(), id.clone(), &actors, stream); + } } fn find_console_actor( @@ -529,7 +533,10 @@ impl DevtoolsInstance { }; let worker_actor = actors.find::<WorkerActor>(worker_actor_name); - worker_actor.resource_available(source, "source".into()); + + for stream in self.connections.values_mut() { + worker_actor.resource_available(&source, "source".into(), stream); + } } else { let Some(browsing_context_id) = self.pipelines.get(&pipeline_id) else { return; @@ -556,7 +563,10 @@ impl DevtoolsInstance { // Notify browsing context about the new source let browsing_context = actors.find::<BrowsingContextActor>(actor_name); - browsing_context.resource_available(source, "source".into()); + + for stream in self.connections.values_mut() { + browsing_context.resource_available(&source, "source".into(), stream); + } } } } diff --git a/components/devtools/resource.rs b/components/devtools/resource.rs index 7cef8188cc8..4e6aa4042b8 100644 --- a/components/devtools/resource.rs +++ b/components/devtools/resource.rs @@ -2,13 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use std::cell::RefCell; -use std::collections::HashMap; use std::net::TcpStream; use serde::Serialize; -use crate::StreamId; use crate::protocol::JsonPacketStream; #[derive(Serialize)] @@ -22,21 +19,27 @@ pub(crate) struct ResourceAvailableReply<T: Serialize> { pub(crate) trait ResourceAvailable { fn actor_name(&self) -> String; - fn get_streams(&self) -> &RefCell<HashMap<StreamId, TcpStream>>; - - fn resource_available<T: Serialize>(&self, resource: T, resource_type: String) { - self.resources_available(vec![resource], resource_type); + fn resource_available<T: Serialize>( + &self, + resource: T, + resource_type: String, + stream: &mut TcpStream, + ) { + self.resources_available(vec![resource], resource_type, stream); } - fn resources_available<T: Serialize>(&self, resources: Vec<T>, resource_type: String) { + fn resources_available<T: Serialize>( + &self, + resources: Vec<T>, + resource_type: String, + stream: &mut TcpStream, + ) { let msg = ResourceAvailableReply::<T> { from: self.actor_name(), type_: "resources-available-array".into(), array: vec![(resource_type, resources)], }; - for stream in self.get_streams().borrow_mut().values_mut() { - let _ = stream.write_json_packet(&msg); - } + let _ = stream.write_json_packet(&msg); } } diff --git a/components/layout/display_list/mod.rs b/components/layout/display_list/mod.rs index 186272cda36..d6cbb50e4a1 100644 --- a/components/layout/display_list/mod.rs +++ b/components/layout/display_list/mod.rs @@ -153,10 +153,6 @@ pub(crate) struct DisplayListBuilder<'a> { /// list building functions. current_clip_chain_id: ClipChainId, - /// The [OpaqueNode] handle to the node used to paint the page background - /// if the background was a canvas. - element_for_canvas_background: OpaqueNode, - /// A [LayoutContext] used to get information about the device pixel ratio /// and get handles to WebRender images. pub context: &'a LayoutContext<'a>, @@ -169,6 +165,11 @@ pub(crate) struct DisplayListBuilder<'a> { /// This data is collected during the traversal of the fragment tree and used /// to paint the highlight at the very end. inspector_highlight: Option<InspectorHighlight>, + + /// Whether or not the `<body>` element should be painted. This is false if the root `<html>` + /// element inherits the `<body>`'s background to paint the page canvas background. + /// See <https://drafts.csswg.org/css-backgrounds/#body-background>. + paint_body_background: bool, } struct InspectorHighlight { @@ -218,12 +219,12 @@ impl DisplayList { current_scroll_node_id: self.compositor_info.root_reference_frame_id, current_reference_frame_scroll_node_id: self.compositor_info.root_reference_frame_id, current_clip_chain_id: ClipChainId::INVALID, - element_for_canvas_background: fragment_tree.canvas_background.from_element, context, display_list: self, inspector_highlight: context .highlighted_dom_node .map(InspectorHighlight::for_node), + paint_body_background: true, }; fragment_tree.build_display_list(&mut builder, root_stacking_context); @@ -999,12 +1000,17 @@ impl<'a> BuilderForBoxFragment<'a> { } fn build_background(&mut self, builder: &mut DisplayListBuilder) { - if self - .fragment - .base - .is_for_node(builder.element_for_canvas_background) + let flags = self.fragment.base.flags; + + // The root element's background is painted separately as it might inherit the `<body>`'s + // background. + if flags.intersects(FragmentFlags::IS_ROOT_ELEMENT) { + return; + } + // If the `<body>` background was inherited by the root element, don't paint it again here. + if !builder.paint_body_background && + flags.intersects(FragmentFlags::IS_BODY_ELEMENT_OF_HTML_ELEMENT_ROOT) { - // This background is already painted for the canvas, don’t paint it again here. return; } diff --git a/components/layout/display_list/stacking_context.rs b/components/layout/display_list/stacking_context.rs index b044b713260..27fa73a680c 100644 --- a/components/layout/display_list/stacking_context.rs +++ b/components/layout/display_list/stacking_context.rs @@ -582,15 +582,42 @@ impl StackingContext { &self, builder: &mut DisplayListBuilder, fragment_tree: &crate::FragmentTree, - containing_block_rect: &PhysicalRect<Au>, ) { - let style = if let Some(style) = &fragment_tree.canvas_background.style { - style - } else { - // The root element has `display: none`, - // or the canvas background is taken from `<body>` which has `display: none` + let Some(root_fragment) = fragment_tree.root_fragments.iter().find(|fragment| { + fragment + .base() + .is_some_and(|base| base.flags.intersects(FragmentFlags::IS_ROOT_ELEMENT)) + }) else { return; }; + let root_fragment = match root_fragment { + Fragment::Box(box_fragment) | Fragment::Float(box_fragment) => box_fragment, + _ => return, + } + .borrow(); + + let source_style = { + // > For documents whose root element is an HTML HTML element or an XHTML html element + // > [HTML]: if the computed value of background-image on the root element is none and its + // > background-color is transparent, user agents must instead propagate the computed + // > values of the background properties from that element’s first HTML BODY or XHTML body + // > child element. + if root_fragment.style.background_is_transparent() { + let body_fragment = fragment_tree.body_fragment(); + builder.paint_body_background = body_fragment.is_none(); + body_fragment + .map(|body_fragment| body_fragment.borrow().style.clone()) + .unwrap_or(root_fragment.style.clone()) + } else { + root_fragment.style.clone() + } + }; + + // This can happen if the root fragment does not have a `<body>` child (either because it is + // `display: none` or `display: contents`) or if the `<body>`'s background is transparent. + if source_style.background_is_transparent() { + return; + } // The painting area is theoretically the infinite 2D plane, // but we need a rectangle with finite coordinates. @@ -598,14 +625,15 @@ impl StackingContext { // If the document is smaller than the viewport (and doesn’t scroll), // we still want to paint the rest of the viewport. // If it’s larger, we also want to paint areas reachable after scrolling. - let mut painting_area = fragment_tree + let painting_area = fragment_tree .initial_containing_block .union(&fragment_tree.scrollable_overflow) .to_webrender(); - let background_color = style.resolve_color(&style.get_background().background_color); + let background_color = + source_style.resolve_color(&source_style.get_background().background_color); if background_color.alpha > 0.0 { - let common = builder.common_properties(painting_area, style); + let common = builder.common_properties(painting_area, &source_style); let color = super::rgba(background_color); builder .display_list @@ -613,97 +641,14 @@ impl StackingContext { .push_rect(&common, painting_area, color) } - // `background-color` was comparatively easy, - // but `background-image` needs a positioning area based on the root element. - // Let’s find the corresponding fragment. - - // The fragment generated by the root element is the first one here, unless… - let first_if_any = self.contents.first().or_else(|| { - // There wasn’t any `StackingContextFragment` in the root `StackingContext`, - // because the root element generates a stacking context. Let’s find that one. - self.real_stacking_contexts_and_positioned_stacking_containers - .first() - .and_then(|first_child_stacking_context| { - first_child_stacking_context.contents.first() - }) - }); - - macro_rules! debug_panic { - ($msg: expr) => { - if cfg!(debug_assertions) { - panic!($msg); - } else { - warn!($msg); - return; - } - }; - } - - let first_stacking_context_fragment = if let Some(first) = first_if_any { - first - } else { - // This should only happen if the root element has `display: none` - // TODO(servo#30569) revert to debug_panic!() once underlying bug is fixed - log::warn!( - "debug assertion failed! `CanvasBackground::for_root_element` should have returned `style: None`", - ); - return; - }; - - let StackingContextContent::Fragment { - fragment, - scroll_node_id, - containing_block, - .. - } = first_stacking_context_fragment - else { - debug_panic!("Expected a fragment, not a stacking container"); - }; - let box_fragment = match fragment { - Fragment::Box(box_fragment) | Fragment::Float(box_fragment) => box_fragment, - _ => debug_panic!("Expected a box-generated fragment"), - }; - let box_fragment = &*box_fragment.borrow(); - - // The `StackingContextFragment` we found is for the root DOM element: - debug_assert_eq!( - fragment.tag().map(|tag| tag.node), - Some(fragment_tree.canvas_background.root_element), - ); - - // The root element may have a CSS transform, and we want the canvas’ - // background image to be transformed. To do so, take its `SpatialId` - // (but not its `ClipId`) - builder.current_scroll_node_id = *scroll_node_id; - - // Now we need express the painting area rectangle in the local coordinate system, - // which differs from the top-level coordinate system based on… - - // Convert the painting area rectangle to the local coordinate system of this `SpatialId` - if let Some(reference_frame_data) = - box_fragment.reference_frame_data_if_necessary(containing_block_rect) - { - painting_area.min -= reference_frame_data.origin.to_webrender().to_vector(); - if let Some(transformed) = reference_frame_data - .transform - .inverse() - .and_then(|inversed| inversed.outer_transformed_rect(&painting_area.to_rect())) - { - painting_area = transformed.to_box2d(); - } else { - // The desired rect cannot be represented, so skip painting this background-image - return; - } - } - let mut fragment_builder = BuilderForBoxFragment::new( - box_fragment, - containing_block, + &root_fragment, + &fragment_tree.initial_containing_block, false, /* is_hit_test_for_scrollable_overflow */ false, /* is_collapsed_table_borders */ ); let painter = super::background::BackgroundPainter { - style, + style: &source_style, painting_area_override: Some(painting_area), positioning_area_override: None, }; diff --git a/components/layout/flow/mod.rs b/components/layout/flow/mod.rs index 0c326c4cc6d..e23193f3904 100644 --- a/components/layout/flow/mod.rs +++ b/components/layout/flow/mod.rs @@ -52,7 +52,7 @@ pub mod inline; mod root; pub(crate) use construct::BlockContainerBuilder; -pub use root::{BoxTree, CanvasBackground}; +pub use root::BoxTree; #[derive(Debug, MallocSizeOf)] pub(crate) struct BlockFormattingContext { diff --git a/components/layout/flow/root.rs b/components/layout/flow/root.rs index e813777b6fe..ec85f3574dc 100644 --- a/components/layout/flow/root.rs +++ b/components/layout/flow/root.rs @@ -12,7 +12,7 @@ use script_layout_interface::wrapper_traits::{ }; use script_layout_interface::{LayoutElementType, LayoutNodeType}; use servo_arc::Arc; -use style::dom::{NodeInfo, OpaqueNode, TNode}; +use style::dom::{NodeInfo, TNode}; use style::properties::ComputedValues; use style::values::computed::Overflow; use style_traits::CSSPixel; @@ -30,7 +30,7 @@ use crate::fragment_tree::FragmentTree; use crate::geom::{LogicalVec2, PhysicalPoint, PhysicalRect, PhysicalSize}; use crate::positioned::{AbsolutelyPositionedBox, PositioningContext}; use crate::replaced::ReplacedContents; -use crate::style_ext::{ComputedValuesExt, Display, DisplayGeneratingBox, DisplayInside}; +use crate::style_ext::{Display, DisplayGeneratingBox, DisplayInside}; use crate::taffy::{TaffyItemBox, TaffyItemBoxInner}; use crate::{DefiniteContainingBlock, PropagatedBoxTreeData}; @@ -40,9 +40,6 @@ pub struct BoxTree { /// There may be zero if that element has `display: none`. root: BlockFormattingContext, - /// <https://drafts.csswg.org/css-backgrounds/#special-backgrounds> - canvas_background: CanvasBackground, - /// Whether or not the viewport should be sensitive to scrolling input events in two axes viewport_scroll_sensitivity: AxesScrollSensitivity, } @@ -96,7 +93,6 @@ impl BoxTree { contents, contains_floats, }, - canvas_background: CanvasBackground::for_root_element(context, root_element), // From https://www.w3.org/TR/css-overflow-3/#overflow-propagation: // > If visible is applied to the viewport, it must be interpreted as auto. // > If clip is applied to the viewport, it must be interpreted as hidden. @@ -425,69 +421,7 @@ impl BoxTree { root_fragments, scrollable_overflow, physical_containing_block, - self.canvas_background.clone(), self.viewport_scroll_sensitivity, ) } } - -/// <https://drafts.csswg.org/css-backgrounds/#root-background> -#[derive(Clone, MallocSizeOf)] -pub struct CanvasBackground { - /// DOM node for the root element - pub root_element: OpaqueNode, - - /// The element whose style the canvas takes background properties from (see next field). - /// This can be the root element (same as the previous field), or the HTML `<body>` element. - /// See <https://drafts.csswg.org/css-backgrounds/#body-background> - pub from_element: OpaqueNode, - - /// The computed styles to take background properties from. - #[conditional_malloc_size_of] - pub style: Option<Arc<ComputedValues>>, -} - -impl CanvasBackground { - fn for_root_element(context: &LayoutContext, root_element: ServoLayoutNode<'_>) -> Self { - let root_style = root_element.style(context); - - let mut style = root_style; - let mut from_element = root_element; - - // https://drafts.csswg.org/css-backgrounds/#body-background - // “if the computed value of background-image on the root element is none - // and its background-color is transparent” - if style.background_is_transparent() && - // “For documents whose root element is an HTML `HTML` element - // or an XHTML `html` element” - root_element.type_id() == LayoutNodeType::Element(LayoutElementType::HTMLHtmlElement) && - // Don’t try to access styles for an unstyled subtree - !matches!(style.clone_display().into(), Display::None) - { - // “that element’s first HTML `BODY` or XHTML `body` child element” - if let Some(body) = iter_child_nodes(root_element).find(|child| { - child.is_element() && - child.type_id() == - LayoutNodeType::Element(LayoutElementType::HTMLBodyElement) - }) { - style = body.style(context); - from_element = body; - } - } - - Self { - root_element: root_element.opaque(), - from_element: from_element.opaque(), - - // “However, if no boxes are generated for the element - // whose background would be used for the canvas - // (for example, if the root element has display: none), - // then the canvas background is transparent.” - style: if let Display::GeneratingBox(_) = style.clone_display().into() { - Some(style) - } else { - None - }, - } - } -} diff --git a/components/layout/fragment_tree/base_fragment.rs b/components/layout/fragment_tree/base_fragment.rs index 0cf6ee511cb..ff5df44c225 100644 --- a/components/layout/fragment_tree/base_fragment.rs +++ b/components/layout/fragment_tree/base_fragment.rs @@ -32,10 +32,8 @@ impl BaseFragment { } } - /// Returns true if this fragment is non-anonymous and it is for the given - /// OpaqueNode, regardless of the pseudo element. - pub(crate) fn is_for_node(&self, node: OpaqueNode) -> bool { - self.tag.map(|tag| tag.node == node).unwrap_or(false) + pub(crate) fn is_anonymous(&self) -> bool { + self.tag.is_none() } } diff --git a/components/layout/fragment_tree/box_fragment.rs b/components/layout/fragment_tree/box_fragment.rs index 4cd8f278498..596556b296c 100644 --- a/components/layout/fragment_tree/box_fragment.rs +++ b/components/layout/fragment_tree/box_fragment.rs @@ -16,7 +16,7 @@ use style::logical_geometry::WritingMode; use style::properties::ComputedValues; use style::values::specified::box_::DisplayOutside; -use super::{BaseFragment, BaseFragmentInfo, CollapsedBlockMargins, Fragment}; +use super::{BaseFragment, BaseFragmentInfo, CollapsedBlockMargins, Fragment, FragmentFlags}; use crate::ArcRefCell; use crate::display_list::ToWebRender; use crate::formatting_contexts::Baselines; @@ -243,6 +243,16 @@ impl BoxFragment { self.margin + self.border + self.padding } + pub(crate) fn is_root_element(&self) -> bool { + self.base.flags.intersects(FragmentFlags::IS_ROOT_ELEMENT) + } + + pub(crate) fn is_body_element_of_html_element_root(&self) -> bool { + self.base + .flags + .intersects(FragmentFlags::IS_BODY_ELEMENT_OF_HTML_ELEMENT_ROOT) + } + pub fn print(&self, tree: &mut PrintTree) { tree.new_level(format!( "Box\ diff --git a/components/layout/fragment_tree/fragment_tree.rs b/components/layout/fragment_tree/fragment_tree.rs index 1499a50dacf..979bd0090fc 100644 --- a/components/layout/fragment_tree/fragment_tree.rs +++ b/components/layout/fragment_tree/fragment_tree.rs @@ -11,10 +11,10 @@ use malloc_size_of_derive::MallocSizeOf; use style::animation::AnimationSetKey; use webrender_api::units; -use super::{ContainingBlockManager, Fragment}; +use super::{BoxFragment, ContainingBlockManager, Fragment}; +use crate::ArcRefCell; use crate::context::LayoutContext; use crate::display_list::StackingContext; -use crate::flow::CanvasBackground; use crate::geom::PhysicalRect; #[derive(MallocSizeOf)] @@ -36,9 +36,6 @@ pub struct FragmentTree { /// The containing block used in the layout of this fragment tree. pub(crate) initial_containing_block: PhysicalRect<Au>, - /// <https://drafts.csswg.org/css-backgrounds/#special-backgrounds> - pub(crate) canvas_background: CanvasBackground, - /// Whether or not the viewport is sensitive to scroll input events. pub viewport_scroll_sensitivity: AxesScrollSensitivity, } @@ -49,14 +46,12 @@ impl FragmentTree { root_fragments: Vec<Fragment>, scrollable_overflow: PhysicalRect<Au>, initial_containing_block: PhysicalRect<Au>, - canvas_background: CanvasBackground, viewport_scroll_sensitivity: AxesScrollSensitivity, ) -> Self { let fragment_tree = Self { root_fragments, scrollable_overflow, initial_containing_block, - canvas_background, viewport_scroll_sensitivity, }; @@ -102,11 +97,7 @@ impl FragmentTree { root_stacking_context: &StackingContext, ) { // Paint the canvas’ background (if any) before/under everything else - root_stacking_context.build_canvas_background_display_list( - builder, - self, - &self.initial_containing_block, - ); + root_stacking_context.build_canvas_background_display_list(builder, self); root_stacking_context.build_display_list(builder); } @@ -160,4 +151,45 @@ impl FragmentTree { scroll_area } } + + /// Find the `<body>` element's [`Fragment`], if it exists in this [`FragmentTree`]. + pub(crate) fn body_fragment(&self) -> Option<ArcRefCell<BoxFragment>> { + fn find_body(children: &[Fragment]) -> Option<ArcRefCell<BoxFragment>> { + children.iter().find_map(|fragment| { + match fragment { + Fragment::Box(box_fragment) | Fragment::Float(box_fragment) => { + let borrowed_box_fragment = box_fragment.borrow(); + if borrowed_box_fragment.is_body_element_of_html_element_root() { + return Some(box_fragment.clone()); + } + + // The fragment for the `<body>` element is typically a child of the root (though, + // not if it's absolutely positioned), so we need to recurse into the children of + // the root to find it. + // + // Additionally, recurse into any anonymous fragments, as the `<body>` fragment may + // have created anonymous parents (for instance by creating an inline formatting context). + if borrowed_box_fragment.is_root_element() || + borrowed_box_fragment.base.is_anonymous() + { + find_body(&borrowed_box_fragment.children) + } else { + None + } + }, + Fragment::Positioning(positioning_context) + if positioning_context.borrow().base.is_anonymous() => + { + // If the `<body>` element is a `display: inline` then it might be nested inside of a + // `PositioningFragment` for the purposes of putting it on the first line of the implied + // inline formatting context. + find_body(&positioning_context.borrow().children) + }, + _ => None, + } + }) + } + + find_body(&self.root_fragments) + } } diff --git a/components/script/dom/bindings/buffer_source.rs b/components/script/dom/bindings/buffer_source.rs index dd6984e1eab..14a71532e9d 100644 --- a/components/script/dom/bindings/buffer_source.rs +++ b/components/script/dom/bindings/buffer_source.rs @@ -37,7 +37,7 @@ use js::rust::{ #[cfg(feature = "webgpu")] use js::typedarray::{ArrayBuffer, HeapArrayBuffer}; use js::typedarray::{ - ArrayBufferU8, ArrayBufferView, ArrayBufferViewU8, CreateWith, TypedArray, TypedArrayElement, + ArrayBufferU8, ArrayBufferViewU8, CreateWith, TypedArray, TypedArrayElement, TypedArrayElementCreator, }; @@ -63,36 +63,25 @@ pub(crate) enum BufferSource { ArrayBuffer(Box<Heap<*mut JSObject>>), } -pub(crate) fn new_initialized_heap_buffer_source<T>( - init: HeapTypedArrayInit, +pub(crate) fn create_heap_buffer_source_with_length<T>( + cx: JSContext, + len: u32, can_gc: CanGc, -) -> Result<HeapBufferSource<T>, ()> +) -> Fallible<HeapBufferSource<T>> where T: TypedArrayElement + TypedArrayElementCreator, T::Element: Clone + Copy, { - let heap_buffer_source = match init { - HeapTypedArrayInit::Buffer(buffer_source) => HeapBufferSource { - buffer_source, - phantom: PhantomData, - }, - HeapTypedArrayInit::Info { len, cx } => { - rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>()); - let typed_array_result = - create_buffer_source_with_length::<T>(cx, len as usize, array.handle_mut(), can_gc); - if typed_array_result.is_err() { - return Err(()); - } - - HeapBufferSource::<T>::new(BufferSource::ArrayBufferView(Heap::boxed(*array.handle()))) - }, - }; - Ok(heap_buffer_source) -} + rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>()); + let typed_array_result = + create_buffer_source_with_length::<T>(cx, len as usize, array.handle_mut(), can_gc); + if typed_array_result.is_err() { + return Err(Error::JSFailed); + } -pub(crate) enum HeapTypedArrayInit { - Buffer(BufferSource), - Info { len: u32, cx: JSContext }, + Ok(HeapBufferSource::<T>::new(BufferSource::ArrayBufferView( + Heap::boxed(*array.handle()), + ))) } pub(crate) struct HeapBufferSource<T> { @@ -131,11 +120,11 @@ where } pub(crate) fn from_view( - chunk: CustomAutoRooterGuard<ArrayBufferView>, - ) -> HeapBufferSource<ArrayBufferViewU8> { - HeapBufferSource::<ArrayBufferViewU8>::new(BufferSource::ArrayBufferView(Heap::boxed( - unsafe { *chunk.underlying_object() }, - ))) + chunk: CustomAutoRooterGuard<TypedArray<T, *mut JSObject>>, + ) -> HeapBufferSource<T> { + HeapBufferSource::<T>::new(BufferSource::ArrayBufferView(Heap::boxed(unsafe { + *chunk.underlying_object() + }))) } pub(crate) fn default() -> Self { diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index a4b05e7f445..0c71f526a0e 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -6569,9 +6569,6 @@ impl DocumentMethods<crate::DomTypeHolder> for Document { Ok(()) } - // https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers - document_and_element_event_handlers!(); - // https://fullscreen.spec.whatwg.org/#handler-document-onfullscreenerror event_handler!(fullscreenerror, GetOnfullscreenerror, SetOnfullscreenerror); diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 7f38e55fb14..7770d0c8fa5 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -12,6 +12,7 @@ use std::rc::Rc; use std::str::FromStr; use std::{fmt, mem}; +use content_security_policy as csp; use cssparser::match_ignore_ascii_case; use devtools_traits::AttrInfo; use dom_struct::dom_struct; @@ -2120,6 +2121,59 @@ impl Element { node.owner_doc().element_attr_will_change(self, attr); } + /// <https://html.spec.whatwg.org/multipage/#the-style-attribute> + fn update_style_attribute(&self, attr: &Attr, mutation: AttributeMutation) { + let doc = self.upcast::<Node>().owner_doc(); + // Modifying the `style` attribute might change style. + *self.style_attribute.borrow_mut() = match mutation { + AttributeMutation::Set(..) => { + // This is the fast path we use from + // CSSStyleDeclaration. + // + // Juggle a bit to keep the borrow checker happy + // while avoiding the extra clone. + let is_declaration = matches!(*attr.value(), AttrValue::Declaration(..)); + + let block = if is_declaration { + let mut value = AttrValue::String(String::new()); + attr.swap_value(&mut value); + let (serialization, block) = match value { + AttrValue::Declaration(s, b) => (s, b), + _ => unreachable!(), + }; + let mut value = AttrValue::String(serialization); + attr.swap_value(&mut value); + block + } else { + let win = self.owner_window(); + let source = &**attr.value(); + // However, if the Should element's inline behavior be blocked by + // Content Security Policy? algorithm returns "Blocked" when executed + // upon the attribute's element, "style attribute", and the attribute's value, + // then the style rules defined in the attribute's value must not be applied to the element. [CSP] + if doc.should_elements_inline_type_behavior_be_blocked( + self, + csp::InlineCheckType::StyleAttribute, + source, + ) == csp::CheckResult::Blocked + { + return; + } + Arc::new(doc.style_shared_lock().wrap(parse_style_attribute( + source, + &UrlExtraData(doc.base_url().get_arc()), + win.css_error_reporter(), + doc.quirks_mode(), + CssRuleType::Style, + ))) + }; + + Some(block) + }, + AttributeMutation::Removed => None, + }; + } + // https://dom.spec.whatwg.org/#insert-adjacent pub(crate) fn insert_adjacent( &self, @@ -3800,43 +3854,7 @@ impl VirtualMethods for Element { &local_name!("tabindex") | &local_name!("draggable") | &local_name!("hidden") => { self.update_sequentially_focusable_status(can_gc) }, - &local_name!("style") => { - // Modifying the `style` attribute might change style. - *self.style_attribute.borrow_mut() = match mutation { - AttributeMutation::Set(..) => { - // This is the fast path we use from - // CSSStyleDeclaration. - // - // Juggle a bit to keep the borrow checker happy - // while avoiding the extra clone. - let is_declaration = matches!(*attr.value(), AttrValue::Declaration(..)); - - let block = if is_declaration { - let mut value = AttrValue::String(String::new()); - attr.swap_value(&mut value); - let (serialization, block) = match value { - AttrValue::Declaration(s, b) => (s, b), - _ => unreachable!(), - }; - let mut value = AttrValue::String(serialization); - attr.swap_value(&mut value); - block - } else { - let win = self.owner_window(); - Arc::new(doc.style_shared_lock().wrap(parse_style_attribute( - &attr.value(), - &UrlExtraData(doc.base_url().get_arc()), - win.css_error_reporter(), - doc.quirks_mode(), - CssRuleType::Style, - ))) - }; - - Some(block) - }, - AttributeMutation::Removed => None, - }; - }, + &local_name!("style") => self.update_style_attribute(attr, mutation), &local_name!("id") => { *self.id_attribute.borrow_mut() = mutation.new_value(attr).and_then(|value| { let value = value.as_atom(); diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs index b4efba9bed9..19b0ab4efce 100644 --- a/components/script/dom/htmlbodyelement.rs +++ b/components/script/dom/htmlbodyelement.rs @@ -181,26 +181,31 @@ impl VirtualMethods for HTMLBodyElement { (name, AttributeMutation::Set(_)) if name.starts_with("on") => { let window = self.owner_window(); // https://html.spec.whatwg.org/multipage/ - // #event-handlers-on-elements,-document-objects,-and-window-objects:event-handlers-3 + // #event-handlers-on-elements,-document-objects,-and-window-objects:event-handlers-6 match name { - &local_name!("onfocus") | - &local_name!("onload") | - &local_name!("onscroll") | &local_name!("onafterprint") | &local_name!("onbeforeprint") | &local_name!("onbeforeunload") | + &local_name!("onerror") | + &local_name!("onfocus") | &local_name!("onhashchange") | + &local_name!("onload") | &local_name!("onlanguagechange") | &local_name!("onmessage") | + &local_name!("onmessageerror") | &local_name!("onoffline") | &local_name!("ononline") | &local_name!("onpagehide") | + &local_name!("onpagereveal") | &local_name!("onpageshow") | + &local_name!("onpageswap") | &local_name!("onpopstate") | - &local_name!("onstorage") | + &local_name!("onrejectionhandled") | &local_name!("onresize") | - &local_name!("onunload") | - &local_name!("onerror") => { + &local_name!("onscroll") | + &local_name!("onstorage") | + &local_name!("onunhandledrejection") | + &local_name!("onunload") => { let source = &**attr.value(); let evtarget = window.upcast::<EventTarget>(); // forwarded event let source_line = 1; //TODO(#9604) obtain current JS execution line diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs index 59b71543d6d..32a979ad138 100644 --- a/components/script/dom/htmlelement.rs +++ b/components/script/dom/htmlelement.rs @@ -191,9 +191,6 @@ impl HTMLElementMethods<crate::DomTypeHolder> for HTMLElement { // https://html.spec.whatwg.org/multipage/#globaleventhandlers global_event_handlers!(NoOnload); - // https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers - document_and_element_event_handlers!(); - // https://html.spec.whatwg.org/multipage/#dom-dataset fn Dataset(&self, can_gc: CanGc) -> DomRoot<DOMStringMap> { self.dataset.or_init(|| DOMStringMap::new(self, can_gc)) diff --git a/components/script/dom/imagedata.rs b/components/script/dom/imagedata.rs index bd45a80fce2..a891064952a 100644 --- a/components/script/dom/imagedata.rs +++ b/components/script/dom/imagedata.rs @@ -9,13 +9,13 @@ use std::vec::Vec; use dom_struct::dom_struct; use euclid::default::{Rect, Size2D}; use ipc_channel::ipc::IpcSharedMemory; -use js::jsapi::{Heap, JSObject}; +use js::gc::CustomAutoRooterGuard; +use js::jsapi::JSObject; use js::rust::HandleObject; use js::typedarray::{ClampedU8, CreateWith, Uint8ClampedArray}; -use super::bindings::buffer_source::{ - BufferSource, HeapBufferSource, HeapTypedArrayInit, new_initialized_heap_buffer_source, -}; +use super::bindings::buffer_source::{HeapBufferSource, create_heap_buffer_source_with_length}; +use crate::dom::bindings::buffer_source::create_buffer_source; use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::ImageDataMethods; use crate::dom::bindings::error::{Error, Fallible}; use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto}; @@ -55,31 +55,31 @@ impl ImageData { rooted!(in (*cx) let mut js_object = ptr::null_mut::<JSObject>()); if let Some(ref mut d) = data { d.resize(len as usize, 0); + + let typed_array = + create_buffer_source::<ClampedU8>(cx, &d[..], js_object.handle_mut(), can_gc) + .map_err(|_| Error::JSFailed)?; + let data = CreateWith::Slice(&d[..]); Uint8ClampedArray::create(*cx, data, js_object.handle_mut()).unwrap(); - Self::new_with_jsobject(global, None, width, Some(height), js_object.get(), can_gc) + auto_root!(in(*cx) let data = typed_array); + Self::new_with_data(global, None, width, Some(height), data, can_gc) } else { - Self::new_without_jsobject(global, None, width, height, can_gc) + Self::new_without_data(global, None, width, height, can_gc) } } } #[allow(unsafe_code)] - fn new_with_jsobject( + fn new_with_data( global: &GlobalScope, proto: Option<HandleObject>, width: u32, opt_height: Option<u32>, - jsobject: *mut JSObject, + data: CustomAutoRooterGuard<Uint8ClampedArray>, can_gc: CanGc, ) -> Fallible<DomRoot<ImageData>> { - let heap_typed_array = match new_initialized_heap_buffer_source::<ClampedU8>( - HeapTypedArrayInit::Buffer(BufferSource::ArrayBufferView(Heap::boxed(jsobject))), - can_gc, - ) { - Ok(heap_typed_array) => heap_typed_array, - Err(_) => return Err(Error::JSFailed), - }; + let heap_typed_array = HeapBufferSource::<ClampedU8>::from_view(data); let typed_array = match heap_typed_array.get_typed_array() { Ok(array) => array, @@ -117,13 +117,14 @@ impl ImageData { )) } - fn new_without_jsobject( + fn new_without_data( global: &GlobalScope, proto: Option<HandleObject>, width: u32, height: u32, can_gc: CanGc, ) -> Fallible<DomRoot<ImageData>> { + // If one or both of sw and sh are zero, then throw an "IndexSizeError" DOMException. if width == 0 || height == 0 { return Err(Error::IndexSize); } @@ -139,13 +140,8 @@ impl ImageData { let cx = GlobalScope::get_cx(); - let heap_typed_array = match new_initialized_heap_buffer_source::<ClampedU8>( - HeapTypedArrayInit::Info { len, cx }, - can_gc, - ) { - Ok(heap_typed_array) => heap_typed_array, - Err(_) => return Err(Error::JSFailed), - }; + let heap_typed_array = create_heap_buffer_source_with_length::<ClampedU8>(cx, len, can_gc)?; + let imagedata = Box::new(ImageData { reflector_: Reflector::new(), width, @@ -198,20 +194,19 @@ impl ImageDataMethods<crate::DomTypeHolder> for ImageData { width: u32, height: u32, ) -> Fallible<DomRoot<Self>> { - Self::new_without_jsobject(global, proto, width, height, can_gc) + Self::new_without_data(global, proto, width, height, can_gc) } /// <https://html.spec.whatwg.org/multipage/#dom-imagedata-with-data> fn Constructor_( - _cx: JSContext, global: &GlobalScope, proto: Option<HandleObject>, can_gc: CanGc, - jsobject: *mut JSObject, + data: CustomAutoRooterGuard<Uint8ClampedArray>, width: u32, opt_height: Option<u32>, ) -> Fallible<DomRoot<Self>> { - Self::new_with_jsobject(global, proto, width, opt_height, jsobject, can_gc) + Self::new_with_data(global, proto, width, opt_height, data, can_gc) } /// <https://html.spec.whatwg.org/multipage/#dom-imagedata-width> diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs index cc44497d0b9..564fe810db0 100644 --- a/components/script/dom/macros.rs +++ b/components/script/dom/macros.rs @@ -523,21 +523,29 @@ macro_rules! global_event_handlers( ); (NoOnload) => ( event_handler!(abort, GetOnabort, SetOnabort); + event_handler!(auxclick, GetOnauxclick, SetOnauxclick); event_handler!(animationend, GetOnanimationend, SetOnanimationend); event_handler!(animationiteration, GetOnanimationiteration, SetOnanimationiteration); + event_handler!(beforeinput, GetOnbeforeinput, SetOnbeforeinput); + event_handler!(beforematch, GetOnbeforematch, SetOnbeforematch); + event_handler!(beforetoggle, GetOnbeforetoggle, SetOnbeforetoggle); event_handler!(cancel, GetOncancel, SetOncancel); event_handler!(canplay, GetOncanplay, SetOncanplay); event_handler!(canplaythrough, GetOncanplaythrough, SetOncanplaythrough); event_handler!(change, GetOnchange, SetOnchange); event_handler!(click, GetOnclick, SetOnclick); event_handler!(close, GetOnclose, SetOnclose); + event_handler!(command, GetOncommand, SetOncommand); + event_handler!(contextlost, GetOncontextlost, SetOncontextlost); event_handler!(contextmenu, GetOncontextmenu, SetOncontextmenu); + event_handler!(contextrestored, GetOncontextrestored, SetOncontextrestored); + event_handler!(copy, GetOncopy, SetOncopy); event_handler!(cuechange, GetOncuechange, SetOncuechange); + event_handler!(cut, GetOncut, SetOncut); event_handler!(dblclick, GetOndblclick, SetOndblclick); event_handler!(drag, GetOndrag, SetOndrag); event_handler!(dragend, GetOndragend, SetOndragend); event_handler!(dragenter, GetOndragenter, SetOndragenter); - event_handler!(dragexit, GetOndragexit, SetOndragexit); event_handler!(dragleave, GetOndragleave, SetOndragleave); event_handler!(dragover, GetOndragover, SetOndragover); event_handler!(dragstart, GetOndragstart, SetOndragstart); @@ -561,20 +569,21 @@ macro_rules! global_event_handlers( event_handler!(mouseout, GetOnmouseout, SetOnmouseout); event_handler!(mouseover, GetOnmouseover, SetOnmouseover); event_handler!(mouseup, GetOnmouseup, SetOnmouseup); - event_handler!(wheel, GetOnwheel, SetOnwheel); + event_handler!(paste, GetOnpaste, SetOnpaste); event_handler!(pause, GetOnpause, SetOnpause); event_handler!(play, GetOnplay, SetOnplay); event_handler!(playing, GetOnplaying, SetOnplaying); event_handler!(progress, GetOnprogress, SetOnprogress); event_handler!(ratechange, GetOnratechange, SetOnratechange); event_handler!(reset, GetOnreset, SetOnreset); + event_handler!(scrollend, GetOnscrollend, SetOnscrollend); event_handler!(securitypolicyviolation, GetOnsecuritypolicyviolation, SetOnsecuritypolicyviolation); event_handler!(seeked, GetOnseeked, SetOnseeked); event_handler!(seeking, GetOnseeking, SetOnseeking); event_handler!(select, GetOnselect, SetOnselect); event_handler!(selectionchange, GetOnselectionchange, SetOnselectionchange); event_handler!(selectstart, GetOnselectstart, SetOnselectstart); - event_handler!(show, GetOnshow, SetOnshow); + event_handler!(slotchange, GetOnslotchange, SetOnslotchange); event_handler!(stalled, GetOnstalled, SetOnstalled); event_handler!(submit, GetOnsubmit, SetOnsubmit); event_handler!(suspend, GetOnsuspend, SetOnsuspend); @@ -585,6 +594,11 @@ macro_rules! global_event_handlers( event_handler!(transitionrun, GetOntransitionrun, SetOntransitionrun); event_handler!(volumechange, GetOnvolumechange, SetOnvolumechange); event_handler!(waiting, GetOnwaiting, SetOnwaiting); + event_handler!(webkitanimationend, GetOnwebkitanimationend, SetOnwebkitanimationend); + event_handler!(webkitanimationiteration, GetOnwebkitanimationiteration, SetOnwebkitanimationiteration); + event_handler!(webkitanimationstart, GetOnwebkitanimationstart, SetOnwebkitanimationstart); + event_handler!(webkittransitionend, GetOnwebkittransitionend, SetOnwebkittransitionend); + event_handler!(wheel, GetOnwheel, SetOnwheel); ) ); @@ -605,7 +619,9 @@ macro_rules! window_event_handlers( event_handler!(offline, GetOnoffline, SetOnoffline); event_handler!(online, GetOnonline, SetOnonline); event_handler!(pagehide, GetOnpagehide, SetOnpagehide); + event_handler!(pagereveal, GetOnpagereveal, SetOnpagereveal); event_handler!(pageshow, GetOnpageshow, SetOnpageshow); + event_handler!(pageswap, GetOnpageswap, SetOnpageswap); event_handler!(popstate, GetOnpopstate, SetOnpopstate); event_handler!(rejectionhandled, GetOnrejectionhandled, SetOnrejectionhandled); @@ -633,7 +649,9 @@ macro_rules! window_event_handlers( window_owned_event_handler!(offline, GetOnoffline, SetOnoffline); window_owned_event_handler!(online, GetOnonline, SetOnonline); window_owned_event_handler!(pagehide, GetOnpagehide, SetOnpagehide); + window_owned_event_handler!(pagereveal, GetOnpagereveal, SetOnpagereveal); window_owned_event_handler!(pageshow, GetOnpageshow, SetOnpageshow); + window_owned_event_handler!(pageswap, GetOnpageswap, SetOnpageswap); window_owned_event_handler!(popstate, GetOnpopstate, SetOnpopstate); window_owned_event_handler!(rejectionhandled, GetOnrejectionhandled, SetOnrejectionhandled); @@ -646,17 +664,6 @@ macro_rules! window_event_handlers( ); ); -// https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers -// see webidls/EventHandler.webidl -// As more methods get added, just update them here. -macro_rules! document_and_element_event_handlers( - () => ( - event_handler!(cut, GetOncut, SetOncut); - event_handler!(copy, GetOncopy, SetOncopy); - event_handler!(paste, GetOnpaste, SetOnpaste); - ) -); - /// DOM struct implementation for simple interfaces inheriting from PerformanceEntry. macro_rules! impl_performance_entry_struct( ($binding:ident, $struct:ident, $type:expr) => ( diff --git a/components/script_bindings/webidls/CanvasRenderingContext2D.webidl b/components/script_bindings/webidls/CanvasRenderingContext2D.webidl index 0c4960fe6ad..46d91683577 100644 --- a/components/script_bindings/webidls/CanvasRenderingContext2D.webidl +++ b/components/script_bindings/webidls/CanvasRenderingContext2D.webidl @@ -254,7 +254,7 @@ interface CanvasPattern { Serializable] interface ImageData { [Throws] constructor(unsigned long sw, unsigned long sh/*, optional ImageDataSettings settings = {}*/); - [Throws] constructor(/* Uint8ClampedArray */ object data, unsigned long sw, optional unsigned long sh + [Throws] constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh /*, optional ImageDataSettings settings = {}*/); readonly attribute unsigned long width; diff --git a/components/script_bindings/webidls/Document.webidl b/components/script_bindings/webidls/Document.webidl index 737e74d3bf2..e878b1642e4 100644 --- a/components/script_bindings/webidls/Document.webidl +++ b/components/script_bindings/webidls/Document.webidl @@ -154,7 +154,6 @@ partial /*sealed*/ interface Document { // also has obsolete members }; Document includes GlobalEventHandlers; -Document includes DocumentAndElementEventHandlers; // https://html.spec.whatwg.org/multipage/#Document-partial partial interface Document { diff --git a/components/script_bindings/webidls/EventHandler.webidl b/components/script_bindings/webidls/EventHandler.webidl index f597ce237d3..d32302f4b37 100644 --- a/components/script_bindings/webidls/EventHandler.webidl +++ b/components/script_bindings/webidls/EventHandler.webidl @@ -28,6 +28,10 @@ typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler; [Exposed=Window] interface mixin GlobalEventHandlers { attribute EventHandler onabort; + attribute EventHandler onauxclick; + attribute EventHandler onbeforeinput; + attribute EventHandler onbeforematch; + attribute EventHandler onbeforetoggle; attribute EventHandler onblur; attribute EventHandler oncancel; attribute EventHandler oncanplay; @@ -35,13 +39,17 @@ interface mixin GlobalEventHandlers { attribute EventHandler onchange; attribute EventHandler onclick; attribute EventHandler onclose; + attribute EventHandler oncommand; + attribute EventHandler oncontextlost; attribute EventHandler oncontextmenu; + attribute EventHandler oncontextrestored; + attribute EventHandler oncopy; attribute EventHandler oncuechange; + attribute EventHandler oncut; attribute EventHandler ondblclick; attribute EventHandler ondrag; attribute EventHandler ondragend; attribute EventHandler ondragenter; - attribute EventHandler ondragexit; attribute EventHandler ondragleave; attribute EventHandler ondragover; attribute EventHandler ondragstart; @@ -68,7 +76,7 @@ interface mixin GlobalEventHandlers { attribute EventHandler onmouseout; attribute EventHandler onmouseover; attribute EventHandler onmouseup; - attribute EventHandler onwheel; + attribute EventHandler onpaste; attribute EventHandler onpause; attribute EventHandler onplay; attribute EventHandler onplaying; @@ -77,11 +85,12 @@ interface mixin GlobalEventHandlers { attribute EventHandler onreset; attribute EventHandler onresize; attribute EventHandler onscroll; + attribute EventHandler onscrollend; attribute EventHandler onsecuritypolicyviolation; attribute EventHandler onseeked; attribute EventHandler onseeking; attribute EventHandler onselect; - attribute EventHandler onshow; + attribute EventHandler onslotchange; attribute EventHandler onstalled; attribute EventHandler onsubmit; attribute EventHandler onsuspend; @@ -89,6 +98,11 @@ interface mixin GlobalEventHandlers { attribute EventHandler ontoggle; attribute EventHandler onvolumechange; attribute EventHandler onwaiting; + attribute EventHandler onwebkitanimationend; + attribute EventHandler onwebkitanimationiteration; + attribute EventHandler onwebkitanimationstart; + attribute EventHandler onwebkittransitionend; + attribute EventHandler onwheel; }; // https://drafts.csswg.org/css-animations/#interface-globaleventhandlers-idl @@ -123,18 +137,12 @@ interface mixin WindowEventHandlers { attribute EventHandler onoffline; attribute EventHandler ononline; attribute EventHandler onpagehide; + attribute EventHandler onpagereveal; attribute EventHandler onpageshow; + attribute EventHandler onpageswap; attribute EventHandler onpopstate; attribute EventHandler onrejectionhandled; attribute EventHandler onstorage; attribute EventHandler onunhandledrejection; attribute EventHandler onunload; }; - -// https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers -[Exposed=Window] -interface mixin DocumentAndElementEventHandlers { - attribute EventHandler oncopy; - attribute EventHandler oncut; - attribute EventHandler onpaste; -}; diff --git a/components/script_bindings/webidls/HTMLElement.webidl b/components/script_bindings/webidls/HTMLElement.webidl index 76bfada1b94..19a4b515d11 100644 --- a/components/script_bindings/webidls/HTMLElement.webidl +++ b/components/script_bindings/webidls/HTMLElement.webidl @@ -73,7 +73,6 @@ partial interface HTMLElement { }; HTMLElement includes GlobalEventHandlers; -HTMLElement includes DocumentAndElementEventHandlers; HTMLElement includes ElementContentEditable; HTMLElement includes ElementCSSInlineStyle; HTMLElement includes HTMLOrSVGElement; diff --git a/components/webdriver_server/actions.rs b/components/webdriver_server/actions.rs index b18a6eaaf2e..9136e091472 100644 --- a/components/webdriver_server/actions.rs +++ b/components/webdriver_server/actions.rs @@ -16,9 +16,9 @@ use webdriver::actions::{ PointerDownAction, PointerMoveAction, PointerOrigin, PointerType, PointerUpAction, WheelAction, WheelActionItem, WheelScrollAction, }; -use webdriver::error::ErrorStatus; +use webdriver::error::{ErrorStatus, WebDriverError}; -use crate::Handler; +use crate::{Handler, wait_for_script_response}; // Interval between wheelScroll and pointerMove increments in ms, based on common vsync static POINTERMOVE_INTERVAL: u64 = 17; @@ -399,8 +399,11 @@ impl Handler { WebDriverScriptCommand::GetElementInViewCenterPoint(x.to_string(), sender), ) .unwrap(); - - let Some(point) = receiver.recv().unwrap()? else { + let response = match wait_for_script_response(receiver) { + Ok(response) => response, + Err(WebDriverError { error, .. }) => return Err(error), + }; + let Ok(Some(point)) = response else { return Err(ErrorStatus::UnknownError); }; point @@ -645,19 +648,14 @@ impl Handler { .send(EmbedderToConstellationMessage::WebDriverCommand(cmd_msg)) .unwrap(); - match receiver.recv() { - Ok(viewport_size) => { - if x < 0 || - x as f32 > viewport_size.width || - y < 0 || - y as f32 > viewport_size.height - { - Err(ErrorStatus::MoveTargetOutOfBounds) - } else { - Ok(()) - } - }, - Err(_) => Err(ErrorStatus::UnknownError), + let viewport_size = match wait_for_script_response(receiver) { + Ok(response) => response, + Err(WebDriverError { error, .. }) => return Err(error), + }; + if x < 0 || x as f32 > viewport_size.width || y < 0 || y as f32 > viewport_size.height { + Err(ErrorStatus::MoveTargetOutOfBounds) + } else { + Ok(()) } } } diff --git a/ports/servoshell/egl/app_state.rs b/ports/servoshell/egl/app_state.rs index a65ed7424f4..737a2f23b7d 100644 --- a/ports/servoshell/egl/app_state.rs +++ b/ports/servoshell/egl/app_state.rs @@ -38,6 +38,14 @@ impl Coordinates { viewport: Rect::new(Point2D::new(x, y), Size2D::new(width, height)), } } + + pub fn origin(&self) -> Point2D<i32, DevicePixel> { + self.viewport.origin + } + + pub fn size(&self) -> Size2D<i32, DevicePixel> { + self.viewport.size + } } pub(super) struct ServoWindowCallbacks { @@ -115,11 +123,13 @@ impl ServoDelegate for ServoShellServoDelegate { impl WebViewDelegate for RunningAppState { fn screen_geometry(&self, _webview: WebView) -> Option<ScreenGeometry> { let coord = self.callbacks.coordinates.borrow(); - let screen_size = DeviceIntSize::new(coord.viewport.size.width, coord.viewport.size.height); + let offset = coord.origin(); + let available_size = coord.size(); + let screen_size = coord.size(); Some(ScreenGeometry { size: screen_size, - available_size: screen_size, - offset: Point2D::zero(), + available_size, + offset, }) } diff --git a/ports/servoshell/egl/ohos.rs b/ports/servoshell/egl/ohos.rs index 9b537f0409c..79172d368ab 100644 --- a/ports/servoshell/egl/ohos.rs +++ b/ports/servoshell/egl/ohos.rs @@ -28,8 +28,9 @@ use servo::{ use xcomponent_sys::{ OH_NativeXComponent, OH_NativeXComponent_Callback, OH_NativeXComponent_GetKeyEvent, OH_NativeXComponent_GetKeyEventAction, OH_NativeXComponent_GetKeyEventCode, - OH_NativeXComponent_GetTouchEvent, OH_NativeXComponent_GetXComponentSize, - OH_NativeXComponent_KeyAction, OH_NativeXComponent_KeyCode, OH_NativeXComponent_KeyEvent, + OH_NativeXComponent_GetTouchEvent, OH_NativeXComponent_GetXComponentOffset, + OH_NativeXComponent_GetXComponentSize, OH_NativeXComponent_KeyAction, + OH_NativeXComponent_KeyCode, OH_NativeXComponent_KeyEvent, OH_NativeXComponent_RegisterCallback, OH_NativeXComponent_RegisterKeyEventCallback, OH_NativeXComponent_TouchEvent, OH_NativeXComponent_TouchEventType, }; @@ -267,6 +268,33 @@ extern "C" fn on_surface_created_cb(xcomponent: *mut OH_NativeXComponent, window info!("Returning from on_surface_created_cb"); } +/// Returns the offset of the surface relative to its parent's top left corner +/// +/// # Safety +/// +/// `xcomponent` and `native_window` must be valid, non-null and aligned pointers to a +/// live xcomponent and associated native window surface. +unsafe fn get_xcomponent_offset( + xcomponent: *mut OH_NativeXComponent, + native_window: *mut c_void, +) -> Result<(i32, i32), i32> { + let mut x: f64 = 0.0; + let mut y: f64 = 0.0; + + let result = unsafe { + OH_NativeXComponent_GetXComponentOffset(xcomponent, native_window, &raw mut x, &raw mut y) + }; + if result != 0 { + error!("OH_NativeXComponent_GetXComponentOffset failed with {result}"); + return Err(result); + } + + Ok(( + (x.round() as i64).try_into().expect("X offset too large"), + (y.round() as i64).try_into().expect("Y offset too large"), + )) +} + /// Returns the size of the surface /// /// # Safety diff --git a/ports/servoshell/egl/ohos/simpleservo.rs b/ports/servoshell/egl/ohos/simpleservo.rs index 9815c0fe4fd..c867c7a5330 100644 --- a/ports/servoshell/egl/ohos/simpleservo.rs +++ b/ports/servoshell/egl/ohos/simpleservo.rs @@ -97,7 +97,10 @@ pub fn init( let Ok(window_size) = (unsafe { super::get_xcomponent_size(xcomponent, native_window) }) else { return Err("Failed to get xcomponent size"); }; - let coordinates = Coordinates::new(0, 0, window_size.width, window_size.height); + let Ok((x, y)) = (unsafe { super::get_xcomponent_offset(xcomponent, native_window) }) else { + return Err("Failed to get xcomponent offset"); + }; + let coordinates = Coordinates::new(x, y, window_size.width, window_size.height); let display_handle = RawDisplayHandle::Ohos(OhosDisplayHandle::new()); let display_handle = unsafe { DisplayHandle::borrow_raw(display_handle) }; diff --git a/python/servo/devtools_tests.py b/python/servo/devtools_tests.py index c50fffb0ac1..0d336fbcb9c 100644 --- a/python/servo/devtools_tests.py +++ b/python/servo/devtools_tests.py @@ -25,6 +25,10 @@ from typing import Optional import unittest +# Set this to true to log requests in the internal web servers. +LOG_REQUESTS = False + + class DevtoolsTests(unittest.IsolatedAsyncioTestCase): # /path/to/servo/python/servo script_path = None @@ -36,23 +40,49 @@ class DevtoolsTests(unittest.IsolatedAsyncioTestCase): self.web_server = None self.web_server_thread = None + # Classic script vs module script: + # - <https://html.spec.whatwg.org/multipage/#classic-script> + # - <https://html.spec.whatwg.org/multipage/#module-script> + # Worker scripts can be classic or module: + # - <https://html.spec.whatwg.org/multipage/#fetch-a-classic-worker-script> + # - <https://html.spec.whatwg.org/multipage/#fetch-a-module-worker-script-tree> + # Non-worker(?) script sources can be inline, external, or blob. + # Worker script sources can be external or blob. def test_sources_list(self): - self.run_servoshell(test_dir=os.path.join(DevtoolsTests.script_path, "devtools_tests/sources")) - self.assert_sources_list([f"{self.base_url}/classic.js", f"{self.base_url}/test.html", "https://servo.org/js/load-table.js"]) + self.start_web_server(test_dir=os.path.join(DevtoolsTests.script_path, "devtools_tests/sources")) + self.run_servoshell() + self.assert_sources_list(2, set([ + tuple([f"{self.base_url}/classic.js", f"{self.base_url}/test.html", "https://servo.org/js/load-table.js"]), + tuple([f"{self.base_url}/worker.js"]), + ])) def test_sources_list_with_data_no_scripts(self): self.run_servoshell(url="data:text/html,") - self.assert_sources_list([]) + self.assert_sources_list(1, set([tuple()])) - def test_sources_list_with_data_empty_inline_script(self): + def test_sources_list_with_data_empty_inline_classic_script(self): self.run_servoshell(url="data:text/html,<script></script>") - self.assert_sources_list([]) + self.assert_sources_list(1, set([tuple()])) - def test_sources_list_with_data_inline_script(self): + def test_sources_list_with_data_inline_classic_script(self): self.run_servoshell(url="data:text/html,<script>;</script>") - self.assert_sources_list(["data:text/html,<script>;</script>"]) + self.assert_sources_list(1, set([tuple(["data:text/html,<script>;</script>"])])) + + def test_sources_list_with_data_external_classic_script(self): + self.start_web_server(test_dir=os.path.join(DevtoolsTests.script_path, "devtools_tests/sources")) + self.run_servoshell(url=f"data:text/html,<script src=\"{self.base_url}/classic.js\"></script>") + self.assert_sources_list(1, set([tuple([f"{self.base_url}/classic.js"])])) + + def test_sources_list_with_data_empty_inline_module_script(self): + self.run_servoshell(url="data:text/html,<script type=module></script>") + self.assert_sources_list(1, set([tuple()])) - def run_servoshell(self, *, test_dir=None, url=None): + def test_sources_list_with_data_inline_module_script(self): + self.run_servoshell(url="data:text/html,<script type=module>;</script>") + self.assert_sources_list(1, set([tuple(["data:text/html,<script type=module>;</script>"])])) + + # Sets `base_url` and `web_server` and `web_server_thread`. + def start_web_server(self, *, test_dir=None): if test_dir is None: test_dir = os.path.join(DevtoolsTests.script_path, "devtools_tests") base_url = Future() @@ -62,9 +92,8 @@ class DevtoolsTests(unittest.IsolatedAsyncioTestCase): super().__init__(*args, directory=test_dir, **kwargs) def log_message(self, format, *args): - # Uncomment this to log requests. - # return super().log_message(format, *args) - pass + if LOG_REQUESTS: + return super().log_message(format, *args) def server_thread(): self.web_server = socketserver.TCPServer(("0.0.0.0", 0), Handler) @@ -76,6 +105,8 @@ class DevtoolsTests(unittest.IsolatedAsyncioTestCase): self.web_server_thread.start() self.base_url = base_url.result(1) + # Sets `servoshell`. + def run_servoshell(self, *, url=None): # Change this setting if you want to debug Servo. os.environ["RUST_LOG"] = "error,devtools=warn" @@ -89,13 +120,21 @@ class DevtoolsTests(unittest.IsolatedAsyncioTestCase): def tearDown(self): # Terminate servoshell. - self.servoshell.terminate() + if self.servoshell is not None: + self.servoshell.terminate() + self.servoshell = None # Stop the web server. - self.web_server.shutdown() - self.web_server_thread.join() - - def assert_sources_list(self, expected_urls): + if self.web_server is not None: + self.web_server.shutdown() + self.web_server = None + if self.web_server_thread is not None: + self.web_server_thread.join() + self.web_server_thread = None + if self.base_url is not None: + self.base_url = None + + def assert_sources_list(self, expected_targets: int, expected_urls_by_target: set[tuple[str]]): client = RDPClient() client.connect("127.0.0.1", 6080) root = RootActor(client) @@ -105,41 +144,59 @@ class DevtoolsTests(unittest.IsolatedAsyncioTestCase): watcher = tab.get_watcher() watcher = WatcherActor(client, watcher["actor"]) - target = Future() + done = Future() + targets = [] def on_target(data): - if data["target"]["browsingContextID"] == tab_dict["browsingContextID"]: - target.set_result(data["target"]) + try: + targets.append(data["target"]) + if len(targets) == expected_targets: + done.set_result(None) + except Exception as e: + # Raising here does nothing, for some reason. + # Send the exception back so it can be raised. + done.set_result(e) client.add_event_listener( watcher.actor_id, Events.Watcher.TARGET_AVAILABLE_FORM, on_target, ) watcher.watch_targets(WatcherActor.Targets.FRAME) + watcher.watch_targets(WatcherActor.Targets.WORKER) + result: Optional[Exception] = done.result(1) + if result: + raise result done = Future() - target = target.result(1) + # NOTE: breaks if two targets have the same list of source urls. + # This should really be a multiset, but Python does not have multisets. + actual_urls_by_target: set[tuple[str]] = set() def on_source_resource(data): for [resource_type, sources] in data["array"]: try: self.assertEqual(resource_type, "source") - self.assertEqual([source["url"] for source in sources], expected_urls) - done.set_result(None) + source_urls = tuple([source["url"] for source in sources]) + self.assertFalse(source_urls in sources) # See NOTE above + actual_urls_by_target.add(source_urls) + if len(actual_urls_by_target) == expected_targets: + done.set_result(None) except Exception as e: # Raising here does nothing, for some reason. # Send the exception back so it can be raised. done.set_result(e) - client.add_event_listener( - target["actor"], - Events.Watcher.RESOURCES_AVAILABLE_ARRAY, - on_source_resource, - ) + for target in targets: + client.add_event_listener( + target["actor"], + Events.Watcher.RESOURCES_AVAILABLE_ARRAY, + on_source_resource, + ) watcher.watch_resources([Resources.SOURCE]) result: Optional[Exception] = done.result(1) if result: raise result + self.assertEqual(actual_urls_by_target, expected_urls_by_target) client.disconnect() diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index 893b07e9e3f..e62e766680d 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -571866,6 +571866,13 @@ {} ] ], + "style-src-inline-style-with-csstext.html": [ + "5e812b4aee9d0d081673a0f333f8b29187619c3d", + [ + null, + {} + ] + ], "style-src-multiple-policies-multiple-hashing-algorithms.html": [ "027c61d8c632f2387408b8fb6869dee69bb8913d", [ diff --git a/tests/wpt/meta/content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html.ini b/tests/wpt/meta/content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html.ini deleted file mode 100644 index a5cf5faf238..00000000000 --- a/tests/wpt/meta/content-security-policy/style-src-attr-elem/style-src-attr-blocked-src-allowed.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[style-src-attr-blocked-src-allowed.html] - expected: TIMEOUT - [Should fire a security policy violation event] - expected: NOTRUN - - [The attribute style should not be applied] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html.ini b/tests/wpt/meta/content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html.ini deleted file mode 100644 index 979fc151f38..00000000000 --- a/tests/wpt/meta/content-security-policy/style-src-attr-elem/style-src-elem-allowed-attr-blocked.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[style-src-elem-allowed-attr-blocked.html] - expected: TIMEOUT - [Should fire a security policy violation for the attribute] - expected: NOTRUN - - [The attribute style should not be applied and the inline style should be applied] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html.ini b/tests/wpt/meta/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html.ini index 0c8111987c0..c99d7bd7844 100644 --- a/tests/wpt/meta/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html.ini +++ b/tests/wpt/meta/content-security-policy/style-src/inline-style-allowed-while-cloning-objects.sub.html.ini @@ -1,13 +1,36 @@ [inline-style-allowed-while-cloning-objects.sub.html] - expected: TIMEOUT - [Test that violation report event was fired] - expected: NOTRUN + [non-HTML namespace] + expected: FAIL - [inline-style-allowed-while-cloning-objects 12] + [inline-style-allowed-while-cloning-objects 1] expected: FAIL - [inline-style-allowed-while-cloning-objects 14] + [inline-style-allowed-while-cloning-objects 3] expected: FAIL - [non-HTML namespace] + [inline-style-allowed-while-cloning-objects 5] + expected: FAIL + + [inline-style-allowed-while-cloning-objects 7] + expected: FAIL + + [inline-style-allowed-while-cloning-objects 8] + expected: FAIL + + [inline-style-allowed-while-cloning-objects 9] + expected: FAIL + + [inline-style-allowed-while-cloning-objects 10] + expected: FAIL + + [inline-style-allowed-while-cloning-objects 11] + expected: FAIL + + [inline-style-allowed-while-cloning-objects 17] + expected: FAIL + + [inline-style-allowed-while-cloning-objects 18] + expected: FAIL + + [inline-style-allowed-while-cloning-objects 19] expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/style-src/inline-style-attribute-blocked.sub.html.ini b/tests/wpt/meta/content-security-policy/style-src/inline-style-attribute-blocked.sub.html.ini deleted file mode 100644 index 92f00acdffe..00000000000 --- a/tests/wpt/meta/content-security-policy/style-src/inline-style-attribute-blocked.sub.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[inline-style-attribute-blocked.sub.html] - [Expecting logs: ["violated-directive=style-src-attr","PASS"\]] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html.ini b/tests/wpt/meta/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html.ini deleted file mode 100644 index d910f28e56a..00000000000 --- a/tests/wpt/meta/content-security-policy/style-src/style-src-inline-style-attribute-blocked.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[style-src-inline-style-attribute-blocked.html] - expected: TIMEOUT - [Inline style attribute should not be applied without 'unsafe-inline'] - expected: FAIL - - [Should fire a securitypolicyviolation event] - expected: NOTRUN diff --git a/tests/wpt/meta/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes.html.ini b/tests/wpt/meta/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes.html.ini deleted file mode 100644 index 26dc98e8f62..00000000000 --- a/tests/wpt/meta/content-security-policy/unsafe-hashes/style_attribute_denied_missing_unsafe_hashes.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[style_attribute_denied_missing_unsafe_hashes.html] - expected: TIMEOUT - [Test that the inline style attribute is blocked] - expected: NOTRUN diff --git a/tests/wpt/meta/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash.html.ini b/tests/wpt/meta/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash.html.ini deleted file mode 100644 index 3031a4f6f77..00000000000 --- a/tests/wpt/meta/content-security-policy/unsafe-hashes/style_attribute_denied_wrong_hash.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[style_attribute_denied_wrong_hash.html] - expected: TIMEOUT - [Test that the inline style attribute is blocked] - expected: NOTRUN diff --git a/tests/wpt/meta/css/css-transforms/transform-translate-background-001.html.ini b/tests/wpt/meta/css/css-transforms/transform-translate-background-001.html.ini deleted file mode 100644 index abb0cf51515..00000000000 --- a/tests/wpt/meta/css/css-transforms/transform-translate-background-001.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[transform-translate-background-001.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-transforms/transform-translate-background-002.html.ini b/tests/wpt/meta/css/css-transforms/transform-translate-background-002.html.ini deleted file mode 100644 index bd8e02d68f5..00000000000 --- a/tests/wpt/meta/css/css-transforms/transform-translate-background-002.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[transform-translate-background-002.html] - expected: FAIL diff --git a/tests/wpt/meta/dom/events/webkit-animation-end-event.html.ini b/tests/wpt/meta/dom/events/webkit-animation-end-event.html.ini index 3369a3a2a49..5750c2948be 100644 --- a/tests/wpt/meta/dom/events/webkit-animation-end-event.html.ini +++ b/tests/wpt/meta/dom/events/webkit-animation-end-event.html.ini @@ -1,28 +1,22 @@ [webkit-animation-end-event.html] expected: TIMEOUT - [onanimationend and onwebkitanimationend are not aliases] - expected: FAIL - [dispatchEvent of a webkitAnimationEnd event does trigger a prefixed event handler or listener] expected: FAIL - [dispatchEvent of an animationend event does not trigger a prefixed event handler or listener] - expected: FAIL - [onwebkitanimationend event handler should trigger for an animation] - expected: FAIL + expected: TIMEOUT [onwebkitanimationend event handler should not trigger if an unprefixed event handler also exists] - expected: FAIL + expected: NOTRUN [onwebkitanimationend event handler should not trigger if an unprefixed listener also exists] - expected: FAIL + expected: NOTRUN [event types for prefixed and unprefixed animationend event handlers should be named appropriately] - expected: FAIL + expected: NOTRUN [webkitAnimationEnd event listener should trigger for an animation] - expected: TIMEOUT + expected: NOTRUN [webkitAnimationEnd event listener should not trigger if an unprefixed listener also exists] expected: NOTRUN diff --git a/tests/wpt/meta/dom/events/webkit-animation-iteration-event.html.ini b/tests/wpt/meta/dom/events/webkit-animation-iteration-event.html.ini index 880ef51e59d..233a98ed69b 100644 --- a/tests/wpt/meta/dom/events/webkit-animation-iteration-event.html.ini +++ b/tests/wpt/meta/dom/events/webkit-animation-iteration-event.html.ini @@ -1,28 +1,22 @@ [webkit-animation-iteration-event.html] expected: TIMEOUT - [onanimationiteration and onwebkitanimationiteration are not aliases] - expected: FAIL - [dispatchEvent of a webkitAnimationIteration event does trigger a prefixed event handler or listener] expected: FAIL - [dispatchEvent of an animationiteration event does not trigger a prefixed event handler or listener] - expected: FAIL - [onwebkitanimationiteration event handler should trigger for an animation] - expected: FAIL + expected: TIMEOUT [onwebkitanimationiteration event handler should not trigger if an unprefixed event handler also exists] - expected: FAIL + expected: NOTRUN [onwebkitanimationiteration event handler should not trigger if an unprefixed listener also exists] - expected: FAIL + expected: NOTRUN [event types for prefixed and unprefixed animationiteration event handlers should be named appropriately] - expected: FAIL + expected: NOTRUN [webkitAnimationIteration event listener should trigger for an animation] - expected: TIMEOUT + expected: NOTRUN [webkitAnimationIteration event listener should not trigger if an unprefixed listener also exists] expected: NOTRUN diff --git a/tests/wpt/meta/dom/events/webkit-animation-start-event.html.ini b/tests/wpt/meta/dom/events/webkit-animation-start-event.html.ini index ca7e2b96918..6e3e5febb82 100644 --- a/tests/wpt/meta/dom/events/webkit-animation-start-event.html.ini +++ b/tests/wpt/meta/dom/events/webkit-animation-start-event.html.ini @@ -1,4 +1,5 @@ [webkit-animation-start-event.html] + expected: TIMEOUT [onanimationstart and onwebkitanimationstart are not aliases] expected: FAIL @@ -8,32 +9,29 @@ [dispatchEvent of a webkitAnimationStart event does not trigger an unprefixed event handler or listener] expected: FAIL - [dispatchEvent of an animationstart event does not trigger a prefixed event handler or listener] - expected: FAIL - [onwebkitanimationstart event handler should trigger for an animation] - expected: FAIL + expected: TIMEOUT [onwebkitanimationstart event handler should not trigger if an unprefixed event handler also exists] - expected: FAIL + expected: NOTRUN [onwebkitanimationstart event handler should not trigger if an unprefixed listener also exists] - expected: FAIL + expected: NOTRUN [event types for prefixed and unprefixed animationstart event handlers should be named appropriately] - expected: FAIL + expected: NOTRUN [webkitAnimationStart event listener should trigger for an animation] - expected: FAIL + expected: NOTRUN [webkitAnimationStart event listener should not trigger if an unprefixed listener also exists] - expected: FAIL + expected: NOTRUN [webkitAnimationStart event listener should not trigger if an unprefixed event handler also exists] - expected: FAIL + expected: NOTRUN [event types for prefixed and unprefixed animationstart event listeners should be named appropriately] - expected: FAIL + expected: NOTRUN [webkitAnimationStart event listener is case sensitive] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/meta/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html.ini b/tests/wpt/meta/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html.ini deleted file mode 100644 index 1a3c292f9f2..00000000000 --- a/tests/wpt/meta/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[2d.imageData.object.ctor.basics.html] - [Testing different type of ImageData constructor] - expected: FAIL diff --git a/tests/wpt/meta/html/dom/idlharness.https.html.ini b/tests/wpt/meta/html/dom/idlharness.https.html.ini index 25375c6ea47..311e3abaf15 100644 --- a/tests/wpt/meta/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta/html/dom/idlharness.https.html.ini @@ -1657,48 +1657,27 @@ [Window interface: window must inherit property "external" with the proper type] expected: FAIL - [Window interface: attribute onwebkitanimationstart] - expected: FAIL - [Window interface: window must inherit property "statusbar" with the proper type] expected: FAIL - [Document interface: new Document() must inherit property "onwebkittransitionend" with the proper type] - expected: FAIL - [Document interface: calling queryCommandEnabled(DOMString) on documentWithHandlers with too few arguments must throw TypeError] expected: FAIL - [Document interface: new Document() must inherit property "onwebkitanimationstart" with the proper type] - expected: FAIL - [Document interface: calling queryCommandIndeterm(DOMString) on documentWithHandlers with too few arguments must throw TypeError] expected: FAIL - [Document interface: iframe.contentDocument must inherit property "onwebkitanimationend" with the proper type] - expected: FAIL - [Document interface: iframe.contentDocument must inherit property "dir" with the proper type] expected: FAIL - [Window interface: window must inherit property "onwebkitanimationiteration" with the proper type] - expected: FAIL - [Window interface: window must inherit property "applicationCache" with the proper type] expected: FAIL - [Document interface: attribute onauxclick] - expected: FAIL - [Window interface: window must inherit property "menubar" with the proper type] expected: FAIL [Window interface: internal [[SetPrototypeOf\]\] method of interface prototype object - setting to a new value via Reflect.setPrototypeOf should return false] expected: FAIL - [Document interface: new Document() must inherit property "onwebkitanimationiteration" with the proper type] - expected: FAIL - [Document interface: attribute designMode] expected: FAIL @@ -1714,9 +1693,6 @@ [Document interface: calling execCommand(DOMString, optional boolean, optional DOMString) on new Document() with too few arguments must throw TypeError] expected: FAIL - [Document interface: attribute onwebkitanimationiteration] - expected: FAIL - [Document interface: operation queryCommandEnabled(DOMString)] expected: FAIL @@ -1741,42 +1717,24 @@ [Document interface: iframe.contentDocument must inherit property "linkColor" with the proper type] expected: FAIL - [Document interface: documentWithHandlers must inherit property "onslotchange" with the proper type] - expected: FAIL - [Document interface: documentWithHandlers must inherit property "alinkColor" with the proper type] expected: FAIL [Document interface: documentWithHandlers must inherit property "dir" with the proper type] expected: FAIL - [Window interface: window must inherit property "onslotchange" with the proper type] - expected: FAIL - [SVGAElement includes HTMLHyperlinkElementUtils: member names are unique] expected: FAIL [Window interface: attribute applicationCache] expected: FAIL - [Document interface: iframe.contentDocument must inherit property "onwebkitanimationstart" with the proper type] - expected: FAIL - - [Document interface: attribute onslotchange] - expected: FAIL - [Document interface: calling queryCommandIndeterm(DOMString) on iframe.contentDocument with too few arguments must throw TypeError] expected: FAIL [Document interface: iframe.contentDocument must inherit property "queryCommandValue(DOMString)" with the proper type] expected: FAIL - [Document interface: iframe.contentDocument must inherit property "onwebkitanimationiteration" with the proper type] - expected: FAIL - - [Document interface: attribute onwebkittransitionend] - expected: FAIL - [Document interface: iframe.contentDocument must inherit property "all" with the proper type] expected: FAIL @@ -1789,9 +1747,6 @@ [Document interface: attribute linkColor] expected: FAIL - [Window interface: attribute onwebkitanimationiteration] - expected: FAIL - [Window interface: window must inherit property "scrollbars" with the proper type] expected: FAIL @@ -1807,18 +1762,12 @@ [Document interface: iframe.contentDocument must inherit property "designMode" with the proper type] expected: FAIL - [Document interface: documentWithHandlers must inherit property "onwebkitanimationiteration" with the proper type] - expected: FAIL - [Window interface: attribute toolbar] expected: FAIL [Window interface: attribute statusbar] expected: FAIL - [Window interface: window must inherit property "onwebkittransitionend" with the proper type] - expected: FAIL - [Document interface: new Document() must inherit property "linkColor" with the proper type] expected: FAIL @@ -1828,15 +1777,9 @@ [Document interface: new Document() must inherit property "queryCommandState(DOMString)" with the proper type] expected: FAIL - [Window interface: attribute onwebkittransitionend] - expected: FAIL - [Document interface: calling execCommand(DOMString, optional boolean, optional DOMString) on iframe.contentDocument with too few arguments must throw TypeError] expected: FAIL - [Document interface: new Document() must inherit property "onslotchange" with the proper type] - expected: FAIL - [Document interface: documentWithHandlers must inherit property "designMode" with the proper type] expected: FAIL @@ -1855,9 +1798,6 @@ [Window interface: window must inherit property "personalbar" with the proper type] expected: FAIL - [Document interface: attribute onwebkitanimationend] - expected: FAIL - [Window interface: internal [[SetPrototypeOf\]\] method of interface prototype object - setting to a new value via __proto__ should throw a TypeError] expected: FAIL @@ -1882,24 +1822,15 @@ [Document interface: attribute vlinkColor] expected: FAIL - [Window interface: window must inherit property "onauxclick" with the proper type] - expected: FAIL - [Document interface: iframe.contentDocument must inherit property "queryCommandEnabled(DOMString)" with the proper type] expected: FAIL - [Document interface: iframe.contentDocument must inherit property "onslotchange" with the proper type] - expected: FAIL - [Document interface: new Document() must inherit property "alinkColor" with the proper type] expected: FAIL [Document interface: new Document() must inherit property "queryCommandEnabled(DOMString)" with the proper type] expected: FAIL - [Window interface: attribute onslotchange] - expected: FAIL - [Document interface: new Document() must inherit property "all" with the proper type] expected: FAIL @@ -1909,24 +1840,6 @@ [Window interface: window must inherit property "print()" with the proper type] expected: FAIL - [Document interface: documentWithHandlers must inherit property "onauxclick" with the proper type] - expected: FAIL - - [Document interface: documentWithHandlers must inherit property "onwebkitanimationend" with the proper type] - expected: FAIL - - [Document interface: new Document() must inherit property "onauxclick" with the proper type] - expected: FAIL - - [Document interface: documentWithHandlers must inherit property "onwebkitanimationstart" with the proper type] - expected: FAIL - - [Document interface: attribute onwebkitanimationstart] - expected: FAIL - - [Document interface: iframe.contentDocument must inherit property "onauxclick" with the proper type] - expected: FAIL - [Document interface: calling queryCommandValue(DOMString) on documentWithHandlers with too few arguments must throw TypeError] expected: FAIL @@ -1939,9 +1852,6 @@ [Document interface: calling queryCommandState(DOMString) on new Document() with too few arguments must throw TypeError] expected: FAIL - [Window interface: attribute onauxclick] - expected: FAIL - [Document interface: iframe.contentDocument must inherit property "queryCommandState(DOMString)" with the proper type] expected: FAIL @@ -1954,48 +1864,30 @@ [Document interface: new Document() must inherit property "queryCommandValue(DOMString)" with the proper type] expected: FAIL - [Window interface: window must inherit property "onwebkitanimationend" with the proper type] - expected: FAIL - [Window interface: window must inherit property "toolbar" with the proper type] expected: FAIL [Document interface: documentWithHandlers must inherit property "linkColor" with the proper type] expected: FAIL - [Document interface: new Document() must inherit property "onwebkitanimationend" with the proper type] - expected: FAIL - [Document interface: operation queryCommandIndeterm(DOMString)] expected: FAIL - [Document interface: iframe.contentDocument must inherit property "onwebkittransitionend" with the proper type] - expected: FAIL - [Document interface: calling queryCommandIndeterm(DOMString) on new Document() with too few arguments must throw TypeError] expected: FAIL - [Window interface: attribute onwebkitanimationend] - expected: FAIL - [Document interface: calling execCommand(DOMString, optional boolean, optional DOMString) on documentWithHandlers with too few arguments must throw TypeError] expected: FAIL [Document interface: documentWithHandlers must inherit property "queryCommandState(DOMString)" with the proper type] expected: FAIL - [Document interface: documentWithHandlers must inherit property "onwebkittransitionend" with the proper type] - expected: FAIL - [Document interface: new Document() must inherit property "vlinkColor" with the proper type] expected: FAIL [Window interface: window must inherit property "locationbar" with the proper type] expected: FAIL - [Window interface: window must inherit property "onwebkitanimationstart" with the proper type] - expected: FAIL - [Document interface: documentWithHandlers must inherit property "queryCommandIndeterm(DOMString)" with the proper type] expected: FAIL @@ -2023,24 +1915,12 @@ [Window interface: attribute clientInformation] expected: FAIL - [Window interface: attribute oncontextlost] - expected: FAIL - - [Window interface: attribute oncontextrestored] - expected: FAIL - [Window interface: operation reportError(any)] expected: FAIL [Window interface: window must inherit property "clientInformation" with the proper type] expected: FAIL - [Window interface: window must inherit property "oncontextlost" with the proper type] - expected: FAIL - - [Window interface: window must inherit property "oncontextrestored" with the proper type] - expected: FAIL - [Window interface: window must inherit property "reportError(any)" with the proper type] expected: FAIL @@ -2050,129 +1930,15 @@ [Document interface: attribute onvisibilitychange] expected: FAIL - [Document interface: attribute oncontextlost] - expected: FAIL - - [Document interface: attribute oncontextrestored] - expected: FAIL - [Document interface: iframe.contentDocument must inherit property "onvisibilitychange" with the proper type] expected: FAIL - [Document interface: iframe.contentDocument must inherit property "oncontextlost" with the proper type] - expected: FAIL - - [Document interface: iframe.contentDocument must inherit property "oncontextrestored" with the proper type] - expected: FAIL - [Document interface: new Document() must inherit property "onvisibilitychange" with the proper type] expected: FAIL - [Document interface: new Document() must inherit property "oncontextlost" with the proper type] - expected: FAIL - - [Document interface: new Document() must inherit property "oncontextrestored" with the proper type] - expected: FAIL - [Document interface: documentWithHandlers must inherit property "onvisibilitychange" with the proper type] expected: FAIL - [Document interface: documentWithHandlers must inherit property "oncontextlost" with the proper type] - expected: FAIL - - [Document interface: documentWithHandlers must inherit property "oncontextrestored" with the proper type] - expected: FAIL - - [Window interface: attribute onbeforeinput] - expected: FAIL - - [Window interface: attribute onbeforematch] - expected: FAIL - - [Window interface: attribute onscrollend] - expected: FAIL - - [Window interface: window must inherit property "onbeforeinput" with the proper type] - expected: FAIL - - [Window interface: window must inherit property "onbeforematch" with the proper type] - expected: FAIL - - [Window interface: window must inherit property "onscrollend" with the proper type] - expected: FAIL - - [Document interface: attribute onbeforeinput] - expected: FAIL - - [Document interface: attribute onbeforematch] - expected: FAIL - - [Document interface: attribute onscrollend] - expected: FAIL - - [Document interface: iframe.contentDocument must inherit property "onbeforeinput" with the proper type] - expected: FAIL - - [Document interface: iframe.contentDocument must inherit property "onbeforematch" with the proper type] - expected: FAIL - - [Document interface: iframe.contentDocument must inherit property "onscrollend" with the proper type] - expected: FAIL - - [Document interface: new Document() must inherit property "onbeforeinput" with the proper type] - expected: FAIL - - [Document interface: new Document() must inherit property "onbeforematch" with the proper type] - expected: FAIL - - [Document interface: new Document() must inherit property "onscrollend" with the proper type] - expected: FAIL - - [Document interface: documentWithHandlers must inherit property "onbeforeinput" with the proper type] - expected: FAIL - - [Document interface: documentWithHandlers must inherit property "onbeforematch" with the proper type] - expected: FAIL - - [Document interface: documentWithHandlers must inherit property "onscrollend" with the proper type] - expected: FAIL - - [Window interface: attribute oncopy] - expected: FAIL - - [Window interface: attribute oncut] - expected: FAIL - - [Window interface: attribute onpaste] - expected: FAIL - - [Window interface: window must inherit property "oncopy" with the proper type] - expected: FAIL - - [Window interface: window must inherit property "oncut" with the proper type] - expected: FAIL - - [Window interface: window must inherit property "onpaste" with the proper type] - expected: FAIL - - [Window interface: attribute onbeforetoggle] - expected: FAIL - - [Window interface: window must inherit property "onbeforetoggle" with the proper type] - expected: FAIL - - [Document interface: attribute onbeforetoggle] - expected: FAIL - - [Document interface: iframe.contentDocument must inherit property "onbeforetoggle" with the proper type] - expected: FAIL - - [Document interface: new Document() must inherit property "onbeforetoggle" with the proper type] - expected: FAIL - - [Document interface: documentWithHandlers must inherit property "onbeforetoggle" with the proper type] - expected: FAIL - [Window interface: attribute navigation] expected: FAIL @@ -2191,18 +1957,6 @@ [Document interface: calling parseHTMLUnsafe(DOMString) on documentWithHandlers with too few arguments must throw TypeError] expected: FAIL - [Window interface: attribute onpagereveal] - expected: FAIL - - [Window interface: window must inherit property "onpagereveal" with the proper type] - expected: FAIL - - [Window interface: attribute onpageswap] - expected: FAIL - - [Window interface: window must inherit property "onpageswap" with the proper type] - expected: FAIL - [Document interface: operation parseHTMLUnsafe(HTMLString)] expected: FAIL @@ -2227,24 +1981,6 @@ [Document interface: calling parseHTMLUnsafe((TrustedHTML or DOMString)) on documentWithHandlers with too few arguments must throw TypeError] expected: FAIL - [Window interface: attribute oncommand] - expected: FAIL - - [Window interface: window must inherit property "oncommand" with the proper type] - expected: FAIL - - [Document interface: attribute oncommand] - expected: FAIL - - [Document interface: iframe.contentDocument must inherit property "oncommand" with the proper type] - expected: FAIL - - [Document interface: new Document() must inherit property "oncommand" with the proper type] - expected: FAIL - - [Document interface: documentWithHandlers must inherit property "oncommand" with the proper type] - expected: FAIL - [idlharness.https.html?include=HTML.*] [HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "align" with the proper type] @@ -2610,12 +2346,6 @@ [HTMLImageElement interface: document.createElement("img") must inherit property "decoding" with the proper type] expected: FAIL - [HTMLElement interface: attribute onwebkitanimationiteration] - expected: FAIL - - [HTMLElement interface: attribute onslotchange] - expected: FAIL - [HTMLVideoElement interface: attribute width] expected: FAIL @@ -2727,9 +2457,6 @@ [HTMLAnchorElement interface: attribute type] expected: FAIL - [HTMLElement interface: attribute onwebkitanimationend] - expected: FAIL - [HTMLInputElement interface: attribute height] expected: FAIL @@ -2949,9 +2676,6 @@ [HTMLElement interface: attribute tabIndex] expected: FAIL - [HTMLElement interface: attribute onwebkitanimationstart] - expected: FAIL - [HTMLImageElement interface: new Image() must inherit property "loading" with the proper type] expected: FAIL @@ -3639,9 +3363,6 @@ [HTMLAllCollection interface: document.all must inherit property "namedItem(DOMString)" with the proper type] expected: FAIL - [HTMLElement interface: attribute onwebkittransitionend] - expected: FAIL - [HTMLLinkElement interface: document.createElement("link") must inherit property "imageSrcset" with the proper type] expected: FAIL @@ -3945,12 +3666,6 @@ [HTMLSlotElement interface: calling assign((Element or Text)...) on document.createElement("slot") with too few arguments must throw TypeError] expected: FAIL - [HTMLElement interface: attribute oncontextlost] - expected: FAIL - - [HTMLElement interface: attribute oncontextrestored] - expected: FAIL - [HTMLElement interface: document.createElement("noscript") must inherit property "oncontextlost" with the proper type] expected: FAIL @@ -4044,15 +3759,6 @@ [HTMLElement interface: attribute inert] expected: FAIL - [HTMLElement interface: attribute onbeforeinput] - expected: FAIL - - [HTMLElement interface: attribute onbeforematch] - expected: FAIL - - [HTMLElement interface: attribute onscrollend] - expected: FAIL - [HTMLElement interface: document.createElement("noscript") must inherit property "inert" with the proper type] expected: FAIL @@ -4317,36 +4023,12 @@ [HTMLSelectElement interface: document.createElement("select") must inherit property "showPicker()" with the proper type] expected: FAIL - [HTMLBodyElement interface: attribute onpagereveal] - expected: FAIL - - [HTMLBodyElement interface: document.createElement("body") must inherit property "onpagereveal" with the proper type] - expected: FAIL - - [HTMLFrameSetElement interface: attribute onpagereveal] - expected: FAIL - - [HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onpagereveal" with the proper type] - expected: FAIL - [HTMLTemplateElement interface: attribute shadowRootClonable] expected: FAIL [HTMLTemplateElement interface: document.createElement("template") must inherit property "shadowRootClonable" with the proper type] expected: FAIL - [HTMLBodyElement interface: attribute onpageswap] - expected: FAIL - - [HTMLBodyElement interface: document.createElement("body") must inherit property "onpageswap" with the proper type] - expected: FAIL - - [HTMLFrameSetElement interface: attribute onpageswap] - expected: FAIL - - [HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onpageswap" with the proper type] - expected: FAIL - [HTMLElement interface: attribute writingSuggestions] expected: FAIL @@ -5866,42 +5548,6 @@ [HTMLElement interface: attribute popover] expected: FAIL - [HTMLElement interface: attribute onauxclick] - expected: FAIL - - [HTMLElement interface: attribute onbeforeinput] - expected: FAIL - - [HTMLElement interface: attribute onbeforematch] - expected: FAIL - - [HTMLElement interface: attribute onbeforetoggle] - expected: FAIL - - [HTMLElement interface: attribute oncontextlost] - expected: FAIL - - [HTMLElement interface: attribute oncontextrestored] - expected: FAIL - - [HTMLElement interface: attribute onscrollend] - expected: FAIL - - [HTMLElement interface: attribute onslotchange] - expected: FAIL - - [HTMLElement interface: attribute onwebkitanimationend] - expected: FAIL - - [HTMLElement interface: attribute onwebkitanimationiteration] - expected: FAIL - - [HTMLElement interface: attribute onwebkitanimationstart] - expected: FAIL - - [HTMLElement interface: attribute onwebkittransitionend] - expected: FAIL - [HTMLElement interface: attribute enterKeyHint] expected: FAIL @@ -5950,42 +5596,6 @@ [HTMLElement interface: document.createElement("noscript") must inherit property "popover" with the proper type] expected: FAIL - [HTMLElement interface: document.createElement("noscript") must inherit property "onauxclick" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onbeforeinput" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onbeforematch" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onbeforetoggle" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "oncontextlost" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "oncontextrestored" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onscrollend" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onslotchange" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onwebkitanimationend" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onwebkitanimationiteration" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onwebkitanimationstart" with the proper type] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onwebkittransitionend" with the proper type] - expected: FAIL - [HTMLElement interface: document.createElement("noscript") must inherit property "enterKeyHint" with the proper type] expected: FAIL @@ -6064,12 +5674,6 @@ [HTMLBodyElement interface: attribute aLink] expected: FAIL - [HTMLBodyElement interface: attribute onpagereveal] - expected: FAIL - - [HTMLBodyElement interface: attribute onpageswap] - expected: FAIL - [HTMLBodyElement interface: document.createElement("body") must inherit property "link" with the proper type] expected: FAIL @@ -6079,12 +5683,6 @@ [HTMLBodyElement interface: document.createElement("body") must inherit property "aLink" with the proper type] expected: FAIL - [HTMLBodyElement interface: document.createElement("body") must inherit property "onpagereveal" with the proper type] - expected: FAIL - - [HTMLBodyElement interface: document.createElement("body") must inherit property "onpageswap" with the proper type] - expected: FAIL - [HTMLHeadingElement interface: attribute align] expected: FAIL @@ -7681,24 +7279,12 @@ [HTMLFrameSetElement interface: attribute rows] expected: FAIL - [HTMLFrameSetElement interface: attribute onpagereveal] - expected: FAIL - - [HTMLFrameSetElement interface: attribute onpageswap] - expected: FAIL - [HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "cols" with the proper type] expected: FAIL [HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "rows" with the proper type] expected: FAIL - [HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onpagereveal" with the proper type] - expected: FAIL - - [HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onpageswap" with the proper type] - expected: FAIL - [HTMLFrameElement interface: attribute name] expected: FAIL @@ -7813,12 +7399,6 @@ [HTMLDialogElement interface: operation requestClose(optional DOMString)] expected: FAIL - [HTMLElement interface: attribute oncommand] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "oncommand" with the proper type] - expected: FAIL - [HTMLButtonElement interface: attribute command] expected: FAIL diff --git a/tests/wpt/meta/html/semantics/the-button-element/command-and-commandfor/button-event-dispatch-content-attribute.html.ini b/tests/wpt/meta/html/semantics/the-button-element/command-and-commandfor/button-event-dispatch-content-attribute.html.ini index bf4c7b0b9c9..3a75e5ee0ee 100644 --- a/tests/wpt/meta/html/semantics/the-button-element/command-and-commandfor/button-event-dispatch-content-attribute.html.ini +++ b/tests/wpt/meta/html/semantics/the-button-element/command-and-commandfor/button-event-dispatch-content-attribute.html.ini @@ -1,6 +1,3 @@ [button-event-dispatch-content-attribute.html] [oncommand content attribute works] expected: FAIL - - [oncommand content with a value of false prevents default] - expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-all-global-events.html.ini b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-all-global-events.html.ini index cd77f908ffb..4d4bbb8a39e 100644 --- a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-all-global-events.html.ini +++ b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-all-global-events.html.ini @@ -11,9 +11,6 @@ [onauxclick: the default value must be null] expected: FAIL - [onauxclick: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [onblur: must be on the appropriate locations for GlobalEventHandlers] expected: FAIL @@ -62,9 +59,6 @@ [oncontextlost: the default value must be null] expected: FAIL - [oncontextlost: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [oncontextmenu: must be on the appropriate locations for GlobalEventHandlers] expected: FAIL @@ -77,9 +71,6 @@ [oncontextrestored: the default value must be null] expected: FAIL - [oncontextrestored: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [oncuechange: must be on the appropriate locations for GlobalEventHandlers] expected: FAIL @@ -338,9 +329,6 @@ [onslotchange: the default value must be null] expected: FAIL - [onslotchange: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [onstalled: must be on the appropriate locations for GlobalEventHandlers] expected: FAIL @@ -389,9 +377,6 @@ [onwebkitanimationend: the default value must be null] expected: FAIL - [onwebkitanimationend: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [onwebkitanimationend: the content attribute must execute when an event is dispatched] expected: FAIL @@ -401,9 +386,6 @@ [onwebkitanimationiteration: the default value must be null] expected: FAIL - [onwebkitanimationiteration: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [onwebkitanimationiteration: the content attribute must execute when an event is dispatched] expected: FAIL @@ -413,9 +395,6 @@ [onwebkitanimationstart: the default value must be null] expected: FAIL - [onwebkitanimationstart: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [onwebkitanimationstart: the content attribute must execute when an event is dispatched] expected: FAIL @@ -425,9 +404,6 @@ [onwebkittransitionend: the default value must be null] expected: FAIL - [onwebkittransitionend: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [onwebkittransitionend: the content attribute must execute when an event is dispatched] expected: FAIL @@ -443,27 +419,18 @@ [onbeforeinput: the default value must be null] expected: FAIL - [onbeforeinput: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [onbeforematch: must be on the appropriate locations for GlobalEventHandlers] expected: FAIL [onbeforematch: the default value must be null] expected: FAIL - [onbeforematch: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [onscrollend: must be on the appropriate locations for GlobalEventHandlers] expected: FAIL [onscrollend: the default value must be null] expected: FAIL - [onscrollend: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - [oncopy: must be on the appropriate locations for GlobalEventHandlers] expected: FAIL @@ -488,33 +455,6 @@ [onbeforetoggle: the default value must be null] expected: FAIL - [onbeforetoggle: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - - [onauxclick: dispatching an Event at a <meta> element must trigger element.onauxclick] - expected: FAIL - - [onbeforeinput: dispatching an Event at a <meta> element must trigger element.onbeforeinput] - expected: FAIL - - [onbeforematch: dispatching an Event at a <meta> element must trigger element.onbeforematch] - expected: FAIL - - [onbeforetoggle: dispatching an Event at a <meta> element must trigger element.onbeforetoggle] - expected: FAIL - - [oncontextlost: dispatching an Event at a <meta> element must trigger element.oncontextlost] - expected: FAIL - - [oncontextrestored: dispatching an Event at a <meta> element must trigger element.oncontextrestored] - expected: FAIL - - [onscrollend: dispatching an Event at a <meta> element must trigger element.onscrollend] - expected: FAIL - - [onslotchange: dispatching an Event at a <meta> element must trigger element.onslotchange] - expected: FAIL - [onwebkitanimationend: dispatching an Event at a <meta> element must trigger element.onwebkitanimationend] expected: FAIL @@ -532,9 +472,3 @@ [oncommand: the default value must be null] expected: FAIL - - [oncommand: the content attribute must be compiled into a function as the corresponding property] - expected: FAIL - - [oncommand: dispatching an Event at a <meta> element must trigger element.oncommand] - expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini index deec7c5c132..3b3a37ff7c2 100644 --- a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini +++ b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini @@ -1,181 +1,19 @@ [event-handler-attributes-body-window.html] - [not shadowed auxclick (document.body)] - expected: FAIL - - [not shadowed contextlost (document.body)] - expected: FAIL - - [not shadowed contextrestored (document.body)] - expected: FAIL - - [not shadowed slotchange (document.body)] - expected: FAIL - - [not shadowed webkitanimationend (document.body)] - expected: FAIL - - [not shadowed webkitanimationiteration (document.body)] - expected: FAIL - - [not shadowed webkitanimationstart (document.body)] - expected: FAIL - - [not shadowed webkittransitionend (document.body)] - expected: FAIL - - [not shadowed copy (document.body)] - expected: FAIL - - [not shadowed cut (document.body)] - expected: FAIL - - [not shadowed paste (document.body)] - expected: FAIL - - [not shadowed auxclick (document.createElement("body"))] - expected: FAIL - - [not shadowed contextlost (document.createElement("body"))] - expected: FAIL - - [not shadowed contextrestored (document.createElement("body"))] - expected: FAIL - - [not shadowed slotchange (document.createElement("body"))] - expected: FAIL - - [not shadowed webkitanimationend (document.createElement("body"))] - expected: FAIL - - [not shadowed webkitanimationiteration (document.createElement("body"))] - expected: FAIL - - [not shadowed webkitanimationstart (document.createElement("body"))] - expected: FAIL - - [not shadowed webkittransitionend (document.createElement("body"))] - expected: FAIL - - [not shadowed copy (document.createElement("body"))] - expected: FAIL - - [not shadowed cut (document.createElement("body"))] - expected: FAIL - - [not shadowed paste (document.createElement("body"))] - expected: FAIL - - [not shadowed auxclick (window)] - expected: FAIL - - [not shadowed contextlost (window)] - expected: FAIL - - [not shadowed contextrestored (window)] - expected: FAIL - - [not shadowed slotchange (window)] - expected: FAIL - - [not shadowed webkitanimationend (window)] - expected: FAIL - - [not shadowed webkitanimationiteration (window)] - expected: FAIL - - [not shadowed webkitanimationstart (window)] - expected: FAIL - - [not shadowed webkittransitionend (window)] - expected: FAIL - - [not shadowed beforeinput (document.body)] - expected: FAIL - - [not shadowed beforematch (document.body)] - expected: FAIL - - [not shadowed scrollend (document.body)] - expected: FAIL - - [not shadowed beforeinput (document.createElement("body"))] - expected: FAIL - - [not shadowed beforematch (document.createElement("body"))] - expected: FAIL - - [not shadowed scrollend (document.createElement("body"))] - expected: FAIL - - [not shadowed beforeinput (window)] - expected: FAIL - - [not shadowed beforematch (window)] - expected: FAIL - - [not shadowed scrollend (window)] - expected: FAIL - - [not shadowed beforetoggle (document.body)] - expected: FAIL - - [not shadowed beforetoggle (document.createElement("body"))] - expected: FAIL - - [not shadowed beforetoggle (window)] - expected: FAIL - - [shadowed pagereveal (document.body)] - expected: FAIL - - [shadowed pagereveal removal (document.body)] - expected: FAIL - - [shadowed pagereveal (document.createElement("body"))] - expected: FAIL - [shadowed pagereveal removal (document.createElement("body"))] expected: FAIL - [shadowed pagereveal (window)] - expected: FAIL - [shadowed pagereveal removal (window)] expected: FAIL - [shadowed pageswap (document.body)] - expected: FAIL - - [shadowed pageswap removal (document.body)] - expected: FAIL - - [shadowed pageswap (document.createElement("body"))] - expected: FAIL - [shadowed pageswap removal (document.createElement("body"))] expected: FAIL - [shadowed pageswap (window)] - expected: FAIL - [shadowed pageswap removal (window)] expected: FAIL [shadowed blur on body fires when event dispatched on window] expected: FAIL - [shadowed messageerror on body fires when event dispatched on window] - expected: FAIL - - [shadowed pagereveal on body fires when event dispatched on window] - expected: FAIL - - [shadowed pageswap on body fires when event dispatched on window] - expected: FAIL - - [shadowed rejectionhandled on body fires when event dispatched on window] - expected: FAIL - [shadowed focus removal (document.createElement("body"))] expected: FAIL @@ -206,6 +44,9 @@ [shadowed message removal (document.createElement("body"))] expected: FAIL + [shadowed messageerror removal (document.createElement("body"))] + expected: FAIL + [shadowed offline removal (document.createElement("body"))] expected: FAIL @@ -233,6 +74,9 @@ [shadowed load removal (window)] expected: FAIL + [shadowed rejectionhandled removal (document.createElement("body"))] + expected: FAIL + [shadowed resize removal (window)] expected: FAIL @@ -257,6 +101,9 @@ [shadowed message removal (window)] expected: FAIL + [shadowed messageerror removal (window)] + expected: FAIL + [shadowed offline removal (window)] expected: FAIL @@ -272,17 +119,11 @@ [shadowed popstate removal (window)] expected: FAIL - [shadowed storage removal (window)] + [shadowed rejectionhandled removal (window)] expected: FAIL - [shadowed unload removal (window)] - expected: FAIL - - [not shadowed command (document.body)] - expected: FAIL - - [not shadowed command (document.createElement("body"))] + [shadowed storage removal (window)] expected: FAIL - [not shadowed command (window)] + [shadowed unload removal (window)] expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini index 4484356912c..b18a8cf6d5b 100644 --- a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini +++ b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini @@ -1,166 +1,4 @@ [event-handler-attributes-frameset-window.html] - [not shadowed auxclick (document.body)] - expected: FAIL - - [not shadowed contextlost (document.body)] - expected: FAIL - - [not shadowed contextrestored (document.body)] - expected: FAIL - - [not shadowed slotchange (document.body)] - expected: FAIL - - [not shadowed webkitanimationend (document.body)] - expected: FAIL - - [not shadowed webkitanimationiteration (document.body)] - expected: FAIL - - [not shadowed webkitanimationstart (document.body)] - expected: FAIL - - [not shadowed webkittransitionend (document.body)] - expected: FAIL - - [not shadowed copy (document.body)] - expected: FAIL - - [not shadowed cut (document.body)] - expected: FAIL - - [not shadowed paste (document.body)] - expected: FAIL - - [not shadowed auxclick (document.createElement("frameset"))] - expected: FAIL - - [not shadowed contextlost (document.createElement("frameset"))] - expected: FAIL - - [not shadowed contextrestored (document.createElement("frameset"))] - expected: FAIL - - [not shadowed slotchange (document.createElement("frameset"))] - expected: FAIL - - [not shadowed webkitanimationend (document.createElement("frameset"))] - expected: FAIL - - [not shadowed webkitanimationiteration (document.createElement("frameset"))] - expected: FAIL - - [not shadowed webkitanimationstart (document.createElement("frameset"))] - expected: FAIL - - [not shadowed webkittransitionend (document.createElement("frameset"))] - expected: FAIL - - [not shadowed copy (document.createElement("frameset"))] - expected: FAIL - - [not shadowed cut (document.createElement("frameset"))] - expected: FAIL - - [not shadowed paste (document.createElement("frameset"))] - expected: FAIL - - [not shadowed auxclick (window)] - expected: FAIL - - [not shadowed contextlost (window)] - expected: FAIL - - [not shadowed contextrestored (window)] - expected: FAIL - - [not shadowed slotchange (window)] - expected: FAIL - - [not shadowed webkitanimationend (window)] - expected: FAIL - - [not shadowed webkitanimationiteration (window)] - expected: FAIL - - [not shadowed webkitanimationstart (window)] - expected: FAIL - - [not shadowed webkittransitionend (window)] - expected: FAIL - - [not shadowed beforeinput (document.body)] - expected: FAIL - - [not shadowed beforematch (document.body)] - expected: FAIL - - [not shadowed scrollend (document.body)] - expected: FAIL - - [not shadowed beforeinput (document.createElement("frameset"))] - expected: FAIL - - [not shadowed beforematch (document.createElement("frameset"))] - expected: FAIL - - [not shadowed scrollend (document.createElement("frameset"))] - expected: FAIL - - [not shadowed beforeinput (window)] - expected: FAIL - - [not shadowed beforematch (window)] - expected: FAIL - - [not shadowed scrollend (window)] - expected: FAIL - - [not shadowed beforetoggle (document.body)] - expected: FAIL - - [not shadowed beforetoggle (document.createElement("frameset"))] - expected: FAIL - - [not shadowed beforetoggle (window)] - expected: FAIL - - [shadowed pagereveal (document.body)] - expected: FAIL - - [shadowed pagereveal removal (document.body)] - expected: FAIL - - [shadowed pagereveal (document.createElement("frameset"))] - expected: FAIL - - [shadowed pagereveal removal (document.createElement("frameset"))] - expected: FAIL - - [shadowed pagereveal (window)] - expected: FAIL - - [shadowed pagereveal removal (window)] - expected: FAIL - - [shadowed pageswap (document.body)] - expected: FAIL - - [shadowed pageswap removal (document.body)] - expected: FAIL - - [shadowed pageswap (document.createElement("frameset"))] - expected: FAIL - - [shadowed pageswap removal (document.createElement("frameset"))] - expected: FAIL - - [shadowed pageswap (window)] - expected: FAIL - - [shadowed pageswap removal (window)] - expected: FAIL - [shadowed blur on body fires when event dispatched on window] expected: FAIL @@ -226,12 +64,3 @@ [shadowed unload on body fires when event dispatched on window] expected: FAIL - - [not shadowed command (document.body)] - expected: FAIL - - [not shadowed command (document.createElement("frameset"))] - expected: FAIL - - [not shadowed command (window)] - expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini deleted file mode 100644 index db4d6e3321d..00000000000 --- a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini +++ /dev/null @@ -1,102 +0,0 @@ -[event-handler-attributes-windowless-body.html] - [auxclick is unaffected on a windowless body] - expected: FAIL - - [contextlost is unaffected on a windowless body] - expected: FAIL - - [contextrestored is unaffected on a windowless body] - expected: FAIL - - [slotchange is unaffected on a windowless body] - expected: FAIL - - [webkitanimationend is unaffected on a windowless body] - expected: FAIL - - [webkitanimationiteration is unaffected on a windowless body] - expected: FAIL - - [webkitanimationstart is unaffected on a windowless body] - expected: FAIL - - [webkittransitionend is unaffected on a windowless body] - expected: FAIL - - [auxclick is unaffected on a windowless frameset] - expected: FAIL - - [contextlost is unaffected on a windowless frameset] - expected: FAIL - - [contextrestored is unaffected on a windowless frameset] - expected: FAIL - - [slotchange is unaffected on a windowless frameset] - expected: FAIL - - [webkitanimationend is unaffected on a windowless frameset] - expected: FAIL - - [webkitanimationiteration is unaffected on a windowless frameset] - expected: FAIL - - [webkitanimationstart is unaffected on a windowless frameset] - expected: FAIL - - [webkittransitionend is unaffected on a windowless frameset] - expected: FAIL - - [beforeinput is unaffected on a windowless body] - expected: FAIL - - [beforematch is unaffected on a windowless body] - expected: FAIL - - [scrollend is unaffected on a windowless body] - expected: FAIL - - [beforeinput is unaffected on a windowless frameset] - expected: FAIL - - [beforematch is unaffected on a windowless frameset] - expected: FAIL - - [scrollend is unaffected on a windowless frameset] - expected: FAIL - - [beforetoggle is unaffected on a windowless body] - expected: FAIL - - [beforetoggle is unaffected on a windowless frameset] - expected: FAIL - - [Return null when getting the pagereveal event handler of a windowless body] - expected: FAIL - - [Ignore setting of pagereveal window event handlers on windowless body] - expected: FAIL - - [Return null when getting the pagereveal event handler of a windowless frameset] - expected: FAIL - - [Ignore setting of pagereveal window event handlers on windowless frameset] - expected: FAIL - - [Return null when getting the pageswap event handler of a windowless body] - expected: FAIL - - [Ignore setting of pageswap window event handlers on windowless body] - expected: FAIL - - [Return null when getting the pageswap event handler of a windowless frameset] - expected: FAIL - - [Ignore setting of pageswap window event handlers on windowless frameset] - expected: FAIL - - [command is unaffected on a windowless body] - expected: FAIL - - [command is unaffected on a windowless frameset] - expected: FAIL diff --git a/tests/wpt/meta/trusted-types/trusted-types-event-handlers.html.ini b/tests/wpt/meta/trusted-types/trusted-types-event-handlers.html.ini index 225c4d84121..205dd5886a8 100644 --- a/tests/wpt/meta/trusted-types/trusted-types-event-handlers.html.ini +++ b/tests/wpt/meta/trusted-types/trusted-types-event-handlers.html.ini @@ -23,9 +23,21 @@ [Event handler div.onpaste should be blocked.] expected: FAIL + [Event handler div.onauxclick should be blocked.] + expected: FAIL + [Event handler div.onabort should be blocked.] expected: FAIL + [Event handler div.onbeforeinput should be blocked.] + expected: FAIL + + [Event handler div.onbeforematch should be blocked.] + expected: FAIL + + [Event handler div.onbeforetoggle should be blocked.] + expected: FAIL + [Event handler div.onblur should be blocked.] expected: FAIL @@ -47,9 +59,18 @@ [Event handler div.onclose should be blocked.] expected: FAIL + [Event handler div.oncommand should be blocked.] + expected: FAIL + [Event handler div.oncontextmenu should be blocked.] expected: FAIL + [Event handler div.oncontextlost should be blocked.] + expected: FAIL + + [Event handler div.oncontextrestored should be blocked.] + expected: FAIL + [Event handler div.oncuechange should be blocked.] expected: FAIL @@ -173,6 +194,9 @@ [Event handler div.onscroll should be blocked.] expected: FAIL + [Event handler div.onscrollend should be blocked.] + expected: FAIL + [Event handler div.onsecuritypolicyviolation should be blocked.] expected: FAIL @@ -188,6 +212,9 @@ [Event handler div.onshow should be blocked.] expected: FAIL + [Event handler div.onslotchange should be blocked.] + expected: FAIL + [Event handler div.onstalled should be blocked.] expected: FAIL @@ -229,3 +256,15 @@ [Event handler div.onselectionchange should be blocked.] expected: FAIL + + [Event handler div.onwebkitanimationend should be blocked.] + expected: FAIL + + [Event handler div.onwebkitanimationiteration should be blocked.] + expected: FAIL + + [Event handler div.onwebkitanimationstart should be blocked.] + expected: FAIL + + [Event handler div.onwebkittransitionend should be blocked.] + expected: FAIL diff --git a/tests/wpt/meta/webmessaging/messageerror.html.ini b/tests/wpt/meta/webmessaging/messageerror.html.ini deleted file mode 100644 index 9b875551f90..00000000000 --- a/tests/wpt/meta/webmessaging/messageerror.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[messageerror.html] - [The onmessageerror content attribute must be compiled into the onmessageerror property] - expected: FAIL - - [The onmessageerror content attribute must execute when an event is dispatched on the window] - expected: FAIL diff --git a/tests/wpt/tests/content-security-policy/style-src/style-src-inline-style-with-csstext.html b/tests/wpt/tests/content-security-policy/style-src/style-src-inline-style-with-csstext.html new file mode 100644 index 00000000000..5e812b4aee9 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/style-src/style-src-inline-style-with-csstext.html @@ -0,0 +1,29 @@ +<!doctype html> +<html> +<head> + <meta http-equiv="Content-Security-Policy" content="style-src 'self';"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + + <script> + var t = async_test("Manipulating cssText should be allowed with 'self'"); + document.addEventListener("securitypolicyviolation", t.unreached_func("Should not trigger a security policy violation")); + </script> +</head> +<body> + <div id='log'></div> + + <div id="content">Lorem ipsum</div> + + <script> + t.step(function() { + var contentEl = document.getElementById("content"); + contentEl.style.cssText = 'margin-left: 2px;'; + var marginLeftVal = getComputedStyle(contentEl).getPropertyValue('margin-left'); + assert_equals(marginLeftVal, "2px"); + t.done(); + }); + </script> + +</body> +</html> |