Closed
Bug 1106274
Opened 11 years ago
Closed 11 years ago
Go history menu items end up at the bottom of the menu and not between the startHistorySeparator and endHistorySeparator
Categories
(SeaMonkey :: Bookmarks & History, defect)
SeaMonkey
Bookmarks & History
Tracking
(seamonkey2.34 fixed)
RESOLVED
FIXED
seamonkey2.34
| Tracking | Status | |
|---|---|---|
| seamonkey2.34 | --- | fixed |
People
(Reporter: philip.chee, Assigned: philip.chee)
References
Details
(Keywords: regression)
Attachments
(1 file)
|
2.14 KB,
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
In Bug 751922 I made a mistake and the Go history menu items end up at the bottom of the menu.
aParent.appendChild(menuitem)
should have been:
aParent.insertBefore(menuitem, aAnchor)
| Assignee | ||
Comment 1•11 years ago
|
||
This patch also:
1. Removes unused CONSTs
2. Moves the remaining global CONST into FillHistoryMenu()
Attachment #8530676 -
Flags: review?(neil)
Comment 2•11 years ago
|
||
Comment on attachment 8530676 [details] [diff] [review]
Patch v1.0 Proposed fix
D'oh!
Attachment #8530676 -
Flags: review?(neil) → review+
| Assignee | ||
Comment 3•11 years ago
|
||
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/ccba476cdc05
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-seamonkey2.34:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.34
Comment 4•6 years ago
|
||
Comment on attachment 8530676 [details] [diff] [review]
Patch v1.0 Proposed fix
># HG changeset patch
># Parent c507ff616eec26a14a6c6c2027775f4abe5f70bd
>Bug 1106274 - Go history menu items end up at the bottom of the menu and not between the startHistorySeparator and endHistorySeparator
>
>diff --git a/suite/browser/sessionHistoryUI.js b/suite/browser/sessionHistoryUI.js
>--- a/suite/browser/sessionHistoryUI.js
>+++ b/suite/browser/sessionHistoryUI.js
>@@ -1,15 +1,12 @@
> /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
> /* This Source Code Form is subject to the terms of the Mozilla Public
> * License, v. 2.0. If a copy of the MPL was not distributed with this
> * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>-const MAX_HISTORY_MENU_ITEMS = 15;
>-const MAX_URLBAR_HISTORY_MENU_ITEMS = 30;
>-const MAX_URLBAR_HISTORY_ITEMS = 100;
>
> function toggleTabsFromOtherComputers()
> {
> // enable/disable the Tabs From Other Computers menu
> let menuitem = document.getElementById("sync-tabs-menuitem");
>
> // If Sync isn't configured yet, then don't show the menuitem.
> if (Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED ||
>@@ -32,16 +29,17 @@ function FillHistoryMenu(aParent, aMenu)
> // Remove old entries if any
> deleteHistoryItems(aParent);
>
> var sessionHistory = getWebNavigation().sessionHistory;
>
> var count = sessionHistory.count;
> var index = sessionHistory.index;
> var end;
>+ const MAX_HISTORY_MENU_ITEMS = 15;
>
> switch (aMenu)
> {
> case "back":
> end = index > MAX_HISTORY_MENU_ITEMS ? index - MAX_HISTORY_MENU_ITEMS
> : 0;
> if (index <= end)
> return false;
>@@ -144,17 +142,17 @@ function createHistoryMenuItem(aParent,
> if (aURI) {
> menuitem.setAttribute("image",
> PlacesUtils.favicons
> .getFaviconLinkForIcon(aURI).spec);
> }
> }
> );
> }
>- aParent.appendChild(menuitem);
>+ aParent.insertBefore(menuitem, aAnchor);
> }
>
> function deleteHistoryItems(aParent)
> {
> var children = aParent.childNodes;
> for (let i = children.length - 1; i >= 0; --i)
> {
> if (children[i].hasAttribute("index"))
You need to log in
before you can comment on or make changes to this bug.
Description
•