LibWeb: Remove background_image from NodeWithStyle

We now entirely use the background-layers to check images.
This commit is contained in:
Sam Atkins 2021-11-12 13:53:20 +00:00 committed by Andreas Kling
parent a214036509
commit 3d127472ba
Notes: sideshowbarker 2024-07-18 01:02:13 +09:00
3 changed files with 7 additions and 12 deletions

View file

@ -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);
}
}