Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index 5de0390a18066f89d4c6313834d575e3c1740414..cfa50f7f18db8093780c85eba91f7f3df436b46f 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -1084,17 +1084,8 @@ ALWAYS_INLINE void Element::setAttributeInternal(size_t index, const QualifiedNa |
if (!inSynchronizationOfLazyAttribute) |
willModifyAttribute(existingAttributeName, existingAttributeValue, newValue); |
- |
- if (newValue != existingAttributeValue) { |
- // If there is an Attr node hooked to this attribute, the Attr::setValue() call below |
- // will write into the ElementData. |
- // FIXME: Refactor this so it makes some sense. |
- if (RefPtrWillBeRawPtr<Attr> attrNode = inSynchronizationOfLazyAttribute ? nullptr : attrIfExists(existingAttributeName)) |
- attrNode->setValue(newValue); |
- else |
- ensureUniqueElementData().attributes().at(index).setValue(newValue); |
- } |
- |
+ if (newValue != existingAttributeValue) |
+ ensureUniqueElementData().attributes().at(index).setValue(newValue); |
if (!inSynchronizationOfLazyAttribute) |
didModifyAttribute(existingAttributeName, newValue); |
} |
@@ -2678,21 +2669,6 @@ void Element::cancelFocusAppearanceUpdate() |
document().cancelFocusAppearanceUpdate(); |
} |
-void Element::normalizeAttributes() |
-{ |
- if (!hasAttributes()) |
- return; |
- AttrNodeList* attrNodes = attrNodeList(); |
- if (!attrNodes) |
- return; |
- // Copy the Attr Vector because Node::normalize() can fire synchronous JS |
- // events (e.g. DOMSubtreeModified) and a JS listener could add / remove |
- // attributes while we are iterating. |
- AttrNodeList attrNodesCopy(*attrNodes); |
- for (size_t i = 0; i < attrNodesCopy.size(); ++i) |
- attrNodesCopy[i]->normalize(); |
-} |
- |
void Element::updatePseudoElement(PseudoId pseudoId, StyleRecalcChange change) |
{ |
ASSERT(!needsStyleRecalc()); |