mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/CSS: Handle whitespace properly in list-style properties
This commit is contained in:
parent
8c8168c65c
commit
4f5126e52f
Notes:
github-actions[bot]
2025-11-03 11:27:00 +00:00
Author: https://github.com/AtkinsSJ
Commit: 4f5126e52f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6646
Reviewed-by: https://github.com/tcl3
2 changed files with 3 additions and 5 deletions
|
|
@ -3584,14 +3584,16 @@ RefPtr<StyleValue const> Parser::parse_list_style_value(TokenStream<ComponentVal
|
|||
Vector<PropertyID> remaining_longhands { PropertyID::ListStyleImage, PropertyID::ListStylePosition, PropertyID::ListStyleType };
|
||||
|
||||
auto transaction = tokens.begin_transaction();
|
||||
tokens.discard_whitespace();
|
||||
while (tokens.has_next_token()) {
|
||||
if (auto const& peek = tokens.next_token(); peek.is_ident("none"sv)) {
|
||||
tokens.discard_a_token();
|
||||
tokens.discard_a_token(); // none
|
||||
found_nones++;
|
||||
continue;
|
||||
}
|
||||
|
||||
auto property_and_value = parse_css_value_for_properties(remaining_longhands, tokens);
|
||||
tokens.discard_whitespace();
|
||||
if (!property_and_value.has_value())
|
||||
return nullptr;
|
||||
auto& value = property_and_value->style_value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue