LibWeb: Don't render list item markers for "list-style-type: none"
This commit is contained in:
parent
e1e9fb8290
commit
0d5be35c1f
Notes:
sideshowbarker
2024-07-19 05:57:31 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/0d5be35c1f3
2 changed files with 13 additions and 0 deletions
|
@ -359,6 +359,15 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
|
|||
return;
|
||||
}
|
||||
|
||||
if (property_id == CSS::PropertyID::ListStyle) {
|
||||
auto parts = split_on_whitespace(value.to_string());
|
||||
if (!parts.is_empty()) {
|
||||
auto value = parse_css_value(parts[0]);
|
||||
style.set_property(CSS::PropertyID::ListStyleType, value);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
style.set_property(property_id, value);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,10 @@ void LayoutListItem::layout(LayoutMode layout_mode)
|
|||
|
||||
LayoutBlock::layout(layout_mode);
|
||||
|
||||
if (style().string_or_fallback(CSS::PropertyID::ListStyleType, "disc") == "none") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_marker) {
|
||||
m_marker = adopt(*new LayoutListItemMarker);
|
||||
if (first_child())
|
||||
|
|
Loading…
Add table
Reference in a new issue