Commit graph

760 commits

Author SHA1 Message Date
Manish Goregaokar
242b7f8fdc Use FromJSValConvertible impls when converting arguments 2020-04-11 00:15:43 -07:00
Manish Goregaokar
10a13ffa20 Implement FromJSValConvertible on enums 2020-04-11 00:15:43 -07:00
Manish Goregaokar
c24481ab9c Do not filter out platform objects when doing dictionary conversions
https://heycam.github.io/webidl/#es-overloads

In step 12, the platform object check is for substep 4, but importantly it only matters if `V` implements the matching interface. If not, it should be able to fall back to substep 10 and attempt conversion to a dictionary.
2020-04-08 23:15:57 -07:00
Shinichi Morimoto
74995a5287 fixed CGCollectJSONAttributesMethod 2020-03-31 09:37:07 +09:00
Shinichi Morimoto
d8c1dc60e8 fixed is_satisfied condition 2020-03-30 02:32:46 +09:00
Shinichi Morimoto
f7d4a37f78 fixed fmt 2020-03-28 23:21:35 +09:00
Shinichi Morimoto
80b2a87be7 fixed #25281 2020-03-28 20:18:30 +09:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04: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
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
Anthony Ramine
5a4f8cf93f Update SpiderMonkey 2020-03-06 11:13:28 +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
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
JavaScript Joe
30f474312f refactor: rename XR to XRSystem
chore: fix formatting
refactor: change filename and ref to xrsystem
refactor: change filename XRSystem.webidl
refactor: update crate in navigator
refactor: use XRSystem instead of XR in navigator
refactor: update Bindings.conf
refactor: use XRSystemMethods

fix: update assertions for XRSystem

fix: update manifest json
2020-02-23 14:34:42 -08:00
Anthony Ramine
14846d0567 Introduce a new type MaybeUnreflectedDom<T> (fixes #25701) 2020-02-17 10:17:47 +01:00
CYBAI
403ffcf1eb Always pass InRealm to GlobalScope::from_context to avoid getting null global 2020-02-16 09:55:10 +09:00
Kunal Mohan
5a3e1b8e69
rename compartment to realm 2020-01-24 20:52:36 +05:30
bors-servo
fdfc840bac
Auto merge of #25446 - pshaughn:fixme11868, r=jdm
Make getOwnPropertyDescriptor hold the correct value for indexed/named properties

This is towards #25036 and #25415; it could have far-reaching implications so I want to test it in isolation and see the results on the full test suite.

A few lines of code had a FIXME(#11868) despite that issue being closed, and looking for the pattern that was marked that way, I found one other unmarked instance of it. It doesn't immediately crash, and maybe it will pass some tests or fail some tests in informative ways.

EDIT: After adding an overlooked extended attribute to HTMLFormElement, this works very well indeed and seems to be worth merging!

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

<!-- 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-01-10 15:18:10 -05:00
Patrick Shaughnessy
111ede9c77 Make property descriptors hold named/indexed property values 2020-01-10 12:32:08 -05:00
Patrick Shaughnessy
c1b71fcc4d Implement HTMLSelectElement.add() and indexed setter, fix test that was relying on add to be a stub 2020-01-07 11:05:31 -05:00
bors-servo
bac9903fbe
Auto merge of #24123 - gterzian:redo_blob, r=jdm
Restructure Blob, structured serialization

<!-- Please describe your changes on the following line: -->
FIX #24052 and also address the "cloning" half of FIX #23917

---
<!-- 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/24123)
<!-- Reviewable:end -->
2019-12-19 16:16:56 -05:00
marmeladema
7b5fabe855 Fix tidiness errors for Python3 compatibility across whole repo 2019-12-11 16:03:20 +00:00
Gregory Terzian
6e8a85482c re-structure blob, structured serialization 2019-12-11 22:46:50 +08: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
Manish Goregaokar
d233558b9b Fix iterator invalidation in our forEach implementation. 2019-11-25 19:56:14 -08: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
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
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
Simon Sapin
bea73951db Use #![register_tool] instead of #![register_attr]
CC https://github.com/rust-lang/rust/issues/66079
2019-11-15 17:24:42 +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
Kagami Sascha Rosylight
1b22c10483 Use TimerHandler IDL union type 2019-11-05 23:55:15 +09: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
Kagami Sascha Rosylight
97c01fc479 Update WebIDL.py 2019-10-29 21:34:53 +09: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
Kagami Sascha Rosylight
40ee701283 Support enum value as a union default value 2019-10-19 12:19:25 +09:00
Kagami Sascha Rosylight
e81b678645 Support [LegacyWindowAlias] 2019-10-19 12:01:00 +09:00
bors-servo
118a9ecdfe
Auto merge of #24476 - saschanaz:nonenumerable, r=jdm
Mark @@iterator as nonenumerable

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

<!-- 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-18 16:31:17 -04:00
bors-servo
32eb858a6a
Auto merge of #24469 - saschanaz:urp-default, r=Manishearth
Support USVString as default value of a union argument

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

I don't expect this fixes any test though...

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

<!-- 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-18 04:02:13 -04:00
Kagami Sascha Rosylight
1c717bc086 Mark @@iterator as nonenumerable 2019-10-17 22:08:14 +09:00
Kagami Sascha Rosylight
e905a4606a Support USVString as default value of a union argument 2019-10-17 12:06:41 +09:00
bors-servo
aa916ad20e
Auto merge of #24429 - saschanaz:getpropertykeys, r=jdm
Return false when GetPropertyKeys fails

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

As stated in https://github.com/servo/servo/pull/24377#discussion_r333844560.

---
<!-- 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. -->
2019-10-15 11:59:09 -04:00
Kagami Sascha Rosylight
b697621b05 Support WebIDL record<> 2019-10-15 17:14:00 +09:00
Kagami Sascha Rosylight
764f1a3724 Return false when GetPropertyKeys fails 2019-10-12 18:57:05 +09:00