Commit graph

9042 commits

Author SHA1 Message Date
Warren Fisher
5c3bda0251 Remove Optional pipeline_id 2019-12-19 02:25:43 -04:00
Kunal Mohan
cb1cb40a51
Implement MessageEvent.InitMessageEvent
InitMessageEvent had to be implemented as required by wpt.
For this few keys of struct `MessageEvent` are now wrapped inside
DomRefCell wrapper.
2019-12-18 23:01:53 +05:30
Istvan Miklos
ebfcd0f27f Initial implementation of GPUBuffer for WebGPU
Added WebIDL bindings for GPUBuffer, GPUBufferDescriptor, GPUBufferUsage
Implemented the `createBuffer` and `createBufferMapped` functions of GPUDevice
2019-12-17 11:00:08 +01:00
bors-servo
6ccad53937
Auto merge of #25254 - pshaughn:stop_creating_outofspec_events, r=jdm
Removed createEvent cases, removed now-unused new_uninitializeds

<!-- Please describe your changes on the following line: -->
document.createEvent was creating some event types WHATWG now says shouldn't be created that way. This was the only caller of a few new_uninitialized methods, so those are removed too.

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

<!-- 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-17 02:13:13 -05:00
bors-servo
b274d59875
Auto merge of #25236 - pshaughn:safelistct, r=jdm
De-deplicate is_cors_safelisted_request_header helper functions

<!-- Please describe your changes on the following line: -->
Separate is_cors_safelisted_request_header implementations in script::dom::request and net::fetch::methods have been merged to a single implementation in net_traits::request, with additional logic for spec requirements that weren't previously there. This doesn't pass all the failing tests, but it doesn't fail any passing ones either and it reduces confusion about what's supposed to happen where.

---
<!-- 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 #25235 and some but not all subcases in #25175

<!-- Either: -->
- [X] There are tests for these changes, in that the WPT CORS tests that did already pass still do

<!-- 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-16 20:51:09 -05:00
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
bors-servo
c9baa5b9fc
Auto merge of #25211 - kunalmohan:6631-Worker-Id, r=jdm
`worker_id` type changed to uuid

<!-- Please describe your changes on the following line: -->
Fixes #6631
`worker_id` is now generate as uuid and saved as string.

---
<!-- 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 #6631  (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-12-16 11:31:44 -05:00
Patrick Shaughnessy
67827debd8 Now just one is_cors_safelisted_request_header, with closer spec alignment 2019-12-16 09:07:02 -05:00
Anshul Jethvani
254bbc3b8c removed duplicate entries from sourcedNamesVec for step 7 of SupportedPropertyNames 2019-12-16 01:41:59 -05:00
Shinichi Morimoto
7d184c1b01 #23330 fix clear_entries_by_name_and_type bug 2019-12-13 13:41:48 -05:00
Shinichi Morimoto
d25d658219 #24468 call update_entry API from process_response_eof 2019-12-13 13:41:48 -05:00
Shinichi Morimoto
baf2b6e4ab #24468 add a update_entry method to Performance 2019-12-13 13:41:48 -05:00
Shinichi Morimoto
91287216f5 #24468 Performance::queue_entries return the index of the added performance entry 2019-12-13 13:41:47 -05:00
Shinichi Morimoto
faee09ffa9 #24468 call submit_resource_timing after creating the document parser 2019-12-13 13:41:47 -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
bors-servo
068a210da0
Auto merge of #25267 - jdm:devtools-module-script-warning, r=Manishearth
Issue warning to devtools when module scripts in use.

This makes it easier to identify why content isn't working in environments which don't have access to the RUST_LOG output.
2019-12-12 22:17:06 -05:00
Patrick Shaughnessy
981d13dcfc Stringifier is sno longer exposed 2019-12-12 20:20:31 -05:00
bors-servo
748edb2cd9
Auto merge of #25259 - Manishearth:wpt-fixes, r=asajeffrey
Various webxr WPT fixes

Needs https://github.com/servo/webxr/pull/108

r? @asajeffrey

Went through most of the failing tests and fixed them. Many of the remaining ones fail due to unsupported features that I can slowly whittle away.
2019-12-12 18:13:15 -05:00
Josh Matthews
55eb34b8a9 Issue warning to devtools when module scripts in use. 2019-12-12 15:42:37 -05:00
Patrick Shaughnessy
ec70f42638 Removed createEvent cases, removed now-unused new_uninitializeds 2019-12-12 11:33:32 -05:00
Manish Goregaokar
d12f8e31a3 Allow spawning inline sessions without interaction 2019-12-11 23:34:25 -08:00
bors-servo
82fd8d1daf
Auto merge of #25159 - garasubo:fix-composition-event, r=jdm
implement composition event creation in Document.createEvent

Solved the problem mentioned in https://github.com/servo/servo/issues/24724#issuecomment-562326328

Add logic to create composition event for Document.createEvent. This resolved some WPT test failure, so updated the metadata as well

Ref: https://developer.mozilla.org/en-US/docs/Web/API/Document/createEvent

---
<!-- 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-12-12 01:33:04 -05:00
Manish Goregaokar
fe7cbd7843 Construct viewports for inline sessions 2019-12-11 22:12:07 -08:00
Manish Goregaokar
3414c8d22d Correctly clamp ivfov and depth values 2019-12-11 22:12:07 -08:00
Manish Goregaokar
f52a6f0e8f Set inlineVerticalFieldOfView to null for immersive sessions 2019-12-11 22:12:07 -08:00
Manish Goregaokar
5b3132ebb7 Clean up mock view code, support mono views 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
bc1bd22d47 Use actual floor origin for local-floor 2019-12-11 22:12:07 -08:00
Manish Goregaokar
322463450d Support nullable origins and floors 2019-12-11 22:12:06 -08:00
Manish Goregaokar
e27687497b Use correct timestamps 2019-12-11 22:11:23 -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
takumi
de939eb96d implement composition event creation in Document.createEvent 2019-12-12 10:45:22 +09:00
bors-servo
b3b72cb9e3
Auto merge of #25239 - marmeladema:issue-23607/test-tidy-no-wpt, r=jdm
Make `mach test-tidy --no-wpt` compatible with Python3

Make `mach test-tidy --no-wpt` compatible with Python3
See also #23607

After this pull request, all python files (except WPT) will be checked for Python3 syntax compatibility.

---
<!-- 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: -->
- [ ] 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-11 15:26:09 -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
marmeladema
7b5fabe855 Fix tidiness errors for Python3 compatibility across whole repo 2019-12-11 16:03:20 +00:00
bors-servo
fc97a53a94
Auto merge of #25240 - pshaughn:unspecial_mouseover, r=SimonSapin
Took out the special mouseover cancel case

<!-- Please describe your changes on the following line: -->
eventtarget.rs was checking the event type to see if it was a mouseover; now it doesn't. Other special-case events like error and beforeunload go down other code paths entirely, so this one has no special cases left.

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

<!-- 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-11 10:12:52 -05:00
Patrick Shaughnessy
0231a0a712 adding .isConnected DOM attribute 2019-12-11 10:08:05 -05:00
Simon Sapin
e501eaaa5b
Add FIXME to the new comment asking wether code below it is right 2019-12-11 08:59:05 +01:00
bors-servo
ded8643988
Auto merge of #25227 - gterzian:remove_unnecessary_thread_in_filereader, r=jdm
Remove unnecessary thread in filereader, add stream TODO

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

I think there are no benefits to queuing the various `FileReadingTask` from a thread, and reading the actual blob bytes are still done on the main-thread. We could try to move the reading off the main-thread(but note the `Blob` is not something you would want to move to another thread "as-is" since it's a `DomObject`), and I think we should just aim for implementing streams and follow the spec instead.

---
<!-- 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. -->
2019-12-10 23:06:03 -05:00
Patrick Shaughnessy
f35a870f55 Took out the special mouseover cancel case 2019-12-10 21:50:47 -05:00
Manish Goregaokar
51af3be468 Don't attempt to wait for session ending when it has already ended
See https://github.com/immersive-web/webxr/pull/939
2019-12-10 15:13:47 -08:00
Manish Goregaokar
d46cbb2083 Allow simulating multiple immersive-capable devices 2019-12-10 15:13:42 -08:00
Manish Goregaokar
8aaa8493a7 Give inline sessions the correct projection matrices 2019-12-10 15:13:42 -08: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
Manish Goregaokar
2066a5509a Allow constructing inline sessions 2019-12-10 15:13:42 -08:00
Manish Goregaokar
d681909b28 Bump webxr 2019-12-10 15:13:42 -08:00
bors-servo
4d5bf653f7
Auto merge of #25217 - pshaughn:fix25150, r=jdm
hidden field named _charset_ now appears in FormData as UTF-8

<!-- Please describe your changes on the following line: -->
HTMLInputElement now has special case logic for putting a hidden field named `_charset_` in an entry set. To support this, the encoding used when constructing a form dataset is now being passed further down the callchain than it was before.

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

<!-- 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-10 07:50:27 -05:00
Kunal Mohan
d60f7d87c8
Undo changes done to change worker_id type to string 2019-12-10 13:12:54 +05:30