Commit graph

8894 commits

Author SHA1 Message Date
Shinichi Morimoto
f7d4a37f78 fixed fmt 2020-03-28 23:21:35 +09:00
Anthony Ramine
df0118dd10 Move PendingRestyle to the style_layout_interface crate 2020-03-28 14:00:53 +01:00
Shinichi Morimoto
80b2a87be7 fixed #25281 2020-03-28 20:18:30 +09:00
bors-servo
a927f1ad8a
Auto merge of #25998 - jdm:vao-drop, r=nox
Avoid a panic when closing webgl pages using VAOs

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25891
- [x] These changes do not require tests because GC behaviour at shutdown is nondeterministic and difficult to test
2020-03-27 09:55:12 -04:00
bors-servo
0ed0c0d9f0
Auto merge of #26029 - paulrouget:uitask, r=jdm
Set user interactions for tasks

fix #26026

I need help here. Retrieving the interaction flag from the promise handle crashes.

```rust
let interaction = GetPromiseUserInputEventHandlingState(promise);
```

```
Stack trace for thread "ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }"
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/paul/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/libunwind.rs:86
      backtrace::backtrace::trace_unsynchronized
             at /Users/paul/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/mod.rs:66
   1: <servo::backtrace::Print as core::fmt::Debug>::fmt
             at ports/glutin/backtrace.rs:49
   2: <&mut W as core::fmt::Write>::write_fmt
   3: std::io::Write::write_fmt
             at /rustc/45ebd5808afd3df7ba842797c0fcd4447ddf30fb/src/libstd/io/mod.rs:1427
   4: servo::backtrace::print
             at ports/glutin/backtrace.rs:17
   5: servo::install_crash_handler::handler
             at ports/glutin/main2.rs:68
   6: <unknown>
   7: _ZN2JS37GetPromiseUserInputEventHandlingStateENS_6HandleIP8JSObjectEE
             at /Users/paul/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/2392ebc/mozjs/js/src/vm/JSObject.h:106
```
2020-03-26 09:15:00 -04:00
Paul Rouget
5621c887fd Propagate user interacting flag to timers and promises 2020-03-26 08:36:57 +01:00
bors-servo
a9965db69f
Auto merge of #26005 - jdm:hubs-csp, r=nox
Update content-security-policy.

This allows hubs.mozilla.org to load instead of panicking due to unimplemented CSP features.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24702
- [x] These changes do not require tests because we never enabled the CSP testsuite
2020-03-25 13:33:23 -04:00
Josh Matthews
19216627d3 Update content-security-policy. 2020-03-25 09:11:09 -04:00
bors-servo
8b4d7c41ae
Auto merge of #26017 - humancalico:remove_legacy, r=jdm
Removed createTouch and createTouchList

<!-- 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 #25978
<!-- 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-24 01:38:31 -04:00
Akshat Agarwal
2e1009da75 Removed createTouch and createTouchList 2020-03-24 03:41:42 +05:30
Josh Matthews
2aa415a3ff
Force alert message to its own line. 2020-03-23 11:08:42 -04:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04:00
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
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