mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 16:58:52 +00:00
LibWeb: Remove background_image from NodeWithStyle
We now entirely use the background-layers to check images.
This commit is contained in:
parent
a214036509
commit
3d127472ba
Notes:
sideshowbarker
2024-07-18 01:02:13 +09:00
Author: https://github.com/AtkinsSJ
Commit: 3d127472ba
Pull-request: https://github.com/SerenityOS/serenity/pull/10946
3 changed files with 7 additions and 12 deletions
|
@ -20,9 +20,14 @@ HTMLHtmlElement::~HTMLHtmlElement()
|
|||
bool HTMLHtmlElement::should_use_body_background_properties() const
|
||||
{
|
||||
auto background_color = layout_node()->computed_values().background_color();
|
||||
const auto* background_image = layout_node()->background_image();
|
||||
auto const& background_layers = layout_node()->background_layers();
|
||||
|
||||
return (background_color == Color::Transparent) && !background_image;
|
||||
for (auto& layer : background_layers) {
|
||||
if (layer.image)
|
||||
return false;
|
||||
}
|
||||
|
||||
return (background_color == Color::Transparent);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue