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

Unified Diff: Source/core/css/CSSPrimitiveValueMappings.h

Issue 68203023: Merge FixedIntegerConversion and FixedFloatConversion for CSSPrimitiveValue::convertToLength (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/resolver/FilterOperationResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSPrimitiveValueMappings.h
diff --git a/Source/core/css/CSSPrimitiveValueMappings.h b/Source/core/css/CSSPrimitiveValueMappings.h
index 81cc27051ea9436b23129e4323b396929f064d55..67cd5ea2e3d74808e9aafdb5532dd543fcfef66f 100644
--- a/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/Source/core/css/CSSPrimitiveValueMappings.h
@@ -4430,28 +4430,25 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(GridAutoFlow flow)
enum LengthConversion {
AnyConversion = ~0,
- FixedIntegerConversion = 1 << 0,
- FixedFloatConversion = 1 << 1,
- AutoConversion = 1 << 2,
- PercentConversion = 1 << 3,
+ FixedConversion = 1 << 0,
+ AutoConversion = 1 << 1,
+ PercentConversion = 1 << 2,
};
template<int supported> Length CSSPrimitiveValue::convertToLength(const RenderStyle* style, const RenderStyle* rootStyle, double multiplier, bool computingFontSize)
{
ASSERT(!hasVariableReference());
- if ((supported & (FixedIntegerConversion | FixedFloatConversion)) && isFontRelativeLength() && (!style || !rootStyle))
+ if ((supported & FixedConversion) && isFontRelativeLength() && (!style || !rootStyle))
return Length(Undefined);
- if ((supported & FixedIntegerConversion) && isLength())
+ if ((supported & FixedConversion) && isLength())
return computeLength<Length>(style, rootStyle, multiplier, computingFontSize);
- if ((supported & FixedFloatConversion) && isLength())
- return Length(computeLength<double>(style, rootStyle, multiplier), Fixed);
if ((supported & PercentConversion) && isPercentage())
return Length(getDoubleValue(), Percent);
if ((supported & AutoConversion) && getValueID() == CSSValueAuto)
return Length(Auto);
- if ((supported & (FixedIntegerConversion | FixedFloatConversion)) && (supported & PercentConversion) && isCalculated())
+ if ((supported & FixedConversion) && (supported & PercentConversion) && isCalculated())
return Length(cssCalcValue()->toCalcValue(style, rootStyle, multiplier));
- if ((supported & (FixedIntegerConversion | FixedFloatConversion)) && isViewportPercentageLength())
+ if ((supported & FixedConversion) && isViewportPercentageLength())
return viewportPercentageLength();
return Length(Undefined);
}
« no previous file with comments | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/resolver/FilterOperationResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698