Add PointerEvent, plus feature flag, plus Web Platform Tests
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Sep 2018 00:51:47 +0000 (00:51 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Sep 2018 00:51:47 +0000 (00:51 +0000)
commit04edef91e911cb0ede5e813debe03a7c552fc52b
treeede99b5e2a1824ec020545b1763141f355d83e6f
parent62fa41f216e118e0a2620ceda728b26ae5ce753a
Add PointerEvent, plus feature flag, plus Web Platform Tests
https://bugs.webkit.org/show_bug.cgi?id=189867
<rdar://problem/44697384>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Import the Web Platform Tests for Pointer Events.

* resources/import-expectations.json:
* web-platform-tests/pointerevents/META.yml: Added.
* web-platform-tests/pointerevents/README.md: Added.
* web-platform-tests/pointerevents/extension/idlharness.window-expected.txt: Added.
* web-platform-tests/pointerevents/extension/idlharness.window.html: Added.
* web-platform-tests/pointerevents/extension/idlharness.window.js: Added.
* web-platform-tests/pointerevents/extension/pointerevent_constructor-expected.txt: Added.
* web-platform-tests/pointerevents/extension/pointerevent_constructor.html: Added.
* web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt: Added.
* web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification.html: Added.
* web-platform-tests/pointerevents/extension/w3c-import.log: Added.
* web-platform-tests/pointerevents/idlharness.window-expected.txt: Added.
* web-platform-tests/pointerevents/idlharness.window.html: Added.
* web-platform-tests/pointerevents/idlharness.window.js: Added.
* web-platform-tests/pointerevents/pointerevent_constructor-expected.txt: Added.
* web-platform-tests/pointerevents/pointerevent_constructor.html: Added.
* web-platform-tests/pointerevents/pointerevent_on_event_handlers-expected.txt: Added.
* web-platform-tests/pointerevents/pointerevent_on_event_handlers.html: Added.
* web-platform-tests/pointerevents/pointerevent_styles.css: Added.
* web-platform-tests/pointerevents/pointerevent_support.js: Added.
* web-platform-tests/pointerevents/pointerevent_touch-action-illegal-expected.txt: Added.
* web-platform-tests/pointerevents/pointerevent_touch-action-illegal.html: Added.
* web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt: Added.
* web-platform-tests/pointerevents/pointerevent_touch-action-verification.html: Added.
* web-platform-tests/pointerevents/pointerlock/resources/pointerevent_movementxy-iframe.html: Added.
* web-platform-tests/pointerevents/pointerlock/resources/w3c-import.log: Added.
* web-platform-tests/pointerevents/resources/pointerevent_attributes_hoverable_pointers-iframe.html: Added.
* web-platform-tests/pointerevents/resources/pointerevent_fractional_coordinates-iframe.html: Added.
* web-platform-tests/pointerevents/resources/pointerevent_pointerId_scope-iframe.html: Added.
* web-platform-tests/pointerevents/resources/w3c-import.log: Added.
* web-platform-tests/pointerevents/w3c-import.log: Added.

Source/WebCore:

Add the PointerEvent interface.

Tests: imported/w3c/web-platform-tests/pointerevents/extension/idlharness.window.html
       imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_constructor.html
       imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification.html
       imported/w3c/web-platform-tests/pointerevents/idlharness.window.html
       imported/w3c/web-platform-tests/pointerevents/pointerevent_constructor.html
       imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers.html
       imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-illegal.html
       imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification.html

* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
        Add the new files.

* dom/Event.h:
(WebCore::Event::isPointerEvent const): New virtual identification method.

* dom/EventNames.in: Add PointerEvent so the InterfaceType code is generated.

* dom/PointerEvent.cpp: The PointerEvent interface, as specified by W3C.
(WebCore::PointerEvent::PointerEvent):
(WebCore::PointerEvent::eventInterface const):
* dom/PointerEvent.h: Added.
* dom/PointerEvent.idl: Added.

* page/RuntimeEnabledFeatures.h: Clean up the ordering of the features, so there aren't
confusing blank lines interspersed with #if USE macros.
(WebCore::RuntimeEnabledFeatures::setPointerEventsEnabled): Add a new flag for Pointer Events.
(WebCore::RuntimeEnabledFeatures::pointerEventsEnabled const):

Source/WebKit:

Add PointerEvents as an experimental feature.

* Shared/WebPreferences.yaml:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/resources/import-expectations.json
LayoutTests/imported/w3c/web-platform-tests/pointerevents/META.yml [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/README.md [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/idlharness.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/idlharness.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/idlharness.window.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_constructor-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_constructor.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/idlharness.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/idlharness.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/idlharness.window.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_constructor-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_constructor.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_on_event_handlers.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_styles.css [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_support.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-illegal-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-illegal.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/resources/pointerevent_movementxy-iframe.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerlock/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/resources/pointerevent_attributes_hoverable_pointers-iframe.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/resources/pointerevent_fractional_coordinates-iframe.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/resources/pointerevent_pointerId_scope-iframe.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/pointerevents/w3c-import.log [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/Event.h
Source/WebCore/dom/EventNames.in
Source/WebCore/dom/PointerEvent.cpp [new file with mode: 0644]
Source/WebCore/dom/PointerEvent.h [new file with mode: 0644]
Source/WebCore/dom/PointerEvent.idl [new file with mode: 0644]
Source/WebCore/features.json
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml