diff options
Diffstat (limited to 'WebCore/dom/Element.cpp')
-rw-r--r-- | WebCore/dom/Element.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp index e12d326..93200a7 100644 --- a/WebCore/dom/Element.cpp +++ b/WebCore/dom/Element.cpp @@ -528,7 +528,10 @@ void Element::setAttribute(const AtomicString& name, const AtomicString& value, else if (!old && !value.isNull()) namedAttrMap->addAttribute(createAttribute(QualifiedName(nullAtom, localName, nullAtom), value)); else if (old && !value.isNull()) { - old->setValue(value); + if (Attr* attrNode = old->attr()) + attrNode->setValue(value); + else + old->setValue(value); attributeChanged(old); } @@ -557,7 +560,10 @@ void Element::setAttribute(const QualifiedName& name, const AtomicString& value, else if (!old && !value.isNull()) namedAttrMap->addAttribute(createAttribute(name, value)); else if (old) { - old->setValue(value); + if (Attr* attrNode = old->attr()) + attrNode->setValue(value); + else + old->setValue(value); attributeChanged(old); } |