Commit graph

8363 commits

Author SHA1 Message Date
Mátyás Mustoha
5eaa9ef8cb Add support for some more WebGL2 renderbuffer functions
Adds support for the following WebGL2 calls:

- `RenderbufferStorageMultisample`
- `GetInternalFormativ`

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.5
2020-03-13 13:43:30 -04:00
bors-servo
13a349603d
Auto merge of #25959 - jdm:webgl_vertex_array, r=jdm
Add VertexArrayObject support for WebGL2

The implementation was already in place for OpenGL ES.
My approach with this patch is to add support for WebGL2 by
sharing the implementation between the WebGL2 and GLES.

Sadly I couldn't manage to place the WebGL2 and OpenGL ES variant to the same slot in `WebGLRenderingContext`, therefore I had to do same code duplication.

Fixes #25956.

<!-- 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] 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. -->
2020-03-13 11:40:43 -04:00
Istvan Miklos
1b4a3d8987 Add VertexArrayObject support for WebGL2
The implementation was already in place for OpenGL ES.
My approach with this patch is to add support for WebGL2 by
sharing the implementation between the WebGL2 and GLES.
2020-03-13 11:38:28 -04:00
Dmitry Kolupaev
6284795078 Accept only connected attributes for checkbox and radio activation behaviour 2020-03-11 22:55:37 +03:00
bors-servo
58f3766c5b
Auto merge of #25939 - jdm:rustup2, r=asajeffrey
Update to 3/4 nightly rustc.

Now that #25918 has merged, this should be safe to use.
2020-03-10 20:04:17 -04:00
bors-servo
30fafdca19
Auto merge of #25930 - mmatyas:webgl_fns_indexed_unibuf, r=jdm
Add support for WebGL2 GetIndexedParameter

Adds support for the `GetIndexedParameter` WebGL2 call.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2

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

Depends on #25915.

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. -->
2020-03-10 10:37:53 -04:00
Josh Matthews
51145cfd83 Update to 3/4 nightly rustc. 2020-03-10 10:09:07 -04:00
Mátyás Mustoha
215dd0a1d8 Add support for WebGL2 GetIndexedParameter
Adds support for the `GetIndexedParameter` WebGL2 call.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
2020-03-10 11:02:41 +01:00
Josh Matthews
aa060dfd59 Remove unused imports. 2020-03-09 21:11:27 -04:00
Josh Matthews
085e17b73c Remove XR canvas dirtying step. 2020-03-09 21:11:27 -04:00
bors-servo
b4d7ec1c99
Auto merge of #25855 - jdm:surface-inversion, r=Manishearth,asajeffrey
Remove GL->d3d blit in HoloLens immersive mode

Depends on:
* https://github.com/servo/surfman/pull/151
* https://github.com/asajeffrey/surfman-chains/pull/7
* https://github.com/servo/webxr/pull/133

These changes add two extra APIs for embedders to use when registering a WebXR device - one to allow running any closure as a task in the webgl thread, and one to register an arbitrary surface provider for a particular webxr session. When an openxr session is started, it can then obtain the webgl thread's d3d device from that thread's surfman device and ensure that openxr uses it.

Surface providers are traits that have their methods invoked by the webgl thread as part of the the normal swapchain operations. This allows the openxr surface provider to return surfaces that wrap the underlying openxr textures, which are valid in the webgl thread and can be used as the target of an opaque framebuffer.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25735
- [x] These changes do not require tests because there are no windows immersive mode tests
2020-03-09 19:58:21 -04:00
Josh Matthews
fbcf2bbc3e Integrate swapchain surface provider changes into webgl and webxr implementations. 2020-03-09 17:50:54 -04:00
bors-servo
95f3d46644
Auto merge of #25923 - iulianR:issue-22312, r=jdm
Add VTTRegion and part of VTTCue DOM interfaces

<!-- Please describe your changes on the following line: -->
Hello! In this PR I implemented the VTTRegion DOM interface and part of VTTCue (#22312). Before continuing I thought it's maybe a good idea to first request a review or even merge what I did up to this point, as I might get stuck on the next part. I have a slight idea of what needs to be done (I assume it's hooking the GStreamer parser somewhere in `GetCueAsHTML()`), but a short outline or some more instructions would help a lot.

I updated test expectations by first running:
```
./mach test-wpt tests/wpt/web-platform-tests/webvtt/api --log-raw servo.log --pref dom.webvtt.enabled=true
```
then
```
./mach update-wpt servo.log
```
Thanks!
---
<!-- 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. -->
2020-03-09 17:33:15 -04:00
bors-servo
ad1a4adac5
Auto merge of #25914 - paulrouget:lessRAF, r=jdm
Stop embedder calls and fake rAF when window not visible

This addresses 2 issues:

- a rAF loop might still be ongoing when the window is invisible if script decided that the rAF were going too fast (spurious rAF)
- a hidden window does not run the rAF loop, but the embedder would still be in animating mode

---
<!-- 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: -->
- [ ] 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. -->
2020-03-09 11:38:47 -04:00
Mátyás Mustoha
ced67af6b2 Add support for WebGL2 GetFragDataLocation
Adds support for the `GetFragDataLocation` WebGL2 call.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.7
2020-03-09 12:59:30 +01:00
Iulian Gabriel Radu
911b1306ca Add base of VTTCue DOM interface 2020-03-08 00:15:20 +02:00
bors-servo
a0f14ceb7b
Auto merge of #25918 - servo:vtable-pointers-are-not-comparable, r=jdm
Don't compare vtable pointers anymore
2020-03-06 15:30:43 -05:00
Anthony Ramine
b5aa83f633 Don't compare the vtable pointers anymore when unrooting stuff 2020-03-06 18:58:57 +01:00
Anthony Ramine
05077d31c8 Change how we reflect DOM objects in codegen
We now go through <Root<MaybeUnreflectedDom<T>>>::reflect_with,
to decrease the amount of bad stuff we can end up doing. This
avoids a source of vtable pointer instability that could cause
issues down the road.
2020-03-06 18:45:29 +01:00
bors-servo
b062f51495
Auto merge of #25911 - jdm:rustup-revert, r=jdm
Revert 3/4 nightly rustc upgrade

Fixes #25908.
2020-03-06 12:06:23 -05:00
bors-servo
356c4e0bc8
Auto merge of #25678 - servo:smup, r=asajeffrey
Update SpiderMonkey

Do not merge.
2020-03-06 05:20:26 -05:00
Anthony Ramine
5a4f8cf93f Update SpiderMonkey 2020-03-06 11:13:28 +01:00
Paul Rouget
21c408e0d5 Stop embedder calls and fake rAF when window not visible 2020-03-06 06:20:11 +01:00
Josh Matthews
a29f4a9afe Revert "Auto merge of #25898 - jdm:rustup, r=asajeffrey"
This reverts commit ea8aed1ba9, reversing
changes made to 3749eb5397.
2020-03-06 00:06:15 -05:00
bors-servo
ca25e18791
Auto merge of #25903 - mmatyas:webgl_fns_framebuf_render_validation_fix, r=jdm
Improved the WebGL2 framebuffer render validation

It seems `MissingColorAttachment` should be returned only when all of the color attachments are missing.

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

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. -->
2020-03-05 12:26:47 -05:00
Mátyás Mustoha
5cb6eb2744 Improved the WebGL2 framebuffer render validation
It seems `MissingColorAttachment` should be returned only when
all of the color attachments are missing.
2020-03-05 16:48:42 +01:00
bors-servo
813be91926
Auto merge of #25863 - servo:synup, r=jdm
Remove syn 0.15 from our crate graph
2020-03-05 10:03:48 -05:00
Anthony Ramine
9996e48500 Remove syn 0.15 from our crate graph (fixes #24421)
This required bumps of:

* gleam
* image
* rust-webvr
* webrender
* webxr
2020-03-05 13:01:13 +01:00
Iulian Gabriel Radu
30b148c90f Add VTTRegion DOM interface 2020-03-05 00:45:52 +02:00
Josh Matthews
bf7537ef5b Update to 3/4 nightly rustc. 2020-03-04 15:08:18 -05:00
Mátyás Mustoha
8389189d94 Add support for WebGL2 FramebufferTextureLayer
Adds support for `FramebufferTextureLayer` WebGL2 call.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
2020-03-04 10:07:13 +01:00
bors-servo
386759ca90
Auto merge of #25852 - szeged:mmatyas__webgl_fns_renderbuf_enums, r=jdm
Allow more WebGL2 FBO attachment formats

Add support for most of the framebuffer attachment formats introduced in WebGL2 for textures and renderbuffers.

Related format tables:

- https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml
- https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glRenderbufferStorage.xhtml

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

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. -->
2020-03-03 12:42:16 -05:00
bors-servo
56b5d9d048
Auto merge of #25798 - szeged:mmatyas__webgl_fns_framebuf_invalidate, r=jdm
Add support for WebGL2 framebuffer invalidation

Adds support for the `invalidateFramebuffer` and `invalideSubFramebuffer` WebGL2 calls.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4

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

Depends on #25785.

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. -->
2020-03-03 11:34:23 -05:00
Mátyás Mustoha
cc07d930c8 Add support for WebGL2 framebuffer invalidation
Adds support for the `invalidateFramebuffer` and `invalideSubFramebuffer`
WebGL2 calls.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
2020-03-03 14:54:17 +01:00
Mátyás Mustoha
859a3a4924 Allow more WebGL2 FBO attachment formats
Add support for most of the framebuffer attachment formats
introduced in WebGL2 for textures and renderbuffers.

Related format tables:

- https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml
- https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glRenderbufferStorage.xhtml
2020-03-03 14:50:48 +01:00
bors-servo
5a6b2d94d4
Auto merge of #25781 - nox:fixzeal, r=jdm
Introduce a new type MaybeUnreflectedDom<T> (fixes #25701)
2020-03-02 08:20:00 -05:00
bors-servo
d42835b238
Auto merge of #25869 - iulianR:issue-23057-tinifiledialogs, r=jdm
Move tinyfiledialog call from script to embedder

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

PR is based on work started in #23651. I rebased on top of master and addressed review comments. Handling the `PromptPermission` message in `libsimpleservo` is probably not ideal. Looking forward to make more changes, just let me know how I should proceed.

---
<!-- 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 #23057 (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. -->
2020-02-29 14:52:15 -05:00
bors-servo
134d1f9f31
Auto merge of #25428 - pshaughn:livebyname, r=jdm
make Document.getElementsByName a live collection

Another new case for NodeList; this and the labels live collection in #25424 are in the pipeline simultaneously, so one of them will need a merge resolution when the other one lands.

Iterating over many same-named elements is potentially slower than it has to be, since getting the nth element from the live view always starts from the start of the tree.

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

<!-- 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. -->
2020-02-28 11:43:55 -05:00
Iulian Gabriel Radu
f75d547c61 Delegate permission prompt dialog formatting to embedders 2020-02-28 11:44:33 +02:00
Istvan Miklos
000a5d543d Fixing some style related issues in WebGPU.
Changed the Requests/Response from tuples to named struct variants and also sorted in alphabetical order.
Replaced the ID generator functions from `globalscope` with a single function,
which returns a `RefMut` and can call the appropriate method to generate resource IDs.
2020-02-27 15:10:24 +01:00
gatowololo
675b36dde5 Move tinyfiledialog out of script into embedder. 2020-02-27 01:01:08 +02:00
gatowololo
24c14ac94e Factored out permission_state_invocation_results API to GlobalScope
Instead of Window
2020-02-27 00:02:04 +02:00
bors-servo
6116012408
Auto merge of #25831 - szeged:wgpu_read_map_async, r=jdm
Implement mapReadAsync function of GPUBuffer

Implemented the `mapReadAsync` and fixed the `unmap` functions of `GPUBuffer`.
Added `mapped` internal slot for tracking the ArrayBuffer/Promise.
Added more states to the `GPUBufferState` enum.

<!-- 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 @kvark @jdm @zakorgy
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-02-25 16:42:35 -05:00
bors-servo
cd00e57c97
Auto merge of #25740 - gterzian:per_fetch_filemanager_handle, r=Manishearth
Per fetch file token for blob url

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

Depends on https://github.com/servo/servo/pull/25724

First step of https://github.com/servo/servo/issues/25226

---
<!-- 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 #___ (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. -->
2020-02-25 14:49:26 -05:00
Istvan Miklos
2df4d9fce4 Implement mapReadAsync function of GPUBuffer
Implemented the `mapReadAsync` and fixed the `unmap` functions of `GPUBuffer`.
Added `mapped` internal slot for tracking the ArrayBuffer/Promise.
Added more states to the `GPUBufferState` enum.
2020-02-25 10:18:36 +01:00
Gregory Terzian
eb21d5f738 implement broadcastchannel 2020-02-25 14:17:48 +08:00
bors-servo
145c89a2d4
Auto merge of #25499 - NeverHappened:implement-form-dirname, r=jdm
Implement dirname support for form element

Added support for dirname in input on form submit
Added Dir getter / setter for HTMLElement
NOT YET Added get directionality according to https://html.spec.whatwg.org/multipage/dom.html#the-directionality

- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25379 (GitHub issue number if applicable)
2020-02-24 21:18:10 -05:00
bors-servo
0884884796
Auto merge of #25345 - jdm:drop-cleanup, r=asajeffrey
Avoid accessing global objects from DOM destructors

This removes all instances that I could find of DOM objects accessing `self.global()` in code that runs as part of a Drop method. This is unsafe because the GC could destroy objects in any order when doing a big sweep. Instead, these types should store the data they need as members so they can run in isolation without accessing the rest of the GC graph as part of their destructors.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25258 and fix #23986
- [x] There are tests for these changes
2020-02-24 17:25:02 -05:00
Dmitry Kolupaev
25c5a4c045 Use map_or and fix manifest 2020-02-25 01:18:21 +03:00
Dmitry Kolupaev
ab2aeb6d97 Implement step 5.13 for dirname correctly 2020-02-25 01:18:21 +03:00