.: [GTK] Enable touch features
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 10:55:50 +0000 (10:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 10:55:50 +0000 (10:55 +0000)
commit74121ec40eb32367a458d7afdfd2eb09ec40c56c
treeba4e1fd55704b502e52a412766604403f2c6e118
parent271f54270e2023147052763334c51aedb6e3b145
.: [GTK] Enable touch features
https://bugs.webkit.org/show_bug.cgi?id=98931

Patch by Carlos Garnacho <carlosg@gnome.org> on 2014-02-09
Reviewed by Carlos Garcia Campos.

* Source/autotools/SetupWebKitFeatures.m4:
* Source/cmake/OptionsGTK.cmake: set ENABLE_TOUCH_EVENTS to 1 if building with GTK+.

Source/WebCore: [GTK] Add touch-events related code to build
https://bugs.webkit.org/show_bug.cgi?id=98931

Patch by Carlos Garnacho <carlosg@gnome.org> on 2014-02-09
Reviewed by Carlos Garcia Campos.

Tests in fast/events/touch have been enabled on GTK+ now that touch
support is implemented, and thus all expected bits are there.

* platform/gtk/GtkTouchContextHelper.cpp:
* platform/gtk/GtkTouchContextHelper.h: Add helper object to track all touchpoints, handy
when creating WebTouchEvents.
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* bindings/gobject/GNUmakefile.am: Add touch related code and idls to build, those are
necessary now that GTK+ implements touch events.

Source/WebKit/gtk: [GTK] Allow building with touch events enabled
https://bugs.webkit.org/show_bug.cgi?id=98931

Patch by Carlos Garnacho <carlosg@gnome.org> on 2014-02-09
Reviewed by Carlos Garcia Campos.

Even though WebKit1 GTK code doesn't implement touch events,
Fix build if ENABLE_TOUCH_EVENTS is present for WK2.

* WebCoreSupport/ChromeClientGtk.h:
(WebKit::ChromeClient::needTouchEvents): Add empty stub

Source/WebKit2: [GTK] Implement support touch events
https://bugs.webkit.org/show_bug.cgi?id=98931

Patch by Carlos Garnacho <carlosg@gnome.org> on 2014-02-09
Reviewed by Carlos Garcia Campos.

In GTK+ >= 3.4.0, GdkEventTouch is available to inform about multitouch events. Use these to implement
touch events on this platform. If a touch is left unhandled and is the "pointer emulating" one, mouse
events will be generated as a fallback.

* GNUmakefile.list.am:
* PlatformGTK.cmake:
* Shared/gtk/NativeWebTouchEventGtk.cpp:
* Shared/NativeWebTouchEvent.h:
(WebKit::NativeWebTouchEvent::nativeEvent):
(WebKit::NativeWebTouchEvent::touchContext): Add GTK+ implementation of NativeWebTouchEvent.
* Shared/gtk/WebEventFactory.cpp:
(WebKit::touchPhaseFromEvents):
(WebKit::WebEventFactory::createWebTouchEvent): Add methods to generate WebTouchEvents out
of GdkEventTouch events, a GtkTouchContextHelper object is used to hold information about all current
touches, in order to build information about all individual touchpoints.
* Shared/gtk/WebEventFactory.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent): Implement pointer emulation. If a touch event was unhandled
in DOM and pertains to the touch sequence that emulates pointer events. The event gets transformed to its
mouse event counterpart and handled by the widget again.
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Listen for touch events
(webkitWebViewBaseTouchEvent):
(webkit_web_view_base_class_init): Add implementation for the touch_events() handler, this merely
lets the pageProxy handle the NativeWebTouchEvent we create to wrap the GdkEvent received.

Tools: [GTK] Enable touch features
https://bugs.webkit.org/show_bug.cgi?id=98931

Patch by Carlos Garnacho <carlosg@gnome.org> on 2014-02-09
Reviewed by Carlos Garcia Campos.

* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::updateEventCoordinates):
(WTR::EventSenderProxy::createTouchEvent):
(WTR::EventSenderProxy::addTouchPoint):
(WTR::EventSenderProxy::updateTouchPoint):
(WTR::EventSenderProxy::sendUpdatedTouchEvents):
(WTR::EventSenderProxy::setTouchPointRadius):
(WTR::EventSenderProxy::setTouchModifier): Implement touch event proxying.

LayoutTests: [GTK] Enable touch features
https://bugs.webkit.org/show_bug.cgi?id=98931

Patch by Carlos Garnacho <carlosg@gnome.org> on 2014-02-09
Reviewed by Carlos Garcia Campos.

* platform/gtk/TestExpectations: remove fast/events/touch
* platform/gtk-wk2/TestExpectations: Add new expectations on
fast/events/touch events.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
31 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/platform/gtk-wk1/TestExpectations
LayoutTests/platform/gtk-wk2/TestExpectations
LayoutTests/platform/gtk/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/PlatformGTK.cmake
Source/WebCore/bindings/gobject/GNUmakefile.am
Source/WebCore/bindings/gobject/webkitdom.symbols
Source/WebCore/platform/gtk/GtkTouchContextHelper.cpp [new file with mode: 0644]
Source/WebCore/platform/gtk/GtkTouchContextHelper.h [new file with mode: 0644]
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
Source/WebKit2/ChangeLog
Source/WebKit2/GNUmakefile.list.am
Source/WebKit2/PlatformGTK.cmake
Source/WebKit2/Shared/NativeWebTouchEvent.h
Source/WebKit2/Shared/gtk/NativeWebTouchEventGtk.cpp [new file with mode: 0644]
Source/WebKit2/Shared/gtk/WebEventFactory.cpp
Source/WebKit2/Shared/gtk/WebEventFactory.h
Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp
Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
Source/autotools/SetupWebKitFeatures.m4
Source/cmake/OptionsGTK.cmake
Tools/ChangeLog
Tools/DumpRenderTree/gtk/EventSender.cpp
Tools/Scripts/webkitperl/FeatureList.pm
Tools/WebKitTestRunner/EventSenderProxy.h
Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp