mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
LibWeb: Use correct SerializationMode when serializing CalculatedOr
This commit is contained in:
parent
a5cbcaf698
commit
011ab5f714
Notes:
github-actions[bot]
2025-08-06 16:46:34 +00:00
Author: https://github.com/Calme1709
Commit: 011ab5f714
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5699
Reviewed-by: https://github.com/AtkinsSJ ✅
11 changed files with 41 additions and 41 deletions
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
String GridTrackPlacement::to_string() const
|
||||
String GridTrackPlacement::to_string(SerializationMode mode) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
m_value.visit(
|
||||
|
@ -19,9 +19,9 @@ String GridTrackPlacement::to_string() const
|
|||
},
|
||||
[&](AreaOrLine const& area_or_line) {
|
||||
if (area_or_line.line_number.has_value() && area_or_line.name.has_value()) {
|
||||
builder.appendff("{} {}", area_or_line.line_number->to_string(), *area_or_line.name);
|
||||
builder.appendff("{} {}", area_or_line.line_number->to_string(mode), *area_or_line.name);
|
||||
} else if (area_or_line.line_number.has_value()) {
|
||||
builder.appendff("{}", area_or_line.line_number->to_string());
|
||||
builder.appendff("{}", area_or_line.line_number->to_string(mode));
|
||||
} else if (area_or_line.name.has_value()) {
|
||||
builder.appendff("{}", *area_or_line.name);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ String GridTrackPlacement::to_string() const
|
|||
builder.append("span"sv);
|
||||
|
||||
if (!span.name.has_value() || span.value.is_calculated() || span.value.value() != 1)
|
||||
builder.appendff(" {}", span.value.to_string());
|
||||
builder.appendff(" {}", span.value.to_string(mode));
|
||||
|
||||
if (span.name.has_value())
|
||||
builder.appendff(" {}", span.name.value());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue