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

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

Issue 240453010: Avoid use of CSSValue in MediaQueryExp and MediaQueryEvaluator (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use the new CSSPrimitiveValue static funcs Created 6 years, 8 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
« no previous file with comments | « no previous file | Source/core/css/CSSPrimitiveValue.cpp » ('j') | Source/core/css/MediaQueryEvaluator.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | Source/core/css/CSSPrimitiveValue.cpp » ('j') | Source/core/css/MediaQueryEvaluator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698