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

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

Issue 2786643003: Implement support for the 'transform-box' property (Closed)
Patch Set: Rebase; fix property spec; update histogram.xml Created 3 years, 8 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 1a56c52aafc5092a7b2c276ec2e3f5b216500b36..7e05ece156bba41646b0ec1f5c4b76824bd72bc9 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1312,12 +1312,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);
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.cpp ('k') | third_party/WebKit/Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698