Commit graph

6497 commits

Author SHA1 Message Date
Josh Matthews
6d3ff9f742
Remove unnecessary CEReactions.
This incorporates a spec update in https://github.com/whatwg/html/pull/3901.
2018-08-13 11:16:46 -04:00
Gregory Terzian
fee5428316 make auxiliary browsing-context script-closeable 2018-08-11 01:13:11 +02:00
Gregory Terzian
a0082c57c8 iframe: use value of name attr to set nested bc name 2018-08-11 01:13:11 +02:00
Gregory Terzian
21bf5a3a4b implement opener, disowning 2018-08-11 01:13:11 +02:00
Gregory Terzian
f408b798c4 implement window.open, create auxiliary browsing context 2018-08-11 01:12:55 +02:00
bors-servo
ea86eb64be
Auto merge of #21357 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See each individual commit.

<!-- 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/21357)
<!-- Reviewable:end -->
2018-08-07 20:27:24 -04:00
Josh Matthews
7c32ad7c3d Revert "Fix the build for NLL"
This reverts commit d1733aa502.
2018-08-07 20:24:55 -04:00
Emilio Cobos Álvarez
689293e4fb
Fix Servo build. 2018-08-08 01:34:35 +02:00
Simon Sapin
d1733aa502 Fix the build for NLL
Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build`

https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
2018-08-08 00:09:56 +02:00
bors-servo
2ceb8dcd22
Auto merge of #21218 - gterzian:root_cloned_blobs, r=jdm
Use a structured clone holder to store rooted clones

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #21164 (github issue number if applicable).

<!-- Either: -->
- [ ] 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/21218)
<!-- Reviewable:end -->
2018-08-07 12:49:25 -04:00
Gregory Terzian
a5d7cd1a7f use a structured clone holder to store rooted clones 2018-08-07 17:40:46 +02:00
Anthony Ramine
04c81c5cc3 Merge code from Draw* and Draw*Instanced methods
This made me realise we weren't supporting OES_element_index_uint in the
ANGLE_instanced_arrays extension.
2018-08-02 22:54:39 +02:00
bors-servo
c5aaae7333
Auto merge of #21324 - servo:webgl, r=emilio
Properly set initial values for WebGL texture filters

<!-- 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/21324)
<!-- Reviewable:end -->
2018-08-02 12:08:12 -04:00
Anthony Ramine
f7124886bc Use the DOM cache for gl.getTexParameter(gl.TEXTURE_*_FILTER)
Part of #20596.
2018-08-02 18:06:58 +02:00
Anthony Ramine
9e912be4ea Properly set initial values for WebGL texture filters 2018-08-02 15:53:57 +02:00
bors-servo
bde8a1e239
Auto merge of #21313 - jdm:glstuff, r=nox
Framebuffer and renderbuffer fixes

This commits address two separate panics that occur when running the framebuffer-object-attachment.html test. The test still panics due to another framebuffer completion status problem, so the overall test results don't demonstrate any improvement.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21252
- [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/21313)
<!-- Reviewable:end -->
2018-08-02 09:26:35 -04:00
Anthony Ramine
fba6d801a1 Always use a WebGLVertexArrayObject to handle vertex attribs
This lets us clean up how buffers are reference-counted.
2018-08-02 12:46:19 +02:00
Josh Matthews
03eb7e4dd2 webgl: Emulate some renderbuffer formats in non-GLES. 2018-08-02 02:05:53 -04:00
Josh Matthews
3334e477c1 webgl: Mark zero-sized framebuffers as incomplete attachments. 2018-08-01 15:40:46 -04:00
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
Anthony Ramine
15d1215949 Properly check for context ownership of objects passed to gl.is*() 2018-07-31 11:12:45 +02:00
Anthony Ramine
76f23f7d78 Simplify gl.getShaderParameter() (fixes #20562)
The expectation change is due to the shader now using its DOM-side compile status.
It is actually a bug for the shader to think it actually compiled successfully,
but at least it does so consistently now.
2018-07-31 11:12:45 +02:00
Anthony Ramine
a0fc4c9832 Fix program and shader lifetime cycle 2018-07-31 11:12:40 +02:00
Manish Goregaokar
2c19814bec 48000 -> 44100 2018-07-30 16:42:38 -07:00
Manish Goregaokar
a1fe48d721 Use JS_GetArrayBufferViewBuffer with JS_DetachArrayBuffer 2018-07-30 16:42:38 -07:00
Anthony Ramine
43463e80cb Remove an obsolete todo in gl.compileShader()
We get the uniform data etc at link-time.
2018-07-31 00:28:14 +02:00
Anthony Ramine
6af2ce79a2 Remove an obsolete todo in gl.attachShader()
Attaching the same shader twice should indeed emit an InvalidOperation error.
2018-07-31 00:28:14 +02:00
Fernando Jiménez Moreno
b738d9a912 Throw if AudioBufferSourceNode.Start params are negative 2018-07-30 19:54:55 +02:00
Fernando Jiménez Moreno
3b8cb83e04 Make OfflineAudioContextOptions spec compliant 2018-07-30 18:50:36 +02:00
Fernando Jiménez Moreno
ce828c0071 Get rooting out of AudioBuffer::new_inherited 2018-07-30 14:24:42 +02:00
Fernando Jiménez Moreno
6aaf5806b1 OfflineAudioContext 2018-07-30 14:23:48 +02:00
Fernando Jiménez Moreno
75dd050e57 Fix rebase mistake 2018-07-30 14:23:47 +02:00
Manish Goregaokar
00014b3f16 Add AudioParam connection support 2018-07-30 14:23:46 +02:00
Fernando Jiménez Moreno
acb03603b6 Fire AudioScheduledSourceNode.onended when playback stops 2018-07-30 14:23:46 +02:00
Fernando Jiménez Moreno
c9ff1b9f57 Enter compartment during AudioBuffer creation 2018-07-30 14:23:46 +02:00
Fernando Jiménez Moreno
596640595c Root JS channels during AudioBuffer construction 2018-07-30 14:23:46 +02:00
Fernando Jiménez Moreno
c617ca0d30 Remove commented code 2018-07-30 14:23:46 +02:00
Fernando Jiménez Moreno
477907e578 Do not copy initial data during AudioBuffer construction and use JS_DetachArrayBuffer 2018-07-30 14:23:45 +02:00
Fernando Jiménez Moreno
1649b6a528 Fix build errors after rebase 2018-07-30 14:23:45 +02:00
Fernando Jiménez Moreno
562e58ac49 AudioParam value getter 2018-07-30 14:21:48 +02:00
Fernando Jiménez Moreno
21cb160be3 test-tidy fixes 2018-07-30 14:21:48 +02:00
Fernando Jiménez Moreno
f0a691e474 Update servo-media after crate split up. Allows building for Android 2018-07-30 14:21:48 +02:00
Fernando Jiménez Moreno
b68c791b8d Remove unimplemented PeriodicWave stub 2018-07-30 14:21:48 +02:00
Fernando Jiménez Moreno
ebcbe2ff7d Mark DecodeResolver as must_root 2018-07-30 14:21:47 +02:00
Fernando Jiménez Moreno
8a6ea00f58 Reference issue to support the AudioScheduledSourceNode.ended event 2018-07-30 14:21:47 +02:00
Fernando Jiménez Moreno
3dde730f9b AudioParam automation rate setter 2018-07-30 14:21:47 +02:00
Fernando Jiménez Moreno
758ae94aa1 AudioNode channel related properties getter and setter fixes 2018-07-30 14:21:47 +02:00
Fernando Jiménez Moreno
abccf68a47 Clarify that servo-media deals with duplicated connections 2018-07-30 14:21:47 +02:00
Fernando Jiménez Moreno
b26a3bd31b rustfmt 2018-07-30 14:21:46 +02:00
Fernando Jiménez Moreno
3fc9ecace0 Make restore_js_channel_data unsafe 2018-07-30 14:21:46 +02:00