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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2527303002: CSS Motion Path: offset-anchor should default to auto (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698