зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central and mozilla-inbound
This commit is contained in:
Коммит
46f8a364a9
|
@ -2197,14 +2197,7 @@ function openLocationCallback()
|
|||
|
||||
function BrowserOpenTab()
|
||||
{
|
||||
if (!gBrowser) {
|
||||
// If there are no open browser windows, open a new one
|
||||
window.openDialog("chrome://browser/content/", "_blank",
|
||||
"chrome,all,dialog=no", "about:blank");
|
||||
return;
|
||||
}
|
||||
gBrowser.loadOneTab("about:blank", {inBackground: false});
|
||||
focusAndSelectUrlBar();
|
||||
openUILinkIn("about:blank", "tab");
|
||||
}
|
||||
|
||||
/* Called from the openLocation dialog. This allows that dialog to instruct
|
||||
|
|
|
@ -241,7 +241,7 @@ function openLinkIn(url, where, params) {
|
|||
return;
|
||||
}
|
||||
|
||||
let loadInBackground = aInBackground;
|
||||
let loadInBackground = where == "current" ? false : aInBackground;
|
||||
if (loadInBackground == null) {
|
||||
loadInBackground = aFromChrome ?
|
||||
false :
|
||||
|
@ -298,6 +298,9 @@ function openLinkIn(url, where, params) {
|
|||
w.content.focus();
|
||||
else
|
||||
w.gBrowser.selectedBrowser.focus();
|
||||
|
||||
if (!loadInBackground && url == "about:blank")
|
||||
w.focusAndSelectUrlBar();
|
||||
}
|
||||
|
||||
// Used as an onclick handler for UI elements with link-like behavior.
|
||||
|
|
|
@ -902,7 +902,7 @@ public:
|
|||
virtual nsresult SetSMILOverrideStyleRule(mozilla::css::StyleRule* aStyleRule,
|
||||
bool aNotify) = 0;
|
||||
|
||||
nsresult LookupNamespaceURI(const nsAString& aNamespacePrefix,
|
||||
nsresult LookupNamespaceURIInternal(const nsAString& aNamespacePrefix,
|
||||
nsAString& aNamespaceURI) const;
|
||||
|
||||
/**
|
||||
|
|
|
@ -2117,7 +2117,8 @@ nsContentUtils::SplitQName(const nsIContent* aNamespaceResolver,
|
|||
const PRUnichar* end;
|
||||
aQName.EndReading(end);
|
||||
nsAutoString nameSpace;
|
||||
rv = aNamespaceResolver->LookupNamespaceURI(Substring(aQName.get(), colon),
|
||||
rv = aNamespaceResolver->LookupNamespaceURIInternal(Substring(aQName.get(),
|
||||
colon),
|
||||
nameSpace);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -1064,7 +1064,8 @@ nsINode::LookupNamespaceURI(const nsAString& aNamespacePrefix,
|
|||
nsAString& aNamespaceURI)
|
||||
{
|
||||
Element *element = GetNameSpaceElement();
|
||||
if (!element || NS_FAILED(element->LookupNamespaceURI(aNamespacePrefix,
|
||||
if (!element ||
|
||||
NS_FAILED(element->LookupNamespaceURIInternal(aNamespacePrefix,
|
||||
aNamespaceURI))) {
|
||||
SetDOMStringToNull(aNamespaceURI);
|
||||
}
|
||||
|
@ -1433,7 +1434,7 @@ nsIContent::GetEditingHost()
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsIContent::LookupNamespaceURI(const nsAString& aNamespacePrefix,
|
||||
nsIContent::LookupNamespaceURIInternal(const nsAString& aNamespacePrefix,
|
||||
nsAString& aNamespaceURI) const
|
||||
{
|
||||
if (aNamespacePrefix.EqualsLiteral("xml")) {
|
||||
|
|
|
@ -528,6 +528,7 @@ _TEST_FILES2 = \
|
|||
test_bug690056.html \
|
||||
test_bug692434.html \
|
||||
file_bug692434.xml \
|
||||
test_bug693615.html \
|
||||
test_bug693875.html \
|
||||
test_nodelist_holes.html \
|
||||
test_xhr_abort_after_load.html \
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=693615
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 693615</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=693615">Mozilla Bug 693615</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 693615 **/
|
||||
/*
|
||||
The following code tests if calling the DOM method Node::lookupNamespaceURI
|
||||
directly (with quickstubs) and through XPCOM leads to the same result.
|
||||
*/
|
||||
|
||||
var content = document.getElementById("content");
|
||||
|
||||
// called directly (quickstubs)
|
||||
var defaultNS = content.lookupNamespaceURI(null);
|
||||
is(defaultNS, null, "direct access working");
|
||||
|
||||
// called via XPCOM
|
||||
// deleting the method from the prototype forces the engine to go through XPCOM
|
||||
var proto = Object.getPrototypeOf(content);
|
||||
delete(proto.lookupNamespaceURI);
|
||||
var wrapperNS = content.lookupNamespaceURI(null);
|
||||
is(wrapperNS, null, "access through XPCOM working");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче