WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 200275
Web Inspector: Debugger: allow breakpoint actions to be evaluated as a user gesture
https://bugs.webkit.org/show_bug.cgi?id=200275
Summary
Web Inspector: Debugger: allow breakpoint actions to be evaluated as a user g...
Devin Rousso
Reported
2019-07-30 11:32:13 PDT
This could be useful for developers trying to "hot patch" their code with some extra functionality.
Attachments
Patch
(39.76 KB, patch)
2021-01-08 18:54 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
[Image] after Patch is applied
(870.44 KB, image/png)
2021-01-08 18:55 PST
,
Devin Rousso
no flags
Details
Patch
(42.86 KB, patch)
2021-01-11 10:35 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2021-01-08 18:54:54 PST
Created
attachment 417326
[details]
Patch
Devin Rousso
Comment 2
2021-01-08 18:55:09 PST
Created
attachment 417327
[details]
[Image] after Patch is applied
EWS Watchlist
Comment 3
2021-01-08 18:55:48 PST
This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
Blaze Burg
Comment 4
2021-01-11 10:11:14 PST
Comment on
attachment 417326
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=417326&action=review
r=me, nice work!
> LayoutTests/inspector/debugger/breakpoint-action-emulateUserGesture.html:14 > + TestPage.addResult(window.internals.isProcessingUserGesture() ? "In User Gesture" : "Not in User Gesture");
What's the difference between .isProcessingUserGresture() here and .userIsInteracting() above?
> Source/JavaScriptCore/debugger/Debugger.cpp:618 > + JSObject* scopeExtensionObject = m_client ? m_client->debuggerScopeExtensionObject(*this, globalObject, debuggerCallFrame) : nullptr;
Nice.
> Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp:126 > + m_breakpointActionUserGestureEmulationScopeStack.append(makeUniqueRef<UserGestureEmulationScope>(m_inspectedPage, true));
What a mouthful. I like the stack idea though.
> Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js:139 > + emulateUserGestureLabel.appendChild(document.createTextNode(WI.UIString("Emulate User Gesture")));
Please add a location to the UIString (@ Evaluate JavaScript breakpoint action menu in Sources tab)
> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:84 > + this._emulateUserGestureNavigationItem = new WI.CheckboxNavigationItem("emulate-in-user-gesture", WI.UIString("Emulate User Gesture"), WI.settings.emulateInUserGesture.value);
Please add a location to the UIString (@ Option in Console Tab)
Blaze Burg
Comment 5
2021-01-11 10:11:51 PST
Please (create a task to) add this to the documentation as well. =)
Joseph Pecoraro
Comment 6
2021-01-11 10:14:12 PST
Comment on
attachment 417326
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=417326&action=review
>> Source/JavaScriptCore/debugger/Debugger.cpp:618 >> + JSObject* scopeExtensionObject = m_client ? m_client->debuggerScopeExtensionObject(*this, globalObject, debuggerCallFrame) : nullptr; > > Nice.
+1
Devin Rousso
Comment 7
2021-01-11 10:24:17 PST
Comment on
attachment 417326
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=417326&action=review
>> LayoutTests/inspector/debugger/breakpoint-action-emulateUserGesture.html:14 >> + TestPage.addResult(window.internals.isProcessingUserGesture() ? "In User Gesture" : "Not in User Gesture"); > > What's the difference between .isProcessingUserGresture() here and .userIsInteracting() above?
`isProcessingUserGesture` is a WebCore concept whereas `userIsInteracting` is a WebKit (WebProcess) concept. I believe the latter is necessary (in addition to the former) for more "native" interactions like showing the iOS keyboard when evaluating `input.click()` (see
Bug 197269
).
>> Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js:139 >> + emulateUserGestureLabel.appendChild(document.createTextNode(WI.UIString("Emulate User Gesture"))); > > Please add a location to the UIString (@ Evaluate JavaScript breakpoint action menu in Sources tab)
👍
>> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:84 >> + this._emulateUserGestureNavigationItem = new WI.CheckboxNavigationItem("emulate-in-user-gesture", WI.UIString("Emulate User Gesture"), WI.settings.emulateInUserGesture.value); > > Please add a location to the UIString (@ Option in Console Tab)
👍
Devin Rousso
Comment 8
2021-01-11 10:35:06 PST
Created
attachment 417391
[details]
Patch
EWS
Comment 9
2021-01-11 12:13:35 PST
Committed
r271373
: <
https://trac.webkit.org/changeset/271373
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 417391
[details]
.
Radar WebKit Bug Importer
Comment 10
2021-01-11 12:14:15 PST
<
rdar://problem/73008562
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug