Closed Bug 940902 Opened 11 years ago Closed 11 years ago

UITour: Add ability to hide a menu (complements showMenu)

Categories

(Firefox :: General, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 29
Tracking Status
firefox28 --- wontfix

People

(Reporter: MattN, Assigned: MattN)

References

(Depends on 1 open bug)

Details

Attachments

(2 files)

Since we have showMenu, it makes sense to have hideMenu, especially after bug 936187 makes the panel menu sticky.
Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED
Attachment #8335188 - Flags: review?(bmcbride)
Comment on attachment 8335188 [details] [diff] [review] v.1 Add hideMenu (with tests) Review of attachment 8335188 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/modules/test/browser_UITour.js @@ +239,5 @@ > + let bookmarksMenuButton = document.getElementById("bookmarks-menu-button"); > + ise(bookmarksMenuButton.open, false, "Menu should initially be closed"); > + > + gContentAPI.showMenu("bookmarks"); > + ise(bookmarksMenuButton.open, true, "Menu should be shown after showMenu()"); Is this reliable? Opening/closing a menu/panel can be async typically. Or does using nsIMenuBoxObject.openMenu() force it to be synchronous? (And if that is the case, maybe we shouldn't be using it.)
Attachment #8335188 - Flags: review?(bmcbride) → review-
(In reply to Blair McBride [:Unfocused] from comment #3) > Review of attachment 8335188 [details] [diff] [review]: > > ::: browser/modules/test/browser_UITour.js > @@ +239,5 @@ > > + let bookmarksMenuButton = document.getElementById("bookmarks-menu-button"); > > + ise(bookmarksMenuButton.open, false, "Menu should initially be closed"); > > + > > + gContentAPI.showMenu("bookmarks"); > > + ise(bookmarksMenuButton.open, true, "Menu should be shown after showMenu()"); > > Is this reliable? Opening/closing a menu/panel can be async typically. Or > does using nsIMenuBoxObject.openMenu() force it to be synchronous? > > (And if that is the case, maybe we shouldn't be using it.) nsMenuBoxObject::OpenMenu calls either nsXULPopupManager::ShowMenu or nsXULPopupManager::HidePopup with the third and fourth arguments respectively set to false (for async). Are you worried about janking the browser? If so, that would also happen when users go through other code paths which call OpenMenu. It's unclear how to proceed.
Comment on attachment 8335188 [details] [diff] [review] v.1 Add hideMenu (with tests) Review of attachment 8335188 [details] [diff] [review]: ----------------------------------------------------------------- Oy. Ok, lets sort that out in a separate followup bug then. Don't think it needs to be a priority, but it's something we should probably fix at some stage.
Comment on attachment 8335188 [details] [diff] [review] v.1 Add hideMenu (with tests) Review of attachment 8335188 [details] [diff] [review]: ----------------------------------------------------------------- *ahem*
Attachment #8335188 - Flags: review- → review+
Depends on: 941366
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
Depends on: 944485
This was backed out on Holly due to introducing an orange (bug 944485). Backout was https://hg.mozilla.org/projects/holly/rev/f296b665cdb5
Target Milestone: Firefox 28 → Firefox 29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: