Bug 225876 - UserGestureToken::processingUserGestureForMedia is use for non-media things
Summary: UserGestureToken::processingUserGestureForMedia is use for non-media things
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-17 09:27 PDT by Sam Weinig
Modified: 2021-05-24 09:28 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2021-05-17 09:27:37 PDT
The function UserGestureToken::processingUserGestureForMedia is use for non-media things such as the WebAuthenticatorCoordinator.

It really should be renamed to indicate what it does, since the current name is quite unclear.
Comment 1 Sam Weinig 2021-05-17 09:31:05 PDT
(or rather, we should either rename it or stop using it for non-media related things).
Comment 2 Sam Weinig 2021-05-17 09:33:31 PDT
It looks like the differences between processingUserGesture() and processingUserGestureForMedia() are:

- processingUserGestureForMedia() works for any scope type, processingUserGesture() only works for All (not MediaOnly)
- processingUserGestureForMedia() works for state == ProcessingUserGesture or m_state == ProcessingPotentialUserGesture, processingUserGesture() only works for state == ProcessingUserGesture.
Comment 3 Sam Weinig 2021-05-17 09:38:34 PDT
It took a while to find, but ProcessingPotentialUserGesture is set when a touch event is a potential tap and we are in TouchStart.

GestureScope::MediaOnly is used when propagating a user gesture on from a fetch or XHR.
Comment 4 Radar WebKit Bug Importer 2021-05-24 09:28:15 PDT
<rdar://problem/78403759>