aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
Commit message (Collapse)AuthorAgeFilesLines
* Implement GPURenderBundleEncoder and GPURenderBundleKunal Mohan2020-07-241-0/+1
|
* Auto merge of #27026 - CYBAI:dynamic-module, r=jdmbors-servo2020-07-191-1/+7
|\ | | | | | | | | | | | | | | | | | | Introduce dynamic module --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25439 - [x] There are tests for these changes
| * Set private reference for classic scriptCYBAI2020-07-181-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Web developers can use `Dynamic Import` in a classic script; thus, we need to save the script's private reference so that we can reuse it when we're going to fetch a dynamic import module for a classic script. Besides, because it's possible to use different executing context for a dynamic import module (like `dynamic-import/string-compilation-other-document.html` WPT test), we can't initialize a module owner at the timing of `SetScriptPrivate`; thus, if the private module script doesn't hold an owner, we'll use a DynamicImport owner for it.
* | Ensure GPUDevice cleanup in GlobalScopeKunal Mohan2020-07-171-0/+7
| |
* | Implement Async Error reporting for WebGPU and update wgpu-coreKunal Mohan2020-07-161-0/+9
|/
* Unfocus input when virtual keyboard is dismissedPaul Rouget2020-07-131-2/+10
|
* Auto merge of #27163 - ↵bors-servo2020-07-041-6/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alarsyo:23053-layout-queries-disconnected-frames-panic, r=jdm Return Option for Window's layout channel <!-- Please describe your changes on the following line: --> `Window::layout_chan()` now returns an `Option<Sender<Msg>>`, returning `None` if the window is dead. FIX #26969 FIX #26429 FIX #21208 FIX #19092 FIX #22559 FIX #22584 FIX #22652 --- <!-- 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 #23053 <!-- 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. --> This is my first contribution, I'm trying to figure things out! This fix passes the test case shown in #23053, however I don't know what the behavior should be in `Document` and `ScriptThread` if `Window::is_alive()` is false : simply ignore it, don't do anything ? Or is this something that should not happen now that we return false in `Window::force_reflow()` ? I'm not sure about the directory where the test case should go, any advice?
| * Return Option for Window's layout channelAntoine Martin2020-07-031-6/+13
| |
* | Propagate referrer policy during about:srcdoc page loadUtsav Oza2020-07-021-3/+4
|/
* ensure clean shutdown of all threads running JSGregory Terzian2020-06-301-38/+129
|
* Auto merge of #26926 - MDeiml:referrer-26570, r=jdmbors-servo2020-06-191-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make url for "client" referrer mandatory <!-- Please describe your changes on the following line: --> I added a url attribute to `Referrer::Client` so that the referrer header can be set accordingly when fetching. `Referrer::Client` has to be kept separate from `Referrer::ReferrerUrl` as they differ in this method https://github.com/servo/servo/blob/6b0d9afd6fdc28356ad44af0104ddd25a7b6438d/components/script/dom/request.rs#L566-L576 --- <!-- 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 #26570 (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 url for "client" referrer mandatoryMatthias Deiml2020-06-171-2/+1
| |
* | Auto merge of #26955 - gterzian:fix_parser_borrow, r=jdmbors-servo2020-06-171-6/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not trace pending parsers <!-- Please describe your changes on the following line: --> FIX https://github.com/servo/servo/issues/26857 --- <!-- 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. -->
| * do not trace pending parsersGregory Terzian2020-06-171-6/+8
| |
* | Make clicking on an element request focus for focusable elements.Josh Matthews2020-06-151-3/+1
|/
* reading unminified scripts from diskskrzyp12020-06-021-0/+8
|
* Implement GPUTexture and GPUTextureViewKunal Mohan2020-06-011-0/+2
|
* Implement GPURenderPipelineKunal Mohan2020-05-301-0/+1
| | | | Add webidl for GPURenderPipeline and implement GPUDevice.createRenderPipeline()
* Auto merge of #26659 - mrobinson:events, r=jdmbors-servo2020-05-271-157/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-261-157/+8
| | | | | | | | | | | | | | 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.
* | Make WebGPU resource creation fully asyncKunal Mohan2020-05-261-0/+1
|/ | | | | Remove some garbage code in adapter id checks Prevent panic during shutdown if using WebGPU
* Add GPUSampler to WebGPU implementationKunal Mohan2020-05-261-0/+1
| | | | Add dom_struct and webidl for GPUSampler, implement GPUDevice.createSampler() method.
* Implement client-side logic for WebGPU id recyclingKunal Mohan2020-05-221-3/+52
|
* Auto merge of #26594 - mrobinson:animationiteration, r=jdmbors-servo2020-05-211-8/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-8/+6
| | | | | | | | | | | | 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.
* | serviceworker: make job queue unique per originGregory Terzian2020-05-211-74/+0
|/
* Add creator URL, creator base URL and creator origin in browsing contextUtsav Oza2020-05-181-5/+23
|
* Share single gpu_id_hub among all threads in a processKunal Mohan2020-05-151-0/+8
|
* Fix an issue with the rooting of animating nodesMartin Robinson2020-05-131-9/+10
| | | | | | | | | Make sure nodes removed from map of rooted animating nodes are rooted on the stack before triggering event handlers. We also make sure not to call `from_untrusted_node_address` on nodes that aren't guaranteed to be rooted. Fixes #26498.
* Move most animation processing to scriptMartin Robinson2020-05-121-17/+39
| | | | | | | 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.
* Start having animations conform to the HTML specMartin Robinson2020-05-051-54/+42
| | | | | | | | | | | | | | This is a small step toward fixing #19242. The main idea is that the clock for animations should advance as the event loop ticks. We accomplish this by moving the clock from layout and naming it the "animation timeline" which is the spec language. This should fix flakiness with animations and transitions tests where a reflow could move animations forward while script was running. This change also starts to break out transition and animation events into their own data structure, because it's quite likely that the next step in fixing #19242 is to no longer send these events through a channel.
* Use a restyle for animation ticksMartin Robinson2020-05-051-17/+44
| | | | | | | | | | | | | | This change corrects synchronization issues with animations, by reworking the animation processing model to do a quick restyle and incremental layout when ticking animations. While this change adds overhead to animation ticks, the idea is that this will be the fallback when synchronous behavior is required to fulfill specification requirements. In the optimistic case, many animations could be updated and applied off-the-main-thread and then resynchronized when style information is queried by script. Fixes #13865.
* Add support for animationend eventMartin Robinson2020-05-011-56/+91
| | | | | | | | | | This is triggered when an animation finishes. This is a high priority because it allows us to start rooting nodes with animations in the script thread. This doesn't yet cause a lot of tests to pass because they rely on the existence of `Document.getAnimations()` and the presence of `animationstart` and animationiteration` events.
* Auto merge of #26325 - jdm:devtools-nav, r=gterzianbors-servo2020-04-281-5/+15
|\ | | | | | | | | | | | | | | Improve devtools experience when navigating The primary motivation for this work was to fix #15425, and these changes make it possible to use the devtools to meaningfully inspect multiple pages when navigating between them. Navigating through session history is not yet supported. These changes also include improvements to the dedicated worker support, which broke at some point. We now can observe console messages in workers.
| * Support connecting to worker globals from remote devtools.Josh Matthews2020-04-281-1/+1
| |
| * Support navigating browsing contexts in the devtools.Josh Matthews2020-04-261-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Break the association between pipelines and browsing context actors. Now there is one browsing context actor per actual browsing context, and individual actors keep track of known pipelines as necessary. There is also one console/performance/timeline/inspector/etc. actor per browsing context. This also centralizes more information in the browsing context actor. Rather than duplicating state for the active pipeline in actors that need to use it, each actor now remembers the name of its associated browsing context actor and obtains that state whenever it's necessary.
* | Add support for transitionrun eventsMartin Robinson2020-04-241-7/+10
|/ | | | | | These events are triggered as soon as a transition is added to the list of running transitions. This will allow better test coverage while reworking the transitions and animations processing model.
* Add support for canceling CSS transitionsMartin Robinson2020-04-221-69/+86
| | | | | | | | | | | This change adds support for canceling CSS transitions when a property is no longer transitionable or when an element becomes styled with display:none. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Fixes #15079.
* Auto merge of #26071 - servo:rustup, r=noxbors-servo2020-04-101-15/+15
|\ | | | | | | | | | | Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07) ~Blocked on https://github.com/rust-lang/rust/issues/70280~
| * Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07)Simon Sapin2020-04-091-15/+15
| |
* | Remove WebVRAlan Jeffrey2020-04-081-20/+0
|/
* Make DOM own the style and layout data, in an UnsafeCellAnthony Ramine2020-04-041-17/+0
| | | | The previous Cell was a lie.
* Cache the result of retrieving an element's client rectangle from layout.Josh Matthews2020-03-311-1/+1
|
* shutting down IPC router thread when a process shuts down.Gregory Terzian2020-03-311-0/+7
|
* Avoid accessing node global during Node's destructor.Josh Matthews2020-02-241-0/+17
|
* Make Background Hang Monitor OptionalKunal Mohan2020-02-231-13/+20
| | | | | | This is done by wrapping all channels of communication and related objects inside Option which are configured using flag inside servo_config.
* rename compartment to realmKunal Mohan2020-01-241-3/+3
|
* Only start WebGPU thread if an adapter is requestedZakor Gyula2020-01-131-6/+0
|
* Auto merge of #24123 - gterzian:redo_blob, r=jdmbors-servo2019-12-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * re-structure blob, structured serializationGregory Terzian2019-12-111-1/+1
| |