Commit graph

7985 commits

Author SHA1 Message Date
Anthony Ramine
087e6d649b Report the stylesheet URL when reporting CSS errors 2019-01-14 16:51:28 +01:00
Anthony Ramine
e57d09abb8 Make Window::scroll_offsets store keys as OpaqueNode values
This is the type that is supposed to signal that we will never ever
try to get back a Node from it in an unsafe way, unlike
UntrustedNodeAddress.
2019-01-14 16:51:26 +01:00
Anthony Ramine
fc75719ff2 Remove BlockFlowDisplayListBuilding
Replaced by inherent methods on BlockFlow, the only implementor of that trait.
2019-01-14 10:37:41 +01:00
Anthony Ramine
64755705fb Move CSSReporter from script_layout_interface to script 2019-01-14 10:26:26 +01:00
Anthony Ramine
17ee21bf9d Rename NewLayoutThreadInfo to LayoutThreadInit
Following the convention of our other init structs.
2019-01-14 10:26:25 +01:00
Emilio Cobos Álvarez
122f8ed1bb Update references to malloc_size_of_derive, which is in crates.io now. 2019-01-13 21:59:31 +01:00
bors-servo
c7cd1b83a1
Auto merge of #22648 - collares:ChannelSplitterNode, r=Manishearth
Implement DOM APIs for ChannelSplitterNode

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

Based on #21591. Fixes #21558. I tried to update the expected results for WPT using "./mach update-wpt"; let me know if I got something wrong.

---
<!-- 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 the second half of #21558

<!-- Either: -->
- [x] There are web-platform-tests 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/22648)
<!-- Reviewable:end -->
2019-01-12 14:11:26 -05:00
bors-servo
f2b224d610
Auto merge of #22666 - CYBAI:urlsearchparams-no-trailing-q, r=nox
Remove trailing ? when updating URLSearchParams

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22639
- [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/22666)
<!-- Reviewable:end -->
2019-01-11 15:00:31 -05:00
bors-servo
90c0d27ce7
Auto merge of #22676 - ferjm:textrack.activecues, r=jdm
Expose TextTrack.activeCues

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

This only exposes the `activeCues` property to make sure that `/html/semantics/embedded-content/media-elements/track/track-element/track-active-cues.html` timeouts consistently.

<!-- 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/22676)
<!-- Reviewable:end -->
2019-01-11 11:42:15 -05:00
Fernando Jiménez Moreno
69a79c7d75 Expose TextTrack.activeCues 2019-01-11 17:05:25 +01:00
bors-servo
b49e7517a3
Auto merge of #22522 - ferjm:av.playback.improvements, r=Manishearth
HTMLMediaElement backoff protocol and other improvements to a/v playback

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

This PR implements a backoff protocol to keep us from dropping frames whenever it's possible. It also add some other improvements like:
- Clean up the implementation a little bit by adding all fetch request related state to `HTMLMediaElementFetchContext`.
- Make sure that we ignore responses from old requests.
- Set the stream to seekable iff there's support for range requests. This will likely change when we add the media cache.
- Implements part of [step 8 of the seek spec](https://html.spec.whatwg.org/multipage/media.html#dom-media-seek) where we bail out if the stream is not seekable.

<!-- 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/22522)
<!-- Reviewable:end -->
2019-01-11 08:00:39 -05: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
Mauricio Collares
1209cf16a8 Always throw when asked to change some ChannelMergerNode properties 2019-01-10 11:58:17 -05:00
Mauricio Collares
ff0cf9e93a Implement DOM APIs for ChannelSplitterNode 2019-01-10 11:58:10 -05:00
bors-servo
160842b8c1
Auto merge of #22669 - georgeroman:ignore_children_of_void_when_serializing, r=jdm
Ignore children of void elements when serializing

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

<!-- 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/22669)
<!-- Reviewable:end -->
2019-01-10 10:28:13 -05:00
CYBAI
ae965d6d8d Set query to None when no search params 2019-01-10 22:43:29 +08:00
George Roman
f7db5743f4 Ignore children of void elements when serializing 2019-01-10 16:07:12 +02:00
bors-servo
4ac5b8a3ae
Auto merge of #22477 - ferjm:media_time_marches_on_step_6, r=jdm
Implement step 6 of media `time marches on` algorithm. Improves stability of media WPTs

- [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

This should help with the WPTs problems observed in https://github.com/servo/servo/pull/22348#issuecomment-446369831

Unfortunately, GStreamer does not seem to be very reliable with Ogg (check https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/520) and most of the media-element WPTs uses a short ogv file, so I had to make our `canPlayType` report that it is not able to play this type to make the tests pick the alternative mp4 version of the same files. Once Ogg support for GStreamer improves, we should be able to revert this change.

<!-- 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/22477)
<!-- Reviewable:end -->
2019-01-10 06:52:57 -05:00
bors-servo
106f1377d2
Auto merge of #22599 - aditj:patch-1-re, r=ferjm
Implement performance interface extension for PerformanceResourceTiming

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

(There is a previous closed pull for this #22431)
Implemented the following :
a) Added the maxSize Field to the PerformanceEntryList structure.
b) Implemented the clearResourceTimings, setResourceTimingBufferSize, onresourcetimingbufferfull fuctions for the Performance Structure according to the Interface Specification given at : https://w3c.github.io/resource-timing/#sec-extensions-performance-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 #22307 (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/22599)
<!-- Reviewable:end -->
2019-01-10 03:10:06 -05:00
bors-servo
2e15cf0f81
Auto merge of #22638 - CYBAI:urlsearchparams-sort, r=nox
Implement URLSearchParams.prototype.sort()

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22545
- [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/22638)
<!-- Reviewable:end -->
2019-01-09 21:37:57 -05:00
Anthony Ramine
3ccda7f90c Make a bunch of layout queries morally safer 2019-01-09 14:12:54 +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
bors-servo
44cbe969e2
Auto merge of #22649 - Manishearth:xr-promises, r=jdm
Make XR/VR presenting code async

Previously we only pretended to be async, we returned promises that were already resolved because we synchronously blocked on the channel.

This:

 - Moves XR presentation to session creation (where it belongs, see https://github.com/immersive-web/webxr/issues/453)
 - Factors out common presentation code in a way that supports asynchronously resolving promises
 - Uses this for `VRDisplay::RequestPresent()` and `XR::RequestSession()`

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/22649)
<!-- Reviewable:end -->
2019-01-08 20:42:37 -05:00
adit
3ca82471c8 Implement performance interface extension for PerformanceResourceTiming 2019-01-09 01:09:08 +05:30
bors-servo
e7a0a4437b
Auto merge of #22640 - heh9:master, r=jdm
Make create_typed_array an unsafe function

<!-- Please describe your changes on the following line: -->
Make `create_typed_array` function in `components/script/dom/vrframedata.rs` an unsafe function as it accepts an unsafe pointer
Wrapped the function calls into an unsafe block in `components/script/dom/xrview.rs` and `components/script/dom/vrframedata.rs`

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because the reporter of the issue said it's fine if it compiles with no warning or errors

<!-- 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/22640)
<!-- Reviewable:end -->
2019-01-08 12:38:08 -05:00
bors-servo
7c8de38572
Auto merge of #22563 - dlrobertson:htmltextelement, r=ferjm
script: Implement the HTMLTrackElement API

Implement the basics of the HTMLTrackElement and update the wpt tests.

- [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

Fixes: https://github.com/servo/servo/issues/22313

<!-- 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/22563)
<!-- Reviewable:end -->
2019-01-08 09:15:21 -05:00
Dan Robertson
c4802076b3
script: Implement the HTMLTrackElement API
Implement the basics of the HTMLTrackElement and update the wpt tests.
2019-01-08 13:23:38 +00:00
bors-servo
a0ba56cdf0
Auto merge of #22645 - emilio:gecko-sync, r=emilio,mbrubeck
style: Sync changes from mozilla-central.

See each individual commit for details.

<!-- 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/22645)
<!-- Reviewable:end -->
2019-01-08 06:33:28 -05:00
Emilio Cobos Álvarez
2a6cdaa30a Rustfmt recent changes. 2019-01-08 12:01:28 +01:00
Emilio Cobos Álvarez
c7f30ad0df style: Fix servo build. 2019-01-08 12:01:11 +01:00
Emilio Cobos Álvarez
4a31509215 style: Fix servo build.
This also fixes a bunch of calc handling issues and such.

Also remove tests that no longer compile and are covered by WPT.
2019-01-08 12:00:42 +01:00
CYBAI
f43c604bf3 Implement URLSearchParams.prototype.sort() 2019-01-08 16:48:19 +08:00
CYBAI
b5276194f4 Combine two impls into one 2019-01-08 15:54:40 +08:00
Manish Goregaokar
e2522d36ff Use async VR presentation code for XRSession 2019-01-07 23:43:04 -08:00
Manish Goregaokar
9ddbf68cb3 Make VR presentation code async; use for VRDisplay::RequestPresent 2019-01-07 23:43:04 -08:00
Josh Matthews
ec6a936f5c Use incumbent global for postmessage origin check. 2019-01-07 22:19:26 -05:00
Josh Matthews
51ab14086c Synchronously update the pipeline of same-origin iframe elements as soon as the child document begins parsing. 2019-01-07 22:19:26 -05:00
Josh Matthews
45619db0ba Provide the source window as part of postMessage events. 2019-01-07 22:19:25 -05:00
Manish Goregaokar
90e87b97ba Init XR present on XR::RequestSession() with empty context 2019-01-07 15:24:26 -08:00
Emilio Cobos Álvarez
97bd8fc280 Fix Servo build. 2019-01-07 00:59:30 +01:00
Vladimir Iacob
8a615fc880 mark create_type_array as unsafe in vrframedata component 2019-01-06 19:05:39 +02:00
Manish Goregaokar
4328fc23a7 Clean up HTMLMediaElement::Play 2019-01-04 15:05:07 -08:00