Backing out the frontend part of the fix for bug 198846 since it caused bug 235457, which wasn't fixable in time for 1.7b.

This commit is contained in:
jst%mozilla.jstenback.com 2004-03-16 20:13:14 +00:00
Родитель 5b84cfde8e
Коммит 3d48b69811
6 изменённых файлов: 4 добавлений и 90 удалений

Просмотреть файл

@ -250,9 +250,7 @@
<menu label="&cookiePopupManager.label;"
accesskey="&cookiePopupManager.accesskey;"
id="popup"
insertbefore="navBeginGlobalItems"
oncommand="popupBlockerMenuCommand(event.target);"
onpopupshowing="return popupBlockerMenuShowing(event)" >
insertbefore="navBeginGlobalItems">
<menupopup>
<menuitem id="AllowPopups" label="&cookieAllowPopupsCmd.label;"
accesskey="&cookieAllowPopupsCmd.accesskey;"
@ -265,9 +263,6 @@
accesskey="&cookieManagePopups.accesskey;"
oncommand="OpenManagePopups('');"
hidden="true"/>
<menuseparator id="popupMenuSeparator" hidden="true"/>
<!-- Additional items are generated, see popupBlockerMenuShowing()
in navigator.js -->
</menupopup>
</menu>
</menupopup>

Просмотреть файл

@ -2158,27 +2158,6 @@ function onPopupBlocked(aEvent) {
var popupIcon = document.getElementById("popupIcon");
popupIcon.hidden = false;
}
if (!browser.popupUrls) {
browser.popupUrls = [];
browser.popupFeatures = [];
}
// Check for duplicates, remove the old occurence of this url,
// to update the features, and put it at the end of the list.
for (var i = 0; i < browser.popupUrls.length; ++i) {
if (browser.popupUrls[i].equals(aEvent.popupWindowURI)) {
browser.popupUrls.splice(i, 1);
browser.popupFeatures.splice(i, 1);
break;
}
}
// Limit the length of the menu to some reasonable size.
// We only add one item every time, so no need for more complex stuff.
if (browser.popupUrls.length >= 100) {
browser.popupUrls.shift();
browser.popupFeatures.shift();
}
browser.popupUrls.push(aEvent.popupWindowURI);
browser.popupFeatures.push(aEvent.popupWindowFeatures);
}
}
}
@ -2204,45 +2183,6 @@ function StatusbarViewPopupManager() {
"chrome,resizable=yes", hostPort);
}
function popupBlockerMenuShowing(event) {
var parent = event.target;
var browser = getBrowser().selectedBrowser;
var separator = document.getElementById("popupMenuSeparator");
if ("popupDomain" in browser) {
createShowPopupsMenu(parent);
if (separator)
separator.hidden = false;
} else {
if (separator)
separator.hidden = true;
}
}
function createShowPopupsMenu(parent) {
while (parent.lastChild && parent.lastChild.hasAttribute("uri"))
parent.removeChild(parent.lastChild);
var browser = getBrowser().selectedBrowser;
for (var i = 0; i < browser.popupUrls.length; i++) {
var menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", gNavigatorBundle.getFormattedString('popupMenuShow', [browser.popupUrls[i].spec]));
menuitem.setAttribute("uri", browser.popupUrls[i].spec);
menuitem.setAttribute("features", browser.popupFeatures[i]);
parent.appendChild(menuitem);
}
return true;
}
function popupBlockerMenuCommand(target) {
var uri = target.getAttribute("uri");
if (uri) {
window.open(uri, "", target.getAttribute("features"));
}
}
function toHistory()
{
toOpenWindowByType("history:manager", "chrome://communicator/content/history/history.xul");

Просмотреть файл

@ -331,20 +331,11 @@ Contributor(s):
<statusbarpanel class="statusbarpanel-progress" id="progress-panel" hidden="true">
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
</statusbarpanel>
<statusbarpanel id="popupIcon" class="statusbarpanel-iconic" hidden="true"
oncommand="StatusbarViewPopupManager()"
tooltiptext="&popupIcon.tooltiptext;"
context="popupBlockerMenu"/>
<statusbarpanel id="popupIcon" class="statusbarpanel-iconic" hidden="true" oncommand="StatusbarViewPopupManager()" tooltiptext="&popupIcon.tooltiptext;"/>
<statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
<statusbarpanel class="statusbarpanel-iconic" id="security-button"
onclick="BrowserPageInfo(null, 'securityTab')"/>
</statusbar>
<popupset>
<menupopup id="popupBlockerMenu"
oncommand="popupBlockerMenuCommand(event.target);"
onpopupshowing="return popupBlockerMenuShowing(event)"/>
<!-- Items are generated, see popupBlockerMenuShowing() -->
</popupset>
<popupset>
<popup id="networkProperties"/>
</popupset>

Просмотреть файл

@ -331,8 +331,6 @@ nsBrowserStatusHandler.prototype =
if (blank ||
!("popupDomain" in browser)) {
browser.popupDomain = null;
browser.popupUrls = null;
browser.popupFeatures = null;
}
else {
var hostPort = "";
@ -340,11 +338,8 @@ nsBrowserStatusHandler.prototype =
hostPort = locationURI.hostPort;
}
catch(ex) { }
if (hostPort != browser.popupDomain) {
if (hostPort != browser.popupDomain)
browser.popupDomain = null;
browser.popupUrls = null;
browser.popupFeatures = null;
}
}
var popupIcon = document.getElementById("popupIcon");

Просмотреть файл

@ -88,5 +88,3 @@ searchFor=Search %S for "%S"
# For JVM Configuration
switchJVMTitle=Select Java version
switchJVMFailed=Failed to select this version of java
popupMenuShow=Show %S

Просмотреть файл

@ -250,9 +250,7 @@
<menu label="&cookiePopupManager.label;"
accesskey="&cookiePopupManager.accesskey;"
id="popup"
insertbefore="navBeginGlobalItems"
oncommand="popupBlockerMenuCommand(event.target);"
onpopupshowing="return popupBlockerMenuShowing(event)" >
insertbefore="navBeginGlobalItems">
<menupopup>
<menuitem id="AllowPopups" label="&cookieAllowPopupsCmd.label;"
accesskey="&cookieAllowPopupsCmd.accesskey;"
@ -265,9 +263,6 @@
accesskey="&cookieManagePopups.accesskey;"
oncommand="OpenManagePopups('');"
hidden="true"/>
<menuseparator id="popupMenuSeparator" hidden="true"/>
<!-- Additional items are generated, see popupBlockerMenuShowing()
in navigator.js -->
</menupopup>
</menu>
</menupopup>