[Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointereven...
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2019 06:41:22 +0000 (06:41 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Apr 2019 06:41:22 +0000 (06:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197006

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

* web-platform-tests/pointerevents/pointerevent_on_event_handlers-expected.txt: Added.

Source/WebCore:

Add support for on* HTML attributes and JS properties for pointer events.

* dom/GlobalEventHandlers.idl:
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

* js/dom/dom-static-property-for-in-iteration-expected.txt:
* platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt:
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244421 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers-expected.txt [new file with mode: 0644]
LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt
LayoutTests/platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/dom/GlobalEventHandlers.idl
Source/WebCore/html/HTMLAttributeNames.in
Source/WebCore/html/HTMLElement.cpp

index 1173c69..3d6eada 100644 (file)
@@ -1,3 +1,14 @@
+2019-04-17  Antoine Quint  <graouts@apple.com>
+
+        [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers.html
+        https://bugs.webkit.org/show_bug.cgi?id=197006
+
+        Reviewed by Antti Koivisto.
+
+        * js/dom/dom-static-property-for-in-iteration-expected.txt:
+        * platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt:
+        * platform/mac/TestExpectations:
+
 2019-04-17  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         Unreviewed test gardening for WinCairo port
index 9c14374..1a1aca8 100644 (file)
@@ -1,5 +1,14 @@
 2019-04-17  Antoine Quint  <graouts@apple.com>
 
+        [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers.html
+        https://bugs.webkit.org/show_bug.cgi?id=197006
+
+        Reviewed by Antti Koivisto.
+
+        * web-platform-tests/pointerevents/pointerevent_on_event_handlers-expected.txt: Added.
+
+2019-04-17  Antoine Quint  <graouts@apple.com>
+
         [Pointer Events WPT] Update WPT tests and provide macOS testdriver
         https://bugs.webkit.org/show_bug.cgi?id=197011
         <rdar://problem/49976553>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers-expected.txt
new file mode 100644 (file)
index 0000000..cbe39cf
--- /dev/null
@@ -0,0 +1,36 @@
+PointerEvent: Dispatch custom event
+
+Test Description: This test checks if on pointer event handlers through attributes works properly using synthetic pointerevents. For valid results, this test must be run without generating real (trusted) events on the black rectangle below.
+
+
+PASS The default value of onpointerdown is always null 
+PASS The onpointerdown content attribute must be compiled into the onpointerdown property 
+PASS dispatching a pointerdown event must trigger element.onpointerdown 
+PASS The default value of onpointerup is always null 
+PASS The onpointerup content attribute must be compiled into the onpointerup property 
+PASS dispatching a pointerup event must trigger element.onpointerup 
+PASS The default value of onpointercancel is always null 
+PASS The onpointercancel content attribute must be compiled into the onpointercancel property 
+PASS dispatching a pointercancel event must trigger element.onpointercancel 
+PASS The default value of onpointermove is always null 
+PASS The onpointermove content attribute must be compiled into the onpointermove property 
+PASS dispatching a pointermove event must trigger element.onpointermove 
+PASS The default value of onpointerover is always null 
+PASS The onpointerover content attribute must be compiled into the onpointerover property 
+PASS dispatching a pointerover event must trigger element.onpointerover 
+PASS The default value of onpointerout is always null 
+PASS The onpointerout content attribute must be compiled into the onpointerout property 
+PASS dispatching a pointerout event must trigger element.onpointerout 
+PASS The default value of onpointerenter is always null 
+PASS The onpointerenter content attribute must be compiled into the onpointerenter property 
+PASS dispatching a pointerenter event must trigger element.onpointerenter 
+PASS The default value of onpointerleave is always null 
+PASS The onpointerleave content attribute must be compiled into the onpointerleave property 
+PASS dispatching a pointerleave event must trigger element.onpointerleave 
+PASS The default value of ongotpointercapture is always null 
+PASS The ongotpointercapture content attribute must be compiled into the ongotpointercapture property 
+PASS dispatching a gotpointercapture event must trigger element.ongotpointercapture 
+PASS The default value of onlostpointercapture is always null 
+PASS The onlostpointercapture content attribute must be compiled into the onlostpointercapture property 
+PASS dispatching a lostpointercapture event must trigger element.onlostpointercapture 
+
index 0c28206..e852c78 100644 (file)
@@ -119,6 +119,16 @@ PASS a["onanimationend"] is null
 PASS a["onanimationiteration"] is null
 PASS a["onanimationstart"] is null
 PASS a["onanimationcancel"] is null
+PASS a["ongotpointercapture"] is null
+PASS a["onlostpointercapture"] is null
+PASS a["onpointerdown"] is null
+PASS a["onpointermove"] is null
+PASS a["onpointerup"] is null
+PASS a["onpointercancel"] is null
+PASS a["onpointerover"] is null
+PASS a["onpointerout"] is null
+PASS a["onpointerenter"] is null
+PASS a["onpointerleave"] is null
 PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
 PASS a["prefix"] is null
 PASS a["localName"] is a
index 245f7b7..b45f911 100644 (file)
@@ -120,6 +120,16 @@ PASS a["onanimationend"] is null
 PASS a["onanimationiteration"] is null
 PASS a["onanimationstart"] is null
 PASS a["onanimationcancel"] is null
+PASS a["ongotpointercapture"] is null
+PASS a["onlostpointercapture"] is null
+PASS a["onpointerdown"] is null
+PASS a["onpointermove"] is null
+PASS a["onpointerup"] is null
+PASS a["onpointercancel"] is null
+PASS a["onpointerover"] is null
+PASS a["onpointerout"] is null
+PASS a["onpointerenter"] is null
+PASS a["onpointerleave"] is null
 PASS a["namespaceURI"] is http://www.w3.org/1999/xhtml
 PASS a["prefix"] is null
 PASS a["localName"] is a
index 3996193..4816dc5 100644 (file)
@@ -1881,7 +1881,6 @@ imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_pointermo
 
 webkit.org/b/197004 imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node.html [ Skip ]
 webkit.org/b/197005 imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.html [ Skip ]
-webkit.org/b/197006 imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers.html [ Skip ]
 webkit.org/b/197008 imported/w3c/web-platform-tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse.html [ Pass Failure ]
 webkit.org/b/197007 imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html [ Skip ]
 webkit.org/b/197009 imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_invalid_pointerid.html [ Failure Pass ]
index 9d30a34..37261b3 100644 (file)
@@ -1,3 +1,17 @@
+2019-04-17  Antoine Quint  <graouts@apple.com>
+
+        [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers.html
+        https://bugs.webkit.org/show_bug.cgi?id=197006
+
+        Reviewed by Antti Koivisto.
+
+        Add support for on* HTML attributes and JS properties for pointer events.
+
+        * dom/GlobalEventHandlers.idl:
+        * html/HTMLAttributeNames.in:
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::createEventHandlerNameMap):
+
 2019-04-17  Timothy Hatcher  <timothy@apple.com>
 
         Standardize the `<meta name="color-scheme">` separator.
index 5c48711..54a7f28 100644 (file)
     attribute EventHandler onanimationstart;
     attribute EventHandler onanimationcancel;
 
+    // Event handlers from Pointer Events API (https://w3c.github.io/pointerevents/#extensions-to-the-globaleventhandlers-mixin)
+    attribute EventHandler ongotpointercapture;
+    attribute EventHandler onlostpointercapture;
+    attribute EventHandler onpointerdown;
+    attribute EventHandler onpointermove;
+    attribute EventHandler onpointerup;
+    attribute EventHandler onpointercancel;
+    attribute EventHandler onpointerover;
+    attribute EventHandler onpointerout;
+    attribute EventHandler onpointerenter;
+    attribute EventHandler onpointerleave;
+
     // Additions that are not yet part of the standard.
 
     [NotEnumerable] attribute EventHandler onsearch;
index a4c2386..889c380 100644 (file)
@@ -249,11 +249,13 @@ onkeyup
 ongesturestart
 ongesturechange
 ongestureend
+ongotpointercapture
 onlanguagechange
 onload
 onloadeddata
 onloadedmetadata
 onloadstart
+onlostpointercapture
 onmessage
 onmousedown
 onmouseenter
@@ -272,6 +274,14 @@ onpaste
 onpause
 onplay
 onplaying
+onpointerdown
+onpointermove
+onpointerup
+onpointercancel
+onpointerover
+onpointerout
+onpointerenter
+onpointerleave
 onpopstate
 onprogress
 onratechange
index 9e0441b..17cec88 100644 (file)
@@ -273,6 +273,7 @@ HTMLElement::EventHandlerNameMap HTMLElement::createEventHandlerNameMap()
         &ongesturechangeAttr.get(),
         &ongestureendAttr.get(),
         &ongesturestartAttr.get(),
+        &ongotpointercaptureAttr.get(),
         &oninputAttr.get(),
         &oninvalidAttr.get(),
         &onkeydownAttr.get(),
@@ -282,6 +283,7 @@ HTMLElement::EventHandlerNameMap HTMLElement::createEventHandlerNameMap()
         &onloadeddataAttr.get(),
         &onloadedmetadataAttr.get(),
         &onloadstartAttr.get(),
+        &onlostpointercaptureAttr.get(),
         &onmousedownAttr.get(),
         &onmouseenterAttr.get(),
         &onmouseleaveAttr.get(),
@@ -294,6 +296,14 @@ HTMLElement::EventHandlerNameMap HTMLElement::createEventHandlerNameMap()
         &onpauseAttr.get(),
         &onplayAttr.get(),
         &onplayingAttr.get(),
+        &onpointerdownAttr.get(),
+        &onpointermoveAttr.get(),
+        &onpointerupAttr.get(),
+        &onpointercancelAttr.get(),
+        &onpointeroverAttr.get(),
+        &onpointeroutAttr.get(),
+        &onpointerenterAttr.get(),
+        &onpointerleaveAttr.get(),
         &onprogressAttr.get(),
         &onratechangeAttr.get(),
         &onresetAttr.get(),