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)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 29
Tracking | Status | |
---|---|---|
firefox28 | --- | wontfix |
People
(Reporter: MattN, Assigned: MattN)
References
(Depends on 1 open bug)
Details
Attachments
(2 files)
370 bytes,
text/html
|
Details | |
3.12 KB,
patch
|
Unfocused
:
review+
|
Details | Diff | Splinter Review |
Since we have showMenu, it makes sense to have hideMenu, especially after bug 936187 makes the panel menu sticky.
Assignee | ||
Comment 1•11 years ago
|
||
Pointer to Github pull-request
Assignee | ||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
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-
Assignee | ||
Comment 4•11 years ago
|
||
(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 5•11 years ago
|
||
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 6•11 years ago
|
||
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+
Assignee | ||
Comment 7•11 years ago
|
||
Flags: in-testsuite+
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
Comment 9•11 years ago
|
||
This was backed out on Holly due to introducing an orange (bug 944485).
Backout was https://hg.mozilla.org/projects/holly/rev/f296b665cdb5
status-firefox28:
--- → wontfix
Target Milestone: Firefox 28 → Firefox 29
You need to log in
before you can comment on or make changes to this bug.
Description
•