mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibWeb: Support animated backgrounds
This commit is contained in:
parent
bfdb30c74a
commit
6ff9a88c3b
Notes:
sideshowbarker
2024-07-17 04:31:10 +09:00
Author: https://github.com/moustafaraafat
Commit: 6ff9a88c3b
Pull-request: https://github.com/SerenityOS/serenity/pull/15860
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ
3 changed files with 54 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue