Bug 211516 - [WebXR] Implement simulateUserActivation()
Summary: [WebXR] Implement simulateUserActivation()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
URL:
Keywords: InRadar
Depends on:
Blocks: 211130
  Show dependency treegraph
 
Reported: 2020-05-06 08:46 PDT by Sergio Villar Senin
Modified: 2020-05-07 12:20 PDT (History)
6 users (show)

See Also:


Attachments
Patch (5.06 KB, patch)
2020-05-06 08:55 PDT, Sergio Villar Senin
youennf: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2020-05-06 08:46:50 PDT
[WebXR] Implement simulateUserActivation()
Comment 1 Sergio Villar Senin 2020-05-06 08:55:17 PDT
Created attachment 398622 [details]
Patch
Comment 2 youenn fablet 2020-05-06 09:15:43 PDT
Comment on attachment 398622 [details]
Patch

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

> Source/WebCore/testing/WebXRTest.cpp:105
> +    function.handleEvent();

it might be better to follow Internals::withUserGesture.
Something like:
UserGestureIndicator gestureIndicator(ProcessingUserGesture, document);
function.handleEvent();
Comment 3 Sergio Villar Senin 2020-05-06 09:23:19 PDT
(In reply to youenn fablet from comment #2)
> Comment on attachment 398622 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=398622&action=review
> 
> > Source/WebCore/testing/WebXRTest.cpp:105
> > +    function.handleEvent();
> 
> it might be better to follow Internals::withUserGesture.
> Something like:
> UserGestureIndicator gestureIndicator(ProcessingUserGesture, document);
> function.handleEvent();


Much better indeed. I'll replace it before landing.
Comment 4 Sergio Villar Senin 2020-05-07 00:49:11 PDT
Committed r261273: <https://trac.webkit.org/changeset/261273>
Comment 5 Radar WebKit Bug Importer 2020-05-07 00:50:13 PDT
<rdar://problem/62965108>
Comment 6 Darin Adler 2020-05-07 12:20:52 PDT
Comment on attachment 398622 [details]
Patch

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

> Source/WebCore/testing/XRSimulateUserActivationFunction.h:42
> +    virtual CallbackResult<void> handleEvent(void) = 0;

This (void) syntax is never needed in C++. It is sometimes needed in old C code. Just use "()".