mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
LibWeb: Define if identifier represent area or line during layout [GFC]
This fixes regression introduced in
c03e025a32
by assuming that it is
possible to determine whether identifier stands for line or area
during parsing.
This commit is contained in:
parent
5d7e73adfe
commit
b66f65dc9e
10 changed files with 104 additions and 145 deletions
|
@ -17,13 +17,15 @@ String GridTrackPlacement::to_string() const
|
|||
[&](Auto const&) {
|
||||
builder.append("auto"sv);
|
||||
},
|
||||
[&](Area const& area) {
|
||||
builder.append(area.name);
|
||||
},
|
||||
[&](Line const& line) {
|
||||
builder.appendff("{}", line.value);
|
||||
if (line.name.has_value())
|
||||
builder.appendff(" {}", line.name.value());
|
||||
[&](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, *area_or_line.name);
|
||||
} else if (area_or_line.line_number.has_value()) {
|
||||
builder.appendff("{}", *area_or_line.line_number);
|
||||
}
|
||||
if (area_or_line.name.has_value()) {
|
||||
builder.appendff("{}", *area_or_line.name);
|
||||
}
|
||||
},
|
||||
[&](Span const& span) {
|
||||
builder.appendff("span {}", span.value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue