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: http://svn.webkit.org/repository/webkit/trunk@236378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/dom/Event.h b/Source/WebCore/dom/Event.h
index bba8444..1136085 100644
--- a/Source/WebCore/dom/Event.h
+++ b/Source/WebCore/dom/Event.h
@@ -104,6 +104,7 @@
virtual bool isInputEvent() const { return false; }
virtual bool isKeyboardEvent() const { return false; }
virtual bool isMouseEvent() const { return false; }
+ virtual bool isPointerEvent() const { return false; }
virtual bool isTextEvent() const { return false; }
virtual bool isTouchEvent() const { return false; }
virtual bool isUIEvent() const { return false; }