Bug 200272 - Web Inspector: Debugger: support emulateUserGesture parameter in Debugger.evaluateOnCallFrame
Summary: Web Inspector: Debugger: support emulateUserGesture parameter in Debugger.eva...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-30 10:33 PDT by Devin Rousso
Modified: 2019-10-02 08:33 PDT (History)
12 users (show)

See Also:


Attachments
Patch (23.96 KB, patch)
2019-07-30 12:07 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (39.52 KB, patch)
2019-07-31 20:39 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.02 KB, patch)
2019-10-01 17:00 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-07-30 10:33:20 PDT
When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.
Comment 1 Devin Rousso 2019-07-30 12:07:24 PDT
Created attachment 375167 [details]
Patch
Comment 2 EWS Watchlist 2019-07-30 12:08:28 PDT Comment hidden (obsolete)
Comment 3 Joseph Pecoraro 2019-07-31 15:57:25 PDT
Comment on attachment 375167 [details]
Patch

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

r=me

> Source/JavaScriptCore/inspector/protocol/Debugger.json:283
> -                { "name": "saveResult", "type": "boolean", "optional": true, "description": "Whether the resulting value should be considered for saving in the $n history." }
> +                { "name": "saveResult", "type": "boolean", "optional": true, "description": "Whether the resulting value should be considered for saving in the $n history." },
> +                { "name": "emulateUserGesture", "type": "boolean", "optional": true, "description": "Whether the expression should be considered to be in a user gesture or not." }

We should probably also make this change to:
Source/WebInspectorUI/Versions/Inspector-iOS-13.0.json

> Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js:136
> +            // COMPATIBILITY (iOS 13): "emulateUserGesture" did not exist.

I thought we normally say "Before iOS 13 ... did not exist".

> LayoutTests/ChangeLog:11
> +        * inspector/debugger/evaluateOnCallFrame-emulateUserGesture.html: Added.
> +        * inspector/debugger/evaluateOnCallFrame-emulateUserGesture-expected.txt: Added.
> +        * inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting.html: Added.
> +        * inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting-expected.txt: Added.

The other tests are named "userGestureEmulation".  I like this name though. Maybe we should rename the others.

> LayoutTests/inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting.html:75
> +    <p>Tests for Debugger.evaluateOnCallFrame emulateUserGesture option.</p>

Style: We normally drop this leading whitespace.

> LayoutTests/inspector/debugger/evaluateOnCallFrame-emulateUserGesture.html:75
> +    <p>Tests for Debugger.evaluateOnCallFrame emulateUserGesture option.</p>

Ditto.
Comment 4 Devin Rousso 2019-07-31 20:39:07 PDT
Comment on attachment 375167 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js:136
>> +            // COMPATIBILITY (iOS 13): "emulateUserGesture" did not exist.
> 
> I thought we normally say "Before iOS 13 ... did not exist".

I was matching the same text as the existing comment above.  I only see examples of "Before ..." in two places.

>> LayoutTests/ChangeLog:11
>> +        * inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting-expected.txt: Added.
> 
> The other tests are named "userGestureEmulation".  I like this name though. Maybe we should rename the others.

I like it!
Comment 5 Devin Rousso 2019-07-31 20:39:40 PDT
Created attachment 375287 [details]
Patch
Comment 6 WebKit Commit Bot 2019-07-31 22:19:34 PDT
Comment on attachment 375287 [details]
Patch

Clearing flags on attachment: 375287

Committed r248097: <https://trac.webkit.org/changeset/248097>
Comment 7 WebKit Commit Bot 2019-07-31 22:19:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-07-31 22:22:59 PDT
<rdar://problem/53797509>
Comment 9 Yury Semikhatsky 2019-10-01 17:00:46 PDT
Reopening to attach new patch.
Comment 10 Yury Semikhatsky 2019-10-01 17:00:47 PDT
Created attachment 379970 [details]
Patch
Comment 11 Devin Rousso 2019-10-02 08:16:15 PDT
Comment on attachment 379970 [details]
Patch

rs=me, nice catch!
Comment 12 WebKit Commit Bot 2019-10-02 08:33:54 PDT
Comment on attachment 379970 [details]
Patch

Clearing flags on attachment: 379970

Committed r250605: <https://trac.webkit.org/changeset/250605>
Comment 13 WebKit Commit Bot 2019-10-02 08:33:56 PDT
All reviewed patches have been landed.  Closing bug.