Commit graph

9830 commits

Author SHA1 Message Date
Fernando Jiménez Moreno
c0fb6c8d23 Implement MediaDevices.enumerateDevices() 2020-07-10 13:18:26 +02:00
bors-servo
cbbbe16936
Auto merge of #27088 - jdm:group, r=ferjm
Implement Console grouping APIs.

These are used by Hubs and other sites we want to run.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #9274
- [x] These changes do not require tests because we can't test stdout content or devtools messages.
2020-07-07 01:24:03 -04:00
Josh Matthews
2d7effddef Implement Console grouping APIs. 2020-07-06 19:36:26 -04:00
bors-servo
ec9308199e
Auto merge of #27180 - kunalmohan:segfault, r=kvark
Remove segfaults in WebGPU threads

<!-- Please describe your changes on the following line: -->
I have also increased the number of staging buffers for presentation.
Segfault occurred at 2 places-
1. RenderPipeline descriptor.
2. BufferMapAsync callback.

r?@kvark

---
<!-- 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-07-06 17:45:09 -04:00
Kunal Mohan
9e7e9433e4 Remove segfaults in WebGPU threads 2020-07-07 01:55:03 +05:30
bors-servo
22a7522a04
Auto merge of #27168 - jdm:gl-fake-context-lost, r=Manishearth
Add stub isContextLost API.

We don't support losing contexts yet, so it's not lying to say that the context is never lost.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27116
- [x] There are tests for these changes
2020-07-06 14:56:50 -04:00
bors-servo
1cd78e78f6
Auto merge of #26998 - gterzian:improve_task_cancelling, r=jdm
Use a stronger atomic guarantee when cancelling tasks

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

In the context of https://github.com/servo/servo/issues/22507

Note that the "other side" of these operations is at 0b61cfc3ae/components/script/task.rs (L102)

---
<!-- 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-07-06 11:11:25 -04:00
bors-servo
d93e67a0bf
Auto merge of #27174 - muodov:form-invalid-event-removal, r=gterzian
Do not fire `invalid` event on form elements

This is a follow-up to my [previous PR](https://github.com/servo/servo/pull/27100) suggested by @gterzian.

`invalid` event on the `<form>` element has been [recently removed](https://github.com/whatwg/html/issues/4626) from the spec.

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

<!-- Either: -->
- [x] [WPT test](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/historical.window.js) marked as passing
2020-07-05 00:34:12 -04:00
bors-servo
f2e6f34a2b
Auto merge of #27173 - kunalmohan:gpu-queue-write, r=kvark
Implement GPUQueue write methods and update wgpu-core

<!-- Please describe your changes on the following line: -->
Implements `GPUQueue.writeBuffer` and `GPUQueue.writeTexture`.

r?@kvark

---
<!-- 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-07-04 21:32:43 -04:00
Maxim Tsoy
7fd903c214 Remove invalid event on a form element 2020-07-05 00:12:08 +02:00
Kunal Mohan
fae66089fa Implement GPUQueue.writeBuffer and GPUQueue.writeTexture 2020-07-04 21:49:32 +05:30
Kunal Mohan
8ef7f24541 Update wgpu-core and wgpu-types 2020-07-04 13:59:30 +05:30
bors-servo
8916a42180
Auto merge of #27163 - alarsyo:23053-layout-queries-disconnected-frames-panic, r=jdm
Return Option for Window's layout channel

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

`Window::layout_chan()` now returns an `Option<Sender<Msg>>`, returning `None` if the window is dead.

FIX #26969
FIX #26429
FIX #21208
FIX #19092
FIX #22559
FIX #22584
FIX #22652

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

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

This is my first contribution, I'm trying to figure things out!

This fix passes the test case shown in #23053, however I don't know what the behavior should be in `Document` and `ScriptThread` if `Window::is_alive()` is false : simply ignore it, don't do anything ? Or is this something that should not happen now that we return false in `Window::force_reflow()` ?

I'm not sure about the directory where the test case should go, any advice?
2020-07-04 01:30:27 -04:00
Josh Matthews
795560ad52 webgl: Add stub isContextLost API. 2020-07-03 14:47:06 -04:00
bors-servo
7fafd91593
Auto merge of #27154 - kunalmohan:async-presentation, r=kvark
WebGPU update presentation data asynchronously

<!-- Please describe your changes on the following line: -->
This PR aims to make updating Webrender presentation data non-blocking.
A callback is passed to the `buffer_map_async()` fn wherein the data is read and a message sent to the server itself to write the data into the shared `PresentationData` struct object.

r?@kvark

---
<!-- 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-07-03 14:01:55 -04:00
Antoine Martin
36fbbea2b5 Return Option for Window's layout channel 2020-07-03 20:00:26 +02:00
bors-servo
8800452e34
Auto merge of #27104 - utsavoza:ugo/issue-27030/28-06-2020, r=gterzian
Update referrer computation

The PR updates the request's referrer computation in consideration with the recent changes in [w3c/webappsec-referrer-policy#135](https://github.com/w3c/webappsec-referrer-policy/pull/135).

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27030 and fix #14505
- [x] There are tests for these changes
2020-07-03 11:39:07 -04:00
Kunal Mohan
b672b78e19 WebGPU update presentation data asynchronously 2020-07-03 15:42:08 +05:30
bors-servo
4504eebdc3
Auto merge of #27143 - Manishearth:streamnodes, r=ferjm
Implement MediaStreamAudioDestinationNode, MediaStreamAudioSourceNode, MediaStreamTrackAudioSourceNode

Progress in https://github.com/servo/servo/issues/26097

This is a draft since we need the data channels stuff to land first

(also I need to make sure we're passing WPT)
2020-07-03 01:48:52 -04:00
bors-servo
ee56d5d212
Auto merge of #27149 - paulrouget:key_events2, r=jdm
UWP: support virtual keyboard

Fix #26898 and fix #26680.

@jdm: can you test on the device?
2020-07-03 00:25:05 -04:00
Manish Goregaokar
718304709e Add AudioContext constructors for media stream nodes 2020-07-02 13:26:55 -07:00
Manish Goregaokar
0b998a1d1c Unpref MediaStream and MediaStreamTrack 2020-07-02 13:26:55 -07:00
Manish Goregaokar
6143173858 Add MediaStreamTrackAudioSourceNode 2020-07-02 13:26:55 -07:00
Manish Goregaokar
bc2267fb77 Add MediaStreamAudioSourceNode 2020-07-02 13:26:55 -07:00
Manish Goregaokar
2a838d935b Add MedaStreamAudioDestinationNode::stream 2020-07-02 13:26:55 -07:00
Manish Goregaokar
bf9614edf7 Add MediaStream::new_single() 2020-07-02 13:26:55 -07:00
Manish Goregaokar
6a001e7523 Add MediaStreamAudioDestinationNode 2020-07-02 13:26:55 -07:00
bors-servo
3bc4a935f8
Auto merge of #27100 - muodov:master, r=gterzian
Implement HTMLFormElement.requestSubmit()

<!-- Please describe your changes on the following line: -->
This PR contains an implementation of [HTMLFormElement.requestSubmit()](https://html.spec.whatwg.org/multipage/forms.html#dom-form-requestsubmit)

This is literally my first hundred lines of Rust code, so if I crossed a few sacred lines here and there, please go easy on me :)

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

<!-- Either: -->
- [x] [WPT tests](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit.html) for these changes
There are two tests that still fail because we don't support `:invalid` CSS selector (see #10781). I verified that they pass if you change them to not use `:invalid`. Should be unlocked by #26729.

<!-- 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-07-02 09:54:47 -04:00
Maxim Tsoy
8194da2752 Implement HTMLFormElement.requestSubmit()Also includes a fix for reentrant form submission behavior 2020-07-02 12:33:21 +02:00
Utsav Oza
dd57641987 Propagate referrer policy during about:srcdoc page load 2020-07-02 14:29:27 +05:30
Utsav Oza
310821d3b0 Update referrer computation
Update unit tests for determine_requests_referrer

Update wpt metadata

Add missing spec links
2020-07-02 14:29:26 +05:30
Paul Rouget
34265c872e UWP: support virtual keyboard 2020-07-02 10:57:34 +02:00
Kunal Mohan
891a3bd30e Encapsulate buffer map fields in a separate struct 2020-07-01 23:58:55 +05:30
Kunal Mohan
575036bb88 Implement GPUBuffer.getMappedRange() 2020-07-01 20:37:17 +05:30
bors-servo
4b034ede46
Auto merge of #26752 - ferjm:datachannel, r=Manishearth
WebRTC data channels support

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #26212

This depends on https://github.com/servo/media/pull/350 and contains the basic pieces to make a  simple test like https://ferjm.github.io/samples/src/content/datachannel/basic/ work
2020-06-30 13:53:32 -04:00
Fernando Jiménez Moreno
27f439a71c Hide interfaces behind webrtc pref 2020-06-30 15:58:39 +02:00
bors-servo
db00c1f96e
Auto merge of #27114 - paulrouget:key_events, r=jdm
[UWP] Key events

This is the initial work required for proper keyboard events.
The text controller implementation is very basic, just enough to show the virtual keyboard when it's needed, and have basic key events.
2020-06-30 09:41:15 -04:00
bors-servo
b9404fcd48
Auto merge of #27016 - gterzian:fix_closing_window, r=jdm,paulrouget
Ensure clean shutdown of JS threads

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

FIX https://github.com/servo/servo/issues/26685
FIX https://github.com/servo/servo/issues/26996
FIX https://github.com/servo/servo/issues/9672
FIX #27027

---
<!-- 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-06-30 02:06:57 -04:00
Gregory Terzian
44ebca72da ensure clean shutdown of all threads running JS 2020-06-30 13:22:38 +08:00
Fernando Jiménez Moreno
6ebb73d9a4 Fix rooting issue 2020-06-29 16:53:50 +02:00
Fernando Jiménez Moreno
7eb44f81f2 Fix data channels borrowing errors 2020-06-29 16:53:50 +02:00
Fernando Jiménez Moreno
b968852456 Do not register data channel twice 2020-06-29 16:53:50 +02:00
Fernando Jiménez Moreno
820ea452e7 Set data channels as closed on peer connection close 2020-06-29 16:53:49 +02:00
Fernando Jiménez Moreno
2dedcaeaaf Allow receiving binary data channel messages 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
f855fbb604 Allow sending binary messages 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
7db485aeb2 RTCDataChannel.readyState getter 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
9d456d5d17 Use data channel ids 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
960b010d30 Cleanups and tidy fixes 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
ace0d7795e Fix rooting issues with data channels callbacks 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
f5c930087e Implement ondatachannel event 2020-06-29 16:53:48 +02:00