diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs index 9ff950d92f3..b24ace034ba 100644 --- a/components/script/dom/mod.rs +++ b/components/script/dom/mod.rs @@ -465,6 +465,7 @@ pub mod permissions; pub mod permissionstatus; pub mod plugin; pub mod pluginarray; +pub mod pointerevent; pub mod popstateevent; pub mod processinginstruction; pub mod progressevent; diff --git a/components/script/dom/mouseevent.rs b/components/script/dom/mouseevent.rs index b551cca72d1..948c8394103 100644 --- a/components/script/dom/mouseevent.rs +++ b/components/script/dom/mouseevent.rs @@ -157,7 +157,53 @@ impl MouseEvent { can_gc: CanGc, ) -> DomRoot { let ev = MouseEvent::new_uninitialized_with_proto(window, proto, can_gc); - ev.InitMouseEvent( + ev.initialize_mouse_event( + type_, + can_bubble, + cancelable, + view, + detail, + screen_x, + screen_y, + client_x, + client_y, + ctrl_key, + alt_key, + shift_key, + meta_key, + button, + buttons, + related_target, + point_in_target, + ); + ev + } + + /// + #[allow(clippy::too_many_arguments)] + pub fn initialize_mouse_event( + &self, + type_: DOMString, + can_bubble: EventBubbles, + cancelable: EventCancelable, + view: Option<&Window>, + detail: i32, + screen_x: i32, + screen_y: i32, + client_x: i32, + client_y: i32, + ctrl_key: bool, + alt_key: bool, + shift_key: bool, + meta_key: bool, + button: i16, + buttons: u16, + related_target: Option<&EventTarget>, + point_in_target: Option>, + ) { + // TODO: InitMouseEvent has been deprecated. We should follow the link to create an UI + // Event instead. + self.InitMouseEvent( type_, bool::from(can_bubble), bool::from(cancelable), @@ -174,12 +220,11 @@ impl MouseEvent { button, related_target, ); - ev.buttons.set(buttons); - ev.point_in_target.set(point_in_target); + self.buttons.set(buttons); + self.point_in_target.set(point_in_target); // TODO: Set proper values in https://github.com/servo/servo/issues/24415 - ev.page_x.set(client_x); - ev.page_y.set(client_y); - ev + self.page_x.set(client_x); + self.page_y.set(client_y); } pub fn point_in_target(&self) -> Option> { diff --git a/components/script/dom/pointerevent.rs b/components/script/dom/pointerevent.rs new file mode 100644 index 00000000000..1c95723c140 --- /dev/null +++ b/components/script/dom/pointerevent.rs @@ -0,0 +1,356 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use std::cell::Cell; + +use dom_struct::dom_struct; +use euclid::default::Point2D; +use js::rust::HandleObject; + +use super::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods; +use crate::dom::bindings::cell::DomRefCell; +use crate::dom::bindings::codegen::Bindings::PointerEventBinding::{ + PointerEventInit, PointerEventMethods, +}; +use crate::dom::bindings::num::Finite; +use crate::dom::bindings::reflector::reflect_dom_object_with_proto; +use crate::dom::bindings::root::DomRoot; +use crate::dom::bindings::str::DOMString; +use crate::dom::event::{EventBubbles, EventCancelable}; +use crate::dom::eventtarget::EventTarget; +use crate::dom::mouseevent::MouseEvent; +use crate::dom::window::Window; +use crate::script_runtime::CanGc; + +#[dom_struct] +pub struct PointerEvent { + mouseevent: MouseEvent, + pointer_id: Cell, + width: Cell, + height: Cell, + pressure: Cell, + tangential_pressure: Cell, + tilt_x: Cell, + tilt_y: Cell, + twist: Cell, + altitude_angle: Cell, + azimuth_angle: Cell, + pointer_type: DomRefCell, + is_primary: Cell, + coalesced_events: DomRefCell>>, + predicted_events: DomRefCell>>, +} + +impl PointerEvent { + pub fn new_inherited() -> PointerEvent { + PointerEvent { + mouseevent: MouseEvent::new_inherited(), + pointer_id: Cell::new(0), + width: Cell::new(0), + height: Cell::new(0), + pressure: Cell::new(0.), + tangential_pressure: Cell::new(0.), + tilt_x: Cell::new(0), + tilt_y: Cell::new(0), + twist: Cell::new(0), + altitude_angle: Cell::new(0.), + azimuth_angle: Cell::new(0.), + pointer_type: DomRefCell::new(DOMString::new()), + is_primary: Cell::new(false), + coalesced_events: DomRefCell::new(Vec::new()), + predicted_events: DomRefCell::new(Vec::new()), + } + } + + pub fn new_uninitialized(window: &Window, can_gc: CanGc) -> DomRoot { + Self::new_uninitialized_with_proto(window, None, can_gc) + } + + fn new_uninitialized_with_proto( + window: &Window, + proto: Option, + can_gc: CanGc, + ) -> DomRoot { + reflect_dom_object_with_proto( + Box::new(PointerEvent::new_inherited()), + window, + proto, + can_gc, + ) + } + + #[allow(clippy::too_many_arguments)] + pub fn new( + window: &Window, + proto: Option, + type_: DOMString, + can_bubble: EventBubbles, + cancelable: EventCancelable, + view: Option<&Window>, + detail: i32, + screen_x: i32, + screen_y: i32, + client_x: i32, + client_y: i32, + ctrl_key: bool, + alt_key: bool, + shift_key: bool, + meta_key: bool, + button: i16, + buttons: u16, + related_target: Option<&EventTarget>, + point_in_target: Option>, + pointer_id: i32, + width: i32, + height: i32, + pressure: f32, + tangential_pressure: f32, + tilt_x: i32, + tilt_y: i32, + twist: i32, + altitude_angle: f64, + azimuth_angle: f64, + pointer_type: DOMString, + is_primary: bool, + coalesced_events: Vec>, + predicted_events: Vec>, + can_gc: CanGc, + ) -> DomRoot { + Self::new_with_proto( + window, + proto, + type_, + can_bubble, + cancelable, + view, + detail, + screen_x, + screen_y, + client_x, + client_y, + ctrl_key, + alt_key, + shift_key, + meta_key, + button, + buttons, + related_target, + point_in_target, + pointer_id, + width, + height, + pressure, + tangential_pressure, + tilt_x, + tilt_y, + twist, + altitude_angle, + azimuth_angle, + pointer_type, + is_primary, + coalesced_events, + predicted_events, + can_gc, + ) + } + + #[allow(clippy::too_many_arguments)] + fn new_with_proto( + window: &Window, + proto: Option, + type_: DOMString, + can_bubble: EventBubbles, + cancelable: EventCancelable, + view: Option<&Window>, + detail: i32, + screen_x: i32, + screen_y: i32, + client_x: i32, + client_y: i32, + ctrl_key: bool, + alt_key: bool, + shift_key: bool, + meta_key: bool, + button: i16, + buttons: u16, + related_target: Option<&EventTarget>, + point_in_target: Option>, + pointer_id: i32, + width: i32, + height: i32, + pressure: f32, + tangential_pressure: f32, + tilt_x: i32, + tilt_y: i32, + twist: i32, + altitude_angle: f64, + azimuth_angle: f64, + pointer_type: DOMString, + is_primary: bool, + coalesced_events: Vec>, + predicted_events: Vec>, + can_gc: CanGc, + ) -> DomRoot { + let ev = PointerEvent::new_uninitialized_with_proto(window, proto, can_gc); + ev.mouseevent.initialize_mouse_event( + type_, + can_bubble, + cancelable, + view, + detail, + screen_x, + screen_y, + client_x, + client_y, + ctrl_key, + alt_key, + shift_key, + meta_key, + button, + buttons, + related_target, + point_in_target, + ); + ev.pointer_id.set(pointer_id); + ev.width.set(width); + ev.height.set(height); + ev.pressure.set(pressure); + ev.tangential_pressure.set(tangential_pressure); + ev.tilt_x.set(tilt_x); + ev.tilt_y.set(tilt_y); + ev.twist.set(twist); + ev.altitude_angle.set(altitude_angle); + ev.azimuth_angle.set(azimuth_angle); + *ev.pointer_type.borrow_mut() = pointer_type; + ev.is_primary.set(is_primary); + *ev.coalesced_events.borrow_mut() = coalesced_events; + *ev.predicted_events.borrow_mut() = predicted_events; + ev + } +} + +impl PointerEventMethods for PointerEvent { + /// + fn Constructor( + window: &Window, + proto: Option, + can_gc: CanGc, + type_: DOMString, + init: &PointerEventInit, + ) -> DomRoot { + let bubbles = EventBubbles::from(init.parent.parent.parent.parent.bubbles); + let cancelable = EventCancelable::from(init.parent.parent.parent.parent.cancelable); + PointerEvent::new_with_proto( + window, + proto, + type_, + bubbles, + cancelable, + init.parent.parent.parent.view.as_deref(), + init.parent.parent.parent.detail, + init.parent.screenX, + init.parent.screenY, + init.parent.clientX, + init.parent.clientY, + init.parent.parent.ctrlKey, + init.parent.parent.altKey, + init.parent.parent.shiftKey, + init.parent.parent.metaKey, + init.parent.button, + init.parent.buttons, + init.parent.relatedTarget.as_deref(), + None, + init.pointerId, + init.width, + init.height, + *init.pressure, + *init.tangentialPressure, + init.tiltX.unwrap_or_default(), + init.tiltY.unwrap_or_default(), + init.twist, + *init.altitudeAngle.unwrap_or_default(), + *init.azimuthAngle.unwrap_or_default(), + init.pointerType.clone(), + init.isPrimary, + init.coalescedEvents.clone(), + init.predictedEvents.clone(), + can_gc, + ) + } + + /// + fn PointerId(&self) -> i32 { + self.pointer_id.get() + } + + /// + fn Width(&self) -> i32 { + self.width.get() + } + + /// + fn Height(&self) -> i32 { + self.height.get() + } + + /// + fn Pressure(&self) -> Finite { + Finite::wrap(self.pressure.get()) + } + + /// + fn TangentialPressure(&self) -> Finite { + Finite::wrap(self.tangential_pressure.get()) + } + + /// + fn TiltX(&self) -> i32 { + self.tilt_x.get() + } + + /// + fn TiltY(&self) -> i32 { + self.tilt_y.get() + } + + /// + fn Twist(&self) -> i32 { + self.twist.get() + } + + /// + fn AltitudeAngle(&self) -> Finite { + Finite::wrap(self.altitude_angle.get()) + } + + /// + fn AzimuthAngle(&self) -> Finite { + Finite::wrap(self.azimuth_angle.get()) + } + + /// + fn PointerType(&self) -> DOMString { + self.pointer_type.borrow().clone() + } + + /// + fn IsPrimary(&self) -> bool { + self.is_primary.get() + } + + /// + fn GetCoalescedEvents(&self) -> Vec> { + self.coalesced_events.borrow().clone() + } + + /// + fn GetPredictedEvents(&self) -> Vec> { + self.predicted_events.borrow().clone() + } + + /// + fn IsTrusted(&self) -> bool { + self.mouseevent.IsTrusted() + } +} diff --git a/components/script/dom/webidls/PointerEvent.webidl b/components/script/dom/webidls/PointerEvent.webidl new file mode 100644 index 00000000000..b798aeda457 --- /dev/null +++ b/components/script/dom/webidls/PointerEvent.webidl @@ -0,0 +1,46 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +// https://w3c.github.io/pointerevents/#pointerevent-interface +[Exposed=Window] +interface PointerEvent : MouseEvent +{ + constructor(DOMString type, optional PointerEventInit eventInitDict = {}); + + readonly attribute long pointerId; + + readonly attribute long width; + readonly attribute long height; + readonly attribute float pressure; + readonly attribute float tangentialPressure; + readonly attribute long tiltX; + readonly attribute long tiltY; + readonly attribute long twist; + readonly attribute double altitudeAngle; + readonly attribute double azimuthAngle; + + readonly attribute DOMString pointerType; + readonly attribute boolean isPrimary; + + sequence getCoalescedEvents(); + sequence getPredictedEvents(); +}; + +dictionary PointerEventInit : MouseEventInit +{ + long pointerId = 0; + long width = 1; + long height = 1; + float pressure = 0; + float tangentialPressure = 0; + long tiltX; + long tiltY; + long twist = 0; + double altitudeAngle; + double azimuthAngle; + DOMString pointerType = ""; + boolean isPrimary = false; + sequence coalescedEvents = []; + sequence predictedEvents = []; +}; diff --git a/tests/wpt/include.ini b/tests/wpt/include.ini index fe7cfb4d3ef..2966fc0ac36 100644 --- a/tests/wpt/include.ini +++ b/tests/wpt/include.ini @@ -203,6 +203,8 @@ skip: true skip: false [permissions] skip: false +[pointerevents] + skip: false [quirks] skip: false [referrer-policy] diff --git a/tests/wpt/meta/pointerevents/compat/pointerevent_touch-action-verification.html.ini b/tests/wpt/meta/pointerevents/compat/pointerevent_touch-action-verification.html.ini new file mode 100644 index 00000000000..bd84e6c592f --- /dev/null +++ b/tests/wpt/meta/pointerevents/compat/pointerevent_touch-action-verification.html.ini @@ -0,0 +1,12 @@ +[pointerevent_touch-action-verification.html] + [explicit-pinch-zoom] + expected: FAIL + + [explicit-pinch-zoom-pan-x-pan-up] + expected: FAIL + + [explicit-pinch-zoom-pan-x-pan-y] + expected: FAIL + + [explicit-invalid-14] + expected: FAIL diff --git a/tests/wpt/meta/pointerevents/idlharness.https.window.js.ini b/tests/wpt/meta/pointerevents/idlharness.https.window.js.ini new file mode 100644 index 00000000000..e2f1883c3cb --- /dev/null +++ b/tests/wpt/meta/pointerevents/idlharness.https.window.js.ini @@ -0,0 +1,204 @@ +[idlharness.https.window.html] + [PointerEvent interface: attribute persistentDeviceId] + expected: FAIL + + [PointerEvent interface: new PointerEvent("type") must inherit property "persistentDeviceId" with the proper type] + expected: FAIL + + [HTMLElement interface: attribute onpointerover] + expected: FAIL + + [HTMLElement interface: attribute onpointerenter] + expected: FAIL + + [HTMLElement interface: attribute onpointerdown] + expected: FAIL + + [HTMLElement interface: attribute onpointermove] + expected: FAIL + + [HTMLElement interface: attribute onpointerrawupdate] + expected: FAIL + + [HTMLElement interface: attribute onpointerup] + expected: FAIL + + [HTMLElement interface: attribute onpointercancel] + expected: FAIL + + [HTMLElement interface: attribute onpointerout] + expected: FAIL + + [HTMLElement interface: attribute onpointerleave] + expected: FAIL + + [HTMLElement interface: attribute ongotpointercapture] + expected: FAIL + + [HTMLElement interface: attribute onlostpointercapture] + expected: FAIL + + [Window interface: attribute onpointerover] + expected: FAIL + + [Window interface: attribute onpointerenter] + expected: FAIL + + [Window interface: attribute onpointerdown] + expected: FAIL + + [Window interface: attribute onpointermove] + expected: FAIL + + [Window interface: attribute onpointerrawupdate] + expected: FAIL + + [Window interface: attribute onpointerup] + expected: FAIL + + [Window interface: attribute onpointercancel] + expected: FAIL + + [Window interface: attribute onpointerout] + expected: FAIL + + [Window interface: attribute onpointerleave] + expected: FAIL + + [Window interface: attribute ongotpointercapture] + expected: FAIL + + [Window interface: attribute onlostpointercapture] + expected: FAIL + + [Window interface: window must inherit property "onpointerover" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "onpointerenter" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "onpointerdown" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "onpointermove" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "onpointerrawupdate" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "onpointerup" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "onpointercancel" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "onpointerout" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "onpointerleave" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "ongotpointercapture" with the proper type] + expected: FAIL + + [Window interface: window must inherit property "onlostpointercapture" with the proper type] + expected: FAIL + + [Navigator interface: attribute maxTouchPoints] + expected: FAIL + + [Navigator interface: navigator must inherit property "maxTouchPoints" with the proper type] + expected: FAIL + + [Document interface: attribute onpointerover] + expected: FAIL + + [Document interface: attribute onpointerenter] + expected: FAIL + + [Document interface: attribute onpointerdown] + expected: FAIL + + [Document interface: attribute onpointermove] + expected: FAIL + + [Document interface: attribute onpointerrawupdate] + expected: FAIL + + [Document interface: attribute onpointerup] + expected: FAIL + + [Document interface: attribute onpointercancel] + expected: FAIL + + [Document interface: attribute onpointerout] + expected: FAIL + + [Document interface: attribute onpointerleave] + expected: FAIL + + [Document interface: attribute ongotpointercapture] + expected: FAIL + + [Document interface: attribute onlostpointercapture] + expected: FAIL + + [Document interface: document must inherit property "onpointerover" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "onpointerenter" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "onpointerdown" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "onpointermove" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "onpointerrawupdate" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "onpointerup" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "onpointercancel" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "onpointerout" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "onpointerleave" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "ongotpointercapture" with the proper type] + expected: FAIL + + [Document interface: document must inherit property "onlostpointercapture" with the proper type] + expected: FAIL + + [Element interface: operation setPointerCapture(long)] + expected: FAIL + + [Element interface: operation releasePointerCapture(long)] + expected: FAIL + + [Element interface: operation hasPointerCapture(long)] + expected: FAIL + + [Element interface: document.body must inherit property "setPointerCapture(long)" with the proper type] + expected: FAIL + + [Element interface: calling setPointerCapture(long) on document.body with too few arguments must throw TypeError] + expected: FAIL + + [Element interface: document.body must inherit property "releasePointerCapture(long)" with the proper type] + expected: FAIL + + [Element interface: calling releasePointerCapture(long) on document.body with too few arguments must throw TypeError] + expected: FAIL + + [Element interface: document.body must inherit property "hasPointerCapture(long)" with the proper type] + expected: FAIL + + [Element interface: calling hasPointerCapture(long) on document.body with too few arguments must throw TypeError] + expected: FAIL diff --git a/tests/wpt/meta/pointerevents/inheritance.html.ini b/tests/wpt/meta/pointerevents/inheritance.html.ini new file mode 100644 index 00000000000..7acc4ed25c4 --- /dev/null +++ b/tests/wpt/meta/pointerevents/inheritance.html.ini @@ -0,0 +1,6 @@ +[inheritance.html] + [Property touch-action has initial value auto] + expected: FAIL + + [Property touch-action does not inherit] + expected: FAIL diff --git a/tests/wpt/meta/pointerevents/parsing/touch-action-computed.html.ini b/tests/wpt/meta/pointerevents/parsing/touch-action-computed.html.ini new file mode 100644 index 00000000000..878d22f95ac --- /dev/null +++ b/tests/wpt/meta/pointerevents/parsing/touch-action-computed.html.ini @@ -0,0 +1,18 @@ +[touch-action-computed.html] + [Property touch-action value 'auto'] + expected: FAIL + + [Property touch-action value 'none'] + expected: FAIL + + [Property touch-action value 'manipulation'] + expected: FAIL + + [Property touch-action value 'pan-x'] + expected: FAIL + + [Property touch-action value 'pan-y'] + expected: FAIL + + [Property touch-action value 'pan-x pan-y'] + expected: FAIL diff --git a/tests/wpt/meta/pointerevents/parsing/touch-action-valid.html.ini b/tests/wpt/meta/pointerevents/parsing/touch-action-valid.html.ini new file mode 100644 index 00000000000..cf3700495ce --- /dev/null +++ b/tests/wpt/meta/pointerevents/parsing/touch-action-valid.html.ini @@ -0,0 +1,18 @@ +[touch-action-valid.html] + [e.style['touch-action'\] = "auto" should set the property value] + expected: FAIL + + [e.style['touch-action'\] = "none" should set the property value] + expected: FAIL + + [e.style['touch-action'\] = "manipulation" should set the property value] + expected: FAIL + + [e.style['touch-action'\] = "pan-x" should set the property value] + expected: FAIL + + [e.style['touch-action'\] = "pan-y" should set the property value] + expected: FAIL + + [e.style['touch-action'\] = "pan-y pan-x" should set the property value] + expected: FAIL diff --git a/tests/wpt/meta/pointerevents/persistentDeviceId/pointer-event-has-persistentdeviceid-from-pointer-event-init.tentative.html.ini b/tests/wpt/meta/pointerevents/persistentDeviceId/pointer-event-has-persistentdeviceid-from-pointer-event-init.tentative.html.ini new file mode 100644 index 00000000000..3a8d11b16eb --- /dev/null +++ b/tests/wpt/meta/pointerevents/persistentDeviceId/pointer-event-has-persistentdeviceid-from-pointer-event-init.tentative.html.ini @@ -0,0 +1,6 @@ +[pointer-event-has-persistentdeviceid-from-pointer-event-init.tentative.html] + [PointerEvent.persistentDeviceId via PointerEventInit] + expected: FAIL + + [No persistentDeviceId in PointerEventInit] + expected: FAIL diff --git a/tests/wpt/meta/pointerevents/pointerevent_constructor.html.ini b/tests/wpt/meta/pointerevents/pointerevent_constructor.html.ini new file mode 100644 index 00000000000..b59bcb78922 --- /dev/null +++ b/tests/wpt/meta/pointerevents/pointerevent_constructor.html.ini @@ -0,0 +1,3 @@ +[pointerevent_constructor.html] + [getCoalescedEvents in event] + expected: FAIL diff --git a/tests/wpt/meta/pointerevents/pointerevent_on_event_handlers.html.ini b/tests/wpt/meta/pointerevents/pointerevent_on_event_handlers.html.ini new file mode 100644 index 00000000000..9ffd71dd6c3 --- /dev/null +++ b/tests/wpt/meta/pointerevents/pointerevent_on_event_handlers.html.ini @@ -0,0 +1,91 @@ +[pointerevent_on_event_handlers.html] + expected: TIMEOUT + [The default value of onpointerdown is always null] + expected: FAIL + + [The onpointerdown content attribute must be compiled into the onpointerdown property] + expected: FAIL + + [dispatching a pointerdown event must trigger element.onpointerdown] + expected: NOTRUN + + [The default value of onpointerup is always null] + expected: FAIL + + [The onpointerup content attribute must be compiled into the onpointerup property] + expected: FAIL + + [dispatching a pointerup event must trigger element.onpointerup] + expected: NOTRUN + + [The default value of onpointercancel is always null] + expected: FAIL + + [The onpointercancel content attribute must be compiled into the onpointercancel property] + expected: FAIL + + [dispatching a pointercancel event must trigger element.onpointercancel] + expected: NOTRUN + + [The default value of onpointermove is always null] + expected: FAIL + + [The onpointermove content attribute must be compiled into the onpointermove property] + expected: FAIL + + [dispatching a pointermove event must trigger element.onpointermove] + expected: NOTRUN + + [The default value of onpointerover is always null] + expected: FAIL + + [The onpointerover content attribute must be compiled into the onpointerover property] + expected: FAIL + + [dispatching a pointerover event must trigger element.onpointerover] + expected: NOTRUN + + [The default value of onpointerout is always null] + expected: FAIL + + [The onpointerout content attribute must be compiled into the onpointerout property] + expected: FAIL + + [dispatching a pointerout event must trigger element.onpointerout] + expected: NOTRUN + + [The default value of onpointerenter is always null] + expected: FAIL + + [The onpointerenter content attribute must be compiled into the onpointerenter property] + expected: FAIL + + [dispatching a pointerenter event must trigger element.onpointerenter] + expected: NOTRUN + + [The default value of onpointerleave is always null] + expected: FAIL + + [The onpointerleave content attribute must be compiled into the onpointerleave property] + expected: FAIL + + [dispatching a pointerleave event must trigger element.onpointerleave] + expected: NOTRUN + + [The default value of ongotpointercapture is always null] + expected: FAIL + + [The ongotpointercapture content attribute must be compiled into the ongotpointercapture property] + expected: FAIL + + [dispatching a gotpointercapture event must trigger element.ongotpointercapture] + expected: NOTRUN + + [The default value of onlostpointercapture is always null] + expected: FAIL + + [The onlostpointercapture content attribute must be compiled into the onlostpointercapture property] + expected: FAIL + + [dispatching a lostpointercapture event must trigger element.onlostpointercapture] + expected: NOTRUN diff --git a/tests/wpt/meta/pointerevents/pointerevent_tiltX_tiltY_to_azimuth_altitude.html.ini b/tests/wpt/meta/pointerevents/pointerevent_tiltX_tiltY_to_azimuth_altitude.html.ini new file mode 100644 index 00000000000..64628fa8358 --- /dev/null +++ b/tests/wpt/meta/pointerevents/pointerevent_tiltX_tiltY_to_azimuth_altitude.html.ini @@ -0,0 +1,57 @@ +[pointerevent_tiltX_tiltY_to_azimuth_altitude.html] + [tiltX,tiltY to azimuth/altitude when tiltX=0 and tiltY=0] + expected: FAIL + + [tiltX,tiltY to azimuth/altitude when tiltX=0 and tiltY=90] + expected: FAIL + + [tiltX,tiltY to azimuth/altitude when tiltX=0 and tiltY=-90] + expected: FAIL + + [tiltX,tiltY to azimuth/altitude when tiltX=-90 and tiltY=0] + expected: FAIL + + [tiltX,tiltY to azimuth/altitude when tiltX=0 and tiltY=45] + expected: FAIL + + [tiltX,tiltY to azimuth/altitude when tiltX=0 and tiltY=-45] + expected: FAIL + + [tiltX,tiltY to azimuth/altitude when tiltX=45 and tiltY=0] + expected: FAIL + + [tiltX,tiltY to azimuth/altitude when tiltX=-45 and tiltY=0] + expected: FAIL + + [tiltX/tiltY to azimuth/altitude when tiltX/tiltY are not populated] + expected: FAIL + + [azimuth/altitude to tiltX/tiltY when azimuth=0 and altitude=0] + expected: FAIL + + [azimuth/altitude to tiltX/tiltY when azimuth=0 and altitude=0.7853981633974483] + expected: FAIL + + [azimuth/altitude to tiltX/tiltY when azimuth=1.5707963267948966 and altitude=0] + expected: FAIL + + [azimuth/altitude to tiltX/tiltY when azimuth=1.5707963267948966 and altitude=0.7853981633974483] + expected: FAIL + + [azimuth/altitude to tiltX/tiltY when azimuth=3.141592653589793 and altitude=0] + expected: FAIL + + [azimuth/altitude to tiltX/tiltY when azimuth=3.141592653589793 and altitude=0.7853981633974483] + expected: FAIL + + [azimuth/altitude to tiltX/tiltY when azimuth=4.71238898038469 and altitude=0] + expected: FAIL + + [azimuth/altitude to tiltX/tiltY when azimuth=4.71238898038469 and altitude=0.7853981633974483] + expected: FAIL + + [If only one of the values (tiltX, tiltY) or (azimuthAngle, altitudeAngle) is available the other one is set to the default value] + expected: FAIL + + [If one of the values in both sets is provided, the other value in the set is initialized with the default value] + expected: FAIL diff --git a/tests/wpt/meta/pointerevents/pointerevent_touch-action-illegal.html.ini b/tests/wpt/meta/pointerevents/pointerevent_touch-action-illegal.html.ini new file mode 100644 index 00000000000..d850a7602e1 --- /dev/null +++ b/tests/wpt/meta/pointerevents/pointerevent_touch-action-illegal.html.ini @@ -0,0 +1,9 @@ +[pointerevent_touch-action-illegal.html] + ['pan-x none' is corrected properly] + expected: FAIL + + ['pan-y none' is corrected properly] + expected: FAIL + + ['auto none' is corrected properly] + expected: FAIL diff --git a/tests/wpt/meta/pointerevents/pointerevent_touch-action-verification.html.ini b/tests/wpt/meta/pointerevents/pointerevent_touch-action-verification.html.ini new file mode 100644 index 00000000000..49a350fbb8c --- /dev/null +++ b/tests/wpt/meta/pointerevents/pointerevent_touch-action-verification.html.ini @@ -0,0 +1,111 @@ +[pointerevent_touch-action-verification.html] + [default] + expected: FAIL + + [stylesheet-none] + expected: FAIL + + [explicit-auto] + expected: FAIL + + [explicit-pan-x] + expected: FAIL + + [explicit-pan-left] + expected: FAIL + + [explicit-pan-right] + expected: FAIL + + [explicit-pan-y] + expected: FAIL + + [explicit-pan-up] + expected: FAIL + + [explicit-pan-down] + expected: FAIL + + [explicit-pan-x-pan-y] + expected: FAIL + + [explicit-pan-y-pan-x] + expected: FAIL + + [explicit-pan-left-pan-up] + expected: FAIL + + [explicit-pan-left-pan-down] + expected: FAIL + + [explicit-pan-right-pan-up] + expected: FAIL + + [explicit-pan-right-pan-down] + expected: FAIL + + [explicit-pan-up-pan-left] + expected: FAIL + + [explicit-pan-up-pan-right] + expected: FAIL + + [explicit-pan-down-pan-left] + expected: FAIL + + [explicit-pan-down-pan-right] + expected: FAIL + + [explicit-manipulation] + expected: FAIL + + [explicit-none] + expected: FAIL + + [explicit-invalid-1] + expected: FAIL + + [explicit-invalid-2] + expected: FAIL + + [explicit-invalid-3] + expected: FAIL + + [explicit-invalid-4] + expected: FAIL + + [explicit-invalid-5] + expected: FAIL + + [explicit-invalid-6] + expected: FAIL + + [explicit-invalid-7] + expected: FAIL + + [explicit-invalid-8] + expected: FAIL + + [explicit-invalid-9] + expected: FAIL + + [explicit-invalid-10] + expected: FAIL + + [explicit-invalid-11] + expected: FAIL + + [explicit-invalid-12] + expected: FAIL + + [explicit-invalid-13] + expected: FAIL + + [not-inherited] + expected: FAIL + + [inherit] + expected: FAIL + + [initial] + expected: FAIL diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 094659d27ca..4623106b386 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -13495,7 +13495,7 @@ ] ], "interfaces.https.html": [ - "dc853b1a823990fa2d1478533dc5bd17fb576a13", + "a70a25f44ce0c5aff0eac067afba5ac2d79141d6", [ null, {} diff --git a/tests/wpt/mozilla/tests/mozilla/interfaces.https.html b/tests/wpt/mozilla/tests/mozilla/interfaces.https.html index dc853b1a823..a70a25f44ce 100644 --- a/tests/wpt/mozilla/tests/mozilla/interfaces.https.html +++ b/tests/wpt/mozilla/tests/mozilla/interfaces.https.html @@ -226,6 +226,7 @@ test_interfaces([ "PerformanceResourceTiming", "Plugin", "PluginArray", + "PointerEvent", "PopStateEvent", "ProcessingInstruction", "ProgressEvent",