Commit graph

8362 commits

Author SHA1 Message Date
Manish Goregaokar
6fda2f28a6 Precompute XRRigidTransform's matrices 2019-03-26 00:09:15 -07:00
Manish Goregaokar
77e857891a Fix xrviewport.height 2019-03-26 00:09:15 -07:00
Manish Goregaokar
2e48606569 Compute view matrix from viewer pose 2019-03-26 00:09:15 -07:00
bors-servo
25aa6501d2
Auto merge of #22699 - Manishearth:render_state, r=jdm
Update XR code to support null layers and new spec changes

Last time we landed an incomplete PR (https://github.com/servo/servo/pull/22649) that corrected the promise model but left XR sessions in panicky states.

This updates the code to not panic all the time, and also includes changes from https://github.com/immersive-web/webxr/pull/458

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/22699)
<!-- Reviewable:end -->
2019-03-25 18:48:49 -04:00
Manish Goregaokar
d1d8e97c30 Add XRSpace::get_viewer_pose() 2019-03-25 15:35:20 -07:00
Josh Matthews
896aae1c14 Add mozjs feature for profiling. 2019-03-25 16:13:56 -04:00
Manish Goregaokar
1e1f527c82 Formatting changes 2019-03-25 11:38:20 -07:00
Manish Goregaokar
922883f35a Pref-gate XRRenderState 2019-03-25 09:13:56 -07:00
Manish Goregaokar
0038ddf51e Avoid double-spawning RAF thread 2019-03-25 09:12:30 -07:00
Manish Goregaokar
9ea28c4c63 Flush renderstate queue before presenting 2019-03-25 09:12:28 -07:00
Manish Goregaokar
798c88917b Trigger wakeup when queuing, not when processing 2019-03-25 09:11:56 -07:00
Manish Goregaokar
1a64b217af Improve handling of missing layer_ctx 2019-03-25 09:08:26 -07:00
Manish Goregaokar
87558c3a17 Shut down old VR compositor when the layer is replaced 2019-03-25 09:08:26 -07:00
Manish Goregaokar
e20909cf43 Allow VR RAF loop to handle changes in the layer, support pending renderstates 2019-03-25 09:08:11 -07:00
Manish Goregaokar
401b470e90 Hook XRRenderState into XRSession 2019-03-25 09:06:49 -07:00
Manish Goregaokar
1dc7636135 Add XRRenderState 2019-03-25 09:06:21 -07:00
Manish Goregaokar
7343241c3d Add RTCPeerConnection::Close 2019-03-25 09:04:13 -07:00
Manish Goregaokar
5cb5503a75 Add SignalingState to RTCPeerConnection 2019-03-25 09:04:13 -07:00
Manish Goregaokar
fc25a80892 Add ICEConnectionState to RTCPeerConnection 2019-03-25 09:04:13 -07:00
Manish Goregaokar
209caa418b Add ICEGatheringState to RTCPeerConnection 2019-03-25 09:04:13 -07:00
Fernando Jiménez Moreno
bc74dc0e85 Use servo-media-auto and call ServoMedia::init where required 2019-03-25 09:51:53 +01:00
Fernando Jiménez Moreno
36825b82f3 Shutdown player when HTMLMediaElement is dropped 2019-03-25 09:29:30 +01:00
bors-servo
5f4030d028
Auto merge of #23011 - dboyan:open-feature-tokenize, r=gterzian,cybai
Add tokenizer for features in window.open

<!-- Please describe your changes on the following line: -->
This is a prototype implementation of feature tokenizer ~~and "noreferrer" feature~~ for window.open. I'm not very sure where the tokenizer code should be placed. Building now generates the following warning

```
warning: unused attribute
  --> components/script/dom/bindings/conversions.rs:74:5
   |
74 |     rustc_on_unimplemented(message = "The IDL interface `{Self}` is not derived from `{T}`.")
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_attributes)] on by default
```

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

<!-- 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/23011)
<!-- Reviewable:end -->
2019-03-24 05:31:24 -04:00
Boyan Ding
f261799e64 Add a tokenizer for features in window.open() 2019-03-23 15:31:14 +08:00
bors-servo
059ac12c00
Auto merge of #23073 - sbansal3096:master, r=emilio
Expose public getter to stylesheet's owner

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

- [x] expose a public getter on CSSStyleSheet to return the stylesheet's owner
- [x] in CSSRuleList::insert_rule, use the new getter to pass a non-None value as an argument to arc.insert_rule
- [x] add a test for this that verifies that the new stylesheet is actually loaded
---
<!-- 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 #23028

<!-- 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/23073)
<!-- Reviewable:end -->
2019-03-22 19:45:08 -04:00
bors-servo
525484a4d9
Auto merge of #22973 - paulrouget:wrupdate, r=emilio
WR update

~Need https://github.com/tomaka/winit/issues/803~

@emilio can I ask you to look at the *"WR udpate: layout"* commit? There are a few changes I'm not sure about (should_inflate, the new filters_data and cache_tiles).

Fix: #22993

<!-- 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/22973)
<!-- Reviewable:end -->
2019-03-22 08:48:16 -04:00
sbansal3096
13eebbfe56 Fix insertRule crash by exposing getter on stylesheet's owner 2019-03-22 15:45:18 +05:30
George Roman
c6433efc1d Implement XMLSerializer interface 2019-03-21 09:50:29 +02:00
bors-servo
e58226814f
Auto merge of #23055 - Manishearth:xrspace, r=asajeffrey
Some XRSpace improvements

Proper XRSpace support is blocked on https://github.com/immersive-web/webxr/issues/565 , but in the meantime this improves XRSpace support a little bit, preparing both for support in getViewerPose and getPose as well as handling input spaces eventually.

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/23055)
<!-- Reviewable:end -->
2019-03-20 21:37:52 -04:00
Paul Rouget
ecc11826d2 WR update: dependencies update 2019-03-21 09:34:42 +08:00
Manish Goregaokar
22e5ce5ff3 Improve getViewerPose() 2019-03-20 18:30:29 -07:00
bors-servo
452d2dcdef
Auto merge of #23045 - miller-time:promote-memory-blob, r=jdm
create uuid before sending PromoteMemory message

<!-- Please describe your changes on the following line: -->
When `Blob::promote` is promoting a `BlobImpl::Memory`, create uuid and send it with the `FileManagerThreadMsg::PromoteMemory` message rather than blocking until one is received.

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

<!-- 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/23045)
<!-- Reviewable:end -->
2019-03-20 20:14:34 -04:00
bors-servo
6d308c3577
Auto merge of #22480 - cdeler:implement-DOMException-constructor, r=jdm
Implement dom exception constructor

The constructor method was implemented

I have a question: should I edit `./mach test-wpt` expectations?

---
<!-- 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 #22412
- [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/22480)
<!-- Reviewable:end -->
2019-03-20 16:13:17 -04:00
bors-servo
5ec725488f
Auto merge of #22923 - peterjoel:issue_8539_prefs_refactor, r=jdm
#8539 Config preferences backend restructure

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

A procedural macro for generating static structures for use as the backend for config preferences, as well a mapping from string names to accessors.

Preferences can be accessed and updated via a map-like interface with `String` keys, and now also via a convenience macro: `get_pref!(path.to.pref)`. Various `serde`-compatible field attributes are also supported, including renaming the string keys. This could be useful when changing the backend structure without breaking existing usages.

I have added the choice to use `i64` as well as `f64` for storing numbers. As it turns out, none of the existing preferences used non-integer values. Setting a floating point value from a command-line argument requires a decimal point in order to parse correctly.

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

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

-----

I have a few outstanding problems or questions:

1. I am unable to get rid of this warning:
    ```
    warning: unnecessary path disambiguator
       --> components/config/prefs.rs:130:51
        |
    130 |         accessor_type = crate::pref_util::Accessor::<Prefs, crate::pref_util::PrefValue>,
        |                                                   ^^ try removing `::`
    ```
    See: https://stackoverflow.com/questions/54710797/how-to-disable-unnecessary-path-disambiguator-warning
2. Several of the preferences in use were not represented in `prefs.json`. Some of these may be in error, but it is hard to tell. For example `js.offthread_compilation.enabled` vs `js.ion.offthread_compilation.enabled` could be different preferences or could be intended to have the same value.
3. Previously, several pieces of code provided default values when accessing a preference that may not be present. For example:
    ```Rust
    let DBL_CLICK_TIMEOUT = Duration::from_millis(
        PREFS
            .get("dom.document.dblclick_timeout")
            .as_u64()
            .unwrap_or(300),
    );
    ```
    Fallback values don't really make sense now and I've added these defaults to `prefs.json`. Does this sound right?
4. I have kept `PrefValue::Missing`, though it doesn't seem very useful any more. An error might be more appropriate now for an incorrect preference key. I've kept this partly because [`webdriver_server` uses it](https://github.com/servo/servo/blob/master/components/webdriver_server/lib.rs#L224).

<!-- 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/22923)
<!-- Reviewable:end -->
2019-03-20 14:33:37 -04:00
bors-servo
43cc2a0224
Auto merge of #23029 - KwanEsq:insertRuleNoIndex, r=SimonSapin
Update StyleSheet.insertRule WebIDL to make index optional.

Update wpt metadata to show the new passes.
Add one test as crashing since currently passing an \@import rule to insertRule
leads to "Expected a stylesheet loader for \@import"

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23025
- [x] There are tests for these changes
- [x] ./mach test-wpt css/cssom passes with 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/23029)
<!-- Reviewable:end -->
2019-03-20 13:04:13 -04:00
Peter Hall
8bfd4dc1e2 #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
cdeler
220a471b14 implemented missed constructor for DOMException; fixed the tests expectations 2019-03-19 22:49:14 +03:00
Russell Cousineau
d9beca6fec create uuid before sending PromoteMemory message 2019-03-18 18:27:46 -07:00
Manish Goregaokar
a2c4270f55 Cleanup XRFrame 2019-03-18 16:28:37 -07:00
Manish Goregaokar
191fcf66cc Add requestReferenceSpace 2019-03-18 16:27:59 -07:00
Manish Goregaokar
f2a6164a52 Add XRReferenceSpace::identity 2019-03-18 16:27:27 -07:00
Manish Goregaokar
8f14007979 Add session parameter to XRSpace 2019-03-18 16:27:11 -07:00
Manish Goregaokar
ffacb1179e Add originOffset to XRReferenceSpace 2019-03-18 16:26:48 -07:00
Manish Goregaokar
503ea3d943 Add XRRigidTransform attributes 2019-03-18 16:26:31 -07:00
Manish Goregaokar
c775820a79 Add XRRigidTransform constructor 2019-03-18 16:26:13 -07:00
bors-servo
34fda66dfa
Auto merge of #22891 - georgeroman:implement_cdatasection, r=Manishearth
Implement CDATASection interface and createCDATASection method

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

<!-- 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/22891)
<!-- Reviewable:end -->
2019-03-18 17:22:55 -04:00
bors-servo
0fac8f2f62
Auto merge of #23021 - ejmg:assert_fail_#18439, r=jdm
Assert fail #18439

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

This PR addresses #18439 by removing an assert statement that forces a panic whenever `LoadBlocker` is dropped during a GC sweep and receives a `None` `SCRIPT_THREAD_ROOT` value from `mark_document_with_no_blocked_loads()`. Instead of panicking on the assert, we remove it and let the None value pass silently.

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

<!-- 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/23021)
<!-- Reviewable:end -->
2019-03-18 15:44:36 -04:00
Caio
1cecb080b3 Add url for LayoutImageContext 2019-03-16 12:26:31 -03:00
George Roman
4b8282b3b1 Implement CDATASection interface and createCDATASection method 2019-03-14 21:41:02 +02:00
bors-servo
bc03d32142
Auto merge of #23016 - pngai:remove-on-prefix, r=jdm
Remove 'on' prefix from event handler macros

<!-- Please describe your changes on the following line: -->
Remove 'on' prefix from event handler macros

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

<!-- 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/23016)
<!-- Reviewable:end -->
2019-03-14 15:14:44 -04:00