From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- layout/tables/nsCellMap.cpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'layout/tables/nsCellMap.cpp') diff --git a/layout/tables/nsCellMap.cpp b/layout/tables/nsCellMap.cpp index 7c29baa5b0..60496d3ae0 100644 --- a/layout/tables/nsCellMap.cpp +++ b/layout/tables/nsCellMap.cpp @@ -678,7 +678,8 @@ void nsTableCellMap::Dump(char* aString) const { printf("l=%d%X%d ", int32_t(size), owner, segStart); } else { size = cd.GetCorner(side, bevel); - printf("c=%d%X%d ", int32_t(size), side, bevel); + printf("c=%d%hhX%d ", int32_t(size), static_cast(side), + bevel); } } BCData& cd = mBCInfo->mBEndIEndCorner; @@ -690,7 +691,7 @@ void nsTableCellMap::Dump(char* aString) const { printf("l=%d%X%d ", int32_t(size), owner, segStart); } else { size = cd.GetCorner(side, bevel); - printf("c=%d%X%d ", int32_t(size), side, bevel); + printf("c=%d%hhX%d ", int32_t(size), static_cast(side), bevel); } } printf("\n"); @@ -818,7 +819,7 @@ bool nsTableCellMap::RowHasSpanningCells(int32_t aRowIndex, return false; } -// FIXME: The only value callers pass for aSide is eLogicalSideBEnd. +// FIXME: The only value callers pass for aSide is LogicalSide::BEnd. // Consider removing support for the other three values. void nsTableCellMap::ResetBStartStart(LogicalSide aSide, nsCellMap& aCellMap, uint32_t aRowGroupStart, @@ -829,16 +830,16 @@ void nsTableCellMap::ResetBStartStart(LogicalSide aSide, nsCellMap& aCellMap, BCData* bcData = nullptr; switch (aSide) { - case eLogicalSideBEnd: + case LogicalSide::BEnd: aRowIndex++; [[fallthrough]]; - case eLogicalSideBStart: + case LogicalSide::BStart: cellData = (BCCellData*)aCellMap.GetDataAt(aRowIndex - aRowGroupStart, aColIndex); if (cellData) { bcData = &cellData->mData; } else { - NS_ASSERTION(aSide == eLogicalSideBEnd, "program error"); + NS_ASSERTION(aSide == LogicalSide::BEnd, "program error"); // try the next row group nsCellMap* cellMap = aCellMap.GetNextSibling(); if (cellMap) { @@ -851,16 +852,16 @@ void nsTableCellMap::ResetBStartStart(LogicalSide aSide, nsCellMap& aCellMap, } } break; - case eLogicalSideIEnd: + case LogicalSide::IEnd: aColIndex++; [[fallthrough]]; - case eLogicalSideIStart: + case LogicalSide::IStart: cellData = (BCCellData*)aCellMap.GetDataAt(aRowIndex - aRowGroupStart, aColIndex); if (cellData) { bcData = &cellData->mData; } else { - NS_ASSERTION(aSide == eLogicalSideIEnd, "program error"); + NS_ASSERTION(aSide == LogicalSide::IEnd, "program error"); bcData = GetIEndMostBorder(aRowIndex); } break; @@ -890,11 +891,11 @@ void nsTableCellMap::SetBCBorderEdge(LogicalSide aSide, nsCellMap& aCellMap, bool changed; switch (aSide) { - case eLogicalSideBEnd: + case LogicalSide::BEnd: rgYPos++; yPos++; [[fallthrough]]; - case eLogicalSideBStart: + case LogicalSide::BStart: lastIndex = xPos + aLength - 1; for (xIndex = xPos; xIndex <= lastIndex; xIndex++) { changed = aChanged && (xIndex == xPos); @@ -908,7 +909,7 @@ void nsTableCellMap::SetBCBorderEdge(LogicalSide aSide, nsCellMap& aCellMap, false, 0, damageArea); if (!cellData) ABORT0(); } else { - NS_ASSERTION(aSide == eLogicalSideBEnd, "program error"); + NS_ASSERTION(aSide == LogicalSide::BEnd, "program error"); // try the next non empty row group nsCellMap* cellMap = aCellMap.GetNextSibling(); while (cellMap && (0 == cellMap->GetRowCount())) { @@ -935,10 +936,10 @@ void nsTableCellMap::SetBCBorderEdge(LogicalSide aSide, nsCellMap& aCellMap, NS_ERROR("Cellmap: BStart edge not found"); } break; - case eLogicalSideIEnd: + case LogicalSide::IEnd: xPos++; [[fallthrough]]; - case eLogicalSideIStart: + case LogicalSide::IStart: // since bStart, bEnd borders were set, there should already be a cellData // entry lastIndex = rgYPos + aLength - 1; @@ -948,7 +949,7 @@ void nsTableCellMap::SetBCBorderEdge(LogicalSide aSide, nsCellMap& aCellMap, if (cellData) { cellData->mData.SetIStartEdge(aOwner, aSize, changed); } else { - NS_ASSERTION(aSide == eLogicalSideIEnd, "program error"); + NS_ASSERTION(aSide == LogicalSide::IEnd, "program error"); BCData* bcData = GetIEndMostBorder(yIndex + aCellMapStart); if (bcData) { bcData->SetIStartEdge(aOwner, aSize, changed); @@ -2225,7 +2226,8 @@ void nsCellMap::Dump(bool aIsBorderCollapse) const { printf("l=%d%d%d ", int32_t(size), owner, segStart); } else { size = cd->mData.GetCorner(side, bevel); - printf("c=%d%d%d ", int32_t(size), side, bevel); + printf("c=%d%hhu%d ", int32_t(size), static_cast(side), + bevel); } } } -- cgit v1.2.3