diff options
Diffstat (limited to 'Source/WebCore/dom/ElementAttributeData.cpp')
-rw-r--r-- | Source/WebCore/dom/ElementAttributeData.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/Source/WebCore/dom/ElementAttributeData.cpp b/Source/WebCore/dom/ElementAttributeData.cpp index 5a7f34125..981ae5814 100644 --- a/Source/WebCore/dom/ElementAttributeData.cpp +++ b/Source/WebCore/dom/ElementAttributeData.cpp @@ -115,7 +115,7 @@ static AttrList* ensureAttrListForElement(Element* element) ASSERT(!attrListMap().contains(element)); element->setHasAttrList(); AttrListMap::AddResult result = attrListMap().add(element, adoptPtr(new AttrList)); - return result.iterator->second.get(); + return result.iterator->value.get(); } static void removeAttrListForElement(Element* element) @@ -226,37 +226,17 @@ void ElementAttributeData::destroyInlineStyle(StyledElement* element) m_inlineStyleDecl = 0; } -void ElementAttributeData::addAttribute(const Attribute& attribute, Element* element, SynchronizationOfLazyAttribute inSynchronizationOfLazyAttribute) +void ElementAttributeData::addAttribute(const Attribute& attribute) { ASSERT(isMutable()); - - if (element && inSynchronizationOfLazyAttribute == NotInSynchronizationOfLazyAttribute) - element->willModifyAttribute(attribute.name(), nullAtom, attribute.value()); - mutableAttributeVector().append(attribute); - - if (element && inSynchronizationOfLazyAttribute == NotInSynchronizationOfLazyAttribute) - element->didAddAttribute(attribute); } -void ElementAttributeData::removeAttribute(size_t index, Element* element, SynchronizationOfLazyAttribute inSynchronizationOfLazyAttribute) +void ElementAttributeData::removeAttribute(size_t index) { ASSERT(isMutable()); ASSERT(index < length()); - - Attribute& attribute = mutableAttributeVector().at(index); - QualifiedName name = attribute.name(); - - if (element && inSynchronizationOfLazyAttribute == NotInSynchronizationOfLazyAttribute) - element->willRemoveAttribute(name, attribute.value()); - - if (RefPtr<Attr> attr = attrIfExists(element, name)) - attr->detachFromElementWithValue(attribute.value()); - mutableAttributeVector().remove(index); - - if (element && inSynchronizationOfLazyAttribute == NotInSynchronizationOfLazyAttribute) - element->didRemoveAttribute(name); } bool ElementAttributeData::isEquivalent(const ElementAttributeData* other) const |