Open Bug 2086755 Opened 1 month ago Updated 22 days ago

test_bug632379.xhtml fails standalone: its menu no longer scrolls, and a popup whose anchor moves after reflow is misplaced

Categories

(Core :: Layout, defect)

defect

Tracking

()

ASSIGNED

People

(Reporter: florian, Assigned: florian)

References

(Blocks 1 open bug)

Details

Attachments

(2 external files)

layout/generic/test/test_bug632379.xhtml has done nothing since bug 1824489 made its maxheight attribute a no-op. It only passed when a small window clamped both submenus to the same place, and it fails in the standalone variant (bug 2026600): https://tests.firefox.dev/test.html?test=layout/generic/test/test_bug632379.xhtml. Making the menu scroll again exposes a layout bug.

Popups are positioned during reflow, but post-reflow work can still move their anchors: scroll anchoring, and the clamping or restoring of scroll positions. In a menupopup, a submenu opened right after the menu scrolls is left off its menu, because the scroll buttons appearing or disappearing resize the scrollport and its scroll position is corrected later in the same flush.

The first patch repositions popups that are still opening once a pres shell's post-reflow work is done. The second makes the test scroll again and removes the standalone skip.

Popups are positioned during reflow, but layout can still move their anchors afterwards: scroll anchoring and the clamping and restoring of scroll positions happen once all dirty roots are reflowed. A submenu opened right after its menupopup scrolled was left off its menu, because the scroll buttons appearing or disappearing resized the scrollport and its scroll position was corrected later in the same flush.

Reposition popups that are still opening once that post-reflow work is done. Popups that are already shown keep the position they opened at, unless they follow their anchor, which already happens on refresh.

The maxheight attribute stopped having any effect in bug 1824489, so the menu no longer scrolled and the test only passed when a small window clamped both submenus to the same place; it failed in the standalone variant (skip added in bug 2026600).

Use max-height instead, also on the submenus so the 500x300 window doesn't clamp them. Wait for the menu's scroll buttons before typing access keys. Compare submenu positions relative to their menu, as the scroll buttons make the two menus end at different heights.

Blocks: 2086769

The severity field is not set for this bug.
:TYLin, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(aethanyc)
Severity: -- → S3
Flags: needinfo?(aethanyc)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: