summaryrefslogtreecommitdiffstats
path: root/layout/tables/nsTableRowFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/tables/nsTableRowFrame.cpp')
-rw-r--r--layout/tables/nsTableRowFrame.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp
index 1190561ee8..2447ceea15 100644
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -305,7 +305,7 @@ static nscoord GetBSizeOfRowsSpannedBelowFirst(
/**
* Post-reflow hook. This is where the table row does its post-processing
*/
-void nsTableRowFrame::DidResize() {
+void nsTableRowFrame::DidResize(ForceAlignTopForTableCell aForceAlignTop) {
// Resize and re-align the cell frames based on our row bsize
nsTableFrame* tableFrame = GetTableFrame();
@@ -369,7 +369,7 @@ void nsTableRowFrame::DidResize() {
// realign cell content based on the new bsize. We might be able to
// skip this if the bsize didn't change... maybe. Hard to tell.
- cellFrame->BlockDirAlignChild(wm, mMaxCellAscent);
+ cellFrame->BlockDirAlignChild(wm, mMaxCellAscent, aForceAlignTop);
// Always store the overflow, even if the height didn't change, since
// we'll lose part of our overflow area otherwise.
@@ -561,10 +561,10 @@ LogicalSides nsTableRowFrame::GetLogicalSkipSides() const {
}
if (GetPrevInFlow()) {
- skip |= eLogicalSideBitsBStart;
+ skip += LogicalSide::BStart;
}
if (GetNextInFlow()) {
- skip |= eLogicalSideBitsBEnd;
+ skip += LogicalSide::BEnd;
}
return skip;
}
@@ -581,11 +581,8 @@ nscoord nsTableRowFrame::CalcCellActualBSize(nsTableCellFrame* aCellFrame,
const auto& bsizeStyleCoord = position->BSize(aWM);
if (bsizeStyleCoord.ConvertsToLength()) {
- // In quirks mode, table cell isize should be content-box, but bsize
- // should be border-box.
- // Because of this historic anomaly, we do not use quirk.css
- // (since we can't specify one value of box-sizing for isize and another
- // for bsize)
+ // In quirks mode, table cell bsize should always be border-box.
+ // https://quirks.spec.whatwg.org/#the-table-cell-height-box-sizing-quirk
specifiedBSize = bsizeStyleCoord.ToLength();
if (PresContext()->CompatibilityMode() != eCompatibility_NavQuirks &&
position->mBoxSizing == StyleBoxSizing::Content) {
@@ -956,7 +953,6 @@ void nsTableRowFrame::Reflow(nsPresContext* aPresContext,
nsReflowStatus& aStatus) {
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsTableRowFrame");
- DISPLAY_REFLOW(aPresContext, this, aReflowInput, aDesiredSize, aStatus);
MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
WritingMode wm = aReflowInput.GetWritingMode();
@@ -999,17 +995,14 @@ void nsTableRowFrame::Reflow(nsPresContext* aPresContext,
PushDirtyBitToAbsoluteFrames();
}
-/**
- * This function is called by the row group frame's SplitRowGroup() code when
- * pushing a row frame that has cell frames that span into it. The cell frame
- * should be reflowed with the specified height
- */
nscoord nsTableRowFrame::ReflowCellFrame(nsPresContext* aPresContext,
const ReflowInput& aReflowInput,
bool aIsTopOfPage,
nsTableCellFrame* aCellFrame,
nscoord aAvailableBSize,
nsReflowStatus& aStatus) {
+ MOZ_ASSERT(aPresContext->IsPaginated(),
+ "ReflowCellFrame currently supports only paged media!");
MOZ_ASSERT(aAvailableBSize != NS_UNCONSTRAINEDSIZE,
"Why split cell frame if available bsize is unconstrained?");
WritingMode wm = aReflowInput.GetWritingMode();
@@ -1049,7 +1042,8 @@ nscoord nsTableRowFrame::ReflowCellFrame(nsPresContext* aPresContext,
// XXX What happens if this cell has 'vertical-align: baseline' ?
// XXX Why is it assumed that the cell's ascent hasn't changed ?
if (isCompleteAndNotTruncated) {
- aCellFrame->BlockDirAlignChild(wm, mMaxCellAscent);
+ aCellFrame->BlockDirAlignChild(wm, mMaxCellAscent,
+ ForceAlignTopForTableCell::Yes);
}
nsTableFrame::InvalidateTableFrame(