mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Reserve enough space for span>1 columns in BorderConflictFinder
This code previously only allocated enough space in m_col_elements_by_index for 1 slot per column, meaning that columns with a span > 1 would write off the end of it.
This commit is contained in:
parent
0cec68ea99
commit
9e32c9329a
Notes:
github-actions[bot]
2024-07-27 19:24:08 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9e32c9329a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/865
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 22 additions and 0 deletions
|
@ -1386,6 +1386,7 @@ void TableFormattingContext::BorderConflictFinder::collect_conflicting_col_eleme
|
|||
VERIFY(child_of_column_group->display().is_table_column());
|
||||
auto const& col_node = static_cast<HTML::HTMLTableColElement const&>(*child_of_column_group->dom_node());
|
||||
unsigned span = col_node.get_attribute_value(HTML::AttributeNames::span).to_number<unsigned>().value_or(1);
|
||||
m_col_elements_by_index.resize(column_index + span);
|
||||
for (size_t i = column_index; i < column_index + span; ++i) {
|
||||
m_col_elements_by_index[i] = child_of_column_group;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue