Open Bug 1828898 Opened 1 year ago Updated 2 months ago

Top-layer elements could cause 'ASSERTION: Out-of-flow frame got reflowed before its placeholder'

Categories

(Core :: Layout, enhancement)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: cathiechen, Assigned: cathiechen)

References

Details

(Keywords: leave-open)

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Steps to reproduce:

It causes assertions on popovers/popover-open-overflow-display.html.
This could also be reproduced by dialog.

<!DOCTYPE html>
<div id=container>
  <dialog id=p1>This is dialog 1</dialog>
</div>

<style>
  #container {
    position: absolute;
    top: 100px;
    left: 50px;
    width: 30px;
    height: 30px;
  }
  #p1 {
    position: absolute;
    top: 100px;
  }
</style>

<script>
    document.querySelector('#p1').showModal();
</script>
Blocks: 1825808
Component: DOM: Core & HTML → Layout

In the AbsoluteList, p1 is in front of container, so p1 reflows before container, and p1 is outOfFlowFrame of container, so it triggers assertion when reflow container.

Component: Layout → Applied Machine Learning
Summary: -moz-top-layer: top could cause 'ASSERTION: out-of-flow frame got reflowed before its placeholde' → Top-layer elements could cause 'ASSERTION: out-of-flow frame got reflowed before its placeholde
Assignee: nobody → cathiechen
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Blocks: popover
No longer blocks: 1825808

Why was this bug moved to 'Applied Machine Learning' ?

Component: Applied Machine Learning → Layout
Summary: Top-layer elements could cause 'ASSERTION: out-of-flow frame got reflowed before its placeholde → Top-layer elements could cause 'ASSERTION: Out-of-flow frame got reflowed before its placeholder'
Attachment #9329327 - Attachment description: Bug 1828898 - Top-layer elements could cause 'ASSERTION: out-of-flow frame got reflowed before its placeholde', r?emilio → Bug 1828898 - The tests to Top-layer elements could cause 'ASSERTION: out-of-flow frame got reflowed before its placeholde', r?emilio
No longer blocks: popover
Depends on: 1863402

css/css-contain/content-visibility/content-visibility-with-top-layer-in-auto-subtree-removal.html also could reproduce this assertion: 'ASSERTION: out-of-flow frame got reflowed before its placeholde'.

Attachment #9329327 - Attachment description: Bug 1828898 - The tests to Top-layer elements could cause 'ASSERTION: out-of-flow frame got reflowed before its placeholde', r?emilio → Bug 1828898 - Top-layer elements could cause 'ASSERTION: out-of-flow frame got reflowed before its placeholde', r?emilio

Cathie, so I checked your patch, without your code changes, and I only get one assert, which is the "absolute popover inside fixed element". Could you elaborate on your other changes?

Sorry for the lag getting to this btw, I didn't understand some of your changes and that got me confused for a while.

Flags: needinfo?(cathiechen)

Hi Emilio! Sorry about the confusion!
The patch actually contains two parts:

  • The test popover-open-overflow-display-2.html, the "absolute popover inside fixed element" case generates an assert which is not fixed.
  • To fix the assert generate by reflow boundary elements with top layer children. When the top layer child needs reflow, it would mark dirty flag to root through top layer fixed list, to containing block, to root. And it also marks dirty flag to the reflow boundary frame which is through its placeholder. So there are two reflow request, one is root, the other one is the reflow boundary frame. The root will always be reflowed first. So the frame in top layer fixed list will be reflowed before its placeholder.

Let me split this patch into two. Hope it would make the questions clear.

Flags: needinfo?(cathiechen)
Attachment #9329327 - Attachment description: Bug 1828898 - Top-layer elements could cause 'ASSERTION: out-of-flow frame got reflowed before its placeholde', r?emilio → Bug 1828898 - Reflow boundary frame with top-layer frame could cause 'ASSERTION: out-of-flow frame got reflowed before its placeholde', r?emilio
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e3cd1999f1da
Test to popover and postioned elements, r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/44598 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Attachment #9329327 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: