OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
4 * reserved. | 4 * reserved. |
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 requireTransformOrigin(applyOrigin, applyMotionPath); | 1305 requireTransformOrigin(applyOrigin, applyMotionPath); |
1306 | 1306 |
1307 float originX = 0; | 1307 float originX = 0; |
1308 float originY = 0; | 1308 float originY = 0; |
1309 float originZ = 0; | 1309 float originZ = 0; |
1310 | 1310 |
1311 const FloatSize& boxSize = boundingBox.size(); | 1311 const FloatSize& boxSize = boundingBox.size(); |
1312 if (applyTransformOrigin || | 1312 if (applyTransformOrigin || |
1313 // We need to calculate originX and originY for applying motion path. | 1313 // We need to calculate originX and originY for applying motion path. |
1314 applyMotionPath == IncludeMotionPath) { | 1314 applyMotionPath == IncludeMotionPath) { |
1315 float offsetX = transformOriginX().type() == Percent ? boundingBox.x() : 0; | 1315 originX = floatValueForLength(transformOriginX(), boxSize.width()) + |
1316 originX = | 1316 boundingBox.x(); |
1317 floatValueForLength(transformOriginX(), boxSize.width()) + offsetX; | 1317 originY = floatValueForLength(transformOriginY(), boxSize.height()) + |
1318 float offsetY = transformOriginY().type() == Percent ? boundingBox.y() : 0; | 1318 boundingBox.y(); |
1319 originY = | |
1320 floatValueForLength(transformOriginY(), boxSize.height()) + offsetY; | |
1321 if (applyTransformOrigin) { | 1319 if (applyTransformOrigin) { |
1322 originZ = transformOriginZ(); | 1320 originZ = transformOriginZ(); |
1323 result.translate3d(originX, originY, originZ); | 1321 result.translate3d(originX, originY, originZ); |
1324 } | 1322 } |
1325 } | 1323 } |
1326 | 1324 |
1327 if (applyIndependentTransformProperties == | 1325 if (applyIndependentTransformProperties == |
1328 IncludeIndependentTransformProperties) { | 1326 IncludeIndependentTransformProperties) { |
1329 if (translate()) | 1327 if (translate()) |
1330 translate()->apply(result, boxSize); | 1328 translate()->apply(result, boxSize); |
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2498 if (value < 0) | 2496 if (value < 0) |
2499 fvalue -= 0.5f; | 2497 fvalue -= 0.5f; |
2500 else | 2498 else |
2501 fvalue += 0.5f; | 2499 fvalue += 0.5f; |
2502 } | 2500 } |
2503 | 2501 |
2504 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2502 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
2505 } | 2503 } |
2506 | 2504 |
2507 } // namespace blink | 2505 } // namespace blink |
OLD | NEW |