mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 799937 - Make createElement()'s result always in the HTML namespace (except for XUL documents); r=bz
The new expected failures in web-platform are in a test that doesn't match the spec, which has already been synced upstream and will be synced shortly. For the same test in imptests, I chose to modify the test instead, because it's easier and imptests is going to be removed.
This commit is contained in:
parent
12d165a4f3
commit
8416474647
@ -1550,6 +1550,8 @@ nsDocument::nsDocument(const char* aContentType)
|
||||
, mAnimatingImages(true)
|
||||
, mViewportType(Unknown)
|
||||
{
|
||||
mDefaultElementType = kNameSpaceID_XHTML;
|
||||
|
||||
SetContentTypeInternal(nsDependentCString(aContentType));
|
||||
|
||||
if (!gDocumentLeakPRLog)
|
||||
|
@ -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.createElement("res"));
|
||||
testDoc2.appendChild(testDoc2.createElementNS(null, "res"));
|
||||
testDoc2.documentElement.appendChild(testDoc2.createTextNode("text"));
|
||||
is(testDoc2.inputEncoding, "UTF-8", "wrong encoding");
|
||||
|
||||
|
@ -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.createElement('child');
|
||||
var child = doc.createElementNS(null, 'child');
|
||||
doc.documentElement.appendChild(child);
|
||||
do_check_serialize(doc);
|
||||
do_check_eq(SerializeXML(doc),
|
||||
|
@ -176,7 +176,6 @@ nsHTMLDocument::nsHTMLDocument()
|
||||
// bother initializing members to 0.
|
||||
|
||||
mType = eHTML;
|
||||
mDefaultElementType = kNameSpaceID_XHTML;
|
||||
mCompatMode = eCompatibility_NavQuirks;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
{
|
||||
"document.characterSet": true,
|
||||
"foreignDoc.characterSet": true,
|
||||
"xmlDoc.characterSet": true,
|
||||
"xmlElement.namespaceURI": true,
|
||||
"detachedXmlElement.namespaceURI": true
|
||||
"xmlDoc.characterSet": true
|
||||
}
|
||||
|
@ -24,11 +24,7 @@ function testDoc(doc, contentType) {
|
||||
"Wrong MIME type -- incorrect server config?");
|
||||
}
|
||||
|
||||
var expectedNamespace = contentType == "text/html" ||
|
||||
contentType == "application/xhtml+xml"
|
||||
? "http://www.w3.org/1999/xhtml" : null;
|
||||
|
||||
assert_equals(doc.createElement("x").namespaceURI, expectedNamespace);
|
||||
assert_equals(doc.createElement("x").namespaceURI, "http://www.w3.org/1999/xhtml");
|
||||
}
|
||||
|
||||
// First test various objects we create in JS
|
||||
|
@ -1,5 +0,0 @@
|
||||
[share-registry-create-document.html]
|
||||
type: testharness
|
||||
[Document created by createDocument with HTML namespace should share an existing registry]
|
||||
expected: FAIL
|
||||
|
@ -1,5 +0,0 @@
|
||||
[Document-constructor.html]
|
||||
type: testharness
|
||||
[new Document(): URL parsing]
|
||||
expected: FAIL
|
||||
|
@ -0,0 +1,74 @@
|
||||
[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
|
||||
|
@ -1,8 +0,0 @@
|
||||
[Node-properties.html]
|
||||
type: testharness
|
||||
[xmlElement.namespaceURI]
|
||||
expected: FAIL
|
||||
|
||||
[detachedXmlElement.namespaceURI]
|
||||
expected: FAIL
|
||||
|
Loading…
Reference in New Issue
Block a user