Commit graph

6740 commits

Author SHA1 Message Date
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
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
Pyfisch
c8619424f2 Minor keyboard updates
Support combined character input from winit.
Make use of utility methods from keyboard-types.
Remove prinatable attribute of KeyboardEvent.
2018-10-13 20:30:30 +02:00
bors-servo
e4657c1496
Auto merge of #21931 - jdm:reload-images, r=emilio
Make layout use available image data before querying the image cache.

These changes make layout more efficient for any page which contains images that have already loaded, since it does not require synchronously querying the image cache thread for each image present. It also makes reloading a page actually display the images that are already in the image cache.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21919
- [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/21931)
<!-- Reviewable:end -->
2018-10-13 07:56:11 -04:00
bors-servo
a9eaed44d5
Auto merge of #21927 - Eijebong:unicode_serialization, r=jdm
Remove Origin::unicode_serialization

Fixes #20701

<!-- 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/21927)
<!-- Reviewable:end -->
2018-10-12 21:57:34 -04:00
Josh Matthews
49d2ea4f74 Make layout use available image data before querying the image cache. 2018-10-12 21:55:09 -04:00
bors-servo
fa94fc7146
Auto merge of #21922 - Eijebong:storage, r=SimonSapin
Add support for StorageEvent.initstorageevent()

Fixes #21874

<!-- 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/21922)
<!-- Reviewable:end -->
2018-10-12 14:16:07 -04: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
est31
af0f7db909 Implement basic <source> support 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 commit 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.
2018-10-12 15:29:57 +02:00
bors-servo
5f463d3c97
Auto merge of #21911 - servo:webgl, r=jdm
Simplify ctx.drawImage a bit

There is no need to swap between RGBA and BGRA twice.

<!-- 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/21911)
<!-- Reviewable:end -->
2018-10-12 04:45:11 -04:00
Bastien Orivel
a97ba4f57d Remove Origin::unicode_serialization
Fixes #20701
2018-10-12 10:25:03 +02:00
Manish Goregaokar
40641ac8a4 More accurate names for .started and .stopped 2018-10-11 14:28:05 -07:00
Bastien Orivel
5347e25d1a Add support for StorageEvent.initstorageevent()
Fixes #21874
2018-10-11 22:17:46 +02:00
Fernando Jiménez Moreno
091ad49d68 Allow reusing AudioBuffers 2018-10-11 19:27:21 +02:00
Anthony Ramine
bb2101f540 Simplify ctx.drawImage a bit
There is no need to swap between RGBA and BGRA twice.
2018-10-11 15:46:42 +02:00
bors-servo
ddcb72f750
Auto merge of #21906 - Manishearth:minor-webaudio-fixes, r=ferjm
Minor WebAudio fixes

Stuff I discovered whilst working on https://github.com/servo/media/pull/148

r? @ferjm

<!-- 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/21906)
<!-- Reviewable:end -->
2018-10-11 08:46:18 -04:00
Manish Goregaokar
600f997a51 Increase webaudio sample rate threshold to match firefox 2018-10-10 17:32:12 -07:00
Manish Goregaokar
ceb2cd2279 Handle case when OfflineAudioContext doesn't receive all the buffers 2018-10-10 16:29:43 -07:00
chansuke
7b3cf27c69 Add task source for media element 2018-10-10 22:15:37 +09:00
bors-servo
7a88a2e28a
Auto merge of #21877 - servo:webgl, r=jdm
Improve some byte-swap and premultiply operations

<!-- 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/21877)
<!-- Reviewable:end -->
2018-10-09 20:15:40 -04:00
Anthony Ramine
6c469b90b1 Share some code between 2D canvas and WebGL 2018-10-09 14:57:02 +02:00
bors-servo
3b153af49c
Auto merge of #21543 - ceyusa:wip-player, r=<try>
Add <audio> and <video> player backends

These patches enables audio and video playing inside Servo.

It is bit hackish way to enable it, thus the purpose of this pull request is for an early request for comments.

It is tested with the current servo-media GStreamer backend in Linux.

~~The produced layout is not correct, since the elements after the video seems to be stacked behind, and the same with the scrolling bars.~~

~~There is no JavaScript interface yet~~, neither controls.

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

<!-- 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/21543)
<!-- Reviewable:end -->
2018-10-09 04:15:18 -04:00
bors-servo
552af0043a
Auto merge of #21785 - sumit0190:new_markasdirty, r=jdm
Add framebuffer check for mark_as_dirty, #21691

<!-- Please describe your changes on the following line: -->
Check `bound_framebuffer` in each `mark_as_dirty` call, so that we don't dirty the canvas if we don't have a bound framebuffer.

---
<!-- 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 #21691  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because there isn't a direct way to test it (yet).

<!-- 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/21785)
<!-- Reviewable:end -->
2018-10-08 21:45:55 -04:00
Fernando Jiménez Moreno
11ac049d27 Make sure we do not skip the HaveMetadata state. Fixes a bunch of tests 2018-10-08 16:12:04 +02:00
Fernando Jiménez Moreno
6b0acc9cd8 Handle Player errors 2018-10-08 16:12:04 +02:00
Fernando Jiménez Moreno
0db628028a Update servo-media: handle decoder errors and use safer/nicer player API 2018-10-08 16:12:04 +02:00
Fernando Jiménez Moreno
e31339245c Move player setup to common path, deal with setup error and clean debug msgs 2018-10-08 16:12:04 +02:00
Víctor Manuel Jáquez Leal
59d8c95b23 Network EOF does't imply media processing EOS
Since media processing is highly asynchronous, there is no need to
match one event with the other. Then error handling is done when
the player emits the EOS event.

The have_metadata attribute is not required anymore.
2018-10-08 16:12:03 +02:00
Fernando Jiménez Moreno
1c92240310 Fix HAVE_METADATA and HAVE_CURRENT_DATA state transitions 2018-10-08 16:12:03 +02:00