Commit graph

7788 commits

Author SHA1 Message Date
bors-servo
7aa68c8fe7
Auto merge of #25025 - Manishearth:originOffset, r=jdm
Origin offset fixes

https://github.com/immersive-web/webxr/issues/567 was closed out. We were computing offset spaces of already-offset spaces incorrectly, but otherwise our math is correct. I improved our comments around this with more math, so I never have to do this math again.

Chrome's math isn't, which is why we fail some tests around this: https://bugs.chromium.org/p/chromium/issues/detail?id=1030049 . I'm planning to wait for them to fix and upstream the tests, I've already verified that we pass the corrected test.

r? @jdm
2019-12-03 00:11:14 -05:00
Manish Goregaokar
ba3689ee4f Origin offset fixes 2019-12-02 17:11:05 -08:00
bors-servo
87c1019c5d
Auto merge of #24940 - Eijebong:trim-header, r=jdm
Trim header values in GetResponseHeader

Fixes #24917
2019-12-02 17:47:24 -05:00
Emilio Cobos Álvarez
226c9807df
style: Fix servo build. 2019-11-30 20:45:08 +01:00
Bastien Orivel
a91176e7fc Trim header values in GetResponseHeader
Fixes #24917
2019-11-30 16:59:10 +01:00
bors-servo
3db473714b
Auto merge of #24670 - glowe:add-crlf-to-boundary, r=Manishearth
Add CRLF to encoded multipart form data

<!-- Please describe your changes on the following line: -->
Some (3) WPT tests were failing because they expected the body for a multipart form data response to end with a CRLF. So I updated encode_multipart_form_data to add the missing terminator.

Looking at the corresponding spec (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart%2Fform-data-encoding-algorithm) and RFC (https://tools.ietf.org/html/rfc7578), I couldn't find anything mentioned about this detail.

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

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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. -->
2019-11-29 20:21:38 -05:00
glowe
3d322f96e3 Add CRLF to encoded multipart form data
Some WPT tests were failing because they expected the body for a
multipart form data response to end with a CRLF. So I updated
encode_multipart_form_data to add the missing terminator.
2019-11-29 17:29:39 -05:00
bors-servo
b0012a62b2
Auto merge of #24883 - szeged:id_management, r=jdm
Add WebGPU identity management

<!-- 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
- [X] These changes addresses a part of #24706

<!-- 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.-->
cc @jdm, @kvark, @zakorgy
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2019-11-28 11:05:19 -05:00
Istvan Miklos
b26598d470 Add WebGPU identity management
Issue: https://github.com/servo/servo/issues/24706#issuecomment-557891841
2019-11-28 10:33:03 +01:00
bors-servo
5f1681ad25
Auto merge of #24875 - jdm:wr-no-ipc, r=asajeffrey
Extract IPC out of webrender

Fixes #20172. Fixes #13480.
2019-11-27 20:48:13 -05:00
Josh Matthews
564c16d754 Use non-IPC webrender API over explicit IPC channels. 2019-11-27 20:47:53 -05:00
Kagami Sascha Rosylight
e20de3b04a Handle u32 property indices 2019-11-27 15:50:04 +09:00
bors-servo
a922c497fa
Auto merge of #24758 - gterzian:impl_timer_task_source, r=nox
Implement timer-task-source, time-out service worker

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

Implements the timer task-source, and folds the IPC glue-code into a single route set by the globalscope.

Also switches service worker to using a dedicated "time-out" mechanism, which previously relied on the timer mechanism(and I think didn't actually implement script timers).

---
<!-- 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 #24747 (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. -->
2019-11-26 16:26:20 -05:00
bors-servo
8e0aa68aaa
Auto merge of #24783 - mmatyas:webgl_fns_readpixels, r=nox
Add support for WebGL2 ReadPixels functions

Adds support for the new ReadPixels functions introduced with WebGL2 and the relevant PixelStorei parameters..

Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.10

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

---

This is a work in progress patch, but I think it might be ready for comments. There are a few issues left:

- When the target is the pixel pack buffer, the GL function expects a byte offset as a pointer. In Sparkle the `read_pixels` functions return/work on top of arrays, so for now I've made a [workaround patch](45d8bb263d). I wonder if that's okay or should we do it somehow differently?
- When writing to the pixel pack buffer, padding bytes on the destination are properly ignored. When writing to client buffers, Sparkle `read_pixels` returns a buffer with 1 byte alignment, which I think is fine (less stuff to move between threads), but requires positioning the rows manually (see the bottom of `read_pixels_into` vs. `ReadPixels_`).
- There are some duplicated code between the array buffer and pixel pack buffer variants, eg. the detection of intersection with the framebuffer. This could be refactored, but that results in a function with `Result<Option<Rect<u32>>, WebGLError>`, which I'm not sure is readable enough to help.
- There is a duplication with the WebGL1 code. WebGL2 introduces row length, skip pixels and skip rows as pixel pack parameters which affect the ReadPixels operation. The helper functions could be moved to be usable in WebGL1, but then these new modifiers would also need to be passed as a function parameter, which is somewhat ugly (but would work). What's your opinion about this?

cc @jdm @zakorgy

---
<!-- 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] There are tests for these changes

<!-- 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. -->
2019-11-26 12:31:15 -05:00
Mátyás Mustoha
8fefa23019 Add support for WebGL2 ReadPixels functions
Adds support for the new ReadPixels functions introduced with WebGL2
and the relevant PixelStorei parameters.

Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.10
2019-11-26 16:09:13 +01:00
bors-servo
7a72f8a168
Auto merge of #24842 - servo:jdm-patch-34, r=nox
Make JS runnables for workers execute on correct event loop

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24812
2019-11-26 09:33:59 -05:00
Manish Goregaokar
d233558b9b Fix iterator invalidation in our forEach implementation. 2019-11-25 19:56:14 -08:00
bors-servo
ea32495504
Auto merge of #24708 - szeged:webgpu-base, r=gterzian,kvark
Initial implementation of WebGPU API

<!-- Please describe your changes on the following line: -->
- Added the WebIDL bindings for GPU and GPUadapter interfaces.
- Created a background thread for WebGPU api calls.
- Established the async communication between the background thread and the WebGPU interfaces.
- Implemented the `requesAdapter` function of `navigator.gpu`

`./mach test-tidy` reports an error due to the different `arrayvec` version used in `servo` and `webgpu`, so added it to the ignore list in `servo-tidy.toml`

---
<!-- 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
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes addresses a part of #https://github.com/servo/servo/issues/24706

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

cc @jdm, cc @kvark

<!-- 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/24708)
<!-- Reviewable:end -->
2019-11-25 00:00:46 -05:00
Kagami Sascha Rosylight
94565c4088 Require FormDataEventInit dictionary 2019-11-24 15:31:15 +09:00
Manish Goregaokar
87f729731a Add support for squeeze events 2019-11-22 13:58:13 -08:00
Josh Matthews
0f30755522 Ensure JS runnables are dispatched to a worker's event loop instead of its parent. 2019-11-22 14:08:02 -05:00
bors-servo
c060f00535
Auto merge of #24789 - gterzian:fix_unloading, r=jdm
Fix unloading, active BC, and clearing js runtime

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

Do not set the window to be the currently active one for the windowproxy as part of `load`, as it will be done later when the document activity is set. And doing it later means that when unload runs, it is with the unloaded pipeline as the active window.

Only nullify the window proxy if it's not used by another (currently-active) window.

---
<!-- 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 #24591 (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. -->
2019-11-22 01:28:36 -05:00
bors-servo
49f47ea09f
Auto merge of #24816 - saschanaz:promiserejection, r=jdm
Require PromiseRejectionEventInit dictionary

<!-- 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
- [x] These changes fix #22670

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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. -->
2019-11-21 21:39:44 -05:00
Kagami Sascha Rosylight
22278a8895 Require PromiseRejectionEventInit dictionary 2019-11-22 10:18:11 +09:00
Josh Matthews
aa7a52c05e
dom: Unindent Document::set_activity. 2019-11-21 10:14:28 -05:00
Gregory Terzian
a21c0bfd1a ensure unload run with old pipeline as currently-active, do not nullify proxy unless currently-active 2019-11-21 22:30:08 +08:00
Zakor Gyula
12893aa010 Initial implementation of WebGPU API 2019-11-21 08:30:26 +01:00
bors-servo
dc22a78cc2
Auto merge of #24757 - Akash-Pateria:async-wasm-compilation-subsequent, r=jdm
Async wasm compilation event loop integration

The PR contains changes related to binding the runnable dispatching in script_runtime and is part of the Asynchronous WebAssembly Compilation fix. This is the first step in the subsequent steps mentioned in the [wiki](https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project).

---
<!-- 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 are part of #21476 fix
2019-11-20 16:16:13 -05:00
Fernando Jiménez Moreno
35c4c35416 Fix metadata update 2019-11-20 13:34:31 +01:00
Fernando Jiménez Moreno
d33c96b31e Fallback to current url as metadata title 2019-11-20 13:34:30 +01:00
Fernando Jiménez Moreno
6ee21af0c4 Update media session metadata according to media player 2019-11-20 13:34:30 +01:00
Fernando Jiménez Moreno
b5b8c6c2a8 Remove prev and next track action buttons for now 2019-11-20 13:34:29 +01:00
Fernando Jiménez Moreno
b048d7faf7 Fix media session action handling 2019-11-20 13:34:29 +01:00
Fernando Jiménez Moreno
9da1dd3592 Default media session actions 2019-11-20 13:34:29 +01:00
Fernando Jiménez Moreno
68baabba63 Format code and fix rebase errors 2019-11-20 13:33:51 +01:00
Fernando Jiménez Moreno
85ec66b43e Move active media session logic to constellation 2019-11-20 13:33:51 +01:00
Fernando Jiménez Moreno
08f9f17ed3 Send MediaSessionAction from Android 2019-11-20 13:33:51 +01:00
Fernando Jiménez Moreno
b494acbf19 Adapt MediaMetadata interface to new way of declaring constructors 2019-11-20 13:33:16 +01:00
Fernando Jiménez Moreno
dd63ba425f MediaSession show media controls on Android 2019-11-20 13:33:15 +01:00
Fernando Jiménez Moreno
761f21fc8b Send MediaSessionEvent::PlaybackStateChange when needed 2019-11-20 13:33:15 +01:00
Fernando Jiménez Moreno
89d9e3ad78 Introduce embedder MediaSessionEvent and move active session to Servo 2019-11-20 13:33:15 +01:00
Fernando Jiménez Moreno
4d147d2c56 Register media instance with session and prepare communication with embedder 2019-11-20 13:33:14 +01:00
Fernando Jiménez Moreno
31ce7a2b5c Handle media session action, no default handling yet 2019-11-20 13:32:38 +01:00
Fernando Jiménez Moreno
ec7a4bf32d MediaSession: update action handler algorithm 2019-11-20 13:32:38 +01:00
Fernando Jiménez Moreno
fa61191405 Make MediaSession handle embedder requested action 2019-11-20 13:32:11 +01:00
Fernando Jiménez Moreno
7101a9d070 Use BrowsingContextId for MediaSession registration 2019-11-20 13:32:10 +01:00
Fernando Jiménez Moreno
f8246801ba MediaSession registration 2019-11-20 13:32:10 +01:00
Fernando Jiménez Moreno
1ab65005ae Set MediaMetadata MediaSession owner 2019-11-20 13:32:10 +01:00
Fernando Jiménez Moreno
4b5b4d19bf MediaSession API DOM bindings 2019-11-20 13:32:10 +01:00
Akash-Pateria
84f16eae98 Bind runnable dispatching in script_runtime 2019-11-19 23:25:52 -05:00