Commit graph

6767 commits

Author SHA1 Message Date
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
bors-servo
741bd8e739
Auto merge of #22087 - Eijebong:rust_serialize, r=jdm
Remove rustc-serialize from the dependencies

Closes #12410.

<!-- 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/22087)
<!-- Reviewable:end -->
2018-11-07 16:07:38 -05:00
bors-servo
b93d4b2ac6
Auto merge of #22129 - ferjm:media.task.source, r=Manishearth
HTMLMediaElement - use media element instead of dom manipulation task…

… source

- [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/22129)
<!-- Reviewable:end -->
2018-11-07 12:16:58 -05:00
Bastien Orivel
221199d277 Remove rustc-serialize from the dependencies 2018-11-07 17:33:23 +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
Fernando Jiménez Moreno
ebe6c3fac3 HTMLMediaElement - use media element instead of dom manipulation task source 2018-11-06 20:15:14 +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
7a3daac613
Auto merge of #22112 - servo:webgl, r=jdm
Implement WEBGL_color_buffer_float and EXT_color_buffer_half_float

<!-- 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/22112)
<!-- Reviewable:end -->
2018-11-06 00:04:43 -05:00
Josh Matthews
e31462c37c Implement WEBGL_color_buffer_float and EXT_color_buffer_half_float (fixes #22113) 2018-11-05 14:13:46 +01:00
Bastien Orivel
08a535a4cb Use a BTreeMap to store formdata
I'm really unsure about the MallocSizeOf of BTreeMap as I took the same
code as for HashMap.

Fixes #13105
Fixes #21381
2018-11-05 08:20:31 +01:00
CYBAI
0a82cea555 Update to new ServiceWorker spec link 2018-11-04 17:26:48 +08: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
8350c5e1ff
Auto merge of #22049 - ferjm:timeranges, r=jdm
Implement TimeRanges interface

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

Spec: https://html.spec.whatwg.org/multipage/media.html#time-ranges

<!-- 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/22049)
<!-- Reviewable:end -->
2018-10-31 13:37:05 -04:00
Fernando Jiménez Moreno
664d5cd2fa Implement TimeRanges interface 2018-10-31 18:35:53 +01:00
Fernando Jiménez Moreno
35508c152a HTMLMediaElement - fire durationchange and resize iff something changes 2018-10-30 12:02:42 +01:00
bors-servo
2f8dc65519
Auto merge of #21976 - notriddle:iframe-target-form-race, r=jdm
Assign a name to iframes when loading the initial about:blank

Before, it would assign the name too late, causing scripts (which will not wait for another tick) to accidentally spawn pop-up windows instead of loading into the iframe.

---
<!-- 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 #21886
- [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/21976)
<!-- Reviewable:end -->
2018-10-29 15:29:31 -04: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
Fernando Jiménez Moreno
7bf1944007 Rename seek_sync to seek_end 2018-10-26 10:22:00 +02:00
Fernando Jiménez Moreno
aa3c911efa HTMLMediaElement.seek: clean-up and update WPTs expectations 2018-10-26 10:22:00 +02:00
Fernando Jiménez Moreno
d94cbc83fc Fix loadedmetadata event handler 2018-10-26 10:21:27 +02:00
Fernando Jiménez Moreno
1f182d0bbd Remove seekable flag 2018-10-26 10:21:27 +02:00
Fernando Jiménez Moreno
44133bfb3c Byte range request for HTMLMediaElement seeking 2018-10-26 10:21:26 +02:00
Fernando Jiménez Moreno
75407822bc HTMLMediaElement seeking 2018-10-26 10:19:52 +02:00
Fernando Jiménez Moreno
2db141fb8b Setter and getter for HTMLMediaElement.currentTime 2018-10-26 10:17:32 +02:00
Fernando Jiménez Moreno
21f67a99f5 Update servo-media to fix intermittent timeouts 2018-10-24 16:36:50 +02:00
bors-servo
b19f9d9c5b
Auto merge of #21999 - asajeffrey:script-dummy-media-position-changed, r=ferjm
Update servo-media

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

Get servo to compile against servo-media master.

---
<!-- 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 updating a dependency

<!-- 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/21999)
<!-- Reviewable:end -->
2018-10-23 15:24:24 -04:00
bors-servo
30d9962b70
Auto merge of #20755 - CYBAI:unhandled-rejection, r=jdm
Implement unhandledrejection event

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15412
- [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/20755)
<!-- Reviewable:end -->
2018-10-23 10:56:38 -04:00
Alan Jeffrey
4282141c14 Updated servo-media 2018-10-22 19:39:36 -05:00
CYBAI
bca951d79e Drop TrustedPromise before dropping JSRuntime 2018-10-21 21:30:19 +08:00
Michael Howell
eafcd91760 Assign a name to iframes when loading the initial about:blank
Before, it would assign the name too late,
causing scripts (which will not wait for another tick)
to accidentally spawn pop-up windows instead of loading
into the iframe.
2018-10-19 00:21:06 +00:00
Emilio Cobos Álvarez
856886c40d
Fix Servo build. 2018-10-19 01:01:27 +02:00
bors-servo
bcafe4188f
Auto merge of #21961 - servo:webgl, r=jdm
Properly support gl_PointSize and gl_PointCoord

Fixes #21719.
Fixes #20993.
Fixes #20992.
Fixes #21007.
Fixes #20979.

<!-- 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/21961)
<!-- Reviewable:end -->
2018-10-18 14:16:01 -04:00
Anthony Ramine
8828925f4f Properly support gl_PointSize and gl_PointCoord
Fixes #21719.
Fixes #20993.
Fixes #20992.
Fixes #21007.
Fixes #20979.
2018-10-18 20:15:23 +02:00
CYBAI
42903412c7 Make first argument of DOMManipulationTaskSource as a Box<ScriptChan +
Send>

We don't have `window` for `workers`. So, if we use `global.as_window()`
to get the DOMManipulationTaskSource, it will make worker panic.
Instead, we should get the DOMManipulationTaskSource from each own
thread.

Ref: https://github.com/servo/servo/pull/20755#discussion_r193557746
2018-10-18 19:13:23 +08:00
CYBAI
924a78c6c6 Implement unhandledrejection event 2018-10-18 19:13:22 +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
9a0404ac5f
Auto merge of #21881 - pyfisch:keyboard-types, r=paulrouget
Use keyboard-types crate

Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent
from the W3C UI Events spec. All keyboard handling now uses the new types.

Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now
recognized in a uniform way.

Updated the winit port.
Updated webdriver integration.

part of #20331

What this PR does:

* allow the use non-ASCII keyboards for text input
* decouple keyboard event "key" from "code" (key meaning vs location)

What this PR does not do:

* completely improve keyboard events send from winit and webdriver
* add support for CompositionEvent or IME

Notes:

* The winit embedder does not send keyup events for printable keys (this is a regression)
* keyboard-types is on crates.io because I believe it to be useful outside of servo. If you prefer I can add a copy in this repo.

<!-- 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/21881)
<!-- Reviewable:end -->
2018-10-17 05:36:08 -04:00
bors-servo
a77ad4288c
Auto merge of #21959 - servo:webgl, r=jdm
Fix a couple of Drop implementations for WebGL objects

<!-- 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/21959)
<!-- Reviewable:end -->
2018-10-16 08:16:28 -04:00
Anthony Ramine
c010ae88cd Remove assertion in Drop for WebGLBuffer 2018-10-16 11:19:58 +02:00
Anthony Ramine
3511e52092 Implement Drop for WebGLRenderbuffer 2018-10-16 11:19:58 +02:00
bors-servo
4625160f0a
Auto merge of #21882 - dguenther:update-document-open, r=nox
Update document.open to latest spec

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

This is one of my first contributions, so I might need some direction cleaning it up -- I ran web-platform-tests locally, but the suite has several intermittent passes/failures for me. Thanks!

Few notes:

* I may have been wrong to eliminate all of the resets listed in what was formerly Step 18 (starts with `self.implementation.set(None);`). It's not clear to me that they're still needed or if so, what step they would fall under, but I didn't notice any web platform tests break as a result.
* <s>If I'm reading the spec right, there's a discrepancy in the error returned by the three-parameter overload of Document.open between the spec and web-platform-tests/implementations in other browsers. As written, I favored the spec, but it causes one web-platform-test to fail.</s> This has been resolved in https://github.com/whatwg/html/pull/4066
* I'm not 100% certain that tests pass as expected, I had several intermittent failures that disappeared when re-run.

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

<!-- Either: -->
- [x] There are tests for these changes (existing web-platform-tests)

<!-- 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/21882)
<!-- Reviewable:end -->
2018-10-16 04:50:43 -04:00
bors-servo
1652fe2a91
Auto merge of #21923 - est31:master, r=ferjm
🐈🐈🐈 Implement basic <source> take-first-then-fail algo for HtmlMediaElement

The spec has a complicated algorithm for selecting a <source>
element among multiple <source> children of a HtmlMediaElement
where it loops over all of them, tries each and takes the first
where "everything works out".

This PR implements a much simpler and restricted approach by
just taking the first <source> child, and if that fails,
failing altogether, without looking at any further children.

This is an improvement over the current status and makes gifv
items on imgur playable, although it doesn't mean full <source>
support.

See it in action: https://i.imgur.com/WoEhYj3.gifv

<!-- 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
- [ ] These changes fix #__ (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/21923)
<!-- Reviewable:end -->
2018-10-16 01:23:08 -04:00
Derek Guenther
1538587f2f Update document.open to latest spec 2018-10-15 20:07:40 -05:00