зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1258205 - Make setAttribute throw InvalidCharacterError if the attribute already exists. r=baku
This commit is contained in:
Родитель
dfb2effe59
Коммит
2d08290117
|
@ -1177,14 +1177,12 @@ Element::SetAttribute(const nsAString& aName,
|
|||
const nsAString& aValue,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
const nsAttrName* name = InternalGetExistingAttrNameFromQName(aName);
|
||||
|
||||
if (!name) {
|
||||
aError = nsContentUtils::CheckQName(aName, false);
|
||||
if (aError.Failed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nsAttrName* name = InternalGetExistingAttrNameFromQName(aName);
|
||||
if (!name) {
|
||||
nsCOMPtr<nsIAtom> nameAtom;
|
||||
if (IsHTMLElement() && IsInHTMLDocument()) {
|
||||
nsAutoString lower;
|
||||
|
|
|
@ -6,6 +6,3 @@
|
|||
[First set attribute is returned with mapped attribute set first]
|
||||
expected: FAIL
|
||||
|
||||
[When qualifiedName does not match the Name production, an INVALID_CHARACTER_ERR exception is to be thrown, even if the attribute is already present. (setAttribute)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче