mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
When a containing block has `contain: layout`, scrollable overflow from its children should not propagate to the parent. nsContainerFrame::ConsiderChildOverflow already implements this by only unioning the child's ink overflow, but AbsoluteContainingBlock::ReflowAbsoluteFrame took a separate code path that unconditionally unioned the child's full overflow areas. As a result, a wide absolutely positioned descendant of a `contain: layout` element could still inflate the page's scrollable area (and the mobile viewport). Extend OverflowAreaUnionFlags with ChildIsAbsPos so that ConsiderChildOverflow performs OverflowAreas::UnionWithAbsoluteOverflowAreas (matching the prior abspos behavior), and route ReflowAbsoluteFrame through ConsiderChildOverflow. The contain:layout handling is then shared between in-flow and absolutely positioned children. Differential Revision: https://phabricator.services.mozilla.com/D299911