Merge mozilla-central and mozilla-inbound

This commit is contained in:
Ed Morley 2011-12-20 16:30:26 +00:00
Родитель 7c4652d8f2 aca57accb6
Коммит 46f8a364a9
7 изменённых файлов: 57 добавлений и 17 удалений

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

@ -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,8 +902,8 @@ public:
virtual nsresult SetSMILOverrideStyleRule(mozilla::css::StyleRule* aStyleRule,
bool aNotify) = 0;
nsresult LookupNamespaceURI(const nsAString& aNamespacePrefix,
nsAString& aNamespaceURI) const;
nsresult LookupNamespaceURIInternal(const nsAString& aNamespacePrefix,
nsAString& aNamespaceURI) const;
/**
* 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;
aQName.EndReading(end);
nsAutoString nameSpace;
rv = aNamespaceResolver->LookupNamespaceURI(Substring(aQName.get(), colon),
nameSpace);
rv = aNamespaceResolver->LookupNamespaceURIInternal(Substring(aQName.get(),
colon),
nameSpace);
NS_ENSURE_SUCCESS(rv, rv);
*aNamespace = NameSpaceManager()->GetNameSpaceID(nameSpace);

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

@ -1064,8 +1064,9 @@ nsINode::LookupNamespaceURI(const nsAString& aNamespacePrefix,
nsAString& aNamespaceURI)
{
Element *element = GetNameSpaceElement();
if (!element || NS_FAILED(element->LookupNamespaceURI(aNamespacePrefix,
aNamespaceURI))) {
if (!element ||
NS_FAILED(element->LookupNamespaceURIInternal(aNamespacePrefix,
aNamespaceURI))) {
SetDOMStringToNull(aNamespaceURI);
}
@ -1433,8 +1434,8 @@ nsIContent::GetEditingHost()
}
nsresult
nsIContent::LookupNamespaceURI(const nsAString& aNamespacePrefix,
nsAString& aNamespaceURI) const
nsIContent::LookupNamespaceURIInternal(const nsAString& aNamespacePrefix,
nsAString& aNamespaceURI) const
{
if (aNamespacePrefix.EqualsLiteral("xml")) {
// Special-case for xml prefix

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

@ -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>