1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00

LibWeb/CSS: Sort text-decoration-line values in spec order

This wins us 49 WPT subtest passes! :^)
This commit is contained in:
Sam Atkins 2024-11-29 14:46:15 +00:00 committed by Andreas Kling
parent fa1e102f3c
commit 671d3e8a48
Notes: github-actions[bot] 2024-11-30 10:02:36 +00:00
3 changed files with 59 additions and 54 deletions

View file

@ -6384,6 +6384,11 @@ RefPtr<CSSStyleValue> Parser::parse_text_decoration_line_value(TokenStream<Compo
if (style_values.is_empty())
return nullptr;
quick_sort(style_values, [](auto& left, auto& right) {
return *keyword_to_text_decoration_line(left->to_keyword()) < *keyword_to_text_decoration_line(right->to_keyword());
});
return StyleValueList::create(move(style_values), StyleValueList::Separator::Space);
}