summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGDocumentExtensions.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-16 14:56:46 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-16 14:57:30 +0200
commitb297e0fa5c217c9467033b7c8b46891a52870120 (patch)
tree43fc14689295e9e64f2719d05aad94e3049f6cd7 /Source/WebCore/svg/SVGDocumentExtensions.cpp
parent69d517dbfa69903d8593cc1737f0474b21e3251e (diff)
downloadqtwebkit-b297e0fa5c217c9467033b7c8b46891a52870120.tar.gz
Revert "Imported WebKit commit 0dc6cd75e1d4836eaffbb520be96fac4847cc9d2 (http://svn.webkit.org/repository/webkit/trunk@131300)"
This reverts commit 5466563f4b5b6b86523e3f89bb7f77e5b5270c78. Caused OOM issues on some CI machines :(
Diffstat (limited to 'Source/WebCore/svg/SVGDocumentExtensions.cpp')
-rw-r--r--Source/WebCore/svg/SVGDocumentExtensions.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/WebCore/svg/SVGDocumentExtensions.cpp b/Source/WebCore/svg/SVGDocumentExtensions.cpp
index ccb6323e4..cac1aea07 100644
--- a/Source/WebCore/svg/SVGDocumentExtensions.cpp
+++ b/Source/WebCore/svg/SVGDocumentExtensions.cpp
@@ -156,7 +156,7 @@ void SVGDocumentExtensions::removeAnimationElementFromTarget(SVGSMILElement* ani
HashMap<SVGElement*, HashSet<SVGSMILElement*>* >::iterator it = m_animatedElements.find(targetElement);
ASSERT(it != m_animatedElements.end());
- HashSet<SVGSMILElement*>* animationElementsForTarget = it->value;
+ HashSet<SVGSMILElement*>* animationElementsForTarget = it->second;
ASSERT(!animationElementsForTarget->isEmpty());
animationElementsForTarget->remove(animationElement);
@@ -173,7 +173,7 @@ void SVGDocumentExtensions::removeAllAnimationElementsFromTarget(SVGElement* tar
if (it == m_animatedElements.end())
return;
- HashSet<SVGSMILElement*>* animationElementsForTarget = it->value;
+ HashSet<SVGSMILElement*>* animationElementsForTarget = it->second;
Vector<SVGSMILElement*> toBeReset;
HashSet<SVGSMILElement*>::iterator end = animationElementsForTarget->end();
@@ -219,9 +219,9 @@ void SVGDocumentExtensions::addPendingResource(const AtomicString& id, SVGStyled
// The HashMap add function leaves the map alone and returns a pointer to the element in the
// map if the element already exists. So we add with a value of 0, and it either finds the
- // existing element or adds a new one in a single operation. The ".iterator->value" idiom gets
+ // existing element or adds a new one in a single operation. The ".iterator->second" idiom gets
// us to the iterator from add's result, and then to the value inside the hash table.
- SVGPendingElements*& set = m_pendingResources.add(id, 0).iterator->value;
+ SVGPendingElements*& set = m_pendingResources.add(id, 0).iterator->second;
if (!set)
set = new SVGPendingElements;
set->add(element);
@@ -246,7 +246,7 @@ bool SVGDocumentExtensions::isElementPendingResources(SVGStyledElement* element)
HashMap<AtomicString, SVGPendingElements*>::const_iterator end = m_pendingResources.end();
for (HashMap<AtomicString, SVGPendingElements*>::const_iterator it = m_pendingResources.begin(); it != end; ++it) {
- SVGPendingElements* elements = it->value;
+ SVGPendingElements* elements = it->second;
ASSERT(elements);
if (elements->contains(element))
@@ -274,13 +274,13 @@ void SVGDocumentExtensions::removeElementFromPendingResources(SVGStyledElement*
Vector<AtomicString> toBeRemoved;
HashMap<AtomicString, SVGPendingElements*>::iterator end = m_pendingResources.end();
for (HashMap<AtomicString, SVGPendingElements*>::iterator it = m_pendingResources.begin(); it != end; ++it) {
- SVGPendingElements* elements = it->value;
+ SVGPendingElements* elements = it->second;
ASSERT(elements);
ASSERT(!elements->isEmpty());
elements->remove(element);
if (elements->isEmpty())
- toBeRemoved.append(it->key);
+ toBeRemoved.append(it->first);
}
element->clearHasPendingResourcesIfPossible();
@@ -296,13 +296,13 @@ void SVGDocumentExtensions::removeElementFromPendingResources(SVGStyledElement*
Vector<AtomicString> toBeRemoved;
HashMap<AtomicString, SVGPendingElements*>::iterator end = m_pendingResourcesForRemoval.end();
for (HashMap<AtomicString, SVGPendingElements*>::iterator it = m_pendingResourcesForRemoval.begin(); it != end; ++it) {
- SVGPendingElements* elements = it->value;
+ SVGPendingElements* elements = it->second;
ASSERT(elements);
ASSERT(!elements->isEmpty());
elements->remove(element);
if (elements->isEmpty())
- toBeRemoved.append(it->key);
+ toBeRemoved.append(it->first);
}
// We use the removePendingResourceForRemoval function here because it deals with set lifetime correctly.
@@ -362,7 +362,7 @@ HashSet<SVGElement*>* SVGDocumentExtensions::setOfElementsReferencingTarget(SVGE
const HashMap<SVGElement*, OwnPtr<HashSet<SVGElement*> > >::const_iterator it = m_elementDependencies.find(referencedElement);
if (it == m_elementDependencies.end())
return 0;
- return it->value.get();
+ return it->second.get();
}
void SVGDocumentExtensions::addElementReferencingTarget(SVGElement* referencingElement, SVGElement* referencedElement)
@@ -386,8 +386,8 @@ void SVGDocumentExtensions::removeAllTargetReferencesForElement(SVGElement* refe
HashMap<SVGElement*, OwnPtr<HashSet<SVGElement*> > >::iterator end = m_elementDependencies.end();
for (HashMap<SVGElement*, OwnPtr<HashSet<SVGElement*> > >::iterator it = m_elementDependencies.begin(); it != end; ++it) {
- SVGElement* referencedElement = it->key;
- HashSet<SVGElement*>* referencingElements = it->value.get();
+ SVGElement* referencedElement = it->first;
+ HashSet<SVGElement*>* referencingElements = it->second.get();
HashSet<SVGElement*>::iterator setIt = referencingElements->find(referencingElement);
if (setIt == referencingElements->end())
continue;
@@ -408,10 +408,10 @@ void SVGDocumentExtensions::removeAllElementReferencesForTarget(SVGElement* refe
HashMap<SVGElement*, OwnPtr<HashSet<SVGElement*> > >::iterator it = m_elementDependencies.find(referencedElement);
if (it == m_elementDependencies.end())
return;
- ASSERT(it->key == referencedElement);
+ ASSERT(it->first == referencedElement);
Vector<SVGElement*> toBeNotified;
- HashSet<SVGElement*>* referencingElements = it->value.get();
+ HashSet<SVGElement*>* referencingElements = it->second.get();
HashSet<SVGElement*>::iterator setEnd = referencingElements->end();
for (HashSet<SVGElement*>::iterator setIt = referencingElements->begin(); setIt != setEnd; ++setIt)
toBeNotified.append(*setIt);