Commit graph

9715 commits

Author SHA1 Message Date
Tipowol
6b0b90767e Add missing same-origin referrer policy 2020-03-20 21:15:52 +01:00
Josh Matthews
3a3397fbce webgl: Ignore webgl communication errors when dropping vertex array objects. 2020-03-19 23:34:26 -04:00
bors-servo
9fb83d8143
Auto merge of #25964 - servo:webidl, r=jdm
Update the WebIDL parser

It now supports Python 3.
2020-03-17 12:55:26 -04:00
Mátyás Mustoha
a6359fe587 Do not try to read pixels from an FBO without read buffer
Adds another check to the WebGL2 ReadPixels implementation to fix
an OpenGL invalid operation crash when the method is called on a
bound framebuffer that has no read buffer.
2020-03-17 10:55:41 +01:00
Mátyás Mustoha
0afe27ef18 Add support for WebGL2 read and draw buffer settings
Adds support for the `ReadBuffer` and `DrawBuffers`
WebGL2 calls and the related parameter getters.

See:

- https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
- https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
- https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.11
2020-03-16 12:17:15 +01:00
Anthony Ramine
3f30c7d8be Do not do weird scope things in MethodDefiner
Variable `m` comes from a previous list comprehension earlier in the
function is not actually properly defined.
2020-03-14 12:17:48 +01:00
Anthony Ramine
4930479ac8 Update the WebIDL parser
Upstream doesn't allow downloading .tar.gz archives so update.sh was changed
to use unzip.
2020-03-14 12:17:48 +01:00
bors-servo
5737db81f9
Auto merge of #25940 - pylbrecht:image.handling, r=jdm
Handle nonexistent images in CanvasRenderingContext2D.createPattern()

<!-- 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 part of #25331

<!-- 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-03-13 18:01:32 -04:00
pylbrecht
3ec848f4a8 Handle nonexistent images in CanvasRenderingContext2D.createPattern() 2020-03-13 20:48:27 +01:00
Josh Matthews
6cdbab5581 webgl: Don't panic on sampler3D and sampler2DArray uniforms. 2020-03-13 14:05:34 -04:00
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
4b1bb895a3
Auto merge of #25946 - jdm:macos-fix, r=nox
Update mozjs for macOS 10.15 build fix.
2020-03-11 10:36:10 -04:00
Josh Matthews
ce1b65f1b5 Update mozjs for macOS 10.15 build fix. 2020-03-11 09:07:49 -04: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
19a8c917f5
Auto merge of #25876 - CYBAI:mime-essence, r=Manishearth
Upgrade mime crate to use the essence function

While implementing module script, the `essence` function is not supported in mime crate yet so Manish filed the issue.

So, as that issue is fixed and shipped, we can upgrade mime crate to use the `essence_str` function.

I've tried to run https://threejs.org/examples/webgl_animation_cloth.html locally. Other than a bunch of `Unimplemented canvas2d.fillText`, I can see the animated cloth.

---
<!-- 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: -->
- [ ] 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-02 13:43:52 -05: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
CYBAI
5245921c5c Use essence algorithm from mime crate 2020-03-02 11:05:10 +09:00