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

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

Issue 2786643003: Implement support for the 'transform-box' property (Closed)
Patch Set: Update existing tests to be compatible Created 3 years, 9 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/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 12a1ffac605679b1800ce9203b106515813337db..0d7f48ea3f1799dda49b7a6282b95f0fbf3bf400 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1294,12 +1294,10 @@ void ComputedStyle::applyTransform(
if (applyTransformOrigin ||
// We need to calculate originX and originY for applying motion path.
applyMotionPath == IncludeMotionPath) {
- float offsetX = transformOriginX().type() == Percent ? boundingBox.x() : 0;
- originX =
- floatValueForLength(transformOriginX(), boxSize.width()) + offsetX;
- float offsetY = transformOriginY().type() == Percent ? boundingBox.y() : 0;
- originY =
- floatValueForLength(transformOriginY(), boxSize.height()) + offsetY;
+ originX = floatValueForLength(transformOriginX(), boxSize.width()) +
+ boundingBox.x();
+ originY = floatValueForLength(transformOriginY(), boxSize.height()) +
+ boundingBox.y();
if (applyTransformOrigin) {
originZ = transformOriginZ();
result.translate3d(originX, originY, originZ);

Powered by Google App Engine
This is Rietveld 408576698