servo/components/script
bors-servo 0051597525
Auto merge of #21158 - ferjm:webaudio, r=manishearth,nox,ferjm
WebAudio API

- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #6710
- [X] There are tests for these changes

This PR adds basic support for the WebAudio API using [servo-media](https://github.com/servo/media) with GStreamer as the audio backend.

There are still some major stuff to fix like:

- [x] Detach ArrayBuffer during the [AudioBuffer "acquire the content" operation](https://webaudio.github.io/web-audio-api/#acquire-the-content). I am naively using `JS_StealArrayBufferContents()` directly, because it is what Gecko uses, but this should probably be part of the [rust-mozjs](https://github.com/servo/rust-mozjs) [TypedArray](https://github.com/servo/rust-mozjs/blob/master/src/typedarray.rs) API. And, in any case, I am not even sure if that's the proper way to do it. According to the results of the WPTs it may not even be right since [this assertion](https://github.com/servo/rust-mozjs/blob/master/src/typedarray.rs#L285) is failing in some cases. I need to dig more about this.
- [x] Disable the GStreamer dependency on Android. Unfortunately gstreamer-rs requires an NDK version upgrade, so we need to disable this for Android until then. I tried adding [different features to servo-media](https://github.com/servo/media/pull/79), but I am currently hitting [this issue](https://github.com/rust-lang/cargo/issues/1197)

I still need to run servo-tidy, change the servo-media dependency to use the git repo and add/fix some comments and TODOs.

The remaining feature work should be done in future PRs.

Note that most of the failing WPTs are failing because we don't implement the tested features yet (we only implement a few AudioNodes) and we have no OfflineAudioContext support, which most WPTs rely on.

<!-- 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/21158)
<!-- Reviewable:end -->
2018-07-31 09:00:06 -04:00
..
docs
dom Auto merge of #21158 - ferjm:webaudio, r=manishearth,nox,ferjm 2018-07-31 09:00:06 -04:00
task_source use remote-event task source in EventSource 2018-07-13 13:56:46 +08:00
body.rs Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393 2018-03-28 21:28:30 +02:00
build.rs Use env::var_os to read paths from the environment 2017-10-20 09:03:21 -07:00
Cargo.toml Fix build errors after rebase 2018-07-30 14:23:45 +02:00
clipboard_provider.rs
CMakeLists.txt build(cmake): detect python binary for specified version 2018-03-13 09:25:06 -07:00
devtools.rs Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393 2018-03-28 21:28:30 +02:00
document_loader.rs implement window.stop, improve aborting document load 2018-07-29 16:42:54 +08:00
fetch.rs introduce "per task source" ignoring of tasks 2018-07-10 13:42:28 +08:00
layout_image.rs implement window.stop, improve aborting document load 2018-07-29 16:42:54 +08:00
lib.rs Remove recursion limit 2018-07-30 14:21:45 +02:00
mem.rs Pass new method in CollectServoSizes for accurate DOM heap use reporting 2018-03-27 20:35:39 -04:00
microtask.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
network_listener.rs
script_runtime.rs Pass new method in CollectServoSizes for accurate DOM heap use reporting 2018-03-27 20:35:39 -04:00
script_thread.rs use remote-event task source in EventSource 2018-07-13 13:56:46 +08:00
serviceworker_manager.rs
serviceworkerjob.rs added pipelines to all task sources 2017-10-25 14:25:58 +01:00
stylesheet_loader.rs introduce "per task source" ignoring of tasks 2018-07-10 13:42:28 +08:00
task.rs
test.rs Remove unused code for parsing a sizes attribute. 2018-07-01 10:53:42 +02:00
textinput.rs Correct default selectionStart and selectionEnd 2018-02-23 02:37:11 +05:30
timers.rs Updated to mozjs v0.7.1. 2018-05-30 14:44:47 -05:00
unpremultiplytable.rs
webdriver_handlers.rs Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393 2018-03-28 21:28:30 +02:00