Bug 77096 - Web Inspector: [Meta] Allow emulation of touch events
Summary: Web Inspector: [Meta] Allow emulation of touch events
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on: 77105
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-26 05:45 PST by Alexander Pavlov (apavlov)
Modified: 2012-02-06 08:57 PST (History)
14 users (show)

See Also:


Attachments
Patch (9.71 KB, patch)
2012-01-30 09:06 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Rebased (9.65 KB, patch)
2012-02-03 02:53 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (10.45 KB, patch)
2012-02-03 07:32 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Fixed for builds without ENABLE(TOUCH_EVENTS) (10.34 KB, patch)
2012-02-03 08:28 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Fixed unused param in conditional compilation (10.43 KB, patch)
2012-02-03 08:54 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Return error from agent method if touch events are not enabled in webkit (10.87 KB, patch)
2012-02-06 04:34 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (12.22 KB, patch)
2012-02-06 07:17 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Comments addressed (10.92 KB, patch)
2012-02-06 07:39 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Efl build fixed (10.92 KB, patch)
2012-02-06 07:47 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2012-01-26 05:45:03 PST
Web developers writing for mobile devices will want to debug touch events on their desktop hardware lacking touch screens. We need to enable the emulation of touch events using the similar, mouse-related ones (like, mousedown -> touchstart).
Comment 1 Alexander Pavlov (apavlov) 2012-01-30 09:06:34 PST
Created attachment 124562 [details]
Patch
Comment 2 Early Warning System Bot 2012-01-30 09:22:23 PST
Comment on attachment 124562 [details]
Patch

Attachment 124562 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11371212
Comment 3 WebKit Review Bot 2012-01-30 09:27:35 PST
Comment on attachment 124562 [details]
Patch

Attachment 124562 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11360958
Comment 4 Alexander Pavlov (apavlov) 2012-01-30 09:28:08 PST
Comment on attachment 124562 [details]
Patch

This is a provisional patch, pending the commit of a patch for the bug 77105.
Comment 5 Gyuyoung Kim 2012-01-30 09:29:12 PST
Comment on attachment 124562 [details]
Patch

Attachment 124562 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/11368589
Comment 6 Gustavo Noronha (kov) 2012-01-30 09:48:32 PST
Comment on attachment 124562 [details]
Patch

Attachment 124562 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/11367631
Comment 7 Alexander Pavlov (apavlov) 2012-02-03 02:53:39 PST
Created attachment 125299 [details]
[PATCH] Rebased
Comment 8 Pavel Feldman 2012-02-03 03:04:49 PST
Comment on attachment 125299 [details]
[PATCH] Rebased

View in context: https://bugs.webkit.org/attachment.cgi?id=125299&action=review

> Source/WebCore/inspector/Inspector.json:1517
> +                "description": "Toggles mouse event-based touch event emulation."

"hidden" :true

> Source/WebCore/inspector/InspectorDOMAgent.cpp:412
> +        documents.at(i)->settings()->setTouchEventEmulationEnabled(enabled);

What about the documents that are added / removed from the list dynamically? You should also adjust their settings.

> Source/WebCore/inspector/front-end/Settings.js:48
> +    emulateTouchEvents: false

I don't think you need this change.

> Source/WebCore/inspector/front-end/SettingsScreen.js:45
> +        p.appendChild(this._createCheckboxSetting(WebInspector.UIString("Emulate touch events"), WebInspector.settings.emulateTouchEvents));

This should not be under the showDockToRight.
Comment 9 Alexander Pavlov (apavlov) 2012-02-03 07:32:24 PST
Created attachment 125323 [details]
Patch
Comment 10 Gyuyoung Kim 2012-02-03 08:16:08 PST
Comment on attachment 125323 [details]
Patch

Attachment 125323 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/11416361
Comment 11 Alexander Pavlov (apavlov) 2012-02-03 08:28:18 PST
Created attachment 125335 [details]
[PATCH] Fixed for builds without ENABLE(TOUCH_EVENTS)
Comment 12 Alexander Pavlov (apavlov) 2012-02-03 08:54:24 PST
Created attachment 125344 [details]
[PATCH] Fixed unused param in conditional compilation
Comment 13 Alexander Pavlov (apavlov) 2012-02-06 04:34:10 PST
Created attachment 125615 [details]
[PATCH] Return error from agent method if touch events are not enabled in webkit
Comment 14 Pavel Feldman 2012-02-06 06:32:02 PST
Comment on attachment 125615 [details]
[PATCH] Return error from agent method if touch events are not enabled in webkit

View in context: https://bugs.webkit.org/attachment.cgi?id=125615&action=review

> Source/WebCore/inspector/InspectorDOMAgent.cpp:409
> +    m_document->settings()->setTouchEventEmulationEnabled(enabled);

You should do this via the page agent.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1069
> +    m_state->setBoolean(DOMAgentState::touchEventEmulationEnabled, enabled);

You should move this into the updateTouchEventEmulationInPage.

> Source/WebCore/inspector/front-end/SettingsScreen.js:42
> +    var p = this._appendSection(WebInspector.UIString("General"));

I think we should rename "Network" to "User Agent", move Disable cache into "General"
Comment 15 Pavel Feldman 2012-02-06 06:32:56 PST
Comment on attachment 125615 [details]
[PATCH] Return error from agent method if touch events are not enabled in webkit

View in context: https://bugs.webkit.org/attachment.cgi?id=125615&action=review

> Source/WebCore/page/EventHandler.cpp:1782
> +

I thought backend was ready for the emulation. Please fix this separately as a follow up to the backend change.
Comment 16 Alexander Pavlov (apavlov) 2012-02-06 07:17:11 PST
Created attachment 125639 [details]
Patch
Comment 17 Pavel Feldman 2012-02-06 07:21:48 PST
Comment on attachment 125639 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=125639&action=review

> Source/WebCore/inspector/InspectorDOMAgent.cpp:222
> +    m_state->setBoolean(DOMAgentState::touchEventEmulationEnabled, false);

You should hide this.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1068
> +    if (m_state->getBoolean(DOMAgentState::touchEventEmulationEnabled) == enabled)

You could put this above the ENABLE as an entry guard.

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1072
> +    *error = "Touch event emulation not enabled";

Touch events emulation not supported.

> Source/WebCore/inspector/front-end/SettingsScreen.js:43
> +    if (Preferences.showDockToRight && Preferences.exposeDisableCache) {

&& -> ||

> Source/WebCore/page/EventHandler.cpp:1783
> +#if ENABLE(TOUCH_EVENTS)

Should be in a separate change.
Comment 18 Alexander Pavlov (apavlov) 2012-02-06 07:39:05 PST
Created attachment 125643 [details]
[PATCH] Comments addressed
Comment 19 Gustavo Noronha (kov) 2012-02-06 07:42:06 PST
Comment on attachment 125643 [details]
[PATCH] Comments addressed

Attachment 125643 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/11429420
Comment 20 Gyuyoung Kim 2012-02-06 07:44:04 PST
Comment on attachment 125643 [details]
[PATCH] Comments addressed

Attachment 125643 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/11433334
Comment 21 Alexander Pavlov (apavlov) 2012-02-06 07:47:32 PST
Created attachment 125645 [details]
[PATCH] Efl build fixed
Comment 22 WebKit Review Bot 2012-02-06 08:57:30 PST
Comment on attachment 125645 [details]
[PATCH] Efl build fixed

Clearing flags on attachment: 125645

Committed r106811: <http://trac.webkit.org/changeset/106811>
Comment 23 WebKit Review Bot 2012-02-06 08:57:38 PST
All reviewed patches have been landed.  Closing bug.