Bug 84397 - Web Inspector: Enable touch events feature fails touch feature detection
: Web Inspector: Enable touch events feature fails touch feature detection
Status: RESOLVED FIXED
: WebKit
Web Inspector (Deprecated)
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-04-19 16:09 PST by
Modified: 2012-04-28 07:19 PST (History)


Attachments
Patch (6.03 KB, patch)
2012-04-28 06:23 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-04-19 16:09:45 PST
Handling both desktop and touch devices, js app code will often fork the libraries loaded in and behavior wired up depending on if touch events are detected.

The most common detect for this is: 'ontouchstart' in window

The Emulate Touch Events feature in the Inspector will create touch events, but any code relying on a feature detect will fork in the wrong path. 

Could the feature also expose touch events like the above in the DOM so the page can fork behavior correctly?
------- Comment #1 From 2012-04-28 06:23:24 PST -------
Created an attachment (id=139359) [details]
Patch
------- Comment #2 From 2012-04-28 07:13:31 PST -------
(From update of attachment 139359 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=139359&action=review

> Source/WebCore/inspector/front-end/DOMAgent.js:1185
> +        const functionText =

you should declare a function a call toString on it.
------- Comment #3 From 2012-04-28 07:19:52 PST -------
Committed r115569: <http://trac.webkit.org/changeset/115569>