commit f4961424117a9e42892a3b14d33ed00773c2bde6
parent 268969d4a8096d6572447e0b03893ea7146797a2
Author: Ting-Yu Lin <tlin@mozilla.com>
Date: Wed, 17 Dec 2025 05:11:07 +0000
Bug 2006239 - Exclude PushedAbsolute child list in nsLayoutUtils::CalculateContentBEnd(). r=layout-reviewers,dholbert
After reflowing a column, `nsColumnSetFrame` calls
`nsLayoutUtils::CalculateContentBEnd()` to calculate the block-end of the
visible content. We want to exclude the overflow areas from descendants in the
pushed absolute child list because they belong to the next column.
This patch does not change behavior with the current code because the pushed
absolute list is empty when
`layout.abspos.fragmentainer-aware-positioning.enabled` is disabled at the
moment. This prepares for bug 1994346.
[1] https://searchfox.org/firefox-main/rev/1477feb9706f4ccc5bd571c1c215832a6fbb7464/layout/generic/nsColumnSetFrame.cpp#743
Differential Revision: https://phabricator.services.mozilla.com/D276581
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
@@ -5794,7 +5794,8 @@ nscoord nsLayoutUtils::CalculateContentBEnd(WritingMode aWM, nsIFrame* aFrame) {
// calculation is intended to affect layout.
LogicalSize overflowSize(aWM, aFrame->ScrollableOverflowRect().Size());
if (overflowSize.BSize(aWM) > contentBEnd) {
- FrameChildListIDs skip = {FrameChildListID::Overflow,
+ FrameChildListIDs skip = {FrameChildListID::PushedAbsolute,
+ FrameChildListID::Overflow,
FrameChildListID::ExcessOverflowContainers,
FrameChildListID::OverflowOutOfFlow};
nsBlockFrame* blockFrame = do_QueryFrame(aFrame);