summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/ElementAttributeData.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
commit8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch)
tree17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebCore/dom/ElementAttributeData.cpp
parentb9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff)
downloadqtwebkit-8995b83bcbfbb68245f779b64e5517627c6cc6ea.tar.gz
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
Diffstat (limited to 'Source/WebCore/dom/ElementAttributeData.cpp')
-rw-r--r--Source/WebCore/dom/ElementAttributeData.cpp26
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