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

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

Issue 345903005: calc expressions should support time, angle and frequency values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated patch Created 6 years, 5 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 | « Source/core/css/CSSCalculationValue.cpp ('k') | 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 80f492a810fb32225bd691574c2a4551373ff33e..642d400c1a4bbdcdb0c3bdd63b4a1fd0805d2ee3 100644
--- a/Source/core/css/CSSPrimitiveValue.h
+++ b/Source/core/css/CSSPrimitiveValue.h
@@ -273,21 +273,7 @@ public:
UnitType primitiveType() const;
double computeDegrees();
-
- enum TimeUnit { Seconds, Milliseconds };
- template <typename T, TimeUnit timeUnit> T computeTime()
- {
- if (timeUnit == Seconds && m_primitiveUnitType == CSS_S)
- return getValue<T>();
- if (timeUnit == Seconds && m_primitiveUnitType == CSS_MS)
- return getValue<T>() / 1000;
- if (timeUnit == Milliseconds && m_primitiveUnitType == CSS_MS)
- return getValue<T>();
- if (timeUnit == Milliseconds && m_primitiveUnitType == CSS_S)
- return getValue<T>() * 1000;
- ASSERT_NOT_REACHED();
- return 0;
- }
+ double computeSeconds();
/*
* Computes a length in pixels out of the given CSSValue
« no previous file with comments | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698