Bug 211516

Summary: [WebXR] Implement simulateUserActivation()
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: New BugsAssignee: Sergio Villar Senin <svillar>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, dino, svillar, webkit-bug-importer, youennf, zan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 211130    
Attachments:
Description Flags
Patch youennf: review+

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 "()".