Closed Bug 1741089 Opened 3 years ago Closed 3 years ago

Don't make menupopups and panel leave unslotted children.

Categories

(Core :: XUL, task)

task

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 files, 2 obsolete files)

No description provided.

There's only one caller of it and it's not sound: The runnable captures a
raw frame pointer etc. Instead, just do a dispatch to the main thread
and call OpenMenu there. This simplifies the following patch.

This is needed for the next patch to work.

Depends on D131082

This is a more generic fix for
https://phabricator.services.mozilla.com/D131080 that we might want to
take instead. I'm not aware of other tests triggering the same issue but
this causes behavior to be a bit more predictable.

Context: We have tests that query the style of menupopups/menuitems that
are not in the flat tree (that is, that are children of a shadow host,
but are not slotted). That makes no sense, because the flat tree is how
we determine where to inherit from (so the styles that we were returning
before this bug are wrong, they just happen to work for that particular
test).

Panels and menupopups have some lazy initialization code that before
this patch left a shadow root attached to the element but no slot.
Instead, don't even bother to create a shadow root (and do that lazily
as well). It's a bit more predictable behavior, and is also less work
during startup, so should be a win.

We couldn't do it before the previous patches because attaching the
shadow root will reframe the popup, and the menupopup code didn't
deal well with that.

This backs out D131080 as it shouldn't be needed after the previous
patches.

Depends on D131081

Attachment #9250628 - Attachment description: Bug 1741089 - Make nsXULPopupManager::BeginShowingPopup deal with the frame getting reframed in popupshowing. r=NeilDeakin,mstange → Bug 1741089 - Make attachShadow() not reframe the shadow host unconditionally. r=smaug,#layout-reviewers
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5c921d8e51bd
Make async OpenMenu simpler/sound. r=mstange
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/28c5c5fc70a4
Make attachShadow() not reframe the shadow host unconditionally. r=smaug
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9afe46184c00
Don't make menupopups and panels leave unslotted children. r=mconley
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Attachment #9250630 - Attachment is obsolete: true
Attachment #9250627 - Attachment is obsolete: true
Attachment #9250627 - Attachment is obsolete: false

Comment on attachment 9250627 [details]
Bug 1741089 - Make async OpenMenu simpler/sound. r=NeilDeakin,mstange

Revision D131082 was moved to bug 1729805. Setting attachment 9250627 [details] to obsolete.

Attachment #9250627 - Attachment is obsolete: true
Regressions: 1755165
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: