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

Always trigger an input sources change event on session creation #25773

Merged
merged 1 commit into from Feb 16, 2020

Conversation

@Manishearth
Copy link
Member

Manishearth commented Feb 15, 2020

Fixes our behavior to match the spec, and to specifically do it in a way
that makes sense. This is also what Chromium does currently, though I'm
not sure if it does the scheduling the same way.

The spec for this may change, see immersive-web/webxr#961.

This fix, along with #25770 , makes
three.js content work on servo. Instead of this fix we can also wait for
mrdoob/three.js#18638 to land (which isn't
certain until we figure out more about
immersive-web/webxr#961 )

Even if immersive-web/webxr#961 decides to
choose the option that obviates this patch, we should probably keep it
for now since there's already content out in the wild relying on this
behavior.

r? @jdm @asajeffrey

@highfive
Copy link

highfive commented Feb 15, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/xrsession.rs, components/script/dom/xr.rs, components/script/dom/xrinputsourcearray.rs
  • @KiChjang: components/script/dom/xrsession.rs, components/script/dom/xr.rs, components/script/dom/xrinputsourcearray.rs
@highfive
Copy link

highfive commented Feb 15, 2020

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@jdm
Copy link
Member

jdm commented Feb 15, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 15, 2020

📌 Commit 2adab24 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Feb 15, 2020

Testing commit 2adab24 with merge a8fad64...

bors-servo added a commit that referenced this pull request Feb 15, 2020
Always trigger an input sources change event on session creation

Fixes our behavior to match the spec, and to specifically do it in a way
that makes sense. This is also what Chromium does currently, though I'm
not sure if it does the scheduling the same way.

The spec for this may change, see immersive-web/webxr#961.

This fix, along with #25770 , makes
three.js content work on servo. Instead of this fix we can also wait for
mrdoob/three.js#18638 to land (which isn't
certain until we figure out more about
immersive-web/webxr#961 )

Even if immersive-web/webxr#961 decides to
choose the option that obviates this patch, we should probably keep it
for now since there's already content out in the wild relying on this
behavior.

r? @jdm @asajeffrey
@bors-servo
Copy link
Contributor

bors-servo commented Feb 15, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Feb 15, 2020

  ▶ Unexpected subtest result in /webxr/events_input_source_recreation.https.html:
  │ FAIL [expected PASS] Input sources are re-created when handedness or target ray mode changes
  │   → assert_equals: Added length matches expectations expected 1 but got 0
  │ 
  │ validateAdded/<@https://web-platform.test:8443/webxr/events_input_source_recreation.https.html:81:7
  │ Test.prototype.step@https://web-platform.test:8443/resources/testharness.js:2024:25
  │ validateAdded@https://web-platform.test:8443/webxr/events_input_source_recreation.https.html:79:7
  │ onInputSourcesChange/<@https://web-platform.test:8443/webxr/events_input_source_recreation.https.html:28:9
  │ Test.prototype.step@https://web-platform.test:8443/resources/testharness.js:2024:25
  └ onInputSourcesChange@https://web-platform.test:8443/webxr/events_input_source_recreation.https.html:22:7
@Manishearth
Copy link
Member Author

Manishearth commented Feb 15, 2020

Oh, probably because we needlessly fire an empty inputsourceschange event at the beginning of the session when there aren't any sources

@Manishearth Manishearth force-pushed the Manishearth:input-sources-change branch from 2adab24 to 09a23b0 Feb 15, 2020
@Manishearth
Copy link
Member Author

Manishearth commented Feb 15, 2020

Bingo. Just added an empty-vector early return.

@bors-servo r=jdm

@bors-servo
Copy link
Contributor

bors-servo commented Feb 15, 2020

📌 Commit 09a23b0 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Feb 15, 2020

Testing commit 09a23b0 with merge 075bdcd...

bors-servo added a commit that referenced this pull request Feb 15, 2020
Always trigger an input sources change event on session creation

Fixes our behavior to match the spec, and to specifically do it in a way
that makes sense. This is also what Chromium does currently, though I'm
not sure if it does the scheduling the same way.

The spec for this may change, see immersive-web/webxr#961.

This fix, along with #25770 , makes
three.js content work on servo. Instead of this fix we can also wait for
mrdoob/three.js#18638 to land (which isn't
certain until we figure out more about
immersive-web/webxr#961 )

Even if immersive-web/webxr#961 decides to
choose the option that obviates this patch, we should probably keep it
for now since there's already content out in the wild relying on this
behavior.

r? @jdm @asajeffrey
@bors-servo
Copy link
Contributor

bors-servo commented Feb 15, 2020

💔 Test failed - status-taskcluster

@Manishearth
Copy link
Member Author

Manishearth commented Feb 16, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 16, 2020

Testing commit 09a23b0 with merge ea7e753...

bors-servo added a commit that referenced this pull request Feb 16, 2020
Always trigger an input sources change event on session creation

Fixes our behavior to match the spec, and to specifically do it in a way
that makes sense. This is also what Chromium does currently, though I'm
not sure if it does the scheduling the same way.

The spec for this may change, see immersive-web/webxr#961.

This fix, along with #25770 , makes
three.js content work on servo. Instead of this fix we can also wait for
mrdoob/three.js#18638 to land (which isn't
certain until we figure out more about
immersive-web/webxr#961 )

Even if immersive-web/webxr#961 decides to
choose the option that obviates this patch, we should probably keep it
for now since there's already content out in the wild relying on this
behavior.

r? @jdm @asajeffrey
@bors-servo
Copy link
Contributor

bors-servo commented Feb 16, 2020

☀️ Test successful - status-taskcluster
Approved by: jdm
Pushing ea7e753 to master...

@bors-servo bors-servo merged commit 09a23b0 into servo:master Feb 16, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@Manishearth Manishearth deleted the Manishearth:input-sources-change branch Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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