1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LibWeb: Render any specified list-style-image for list items

This commit is contained in:
Timothy Flynn 2021-10-29 09:00:30 -04:00 committed by Andreas Kling
parent eb0fb38cac
commit ef62118c8b
5 changed files with 37 additions and 7 deletions

View file

@ -320,6 +320,12 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
if (auto list_style_type = specified_style.list_style_type(); list_style_type.has_value())
computed_values.set_list_style_type(list_style_type.value());
auto list_style_image = specified_style.property(CSS::PropertyID::ListStyleImage);
if (list_style_image.has_value() && list_style_image.value()->is_image()) {
m_list_style_image = list_style_image.value()->as_image();
m_list_style_image->load_bitmap(document());
}
computed_values.set_color(specified_style.color_or_fallback(CSS::PropertyID::Color, *this, CSS::InitialValues::color()));
computed_values.set_background_color(specified_style.color_or_fallback(CSS::PropertyID::BackgroundColor, *this, CSS::InitialValues::background_color()));