Commit graph

7028 commits

Author SHA1 Message Date
sreeise
cac4aa56f7 Added AudioTrack, AudioTrackList, VideoTrack, VideoTrackList, and TrackEvent interfaces 2019-03-03 09:04:50 -05:00
bors-servo
4d8d54fc00
Auto merge of #22933 - pngai:implement-returnValue-attribute, r=jdm
Implement historical returnValue attribute for Event interface

<!-- Please describe your changes on the following line: -->
Implementation of `returnValue` attribute for Event interface.

---
<!-- 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 #22881 (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/22933)
<!-- Reviewable:end -->
2019-03-01 17:33:39 -05:00
bors-servo
27f443fd00
Auto merge of #22934 - Manishearth:update-webidl, r=nox
Update WebIDL.py

I'm working on getting [attributes on types landed in upstream webidl](https://bugzilla.mozilla.org/show_bug.cgi?id=1359269). In preparation for that, I'd like to update WebIDL.py and deal with all the conflicts first so that updating for that bug is easier.

(This PR doesn't need to be reviewed and landed right now, I can just roll it into the PR for implementing attributes on types, but I suspect it would be easier to land this first)

Probably should squash before landing, the steps are separated out for ease of review.

r? @nox @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/22934)
<!-- Reviewable:end -->
2019-03-01 15:44:43 -05:00
Manish Goregaokar
8f5db8a7e1 Update webidl.py from upstream 2019-03-01 16:58:46 +05:30
Patrick Ngai
fcadff7bad Implement historical returnValue attribute for Event interface 2019-02-28 21:03:03 +08:00
bors-servo
42ebf46172
Auto merge of #22917 - ksqsf:master, r=KiChjang
Add optional annotations for initEvent method of Event interface

Added `optional` and default values to parameters `bubbles` and `cancelable` of `initEvent` of `Event`.

I tried to update test results, but there seem to be no differences at all.

I checked similar code where `optional` is used, and there seems to be no special handling in Rust. If that is not the case with this issue, please let me know and I'll commit more follow-ups.

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

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

<!-- 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/22917)
<!-- Reviewable:end -->
2019-02-27 04:05:57 -05:00
bors-servo
ec7a5f21c8
Auto merge of #22938 - asajeffrey:webvr-future-frame-data, r=paulrouget
Use webvr future_frame_data to avoid blocking the WebGL thread

<!-- Please describe your changes on the following line: -->
This PR fixes a potential deadlock caused by the WebGL thread being blocked on a VR device. Rather than blocking on the VR device, it forwards a future to the script thread, and then then script thread blocks.

---
<!-- 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 do not require tests because it's fixing a potential deadlock

<!-- 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/22938)
<!-- Reviewable:end -->
2019-02-27 02:20:30 -05:00
Alan Jeffrey
c9087013b1 Use webvr future_frame_data to avoid blocking the WebGL thread 2019-02-26 11:07:42 -06:00
_rika
fd2341bc78 Add optional annotations for initEvent method of Event interface 2019-02-26 18:10:43 +08:00
Simon Sapin
4464354e2e Reformat 2019-02-26 08:18:33 +01:00
bors-servo
a28e15e4ea
Auto merge of #22347 - stevesweetney:master, r=ferjm
Implement HTMLMediaElement muted and defaultMuted attributes

<!-- Please describe your changes on the following line: -->
PR for issue  #22291

---
<!-- 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  #22291 (github issue number if applicable).
- [X] There are tests for these changes OR

<!-- 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/22347)
<!-- Reviewable:end -->
2019-02-25 05:05:09 -05:00
Manish Goregaokar
c44b63f335 Handle erroring out when there are multiple immersive sessions 2019-02-19 17:50:46 +05:30
Manish Goregaokar
37872b8b9c Add XREnvironmentBlendMode 2019-02-19 16:08:39 +05:30
Steve Sweetney
02d3328d3c Implement HTMLMediaElement muted and defaultMuted attributes 2019-02-18 15:20:00 -05:00
bors-servo
093a1ee365
Auto merge of #22872 - Manishearth:mediaup, r=asajeffrey
Update servo-media

Pulls in https://github.com/servo/media/pull/199, doesn't use it yet

<!-- 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/22872)
<!-- Reviewable:end -->
2019-02-13 13:05:11 -05:00
Manish Goregaokar
407d88f97d Update servo-media 2019-02-13 10:04:52 -08:00
bors-servo
92369cca21
Auto merge of #22864 - emilio:gecko-sync, r=emilio
style: Rename MozLength to Size, and MaxLength to MaxSize.

MozLength is not a very descriptive name. If we're going to use it in both Gecko
and Servo we may as well name it something more accurate.

I would've chosen `ContentSize` per CSS2[1][2] if it wasn't a lie in presence
of box-sizing. I don't have better ideas than `Size`, given that.

[1]: https://drafts.csswg.org/css2/visudet.html#propdef-width
[2]: https://drafts.csswg.org/css2/box.html#content-width

Differential Revision: https://phabricator.services.mozilla.com/D19280

<!-- 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/22864)
<!-- Reviewable:end -->
2019-02-11 20:28:35 -05:00
Emilio Cobos Álvarez
c2819365f0 style: Rename MozLength to Size, and MaxLength to MaxSize.
MozLength is not a very descriptive name. If we're going to use it in both Gecko
and Servo we may as well name it something more accurate.

I would've chosen `ContentSize` per CSS2[1][2] if it wasn't a lie in presence
of box-sizing. I don't have better ideas than `Size`, given that.

[1]: https://drafts.csswg.org/css2/visudet.html#propdef-width
[2]: https://drafts.csswg.org/css2/box.html#content-width

Differential Revision: https://phabricator.services.mozilla.com/D19280
2019-02-12 02:28:00 +01:00
bors-servo
1ec2de258d
Auto merge of #22798 - jdm:webgl-trace, r=nox
Report all messages processed by the webgl thread.

This might be useful for figuring out what a WebGL-based page is doing when it's not behaving correctly.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they are debug-logging changes only.

<!-- 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/22798)
<!-- Reviewable:end -->
2019-02-11 11:39:12 -05:00
bors-servo
7ed6b9d3ce
Auto merge of #22850 - georgeroman:implement_htmlareaelement_target_attribute, r=ferjm
Implement the target attribute for HTMLAreaElement

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

<!-- 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/22850)
<!-- Reviewable:end -->
2019-02-11 04:13:42 -05:00
George Roman
90b5d0d338 Implement the target attribute for HTMLAreaElement 2019-02-11 10:42:58 +02:00
Emilio Cobos Álvarez
6daebcc5df Fix servo build. 2019-02-10 07:23:51 +01:00
Alan Jeffrey
d2862094ec Add reftests for fullscreen mode 2019-02-05 10:04:38 -06:00
kkpoon
d470373e1c Add PerformanceResourceTiming: redirectStart 2019-02-01 14:55:37 +08:00
Josh Matthews
25a61f3783 Report all messages processed by the webgl thread. 2019-01-31 14:57:38 -05:00
bors-servo
6b648429f5
Auto merge of #22780 - Manishearth:webrtc, r=jdm
Initial webrtc and getUserMedia DOM support

This is able to reach the point where connections are properly negotiated and ready to exchange streams.

<s>The `toJSON()` stuff doesn't work yet, so most example code will need to be tweaked to manually construct JSON first before sending SDP and ICE messages over websockets. I'll add support for this soon. (This may need webidl tweaks to support `[Default]` and `toJSON()`)</s>

For some reason I haven't yet figured out, connections are one-way, Servo is able to receive streams but the other end doesn't see the streams Servo sends. I don't think this is due to https://github.com/servo/media/issues/191, but that bug is making it harder to test.

This implementation simply drops streams that it receives, without connecting them up to any output elements, since servo-media-player doesn't yet have mediastream support.

Since servo can neither effectively send nor receive streams this implementation isn't useful yet, however it is getting large and I figured I'd get it reviewed and landed early as a base.

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/22780)
<!-- Reviewable:end -->
2019-01-31 12:14:16 -05:00
Piotr Szpetkowski
abd577bfd4
Update bool pattern matching into if-else 2019-01-30 20:54:12 +01:00
Peijun Ma
0bafa61f7c
Implement referrer policy for follow_hyperlink 2019-01-30 00:24:12 -05:00
Peijun Ma
fe7f3ab262
Remove description for step in follow_hyperlink 2019-01-30 00:24:11 -05:00
Peijun Ma
e4ffd16449
Refactor follow_hyperlink and its callers
Now they follow the new spec stated at:
https://html.spec.whatwg.org/multipage/links.html#following-hyperlinks-2

It seems like choosing a browsing context is already done in the
follow_hyperlink method, so I have removed the TODO in
activation_behavior for HTMLAreaElement.

The tests in tests/wpt/web-platform-tests/html/semantics/links/following-hyperlinks/
pass in release builds, but still don't pass in dev build,
since the timeout in
tests/wpt/web-platform-tests/html/semantics/links/following-hyperlinks/activation-behavior.window.js
seems to be too short for dev builds.

Navigating to error page on failed URL parsing is still not implemented.

There seem to be potential code duplication in activation_behavior
methods for both htmlanchorelement.rs and htmlareaelement.rs, in:

    let referrer_policy = match self.RelList().Contains("noreferrer".into()) {
        true => Some(ReferrerPolicy::NoReferrer),
        false => None,
    };

I didn't pull them out to a separate function since I don't know
where I would put that new function.
2019-01-30 00:24:11 -05:00
Manish Goregaokar
ab04f0429b Add RTCSessionDescription::ToJSON 2019-01-29 11:37:00 -08:00
Manish Goregaokar
0d9f538561 Add RTCIceCandidate::ToJSON 2019-01-29 11:37:00 -08:00
Manish Goregaokar
b7e2e79e53 Use draft spec links 2019-01-29 11:37:00 -08:00
Manish Goregaokar
7761243100 Configure STUN servers 2019-01-29 11:37:00 -08:00
Manish Goregaokar
2d8ac7825c Add RTCPeerConnection::AddStream 2019-01-29 11:37:00 -08:00
Manish Goregaokar
8b0719a6f2 Add MediaDevices::GetUserMedia 2019-01-29 11:37:00 -08:00
Manish Goregaokar
eee183d7f4 Add Navigator::MediaDevices 2019-01-29 11:37:00 -08:00
Manish Goregaokar
8b55d69fe1 Add empty MediaStream interface 2019-01-29 11:36:27 -08:00
Manish Goregaokar
bafbc0e1c0 Add empty MediaDevices interface 2019-01-29 11:36:27 -08:00
Manish Goregaokar
93a359e528 Add RTCPeerConnection::SetRemoteDescription 2019-01-29 11:36:27 -08:00
Manish Goregaokar
95cd67cb65 Add RTCPeerConnection::SetLocalDescription 2019-01-29 11:36:27 -08:00
Manish Goregaokar
cfc235bad2 Add createAnswer 2019-01-29 11:36:27 -08:00
Manish Goregaokar
c156289a0c Add createOfer 2019-01-29 11:36:27 -08:00
Manish Goregaokar
9521c3d5a4 Add RTCPeerConnection::AddIceCandidate 2019-01-29 11:36:27 -08:00
Manish Goregaokar
841dd1eb4b Fire negotiationneeded and icecandidate events 2019-01-29 11:36:27 -08:00
Manish Goregaokar
5bfa42094e Add RTCPeerConnectionIceEvent 2019-01-29 11:36:27 -08:00
bors-servo
65c2fcb460
Auto merge of #22777 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

<!-- 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/22777)
<!-- Reviewable:end -->
2019-01-29 08:19:14 -05:00
Manish Goregaokar
e0d8de2714 Fill in some of RTCPeerConnection, add signaller 2019-01-28 22:21:42 -08:00
Manish Goregaokar
a43b9c0a8f Fill in RTCIceCandidate 2019-01-28 22:21:42 -08:00
Manish Goregaokar
be48cf23f9 Fill in RTCSessionDescription 2019-01-28 22:21:42 -08:00