Commit graph

1579 commits

Author SHA1 Message Date
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
Simon Sapin
4464354e2e Reformat 2019-02-26 08:18:33 +01:00
Manish Goregaokar
407d88f97d Update servo-media 2019-02-13 10:04:52 -08: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
Manish Goregaokar
8b0719a6f2 Add MediaDevices::GetUserMedia 2019-01-29 11:37:00 -08:00
Manish Goregaokar
e0d8de2714 Fill in some of RTCPeerConnection, add signaller 2019-01-28 22:21:42 -08:00
bors-servo
fb95f9df9c
Auto merge of #22353 - jdm:runtime-parent, r=nox
Update rust-mozjs

These changes adjust our uses of the rust-mozjs APIs to accommodate the changes in https://github.com/servo/rust-mozjs/pull/450.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22342.
- [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/22353)
<!-- Reviewable:end -->
2019-01-17 15:57:30 -05:00
Josh Matthews
644101e1e4 Update to new JS runtime creation APIs. 2019-01-15 14:00:05 -05: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
64755705fb Move CSSReporter from script_layout_interface to script 2019-01-14 10:26:26 +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
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
6c2c3f75b9 Implement step 6 of media element 'time marches on' algoritm 2019-01-09 09:28:42 +01: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
5f422b6161 Upgrade to rustc 1.33.0-nightly (c0bbc3927 2019-01-03)
CC https://github.com/rust-lang/rust/issues/56105#issuecomment-451457706
2019-01-04 15:27:12 +01:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
CYBAI
115b73f636 Use IndexMap for WebIDL Record 2018-12-26 18:05:43 +08:00
bors-servo
27577955aa
Auto merge of #22456 - dlrobertson:fix_src, r=ferjm
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]

Fixes: #22454

[HTMLIFrameElement]: https://html.spec.whatwg.org/multipage/#htmliframeelement
[HTMLImageElement]: https://html.spec.whatwg.org/multipage/#htmlimageelement
[HTMLInputElement]: https://html.spec.whatwg.org/multipage/#htmlinputelement
[HTMLLinkElement]: https://html.spec.whatwg.org/multipage/#htmllinkelement
[HTMLMediaElement]: https://html.spec.whatwg.org/multipage/#htmlmediaelement
[HTMLScriptElement]: https://html.spec.whatwg.org/multipage/#htmlscriptelement

<!-- 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/22456)
<!-- Reviewable:end -->
2018-12-22 23:50:40 -05: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
Josh Matthews
fc2d810bce Delay iframe and script element processing until the DOM is stable. 2018-12-14 13:12:49 -05:00
Josh Matthews
14b0de30db Prevent JS execution and layout operations while DOM in inconsistent state. 2018-12-14 13:12:47 -05:00
Anthony Ramine
a2abfc6301 Make the parser decode input from document's encoding
The document's encoding is only computed from the Content-Type header for now,
with no sniffing at all.
2018-12-12 13:50:27 +01:00
Anthony Ramine
b4448a9fe7 Use Utf8LossyDecoder instead of IncompleteUtf8 2018-12-05 16:39:07 +01:00
ddh
26007fddd3 refactored performance timing to align with updated spec
refactoring with ResourceFetchMetadata

implemented deprecated window.timing functionality

created ResourceTimingListener trait

fixed w3c links in navigation timing

updated include.ini to run resource timing tests on ci
2018-11-20 16:21:32 +00:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
bors-servo
94991db145
Auto merge of #22202 - servo:webgl, r=jdm
Clean up some code on the WebGL texture upload paths

This doesn't actually change anything… 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/22202)
<!-- Reviewable:end -->
2018-11-17 02:35:22 -05:00
Anthony Ramine
adf363a208 Move prepare_pixels helper functions to canvas_traits 2018-11-16 12:37:31 +01:00
Jim Berlage
1f99bf4631 Fixes panic on DOMString::strip_leading_and_trailing_ascii_whitespace 2018-11-08 16:16:28 -06:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
095d446ccd Manually format remaining problems
Use line comments instead of block comments
as block comments contain trailing whitespace
after formatting with rustfmt.

Skip tests for malloc_size_of and script_plugins
with rustfmt as they have many block comments.
2018-11-06 22:30:31 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Simon Sapin
9f9bf8f6bc Switch most crates to the 2018 edition 2018-11-06 16:12:04 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Simon Sapin
acabd50f03 Use 2018-style paths in generated DOM bindings 2018-11-06 15:14:17 +01:00
bors-servo
200cc8aa6b
Auto merge of #22084 - KiChjang:idl-default-empty-array, r=jdm
Handle default empty sequence values

Fixes #22077.

<!-- 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/22084)
<!-- Reviewable:end -->
2018-11-01 18:13:49 -04:00
Keith Yeung
99589d2f2a Handle default empty sequence values 2018-11-01 14:54:23 -07:00
Bastien Orivel
024b40b39d Update hyper to 0.12 2018-11-01 19:17:36 +01:00
bors-servo
e580250d5d
Auto merge of #21988 - CYBAI:drop-promises, r=jdm
Clear refcounted promise before dropping JSRuntime

Not sure if this is the right solution?

I also tried to `impl Drop for LiveDOMReferences` but it's still executed after dropping JSRuntime.
So, maybe we should clear it before dropping the JSRuntime?

cc @jdm @asajeffrey

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21331 .
- [x] There are tests for these changes; the status of `fetch/cross-origin-resource-policy/fetch-in-iframe.html` will be `OK`

<!-- 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/21988)
<!-- Reviewable:end -->
2018-10-29 08:31:12 -04:00
CYBAI
bca951d79e Drop TrustedPromise before dropping JSRuntime 2018-10-21 21:30:19 +08:00
CYBAI
8b28921136 Make expectionCode of Promise have newline character automatically
In the `fill` method, it will check if the exception code is empty
string or has newline character in the end of string or not. However, we
didn't do any change to exceptionCode when type is Promise. Thus, we add
the newline character to make it pass the checking in `fill` method.

See more detail from the log of IRC: https://mozilla.logbot.info/servo/20180501#c14692647
2018-10-18 01:38:27 +08:00
bors-servo
69e5243810
Auto merge of #21856 - zcorpan:zcorpan/remove-td-th-interfaces, r=jdm
Remove the HTMLTable{Header,Data}CellElement interfaces

Fixes #17222.

<!-- Please describe your changes on the following line: -->
This removes the `HTMLTableHeaderCellElement` and `HTMLTableDataCellElement` interfaces and uses the `HTMLTableCellElement` interface for both `th` and `td` elements, as per the spec.

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

<!-- 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/21856)
<!-- Reviewable:end -->
2018-10-12 09:30:41 -04:00
Fernando Jiménez Moreno
6b0acc9cd8 Handle Player errors 2018-10-08 16:12:04 +02:00
Fernando Jiménez Moreno
72b1df343e Move unsafe_no_jsmanaged_fields to trace 2018-10-08 16:12:01 +02:00