Closed Bug 1679819 Opened 4 years ago Closed 4 years ago

Ensure "contain:size" makes absolute positioned elements monolithic

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(2 files)

Bug 1470329 made contain:size element monolithic by setting the element's available block-size to NS_UNCONSTRAINEDSIZE in Reflowinput::Init().

However, for an absolute positioned element, the absolute containing block overrides its available block-size after the ReflowInput is constructed. We need to consider IsContainSize when calculating the abs-pos child's available block-size, or pass the correct available block-size to ReflowInput's constructor.

This ensures abs-pos frame with size containment is monolithic because
ReflowInput::Init() can override available block-size to an
unconstrained size if the frame has size containment (Bug 1470329).

Depends on D98226

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5a1afa9b7c44 Part 1 - Move the computation of border and margin closer to its usage in ReflowAbsoluteFrame(). r=emilio https://hg.mozilla.org/integration/autoland/rev/954ba4c01157 Part 2 - Compute abs-pos elements' available block-size, and pass it to ReflowInput's constructor. r=layout-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/26688 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: