Commit graph

1827 commits

Author SHA1 Message Date
Martin Robinson
3b0619aedd Move most animation processing to script
This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.
2020-05-12 10:22:14 +02:00
Manish Goregaokar
89fac8be5c Add XRJointSpace 2020-04-27 17:35:48 -07:00
Manish Goregaokar
c89dc821ba Add XRHand interface 2020-04-27 17:35:48 -07:00
Manish Goregaokar
c7b91523d0 Add XRHitTestResult 2020-04-19 20:29:14 -07:00
Manish Goregaokar
341d36a826 Add XRHitTestSource 2020-04-19 20:29:14 -07:00
Manish Goregaokar
98ff97783e Add origin/direction methods to XRRay 2020-04-19 20:29:14 -07:00
Manish Goregaokar
b6a9e41bb8 Add stub XRRay 2020-04-19 20:29:14 -07:00
Simon Sapin
6175a68c10 Replace a transmute with .to_ne_bytes() + constructor 2020-04-15 17:54:04 +02:00
Simon Sapin
7861b0be79 Remove use of soon-to-be-deprecated unstable feature
https://github.com/rust-lang/rust/issues/47336#issuecomment-586589016
2020-04-15 15:10:11 +02:00
bors-servo
3abbfdf278
Auto merge of #26170 - Manishearth:enum-convertible, r=asajeffrey
Add FromJSValConvertible for enums

Fixes https://github.com/servo/servo/issues/26169

This adds FromJSValConvertible implementations for webidl enums, which allows them to be used within `sequence<>`, etc.

This also uses these implementations when converting arguments.
2020-04-12 11:47:43 -04:00
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
Alan Jeffrey
c611e46381 Remove WebVR 2020-04-08 20:23:41 -05:00
Anthony Ramine
030a1cf8fb Replace OpaqueStyleAndLayoutData by StyleAndOpaqueLayoutData 2020-04-06 23:06:13 +02:00
teapotd
779552ee7d Form constraints validation 2020-04-02 10:16:46 +02:00
Anthony Ramine
f014da9565 Introduce LayoutDom::is
Just like Castable::is.
2020-03-31 22:06:40 +02:00
Anthony Ramine
dd750c6f86 Introduce LayoutDom::to_layout_slice
It generalises <LayoutDom<Element>>::attrs.
2020-03-31 21:39:45 +02:00
bors-servo
f9e7c6b9dc
Auto merge of #26054 - shnmorimoto:fix_tojson_unconditionally_serializes, r=jdm
Fix tojson unconditionally serializes

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

<!-- 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-31 02:33:53 -04:00
Shinichi Morimoto
74995a5287 fixed CGCollectJSONAttributesMethod 2020-03-31 09:37:07 +09:00
Anthony Ramine
ba5bcec7e4 Make LayoutDom<'dom, T> be a mere reference wrapper 2020-03-30 13:09:02 +02:00
Anthony Ramine
ea9e62bdca Fix LayoutDom::unsafe_get
The raw pointer can be used to extend the lifetime of the inner T
to beyond 'dom.
2020-03-30 13:07:36 +02:00
Shinichi Morimoto
d8c1dc60e8 fixed is_satisfied condition 2020-03-30 02:32:46 +09:00
Shinichi Morimoto
fa8afbb1b0 remove unnecessary condition 2020-03-30 02:32:17 +09:00
Anthony Ramine
dba6a635e5 Give a lifetime parameter to LayoutDom 2020-03-28 15:37:57 +01:00
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
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
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
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
bors-servo
6116012408
Auto merge of #25831 - szeged:wgpu_read_map_async, r=jdm
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.

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

<!-- 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.-->
cc @kvark @jdm @zakorgy
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-02-25 16:42:35 -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
Gregory Terzian
eb21d5f738 implement broadcastchannel 2020-02-25 14:17:48 +08: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
bors-servo
107a29121c
Auto merge of #25793 - szeged:wgpu_compute_pass_encoder_fns, r=jdm
Implement GPUComputePassEncoder functions

Implement the `dispatch`, `endPass`, `setBindGroup`, `setPipeline` functions of `GPUComputePassEncoder`.

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

<!-- 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.-->
cc @kvark @jdm @zakorgy
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-02-19 17:18:29 -05:00
Istvan Miklos
170e9971ac Implement GPUComputePassEncoder functions
Implement the `dispatch`, `endPass`, `setBindGroup`, `setPipeline` functions of `GPUComputePassEncoder`.
2020-02-19 11:19:59 +01: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
bors-servo
993a5f6bec
Auto merge of #25744 - szeged:wgpu_queue, r=jdm
Initial implementation of GPUQueue

Added WebIDL bindings for `GPUQueue`.
Implemented the `submit` function of `GPUQueue` and `defaultQueue` function of `GPUDevice`.

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

<!-- Either: -->
cc @kvark @jdm @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. -->
2020-02-14 15:48:40 -05:00
Zakor
a3c6810b18 Initial implementation of GPUQueue
Added WebIDL bindings for `GPUQueue`.
Implemented the `submit` function of `GPUQueue` and `defaultQueue` function of `GPUDevice`.
2020-02-13 14:37:25 +01:00
bors-servo
69152c7c96
Auto merge of #25223 - pshaughn:xmlerrortype, r=Manishearth
Changed error type on qname, per spec

<!-- Please describe your changes on the following line: -->
As specified in https://dom.spec.whatwg.org/#validate invalid QNames when creating a namespaced document/element/attribute get an invalid character exception, not a namespace exception.

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

<!-- 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-02-12 17:55:06 -05:00
Patrick Shaughnessy
9cc3252385 Changed error type on qname, per spec 2020-02-12 17:02:56 -05:00
bors-servo
da75ef25a7
Auto merge of #25494 - pshaughn:leadingzeroes, r=jdm
Make sure input value=12:30:01 doesn't turn into 12:30:1

Fixed convert_valid_normalized_local_date_and_time_string to add the mandatory leading 0 before seconds values that needed it, added tests to see that various-length strings with zeroes in them would roundtrip properly.

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

<!-- 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-02-12 12:37:02 -05:00
Patrick Shaughnessy
6dc8f67f8f Make sure input value=12:30:01 doesn't turn into 12:30:1 2020-02-12 11:50:40 -05:00
Zakor Gyula
4facd3d4d2 Initial implementation of GPUCommandEncoder
Added WebIDL bindings for `GPUCommandEncoder`, `GPUCommandBuffer`, `GPUComputePassEncoder`, `GPUProgrammablePassEncoder`.
Implemented the `beginComputePass`, `copyBufferToBuffer` and `finish` functions of `GPUCommandEncoder`.
Implemented the `createCommandEncoder` function of `GPUDevice`.
2020-02-11 10:20:34 +01:00