mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 23:30:20 +00:00
LibWeb: Merge consecutive grid lines in GridTrackSizeList
Fixes a bug where consecutively defined grid lines were not merged during serialization.
This commit is contained in:
parent
1be79a2b7b
commit
6ec6e755b2
Notes:
github-actions[bot]
2025-06-22 19:16:36 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 6ec6e755b2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5170
3 changed files with 10 additions and 6 deletions
|
@ -209,6 +209,11 @@ bool GridTrackSizeList::operator==(GridTrackSizeList const& other) const = defau
|
|||
|
||||
void GridTrackSizeList::append(GridLineNames&& line_names)
|
||||
{
|
||||
if (!m_list.is_empty() && m_list.last().has<GridLineNames>()) {
|
||||
auto& last_line_names = m_list.last().get<GridLineNames>();
|
||||
last_line_names.names.extend(move(line_names.names));
|
||||
return;
|
||||
}
|
||||
m_list.append(move(line_names));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue