WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
259576
Set logical top and height of table rows and cells in the first layout pass.
https://bugs.webkit.org/show_bug.cgi?id=259576
Summary
Set logical top and height of table rows and cells in the first layout pass.
Ahmad Saleem
Reported
2023-07-27 13:58:09 PDT
Hi Team, While going through Blink's commits, I came across another failing test in Safari Technology Preview 174: Test Case:
https://jsfiddle.net/vpxzfscu/
Blink Commit:
https://chromium.googlesource.com/chromium/src.git/+/0f36142505fcc4bc9b2f3518649befd2b5cbc63f
WebKit Changes: In 'void RenderTableRow::layout()': . . for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { + cell->setLogicalTop(logicalTop()); if (!cell->needsLayout() && paginated && (layoutState->pageLogicalHeightChanged() . . In 'void RenderTableSection::layout()' . . const Vector<LayoutUnit>& columnPos = table()->columnPositions(); + LayoutUnit rowLogicalTop; for (unsigned r = 0; r < m_grid.size(); ++r) { Row& row = m_grid[r].row; . . and if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) { if (paginated) { rowRenderer->setLogicalTop(rowLogicalTop); if (rowRenderer->needsLayout()) rowRenderer->setChildNeedsLayout(MarkOnlyThis); } rowRenderer->layoutIfNeeded(); if (paginated) { rowRenderer->setLogicalTop(LayoutUnit(logicalHeightForRow(*rowRenderer))); rowLogicalTop = rowRenderer->logicalBottom(); rowLogicalTop += LayoutUnit(table()->vBorderSpacing()); } } and int RenderTableSection::logicalHeightForRow(const RenderTableRow& rowObject) const { unsigned rowIndex = rowObject.rowIndex(); int logicalHeight = 0; const auto& row = m_grid[rowIndex].row; unsigned cols = row.size(); for (unsigned colIndex = 0; colIndex < cols; colIndex++) { const auto& cellStruct = cellAt(rowIndex, colIndex); const auto* cell = cellStruct.primaryCell(); if (!cell || cellStruct.inColSpan) continue; if (cell->rowSpan() == 1) { logicalHeight = std::max<int>(logicalHeight, cell->logicalHeightForRowSizing()); } } return logicalHeight; } ___ In 'Source/WebCore/rendering/RenderTableSection.h' int logicalHeightForRow(const RenderTableRow&) const; ______ Just wanted to raise to get feedback, whether it is right approach or not. Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-08-03 13:59:18 PDT
<
rdar://problem/113356300
>
Ahmad Saleem
Comment 2
2025-01-27 00:08:55 PST
Pull request:
https://github.com/WebKit/WebKit/pull/39583
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug