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

Unified Diff: third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp

Issue 2247773004: [WIP] CSS Motion Path: offset-anchor and offset-position Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: offsetAnchor Created 4 years, 4 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/LengthListPropertyFunctions.cpp
diff --git a/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
index 7b5a8899f5865d798186e5ea8389faefb3972324..739aba7bdde2b0cf28c8dd3c55f5226329c91ada 100644
--- a/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
+++ b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
@@ -97,6 +97,8 @@ ValueRange LengthListPropertyFunctions::getValueRange(CSSPropertyID property)
case CSSPropertyBackgroundPositionX:
case CSSPropertyBackgroundPositionY:
case CSSPropertyObjectPosition:
+ case CSSPropertyOffsetAnchor:
+ case CSSPropertyOffsetPosition:
case CSSPropertyPerspectiveOrigin:
case CSSPropertyTransformOrigin:
case CSSPropertyWebkitMaskPositionX:
@@ -158,6 +160,10 @@ bool LengthListPropertyFunctions::getLengthList(CSSPropertyID property, const Co
case CSSPropertyObjectPosition:
return appendToVector(style.objectPosition(), result);
+ case CSSPropertyOffsetAnchor:
+ return appendToVector(style.offsetAnchor(), result);
+ case CSSPropertyOffsetPosition:
+ return appendToVector(style.offsetPosition(), result);
case CSSPropertyPerspectiveOrigin:
return appendToVector(style.perspectiveOrigin(), result);
case CSSPropertyBorderBottomLeftRadius:
@@ -234,6 +240,12 @@ void LengthListPropertyFunctions::setLengthList(CSSPropertyID property, Computed
case CSSPropertyObjectPosition:
style.setObjectPosition(pointFromVector(lengthList));
return;
+ case CSSPropertyOffsetAnchor:
+ style.setOffsetAnchor(pointFromVector(lengthList));
+ return;
+ case CSSPropertyOffsetPosition:
+ style.setOffsetPosition(pointFromVector(lengthList));
+ return;
case CSSPropertyPerspectiveOrigin:
style.setPerspectiveOrigin(pointFromVector(lengthList));
return;

Powered by Google App Engine
This is Rietveld 408576698