Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Unified Diff: third_party/WebKit/Source/core/svg/SVGElement.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
index 22a3cb86a7e697ef6c3640a3219459e67473f8b6..023f3b9dcc4576b065cebe4bd507381c9cd67e42 100644
--- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
@@ -158,7 +158,7 @@ SVGElementRareData* SVGElement::ensureSVGRareData()
if (hasSVGRareData())
return svgRareData();
- m_SVGRareData = adoptPtrWillBeNoop(new SVGElementRareData(this));
+ m_SVGRareData = (new SVGElementRareData(this));
return m_SVGRareData.get();
}
@@ -263,7 +263,7 @@ static void updateInstancesAnimatedAttribute(SVGElement* element, const Qualifie
}
}
-void SVGElement::setWebAnimatedAttribute(const QualifiedName& attribute, PassRefPtrWillBeRawPtr<SVGPropertyBase> value)
+void SVGElement::setWebAnimatedAttribute(const QualifiedName& attribute, RawPtr<SVGPropertyBase> value)
{
updateInstancesAnimatedAttribute(this, attribute, [&value](SVGAnimatedPropertyBase& animatedProperty) {
animatedProperty.setAnimatedValue(value.get());
@@ -515,7 +515,7 @@ void SVGElement::mapInstanceToElement(SVGElement* instance)
ASSERT(instance);
ASSERT(instance->inUseShadowTree());
- WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& instances = ensureSVGRareData()->elementInstances();
+ HeapHashSet<WeakMember<SVGElement>>& instances = ensureSVGRareData()->elementInstances();
ASSERT(!instances.contains(instance));
instances.add(instance);
@@ -529,18 +529,18 @@ void SVGElement::removeInstanceMapping(SVGElement* instance)
if (!hasSVGRareData())
return;
- WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& instances = svgRareData()->elementInstances();
+ HeapHashSet<WeakMember<SVGElement>>& instances = svgRareData()->elementInstances();
instances.remove(instance);
}
-static WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& emptyInstances()
+static HeapHashSet<WeakMember<SVGElement>>& emptyInstances()
{
- DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>>, emptyInstances, (adoptPtrWillBeNoop(new WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>())));
+ DEFINE_STATIC_LOCAL(Persistent<HeapHashSet<WeakMember<SVGElement>>>, emptyInstances, ((new HeapHashSet<WeakMember<SVGElement>>())));
return *emptyInstances;
}
-const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& SVGElement::instancesForElement() const
+const HeapHashSet<WeakMember<SVGElement>>& SVGElement::instancesForElement() const
{
if (!hasSVGRareData())
return emptyInstances();
@@ -713,9 +713,9 @@ AnimatedPropertyType SVGElement::animatedPropertyTypeForCSSAttribute(const Quali
return AnimatedUnknown;
}
-void SVGElement::addToPropertyMap(PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> passProperty)
+void SVGElement::addToPropertyMap(RawPtr<SVGAnimatedPropertyBase> passProperty)
{
- RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property(passProperty);
+ RawPtr<SVGAnimatedPropertyBase> property(passProperty);
QualifiedName attributeName = property->attributeName();
m_attributeToPropertyMap.set(attributeName, property.release());
}
@@ -755,7 +755,7 @@ bool SVGElement::haveLoadedRequiredResources()
return true;
}
-static inline void collectInstancesForSVGElement(SVGElement* element, WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& instances)
+static inline void collectInstancesForSVGElement(SVGElement* element, HeapHashSet<WeakMember<SVGElement>>& instances)
{
ASSERT(element);
if (element->containingShadowRoot())
@@ -766,16 +766,16 @@ static inline void collectInstancesForSVGElement(SVGElement* element, WillBeHeap
instances = element->instancesForElement();
}
-bool SVGElement::addEventListenerInternal(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener> prpListener, const EventListenerOptions& options)
+bool SVGElement::addEventListenerInternal(const AtomicString& eventType, RawPtr<EventListener> prpListener, const EventListenerOptions& options)
{
- RefPtrWillBeRawPtr<EventListener> listener = prpListener;
+ RawPtr<EventListener> listener = prpListener;
// Add event listener to regular DOM element
if (!Node::addEventListenerInternal(eventType, listener, options))
return false;
// Add event listener to all shadow tree DOM element instances
- WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>> instances;
+ HeapHashSet<WeakMember<SVGElement>> instances;
collectInstancesForSVGElement(this, instances);
for (SVGElement* element : instances) {
bool result = element->Node::addEventListenerInternal(eventType, listener, options);
@@ -785,16 +785,16 @@ bool SVGElement::addEventListenerInternal(const AtomicString& eventType, PassRef
return true;
}
-bool SVGElement::removeEventListenerInternal(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener> prpListener, const EventListenerOptions& options)
+bool SVGElement::removeEventListenerInternal(const AtomicString& eventType, RawPtr<EventListener> prpListener, const EventListenerOptions& options)
{
- RefPtrWillBeRawPtr<EventListener> listener = prpListener;
+ RawPtr<EventListener> listener = prpListener;
// Remove event listener from regular DOM element
if (!Node::removeEventListenerInternal(eventType, listener, options))
return false;
// Remove event listener from all shadow tree DOM element instances
- WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>> instances;
+ HeapHashSet<WeakMember<SVGElement>> instances;
collectInstancesForSVGElement(this, instances);
for (SVGElement* shadowTreeElement : instances) {
ASSERT(shadowTreeElement);
@@ -839,7 +839,7 @@ void SVGElement::sendSVGLoadEventToSelfAndAncestorChainIfPossible()
return;
// Save the next parent to dispatch to in case dispatching the event mutates the tree.
- RefPtrWillBeRawPtr<Element> parent = parentOrShadowHostElement();
+ RawPtr<Element> parent = parentOrShadowHostElement();
if (!sendSVGLoadEventIfPossible())
return;
@@ -937,7 +937,7 @@ void SVGElement::synchronizeAnimatedSVGAttribute(const QualifiedName& name) cons
elementData()->m_animatedSVGAttributesAreDirty = false;
} else {
- RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = m_attributeToPropertyMap.get(name);
+ RawPtr<SVGAnimatedPropertyBase> property = m_attributeToPropertyMap.get(name);
if (property && property->needsSynchronizeAttribute())
property->synchronizeAttribute();
}
@@ -1006,7 +1006,7 @@ void SVGElement::invalidateInstances()
if (instanceUpdatesBlocked())
return;
- const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement>>& set = instancesForElement();
+ const HeapHashSet<WeakMember<SVGElement>>& set = instancesForElement();
if (set.isEmpty())
return;
@@ -1171,7 +1171,7 @@ void SVGElement::rebuildAllIncomingReferences()
const SVGElementSet& incomingReferences = svgRareData()->incomingReferences();
// Iterate on a snapshot as |incomingReferences| may be altered inside loop.
- WillBeHeapVector<RawPtrWillBeMember<SVGElement>> incomingReferencesSnapshot;
+ HeapVector<Member<SVGElement>> incomingReferencesSnapshot;
copyToVector(incomingReferences, incomingReferencesSnapshot);
// Force rebuilding the |sourceElement| so it knows about this change.

Powered by Google App Engine
This is Rietveld 408576698