mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1320014 Part 2 - Rename Corner to LogicalCorner, and move it to nsStyleCoord.h. r=mats
To avoid confusion with the mozilla::css::corner, rename ::Corner to mozilla::LogicalCorner, and move it to nsStyleCoord.h. Also, append LogicalCorner prefix to all the enum values to match the coding style. It also fixed the build error preemptively in a later patch that removing ::css namespace from mozilla::css::corner. MozReview-Commit-ID: BbRYFuT3v4W --HG-- extra : rebase_source : b8891eaa475c803de9a2137cb5e9a5a4bde37b9f
This commit is contained in:
parent
8871f2bf54
commit
d4db857fcf
@ -18,7 +18,7 @@ namespace mozilla {
|
||||
|
||||
class WritingMode;
|
||||
|
||||
// Logical axis, edge and side constants for use in various places.
|
||||
// Logical axis, edge, side and corner constants for use in various places.
|
||||
enum LogicalAxis {
|
||||
eLogicalAxisBlock = 0x0,
|
||||
eLogicalAxisInline = 0x1
|
||||
@ -34,6 +34,14 @@ enum LogicalSide {
|
||||
eLogicalSideIEnd = (eLogicalAxisInline << 1) | eLogicalEdgeEnd // 0x3
|
||||
};
|
||||
|
||||
enum LogicalCorner
|
||||
{
|
||||
eLogicalCornerBStartIStart = 0,
|
||||
eLogicalCornerBStartIEnd = 1,
|
||||
eLogicalCornerBEndIEnd = 2,
|
||||
eLogicalCornerBEndIStart = 3
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
enum nsStyleUnit : uint8_t {
|
||||
|
@ -1055,7 +1055,7 @@ nsTableCellMap::SetBCBorderEdge(LogicalSide aSide,
|
||||
// (aRowIndex, aColIndex). For eBStartIEnd, store it in the entry to the iEnd-wards where
|
||||
// it would be BStartIStart. For eBEndIEnd, store it in the entry to the bEnd-wards. etc.
|
||||
void
|
||||
nsTableCellMap::SetBCBorderCorner(Corner aCorner,
|
||||
nsTableCellMap::SetBCBorderCorner(LogicalCorner aCorner,
|
||||
nsCellMap& aCellMap,
|
||||
uint32_t aCellMapStart,
|
||||
uint32_t aRowIndex,
|
||||
@ -1076,15 +1076,15 @@ nsTableCellMap::SetBCBorderCorner(Corner aCorner,
|
||||
int32_t yPos = aRowIndex;
|
||||
int32_t rgYPos = aRowIndex - aCellMapStart;
|
||||
|
||||
if (eBStartIEnd == aCorner) {
|
||||
if (eLogicalCornerBStartIEnd == aCorner) {
|
||||
xPos++;
|
||||
}
|
||||
else if (eBEndIEnd == aCorner) {
|
||||
else if (eLogicalCornerBEndIEnd == aCorner) {
|
||||
xPos++;
|
||||
rgYPos++;
|
||||
yPos++;
|
||||
}
|
||||
else if (eBEndIStart == aCorner) {
|
||||
else if (eLogicalCornerBEndIStart == aCorner) {
|
||||
rgYPos++;
|
||||
yPos++;
|
||||
}
|
||||
|
@ -35,14 +35,6 @@ struct nsColInfo
|
||||
int32_t aNumCellsSpan);
|
||||
};
|
||||
|
||||
enum Corner
|
||||
{
|
||||
eBStartIStart = 0,
|
||||
eBStartIEnd = 1,
|
||||
eBEndIEnd = 2,
|
||||
eBEndIStart = 3
|
||||
};
|
||||
|
||||
struct BCInfo
|
||||
{
|
||||
nsTArray<BCData> mIEndBorders;
|
||||
@ -213,7 +205,7 @@ public:
|
||||
nscoord aSize,
|
||||
bool aChanged);
|
||||
|
||||
void SetBCBorderCorner(::Corner aCorner,
|
||||
void SetBCBorderCorner(mozilla::LogicalCorner aCorner,
|
||||
nsCellMap& aCellMap,
|
||||
uint32_t aCellMapStart,
|
||||
uint32_t aYPos,
|
||||
|
@ -5853,7 +5853,8 @@ nsTableFrame::CalcBCBorders()
|
||||
}
|
||||
else {
|
||||
tlCorner.Update(eLogicalSideIEnd, currentBorder);
|
||||
tableCellMap->SetBCBorderCorner(eBStartIStart, *iter.mCellMap, 0, 0, colIdx,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBStartIStart,
|
||||
*iter.mCellMap, 0, 0, colIdx,
|
||||
LogicalSide(tlCorner.ownerSide),
|
||||
tlCorner.subWidth,
|
||||
tlCorner.bevel);
|
||||
@ -5903,7 +5904,7 @@ nsTableFrame::CalcBCBorders()
|
||||
currentBorder = info.GetIStartEdgeBorder();
|
||||
BCCornerInfo& tlCorner = (0 == rowB) ? bStartCorners[0] : bEndCorners[0];
|
||||
tlCorner.Update(eLogicalSideBEnd, currentBorder);
|
||||
tableCellMap->SetBCBorderCorner(eBStartIStart, *iter.mCellMap,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBStartIStart, *iter.mCellMap,
|
||||
iter.mRowGroupStart, rowB, 0,
|
||||
LogicalSide(tlCorner.ownerSide),
|
||||
tlCorner.subWidth,
|
||||
@ -5942,7 +5943,7 @@ nsTableFrame::CalcBCBorders()
|
||||
bStartCorners[info.GetCellEndColIndex() + 1] :
|
||||
bEndCorners[info.GetCellEndColIndex() + 1];
|
||||
trCorner.Update(eLogicalSideBEnd, currentBorder); // bStart-iEnd
|
||||
tableCellMap->SetBCBorderCorner(eBStartIEnd, *iter.mCellMap,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBStartIEnd, *iter.mCellMap,
|
||||
iter.mRowGroupStart, rowB,
|
||||
info.GetCellEndColIndex(),
|
||||
LogicalSide(trCorner.ownerSide),
|
||||
@ -5950,7 +5951,7 @@ nsTableFrame::CalcBCBorders()
|
||||
trCorner.bevel);
|
||||
BCCornerInfo& brCorner = bEndCorners[info.GetCellEndColIndex() + 1];
|
||||
brCorner.Set(eLogicalSideBStart, currentBorder); // bEnd-iEnd
|
||||
tableCellMap->SetBCBorderCorner(eBEndIEnd, *iter.mCellMap,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBEndIEnd, *iter.mCellMap,
|
||||
iter.mRowGroupStart, rowB,
|
||||
info.GetCellEndColIndex(),
|
||||
LogicalSide(brCorner.ownerSide),
|
||||
@ -6019,7 +6020,7 @@ nsTableFrame::CalcBCBorders()
|
||||
if (info.GetCellEndColIndex() < damageArea.EndCol() &&
|
||||
rowB >= damageArea.StartRow()) {
|
||||
if (0 != rowB) {
|
||||
tableCellMap->SetBCBorderCorner(eBStartIEnd, *iter.mCellMap,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBStartIEnd, *iter.mCellMap,
|
||||
iter.mRowGroupStart, rowB,
|
||||
info.GetCellEndColIndex(),
|
||||
LogicalSide(trCorner->ownerSide),
|
||||
@ -6028,7 +6029,7 @@ nsTableFrame::CalcBCBorders()
|
||||
}
|
||||
// store any corners this cell spans together with the aja cell
|
||||
for (int32_t rX = rowB + 1; rX < rowB + segLength; rX++) {
|
||||
tableCellMap->SetBCBorderCorner(eBEndIEnd, *iter.mCellMap,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBEndIEnd, *iter.mCellMap,
|
||||
iter.mRowGroupStart, rX,
|
||||
info.GetCellEndColIndex(),
|
||||
LogicalSide(trCorner->ownerSide),
|
||||
@ -6065,7 +6066,7 @@ nsTableFrame::CalcBCBorders()
|
||||
// update/store the bEnd-iStart & bEnd-IEnd corners
|
||||
BCCornerInfo& blCorner = bEndCorners[colIdx]; // bEnd-iStart
|
||||
blCorner.Update(eLogicalSideIEnd, currentBorder);
|
||||
tableCellMap->SetBCBorderCorner(eBEndIStart, *iter.mCellMap,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBEndIStart, *iter.mCellMap,
|
||||
iter.mRowGroupStart,
|
||||
info.GetCellEndRowIndex(),
|
||||
colIdx,
|
||||
@ -6074,7 +6075,7 @@ nsTableFrame::CalcBCBorders()
|
||||
BCCornerInfo& brCorner = bEndCorners[colIdx + 1]; // bEnd-iEnd
|
||||
brCorner.Update(eLogicalSideIStart, currentBorder);
|
||||
if (info.mNumTableCols == colIdx + 1) { // bEnd-IEnd corner of the table
|
||||
tableCellMap->SetBCBorderCorner(eBEndIEnd, *iter.mCellMap,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBEndIEnd, *iter.mCellMap,
|
||||
iter.mRowGroupStart,
|
||||
info.GetCellEndRowIndex(), colIdx,
|
||||
LogicalSide(brCorner.ownerSide),
|
||||
@ -6146,7 +6147,7 @@ nsTableFrame::CalcBCBorders()
|
||||
if (info.GetCellEndRowIndex() < damageArea.EndRow() &&
|
||||
colIdx >= damageArea.StartCol()) {
|
||||
if (hitsSpanBelow) {
|
||||
tableCellMap->SetBCBorderCorner(eBEndIStart, *iter.mCellMap,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBEndIStart, *iter.mCellMap,
|
||||
iter.mRowGroupStart,
|
||||
info.GetCellEndRowIndex(), colIdx,
|
||||
LogicalSide(blCorner.ownerSide),
|
||||
@ -6156,7 +6157,7 @@ nsTableFrame::CalcBCBorders()
|
||||
for (int32_t c = colIdx + 1; c < colIdx + segLength; c++) {
|
||||
BCCornerInfo& corner = bEndCorners[c];
|
||||
corner.Set(eLogicalSideIEnd, currentBorder);
|
||||
tableCellMap->SetBCBorderCorner(eBEndIStart, *iter.mCellMap,
|
||||
tableCellMap->SetBCBorderCorner(eLogicalCornerBEndIStart, *iter.mCellMap,
|
||||
iter.mRowGroupStart,
|
||||
info.GetCellEndRowIndex(), c,
|
||||
LogicalSide(corner.ownerSide),
|
||||
|
Loading…
Reference in New Issue
Block a user