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

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: Fix previous patch 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') | no next file with comments »
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..79c6e91a1cbf9c9a84e2e805b132cfd96bdca149 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(UnitTypes type) { return type == CSS_DPI; }
+ static bool isDotsPerPixel(UnitTypes type) { return type == CSS_DPPX; }
+ static bool isDotsPerCentimeter(UnitTypes type) { return type == CSS_DPCM; }
+ static bool isResolution(UnitTypes 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;
@@ -356,6 +351,7 @@ public:
template<typename T> inline operator T() const; // Defined in CSSPrimitiveValueMappings.h
+ static const char* unitTypeToString(UnitTypes);
String customCSSText(CSSTextFormattingFlags = QuoteCSSStringIfNeeded) const;
bool isQuirkValue() { return m_isQuirkValue; }
« no previous file with comments | « no previous file | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698