Chromium Code Reviews| 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 c6046e0a2df0537c419be32bcb9e05086d46d8a2..5906d8692a6278b1ccfa0f7b96d958e076d6dc6b 100644 |
| --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| @@ -1368,6 +1368,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); |
| @@ -1389,9 +1391,7 @@ 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 (position.x() != Length(Auto) || anchor.x() != Length(Auto)) { |
|
sashab
2016/12/12 01:11:26
You removed a runtime enabled feature flag? Please
Eric Willigers
2016/12/12 01:57:14
comments added
|
| originShiftX = floatValueForLength(anchor.x(), boundingBox.width()) - |
| floatValueForLength(transformOriginX(), boundingBox.width()); |
| originShiftY = |
| @@ -1403,9 +1403,8 @@ 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)) |
|
sashab
2016/12/12 01:11:26
Why only x() and not y()?
Eric Willigers
2016/12/12 01:57:14
position and anchor are
<position> | auto
i.e. ei
|
| transform.translate(-originShiftX, -originShiftY); |
| - } |
| } |
| void ComputedStyle::setTextShadow(PassRefPtr<ShadowList> s) { |