Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index 14e2950fba9559fadd97d5d4c6508511f4520f7f..832a65fb30d66113858c7e539ba4cefd359a8e65 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -916,6 +916,8 @@ void Element::setSynchronizedLazyAttribute(const QualifiedName& name, const Atom |
ALWAYS_INLINE void Element::setAttributeInternal(size_t index, const QualifiedName& name, const AtomicString& newValue, SynchronizationOfLazyAttribute inSynchronizationOfLazyAttribute) |
{ |
+ m_parserSet = false; |
+ |
if (newValue.isNull()) { |
if (index != kNotFound) |
removeAttributeInternal(index, inSynchronizationOfLazyAttribute); |
@@ -1198,6 +1200,8 @@ void Element::parserSetAttributes(const Vector<Attribute>& attributeVector) |
else |
m_elementData = ShareableElementData::createWithAttributes(attributeVector); |
+ m_parserSet = true; |
+ |
// Use attributeVector instead of m_elementData because attributeChanged might modify m_elementData. |
for (unsigned i = 0; i < attributeVector.size(); ++i) |
attributeChangedFromParserOrByCloning(attributeVector[i].name(), attributeVector[i].value(), ModifiedDirectly); |
@@ -2095,6 +2099,8 @@ void Element::removeAttributeInternal(size_t index, SynchronizationOfLazyAttribu |
{ |
ASSERT_WITH_SECURITY_IMPLICATION(index < attributeCount()); |
+ m_parserSet = false; |
+ |
UniqueElementData* elementData = ensureUniqueElementData(); |
QualifiedName name = elementData->attributeItem(index)->name(); |
@@ -2116,6 +2122,8 @@ void Element::removeAttributeInternal(size_t index, SynchronizationOfLazyAttribu |
void Element::addAttributeInternal(const QualifiedName& name, const AtomicString& value, SynchronizationOfLazyAttribute inSynchronizationOfLazyAttribute) |
{ |
+ m_parserSet = false; |
+ |
if (!inSynchronizationOfLazyAttribute) |
willModifyAttribute(name, nullAtom, value); |
ensureUniqueElementData()->addAttribute(name, value); |