Commit graph

8329 commits

Author SHA1 Message Date
pylbrecht
4fd9fea7a6 fixup! Measure layout queries blocked by ongoing layout 2019-04-17 17:23:17 +02:00
Fernando Jiménez Moreno
292d1705a3 Keep a map between channel position and channel index for decoded audio 2019-04-17 12:38:21 +02:00
bors-servo
5efd57b7bd
Auto merge of #23216 - ferjm:replay, r=ceyusa
Allow replaying media

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] There are tests for these changes

<!-- 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/23216)
<!-- Reviewable:end -->
2019-04-17 06:18:14 -04:00
Fernando Jiménez Moreno
501e6c1aed Allow replaying media 2019-04-17 12:11:14 +02:00
bors-servo
a14b952fa3
Auto merge of #23187 - krk:nopanic-unminifyjs, r=jdm
Do not unwrap empty unminified_js_dir in HTMLScriptElement.unminify_js.

Calling unwrap caused a panic when a directory could not be created.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #23031

<!-- 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/23187)
<!-- Reviewable:end -->
2019-04-16 11:18:09 -04:00
Josh Matthews
73cb8b9ea6
Clarify warning. 2019-04-16 11:17:53 -04:00
bors-servo
456ea6a388
Auto merge of #23153 - 5h1rU:xmlserializer-serializetostring-panics, r=jdm
Make serializeToString serialize document nodes correctly

<!-- Please describe your changes on the following line: -->
This is the fix for ScriptThread panic when `new XMLSerializer().serializeToString(document);` is called.

r?@jdm

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23130

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/23153)
<!-- Reviewable:end -->
2019-04-15 23:30:56 -04:00
Felipe Janer
1ffe8f059a Add new XMLSerializer().serializeToString functionality 2019-04-15 21:12:47 -05:00
bors-servo
0ba7da4431
Auto merge of #23169 - Manishearth:more-pose, r=jdm
Some more pose fixes

Based on https://github.com/servo/servo/pull/23164

This:

 - Adds support for position-disabled
 - Adds approximate support for floor-level
 - Makes transform.inverse.inverse return the original transform
(https://github.com/immersive-web/webxr/issues/576)

To support floor-level *properly* we have to decompose the `sitting_to_standing_transform` matrix. I'll have to add decomposition to euclid to do this, sadly.

It may be possible to reuse the decomposition code in servo's style crate, but there's a chance that that's written with column vector style, given that it reflects the CSS transforms spec, which is also written in column vector style. Ugh.

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/23169)
<!-- Reviewable:end -->
2019-04-15 18:46:12 -04:00
Josh Matthews
eebd831ea5 Move media backend initialization to process startup. 2019-04-15 16:46:25 -04:00
bors-servo
17204544d9
Auto merge of #23157 - ferjm:gum.playback, r=Manishearth
MediaStream playback through audio and video elements

- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] There are tests for these changes

<!-- 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/23157)
<!-- Reviewable:end -->
2019-04-13 20:28:17 -04:00
Philipp Albrecht
858011c513 Measure layout queries blocked by ongoing layout 2019-04-13 07:42:07 +02:00
bors-servo
9832feddf3
Auto merge of #23192 - jackxbritton:issue-23134, r=jdm
Implement DocumentFragment XML serialization.

When serializing a DocumentFragment node, we should follow [this guy](https://w3c.github.io/DOM-Parsing/#dfn-xml-serializing-a-documentfragment-node) and serialize the node's immediate children. This commit makes that change.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [X] These changes fix #23134 (GitHub issue number if applicable)

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___ well, they probably do, but I don't know how to do that and could use some help.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/23192)
<!-- Reviewable:end -->
2019-04-12 14:37:45 -04:00
Anthony Ramine
44163148c2 Make use of RefCell::try_borrow_unguarded 2019-04-12 19:02:07 +02:00
Jack Britton
1dd1cb4f4f Implement DocumentFragment XML serialization. 2019-04-12 12:49:18 -04:00
Emilio Cobos Álvarez
49842f5031 style: Fix servo build, and appease tidy / fmt. 2019-04-12 12:20:15 +02:00
bors-servo
db9300d3e6
Auto merge of #23183 - krk:fix-23144, r=asajeffrey
Replace panic with warn in DocumentLoader.finish_load.

Fix panic on broken script URL with an onerror handler that rewrites the document.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #23144

<!-- 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/23183)
<!-- Reviewable:end -->
2019-04-11 14:33:44 -04:00
Fernando Jiménez Moreno
0eb2c1d02e Do not tie media element 'muted' state change to player availability 2019-04-11 09:02:49 +02:00
krk
458795d485 Do not unwrap empty unminified_js_dir in HTMLScriptElement.unminify_js. 2019-04-10 22:10:59 +02:00
Lucas Fantacuci
6b2be9b31d Implementing the builder pattern for RequestInit 2019-04-10 14:01:30 -03:00
Fernando Jiménez Moreno
af242a0571 MediaStream playback through audio and video elements 2019-04-10 17:55:46 +02:00
krk
211fb00574 Replace panic with warn in DocumentLoader.finish_load.
Fix panic on broken script URL with an onerror handler that rewrites the
document.
2019-04-09 21:05:38 +02:00
Manish Goregaokar
ea3609b42e Add some math verifying relationship between get_viewer_pose and get_pose 2019-04-08 17:31:07 -07:00
Manish Goregaokar
91378cc859 Add rough support for floor-level space 2019-04-08 17:31:07 -07:00
bors-servo
be1e0690eb
Auto merge of #23158 - BartGitHub:promise-constructor, r=jdm
Promise constructor

In this PR, measures are taken that prevent the ```Promise::new``` constructor from being used outside a compartment.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22982 (GitHub issue number if applicable)

<!-- Either: -->
- [x] These changes do not require tests because no new functionality is added.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/23158)
<!-- Reviewable:end -->
2019-04-06 03:33:08 -04:00
Manish Goregaokar
e5b802ecce Support position-disabled spaces 2019-04-05 20:18:35 -07:00
Manish Goregaokar
cdbc08b911 Set transform.inverse.inverse == transform
https://github.com/immersive-web/webxr/issues/576
2019-04-05 20:18:35 -07:00
bors-servo
967efc7fbc
Auto merge of #23164 - Manishearth:getpose, r=asajeffrey
Add XRFrame.getPose()

I think I've figured out the model of poses, waiting on Nell for confirmation.

Basically, `getViewerPose(p)` is equivalent to `getPose(source=viewerSpace, relative_to=p)`

The eye-level space, for example, is stationary and stuck to the origin. The position-disabled and identity spaces somewhat counterintuitively follow you around (and appear to be stationary from `getViewerPose()` but not `getPose()`.

The incorrect mental model kinda "works" when looking at only `getViewerPose()`, but we need to figure it out for `getPose()`.

Todo (may add to this PR, but probably not)

 - implement `XRSession.viewerSpace`
 - implement position-disabled
 - implement floor-level (hard to test without a 6dof device)

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/23164)
<!-- Reviewable:end -->
2019-04-05 21:00:47 -04:00
bors-servo
e7b65c42c4
Auto merge of #23143 - CYBAI:remove-compound-microtasks, r=jdm
Remove compound microtasks

We handled compound microtasks as microtasks so, basically, we only need
to remove the naming of `compound`.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23140
- [x] These changes do not require tests because the updated spec is more about editorial.

<!-- 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/23143)
<!-- Reviewable:end -->
2019-04-05 10:51:09 -04:00
Manish Goregaokar
813613628d Add XRSession.viewerSpace 2019-04-04 17:45:09 -07:00
Manish Goregaokar
7e4b6512a7 Add XRFrame.getPose() 2019-04-04 17:22:08 -07:00
Manish Goregaokar
3d790278f1 Validate spaces passed to getViewerPose() 2019-04-04 17:22:08 -07:00
Manish Goregaokar
e33896f3ec Add proper get_pose for XRSpaces 2019-04-04 16:06:23 -07:00
bors-servo
f142b1d1c7
Auto merge of #23145 - pylbrecht:performance.resource.timing, r=jdm
Add connectEnd attribute to PerformanceResourceTiming interface

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] These changes fix #21262

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/23145)
<!-- Reviewable:end -->
2019-04-04 18:39:35 -04:00
Manish Goregaokar
d2e2b8da4d Rename incorrectly-named get_pose methods 2019-04-04 14:50:23 -07:00
Manish Goregaokar
e055884564 Remove viewMatrix
Users are supposed to use `view.transform.inverse.matrix`

The view matrix was incorrect anyway, we had forgotten to invert it, but that was okay since we transposed it by accident (due to euclid's use of the row-vector convention), and for 3DOF devices these transforms are mostly rotations so  transposing instead of inverting doesn't lead to visible effects.
2019-04-03 23:55:33 -07:00
Manish Goregaokar
e73920ee97 Add XRRigidTransform.matrix 2019-04-03 23:55:33 -07:00
Manish Goregaokar
646647e8d9 Add XRView.transform 2019-04-03 23:55:33 -07:00
Manish Goregaokar
eb837d1ed7 XRRigidTransform.inverse is now a lazy attribute 2019-04-03 23:55:33 -07:00
Manish Goregaokar
fcec93ae16 Consistently use GlobalScope in XR code 2019-04-03 23:55:33 -07:00
Manish Goregaokar
f7745edcbb Make XRViewerPose inherit from XRPose 2019-04-03 23:55:33 -07:00
Manish Goregaokar
f9c25c612a Add XRPose.transform 2019-04-03 23:55:33 -07:00
Manish Goregaokar
e1f0ad7b7c Add empty XRPose interface 2019-04-03 23:55:33 -07:00
Manish Goregaokar
08079c4d28 Switch XRSpace code to using rigid transforms 2019-04-03 23:55:33 -07:00
Manish Goregaokar
1f3f37225f Validate the position passed to XRRigidTransform
Added in https://github.com/immersive-web/webxr/pull/568
2019-04-03 23:55:33 -07:00
Manish Goregaokar
e296185c53 Make XRRigidTransform.position/orientation lazy, default to using euclid things 2019-04-03 23:55:33 -07:00
Manish Goregaokar
feb3517ad5 Move XRRigidTransform to using RigidTransform3D 2019-04-03 23:55:33 -07:00
Manish Goregaokar
67694dc90d Bump euclid to 0.19.7 2019-04-03 23:55:33 -07:00
pylbrecht
f478357567 Add connectEnd attribute to PerformanceResourceTiming interface 2019-04-04 07:19:25 +02:00
Aron Zwaan
60ba3d2573 Fix formatting issues 2019-04-03 20:45:30 +02:00