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

Unified Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp

Issue 2812523002: Support animating <resolution> custom properties (Closed)
Patch Set: Created 3 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 | « third_party/WebKit/Source/core/css/CSSPrimitiveValue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
index 5ea602d13bb1fb9c1219e3531e50691821669cba..cebcea45874f55be87fb65ec6cb60b78fc235771 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
@@ -265,6 +265,12 @@ double CSSPrimitiveValue::ComputeDegrees() const {
}
}
+double CSSPrimitiveValue::ComputeDotsPerPixel() const {
+ UnitType current_type = TypeWithCalcResolved();
+ DCHECK(IsResolution(current_type));
+ return GetDoubleValue() * ConversionToCanonicalUnitsScaleFactor(current_type);
+}
+
template <>
int CSSPrimitiveValue::ComputeLength(
const CSSToLengthConversionData& conversion_data) const {
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPrimitiveValue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698