Commit graph

380 commits

Author SHA1 Message Date
bors-servo
852223b08a
Auto merge of #23253 - BartGitHub:refactor-promise-compartment, r=jdm
Refactor promise compartment

<!-- Please describe your changes on the following line: -->
This PR adds a mechanism to verify that certain code is executed inside a ```JSAutoCompartment```, and applies this to the ```Promise::new_in_current_compartment``` constructor.

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 #23167

<!-- Either: -->
- [x] These changes do not require tests because they do not change existing functionality.

<!-- 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/23253)
<!-- Reviewable:end -->
2019-04-29 13:59:04 -04:00
bors-servo
67beaa46e2
Auto merge of #23236 - swarnimarun:loop_patch, r=ferjm
Implement HTMLMediaElement.loop Attribute

<!-- Please describe your changes on the following line: -->
Work done for Implementing HTMLMediaElement.loop Attribute,
- Uncomment `loop` attribute from webidl
- Add make_bool macros for Loop and SetLoop functions
- Update the required tests

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

<!-- Either: -->
- [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/23236)
<!-- Reviewable:end -->
2019-04-29 12:20:43 -04:00
Swarnim Arun
3bf3a7861a Implement HTMLMediaElement.loop Attribute 2019-04-26 23:13:18 +05:30
Fernando Jiménez Moreno
441357b74e Add is_connected flag to node and use it to replace most uses of is_in_doc 2019-04-26 10:17:45 +02:00
bors-servo
b73956cc37
Auto merge of #23090 - miller-time:nav-fetch-referrer, r=gterzian
Add referrer to navigation fetch request

<!-- Please describe your changes on the following line: -->
Implement step 13 of [following hyperlinks](https://html.spec.whatwg.org/#following-hyperlinks-2) and step 14.3 of [window open](https://html.spec.whatwg.org/#window-open-steps), as well as other referrer- and fetch-related updates.

---
<!-- 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 #22890 (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/23090)
<!-- Reviewable:end -->
2019-04-25 20:21:23 -04:00
Aron Zwaan
e2e6e2ac94 Pass InCompartment by value 2019-04-25 11:37:35 +02:00
Aron Zwaan
1b6949d4cf Add proof parameter to Promise::new_in_current_compartment 2019-04-24 19:46:10 +02:00
Fernando Jiménez Moreno
74a48937f1 Remove use of auto media backend. And update servo-media 2019-04-23 16:24:33 +02:00
Russell Cousineau
2440e0f98a set referrer in window.load_url
- this conforms to follow-hyperlinks spec step 13
- this conforms to window-open spec step 14.3
- replace uses of `referrer_url` with `referrer`
- in Request class, change "no-referrer" to ""
- set websocket fetch referrer to "no-referrer"
2019-04-19 16:50:38 -07:00
Fernando Jiménez Moreno
501e6c1aed Allow replaying media 2019-04-17 12:11:14 +02: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
Fernando Jiménez Moreno
0eb2c1d02e Do not tie media element 'muted' state change to player availability 2019-04-11 09:02:49 +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
Aron Zwaan
782b58587a Rename Promise::new to Promise::new_in_current_compartment 2019-04-03 20:45:30 +02:00
Fernando Jiménez Moreno
d15640081c Implement srcObject logic for Blob media providers 2019-03-27 07:11:29 +01: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
Peter Hall
8bfd4dc1e2 #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
sreeise
cac4aa56f7 Added AudioTrack, AudioTrackList, VideoTrack, VideoTrackList, and TrackEvent interfaces 2019-03-03 09:04:50 -05:00
Steve Sweetney
02d3328d3c Implement HTMLMediaElement muted and defaultMuted attributes 2019-02-18 15:20:00 -05:00
Fernando Jiménez Moreno
4b23c631ea No need to share a reference for HTMLMediaElement played TimeRange 2019-01-17 10:01:38 +01:00
Fernando Jiménez Moreno
f5581a78ab Add media cache and implement HTMLMediaElement.buffering 2019-01-17 10:01:38 +01:00
bors-servo
2cf9a00c99
Auto merge of #22399 - ferjm:poster.frame, r=jdm
Implement HTMLMediaElement poster attribute

- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22288
- [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/22399)
<!-- Reviewable:end -->
2019-01-14 17:35:23 -05:00
german gomez
5605f235c6 Implement Ended media attribute
Signed-off-by: german gomez <germangb42@gmail.com>
2019-01-11 18:13:11 +01:00
Fernando Jiménez Moreno
9d5499bbfb Reftest for video poster frame 2019-01-11 17:11:12 +01:00
Fernando Jiménez Moreno
5c5b5aae0f Implement HTMLMediaElement poster attribute 2019-01-11 17:11:11 +01:00
Fernando Jiménez Moreno
9a18074b88 Split media fetch context and fetch listener to prevent deadlocks 2019-01-11 13:58:48 +01:00
Fernando Jiménez Moreno
da32c8488c Do not let fetch request drive generation id increments 2019-01-11 10:44:43 +01:00
Fernando Jiménez Moreno
9aced067aa Reset seeking flag if stream is not seekable 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
34c1f2587f Add fetch canceller to HTMLMediaElementFetchContext and clarify how we restart after a backoff 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
e7e390ee8e Backoff protocol for media fetch requests 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
f1d012d782 Make sure that we ignore responses from old requests 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
c8806767a0 Set media stream as seekable only if the server supports range requests 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
5112e0435c Update servo-media 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
f7eeb26f0a Force the usage of mp4 for media-element WPTs 2019-01-09 09:28:43 +01:00
Fernando Jiménez Moreno
6c2c3f75b9 Implement step 6 of media element 'time marches on' algoritm 2019-01-09 09:28:42 +01:00
Manish Goregaokar
4328fc23a7 Clean up HTMLMediaElement::Play 2019-01-04 15:05:07 -08:00
Manish Goregaokar
611dc4bc70 Remove now-unnecessary must_root and allow(unrooted_must_root) annotations 2019-01-04 15:05:07 -08:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
George Roman
deb02ab6d7 Implement HTMLMediaElement defaultPlaybackRate and playbackRate attributes 2018-12-26 22:20:51 +02:00
Dan Robertson
c46508e497
Update src/href attributes to be a USVString
The following IDLs have the src/href attributes typed as a DOMString
while in the spec the attribute has been updated to be a USVString:

 - HTMLIFrameElement
 - HTMLImageElement
 - HTMLInputElement
 - HTMLLinkElement
 - HTMLMediaElement
 - HTMLScriptElement
2018-12-17 15:28:42 +00:00
bors-servo
eab848df3e
Auto merge of #22433 - ferjm:player.eos.size, r=ceyusa
Improve implementation of media resource fetch algorithm

I have been observing inconsistent behaviors with my local tests depending of the media asset being played. I figured that we had these issues:

- We were setting the player EOS as soon as we got the first [process_response_eof](1046ae58a1/components/script/dom/htmlmediaelement.rs (L1596)). This is fine only if there is a single request. But that's not the case for multiple range requests or for seeks. Setting the player EOS makes the player appsrc reject any new buffers, and that breaks playback. Figuring out when is the right time to set the player EOS won't be a straight forward task, so my suggested fix for now is to simply not set it for now. It is a cleanup step that it would be nice to have but it is not mandatory.

- We were setting the input size more than once for multiple range requests and with the incorrect value. The fix uses the `content-length` or the `content-range` headers for single and range requests respectively.

- We were moving to the HaveEnoughData state if a fetch request succeded but no data was fetched from the network.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/22433)
<!-- Reviewable:end -->
2018-12-12 18:38:25 -05:00
Fernando Jiménez Moreno
8818898240 Do not move to HaveEnoughData state if no media data is fetched from the network 2018-12-12 18:08:40 +01:00
Fernando Jiménez Moreno
707b490c0f Signal EOS if media request fails 2018-12-12 16:52:37 +01:00
Lucas Fantacuci
ad3ec61d2f Implementing volume attribute into HTMLMediaElement 2018-12-12 11:50:35 -02:00
Fernando Jiménez Moreno
243b4e1a39 Do not set player EOS. Set input size only if it changes 2018-12-12 13:06:52 +01:00
Dan Robertson
62a9bfa0c5
script: Create structures for TextTrack API
Fill out the basics for the WebIDLs for the following:

  - TextTrack
  - TextTrackCue
  - TextTrackCueList
  - TextTrackList
2018-12-11 20:14:00 +00:00
Manish Goregaokar
5413328be2 Update webrender 2018-11-27 17:33:13 -08:00