Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for user activation in WebXR #23787

Closed
Manishearth opened this issue Jul 17, 2019 · 5 comments
Closed

Check for user activation in WebXR #23787

Manishearth opened this issue Jul 17, 2019 · 5 comments

Comments

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Jul 17, 2019

requestSession() is not supposed to work in immersive mode if it isn't triggered by user activation. We should also update simulateUserActivation() from #23786 when implementing this.

bors-servo added a commit that referenced this issue Jul 17, 2019
Enable XR WPT tests

This enables the tests. Most still fail, I plan to go through the
failures more soon.

xrFrame_getPose's failure seems to indicate we have broken matrix math.
I'm not sure what, the bug seems to not come from a simple matrix
inversion/ordering mishap.

This does add empty stubs for session ending since the test infra relies on these existing for almost every test (#23788). We will need to add support for this from the webxr repo side. We also need to add support for user activation (#23787).

r? @asajeffrey

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23786)
<!-- Reviewable:end -->
@jdm jdm added the A-xr-zomg label Jul 23, 2019
@jdm
Copy link
Member

@jdm jdm commented Aug 28, 2019

@paulrouget This is another platform piece we're missing if you're interested. We need to track when we're firing input events that originated from the user so that code like requestSession can check if it's safe to enter.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Aug 28, 2019

is there a DOM specification about that? I remember vaguely something about user clicks vs. js clicks.

@jdm jdm added this to To do in HoloLens Aug 29, 2019
@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Sep 3, 2019

Properly classifying events as trusted doesn't look difficult. Not sure where to store this property to make it accessible from any DOM call though.

Is it possible to "tag" a js call?

Gecko appears to use a static (sUserInputEventDepth) to track if a js call runs as the consequence of an user input.

@jdm
Copy link
Member

@jdm jdm commented Sep 3, 2019

Making it a property of ScriptThread and adding a static method might makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
HoloLens
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.