From 8995b83bcbfbb68245f779b64e5517627c6cc6ea Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 17 Oct 2012 16:21:14 +0200 Subject: Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592) New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well as the previously cherry-picked changes --- Source/WebCore/dom/ElementAttributeData.cpp | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'Source/WebCore/dom/ElementAttributeData.cpp') 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 = attrIfExists(element, name)) - attr->detachFromElementWithValue(attribute.value()); - mutableAttributeVector().remove(index); - - if (element && inSynchronizationOfLazyAttribute == NotInSynchronizationOfLazyAttribute) - element->didRemoveAttribute(name); } bool ElementAttributeData::isEquivalent(const ElementAttributeData* other) const -- cgit v1.2.1