Closed Bug 1829016 Opened 2 years ago Closed 2 years ago

Changing width/height of an element inside auto-sized `content-visibility: auto` container does not update the container's width/height

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- disabled
firefox112 --- unaffected
firefox113 --- disabled
firefox114 --- disabled
firefox115 --- disabled
firefox116 --- disabled
firefox117 --- disabled
firefox118 --- fixed

People

(Reporter: dshin, Assigned: cathiechen)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

STR: Load attached test case, click on "Click" div
Expected Result: Hello\nThere renders below the "Click" div within the border.
Actual Result: Nothing changes, until the window is resized. Clicking the "Click" div again hides Hello\nThere but the space remains until the window is resized.

Reduced from https://docs-os.mainsail.xyz/change-wifi-credentials

Keywords: regression
Regressed by: 1820058

Set release status flags based on info from the regressing bug 1820058

:dholbert, since you are the author of the regressor, bug 1820058, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Attachment #9329384 - Attachment description: Mimimum Reproducible Case → Minimum Reproducible Case
Flags: needinfo?(dholbert)
Attached file testcase 2

Here's a variant of the original testcase here.

Notable differences:

  • now the width toggles as well (with no visible effect); so we have this bug in both axes, not just 'height'.
  • I removed the zero width and visibility:hidden to avoid the possibility of any zero/non-rendering special case being tripped.
  • I pulled the clickable div out of the content-visibility:auto container so that it just contains the thing whose size is changing, for simplicity.

One other interesting note: as noted in comment 0, resizing the window does seem to fix height discrepancies, but not width discrepancies!

In particular:
(1) Load testcase 2.
(2) Click the "click" target.
--> Firefox changes the background-color from orange to lime (yay!) but doesn't resize the black-bordered box.
(3) Change the width of your browser window.
--> Firefox belatedly updates the height of the black-bordered box to 100px (yay!) but does not update its width. I'm not sure what if any user-exposed nudges will prompt us to update the width, aside from using devtools to temporarily disable & re-enable the content-visibility:auto declaration.

(The expected result is that we should be resizing the black-bordered box to 100x100 after step 2.)

Shot in the dark: I imagine we need MarkIntrinsicISizesDirty to be called on the container in this case, and it normally would be, but content-visibility:auto is suppressing that somehow?

Summary: Changing height of an element inside `content-visibility: auto` container does not update the container's height → Changing width/height of an element inside auto-sized `content-visibility: auto` container does not update the container's width/height

Tentatively calling this S2 since this seems like a pretty big potential source of brokenness in content-visibility:auto, and the user impact is likely to involve missing/invisible content rather than just cosmetic problems. (And we know of at least one affected site, per comment 0.)

Severity: -- → S2

Dropping to an S3 as this is Nightly Only

Severity: S2 → S3

Set release status flags based on info from the regressing bug 1820058

Assignee: nobody → cathiechen
Attachment #9343561 - Attachment description: Bug 1829016 - The size of content-visibility auto does not refresh when its content changes → Bug 1829016 - The size of content-visibility auto does not refresh when its content changes, r?emilio
Status: NEW → ASSIGNED
Pushed by surkov.alexander@gmail.com: https://hg.mozilla.org/integration/autoland/rev/a86390266ae9 The size of content-visibility auto does not refresh when its content changes, r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41175 for changes under testing/web-platform/tests
Regressions: 1845369

Backed out for causing wr failures on content-visibility-085.html.

Flags: needinfo?(cathiechen)
Upstream PR was closed without merging
Flags: needinfo?(cathiechen)
Pushed by surkov.alexander@gmail.com: https://hg.mozilla.org/integration/autoland/rev/af8f747d83ec The size of content-visibility auto does not refresh when its content changes, r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch

The patch landed in nightly and beta is affected.
:cathiechen, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.Also, don't forget to request an uplift for the patches in the regression caused by this fix.
  • If no, please set status-firefox117 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(cathiechen)

I don't think it needs an uplift, for it only affects content-visibility, which is not enabled by default yet.

Not sure how to set the status-firefox117 to wontfix, I can only see these 3 options ---, ? and affected.

Flags: needinfo?(dholbert)

Thanks a lot, Mirko:)

Flags: needinfo?(dholbert)
Flags: needinfo?(cathiechen)

updating the status to disabled (despite what BugBot said) since the feature is disabled by default beyond Nightly (per comment 15).

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: