Commit graph

39411 commits

Author SHA1 Message Date
Kagami Sascha Rosylight
e20de3b04a Handle u32 property indices 2019-11-27 15:50:04 +09:00
bors-servo
f166422102
Auto merge of #24862 - jdm:js-init-destroy-fit-the-second, r=asajeffrey
Ensure SpiderMonkey shuts down cleanly

This is the alternate solution that I described in #24845. Given how much simpler the resulting code is, I'm now much more in favour of this design. Depends on https://github.com/servo/rust-mozjs/pull/487.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21696 and fix #22276
- [x] There are tests for these changes
2019-11-27 01:23:20 -05:00
Josh Matthews
1c7f2d696c Remove use of deprecated language construct. 2019-11-26 21:54:33 -05:00
Josh Matthews
7944d9548c script: Ensure JS engine is initialized and deinitialized on the same thread. 2019-11-26 21:54:33 -05:00
bors-servo
b62d1d4f7a
Auto merge of #24868 - servo-wpt-sync:wpt_update_26-11-2019, r=servo-wpt-sync
Sync WPT with upstream (26-11-2019)

Automated downstream sync of changes from upstream as of 26-11-2019.
[no-wpt-sync]
r? @servo-wpt-sync
2019-11-26 21:32:31 -05:00
bors-servo
ea18d5f5e9
Auto merge of #24861 - asajeffrey:gstplugin-url, r=ferjm
Add url parameter to the servosrc gstreamer plugin

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

Support a `url` parameter for the gstreamer plugin.

---
<!-- 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 #24836
- [x] These changes do not require tests because adding features to a port

<!-- 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 19:17:22 -05:00
bors-servo
42003a921b
Auto merge of #24859 - jdm:surfman-fallible, r=Manishearth
Don't panic if surfman initialization fails.

Since WebGL is only one component of the web platform, there's no reason that failing to initialize surfman for webgl support should take down the entire browser.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24642 (in that the browser will now start up) and fix #24627
- [x] These changes do not require tests because tests for graphics acceleration? don't make me laugh.
2019-11-26 16:43:57 -05: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
WPT Sync Bot
e77be0ce0f Update web-platform-tests to revision 1cee79240e1a6e2df18faa0ed27c7febada1e3fb 2019-11-26 13:17:56 +00:00
bors-servo
799057f1e6
Auto merge of #24863 - asajeffrey:gstplugin-resizing, r=ferjm
The gstreamer plugin should resize when it's presented with frames to fill

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

This is a workaround for race conditions in the embedder.

---
<!-- 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 #24835
- [x] These changes do not require tests because it's fixing a bug with an embedding

<!-- 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 06:41:33 -05:00
bors-servo
75aba2b7d9
Auto merge of #24854 - paulrouget:xrprompt, r=Manishearth
Prompt user to install OpenXR package if not installed

Fix #24086

It's important to note that this PR introduces a restricted capability. During the app store submission process we will need to justify why we want to use that capability.

This piece of UI is important for the Emulator, where OpenXR is not available by default.
2019-11-26 02:22:07 -05:00
bors-servo
74bf0ce5c2
Auto merge of #24866 - Manishearth:iterator-invalidation, r=jdm
Fix iterator invalidation in our forEach implementation.

Currently we iterate over iterables in forEach based on the length they report when we start iterating, however the inner callback is able to change this.

```js
let params = new URLSearchParams("foo=bar&baz=qux");
params.forEach((p) => {
    console.log(p);
    params.delete("baz");
})
```

This causes us to panic [here](f1aa5d8dbd/components/script/dom/bindings/codegen/CodegenRust.py (L7412)) over an attempt to access out of bounds.

Relevant spec: https://heycam.github.io/webidl/#es-forEach

r? @jdm
2019-11-25 23:27:33 -05:00
Manish Goregaokar
38a666742f Add WPT test for invalidating WebIDL iterators during forEach 2019-11-25 20:27:15 -08:00
Paul Rouget
75b522d210 Prompt user to install OpenXR package if not installed 2019-11-26 05:10:39 +01:00
Manish Goregaokar
d233558b9b Fix iterator invalidation in our forEach implementation. 2019-11-25 19:56:14 -08:00
Alan Jeffrey
2356f3ea6b The gstreamer plugin should resize when it's presented with frames to fill, not when caps are set 2019-11-25 15:03:58 -06:00
Alan Jeffrey
82e7e457e7 Add url parameter to the servosrc gstreamer plugin 2019-11-25 13:27:36 -06:00
bors-servo
f1aa5d8dbd
Auto merge of #24857 - pshaughn:master, r=jdm
add llvm-dev to Debian requirements

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's the build process itself, not servo code

<!-- 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-25 13:09:42 -05:00
bors-servo
49841b8ce9
Auto merge of #24754 - asajeffrey:gstplugin, r=ferjm
Add a gstreamer servosrc plugin

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

A first draft of a gstreamer plugin. Lots of stuff to fix, most importantly that it should write to GL memory, not do readback. But it's a start!

---
<!-- 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 it's a new platform

<!-- 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-25 12:42:00 -05:00
Josh Matthews
9d8b15f1bf Don't panic if surfman initialization fails. 2019-11-25 12:12:45 -05:00
Alan Jeffrey
0ee6695e4e Run bootstrap-gstreamer in CI 2019-11-25 10:13:15 -06:00
Alan Jeffrey
57af033a28 Require gstreamer 1.16 in mach 2019-11-25 10:12:05 -06:00
Alan Jeffrey
69acec137d Add a gstreamer servosrc plugin 2019-11-25 10:12:05 -06:00
bors-servo
f6a20a14b8
Auto merge of #24856 - servo-wpt-sync:wpt_update_25-11-2019, r=servo-wpt-sync
Sync WPT with upstream (25-11-2019)

Automated downstream sync of changes from upstream as of 25-11-2019.
[no-wpt-sync]
r? @servo-wpt-sync
2019-11-25 11:03:56 -05:00
WPT Sync Bot
ae09310953 Update web-platform-tests to revision 157b71e48394fb63f91fa497be429c3543b0ab03 2019-11-25 14:07:26 +00:00
bors-servo
a562808ebb
Auto merge of #24822 - servo:fontcontext, r=SimonSapin
Start implementing text in layout 2020
2019-11-25 08:07:02 -05:00
Anthony Ramine
85b2a4dc64 Support line_height better in layout 2020 2019-11-25 10:54:46 +01:00
Anthony Ramine
b3d30d284e Start implementing text in layout 2020 2019-11-25 10:54:46 +01:00
Anthony Ramine
7e143c7a05 Make floats not parse on layout 2020 2019-11-25 10:54:46 +01:00
Anthony Ramine
a5e55ddb20 Introduce GlyphStore::total_advance 2019-11-25 10:54:46 +01:00
Anthony Ramine
6f49dc2356 Properly use STYLE_THREAD_POOL in layout 2020 2019-11-25 10:54:46 +01:00
Anthony Ramine
1446756774 Pass a LayoutContext to TextRun::layout in 2020 2019-11-25 10:54:46 +01: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
bors-servo
c8791c0dbb
Auto merge of #24680 - saschanaz:formdataevent, r=jdm
Require FormDataEventInit dictionary

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

Should probably wait until https://github.com/whatwg/html/issues/5064 be fixed.

---
<!-- 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 mentions `FormDataEvent` but the codegen itself still has a problem, in e.g. `PromiseRejectionEventInit`)

<!-- 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-24 17:39:30 -05:00
bors-servo
122d4fd617
Auto merge of #24851 - servo-wpt-sync:wpt_update_24-11-2019, r=servo-wpt-sync
Sync WPT with upstream (24-11-2019)

Automated downstream sync of changes from upstream as of 24-11-2019.
[no-wpt-sync]
r? @servo-wpt-sync
2019-11-24 10:06:21 -05:00
Zakor Gyula
47e39ec1e3 Patch wgpu-native 2019-11-24 15:10:42 +01:00
WPT Sync Bot
cf1754151c Update web-platform-tests to revision 3f26c954fb1791782bb73bd2f37a727bd8650d55 2019-11-24 13:00:21 +00:00
Kagami Sascha Rosylight
94565c4088 Require FormDataEventInit dictionary 2019-11-24 15:31:15 +09:00
Patrick Shaughnessy
a2a3ecac93 Merge branch 'master' of https://github.com/pshaughn/servo 2019-11-23 22:08:43 -05:00
Patrick Shaughnessy
f1b34aa995 llvm-dev is required on Debian 2019-11-23 22:06:39 -05:00
bors-servo
3a21261f69
Auto merge of #24847 - servo-wpt-sync:wpt_update_23-11-2019, r=servo-wpt-sync
Sync WPT with upstream (23-11-2019)

Automated downstream sync of changes from upstream as of 23-11-2019.
[no-wpt-sync]
r? @servo-wpt-sync
2019-11-23 08:40:01 -05:00
WPT Sync Bot
7289e837fd Update web-platform-tests to revision f0cb9071aea5ce5b641fcba5f362a0796bdc70bc 2019-11-23 13:39:46 +00:00
bors-servo
0d549e8146
Auto merge of #24841 - servo:jdm-patch-31, r=Manishearth
Useful scripts for interacting with WPT logs

These are scripts I used to generate the list in https://github.com/servo/servo/issues/24828, analyze test failures for #23290, and disable slow tests.
2019-11-22 21:06:18 -05:00
bors-servo
834a0409b9
Auto merge of #24811 - servo:fail-fast, r=jdm
Fix updating the GitHub Status as soon as any TC task fails

… rather than only when the entire task group is resolved. This allows Homu to more quickly be notified of a failure, and move on to the next PR in the queue sooner.

(Plus drive-by Brewfile fix.)
2019-11-22 19:38:49 -05:00
bors-servo
f14eb65a11
Auto merge of #24838 - Manishearth:squeeze, r=jdm
Add support for squeeze events

Depends on https://github.com/servo/webxr/pull/98
2019-11-22 17:24:16 -05:00
Manish Goregaokar
87f729731a Add support for squeeze events 2019-11-22 13:58:13 -08:00
Josh Matthews
41d1ecac64
Fix visual indent error. 2019-11-22 14:34:26 -05:00