зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 5c65378feacd (bug 1298818)
This commit is contained in:
Родитель
7d8261a6b9
Коммит
bdb6a207ff
|
@ -45,14 +45,17 @@ int MOZ_XMLCheckQName(const char* ptr, const char* end, int ns_aware,
|
|||
nmstrt = ns_aware; /* e.g. "a:0" should be valid if !ns_aware */
|
||||
break;
|
||||
case BT_NONASCII:
|
||||
if (!IS_NAME_CHAR_MINBPC(ptr) ||
|
||||
(nmstrt && !*colon && !IS_NMSTRT_CHAR_MINBPC(ptr))) {
|
||||
return MOZ_EXPAT_INVALID_CHARACTER;
|
||||
if (nmstrt && !IS_NMSTRT_CHAR_MINBPC(ptr)) {
|
||||
/* If this is a valid name character and we're namespace-aware, the
|
||||
QName is malformed. Otherwise, this character's invalid at the
|
||||
start of a name (or, if we're namespace-aware, at the start of a
|
||||
localpart). */
|
||||
return (IS_NAME_CHAR_MINBPC(ptr) && ns_aware) ?
|
||||
MOZ_EXPAT_MALFORMED :
|
||||
MOZ_EXPAT_INVALID_CHARACTER;
|
||||
}
|
||||
if (nmstrt && *colon && !IS_NMSTRT_CHAR_MINBPC(ptr)) {
|
||||
/* If a non-starting character like a number is right after the colon,
|
||||
this is a namespace error, not invalid character */
|
||||
return MOZ_EXPAT_MALFORMED;
|
||||
if (!IS_NAME_CHAR_MINBPC(ptr)) {
|
||||
return MOZ_EXPAT_INVALID_CHARACTER;
|
||||
}
|
||||
nmstrt = 0;
|
||||
break;
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
[DOMImplementation-createDocument.html]
|
||||
type: testharness
|
||||
[createDocument test 7: null,"ெfoo",null,"INVALID_CHARACTER_ERR"]
|
||||
expected: FAIL
|
||||
bug: 1298818
|
||||
|
||||
[createDocument test 67: "http://example.com/","a:0",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
bug: https://github.com/whatwg/dom/issues/319
|
||||
|
||||
[createDocument test 71: "http://example.com/","ெ:a",null,"INVALID_CHARACTER_ERR"]
|
||||
expected: FAIL
|
||||
bug: 1298818
|
||||
|
||||
[createDocument test 197: metadata for null,null,DocumentType node]
|
||||
expected: FAIL
|
||||
bug: 520969
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
[Document-createElementNS.html]
|
||||
type: testharness
|
||||
[createElementNS test 7 in HTML document: null,"ெfoo","INVALID_CHARACTER_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createElementNS test 7 in XML document: null,"ெfoo","INVALID_CHARACTER_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createElementNS test 7 in XHTML document: null,"ெfoo","INVALID_CHARACTER_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createElementNS test 67 in HTML document: "http://example.com/","a:0","NAMESPACE_ERR"]
|
||||
bug: https://github.com/whatwg/dom/issues/319
|
||||
expected: FAIL
|
||||
|
@ -12,3 +21,12 @@
|
|||
bug: https://github.com/whatwg/dom/issues/319
|
||||
expected: FAIL
|
||||
|
||||
[createElementNS test 71 in HTML document: "http://example.com/","ெ:a","INVALID_CHARACTER_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createElementNS test 71 in XML document: "http://example.com/","ெ:a","INVALID_CHARACTER_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createElementNS test 71 in XHTML document: "http://example.com/","ெ:a","INVALID_CHARACTER_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче