When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.
Created attachment 375167 [details] Patch
This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
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 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!
Created attachment 375287 [details] Patch
Comment on attachment 375287 [details] Patch Clearing flags on attachment: 375287 Committed r248097: <https://trac.webkit.org/changeset/248097>
All reviewed patches have been landed. Closing bug.
<rdar://problem/53797509>
Reopening to attach new patch.
Created attachment 379970 [details] Patch
Comment on attachment 379970 [details] Patch rs=me, nice catch!
Comment on attachment 379970 [details] Patch Clearing flags on attachment: 379970 Committed r250605: <https://trac.webkit.org/changeset/250605>