[webkit-reviews] review granted: [Bug 200262] Web Inspector: support emulateUserGesture parameter in Runtime.callFunctionOn : [Attachment 381962] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 25 14:33:50 PDT 2019


Devin Rousso <drousso at apple.com> has granted Yury Semikhatsky
<yurys at chromium.org>'s request for review:
Bug 200262: Web Inspector: support emulateUserGesture parameter in
Runtime.callFunctionOn
https://bugs.webkit.org/show_bug.cgi?id=200262

Attachment 381962: Patch

https://bugs.webkit.org/attachment.cgi?id=381962&action=review




--- Comment #19 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 381962
  --> https://bugs.webkit.org/attachment.cgi?id=381962
Patch

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

r=me

> Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp:65
> +class UserGestureEmulationScope {

Aside: it'd be cool to share this with `PageDebuggerAgent::evaluateOnCallFrame`
as well, but it's fine as is :P

> Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp:68
> +    UserGestureEmulationScope(Page& inspectedPage, const bool*
emulateUserGesture)

I really would prefer this be passed in as an actual `bool`, not `const bool*`
as that's really just how we choose to represent an "optional boolean" for the
Web Inspector protocol.  I understand that it means that the callsites now have
to handle this conversion, but I think that's fine (especially since there are
only two).


More information about the webkit-reviews mailing list