| Index: Source/core/css/CSSPrimitiveValue.h
|
| diff --git a/Source/core/css/CSSPrimitiveValue.h b/Source/core/css/CSSPrimitiveValue.h
|
| index 6e62b4f2c1f3c069186077fa562883522f82c993..aecea7cbee317b78f060db2139f80b46a89ce60c 100644
|
| --- a/Source/core/css/CSSPrimitiveValue.h
|
| +++ b/Source/core/css/CSSPrimitiveValue.h
|
| @@ -196,12 +196,11 @@ public:
|
| || m_primitiveUnitType == CSS_REMS
|
| || m_primitiveUnitType == CSS_CHS;
|
| }
|
| - static bool isViewportPercentageLength(unsigned short type) { return type >= CSS_VW && type <= CSS_VMAX; }
|
| - static bool isLength(unsigned short type)
|
| + bool isLength() const
|
| {
|
| - return (type >= CSS_EMS && type <= CSS_PC) || type == CSS_REMS || type == CSS_CHS || isViewportPercentageLength(type);
|
| + unsigned short type = primitiveType();
|
| + return (type >= CSS_EMS && type <= CSS_PC) || type == CSS_REMS || type == CSS_CHS || isViewportPercentageLength();
|
| }
|
| - bool isLength() const { return isLength(primitiveType()); }
|
| bool isNumber() const { return primitiveType() == CSS_NUMBER; }
|
| bool isPercentage() const { return primitiveType() == CSS_PERCENTAGE; }
|
| bool isPx() const { return primitiveType() == CSS_PX; }
|
| @@ -222,6 +221,7 @@ public:
|
| unsigned short type = primitiveType();
|
| return type >= CSS_DPPX && type <= CSS_DPCM;
|
| }
|
| + bool isViewportPercentageLength() const { return m_primitiveUnitType >= CSS_VW && m_primitiveUnitType <= CSS_VMAX; }
|
| bool isFlex() const { return primitiveType() == CSS_FR; }
|
| bool isValueID() const { return m_primitiveUnitType == CSS_VALUE_ID; }
|
| bool colorIsDerivedFromElement() const;
|
|
|