Commit graph

36562 commits

Author SHA1 Message Date
Manish Goregaokar
d2e2b8da4d Rename incorrectly-named get_pose methods 2019-04-04 14:50:23 -07:00
bors-servo
f1b82f8573
Auto merge of #23159 - Manishearth:rigid-transforms, r=asajeffrey
Update XR code to use rigid transforms and new pose/transform stuff from the spec

This updates our XR code to use euclid's new [RigidTransform3D type](https://github.com/servo/euclid/pull/328), which is more efficent and convenient to work with.

It additionally brings us up to speed with the spec:

 - `XRViewerPose` was made a subclass of `XRPose` (https://github.com/immersive-web/webxr/pull/496)
 - `XRView.viewMatrix` was removed in favor of `XRRigidTransform.inverse.matrix` (https://github.com/immersive-web/webxr/pull/531)
 - `XRRigidTransform.inverse` is an attribute (https://github.com/immersive-web/webxr/pull/560)
 - `XRRigidTransform` now validates positions in its constructor (https://github.com/immersive-web/webxr/pull/568)

Furthermore, it adds support for `XRRigidTransform.matrix`.

While fixing this I also noticed that our view matrix code was incorrect, we calculated view matrices as `pose.to_column_major_array()`, whereas it *should* be `pose.inverse().to_row_major_array()` (since Euclid uses row vectors, whenever the spec says it wants a column major array we should use `.to_row_major_array()` since all web specs implicitly use column vectors). For 3DOF devices poses are mostly rotations anyway, so the effective transpose behaved _like_ an inversion, but was incorrect.

This PR gets rid of `view.viewMatrix` anyway, however I felt like I should mention this discrepancy, since otherwise the replacement of `view.viewMatrix` with `view.transform.inverse.matrix` doesn't make sense

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/23159)
<!-- Reviewable:end -->
2019-04-04 11:36:56 -04:00
bors-servo
3e86aec26e
Auto merge of #23160 - servo-wpt-sync:wpt_update_03-04-2019, r=jdm
Sync WPT with upstream (03-04-2019)

Automated downstream sync of changes from upstream as of 03-04-2019.
[no-wpt-sync]

<!-- 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/23160)
<!-- Reviewable:end -->
2019-04-04 08:08:36 -04: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
WPT Sync Bot
bde105ca2e Update web-platform-tests to revision b8669365b81965f5400d6b13a7783415b44e679d 2019-04-03 23:56:16 -04:00
bors-servo
6fa1853bb1
Auto merge of #23156 - servo-wpt-sync:wpt_update_03-04-2019, r=jdm
Sync WPT with upstream (03-04-2019)

Automated downstream sync of changes from upstream as of 03-04-2019.
[no-wpt-sync]

<!-- 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/23156)
<!-- Reviewable:end -->
2019-04-03 07:17:10 -04:00
Josh Matthews
01b82f5e68
remove intermittent failure. 2019-04-03 07:16:29 -04:00
bors-servo
b9b729caa0
Auto merge of #23103 - ferjm:srcObject, r=Manishearth
Implement srcObject logic for Blob media providers

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] 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/23103)
<!-- Reviewable:end -->
2019-04-03 05:05:32 -04:00
WPT Sync Bot
52045cb370 Update web-platform-tests to revision 0a28ecf697d96db228f8382db0e41f1c54314dad 2019-04-03 00:53:26 -04:00
bors-servo
1ff56aa84f
Auto merge of #23155 - servo-wpt-sync:wpt_update_02-04-2019, r=jdm
Sync WPT with upstream (02-04-2019)

Automated downstream sync of changes from upstream as of 02-04-2019.
[no-wpt-sync]

<!-- 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/23155)
<!-- Reviewable:end -->
2019-04-02 12:03:01 -04:00
Josh Matthews
9be40ac4b6
Make dependency walker available. 2019-04-02 10:17:42 -04:00
Josh Matthews
4138fb689b
Delete insecure-protocol.http.html.ini
Remove intermittent failure.
2019-04-02 10:15:44 -04:00
WPT Sync Bot
b55cc798b6 Update web-platform-tests to revision 3bbb55915a04548e70c63b7c143a83e0e9d3c5e7 2019-04-02 01:37:24 -04:00
bors-servo
c5da3306b2
Auto merge of #23128 - kamal-umudlu:pass_not_none_value_in_setfullscreen, r=jdm
Pass not none value in setfullscreen

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

Entering fullscreen mode is passing `None` value to `Window` when `set_fullscreen` function is called which prevents
Servo actually entering fullscreen mode.
In addition, the function `exit_fullscreen` in `document.rs` is passing True value to
`SetFullscreenState` which doesn't allow to exit from fullscreen mode.

# Solution

1. Instead of passing `None` value when `FullScreenState` is true, `window.get_primary_monitor()` is called in order to pass a monitor id.
This fix make Servo actually enter fullscreen mode.
2. Changed `SetFullscreenState` to false when `exit_fullscreen` function is called.
3. In addition, added new implementation to support exiting from fullscreen mode by pressing `Escape` button.

# Testing Plan

After my change in [windows.rs and document.rs](af6b598154),
the Servo app can enter/exit fullscreen mode.
In addition, the [`ESC button support`](14ebd5bbb0)
allows to exit from fullscreenmode.

---
<!-- 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 #22853

<!-- 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/23128)
<!-- Reviewable:end -->
2019-04-01 20:57:07 -04:00
bors-servo
3340214a29
Auto merge of #23098 - TheGoddessInari:py2, r=jdm
Py2

<!-- Please describe your changes on the following line: -->
da3102338c: Rework mach.bat to support VS2019 and user-supplied environments.
4551f6031f: Default mach.bat to using py -2.
03e47081fe: Don't assume the user's environment in mach_bootstrap.

---
<!-- 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 #23083 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it changes the python bootstrap slightly and the changes are obvious.

<!-- 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. -->

The virtualenv changes shouldn't disrupt anything as it just uses the existing python (being used) to call itself `-m virtualenv`, and only if it exists. imp is still apparently the preferred builtin way to find this in Python 2.x without actually importing it. Importing it would cause an unused import warning in tidy. It still picks up the new things in _virtualenv, just no longer has a special case for Win32/MSYS because it's no longer needed.

The .bat change is the simplest I could think of that allows fallback in both cases and is no worse than before. `where /Q` is documented by Microsoft to return 0 if a successful match is found, and print nothing in either case.

<!-- 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/23098)
<!-- Reviewable:end -->
2019-04-01 18:48:09 -04:00
Kamal Umudlu
a8995fbf1a Bug: #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
Added patch for bug:22853

Added implementation to exit from fullscreen mode by pressing ESC button

Added patch that supports to exit from fullscreen mode by pressing ESC

Deleted patch files

Added all requested changes on project

Removed the loop over self.pending_changes in switch_fullscreen_mode function

Bug #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False

Added missing bracket in constellation.rs file to fix build issue

Bug: #22853 --> Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
2019-04-01 18:29:02 -04:00
Josh Matthews
c0052c0894 Install virtualenv python module. 2019-04-01 17:13:14 -04:00
bors-servo
e27653ceae
Auto merge of #23126 - servo:jdm-patch-35, r=Manishearth
Fix various Windows dependency issues

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23125 and fix #23104
- [x] 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/23126)
<!-- Reviewable:end -->
2019-04-01 13:29:07 -04:00
bors-servo
805dd86425
Auto merge of #23147 - servo:paulrouget-patch-2, r=jdm
README: Specify Xcode version.

Fix #21792

<!-- 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/23147)
<!-- Reviewable:end -->
2019-04-01 11:25:53 -04:00
TheGoddessInari
903729159e Rework mach.bat to support VS2019 and user-supplied environments.
As a bonus, use setlocal to avoid environment pollution.
2019-04-01 11:15:22 -04:00
TheGoddessInari
e1eb36050e Default mach.bat to using py -2.
Servo already assumes the user has Python, this is the primary
way to make sure that Python 2 is preferred, and you should
get a sensible error message if you have python 3 but not 2.

But first, check that py.exe exists because if a system has only
Python 2.x only, it won't have it. If it doesn't, then try python.exe.
2019-04-01 11:15:22 -04:00
TheGoddessInari
44162ceafb Don't assume the user's environment in mach_bootstrap.
On Windows with multiple Pythons installed, this was causing python2.7
to bootstrap a 3.7 virtualenv that it couldn't make use of.

PIP_NAMES wasn't used at all, and VIRTUALENV_NAMES ends up being unused
now.
2019-04-01 11:15:21 -04:00
bors-servo
9de3781678
Auto merge of #23146 - servo-wpt-sync:wpt_update_31-03-2019, r=jdm
Sync WPT with upstream (31-03-2019)

Automated downstream sync of changes from upstream as of 31-03-2019.
[no-wpt-sync]

<!-- 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/23146)
<!-- Reviewable:end -->
2019-04-01 08:17:14 -04:00
Paul Rouget
6a0c925d9d
README: Specify Xcode version.
Fix #21792
2019-04-01 13:32:17 +02:00
WPT Sync Bot
f62d961249 Update web-platform-tests to revision f24d88b7d2cd2d851533e9c1180b1c5c5d118bc3 2019-03-31 23:38:25 -04:00
bors-servo
31c02614be
Auto merge of #23139 - gterzian:bounded_profiler_with_buffer_feedback, r=jdm
Bound sampler buffer, add length feedback message, fix intermittence in test

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #23109 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] 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/23139)
<!-- Reviewable:end -->
2019-03-31 10:27:13 -04:00
bors-servo
14304b23a9
Auto merge of #23142 - servo-wpt-sync:wpt_update_30-03-2019, r=jdm
Sync WPT with upstream (30-03-2019)

Automated downstream sync of changes from upstream as of 30-03-2019.
[no-wpt-sync]

<!-- 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/23142)
<!-- Reviewable:end -->
2019-03-31 08:58:55 -04:00
Gregory Terzian
0780298b80 bound sampler buffer 2019-03-31 20:14:46 +08:00
WPT Sync Bot
7cb8ac2fe2 Update web-platform-tests to revision d4f8820261cce3f9ee37353b6d76d247cb12a972 2019-03-30 23:51:59 -04:00
bors-servo
793b41299b
Auto merge of #23138 - servo-wpt-sync:wpt_update_29-03-2019, r=jdm
Sync WPT with upstream (29-03-2019)

Automated downstream sync of changes from upstream as of 29-03-2019.
[no-wpt-sync]

<!-- 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/23138)
<!-- Reviewable:end -->
2019-03-30 07:46:04 -04:00
WPT Sync Bot
6ed2abf735 Update web-platform-tests to revision add24188a1226f3598ad6b455e71641c9ac6a5fd 2019-03-29 23:56:29 -04:00
bors-servo
41feb83c10
Auto merge of #22355 - gterzian:add_linux_sampler, r=asajeffrey,gterzian
Add linux sampler

<!-- 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 #22203 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes
- [ ] 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/22355)
<!-- Reviewable:end -->
2019-03-29 23:12:40 -04:00
Josh Matthews
6c1bf6a591 Add linking hack to work around older libunwind package versions. 2019-03-29 23:05:45 -04:00
Josh Matthews
7a6fb65bd9 Use libunwind to walk the stack of the paused thread. 2019-03-29 23:05:44 -04:00
Gregory Terzian
7bc29205ef add linux sampler 2019-03-29 23:05:44 -04:00
bors-servo
4cf39a696d
Auto merge of #23129 - servo-wpt-sync:wpt_update_29-03-2019, r=jdm
Sync WPT with upstream (29-03-2019)

Automated downstream sync of changes from upstream as of 29-03-2019.
[no-wpt-sync]

<!-- 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/23129)
<!-- Reviewable:end -->
2019-03-29 08:51:14 -04:00
WPT Sync Bot
cb63cfd5c7 Update web-platform-tests to revision 3bfdeb8976fc51748935c8d1f1014dfba8e08dfb 2019-03-29 00:51:32 -04:00
bors-servo
fcd6beb608
Auto merge of #23112 - servo:jdm-patch-31, r=Manishearth
Use consistent local branch name for WPT sync.

This avoids the problem of the WPT sync running two commands on different dates and therefore not finding the previously created branch.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23052

<!-- 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/23112)
<!-- Reviewable:end -->
2019-03-28 14:11:55 -04:00