summaryrefslogtreecommitdiffstats
path: root/layout/tables/nsTableRowFrame.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /layout/tables/nsTableRowFrame.cpp
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/tables/nsTableRowFrame.cpp')
-rw-r--r--layout/tables/nsTableRowFrame.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp
index 1190561ee8..a6f4647429 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.
@@ -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(