Chromium Code Reviews| Index: Source/core/dom/Element.cpp |
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
| index e5891c08428e877c5107002f9a7e06cbf3f5a1ab..d8965abf7c50c9204a7b6e6a5cb6fd0cb2b36b48 100644 |
| --- a/Source/core/dom/Element.cpp |
| +++ b/Source/core/dom/Element.cpp |
| @@ -1084,17 +1084,7 @@ 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); |
| - } |
| - |
| + ensureUniqueElementData().attributes().at(index).setValue(newValue); |
|
davve
2015/05/28 14:32:14
We may want to keep the newValue != existingAttrib
philipj_slow
2015/05/28 15:28:36
Done.
|
| if (!inSynchronizationOfLazyAttribute) |
| didModifyAttribute(existingAttributeName, newValue); |
| } |
| @@ -2677,21 +2667,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()); |