aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #26714 - kunalmohan:gpu-render-pipeline, r=jdmbors-servo2020-05-3011-24/+563
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement GPURenderPipeline <!-- Please describe your changes on the following line: --> We need to wait for #26699 to merge before this. A significant amount of validation still needs to be added. I plan on doing that in a follow-up PR. r?@kvark --- <!-- 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. -->
| * Implement GPURenderPipelineKunal Mohan2020-05-3010-22/+558
| | | | | | | | Add webidl for GPURenderPipeline and implement GPUDevice.createRenderPipeline()
| * Allow sequence of nullable dictionary items in webidlKunal Mohan2020-05-301-2/+5
| | | | | | | | of type "sequence<Dict?> x"
* | Fix the webidl for HeadersBastien Orivel2020-05-304-46/+26
|/ | | | | | Make the HeadersInit type match the spec. Fixes #26441
* Auto merge of #26718 - jdm:codegen-sequence, r=Manishearthbors-servo2020-05-291-4/+4
|\ | | | | | | | | | | | | | | | | | | | | Improve precision of sequence types for WebIDL codegen. Unlike #26699, this doesn't attempt to improve any of the resulting types and only maintains the status quo. --- - [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
| * dom: Improve precision of sequence types for WebIDL codegen.Josh Matthews2020-05-291-4/+4
| |
* | Auto merge of #26668 - CYBAI:fix-module-current-script, r=jdmbors-servo2020-05-271-2/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set `currentScript` to `null` for module scripts I misunderstood the test case when I worked on #23545. That test case is actually not related to dynamic import; instead, the reason why it crashes is, `currentScript` should be updated to `null`. In spec, the step 6 of [execute-the-script-block](https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block) only says `Assert: document's currentScript attribute is null.` but doesn't says it should be set to null. Not sure if it can be improved. --- - [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) - [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. -->
| * | Set `currentScript` to `null` for module scriptsCYBAI2020-05-271-2/+6
| | | | | | | | | | | | | | | | | | I misunderstood the test case when I worked on #23545. That test case is actually not related to dynamic import; instead, the reason why it crashes is, `currentScript` should be updated to `null`.
* | | Auto merge of #26659 - mrobinson:events, r=jdmbors-servo2020-05-272-20/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for remaining animation and transition events This PR adds support for remaining animation and transitions events. There are two commits here. The first is a bit more complicated: it reworks how rooting is done for animating nodes. Instead of having the `ScriptThread` try to track which animations are active via events (which can be inaccurate), it just maintains roots for nodes that are actually present in the animations- -related data structures. The second commit adds support for the new events. Unfortunately, the existing events tests either rely on the Web Animations API or other behavior (for example, that changing animation delay restarts an animation). Since those two things are out-of-scope for this change, I've forked some of the WPT tests, removed the reliance on the Web Animations API, and added them to Servo's internal 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 #21564. - [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. -->
| * | | Have Animations struct handle rooting nodesMartin Robinson2020-05-262-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having `ScriptThread` handle rooting nodes, do this in `Animations`. This makes it easier to know when it is appropriate to root and unroot nodes instead of relying on a certain order of events. This also allows reducing quite a bit the amount of unsafe code.
* | | | Auto merge of #26660 - kunalmohan:gpu-async-resource, r=kvarkbors-servo2020-05-273-42/+31
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make WebGPU resource creation async and prevent panic during shutdown if WebGPU is enabled. <!-- Please describe your changes on the following line: --> 1. Make WebGPU resource creation async. 2. Remove some unused code in `WebGPURequest::RequestAdapter`. 3. Prevent panic during shutdown. Since WGPU thread is killed before script, sender and receiver in the script panic at either of the two places- a. If a buffer is still alive, script tries to send `WebGPURequest::DestroyBuffer` to server while dropping the buffer during shutdown. https://github.com/servo/servo/blob/7170a69695212ba8c24a9f0c4202f0ddfe52f742/components/script/dom/gpubuffer.rs#L118-L122 https://github.com/servo/servo/blob/7170a69695212ba8c24a9f0c4202f0ddfe52f742/components/script/dom/gpubuffer.rs#L182-L186 b. Receiver in script-thread panics with `RecvError` as soon as sender on server side is dropped. https://github.com/servo/servo/blob/7170a69695212ba8c24a9f0c4202f0ddfe52f742/components/script/script_thread.rs#L1456-L1457 r?@kvark --- <!-- 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 #25472 (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. -->
| * | | Make WebGPU resource creation fully asyncKunal Mohan2020-05-263-42/+31
| |/ / | | | | | | | | | | | | Remove some garbage code in adapter id checks Prevent panic during shutdown if using WebGPU
* | | Auto merge of #26642 - servo:dynamic-wrap-panic, r=Manishearthbors-servo2020-05-261-3/+13
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Use dynamic dispatch in `mozjs::panic::wrap_panic` Pick up https://github.com/servo/rust-mozjs/pull/512 Fixes https://github.com/servo/servo/issues/26585 This diff is best viewed with "ignore whitespace changes", because of indentation change.
| * | Use dynamic dispatch in `mozjs::panic::wrap_panic`Simon Sapin2020-05-251-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | Pick up https://github.com/servo/rust-mozjs/pull/512 Fixes https://github.com/servo/servo/issues/26585 This diff is best viewed with "ignore whitespace changes", because of indentation change.
* | | Auto merge of #26638 - szeged:texi2d_2, r=jdmbors-servo2020-05-263-6/+72
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for WebGL2 TexImage2D Adds initial support for one of the WebGL2 `TexImage2D` call. <!-- Please describe your changes on the following line: --> I've enabled the `conformance2/textures/image/` tests and updated the test expectations. --- <!-- 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.--> @mmatyas @zakorgy @jdm <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * | Add support for WebGL2 TexImage2DIstvan Miklos2020-05-263-6/+72
| |/ | | | | | | Adds initial support for one of the WebGL2 `TexImage2D` call.
* | Auto merge of #26630 - kunalmohan:gpu-sampler, r=jdmbors-servo2020-05-257-84/+246
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add GPUSampler to WebGPU implementation Add dom_struct and webidl for GPUSampler, implement GPUDevice.createSampler() method. <!-- Please describe your changes on the following line: --> r?@kvark --- <!-- 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. -->
| * Add GPUSampler to WebGPU implementationKunal Mohan2020-05-267-84/+246
| | | | | | | | Add dom_struct and webidl for GPUSampler, implement GPUDevice.createSampler() method.
* | Auto merge of #26623 - jdm:imagebitmap-gate, r=gterzianbors-servo2020-05-252-1/+2
|\ \ | |/ |/| | | | | | | Add a preference to control ImageBitmap while it's incomplete. Hubs tries to make use of incomplete APIs to load textures and this causes errors. It works fine if we hide the interface instead.
| * Add a preference to control ImageBitmap while it's incomplete.Josh Matthews2020-05-232-1/+2
| |
* | Auto merge of #26624 - jdm:script-unminify, r=asajeffreybors-servo2020-05-221-18/+27
|\ \ | | | | | | | | | | | | | | | Use temporary files instead of pipes for JS unminification. This change allows me to use `--unminify-js` when loading a local Hubs server. Previously there would be multiple hung js-beautifier processes and the page would never make any progress.
| * | Use temporary files instead of pipes for JS unminification.Josh Matthews2020-05-221-18/+27
| |/
* / Implement client-side logic for WebGPU id recyclingKunal Mohan2020-05-222-2/+38
|/
* Auto merge of #26564 - kunalmohan:gpu-id-rotation, r=jdmbors-servo2020-05-2110-138/+54
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade wgpu version to "0.5.0" and add server-side code for id recycling for WebGPU <!-- Please describe your changes on the following line: --> I have updated the cargo.lock to use a wgpu-core at a more recent commit where IdentityHandlerFactory was introduced. r?@kvark --- <!-- 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. -->
| * update rust toolchainKunal Mohan2020-05-211-1/+1
| |
| * Upgrade wgpu-core version to 0.5.0 and implement server-side logic for wgpu ↵Kunal Mohan2020-05-219-137/+53
| | | | | | | | | | | | id recycling Remove current implementation of MapReadAsync
* | Auto merge of #26594 - mrobinson:animationiteration, r=jdmbors-servo2020-05-214-8/+29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement animationiteration event This event is triggered when an animation iterates. This change also moves iteration out of style calculation to an "update animations" which is the next part of having animation event handling match the HTML spec. This change causes a few more tests to pass. Some of the other tests which exercise this functionality require `animationstart` events. --- <!-- 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) - [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. -->
| * | Implement animationiteration eventMartin Robinson2020-05-214-8/+29
| | | | | | | | | | | | | | | | | | This event is triggered when an animation iterates. This change also moves iteration out of style calculation to an "update animations" which is the next part of having animation event handling match the HTML spec.
* | | Auto merge of #26520 - szeged:texi2d, r=jdmbors-servo2020-05-213-15/+115
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for WebGL2 TexImage2D Adds initial support for one of the WebGL2 `TexImage2D` call. <!-- 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 part of #26512 - [x] There are tests for these changes @mmatyas @zakorgy @jdm <!-- 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. -->
| * | | Add support for WebGL2 TexImage2DIstvan Miklos2020-05-213-15/+115
| | | | | | | | | | | | | | | | Adds initial support for one of the WebGL2 `TexImage2D` call.
* | | | serviceworker: turn-off event-loop, don't assume current scope, clear ↵Gregory Terzian2020-05-212-45/+46
| | | | | | | | | | | | | | | | runtime on shutdown
* | | | serviceworker: make job queue unique per originGregory Terzian2020-05-217-68/+302
| |/ / |/| |
* | | Auto merge of #26546 - splav:tls-protected-checks, r=jdmbors-servo2020-05-195-20/+20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check http_state in determine_request_referrer <!-- Please describe your changes on the following line: --> Check https status inside determine_request_referrer. --- <!-- 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 #14506 (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. -->
| * | | make is_origin_trustworthy a method of ServoUrl + fix localhost handlingAlexandrov Sergey2020-05-191-19/+0
| | | |
| * | | check http_state in determine_request_referrerAlexandrov Sergey2020-05-194-1/+20
| | | |
* | | | Auto merge of #26499 - utsavoza:ugo/issue-26287/10-05-2020, r=jdmbors-servo2020-05-196-15/+124
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Add creator URL, creator base URL and creator origin to browsing context - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24944 and fix (partially) #26287 - [x] There are tests for these changes
| * | | Update wpt-tests metadataUtsav Oza2020-05-193-3/+1
| | | |
| * | | Update wpt-tests metadataUtsav Oza2020-05-183-7/+12
| | | |
| * | | Run mach test-tidyUtsav Oza2020-05-181-4/+4
| | | |
| * | | Add creator URL, creator base URL and creator origin in browsing contextUtsav Oza2020-05-182-5/+112
| | | |
| * | | Parse location url relative to the entry settings objectUtsav Oza2020-05-181-7/+6
| | |/ | |/|
* | | Auto merge of #26484 - servo:layout-2020-style-prep, r=SimonSapinbors-servo2020-05-197-57/+210
|\ \ \ | | | | | | | | | | | | Implement concept of dirty root
| * | | Implement concept of dirty rootAnthony Ramine2020-05-195-34/+182
| | | |
| * | | Make Node::style_and_layout_data be a DomRefCell<T>Anthony Ramine2020-05-191-21/+25
| | | | | | | | | | | | | | | | That way we can use borrow_mut_for_layout and borrow_mut.
| * | | Make DomRefCell not mutate the borrow flag non-atomicallyAnthony Ramine2020-05-182-5/+6
| |/ /
* | | Auto merge of #26551 - Manishearth:per-view, r=asajeffreybors-servo2020-05-187-129/+140
|\ \ \ | |/ / |/| | | | | | | | | | | Update to handle per-view eye transforms Depends on https://github.com/servo/webxr/pull/175
| * | Update to treat view transforms as native-relativeManish Goregaokar2020-05-185-83/+72
| | |
| * | Update to use webxr_api::ViewerPoseManish Goregaokar2020-05-183-7/+14
| | |
| * | Move viewports to being per-session, not per-frameManish Goregaokar2020-05-184-21/+42
| | |
| * | Use cached projection matrixManish Goregaokar2020-05-181-13/+5
| | |