diff --git a/Userland/Libraries/LibWeb/HTML/HTMLHtmlElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLHtmlElement.cpp
index 675e068df7..ee5bdbb2f9 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLHtmlElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLHtmlElement.cpp
@@ -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);
}
}
diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp
index f55fea4f36..7c42af6923 100644
--- a/Userland/Libraries/LibWeb/Layout/Node.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Node.cpp
@@ -274,13 +274,6 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
}
computed_values.set_background_color(specified_style.color_or_fallback(CSS::PropertyID::BackgroundColor, *this, CSS::InitialValues::background_color()));
- // FIXME: Remove this
- auto bgimage = specified_style.property(CSS::PropertyID::BackgroundImage);
- if (bgimage.has_value() && bgimage.value()->is_image()) {
- m_background_image = bgimage.value()->as_image();
- m_background_image->load_bitmap(document());
- }
-
computed_values.set_box_sizing(specified_style.box_sizing());
// FIXME: BorderXRadius properties are now BorderRadiusStyleValues, so make use of that.
@@ -485,7 +478,6 @@ NonnullRefPtr NodeWithStyle::create_anonymous_wrapper() const
wrapper->m_font = m_font;
wrapper->m_font_size = m_font_size;
wrapper->m_line_height = m_line_height;
- wrapper->m_background_image = m_background_image;
return wrapper;
}
diff --git a/Userland/Libraries/LibWeb/Layout/Node.h b/Userland/Libraries/LibWeb/Layout/Node.h
index 1ff7d430b9..9b31685b3b 100644
--- a/Userland/Libraries/LibWeb/Layout/Node.h
+++ b/Userland/Libraries/LibWeb/Layout/Node.h
@@ -205,7 +205,6 @@ public:
const Gfx::Font& font() const { return *m_font; }
float line_height() const { return m_line_height; }
float font_size() const { return m_font_size; }
- const CSS::ImageStyleValue* background_image() const { return m_background_image; }
Vector const& background_layers() const { return computed_values().background_layers(); }
const CSS::ImageStyleValue* list_style_image() const { return m_list_style_image; }
@@ -223,7 +222,6 @@ private:
RefPtr m_font;
float m_line_height { 0 };
float m_font_size { 0 };
- RefPtr m_background_image;
RefPtr m_list_style_image;
bool m_has_definite_height { false };