improve/simplify indexing and visibility tracking in macOS menu code
Categories
(Core :: Widget: Cocoa, enhancement)
Tracking
()
People
(Reporter: jaas, Assigned: jaas, NeedInfo)
References
Details
Attachments
(1 external file)
The macOS menu code (nsMenuX.mm, nsMenuBarX.mm) does some things that are fragile and complicated:
- Instead of hiding native menu items when their associated DOM node is hidden, the native menu items are remove and re-inserted on visibility changes. This requires fragile calculations to figure out where to re-insert.
- The code maintains a count of the number of visible items, which is complex and fragile.
We can probably make things simpler and more robust by doing things like just hiding native menu items instead of removing and reinserting, and just calculating the visible items count when we need it instead of incrementing and decrementing all over the place.
Updated•7 months ago
|
Updated•6 months ago
|
Backed out for causing reftest leakcheck failures @ chrome.toml
Updated•6 months ago
|
Comment 7•6 months ago
|
||
Backed out for causing mochitests failures at widget/tests/test_keycodes
Backout Link
Push with failures
Failure Log
Failure line TEST-UNEXPECTED-FAIL | widget/tests/test_keycodes.xhtml | US keyCode=35 (0x23) chars='p' unmodifiedChars='p', a needed event is not fired - got "", expected "keydown"
Comment 10•6 months ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 1 week.
:jaas, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Description
•