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 · Fixed by #24133
Closed

Check for user activation in WebXR #23787

Manishearth opened this issue Jul 17, 2019 · 5 comments · Fixed by #24133
Labels
A-xr-spec-complete Things necessary to support the full WebXR spec A-xr-zomg AR/VR/MR
Projects

Comments

@Manishearth
Copy link
Member

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 pushed 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 AR/VR/MR label Jul 23, 2019
@jdm
Copy link
Member

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

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

@paulrouget
Copy link
Contributor

https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted

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

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 commented Sep 3, 2019

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

@Manishearth Manishearth added the A-xr-spec-complete Things necessary to support the full WebXR spec label Sep 11, 2019
@jdm jdm moved this from To do to Done in HoloLens Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-xr-spec-complete Things necessary to support the full WebXR spec A-xr-zomg AR/VR/MR
Projects
No open projects
HoloLens
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants