mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Simplify parse_coordinating_value_list_shorthand
This commit is contained in:
parent
51f694c6af
commit
d6371fe896
Notes:
github-actions[bot]
2025-12-01 10:17:59 +00:00
Author: https://github.com/Calme1709
Commit: d6371fe896
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6972
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 1 additions and 6 deletions
|
|
@ -126,12 +126,7 @@ RefPtr<StyleValue const> Parser::parse_coordinating_value_list_shorthand(TokenSt
|
||||||
|
|
||||||
for (auto const& longhand_id : longhand_ids)
|
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> {
|
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);
|
return property_initial_value(longhand_id)->as_value_list().values()[0];
|
||||||
|
|
||||||
if (initial_value->is_value_list())
|
|
||||||
return initial_value->as_value_list().values()[0];
|
|
||||||
|
|
||||||
return initial_value;
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (tokens.has_next_token()) {
|
if (tokens.has_next_token()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue