LibWeb: Support animated backgrounds

This commit is contained in:
Moustafa Raafat 2022-10-30 15:43:42 +00:00 committed by Andrew Kaster
parent bfdb30c74a
commit 6ff9a88c3b
Notes: sideshowbarker 2024-07-17 04:31:10 +09:00
3 changed files with 54 additions and 14 deletions

View file

@ -55,6 +55,11 @@ void HTMLBodyElement::parse_attribute(FlyString const& name, String const& value
document().set_visited_link_color(color.value());
} else if (name.equals_ignoring_case("background"sv)) {
m_background_style_value = CSS::ImageStyleValue::create(document().parse_url(value));
m_background_style_value->on_animate = [this] {
if (layout_node()) {
layout_node()->set_needs_display();
}
};
}
#undef __ENUMERATE