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

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

Issue 2390173002: Fix wrong transform for motion-path (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | 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 8f25370944eca8b348490f545b9e2da401d5dbe1..be007f49348d31b43e0a3de4aa2a8316b679864d 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1268,13 +1268,17 @@ void ComputedStyle::applyTransform(
float originY = 0;
float originZ = 0;
- if (applyTransformOrigin) {
+ if (applyTransformOrigin ||
+ // We need to calculate originX and originY for applying motion path.
+ applyMotionPath == ComputedStyle::IncludeMotionPath) {
originX =
floatValueForLength(transformOriginX(), boundingBox.width()) + offsetX;
originY =
floatValueForLength(transformOriginY(), boundingBox.height()) + offsetY;
- originZ = transformOriginZ();
- result.translate3d(originX, originY, originZ);
+ if (applyTransformOrigin) {
+ originZ = transformOriginZ();
+ result.translate3d(originX, originY, originZ);
+ }
}
if (applyIndependentTransformProperties ==
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698