aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | #24468 Performance::queue_entries return the index of the added performance ↵Shinichi Morimoto2019-12-131-4/+3
| | | | | | | | entry
* | devtools: save and send cached messagesPaul Rouget2019-12-061-3/+0
|/
* Use non-IPC webrender API over explicit IPC channels.Josh Matthews2019-11-271-3/+3
|
* Auto merge of #24758 - gterzian:impl_timer_task_source, r=noxbors-servo2019-11-261-65/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. -->
| * impl timer-task-source, dedicated time-out mechanism for service-workerGregory Terzian2019-11-191-65/+17
| |
* | Auto merge of #24708 - szeged:webgpu-base, r=gterzian,kvarkbors-servo2019-11-251-0/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial implementation of WebGPU API <!-- Please describe your changes on the following line: --> - Added the WebIDL bindings for GPU and GPUadapter interfaces. - Created a background thread for WebGPU api calls. - Established the async communication between the background thread and the WebGPU interfaces. - Implemented the `requesAdapter` function of `navigator.gpu` `./mach test-tidy` reports an error due to the different `arrayvec` version used in `servo` and `webgpu`, so added it to the ignore list in `servo-tidy.toml` --- <!-- 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 - [ ] `./mach test-tidy` does not report any errors - [ ] These changes addresses a part of #https://github.com/servo/servo/issues/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.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> cc @jdm, cc @kvark <!-- 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/24708) <!-- Reviewable:end -->
| * | Initial implementation of WebGPU APIZakor Gyula2019-11-211-0/+6
| | |
* | | Auto merge of #24818 - gterzian:fix_panic_on_finish_load, r=jdmbors-servo2019-11-221-0/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent panic on layout send in finish-load <!-- Please describe your changes on the following line: --> Do not run the finish load steps if the pipeline has been discarded by the time the parser finishes. --- <!-- 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 #22955 (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. -->
| * | | abort parser before shutting down layout in exit pipelineGregory Terzian2019-11-221-6/+8
| | | |
| * | | abort parser, if any, when pipeline exitsGregory Terzian2019-11-211-0/+6
| | |/ | |/|
* | | Auto merge of #24789 - gterzian:fix_unloading, r=jdmbors-servo2019-11-221-1/+2
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix unloading, active BC, and clearing js runtime <!-- Please describe your changes on the following line: --> Do not set the window to be the currently active one for the windowproxy as part of `load`, as it will be done later when the document activity is set. And doing it later means that when unload runs, it is with the unloaded pipeline as the active window. Only nullify the window proxy if it's not used by another (currently-active) window. --- <!-- 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 #24591 (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. -->
| * | ensure unload run with old pipeline as currently-active, do not nullify ↵Gregory Terzian2019-11-211-1/+2
| |/ | | | | | | proxy unless currently-active
* | Auto merge of #24757 - Akash-Pateria:async-wasm-compilation-subsequent, r=jdmbors-servo2019-11-201-3/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Async wasm compilation event loop integration The PR contains changes related to binding the runnable dispatching in script_runtime and is part of the Asynchronous WebAssembly Compilation fix. This is the first step in the subsequent steps mentioned in the [wiki](https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project). --- <!-- 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 are part of #21476 fix
| * | Bind runnable dispatching in script_runtimeAkash-Pateria2019-11-191-3/+6
| |/
* | Fix media session action handlingFernando Jiménez Moreno2019-11-201-53/+8
| |