mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Use the correct definition of separated-borders mode
We previously checked the cell's computed values for the border-collapse property, but a cell is only in separated-borders mode if the table has border-collapse set to separate. Curiously in some other placed where this mode is checked we already did the correct thing.
This commit is contained in:
parent
50cce72ab9
commit
88da6250f9
Notes:
github-actions[bot]
2025-06-04 14:04:01 +00:00
Author: https://github.com/rubenqwertyuiop
Commit: 88da6250f9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4994
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 39 additions and 3 deletions
|
@ -862,7 +862,7 @@ void TableFormattingContext::compute_table_height()
|
|||
cell_state.padding_left = cell.box->computed_values().padding().left().to_px(cell.box, width_of_containing_block);
|
||||
cell_state.padding_right = cell.box->computed_values().padding().right().to_px(cell.box, width_of_containing_block);
|
||||
|
||||
if (cell.box->computed_values().border_collapse() == CSS::BorderCollapse::Separate) {
|
||||
if (table_box().computed_values().border_collapse() == CSS::BorderCollapse::Separate) {
|
||||
cell_state.border_top = cell.box->computed_values().border_top().width;
|
||||
cell_state.border_bottom = cell.box->computed_values().border_bottom().width;
|
||||
cell_state.border_left = cell.box->computed_values().border_left().width;
|
||||
|
@ -1286,7 +1286,7 @@ void TableFormattingContext::border_conflict_resolution()
|
|||
.column_index = cell.column_index,
|
||||
.row_span = cell.row_span,
|
||||
.column_span = cell.column_span });
|
||||
if (cell.box->computed_values().border_collapse() == CSS::BorderCollapse::Separate) {
|
||||
if (table_box().computed_values().border_collapse() == CSS::BorderCollapse::Separate) {
|
||||
continue;
|
||||
}
|
||||
Painting::PaintableBox::BordersDataWithElementKind override_borders_data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue