Chromium Code Reviews| Index: Source/core/css/CSSPrimitiveValue.h |
| diff --git a/Source/core/css/CSSPrimitiveValue.h b/Source/core/css/CSSPrimitiveValue.h |
| index 6e62b4f2c1f3c069186077fa562883522f82c993..79989d045434670e6cde690d6f29b0f35d36c749 100644 |
| --- a/Source/core/css/CSSPrimitiveValue.h |
| +++ b/Source/core/css/CSSPrimitiveValue.h |
| @@ -176,7 +176,6 @@ public: |
| }; |
| static UnitCategory unitCategory(CSSPrimitiveValue::UnitTypes); |
| - typedef HashMap<String, CSSPrimitiveValue::UnitTypes> UnitTable; |
| static UnitTypes fromName(const String& unit); |
| bool isAngle() const |
| @@ -214,14 +213,10 @@ public: |
| bool isCalculated() const { return m_primitiveUnitType == CSS_CALC; } |
| bool isCalculatedPercentageWithNumber() const { return primitiveType() == CSS_CALC_PERCENTAGE_WITH_NUMBER; } |
| bool isCalculatedPercentageWithLength() const { return primitiveType() == CSS_CALC_PERCENTAGE_WITH_LENGTH; } |
| - bool isDotsPerInch() const { return primitiveType() == CSS_DPI; } |
| - bool isDotsPerPixel() const { return primitiveType() == CSS_DPPX; } |
| - bool isDotsPerCentimeter() const { return primitiveType() == CSS_DPCM; } |
| - bool isResolution() const |
| - { |
| - unsigned short type = primitiveType(); |
| - return type >= CSS_DPPX && type <= CSS_DPCM; |
| - } |
| + static bool isDotsPerInch(unsigned short type) { return type == CSS_DPI; } |
|
eseidel
2014/04/22 16:22:23
I wonder if we should make an internal enum mapped
|
| + static bool isDotsPerPixel(unsigned short type) { return type == CSS_DPPX; } |
| + static bool isDotsPerCentimeter(unsigned short type) { return type == CSS_DPCM; } |
| + static bool isResolution(unsigned short type) { return type >= CSS_DPPX && type <= CSS_DPCM; } |
| bool isFlex() const { return primitiveType() == CSS_FR; } |
| bool isValueID() const { return m_primitiveUnitType == CSS_VALUE_ID; } |
| bool colorIsDerivedFromElement() const; |