Commit graph

9039 commits

Author SHA1 Message Date
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
bors-servo
ebe432bf58
Auto merge of #25202 - Eijebong:domtokenlist_replace, r=jdm
Return a boolean from DOMTokenList::replace to match the spec

Fixes #25129
2019-12-09 22:26:27 -05:00
Patrick Shaughnessy
7f41b1b294 hidden field named _charset_ now appears in FormData as UTF-8 to fix #25150 2019-12-09 12:45:14 -05:00
bors-servo
013bb662cb
Auto merge of #25035 - szeged:wgpu-core, r=jdm
Replace wgpu-native with wgpu-core

<!-- Please describe your changes on the following line: -->
This addresses `1` form https://github.com/servo/servo/issues/24706#issuecomment-557891841.
cc @jdm @kvark @imiklos

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

<!-- 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/25035)
<!-- Reviewable:end -->
2019-12-08 14:38:40 -05:00
bors-servo
136366bf64
Auto merge of #25161 - paulrouget:cachedMsgs, r=jdm
devtools: save and send cached messages

@jdm the only real difference between your original patch and this PR is the removal of the `GetCachedMessages` messages that are not necessary anymore now that we directly send the message to the devtools.

---
<!-- 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 #13161 (GitHub issue number if applicable)
2019-12-08 12:12:40 -05:00
Anshul Jethvani
4682d9231d sorting done for Step 6 of SupportedPropertyNames 2019-12-07 21:03:28 -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
Anshul Jethvani
a935e00e21 sorting partially done for Step 6 of SupportedPropertyNames 2019-12-06 23:48:06 -05:00
Anshul Jethvani
575f7f5670 partially implemented SupportedPropertyNames 2019-12-06 19:52:10 -05:00
Zakor Gyula
e146e6058a Replace wgpu-native with wgpu-core 2019-12-06 12:49:56 +01:00
Paul Rouget
b3b886e837 devtools: save and send cached messages 2019-12-06 10:10:43 +01:00
Anshul Jethvani
159194b0f9 run tidy check and added comments 2019-12-06 01:24:52 -05:00
Anshul Jethvani
16b9efc406 updated past_names_map to save time info 2019-12-06 00:40:43 -05:00
Anshul Jethvani
7b968a3ca8 NamedGetter completed and fixed issues 2019-12-05 19:50:10 -05:00
Anshul Jethvani
50fdae7a8c implemented NamedGetter and other suggestions 2019-12-05 14:43:29 -05: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
hkshah6
5e67dbda54 Fixed is_listed_element() call and DomRoot child reference 2019-12-04 18:44:57 -05: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
jaymodi98
2ee6150990 Removed tidy-test errors 2019-12-03 18:31:16 -05:00
bors-servo
6e3c131139
Auto merge of #24977 - ridhimrastogi:async-wasm-compilation-final, r=jdm
Add StreamConsumer wrapper and methods to response

<!-- Please describe your changes on the following line: -->
Add Streamconsumer wrapper to Response

---
<!-- 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 #21476
<!-- 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-03 17:38:53 -05:00
Chintan Gandhi
2108a85764 created sourced names w/o past names map part 2019-12-03 16:12:51 -05:00
Ridhim Rastogi
a5469f8710 Add StreamConsumer wrapper and methods to response 2019-12-03 15:59:35 -05:00
bors-servo
7ba88e8237
Auto merge of #24626 - glowe:issue-21810/improve-validation-methods, r=jdm
Issue 21810/improve validation methods

<!-- Please describe your changes on the following line: -->
This is a start at addressing #21810. I'm putting these changes out early to get some feedback on the following items:

1. I added unit tests for the validation methods mentioned in #21810, because I couldn't tell whether any of the existing WPT tests covered them. Are these tests worthwhile? Are any of them unnecessary?
2. I changed the implementation for `is_valid_floating_point_number_string` so that it passed the tests. The previous version of the function wasn't restrictive enough (it allowed certain whitespace characters before the number string).
3. I changed the catch-all condition in `htmlinputelement.rs` to account for the remaining input types that don't have a value sanitization algorithm. This last change seems good to me since we won't be able to add a new input type without adding it to the case and checking the spec for an algorithm.
---
<!-- 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 #21810

<!-- 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-03 13:11:22 -05:00
bors-servo
f31a88d85d
Auto merge of #24885 - shnmorimoto:implement_mediasession_set_positon_state, r=ferjm
Implement mediasession set positon state

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

fix #24808

> Bonus points if you want to tweak the existing UI by adding a progress bar, and the info about the current position and total duration.

I haven't implemented this yet.

---
<!-- 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 #24808 (GitHub issue number if applicable)

<!-- 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-03 12:13:06 -05:00
bors-servo
7aa68c8fe7
Auto merge of #25025 - Manishearth:originOffset, r=jdm
Origin offset fixes

https://github.com/immersive-web/webxr/issues/567 was closed out. We were computing offset spaces of already-offset spaces incorrectly, but otherwise our math is correct. I improved our comments around this with more math, so I never have to do this math again.

Chrome's math isn't, which is why we fail some tests around this: https://bugs.chromium.org/p/chromium/issues/detail?id=1030049 . I'm planning to wait for them to fix and upstream the tests, I've already verified that we pass the corrected test.

r? @jdm
2019-12-03 00:11:14 -05:00
Manish Goregaokar
ba3689ee4f Origin offset fixes 2019-12-02 17:11:05 -08:00
bors-servo
87c1019c5d
Auto merge of #24940 - Eijebong:trim-header, r=jdm
Trim header values in GetResponseHeader

Fixes #24917
2019-12-02 17:47:24 -05:00
Shinichi Morimoto
8bdee36bb8 extended MediaSessionEvent with SetPositionState 2019-12-03 07:39:04 +09:00
Shinichi Morimoto
274d4d2303 implement MediaSession.setPositionState method 2019-12-03 07:39:03 +09:00
glowe
576f51f598 Add DOMString floating point string test and fix
Fixes an issue where DOMString::is_valid_floating_point_number_string
was returning true for strings that began with whitespace characters-
TAB, LF, FF, or CR. Also added a unit test to cover this since the
corresponding web-platform-tests are incomplete.
2019-11-30 23:29:09 -05:00
glowe
23359c5868 Remove catch-all case for input sanitization
Replaced catch-all with explicit case for inputs that do not have
a value sanitization algorithm. This should prevent us from
forgetting to implement a sanitization for an input, since they
must all be accounted for in the match expression.
2019-11-30 21:53:53 -05:00
Emilio Cobos Álvarez
226c9807df
style: Fix servo build. 2019-11-30 20:45:08 +01:00
Emilio Cobos Álvarez
f8e924f86a
style: Don't specify minor version for cssparser. 2019-11-30 20:45:06 +01:00
Bastien Orivel
a91176e7fc Trim header values in GetResponseHeader
Fixes #24917
2019-11-30 16:59:10 +01:00
bors-servo
3db473714b
Auto merge of #24670 - glowe:add-crlf-to-boundary, r=Manishearth
Add CRLF to encoded multipart form data

<!-- Please describe your changes on the following line: -->
Some (3) WPT tests were failing because they expected the body for a multipart form data response to end with a CRLF. So I updated encode_multipart_form_data to add the missing terminator.

Looking at the corresponding spec (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart%2Fform-data-encoding-algorithm) and RFC (https://tools.ietf.org/html/rfc7578), I couldn't find anything mentioned about this detail.

---
<!-- 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-29 20:21:38 -05:00
glowe
3d322f96e3 Add CRLF to encoded multipart form data
Some WPT tests were failing because they expected the body for a
multipart form data response to end with a CRLF. So I updated
encode_multipart_form_data to add the missing terminator.
2019-11-29 17:29:39 -05:00
bors-servo
b0012a62b2
Auto merge of #24883 - szeged:id_management, r=jdm
Add WebGPU identity management

<!-- 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 @jdm, @kvark, @zakorgy
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2019-11-28 11:05:19 -05:00
Istvan Miklos
b26598d470 Add WebGPU identity management
Issue: https://github.com/servo/servo/issues/24706#issuecomment-557891841
2019-11-28 10:33:03 +01:00
bors-servo
5f1681ad25
Auto merge of #24875 - jdm:wr-no-ipc, r=asajeffrey
Extract IPC out of webrender

Fixes #20172. Fixes #13480.
2019-11-27 20:48:13 -05:00
Josh Matthews
564c16d754 Use non-IPC webrender API over explicit IPC channels. 2019-11-27 20:47:53 -05:00
Chintan Gandhi
f73e1453ca uncomment the named getter from HTMLFormElement.webidl 2019-11-27 10:37:32 -05:00
Kagami Sascha Rosylight
e20de3b04a Handle u32 property indices 2019-11-27 15:50:04 +09:00
bors-servo
f166422102
Auto merge of #24862 - jdm:js-init-destroy-fit-the-second, r=asajeffrey
Ensure SpiderMonkey shuts down cleanly

This is the alternate solution that I described in #24845. Given how much simpler the resulting code is, I'm now much more in favour of this design. Depends on https://github.com/servo/rust-mozjs/pull/487.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21696 and fix #22276
- [x] There are tests for these changes
2019-11-27 01:23:20 -05:00
Josh Matthews
1c7f2d696c Remove use of deprecated language construct. 2019-11-26 21:54:33 -05:00
Josh Matthews
7944d9548c script: Ensure JS engine is initialized and deinitialized on the same thread. 2019-11-26 21:54:33 -05:00
bors-servo
a922c497fa
Auto merge of #24758 - gterzian:impl_timer_task_source, r=nox
Implement timer-task-source, time-out service worker

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

Implements the timer task-source, and folds the IPC glue-code into a single route set by the globalscope.

Also switches service worker to using a dedicated "time-out" mechanism, which previously relied on the timer mechanism(and I think didn't actually implement script timers).

---
<!-- 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 #24747 (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-11-26 16:26:20 -05:00
bors-servo
8e0aa68aaa
Auto merge of #24783 - mmatyas:webgl_fns_readpixels, r=nox
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

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

---

This is a work in progress patch, but I think it might be ready for comments. There are a few issues left:

- When the target is the pixel pack buffer, the GL function expects a byte offset as a pointer. In Sparkle the `read_pixels` functions return/work on top of arrays, so for now I've made a [workaround patch](45d8bb263d). I wonder if that's okay or should we do it somehow differently?
- When writing to the pixel pack buffer, padding bytes on the destination are properly ignored. When writing to client buffers, Sparkle `read_pixels` returns a buffer with 1 byte alignment, which I think is fine (less stuff to move between threads), but requires positioning the rows manually (see the bottom of `read_pixels_into` vs. `ReadPixels_`).
- There are some duplicated code between the array buffer and pixel pack buffer variants, eg. the detection of intersection with the framebuffer. This could be refactored, but that results in a function with `Result<Option<Rect<u32>>, WebGLError>`, which I'm not sure is readable enough to help.
- There is a duplication with the WebGL1 code. WebGL2 introduces row length, skip pixels and skip rows as pixel pack parameters which affect the ReadPixels operation. The helper functions could be moved to be usable in WebGL1, but then these new modifiers would also need to be passed as a function parameter, which is somewhat ugly (but would work). What's your opinion about this?

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
- [x] `./mach test-tidy` does not report any errors
- [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-26 12:31:15 -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