Closed Bug 1987965 Opened 9 months ago Closed 7 months ago

Trigger layout in ResizeObserver loop on scroll-based overflow

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Points:
3

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: dshin, Assigned: tlouw)

References

(Blocks 1 open bug)

Details

(Whiteboard: [anchorpositioning:m2])

Attachments

(3 files, 1 obsolete file)

Scrolling may cause positioned element to overflow, which in turn may cause position-try-fallbacks.
(So this likely also depends on position-try-fallbacks being implemented)

Points: --- → 3
Whiteboard: [anchorpositioning:triage] → [anchorpositioning:m2]

Bug 1962598 implements fallbacks at layout time.
So just need to force a layout if positioned rect + offset overflows its abs-cb and we have fallbacks to try.
(position-visibility hiding is at paint-time, so it won't force layout, but it's likely checked here)

This will live around where bug 1987964 will touch. That bug is waiting on Oct 15 CSSWG breakout session for anchor-positioning.

As per resolution, we'll be using the IntersectionObserver machinery but run it around the content-visibility time, confirming the same timing as bug 1987964.

content-visibility already runs IO during its evaluation

Assignee: nobody → tlouw
Status: NEW → ASSIGNED
Blocks: 1988225
Attachment #9522848 - Attachment description: WIP: Bug 1987965 - Trigger layout in ResizeObserver loop on scroll-based overflow r=emilio,dshin → Bug 1987965 - Trigger layout in ResizeObserver loop on scroll-based overflow r=emilio,dshin
Attachment #9522848 - Attachment description: Bug 1987965 - Trigger layout in ResizeObserver loop on scroll-based overflow r=emilio,dshin → WIP: Bug 1987965 - Trigger layout in ResizeObserver loop on scroll-based overflow r=emilio,dshin
Depends on: 2002497

Not sure we should do this, it's kinda gross.

Here's a try run with the last version of the patch that we worked on: https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=165784

Check whether positioned frames still fits their abs-cb and have any
fallbacks remaining, then trigger a layout.

Co-authored-by: David Shin <dshin@mozilla.com>
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>

Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/21742c0ed633 https://hg.mozilla.org/integration/autoland/rev/0be9da23ba3c Trigger layout in ResizeObserver loop on scroll-based overflow r=dshin,layout-reviewers
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Attachment #9522848 - Attachment is obsolete: true
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: