Closed Bug 1731653 Opened 11 months ago Closed 11 months ago

{inc} On horizontal resize, we don't correctly resize block with box-sizing: content-box, percentage width, and percentage padding

Categories

(Core :: Layout, defect)

defect

Tracking

()

VERIFIED FIXED
94 Branch
Tracking Status
firefox94 --- verified

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached file testcase.html

While working on bug 1700580, I discover an invalidation issue where we don't trigger reflow for a block with box-sizing: content-box, percentage width, and percentage padding if we change its container's width.

See the attached testcase.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

We store this new bit in nsIFrame instead of in ReflowInput to record a
change to padding (inspired by the mHasBSizeChange bit). That is because
we may construct a ReflowInput more than one time before reflowing the
frame. The first construction of ReflowInput (in
SizeComputationInput::InitOffsets will update
nsIFrame::UsedPaddingProperty() using the latest style data, so
we cannot determine the padding change in any of the subsequent
construction of ReflowInput.

dynamic-change-inline-size-001.html is the scenario fixed by bug
1307853.

dynamic-change-inline-size-002.html is equivalent to 001.html except
it's written with "box-sizing:content". It is fixed by this patch.

dynamic-change-inline-size-003.html is adapted from testcase 2 in bug
1729122 comment 4.

Attachment #9242124 - Attachment is obsolete: true
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/8cb9446b8382
Record padding change in a frame bit, and use it to detect inline resize. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
Duplicate of this bug: 1729122
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/31053 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Flags: qe-verify+

Confirmed issue with 94.0a1 (2021-09-20) on Win10.
Fix verified with 95.0a1 (2021-10-06) and 94.0b2 on Win10 and Ubuntu 16x32.

Based on Comment 8, I'm marking this issue as Verified Fixed.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.