Bug 722305 - Remove contentAreaClick's redundant return value. r=dao

This commit is contained in:
Veeraya Pupatwibul 2012-02-10 14:11:53 +01:00
Родитель 626e546398
Коммит f3e79511f4
4 изменённых файлов: 10 добавлений и 12 удалений

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

@ -5865,7 +5865,7 @@ function hrefAndLinkNodeForClickEvent(event)
function contentAreaClick(event, isPanelClick)
{
if (!event.isTrusted || event.defaultPrevented || event.button == 2)
return true;
return;
let [href, linkNode] = hrefAndLinkNodeForClickEvent(event);
if (!href) {
@ -5876,7 +5876,7 @@ function contentAreaClick(event, isPanelClick)
middleMousePaste(event);
event.preventDefault();
}
return true;
return;
}
// This code only applies if we have a linkNode (i.e. clicks on real anchor
@ -5893,7 +5893,7 @@ function contentAreaClick(event, isPanelClick)
if (linkNode.getAttribute("onclick") ||
href.substr(0, 11) === "javascript:" ||
href.substr(0, 5) === "data:")
return true;
return;
try {
urlSecurityCheck(href, linkNode.ownerDocument.nodePrincipal);
@ -5901,16 +5901,16 @@ function contentAreaClick(event, isPanelClick)
catch(ex) {
// Prevent loading unsecure destinations.
event.preventDefault();
return true;
return;
}
let postData = {};
let url = getShortcutOrURI(href, postData);
if (!url)
return true;
return;
loadURI(url, null, postData.value, false);
event.preventDefault();
return true;
return;
}
if (linkNode.getAttribute("rel") == "sidebar") {
@ -5927,7 +5927,7 @@ function contentAreaClick(event, isPanelClick)
, "keyword" ]
}, window);
event.preventDefault();
return true;
return;
}
}
@ -5940,8 +5940,6 @@ function contentAreaClick(event, isPanelClick)
try {
PlacesUIUtils.markPageAsFollowedLink(href);
} catch (ex) { /* Skip invalid URIs. */ }
return true;
}
/**

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

@ -966,7 +966,7 @@
tabcontainer="tabbrowser-tabs"
contentcontextmenu="contentAreaContextMenu"
autocompletepopup="PopupAutoComplete"
onclick="return contentAreaClick(event, false);"/>
onclick="contentAreaClick(event, false);"/>
<statuspanel id="statusbar-display" inactive="true"/>
</vbox>
<splitter id="devtools-side-splitter" hidden="true"/>

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

@ -232,7 +232,7 @@ let gClickHandler = {
gCurrentTest.desc + ":Handler received a click event on " + linkId);
let isPanelClick = linkId == "panellink";
let returnValue = gTestWin.contentAreaClick(event, isPanelClick);
gTestWin.contentAreaClick(event, isPanelClick);
let prevent = event.defaultPrevented;
is(prevent, gCurrentTest.preventDefault,
gCurrentTest.desc + ": event.defaultPrevented is correct (" + prevent + ")")

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

@ -98,5 +98,5 @@
<commandset id="editMenuCommands"/>
<browser id="web-panels-browser" persist="cachedurl" type="content" flex="1"
context="contentAreaContextMenu" tooltip="aHTMLTooltip"
onclick="return window.parent.contentAreaClick(event, true);"/>
onclick="window.parent.contentAreaClick(event, true);"/>
</page>