Closed
Bug 676220
Opened 13 years ago
Closed 12 years ago
Popup blocker menu should be cleared more eagerly to avoid holding on to window objects
Categories
(SeaMonkey :: UI Design, defect)
SeaMonkey
UI Design
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: neil, Assigned: ewong)
References
Details
Attachments
(1 file, 3 obsolete files)
This is the SeaMonkey version of bug 668972. The popup blocker menu maintains a list of recently blocked popups. This list should be cleared so that it doesn't hang around until the browser is closed.
Assignee | ||
Comment 1•12 years ago
|
||
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 606233 [details] [diff] [review] Clear the popup blocker's list of popup items everytime the menu is hidden. (v1) We actually have three popup notification menus: a. The notificationbar's popup preferences button popup b. The browser's popup statusbarpanel context menu c. The browser's tools > popup manager submenu Note that the former uses popupNotificationMenuShowing but the others use popupBlockerMenuShowing (the latter indirectly via CheckForVisibility). >+function PopUpHide(aEvent) Nit: method is intended to undo the effect of createShowPopupsMenu, maybe a better name could be used. Also this belongs above the above method. >+ let item = aEvent.target.lastChild; >+ while (item && item.getAttribute("id") != "popupNotificationMenuSeparator") >+ { >+ let next = item.previousSibling; >+ item.parentNode.removeChild(item); >+ item = next; >+ } Nit: You didn't remove the existing code in createShowPopupsMenu that also tries to clear down the menu. (In fact, you could just move that code here.)
Attachment #606233 -
Flags: review?(neil) → review-
Assignee | ||
Comment 3•12 years ago
|
||
>We actually have three popup notification menus: >a. The notificationbar's popup preferences button popup >b. The browser's popup statusbarpanel context menu >c. The browser's tools > popup manager submenu >Note that the former uses popupNotificationMenuShowing but the others use >popupBlockerMenuShowing (the latter indirectly via CheckForVisibility). I believe this patch covers these. >>+function PopUpHide(aEvent) >Nit: method is intended to undo the effect of createShowPopupsMenu, maybe a >better name could be used. Also this belongs above the above method. Changed to RemovePopupMenu. >+ let item = aEvent.target.lastChild; >+ while (item && item.getAttribute("id") != "popupNotificationMenuSeparator") >+ { >+ let next = item.previousSibling; >+ item.parentNode.removeChild(item); >+ item = next; >+ } >Nit: You didn't remove the existing code in createShowPopupsMenu that also >tries to clear down the menu. (In fact, you could just move that code here.) Fixed.
Attachment #606233 -
Attachment is obsolete: true
Attachment #606434 -
Flags: review?(neil)
Comment 4•12 years ago
|
||
> +function RemovePopupsMenu(aEvent) ..... > + onpopuphiding="RemovePopupsMenu(event, 'popupNotificationMenu');"/> You're calling RemovePopupsMenu with two parameters, but the function is expecting only one.
Reporter | ||
Comment 5•12 years ago
|
||
Comment on attachment 606434 [details] [diff] [review] Clear the popup blocker's list of popup items everytime the menu is hidden. (v2) >+function RemovePopupsMenu(aEvent) Don't actually need this because we automatically get the utilityOverlay one. >+ onpopuphiding="RemovePopupsMenu(event, 'popupNotificationMenu');"/> Please change these to pass this instead of event (and update the function). >+function RemovePopupsMenu(aEvent) Please move this before createShowPopupsMenu. A slightly better name for this might be "RemovePopupsMenuitems(parent)".
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #606434 -
Attachment is obsolete: true
Attachment #606434 -
Flags: review?(neil)
Attachment #607517 -
Flags: review?(neil)
Reporter | ||
Comment 7•12 years ago
|
||
Comment on attachment 607517 [details] [diff] [review] Clear the popup blocker's list of popup items everytime the menu is hidden. (v3) >+function RemovePopupsItemMenu(aThis) Nits: 1. Not happy with "aThis", try changing it to parent? (I know it doesn't begin with an "a", but you'll see why in the diff!) 2. Function name still doesn't look quite right. Try RemovePopupsItems(parent)
Assignee | ||
Comment 8•12 years ago
|
||
>1. Not happy with "aThis", try changing it to parent? Fixed. >2. Function name still doesn't look quite right. Try RemovePopupsItems(parent) Fixed.
Attachment #607517 -
Attachment is obsolete: true
Attachment #607517 -
Flags: review?(neil)
Attachment #609633 -
Flags: review?(neil)
Reporter | ||
Updated•12 years ago
|
Attachment #609633 -
Flags: review?(neil) → review+
Assignee | ||
Comment 9•12 years ago
|
||
Pushed to comm-central: http://hg.mozilla.org/comm-central/rev/d6cf9c7638ee
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•