| 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 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2231 0); | 2231 0); |
| 2232 transform = perspectiveMatrix * transform; | 2232 transform = perspectiveMatrix * transform; |
| 2233 transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(), 0); | 2233 transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(), 0); |
| 2234 } | 2234 } |
| 2235 } | 2235 } |
| 2236 | 2236 |
| 2237 FloatQuad LayoutObject::localToAncestorQuad( | 2237 FloatQuad LayoutObject::localToAncestorQuad( |
| 2238 const FloatQuad& localQuad, | 2238 const FloatQuad& localQuad, |
| 2239 const LayoutBoxModelObject* ancestor, | 2239 const LayoutBoxModelObject* ancestor, |
| 2240 MapCoordinatesFlags mode) const { | 2240 MapCoordinatesFlags mode) const { |
| 2241 return localToAncestorQuadInternal(localQuad, ancestor, mode | UseTransforms); |
| 2242 } |
| 2243 |
| 2244 FloatQuad LayoutObject::localToAncestorQuadWithoutTransforms( |
| 2245 const FloatQuad& localQuad, |
| 2246 const LayoutBoxModelObject* ancestor, |
| 2247 MapCoordinatesFlags mode) const { |
| 2248 DCHECK(!(mode & UseTransforms)); |
| 2249 return localToAncestorQuadInternal(localQuad, ancestor, mode); |
| 2250 } |
| 2251 |
| 2252 FloatQuad LayoutObject::localToAncestorQuadInternal( |
| 2253 const FloatQuad& localQuad, |
| 2254 const LayoutBoxModelObject* ancestor, |
| 2255 MapCoordinatesFlags mode) const { |
| 2241 // Track the point at the center of the quad's bounding box. As | 2256 // Track the point at the center of the quad's bounding box. As |
| 2242 // mapLocalToAncestor() calls offsetFromContainer(), it will use that point | 2257 // mapLocalToAncestor() calls offsetFromContainer(), it will use that point |
| 2243 // as the reference point to decide which column's transform to apply in | 2258 // as the reference point to decide which column's transform to apply in |
| 2244 // multiple-column blocks. | 2259 // multiple-column blocks. |
| 2245 TransformState transformState(TransformState::ApplyTransformDirection, | 2260 TransformState transformState(TransformState::ApplyTransformDirection, |
| 2246 localQuad.boundingBox().center(), localQuad); | 2261 localQuad.boundingBox().center(), localQuad); |
| 2247 mapLocalToAncestor(ancestor, transformState, | 2262 mapLocalToAncestor(ancestor, transformState, mode | ApplyContainerFlip); |
| 2248 mode | ApplyContainerFlip | UseTransforms); | |
| 2249 transformState.flatten(); | 2263 transformState.flatten(); |
| 2250 | 2264 |
| 2251 return transformState.lastPlanarQuad(); | 2265 return transformState.lastPlanarQuad(); |
| 2252 } | 2266 } |
| 2253 | 2267 |
| 2254 FloatPoint LayoutObject::localToAncestorPoint( | 2268 FloatPoint LayoutObject::localToAncestorPoint( |
| 2255 const FloatPoint& localPoint, | 2269 const FloatPoint& localPoint, |
| 2256 const LayoutBoxModelObject* ancestor, | 2270 const LayoutBoxModelObject* ancestor, |
| 2257 MapCoordinatesFlags mode) const { | 2271 MapCoordinatesFlags mode) const { |
| 2258 TransformState transformState(TransformState::ApplyTransformDirection, | 2272 TransformState transformState(TransformState::ApplyTransformDirection, |
| (...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3478 const blink::LayoutObject* root = object1; | 3492 const blink::LayoutObject* root = object1; |
| 3479 while (root->parent()) | 3493 while (root->parent()) |
| 3480 root = root->parent(); | 3494 root = root->parent(); |
| 3481 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3495 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3482 } else { | 3496 } else { |
| 3483 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3497 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3484 } | 3498 } |
| 3485 } | 3499 } |
| 3486 | 3500 |
| 3487 #endif | 3501 #endif |
| OLD | NEW |