mirror of
https://github.com/servo/servo.git
synced 2025-06-13 19:04:30 +00:00
constellation: Pass system theme to new Pipelines (#37132)
Previously, when the theme was set it was only set on currently active `Window`s. This change makes setting the `Theme` stateful. Now the `Constellation` tracks what theme is applied to a `WebView` and properly passes that value to new `Pipeline`s when they are constructed. In addition, the value is passed to layout when that is constructed as well. Testing: this change adds a unit test. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
c96de69e80
commit
d3e57a513c
19 changed files with 201 additions and 74 deletions
|
@ -68,6 +68,8 @@ pub struct NewLayoutInfo {
|
|||
pub load_data: LoadData,
|
||||
/// Initial [`ViewportDetails`] for this layout.
|
||||
pub viewport_details: ViewportDetails,
|
||||
/// The [`Theme`] of the new layout.
|
||||
pub theme: Theme,
|
||||
}
|
||||
|
||||
/// When a pipeline is closed, should its browsing context be discarded too?
|
||||
|
@ -321,6 +323,8 @@ pub struct InitialScriptState {
|
|||
pub devtools_server_sender: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||
/// Initial [`ViewportDetails`] for the frame that is initiating this `ScriptThread`.
|
||||
pub viewport_details: ViewportDetails,
|
||||
/// Initial [`Theme`] for the frame that is initiating this `ScriptThread`.
|
||||
pub theme: Theme,
|
||||
/// The ID of the pipeline namespace for this script thread.
|
||||
pub pipeline_namespace_id: PipelineNamespaceId,
|
||||
/// A ping will be sent on this channel once the script thread shuts down.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue