Bug 197269 - Web Inspector: user gesture toggle should also force user interaction flag
Summary: Web Inspector: user gesture toggle should also force user interaction flag
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: 194725
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-24 20:35 PDT by Devin Rousso
Modified: 2019-05-15 15:44 PDT (History)
9 users (show)

See Also:


Attachments
Patch (9.59 KB, patch)
2019-04-24 21:30 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-highsierra (3.07 MB, application/zip)
2019-04-24 22:36 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews117 for mac-highsierra (2.86 MB, application/zip)
2019-04-24 23:32 PDT, Build Bot
no flags Details
Patch (13.19 KB, patch)
2019-04-26 16:18 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (14.01 KB, patch)
2019-05-03 19:36 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews215 for win-future (13.54 MB, application/zip)
2019-05-03 21:41 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-04-24 20:35:59 PDT
This would allow `$0.click()` to show a keyboard for editable elements on iOS devices.
Comment 1 Devin Rousso 2019-04-24 21:30:25 PDT
Created attachment 368209 [details]
Patch
Comment 2 Build Bot 2019-04-24 21:34:16 PDT Comment hidden (obsolete)
Comment 3 Build Bot 2019-04-24 22:36:05 PDT Comment hidden (obsolete)
Comment 4 Build Bot 2019-04-24 22:36:06 PDT Comment hidden (obsolete)
Comment 5 Build Bot 2019-04-24 23:32:11 PDT Comment hidden (obsolete)
Comment 6 Build Bot 2019-04-24 23:32:13 PDT Comment hidden (obsolete)
Comment 7 Devin Rousso 2019-04-26 16:18:43 PDT
Created attachment 368362 [details]
Patch
Comment 8 Build Bot 2019-04-26 16:24:26 PDT Comment hidden (obsolete)
Comment 9 Joseph Pecoraro 2019-05-03 17:27:40 PDT
Comment on attachment 368362 [details]
Patch

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

> Source/WebCore/page/ChromeClient.h:507
> +    virtual void setUserIsInteracting(bool /* userIsInteracting */) { }

The comment doesn't seem useful over just a `(bool)`.

> LayoutTests/inspector/runtime/evaluate-userGestureEmulation-userIsInteracting-expected.txt:6
> +-- Running test case: EvaluateWithoutEmulatingUserGesture.userIsInteracting
> +User is interacting

Seems this line should be `User is not Interacting`. That is what this change is trying to address, right?

> LayoutTests/inspector/runtime/evaluate-userGestureEmulation-userIsInteracting.html:12
> +        TestPage.addResult(window.internals.userIsInteracting() ? "User is interacting" : "User is not Interacting");

Nit: Keep the case the same. Maybe:

    User is Interacting
    User is NOT Interacting
Comment 10 Joseph Pecoraro 2019-05-03 17:29:45 PDT
Comment on attachment 368362 [details]
Patch

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

> Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp:172
> +    bool userWasInteracting = pageChromeClient.userIsInteracting();
> +    if (!userWasInteracting)

Seems this condition should probably be:

    if (!userWasInteracting && emulateUserGesture)

Otherwise it will always setting interaction even if `emulateUserGesture` was not true.
Comment 11 Devin Rousso 2019-05-03 19:36:44 PDT
Created attachment 369037 [details]
Patch
Comment 12 Build Bot 2019-05-03 19:38:17 PDT Comment hidden (obsolete)
Comment 13 Build Bot 2019-05-03 21:41:01 PDT Comment hidden (obsolete)
Comment 14 Build Bot 2019-05-03 21:41:03 PDT Comment hidden (obsolete)
Comment 15 Joseph Pecoraro 2019-05-15 15:19:11 PDT
Comment on attachment 369037 [details]
Patch

r=me
Comment 16 WebKit Commit Bot 2019-05-15 15:42:11 PDT
Comment on attachment 369037 [details]
Patch

Clearing flags on attachment: 369037

Committed r245366: <https://trac.webkit.org/changeset/245366>
Comment 17 WebKit Commit Bot 2019-05-15 15:42:12 PDT
All reviewed patches have been landed.  Closing bug.
Comment 18 Radar WebKit Bug Importer 2019-05-15 15:44:16 PDT
<rdar://problem/50830155>