| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2230 0); | 2230 0); |
| 2231 transform = perspectiveMatrix * transform; | 2231 transform = perspectiveMatrix * transform; |
| 2232 transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(), 0); | 2232 transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(), 0); |
| 2233 } | 2233 } |
| 2234 } | 2234 } |
| 2235 | 2235 |
| 2236 FloatQuad LayoutObject::localToAncestorQuad( | 2236 FloatQuad LayoutObject::localToAncestorQuad( |
| 2237 const FloatQuad& localQuad, | 2237 const FloatQuad& localQuad, |
| 2238 const LayoutBoxModelObject* ancestor, | 2238 const LayoutBoxModelObject* ancestor, |
| 2239 MapCoordinatesFlags mode) const { | 2239 MapCoordinatesFlags mode) const { |
| 2240 return localToAncestorQuadInternal(localQuad, ancestor, mode | UseTransforms); |
| 2241 } |
| 2242 |
| 2243 FloatQuad LayoutObject::localToAncestorQuadWithoutTransforms( |
| 2244 const FloatQuad& localQuad, |
| 2245 const LayoutBoxModelObject* ancestor, |
| 2246 MapCoordinatesFlags mode) const { |
| 2247 DCHECK(!(mode & UseTransforms)); |
| 2248 return localToAncestorQuadInternal(localQuad, ancestor, mode); |
| 2249 } |
| 2250 |
| 2251 FloatQuad LayoutObject::localToAncestorQuadInternal( |
| 2252 const FloatQuad& localQuad, |
| 2253 const LayoutBoxModelObject* ancestor, |
| 2254 MapCoordinatesFlags mode) const { |
| 2240 // Track the point at the center of the quad's bounding box. As | 2255 // Track the point at the center of the quad's bounding box. As |
| 2241 // mapLocalToAncestor() calls offsetFromContainer(), it will use that point | 2256 // mapLocalToAncestor() calls offsetFromContainer(), it will use that point |
| 2242 // as the reference point to decide which column's transform to apply in | 2257 // as the reference point to decide which column's transform to apply in |
| 2243 // multiple-column blocks. | 2258 // multiple-column blocks. |
| 2244 TransformState transformState(TransformState::ApplyTransformDirection, | 2259 TransformState transformState(TransformState::ApplyTransformDirection, |
| 2245 localQuad.boundingBox().center(), localQuad); | 2260 localQuad.boundingBox().center(), localQuad); |
| 2246 mapLocalToAncestor(ancestor, transformState, | 2261 mapLocalToAncestor(ancestor, transformState, mode | ApplyContainerFlip); |
| 2247 mode | ApplyContainerFlip | UseTransforms); | |
| 2248 transformState.flatten(); | 2262 transformState.flatten(); |
| 2249 | 2263 |
| 2250 return transformState.lastPlanarQuad(); | 2264 return transformState.lastPlanarQuad(); |
| 2251 } | 2265 } |
| 2252 | 2266 |
| 2253 FloatPoint LayoutObject::localToAncestorPoint( | 2267 FloatPoint LayoutObject::localToAncestorPoint( |
| 2254 const FloatPoint& localPoint, | 2268 const FloatPoint& localPoint, |
| 2255 const LayoutBoxModelObject* ancestor, | 2269 const LayoutBoxModelObject* ancestor, |
| 2256 MapCoordinatesFlags mode) const { | 2270 MapCoordinatesFlags mode) const { |
| 2257 TransformState transformState(TransformState::ApplyTransformDirection, | 2271 TransformState transformState(TransformState::ApplyTransformDirection, |
| (...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3477 const blink::LayoutObject* root = object1; | 3491 const blink::LayoutObject* root = object1; |
| 3478 while (root->parent()) | 3492 while (root->parent()) |
| 3479 root = root->parent(); | 3493 root = root->parent(); |
| 3480 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3494 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3481 } else { | 3495 } else { |
| 3482 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3496 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3483 } | 3497 } |
| 3484 } | 3498 } |
| 3485 | 3499 |
| 3486 #endif | 3500 #endif |
| OLD | NEW |