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

Unified Diff: third_party/WebKit/Source/core/animation/CSSFontSizeInterpolationType.cpp

Issue 2283783002: Move static methods out of CSSLengthInterpolationType to LengthInterpolationFunctions (Closed)
Patch Set: Fix compile Created 4 years, 3 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/animation/CSSFontSizeInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSFontSizeInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSFontSizeInterpolationType.cpp
index 650644da53232caf7e8b5d4eb9745875bbba8d8f..ec3b822849e8f6883904e6308d7c2b3a1321ce39 100644
--- a/third_party/WebKit/Source/core/animation/CSSFontSizeInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSFontSizeInterpolationType.cpp
@@ -4,7 +4,7 @@
#include "core/animation/CSSFontSizeInterpolationType.h"
-#include "core/animation/CSSLengthInterpolationType.h"
+#include "core/animation/LengthInterpolationFunctions.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/resolver/StyleResolverState.h"
#include "platform/LengthFunctions.h"
@@ -57,7 +57,7 @@ private:
InterpolationValue convertFontSize(float size)
{
- return InterpolationValue(CSSLengthInterpolationType::createInterpolablePixels(size));
+ return InterpolationValue(LengthInterpolationFunctions::createInterpolablePixels(size));
}
InterpolationValue maybeConvertKeyword(CSSValueID valueID, const StyleResolverState& state, InterpolationType::ConversionCheckers& conversionCheckers)
@@ -82,7 +82,7 @@ InterpolationValue maybeConvertKeyword(CSSValueID valueID, const StyleResolverSt
InterpolationValue CSSFontSizeInterpolationType::maybeConvertNeutral(const InterpolationValue&, ConversionCheckers&) const
{
- return InterpolationValue(CSSLengthInterpolationType::createNeutralInterpolableValue());
+ return InterpolationValue(LengthInterpolationFunctions::createNeutralInterpolableValue());
}
InterpolationValue CSSFontSizeInterpolationType::maybeConvertInitial(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
@@ -99,7 +99,7 @@ InterpolationValue CSSFontSizeInterpolationType::maybeConvertInherit(const Style
InterpolationValue CSSFontSizeInterpolationType::maybeConvertValue(const CSSValue& value, const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
{
- std::unique_ptr<InterpolableValue> result = CSSLengthInterpolationType::maybeConvertCSSValue(value).interpolableValue;
+ std::unique_ptr<InterpolableValue> result = LengthInterpolationFunctions::maybeConvertCSSValue(value).interpolableValue;
if (result)
return InterpolationValue(std::move(result));
@@ -117,7 +117,7 @@ InterpolationValue CSSFontSizeInterpolationType::maybeConvertUnderlyingValue(con
void CSSFontSizeInterpolationType::apply(const InterpolableValue& interpolableValue, const NonInterpolableValue*, InterpolationEnvironment& environment) const
{
const FontDescription& parentFont = environment.state().parentFontDescription();
- Length fontSizeLength = CSSLengthInterpolationType::createLength(interpolableValue, nullptr, environment.state().fontSizeConversionData(), ValueRangeNonNegative);
+ Length fontSizeLength = LengthInterpolationFunctions::createLength(interpolableValue, nullptr, environment.state().fontSizeConversionData(), ValueRangeNonNegative);
float fontSize = floatValueForLength(fontSizeLength, parentFont.getSize().value);
environment.state().fontBuilder().setSize(FontDescription::Size(0, fontSize, !fontSizeLength.isPercentOrCalc() || parentFont.isAbsoluteSize()));
}

Powered by Google App Engine
This is Rietveld 408576698