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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSStyleValue.cpp

Issue 2903413002: Restructure type tracking in StyleValues to work better with new numeric types (Closed)
Patch Set: rebase Created 3 years, 6 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
Index: third_party/WebKit/Source/core/css/cssom/CSSStyleValue.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.cpp b/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.cpp
index 473c929e7d6a146fb6170e88ae01d40d82a59bd1..ee2657c720ab0a9b00309774097808eb9ba62d81 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.cpp
@@ -53,4 +53,28 @@ ScriptValue CSSStyleValue::parse(ScriptState* script_state,
return ScriptValue(script_state, wrapped_value);
}
+String CSSStyleValue::StyleValueTypeToString(StyleValueType type) {
+ switch (type) {
+ case StyleValueType::kNumberType:
+ return "number";
+ case StyleValueType::kPercentType:
+ return "percent";
+ case StyleValueType::kLengthType:
+ return "length";
+ case StyleValueType::kAngleType:
+ return "angle";
+ case StyleValueType::kTimeType:
+ return "time";
+ case StyleValueType::kFrequencyType:
+ return "frequency";
+ case StyleValueType::kResolutionType:
+ return "resolution";
+ case StyleValueType::kFlexType:
+ return "flex";
+ default:
+ NOTREACHED();
+ return "";
+ }
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSStyleValue.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSUnitValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698