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

Unified Diff: Source/core/animation/css/CSSAnimatableValueFactory.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: Resize expect size of Persistent Created 5 years, 7 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/css/CSSAnimatableValueFactory.cpp
diff --git a/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
index abd9d8c51ef5f975efe67f65915e64d31ba6b226..31f7614828bcacedb653645df003d5742091b535 100644
--- a/Source/core/animation/css/CSSAnimatableValueFactory.cpp
+++ b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -62,7 +62,7 @@
namespace blink {
-static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthWithZoom(const Length& length, float zoom)
+static AnimatableValue* createFromLengthWithZoom(const Length& length, float zoom)
{
switch (length.type()) {
case Fixed:
@@ -89,17 +89,17 @@ static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthWithZoom(const Le
return nullptr;
}
-static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLength(const Length& length, const ComputedStyle& style)
+static AnimatableValue* createFromLength(const Length& length, const ComputedStyle& style)
{
return createFromLengthWithZoom(length, style.effectiveZoom());
}
-static PassRefPtrWillBeRawPtr<AnimatableValue> createFromUnzoomedLength(const UnzoomedLength& unzoomedLength)
+static AnimatableValue* createFromUnzoomedLength(const UnzoomedLength& unzoomedLength)
{
return createFromLengthWithZoom(unzoomedLength.length(), 1);
}
-static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLineHeight(const Length& length, const ComputedStyle& style)
+static AnimatableValue* createFromLineHeight(const Length& length, const ComputedStyle& style)
{
if (length.type() == Percent) {
double value = length.value();
@@ -111,12 +111,12 @@ static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLineHeight(const Length
return createFromLength(length, style);
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromDouble(double value, AnimatableDouble::Constraint constraint = AnimatableDouble::Unconstrained)
+inline static AnimatableValue* createFromDouble(double value, AnimatableDouble::Constraint constraint = AnimatableDouble::Unconstrained)
{
return AnimatableDouble::create(value, constraint);
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthBox(const LengthBox& lengthBox, const ComputedStyle& style)
+inline static AnimatableValue* createFromLengthBox(const LengthBox& lengthBox, const ComputedStyle& style)
{
return AnimatableLengthBox::create(
createFromLength(lengthBox.left(), style),
@@ -125,14 +125,14 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthBox(const
createFromLength(lengthBox.bottom(), style));
}
-static PassRefPtrWillBeRawPtr<AnimatableValue> createFromBorderImageLength(const BorderImageLength& borderImageLength, const ComputedStyle& style)
+static AnimatableValue* createFromBorderImageLength(const BorderImageLength& borderImageLength, const ComputedStyle& style)
{
if (borderImageLength.isNumber())
return createFromDouble(borderImageLength.number());
return createFromLength(borderImageLength.length(), style);
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromBorderImageLengthBox(const BorderImageLengthBox& borderImageLengthBox, const ComputedStyle& style)
+inline static AnimatableValue* createFromBorderImageLengthBox(const BorderImageLengthBox& borderImageLengthBox, const ComputedStyle& style)
{
return AnimatableLengthBox::create(
createFromBorderImageLength(borderImageLengthBox.left(), style),
@@ -141,26 +141,26 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromBorderImageLengt
createFromBorderImageLength(borderImageLengthBox.bottom(), style));
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthBoxAndBool(const LengthBox lengthBox, const bool flag, const ComputedStyle& style)
+inline static AnimatableValue* createFromLengthBoxAndBool(const LengthBox lengthBox, const bool flag, const ComputedStyle& style)
{
return AnimatableLengthBoxAndBool::create(
createFromLengthBox(lengthBox, style),
flag);
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromDoubleAndBool(double number, const bool flag, const ComputedStyle& style)
+inline static AnimatableValue* createFromDoubleAndBool(double number, const bool flag, const ComputedStyle& style)
{
return AnimatableDoubleAndBool::create(number, flag);
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthPoint(const LengthPoint& lengthPoint, const ComputedStyle& style)
+inline static AnimatableValue* createFromLengthPoint(const LengthPoint& lengthPoint, const ComputedStyle& style)
{
return AnimatableLengthPoint::create(
createFromLength(lengthPoint.x(), style),
createFromLength(lengthPoint.y(), style));
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromTransformOrigin(const TransformOrigin& transformOrigin, const ComputedStyle& style)
+inline static AnimatableValue* createFromTransformOrigin(const TransformOrigin& transformOrigin, const ComputedStyle& style)
{
return AnimatableLengthPoint3D::create(
createFromLength(transformOrigin.x(), style),
@@ -168,14 +168,14 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromTransformOrigin(
createFromDouble(transformOrigin.z()));
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthSize(const LengthSize& lengthSize, const ComputedStyle& style)
+inline static AnimatableValue* createFromLengthSize(const LengthSize& lengthSize, const ComputedStyle& style)
{
return AnimatableLengthSize::create(
createFromLength(lengthSize.width(), style),
createFromLength(lengthSize.height(), style));
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromStyleImage(StyleImage* image)
+inline static AnimatableValue* createFromStyleImage(StyleImage* image)
{
if (image) {
if (RefPtrWillBeRawPtr<CSSValue> cssValue = image->cssValue())
@@ -184,7 +184,7 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromStyleImage(Style
return AnimatableUnknown::create(CSSValueNone);
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillSize(const FillSize& fillSize, const ComputedStyle& style)
+inline static AnimatableValue* createFromFillSize(const FillSize& fillSize, const ComputedStyle& style)
{
switch (fillSize.type) {
case SizeLength:
@@ -199,7 +199,7 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillSize(const F
}
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromBackgroundPosition(const Length& length, bool originIsSet, BackgroundEdgeOrigin origin, const ComputedStyle& style)
+inline static AnimatableValue* createFromBackgroundPosition(const Length& length, bool originIsSet, BackgroundEdgeOrigin origin, const ComputedStyle& style)
{
if (!originIsSet || origin == LeftEdge || origin == TopEdge)
return createFromLength(length, style);
@@ -207,9 +207,9 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromBackgroundPositi
}
template<CSSPropertyID property>
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillLayers(const FillLayer& fillLayers, const ComputedStyle& style)
+inline static AnimatableValue* createFromFillLayers(const FillLayer& fillLayers, const ComputedStyle& style)
{
- WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>> values;
+ HeapVector<Member<AnimatableValue>> values;
for (const FillLayer* fillLayer = &fillLayers; fillLayer; fillLayer = fillLayer->next()) {
if (property == CSSPropertyBackgroundImage || property == CSSPropertyWebkitMaskImage) {
if (!fillLayer->isImageSet())
@@ -234,14 +234,14 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillLayers(const
return AnimatableRepeatable::create(values);
}
-PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::createFromColor(CSSPropertyID property, const ComputedStyle& style)
+AnimatableValue* CSSAnimatableValueFactory::createFromColor(CSSPropertyID property, const ComputedStyle& style)
{
Color color = style.colorIncludingFallback(property, false);
Color visitedLinkColor = style.colorIncludingFallback(property, true);
return AnimatableColor::create(color, visitedLinkColor);
}
-inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromShapeValue(ShapeValue* value)
+inline static AnimatableValue* createFromShapeValue(ShapeValue* value)
{
if (value)
return AnimatableShapeValue::create(value);
@@ -253,7 +253,7 @@ static double fontStretchToDouble(FontStretch fontStretch)
return static_cast<unsigned>(fontStretch);
}
-static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFontStretch(FontStretch fontStretch)
+static AnimatableValue* createFromFontStretch(FontStretch fontStretch)
{
return createFromDouble(fontStretchToDouble(fontStretch));
}
@@ -285,7 +285,7 @@ static double fontWeightToDouble(FontWeight fontWeight)
return 400;
}
-static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFontWeight(FontWeight fontWeight)
+static AnimatableValue* createFromFontWeight(FontWeight fontWeight)
{
return createFromDouble(fontWeightToDouble(fontWeight));
}
@@ -298,7 +298,7 @@ static SVGPaintType normalizeSVGPaintType(SVGPaintType paintType)
}
// FIXME: Generate this function.
-PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPropertyID property, const ComputedStyle& style)
+AnimatableValue* CSSAnimatableValueFactory::create(CSSPropertyID property, const ComputedStyle& style)
{
ASSERT(CSSPropertyMetadata::isAnimatableProperty(property));
switch (property) {

Powered by Google App Engine
This is Rietveld 408576698