Bug 37485

Summary: Make touch event support a RuntimeEnabledFeature
Product: WebKit Reporter: Garret Kelly <gdk>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dglazkov, fishd, gustavo, ossy, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on: 38135    
Bug Blocks: 37486    
Attachments:
Description Flags
Initial patch
eric: review+, eric: commit-queue-
Fix build issues in initial patch
none
Qt Fix
ossy: review-, abarth: commit-queue-
Remove platform entaglement none

Description Garret Kelly 2010-04-12 21:20:07 PDT
In anticipation of being able to disable and enable this feature under certain platforms at runtime.
Comment 1 Garret Kelly 2010-04-12 21:22:27 PDT
Created attachment 53220 [details]
Initial patch
Comment 2 WebKit Review Bot 2010-04-12 21:57:11 PDT
Attachment 53220 [details] did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/1669314
Comment 3 Darin Fisher (:fishd, Google) 2010-04-13 21:28:36 PDT
Comment on attachment 53220 [details]
Initial patch

Why is the default state enabled and not disabled?  It looks like the qt/gtk bots are not happy.
Comment 4 Garret Kelly 2010-04-14 07:08:02 PDT
The default state is enabled to keep the Chromium build bots happy (but will be changed to disabled in a future patch that adds the enable to DRT for Chromium). The feature's not even enabled on Gtk, but both bots are failing because their include paths don't have WebCore/bindings/generic in them.
Comment 5 Eric Seidel (no email) 2010-04-21 18:27:34 PDT
Comment on attachment 53220 [details]
Initial patch

OK.  Looks like this might break Qt/Gtk though so cq-
Comment 6 Garret Kelly 2010-04-22 07:41:10 PDT
Created attachment 54059 [details]
Fix build issues in initial patch
Comment 7 Garret Kelly 2010-04-22 10:59:35 PDT
Created attachment 54075 [details]
Qt Fix
Comment 8 Adam Barth 2010-04-22 12:25:02 PDT
Comment on attachment 54075 [details]
Qt Fix

Please make sure this works on Qt before landing.
Comment 9 Csaba Osztrogonác 2010-04-24 02:57:16 PDT
I tested the patch manually, but unfortunately I got a link-time error:

obj/debug/Document.o: In function `WebCore::RuntimeEnabledFeatures::touchEnabled()':
../WebCore/bindings/generic/RuntimeEnabledFeatures.h:98: undefined reference to `WebCore::RuntimeEnabledFeatures::isTouchEnabled'
collect2: ld returned 1 exit status
make[1]: *** [../lib/libQtWebKit.so.4.6.0] Error 1

The root of the problem is that the initialization of RuntimeEnabledFeatures::isTouchEnabled (static member) can be found in WebCore/bindings/generic/RuntimeEnabledFeatures.cpp, but this file isn't builded for Qt port.

Adding RuntimeEnabledFeatures.cpp wouldn't solve the problem, because of the following error:
../../../WebCore/bindings/generic/RuntimeEnabledFeatures.cpp: In static member function 'static bool WebCore::RuntimeEnabledFeatures::webSocketEnabled()':
../../../WebCore/bindings/generic/RuntimeEnabledFeatures.cpp:90: error: 'isAvailable' is not a member of 'WebCore::WebSocket'

WebSocket::isAvailable() is implemented in WebCore/websockets/WebSocket.cpp guarded by #if USE(V8).
Comment 10 Csaba Osztrogonác 2010-04-24 02:59:02 PDT
Comment on attachment 54075 [details]
Qt Fix

r- -ed because this patch would brake Qt build. See my comment #9.
Comment 11 Garret Kelly 2010-04-27 07:37:07 PDT
Created attachment 54416 [details]
Remove platform entaglement
Comment 12 WebKit Commit Bot 2010-04-27 18:09:49 PDT
Comment on attachment 54416 [details]
Remove platform entaglement

Clearing flags on attachment: 54416

Committed r58363: <http://trac.webkit.org/changeset/58363>
Comment 13 WebKit Commit Bot 2010-04-27 18:09:55 PDT
All reviewed patches have been landed.  Closing bug.