Closed Bug 1803773 Opened 3 years ago Closed 3 years ago

'Bookmarks Toolbar' context menuitem cropped on pre-Windows 10 systems

Categories

(Firefox :: Menus, defect, P1)

Desktop
Windows
defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox107 --- unaffected
firefox108 --- unaffected
firefox109 --- fixed

People

(Reporter: aryx, Assigned: emilio)

References

Details

Attachments

(2 files, 2 obsolete files)

Firefox 109.0a1 20221201161829 on Windows 8.1

The tabs toolbar's menu item 'Bookmarks Toolbar' is cropped. This is no issue in 108.0b8.

Emilio, do you know which change altered this?

Flags: needinfo?(emilio)
Assignee: nobody → emilio
Severity: -- → S2
OS: Unspecified → Windows
Priority: -- → P1
Hardware: Unspecified → Desktop

Move all the event handling stuff to the DOM.

D164210 is the "right" fix, but that needs more work and I'm not going
to land that during the soft freeze, so let's use this for now.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/826d104218ac Use legacy layout in native menupopups on Windows for now. r=Gijs
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Blocks: 1805414

Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

  • They fire a command event synchronously (even though on some
    platforms like macOS activating a context menu item is async).

  • They use a totally different codepath from what a user does.

  • They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Comment on attachment 9307308 [details]
WIP: Bug 1803773 - Remove nsMenuFrame and nsMenuParent.

Revision D164210 was moved to bug 1805414. Setting attachment 9307308 [details] to obsolete.

Attachment #9307308 - Attachment is obsolete: true
Flags: needinfo?(emilio)

Comment on attachment 9308010 [details]
Bug 1803773 - Use activateItem() rather than click() to activate menuitems. r=Gijs!

Revision D164567 was moved to bug 1805415. Setting attachment 9308010 [details] to obsolete.

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

Attachment

General

Created:
Updated:
Size: