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

Unified Diff: Source/core/animation/animatable/AnimatableStrokeDasharrayList.cpp

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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: Source/core/animation/animatable/AnimatableStrokeDasharrayList.cpp
diff --git a/Source/core/animation/animatable/AnimatableStrokeDasharrayList.cpp b/Source/core/animation/animatable/AnimatableStrokeDasharrayList.cpp
index 03c7b553e819ba675beee4d5f7cd2e122f7de35e..d34587a1a7299dc813cccb22ce4218d242018799 100644
--- a/Source/core/animation/animatable/AnimatableStrokeDasharrayList.cpp
+++ b/Source/core/animation/animatable/AnimatableStrokeDasharrayList.cpp
@@ -52,18 +52,18 @@ PassRefPtr<SVGDashArray> AnimatableStrokeDasharrayList::toSVGDashArray(float zoo
bool AnimatableStrokeDasharrayList::usesDefaultInterpolationWith(const AnimatableValue* value) const
{
- WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>> from = m_values;
- WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>> to = toAnimatableStrokeDasharrayList(value)->m_values;
+ HeapVector<Member<AnimatableValue>> from = m_values;
+ HeapVector<Member<AnimatableValue>> to = toAnimatableStrokeDasharrayList(value)->m_values;
return !from.isEmpty() && !to.isEmpty() && AnimatableRepeatable::usesDefaultInterpolationWith(value);
}
-PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableStrokeDasharrayList::interpolateTo(const AnimatableValue* value, double fraction) const
+AnimatableValue* AnimatableStrokeDasharrayList::interpolateTo(const AnimatableValue* value, double fraction) const
{
if (usesDefaultInterpolationWith(value))
return defaultInterpolateTo(this, value, fraction);
- WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>> from = m_values;
- WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>> to = toAnimatableStrokeDasharrayList(value)->m_values;
+ HeapVector<Member<AnimatableValue>> from = m_values;
+ HeapVector<Member<AnimatableValue>> to = toAnimatableStrokeDasharrayList(value)->m_values;
// The spec states that if the sum of all values is zero, this should be
// treated like a value of 'none', which means that a solid line is drawn.
@@ -73,7 +73,7 @@ PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableStrokeDasharrayList::interpola
if (from.isEmpty() && to.isEmpty())
return takeConstRef(this);
if (from.isEmpty() || to.isEmpty()) {
- DEFINE_STATIC_REF_WILL_BE_PERSISTENT(AnimatableLength, zeroPixels, (AnimatableLength::create(Length(Fixed), 1)));
+ static AnimatableLength* zeroPixels = (new Persistent<AnimatableLength>(AnimatableLength::create(Length(Fixed), 1)))->get();
if (from.isEmpty()) {
from.append(zeroPixels);
from.append(zeroPixels);
@@ -84,10 +84,10 @@ PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableStrokeDasharrayList::interpola
}
}
- WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>> interpolatedValues;
+ HeapVector<Member<AnimatableValue>> interpolatedValues;
bool success = interpolateLists(from, to, fraction, interpolatedValues);
ASSERT_UNUSED(success, success);
- return adoptRefWillBeNoop(new AnimatableStrokeDasharrayList(interpolatedValues));
+ return new AnimatableStrokeDasharrayList(interpolatedValues);
}
DEFINE_TRACE(AnimatableStrokeDasharrayList)

Powered by Google App Engine
This is Rietveld 408576698