[GTK][WPE] Support Pointer Events
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Nov 2019 16:35:55 +0000 (16:35 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Nov 2019 16:35:55 +0000 (16:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=202789

Reviewed by Carlos Garcia Campos.

.:

Build support for PointerEvents when EXPERIMENTAL_FEATURES is enabled.
Currently support for PointerEvents of pointerType==mouse works fine,
but support for other type of PointerEvents is missing.

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

LayoutTests/imported/w3c:

* web-platform-tests/resources/testdriver-vendor.js:
The fix for iOS added in r245639 triggers a call to sendEventStream in
UIScriptController that crashes on GTK because that function is only
implemented for iOS. For Mac this was not an issue because the Mac port
doesn't enable TouchEvent support ("createTouch" in document).
However TouchEvent support is enabled for GTK. Fix this by only
trigerring the call to dispatchTouchActions when TouchEvent support
is enabled _and_ its iOS.

Source/WebKit:

Covered by existing tests.

* UIProcess/PageClient.h: Add a ifdef for platform COCOA on two
function declarations that depend on the UIGestureRecognizer ObjC type.
This is not needed for GTK/WPE code.

LayoutTests:

Add test expectations for GTK/WPE.

* platform/gtk/TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt: Removed.
  Now it passes with the general expectation.
* platform/gtk/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt: Removed.
  Now it passes with the general expectation.
* platform/wpe/TestExpectations: Update also bug number for PointerLock.

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

12 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt [deleted file]
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt [deleted file]
LayoutTests/platform/wpe/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/PageClient.h
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsWPE.cmake

index 76871f9..eda5d7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2019-11-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
 
+        [GTK][WPE] Support Pointer Events
+        https://bugs.webkit.org/show_bug.cgi?id=202789
+
+        Reviewed by Carlos Garcia Campos.
+
+        Build support for PointerEvents when EXPERIMENTAL_FEATURES is enabled.
+        Currently support for PointerEvents of pointerType==mouse works fine,
+        but support for other type of PointerEvents is missing.
+
+        * Source/cmake/OptionsGTK.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+
+2019-11-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
         [GTK][WPE] Enable CSS Painting API
         https://bugs.webkit.org/show_bug.cgi?id=190710
 
index 64df90a..7814f3e 100644 (file)
@@ -1,3 +1,19 @@
+2019-11-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [GTK][WPE] Support Pointer Events
+        https://bugs.webkit.org/show_bug.cgi?id=202789
+
+        Reviewed by Carlos Garcia Campos.
+
+        Add test expectations for GTK/WPE.
+
+        * platform/gtk/TestExpectations:
+        * platform/gtk/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt: Removed.
+          Now it passes with the general expectation.
+        * platform/gtk/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt: Removed.
+          Now it passes with the general expectation.
+        * platform/wpe/TestExpectations: Update also bug number for PointerLock.
+
 2019-11-12  Rob Buis  <rbuis@igalia.com>
 
         Unskip some fetch tests
index f27094c..64bdd87 100644 (file)
@@ -1,3 +1,19 @@
+2019-11-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [GTK][WPE] Support Pointer Events
+        https://bugs.webkit.org/show_bug.cgi?id=202789
+
+        Reviewed by Carlos Garcia Campos.
+
+        * web-platform-tests/resources/testdriver-vendor.js:
+        The fix for iOS added in r245639 triggers a call to sendEventStream in
+        UIScriptController that crashes on GTK because that function is only
+        implemented for iOS. For Mac this was not an issue because the Mac port
+        doesn't enable TouchEvent support ("createTouch" in document).
+        However TouchEvent support is enabled for GTK. Fix this by only
+        trigerring the call to dispatchTouchActions when TouchEvent support
+        is enabled _and_ its iOS.
+
 2019-11-12  Rob Buis  <rbuis@igalia.com>
 
         Unskip some fetch tests
index 4186a4c..f594d35 100644 (file)
@@ -244,7 +244,7 @@ window.test_driver_internal.action_sequence = function(sources)
 
     if (pointerType === "touch")
         return dispatchTouchActions(pointerSource.actions);
-    if ("createTouch" in document)
+    if (testRunner.isIOSFamily && "createTouch" in document)
         return dispatchTouchActions(pointerSource.actions, { insertPauseAfterPointerUp: true });
     if (pointerType === "mouse")
         return dispatchMouseActions(pointerSource.actions);
index 5008044..d8ddd73 100644 (file)
@@ -4011,6 +4011,20 @@ imported/w3c/web-platform-tests/css/css-values/ch-unit-010.html [ Pass ]
 imported/w3c/web-platform-tests/css/css-values/ch-unit-011.html [ Pass ]
 imported/w3c/web-platform-tests/css/css-values/ch-unit-012.html [ Pass ]
 
+# PointerEvents not enabled globally, but enabled for GTK (EXPERIMENTAL_FEATURES)
+pointerevents/mouse [ Pass ]
+imported/w3c/web-platform-tests/pointerevents [ Pass ]
+# PointerEvents currently only supports mouse on GTK (no Touch/Pen support)
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_change-touch-action-onpointerdown_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_pointercancel_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_releasepointercapture_onpointercancel_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-auto-css_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-inherit_highest-parent-none_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_pen.html [ Skip ]
+
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of PASSING tests. See top of file where to put new expectations.
 #////////////////////////////////////////////////////////////////////////////////////////
diff --git a/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt b/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt
deleted file mode 100644 (file)
index b04398c..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-Pointer Events touch-action attribute support
-
-Test Description: Test will automatically check parsing behaviour of various touch-action combinations.
-
-touch-action: basic verification
-
-The following pointer types were detected: .
-
-
-PASS default 
-FAIL stylesheet-none assert_equals: expected "auto" but got "none"
-PASS explicit-auto 
-FAIL explicit-pan-x assert_equals: expected "auto" but got "pan-x"
-FAIL explicit-pan-left assert_equals: expected "auto" but got "pan-left"
-FAIL explicit-pan-right assert_equals: expected "auto" but got "pan-right"
-FAIL explicit-pan-y assert_equals: expected "auto" but got "pan-y"
-FAIL explicit-pan-up assert_equals: expected "auto" but got "pan-up"
-FAIL explicit-pan-down assert_equals: expected "auto" but got "pan-down"
-FAIL explicit-pinch-zoom assert_equals: expected "auto" but got "pinch-zoom"
-FAIL explicit-pan-x-pan-y assert_equals: expected "auto" but got "pan-x pan-y"
-FAIL explicit-pan-y-pan-x assert_equals: expected "auto" but got "pan-x pan-y"
-FAIL explicit-pan-left-pan-up assert_equals: expected "auto" but got "pan-left pan-up"
-FAIL explicit-pan-left-pan-down assert_equals: expected "auto" but got "pan-left pan-down"
-FAIL explicit-pan-right-pan-up assert_equals: expected "auto" but got "pan-right pan-up"
-FAIL explicit-pan-right-pan-down assert_equals: expected "auto" but got "pan-right pan-down"
-FAIL explicit-pan-up-pan-left assert_equals: expected "auto" but got "pan-left pan-up"
-FAIL explicit-pan-up-pan-right assert_equals: expected "auto" but got "pan-right pan-up"
-FAIL explicit-pan-down-pan-left assert_equals: expected "auto" but got "pan-left pan-down"
-FAIL explicit-pan-down-pan-right assert_equals: expected "auto" but got "pan-right pan-down"
-FAIL explicit-pinch-zoom-pan-x-pan-up assert_equals: expected "auto" but got "pan-x pan-up pinch-zoom"
-FAIL explicit-pinch-zoom-pan-x-pan-y assert_equals: expected "auto" but got "manipulation"
-PASS explicit-manipulation 
-FAIL explicit-none assert_equals: expected "auto" but got "none"
-PASS explicit-invalid-1 
-FAIL explicit-invalid-2 assert_equals: expected "auto" but got "none"
-PASS explicit-invalid-3 
-PASS explicit-invalid-4 
-PASS explicit-invalid-5 
-PASS explicit-invalid-6 
-PASS explicit-invalid-7 
-PASS explicit-invalid-8 
-PASS explicit-invalid-9 
-PASS explicit-invalid-10 
-PASS explicit-invalid-11 
-PASS explicit-invalid-12 
-PASS explicit-invalid-13 
-PASS explicit-invalid-14 
-PASS not-inherited 
-FAIL inherit assert_equals: expected "auto" but got "none"
-PASS initial 
-
diff --git a/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt b/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt
deleted file mode 100644 (file)
index 123f93e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Pointer Events touch-action attribute support
-
-Test Description: Test will automatically check parsing behaviour of various touch-action combinations.
-
-touch-action: basic verification
-
-
-PASS default 
-FAIL stylesheet-none assert_equals: expected "auto" but got "none"
-PASS explicit-auto 
-FAIL explicit-pan-x assert_equals: expected "auto" but got "pan-x"
-FAIL explicit-pan-y assert_equals: expected "auto" but got "pan-y"
-FAIL explicit-pan-x-pan-y assert_equals: expected "auto" but got "pan-x pan-y"
-FAIL explicit-pan-y-pan-x assert_equals: expected "auto" but got "pan-x pan-y"
-PASS explicit-manipulation 
-FAIL explicit-none assert_equals: expected "auto" but got "none"
-PASS explicit-invalid-1 
-FAIL explicit-invalid-2 assert_equals: expected "auto" but got "none"
-PASS explicit-invalid-3 
-PASS explicit-invalid-4 
-PASS explicit-invalid-5 
-PASS explicit-invalid-6 
-PASS explicit-invalid-7 
-PASS explicit-invalid-8 
-PASS explicit-invalid-9 
-PASS explicit-invalid-10 
-PASS explicit-invalid-11 
-PASS explicit-invalid-12 
-PASS explicit-invalid-13 
-PASS not-inherited 
-FAIL inherit assert_equals: expected "auto" but got "none"
-PASS initial 
-
index 3a455ea..799953b 100644 (file)
@@ -380,9 +380,11 @@ fast/dom/Window/watchos [ Skip ]
 
 fast/dom/Window/Plug-ins.html [ Failure ]
 
-webkit.org/b/99036 pointer-lock/ [ Skip ]
-webkit.org/b/99036 fast/shadow-dom/pointerlockelement-in-shadow-tree.html [ Skip ]
-webkit.org/b/99036 fast/shadow-dom/pointerlockelement-in-slot.html [ Skip ]
+# Pointer Lock API not implemented
+webkit.org/b/204001 pointer-lock/ [ Skip ]
+webkit.org/b/204001 fast/shadow-dom/pointerlockelement-in-shadow-tree.html [ Skip ]
+webkit.org/b/204001 fast/shadow-dom/pointerlockelement-in-slot.html [ Skip ]
+webkit.org/b/204001 imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html [ Skip ]
 
 webkit.org/b/153833 fast/shadow-dom/touch-event-ios.html [ Skip ]
 
@@ -751,6 +753,20 @@ imported/w3c/web-platform-tests/css/css-values/ch-unit-010.html [ Pass ]
 imported/w3c/web-platform-tests/css/css-values/ch-unit-011.html [ Pass ]
 imported/w3c/web-platform-tests/css/css-values/ch-unit-012.html [ Pass ]
 
+# PointerEvents not enabled globally, but enabled for WPE (EXPERIMENTAL_FEATURES)
+pointerevents/mouse [ Pass ]
+imported/w3c/web-platform-tests/pointerevents [ Pass ]
+# PointerEvents currently only supports mouse on WPE (no Touch/Pen support)
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_change-touch-action-onpointerdown_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_pointercancel_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_releasepointercapture_onpointercancel_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-auto-css_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-inherit_highest-parent-none_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch.html [ Skip ]
+webkit.org/b/204115 imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerout_pen.html [ Skip ]
+
 #////////////////////////////////////////////////////////////////////////////////////////
 # 5. TESTS CRASHING
 #////////////////////////////////////////////////////////////////////////////////////////
index 044a502..b0627ad 100644 (file)
@@ -1,3 +1,16 @@
+2019-11-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [GTK][WPE] Support Pointer Events
+        https://bugs.webkit.org/show_bug.cgi?id=202789
+
+        Reviewed by Carlos Garcia Campos.
+
+        Covered by existing tests.
+
+        * UIProcess/PageClient.h: Add a ifdef for platform COCOA on two
+        function declarations that depend on the UIGestureRecognizer ObjC type.
+        This is not needed for GTK/WPE code.
+
 2019-11-12  Alex Christensen  <achristensen@webkit.org>
 
         Revert part of r251676
index 1c0702f..2a29899 100644 (file)
@@ -502,7 +502,7 @@ public:
     virtual RetainPtr<WKDrawingView> createDrawingView(WebCore::GraphicsLayer::EmbeddedViewID) { return nullptr; }
 #endif
 
-#if ENABLE(POINTER_EVENTS)
+#if ENABLE(POINTER_EVENTS) && PLATFORM(COCOA)
     virtual void cancelPointersForGestureRecognizer(UIGestureRecognizer*) { }
     virtual WTF::Optional<unsigned> activeTouchIdentifierForGestureRecognizer(UIGestureRecognizer*) { return WTF::nullopt; }
 #endif
index de67a0d..6ad0df0 100644 (file)
@@ -166,6 +166,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHAREABLE_RESOURCE PUBLIC ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_PAINTING_API PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_TYPED_OM PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_POINTER_EVENTS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 
 include(GStreamerDependencies)
 
index b99c16b..a8f1eb3 100644 (file)
@@ -62,6 +62,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL2 PRIVATE ${ENABLE_EXPERIMENTAL_FEA
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_PAINTING_API PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_TYPED_OM PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_POINTER_EVENTS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 
 # Public options specific to the WPE port. Do not add any options here unless
 # there is a strong reason we should support changing the value of the option,