mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Simplify parse_coordinating_value_list_shorthand
This commit is contained in:
Notes:
github-actions[bot]
2025-12-01 10:17:59 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/d6371fe8961 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6972 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -126,12 +126,7 @@ RefPtr<StyleValue const> Parser::parse_coordinating_value_list_shorthand(TokenSt
|
||||
|
||||
for (auto const& longhand_id : longhand_ids)
|
||||
longhand_vectors.ensure(longhand_id).append(*parsed_values.get(longhand_id).value_or_lazy_evaluated([&]() -> ValueComparingNonnullRefPtr<StyleValue const> {
|
||||
auto initial_value = property_initial_value(longhand_id);
|
||||
|
||||
if (initial_value->is_value_list())
|
||||
return initial_value->as_value_list().values()[0];
|
||||
|
||||
return initial_value;
|
||||
return property_initial_value(longhand_id)->as_value_list().values()[0];
|
||||
}));
|
||||
|
||||
if (tokens.has_next_token()) {
|
||||
|
||||
Reference in New Issue
Block a user