Commit graph

1528 commits

Author SHA1 Message Date
bors-servo
d205194618
Auto merge of #25070 - cagandhi:named-form-getter, r=jdm
Named form getter

This PR contains changes related to adding named getter in Servo for getting the list of all meaningful property names for a HTMLFormElement object, and getting the value of a specific property name. The following changes have been made:

* uncomment the [named getter](f63b404e0c/components/script/dom/webidls/HTMLFormElement.webidl (L30)) from HTMLFormElement.webidl
* add the missing `NamedGetter` and `SupportedPropertyNames` methods to [HTMLFormElement](f63b404e0c/components/script/dom/htmlformelement.rs (L113))
* implement `SupportedPropertyNames` according to [the specification](https://html.spec.whatwg.org/multipage/forms.html#the-form-element:supported-property-names):
  * create an enum to represent the `id`, `name`, and `past` states for the sourced names
  * create a vector of `(SourcedName, DomRoot<HTMLElement>)` by iterating over `self.controls` and checking the element type and calling methods like `HTMLElement::is_listed_element`
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #16479 (GitHub issue number if applicable)
2019-12-16 18:10:12 -05:00
Shinichi Morimoto
2457a6be0f #23330 modified performance interface's timing member to attribute 2019-12-13 13:41:47 -05:00
bors-servo
e8d6ed09c4
Auto merge of #25272 - pshaughn:domexception_inherits_tostring, r=Manishearth
DOMException now inherits its Javascript toString from Error

<!-- Please describe your changes on the following line: -->
stringifier is out of the DOMException IDL, and Stringifier(&self) is moved into the main body of DOMException where it can continue to be called internally.

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

<!-- 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-12-12 22:50:26 -05:00
Patrick Shaughnessy
981d13dcfc Stringifier is sno longer exposed 2019-12-12 20:20:31 -05:00
Manish Goregaokar
f52a6f0e8f Set inlineVerticalFieldOfView to null for immersive sessions 2019-12-11 22:12:07 -08:00
Manish Goregaokar
c2d3c646ef Handle FOV values in mock API 2019-12-11 22:12:07 -08:00
Manish Goregaokar
322463450d Support nullable origins and floors 2019-12-11 22:12:06 -08:00
bors-servo
073194a618
Auto merge of #25144 - Manishearth:inline, r=asajeffrey
Support inline sessions (with spatial tracking!)

This assumes that your WebXR backend can tolerate being spawned multiple times in inline mode. Currently there is only one backend that allows inline mode (headless), and it works there. This can be improved with https://github.com/servo/webxr/issues/30 .

Todo:

 - [ ] Add a default inline device to webxr so that there is always a tracking-free inline session available (followup: https://github.com/servo/webxr/issues/101)
 - [x] WPT update
 - [ ] Make inline with spatial tracking a feature request (followup: https://github.com/servo/servo/issues/24270)

fixes https://github.com/servo/servo/issues/24186

Depends on https://github.com/servo/webxr/pull/100
2019-12-11 21:04:47 -05:00
bors-servo
e10cf7adad
Auto merge of #25222 - pshaughn:node_isconnected, r=jdm
adding .isConnected DOM attribute

<!-- Please describe your changes on the following line: -->
is_connected already existed for this concept and just needed to be hooked up to an IDL attribute.

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

<!-- Either: -->
- [X] There are tests for these changes OR

<!-- 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-12-11 15:04:45 -05:00
Patrick Shaughnessy
0231a0a712 adding .isConnected DOM attribute 2019-12-11 10:08:05 -05:00
Manish Goregaokar
a1c1a16e98 Add inline support to XRWebGLLayer 2019-12-10 15:13:42 -08:00
Manish Goregaokar
a64e02a451 Add inlineVerticalFieldOfView support 2019-12-10 15:13:42 -08:00
bors-servo
03a47c803c
Auto merge of #25201 - xu3u4:25183-add-onformdata-to-global-event-handler, r=jdm
Add onformdata to GlobalEventHandlers

<!-- Please describe your changes on the following line: -->
1. Adding `onformdata` to GlobalEventHandlers interface and global_event_handlers macro.
2. Deleting related FAIL tests.

---
<!-- 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 #25183 (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. -->
2019-12-10 01:30:38 -05:00
xu3u4
7529591e8f Add onformdata to GlobalEventHandlers 2019-12-07 21:44:36 +09:00
Bastien Orivel
0bdab6bb50 Return a boolean from DOMTokenList::replace to match the spec
Fixes #25129
2019-12-07 13:22:10 +01:00
bors-servo
bb00a83ec4
Auto merge of #25029 - szeged:wgpu_request_device, r=jdm
Initial implementation of GPUDevice for WebGPU

Added the WebIDL bindigs for GPUDevice, GPUObjectDescriptorBase, GPUDeviceDescriptor, GPUObjectBase
Implemented the `requestDevice` function of `GPUAdapter`

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

cc @jdm, @kvark, @zakorgy

<!-- 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-12-05 13:59:34 -05:00
Istvan Miklos
b15d2bb7d7 Initial implementation of GPUDevice for WebGPU
Added the WebIDL bindigs for GPUDevice, GPUObjectDescriptorBase, GPUDeviceDescriptor, GPUObjectBase
Implemented the `requestDevice` function of `GPUAdapter`
2019-12-05 11:50:33 +01:00
Bailey Blankenship
deae103042 Addresses Issue: Support OffscreenCanvas as CanvasImageSource #24269
Added methods to canvas_data to support drawing an offscreen canvas onto another canvas
Bug fix: Swapped OffscreenCanvas width and height parameters to match Mozilla spec
Tests: Updated metadata for 866 tests
2019-12-04 18:23:28 -05:00
Shinichi Morimoto
274d4d2303 implement MediaSession.setPositionState method 2019-12-03 07:39:03 +09:00
Chintan Gandhi
f73e1453ca uncomment the named getter from HTMLFormElement.webidl 2019-11-27 10:37:32 -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
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
Kagami Sascha Rosylight
94565c4088 Require FormDataEventInit dictionary 2019-11-24 15:31:15 +09:00
Manish Goregaokar
87f729731a Add support for squeeze events 2019-11-22 13:58:13 -08:00
Kagami Sascha Rosylight
22278a8895 Require PromiseRejectionEventInit dictionary 2019-11-22 10:18:11 +09:00
Zakor Gyula
12893aa010 Initial implementation of WebGPU API 2019-11-21 08:30:26 +01:00
Fernando Jiménez Moreno
b494acbf19 Adapt MediaMetadata interface to new way of declaring constructors 2019-11-20 13:33:16 +01:00
Fernando Jiménez Moreno
31ce7a2b5c Handle media session action, no default handling yet 2019-11-20 13:32:38 +01:00
Fernando Jiménez Moreno
4b5b4d19bf MediaSession API DOM bindings 2019-11-20 13:32:10 +01:00
Fernando Jiménez Moreno
04f4da3e13 Implement AudioContext.createMediaElementAudioSourceNode() 2019-11-18 17:14:51 +01:00
Fernando Jiménez Moreno
03485d730f MediaElementAudioSourceNode implementation 2019-11-18 17:14:51 +01:00
bors-servo
a7008d1cf7
Auto merge of #24665 - saschanaz:timerhandler, r=nox
Use TimerHandler IDL union type

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

<!-- 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-17 10:30:51 -05:00
jaymodi98
bf69b6fea7 Implement srcdoc support for iframes. 2019-11-12 13:57:54 -05:00
bors-servo
970f7163e9
Auto merge of #24514 - imiklos:webgl_transform_feedback, r=jdm
Add WebGL Transformfeedback support

Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.15
cc @mmatyas @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

<!-- 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-08 13:26:29 -05:00
Istvan Miklos
4f112b1705 Add Support for WebGL Transormfeedback
Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.15
2019-11-08 15:22:52 +01:00
bors-servo
df9065afb6
Auto merge of #24636 - saschanaz:windowproxy, r=nox,jdm
Use MessageEventSource on MessageEvent IDL

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

<!-- 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-07 22:35:43 -05:00
bors-servo
147c042c5a
Auto merge of #24644 - saschanaz:sequence-default, r=jdm
Use IDL sequence default value

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

<!-- 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-05 23:04:58 -05:00
bors-servo
afbcbf75ea
Auto merge of #24473 - mmatyas:webgl_fns_buffer, r=jdm
Implement the basic WebGL2 buffer data operations

Adds support for the WebGL2 calls `bufferData`, `bufferSubData`, `copyBufferSubData` and `getBufferSubData`.

Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3

---

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

This patch depends on https://github.com/servo/sparkle/pull/8. Some tests cause a crash for me at the moment, as they depend on other, not yet implemented buffer calls and transform feedback objects.

As for the code, there are a few parts I'm not sure about:

- To get the element byte size of a TypedArray I've wrote a simple `match`, as the relevant field is not published in `rust-mozjs`. Is that okay or there's some other way to get this already?
- The WebGL1 BufferData implementations were copied into the WebGL2 code as a workaround, due to the difference in the available buffer slots (ie. `self.bound_buffer`). An alternative could be is to pass this function and self as parameters to an internal buffer data implementation function, but personally I found that code to be quite ugly.

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 (with the sparkle patch)
- [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. -->
2019-11-05 16:52:51 -05:00
Kagami Sascha Rosylight
1b22c10483 Use TimerHandler IDL union type 2019-11-05 23:55:15 +09:00
Mátyás Mustoha
4050b7f9ec Implement the basic WebGL2 buffer data operations
Adds support for `bufferData`, `bufferSubData`, `copyBufferSubData`
and `getBufferSubData`.

Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3
2019-11-05 11:33:13 +01:00
Micah Tigley
38b91c3501 Implement MouseEvent's x/y and offsetX/offsetY attributes 2019-11-04 18:28:08 -05:00
Kagami Sascha Rosylight
01e0b2cb5e Use IDL sequence default value 2019-11-04 23:39:37 +09:00
Kagami Sascha Rosylight
f8b61c0315 Use MessageEventSource on MessageEvent IDL 2019-11-04 23:12:52 +09:00
Kagami Sascha Rosylight
691af0e98b Support stringifier attributes 2019-10-29 21:35:40 +09:00
Tamas Keri
e27b80aad5 Delete superfluous comment
Deleted unnecessary commit, because
the 'WebGLSampler' was implemented.
2019-10-28 10:15:25 +01:00
bors-servo
5011e9c21c
Auto merge of #24471 - saschanaz:enum-default, r=ferjm
Support enum value as a union default value

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

Didn't implement the actual latency thing because the relevant things are already marked as TODO.

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

<!-- 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-10-21 03:27:18 -04:00
bors-servo
a905916ede
Auto merge of #23637 - gterzian:continue-message-port, r=jdm
Continue message port

<!-- Please describe your changes on the following line: -->
Fixes #7457.
Fixes #12715.
Fixes #12717.
Fixes #16095.
Fixes #18969.

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

<!-- 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/23637)
<!-- Reviewable:end -->
2019-10-19 13:19:01 -04:00
Kagami Sascha Rosylight
e271edad92 Convert [HTMLConstructor] as constructor extension 2019-10-19 20:55:45 +09:00
Gregory Terzian
2f8932a6a1 continue messageport, transferable, postmessage options 2019-10-19 14:28:18 +08:00
Keith Yeung
c3b17c1201 begin messageport, transferable objects, impl
Accept transfer argument for StructuredCloneData::write

Allow structured clone reads to return a boolean

Add Transferable trait

Add basic skeletons to MessagePort

Implement transfer and transfer-receiving steps on MessagePort

Use transfer and transfer_receive in StructuredClone callbacks

Implement MessageChannel

Freeze the array object for the MessageEvent ports attribute

Implement transfer argument on window.postMessage

Use ReentrantMutex instead for MessagePortInternal

Accept origin as a parameter in dispatch_jsval

Fix BorrowMut crash with pending_port_message

Detach port on closure and check for detached during transfer

Enable webmessaging tests

fix webidl

fix
2019-10-19 14:12:22 +08:00