mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01: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
|
@ -223,6 +223,7 @@ impl HTMLIFrameElement {
|
|||
old_pipeline_id,
|
||||
sandbox: sandboxed,
|
||||
viewport_details,
|
||||
theme: window.theme(),
|
||||
};
|
||||
window
|
||||
.as_global_scope()
|
||||
|
@ -238,6 +239,7 @@ impl HTMLIFrameElement {
|
|||
opener: None,
|
||||
load_data,
|
||||
viewport_details,
|
||||
theme: window.theme(),
|
||||
};
|
||||
|
||||
self.pipeline_id.set(Some(new_pipeline_id));
|
||||
|
@ -250,6 +252,7 @@ impl HTMLIFrameElement {
|
|||
old_pipeline_id,
|
||||
sandbox: sandboxed,
|
||||
viewport_details,
|
||||
theme: window.theme(),
|
||||
};
|
||||
window
|
||||
.as_global_scope()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue