| Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| index a83f2f2f56f4c9d035a0d680131a294630494cf4..816a0f8a8bbb5cd717bc06174c7475d0f84f0de6 100644
|
| --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| @@ -1376,6 +1376,8 @@ void ComputedStyle::applyMotionPathTransform(
|
| if (!motionData.m_path) {
|
| return;
|
| }
|
| + const LengthPoint& position = offsetPosition();
|
| + const LengthPoint& anchor = offsetAnchor();
|
| const StylePath& motionPath = *motionData.m_path;
|
| float pathLength = motionPath.length();
|
| float distance = floatValueForLength(motionData.m_distance, pathLength);
|
| @@ -1397,9 +1399,10 @@ void ComputedStyle::applyMotionPathTransform(
|
|
|
| float originShiftX = 0;
|
| float originShiftY = 0;
|
| - if (RuntimeEnabledFeatures::cssOffsetPositionAnchorEnabled()) {
|
| - // TODO(ericwilligers): crbug.com/638055 Support offset-anchor: auto.
|
| - const LengthPoint& anchor = offsetAnchor();
|
| + // If offset-Position and offset-anchor properties are not yet enabled,
|
| + // they will have the default value, auto.
|
| + if (position.x() != Length(Auto) || anchor.x() != Length(Auto)) {
|
| + // Shift the origin from transform-origin to offset-anchor.
|
| originShiftX = floatValueForLength(anchor.x(), boundingBox.width()) -
|
| floatValueForLength(transformOriginX(), boundingBox.width());
|
| originShiftY =
|
| @@ -1411,9 +1414,9 @@ void ComputedStyle::applyMotionPathTransform(
|
| point.y() - originY + originShiftY);
|
| transform.rotate(angle + motionData.m_rotation.angle);
|
|
|
| - if (RuntimeEnabledFeatures::cssOffsetPositionAnchorEnabled()) {
|
| + if (position.x() != Length(Auto) || anchor.x() != Length(Auto))
|
| + // Shift the origin back to transform-origin.
|
| transform.translate(-originShiftX, -originShiftY);
|
| - }
|
| }
|
|
|
| void ComputedStyle::setTextShadow(PassRefPtr<ShadowList> s) {
|
|
|