Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDo not allow XR session on non user-activated events #24133
Conversation
highfive
commented
Sep 4, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Sep 4, 2019
|
Alright. Gonna use the compositor event approach instead. |
|
Done. |
|
@bors-servo r+ |
|
|
Do not allow XR session on non user-activated events @jdm can you look at this? This sets the thread in "user interaction mode" when the dispatched event is trusted. I also tried an approach where we would not rely on the dispatched event but just set "user interaction mode" when we get a compositor event (which, we can assume, are only user generated). That worked as well. r? @jdm <!-- 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/24133) <!-- Reviewable:end -->
|
|
|
|
@bors-servo try=wpt |
Do not allow XR session on non user-activated events @jdm can you look at this? This sets the thread in "user interaction mode" when the dispatched event is trusted. I also tried an approach where we would not rely on the dispatched event but just set "user interaction mode" when we get a compositor event (which, we can assume, are only user generated). That worked as well. r? @jdm <!-- 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/24133) <!-- Reviewable:end -->
|
Opened new PR for upstreamable changes. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#19018. |
|
|
|
@bors-servo try=wpt |
|
This looks like it needs to be restarted. |
|
@bors-servo retry |
Do not allow XR session on non user-activated events @jdm can you look at this? This sets the thread in "user interaction mode" when the dispatched event is trusted. I also tried an approach where we would not rely on the dispatched event but just set "user interaction mode" when we get a compositor event (which, we can assume, are only user generated). That worked as well. r? @jdm <!-- 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/24133) <!-- Reviewable:end -->
|
This needs a |
|
|
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#19051. |
1 similar comment
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#19051. |
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#19051. |
|
@bors-servo r=jdm |
|
|
Do not allow XR session on non user-activated events This sets the thread in "user interaction mode" when the dispatched event is trusted. I also tried an approach where we would not rely on the dispatched event but just set "user interaction mode" when we get a compositor event (which, we can assume, are only user generated). That worked as well. Fixes #23787. <!-- 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/24133) <!-- Reviewable:end -->
|
|
| .then((session) => { | ||
| let sessionPromise; | ||
| navigator.xr.test.simulateUserActivation(function() { | ||
| sessionPromise = navigator.xr.requestSession('inline'); |
This comment has been minimized.
This comment has been minimized.
Manishearth
Sep 24, 2019
Member
Note: this was a mistake, inline sessions with no tracking data (which must be explicitly requested via features) don't need activation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Manishearth
Sep 24, 2019
Member
In other words, we don't have enough of an implementation of the prerequisites to write the code for this. Paul's implementation is correct for the features we have right now, it's just the test change that isn't. Alex Cooper is already fixing the test so we're fine, I just wanted to note this.
paulrouget commentedSep 4, 2019
•
edited by jdm
This sets the thread in "user interaction mode" when the dispatched event is trusted. I also tried an approach where we would not rely on the dispatched event but just set "user interaction mode" when we get a compositor event (which, we can assume, are only user generated). That worked as well.
Fixes #23787.
This change is