Closed Bug 375011 Opened 17 years ago Closed 17 years ago

menu separators cannot be unhidden if they are created hidden

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jaas, Assigned: jaas)

Details

Attachments

(1 file, 1 obsolete file)

Right now you can't unhide menu separator DOM nodes after creating them hidden. That is because we don't create an actual nsIMenuItem object for separators, which would listen for DOM node attribute changes. We should fix this someday though usage patterns make this bug not such a big deal. If anyone messes with the hidden attribute on a separator they are probably going to touch one of the separator's sibling menu items at the same time and cause the whole menu to get rebuilt.
Attached patch fix v1.0 (obsolete) — Splinter Review
This makes our code much more clean and capable re: separators, and it would be even better if we could modify the nsIMenu* apis but I believe we're not allowed to do that now.
Attachment #279756 - Flags: review?(cbarrett)
Comment on attachment 279756 [details] [diff] [review]
fix v1.0

We don't create a lot of these types of menu items, so I don't think this will impact memory usage or performance too much.

Now that we have a bit better handle on lifetime issues for menu items and can insert and add things more flexibly, should we look at reducing the number of rebuilds we do?
Attachment #279756 - Flags: review?(cbarrett) → review+
Perhaps for Mozilla 2 but that is too risky for questionable perf wins at this point and it wouldn't make our behavior any better.
Attachment #279756 - Flags: superreview?(roc)
Attachment #279756 - Flags: approval1.9?
Comment on attachment 279756 [details] [diff] [review]
fix v1.0

You're allowed to modify nsIMenu* APIs anytime, they're not real APIs that other people use.
Attachment #279756 - Flags: superreview?(roc)
Attachment #279756 - Flags: superreview+
Attachment #279756 - Flags: approval1.9?
Attachment #279756 - Flags: approval1.9+
Attached patch fix v1.0.1Splinter Review
This is the patch I'm going to check in, it is the same as v1.0 but I removed unused stuff from the interfaces to reduce the number of arguments passed around.
Attachment #279756 - Attachment is obsolete: true
fixed on trunk, also bumped UUIDs
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: