Backed out changeset 1445e1cfc71f (bug 1768921) for causing multiple failures CLOSED TREE

This commit is contained in:
Norisz Fay
2024-11-08 00:09:56 +02:00
parent 2a8da6a369
commit 07ccada8ce
29 changed files with 312 additions and 294 deletions

View File

@@ -949,6 +949,27 @@ void ScrollContainerFrame::ReflowScrolledFrame(ScrollReflowInput& aState,
// overflow area doesn't include the frame bounds.
aMetrics->UnionOverflowAreasWithDesiredBounds();
auto* disp = StyleDisplay();
if (MOZ_UNLIKELY(disp->mOverflowClipBoxInline ==
StyleOverflowClipBox::ContentBox)) {
// The scrolled frame is scrollable in the inline axis with
// `overflow-clip-box:content-box`. To prevent its content from being
// clipped at the scroll container's padding edges, we inflate its
// children's scrollable overflow area with its inline padding, and union
// its scrollable overflow area with its children's inflated scrollable
// overflow area.
OverflowAreas childOverflow;
mScrolledFrame->UnionChildOverflow(childOverflow);
nsRect childScrollableOverflow = childOverflow.ScrollableOverflow();
const LogicalMargin inlinePadding =
padding.ApplySkipSides(LogicalSides(wm, LogicalSides::BBoth));
childScrollableOverflow.Inflate(inlinePadding.GetPhysicalMargin(wm));
nsRect& so = aMetrics->ScrollableOverflow();
so = so.UnionEdges(childScrollableOverflow);
}
aState.mContentsOverflowAreas = aMetrics->mOverflowAreas;
aState.mScrollbarGutterFromLastReflow = scrollbarGutter;
aState.mReflowedContentsWithHScrollbar = aAssumeHScroll;