Backing out changeset f6759ed53f46 (bug 799937) due to causing extension breakage.

This commit is contained in:
Boris Zbarsky 2015-10-14 11:07:06 -04:00
parent 536a1ef4f3
commit df1837e3c9
10 changed files with 29 additions and 80 deletions

View File

@ -1550,8 +1550,6 @@ nsDocument::nsDocument(const char* aContentType)
, mAnimatingImages(true)
, mViewportType(Unknown)
{
mDefaultElementType = kNameSpaceID_XHTML;
SetContentTypeInternal(nsDependentCString(aContentType));
if (!gDocumentLeakPRLog)

View File

@ -34,7 +34,7 @@ is(testDoc1.inputEncoding, "windows-1252", "wrong encoding");
testDoc2 = document.implementation.createDocument("", "", null);
testDoc2.appendChild(testDoc2.createComment(" doc 2 "));
testDoc2.appendChild(testDoc2.createElementNS(null, "res"));
testDoc2.appendChild(testDoc2.createElement("res"));
testDoc2.documentElement.appendChild(testDoc2.createTextNode("text"));
is(testDoc2.inputEncoding, "UTF-8", "wrong encoding");

View File

@ -175,7 +175,7 @@ function test5() {
// Handling of kids in the null namespace when the default is a
// different namespace (bug 301260).
var doc = ParseXML('<root xmlns="ns1"/>')
var child = doc.createElementNS(null, 'child');
var child = doc.createElement('child');
doc.documentElement.appendChild(child);
do_check_serialize(doc);
do_check_eq(SerializeXML(doc),

View File

@ -176,6 +176,7 @@ nsHTMLDocument::nsHTMLDocument()
// bother initializing members to 0.
mType = eHTML;
mDefaultElementType = kNameSpaceID_XHTML;
mCompatMode = eCompatibility_NavQuirks;
}

View File

@ -1,5 +1,7 @@
{
"document.characterSet": true,
"foreignDoc.characterSet": true,
"xmlDoc.characterSet": true
"xmlDoc.characterSet": true,
"xmlElement.namespaceURI": true,
"detachedXmlElement.namespaceURI": true
}

View File

@ -24,7 +24,11 @@ function testDoc(doc, contentType) {
"Wrong MIME type -- incorrect server config?");
}
assert_equals(doc.createElement("x").namespaceURI, "http://www.w3.org/1999/xhtml");
var expectedNamespace = contentType == "text/html" ||
contentType == "application/xhtml+xml"
? "http://www.w3.org/1999/xhtml" : null;
assert_equals(doc.createElement("x").namespaceURI, expectedNamespace);
}
// First test various objects we create in JS

View File

@ -0,0 +1,5 @@
[share-registry-create-document.html]
type: testharness
[Document created by createDocument with HTML namespace should share an existing registry]
expected: FAIL

View File

@ -0,0 +1,5 @@
[Document-constructor.html]
type: testharness
[new Document(): URL parsing]
expected: FAIL

View File

@ -1,74 +0,0 @@
[Document-createElement-namespace.html]
type: testharness
[Created element's namespace in created XML document]
expected: FAIL
[Created element's namespace in created XHTML document]
expected: FAIL
[Created element's namespace in created SVG document]
expected: FAIL
[Created element's namespace in created MathML document]
expected: FAIL
[Created element's namespace in empty.xml]
expected: FAIL
[Created element's namespace in empty.svg]
expected: FAIL
[Created element's namespace in minimal_html.xml]
expected: FAIL
[Created element's namespace in minimal_html.svg]
expected: FAIL
[Created element's namespace in xhtml.xml]
expected: FAIL
[Created element's namespace in xhtml.svg]
expected: FAIL
[Created element's namespace in svg.xml]
expected: FAIL
[Created element's namespace in svg.svg]
expected: FAIL
[Created element's namespace in mathml.xml]
expected: FAIL
[Created element's namespace in mathml.svg]
expected: FAIL
[Created element's namespace in bare_xhtml.xml]
expected: FAIL
[Created element's namespace in bare_xhtml.svg]
expected: FAIL
[Created element's namespace in bare_svg.xml]
expected: FAIL
[Created element's namespace in bare_svg.svg]
expected: FAIL
[Created element's namespace in bare_mathml.xml]
expected: FAIL
[Created element's namespace in bare_mathml.svg]
expected: FAIL
[Created element's namespace in xhtml_ns_removed.xml]
expected: FAIL
[Created element's namespace in xhtml_ns_removed.svg]
expected: FAIL
[Created element's namespace in xhtml_ns_changed.xml]
expected: FAIL
[Created element's namespace in xhtml_ns_changed.svg]
expected: FAIL

View File

@ -0,0 +1,8 @@
[Node-properties.html]
type: testharness
[xmlElement.namespaceURI]
expected: FAIL
[detachedXmlElement.namespaceURI]
expected: FAIL