mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-15 23:09:05 +00:00
LibWeb/CSS: Remove unwanted newline from list serialization
Gets us 1 subtest pass.
This commit is contained in:
parent
8cdb8ca193
commit
917d659f8b
Notes:
github-actions[bot]
2024-11-30 10:03:16 +00:00
Author: https://github.com/AtkinsSJ
Commit: 917d659f8b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2638
2 changed files with 7 additions and 4 deletions
|
@ -31,14 +31,17 @@ String serialize_a_string(StringView string);
|
||||||
String serialize_a_url(StringView url);
|
String serialize_a_url(StringView url);
|
||||||
String serialize_a_srgb_value(Color color);
|
String serialize_a_srgb_value(Color color);
|
||||||
|
|
||||||
|
// https://www.w3.org/TR/cssom/#serialize-a-comma-separated-list
|
||||||
template<typename T, typename SerializeItem>
|
template<typename T, typename SerializeItem>
|
||||||
void serialize_a_comma_separated_list(StringBuilder& builder, Vector<T> const& items, SerializeItem serialize_item)
|
void serialize_a_comma_separated_list(StringBuilder& builder, Vector<T> const& items, SerializeItem serialize_item)
|
||||||
{
|
{
|
||||||
|
// To serialize a comma-separated list concatenate all items of the list in list order
|
||||||
|
// while separating them by ", ", i.e., COMMA (U+002C) followed by a single SPACE (U+0020).
|
||||||
for (size_t i = 0; i < items.size(); i++) {
|
for (size_t i = 0; i < items.size(); i++) {
|
||||||
auto& item = items.at(i);
|
auto& item = items.at(i);
|
||||||
serialize_item(builder, item);
|
serialize_item(builder, item);
|
||||||
if ((i + 1) < items.size()) {
|
if ((i + 1) < items.size()) {
|
||||||
builder.append(",\n"sv);
|
builder.append(", "sv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ Rerun
|
||||||
|
|
||||||
Found 687 tests
|
Found 687 tests
|
||||||
|
|
||||||
463 Pass
|
464 Pass
|
||||||
224 Fail
|
223 Fail
|
||||||
Details
|
Details
|
||||||
Result Test Name MessagePass background-attachment: scroll
|
Result Test Name MessagePass background-attachment: scroll
|
||||||
Pass background-attachment: fixed
|
Pass background-attachment: fixed
|
||||||
|
@ -331,7 +331,7 @@ Fail content: url("http://localhost/")
|
||||||
Fail content: url(http://localhost/)
|
Fail content: url(http://localhost/)
|
||||||
Fail content: counter(par-num)
|
Fail content: counter(par-num)
|
||||||
Fail content: counter(par-num, decimal)
|
Fail content: counter(par-num, decimal)
|
||||||
Fail content: counter(par-num, upper-roman)
|
Pass content: counter(par-num, upper-roman)
|
||||||
Pass content: attr(foo-bar)
|
Pass content: attr(foo-bar)
|
||||||
Pass content: attr(foo_bar)
|
Pass content: attr(foo_bar)
|
||||||
Fail content: attr(|bar)
|
Fail content: attr(|bar)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue