mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge mozilla-central and mozilla-inbound
This commit is contained in:
commit
3247bfac33
@ -2197,14 +2197,7 @@ function openLocationCallback()
|
|||||||
|
|
||||||
function BrowserOpenTab()
|
function BrowserOpenTab()
|
||||||
{
|
{
|
||||||
if (!gBrowser) {
|
openUILinkIn("about:blank", "tab");
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called from the openLocation dialog. This allows that dialog to instruct
|
/* Called from the openLocation dialog. This allows that dialog to instruct
|
||||||
|
@ -241,7 +241,7 @@ function openLinkIn(url, where, params) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let loadInBackground = aInBackground;
|
let loadInBackground = where == "current" ? false : aInBackground;
|
||||||
if (loadInBackground == null) {
|
if (loadInBackground == null) {
|
||||||
loadInBackground = aFromChrome ?
|
loadInBackground = aFromChrome ?
|
||||||
false :
|
false :
|
||||||
@ -298,6 +298,9 @@ function openLinkIn(url, where, params) {
|
|||||||
w.content.focus();
|
w.content.focus();
|
||||||
else
|
else
|
||||||
w.gBrowser.selectedBrowser.focus();
|
w.gBrowser.selectedBrowser.focus();
|
||||||
|
|
||||||
|
if (!loadInBackground && url == "about:blank")
|
||||||
|
w.focusAndSelectUrlBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used as an onclick handler for UI elements with link-like behavior.
|
// Used as an onclick handler for UI elements with link-like behavior.
|
||||||
|
@ -902,8 +902,8 @@ public:
|
|||||||
virtual nsresult SetSMILOverrideStyleRule(mozilla::css::StyleRule* aStyleRule,
|
virtual nsresult SetSMILOverrideStyleRule(mozilla::css::StyleRule* aStyleRule,
|
||||||
bool aNotify) = 0;
|
bool aNotify) = 0;
|
||||||
|
|
||||||
nsresult LookupNamespaceURI(const nsAString& aNamespacePrefix,
|
nsresult LookupNamespaceURIInternal(const nsAString& aNamespacePrefix,
|
||||||
nsAString& aNamespaceURI) const;
|
nsAString& aNamespaceURI) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If this content has independent selection, e.g., if this is input field
|
* If this content has independent selection, e.g., if this is input field
|
||||||
|
@ -2117,8 +2117,9 @@ nsContentUtils::SplitQName(const nsIContent* aNamespaceResolver,
|
|||||||
const PRUnichar* end;
|
const PRUnichar* end;
|
||||||
aQName.EndReading(end);
|
aQName.EndReading(end);
|
||||||
nsAutoString nameSpace;
|
nsAutoString nameSpace;
|
||||||
rv = aNamespaceResolver->LookupNamespaceURI(Substring(aQName.get(), colon),
|
rv = aNamespaceResolver->LookupNamespaceURIInternal(Substring(aQName.get(),
|
||||||
nameSpace);
|
colon),
|
||||||
|
nameSpace);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
*aNamespace = NameSpaceManager()->GetNameSpaceID(nameSpace);
|
*aNamespace = NameSpaceManager()->GetNameSpaceID(nameSpace);
|
||||||
|
@ -1064,8 +1064,9 @@ nsINode::LookupNamespaceURI(const nsAString& aNamespacePrefix,
|
|||||||
nsAString& aNamespaceURI)
|
nsAString& aNamespaceURI)
|
||||||
{
|
{
|
||||||
Element *element = GetNameSpaceElement();
|
Element *element = GetNameSpaceElement();
|
||||||
if (!element || NS_FAILED(element->LookupNamespaceURI(aNamespacePrefix,
|
if (!element ||
|
||||||
aNamespaceURI))) {
|
NS_FAILED(element->LookupNamespaceURIInternal(aNamespacePrefix,
|
||||||
|
aNamespaceURI))) {
|
||||||
SetDOMStringToNull(aNamespaceURI);
|
SetDOMStringToNull(aNamespaceURI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1433,8 +1434,8 @@ nsIContent::GetEditingHost()
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsIContent::LookupNamespaceURI(const nsAString& aNamespacePrefix,
|
nsIContent::LookupNamespaceURIInternal(const nsAString& aNamespacePrefix,
|
||||||
nsAString& aNamespaceURI) const
|
nsAString& aNamespaceURI) const
|
||||||
{
|
{
|
||||||
if (aNamespacePrefix.EqualsLiteral("xml")) {
|
if (aNamespacePrefix.EqualsLiteral("xml")) {
|
||||||
// Special-case for xml prefix
|
// Special-case for xml prefix
|
||||||
|
@ -528,6 +528,7 @@ _TEST_FILES2 = \
|
|||||||
test_bug690056.html \
|
test_bug690056.html \
|
||||||
test_bug692434.html \
|
test_bug692434.html \
|
||||||
file_bug692434.xml \
|
file_bug692434.xml \
|
||||||
|
test_bug693615.html \
|
||||||
test_bug693875.html \
|
test_bug693875.html \
|
||||||
test_nodelist_holes.html \
|
test_nodelist_holes.html \
|
||||||
test_xhr_abort_after_load.html \
|
test_xhr_abort_after_load.html \
|
||||||
|
41
content/base/test/test_bug693615.html
Normal file
41
content/base/test/test_bug693615.html
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user