[Webkit-unassigned] [Bug 255853] Zero rowspan should span all rows
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 26 13:47:33 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=255853
--- Comment #2 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
It is easy to do but I am stuck on one error:
>> Source/WebCore/rendering/RenderTableCell.h:
Line 46: unsigned parsedRowSpan() const;
and update 'old' rowSpan to 'rename' and introduce new 'rowSpan' below:
inline unsigned RenderTableCell::parsedRowSpan() const
{
if (!m_hasRowSpan)
return 1;
return parseRowSpanFromDOM();
}
inline unsigned RenderTableCell::rowSpan() const
{
unsigned rowSpan = parsedRowSpan();
if (!rowSpan) {
ASSERT(!section()->needsCellRecalc());
rowSpan = section()->numRows() - rowIndex();
}
return std::min<unsigned>(rowSpan, maxRowIndex);
}
______
>> Source/WebCore/rendering/RenderTableSection.cpp:
In function: (recalcCells) Line 1351:
bool resizedGrid = false;
for (RenderTableRow* row = firstRow(); row; row = row->nextRow()) {
unsigned insertionRow = m_cRow;
row->setRowIndex(insertionRow);
setRowLogicalHeightToRowStyleLogicalHeight(m_grid[insertionRow]);
for (RenderTableCell* cell = row->firstCell(); cell; cell = cell->nextCell()) {
// For rowspan, "the value zero means that the cell is to span all the
// remaining rows in the row group." Calculate the size of the full
// row grid now so that we can use it to count the remaining rows in
if (!cell->parsedRowSpan() && !resizedGrid) {
unsigned m_cRow = row->rowIndex() + 1;
for (auto* remainingRow = row; remainingRow; remainingRow = remainingRow->nextRow())
m_cRow++;
ensureRows(m_cRow);
resizedGrid = true;
}
addCell(cell, row);
}
}
_______
>> Source/WebCore/rendering/RenderTableRow.cpp:
In function (didInsertTableCell) <<--- here I am stuck:
if (auto* section = this->section()) {
section->addCell(&child, this);
if (beforeChild || nextRow() || !cell.parsedRowSpan())
--> Here - I get uninitialised or undefined for 'cell'.
Looking into Blink patch, it is defined as:
LayoutTableCell* cell = ToLayoutTableCell(child);
which usually means:
RenderTableCell* (or auto*) cell = downcast<RenderTableCell>(child);
^ but it is giving error that it is 'static_assert failed due to requirement
'!std::is_same_v<WebCore::RenderTableCell, WebCore::RenderTableCell>'
"Unnecessary cast to same type"' error. :-(
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230726/8dc5fa73/attachment-0001.htm>
More information about the webkit-unassigned
mailing list