| 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 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 requireTransformOrigin(applyOrigin, applyMotionPath); | 1287 requireTransformOrigin(applyOrigin, applyMotionPath); |
| 1288 | 1288 |
| 1289 float originX = 0; | 1289 float originX = 0; |
| 1290 float originY = 0; | 1290 float originY = 0; |
| 1291 float originZ = 0; | 1291 float originZ = 0; |
| 1292 | 1292 |
| 1293 const FloatSize& boxSize = boundingBox.size(); | 1293 const FloatSize& boxSize = boundingBox.size(); |
| 1294 if (applyTransformOrigin || | 1294 if (applyTransformOrigin || |
| 1295 // We need to calculate originX and originY for applying motion path. | 1295 // We need to calculate originX and originY for applying motion path. |
| 1296 applyMotionPath == IncludeMotionPath) { | 1296 applyMotionPath == IncludeMotionPath) { |
| 1297 float offsetX = transformOriginX().type() == Percent ? boundingBox.x() : 0; | 1297 originX = floatValueForLength(transformOriginX(), boxSize.width()) + |
| 1298 originX = | 1298 boundingBox.x(); |
| 1299 floatValueForLength(transformOriginX(), boxSize.width()) + offsetX; | 1299 originY = floatValueForLength(transformOriginY(), boxSize.height()) + |
| 1300 float offsetY = transformOriginY().type() == Percent ? boundingBox.y() : 0; | 1300 boundingBox.y(); |
| 1301 originY = | |
| 1302 floatValueForLength(transformOriginY(), boxSize.height()) + offsetY; | |
| 1303 if (applyTransformOrigin) { | 1301 if (applyTransformOrigin) { |
| 1304 originZ = transformOriginZ(); | 1302 originZ = transformOriginZ(); |
| 1305 result.translate3d(originX, originY, originZ); | 1303 result.translate3d(originX, originY, originZ); |
| 1306 } | 1304 } |
| 1307 } | 1305 } |
| 1308 | 1306 |
| 1309 if (applyIndependentTransformProperties == | 1307 if (applyIndependentTransformProperties == |
| 1310 IncludeIndependentTransformProperties) { | 1308 IncludeIndependentTransformProperties) { |
| 1311 if (translate()) | 1309 if (translate()) |
| 1312 translate()->apply(result, boxSize); | 1310 translate()->apply(result, boxSize); |
| (...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2477 if (value < 0) | 2475 if (value < 0) |
| 2478 fvalue -= 0.5f; | 2476 fvalue -= 0.5f; |
| 2479 else | 2477 else |
| 2480 fvalue += 0.5f; | 2478 fvalue += 0.5f; |
| 2481 } | 2479 } |
| 2482 | 2480 |
| 2483 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2481 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2484 } | 2482 } |
| 2485 | 2483 |
| 2486 } // namespace blink | 2484 } // namespace blink |
| OLD | NEW |