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

Unified Diff: third_party/WebKit/Source/core/animation/CSSPositionInterpolationType.h

Issue 2364503002: CSS Motion Path: animate offset-anchor and offset-position (Closed)
Patch Set: alphabetical Created 4 years, 3 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/animation/CSSPositionInterpolationType.h
diff --git a/third_party/WebKit/Source/core/animation/CSSPositionInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSPositionInterpolationType.h
index 523542e0b575ea3fae5693fa19166742c32261a0..c7bff39d2bcb5fd9dc6210c0202e7864d7c09053 100644
--- a/third_party/WebKit/Source/core/animation/CSSPositionInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSPositionInterpolationType.h
@@ -9,6 +9,7 @@
#include "core/animation/CSSPositionAxisListInterpolationType.h"
#include "core/animation/ListInterpolationFunctions.h"
+#include "core/css/CSSPrimitiveValue.h"
#include "core/css/CSSValuePair.h"
namespace blink {
@@ -22,6 +23,10 @@ public:
private:
InterpolationValue maybeConvertValue(const CSSValue& value, const StyleResolverState&, ConversionCheckers&) const final
{
+ if (value.isPrimitiveValue()) {
+ DCHECK(toCSSPrimitiveValue(value).getValueID() == CSSValueAuto);
+ return nullptr;
+ }
alancutter (OOO until 2018) 2016/09/22 08:05:47 This can just be !value.isPairValue(). Interpolati
Eric Willigers 2016/09/22 09:57:06 Done.
const CSSValuePair& pair = toCSSValuePair(value);
return ListInterpolationFunctions::createList(2, [&pair](size_t index) {
return CSSPositionAxisListInterpolationType::convertPositionAxisCSSValue(index == 0 ? pair.first() : pair.second());

Powered by Google App Engine
This is Rietveld 408576698