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

Unified Diff: third_party/WebKit/Source/platform/Length.h

Issue 1644883002: Add additive animation support for CSS property translate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_propertyInterpolationTypesMapping
Patch Set: Created 4 years, 11 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/platform/Length.h
diff --git a/third_party/WebKit/Source/platform/Length.h b/third_party/WebKit/Source/platform/Length.h
index 5cd722dc0b59018d91929a30fd604f0b26a42f75..63a0eafcd32cb3f547c78deb6df456da36be2517 100644
--- a/third_party/WebKit/Source/platform/Length.h
+++ b/third_party/WebKit/Source/platform/Length.h
@@ -159,11 +159,18 @@ public:
return getIntValue();
}
+ float pixels() const
+ {
+ ASSERT(type() == Fixed);
+ return getFloatValue();
+ }
+
float percent() const
{
ASSERT(type() == Percent);
return getFloatValue();
}
+
PixelsAndPercent pixelsAndPercent() const;
CalculationValue& calculationValue() const;

Powered by Google App Engine
This is Rietveld 408576698