OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 geometryMap.push(this, locationOffset()); | 124 geometryMap.push(this, locationOffset()); |
125 // Apply other mappings on local SVG coordinates. | 125 // Apply other mappings on local SVG coordinates. |
126 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt, | 126 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt, |
127 geometryMap); | 127 geometryMap); |
128 } | 128 } |
129 | 129 |
130 LayoutRect LayoutSVGBlock::absoluteVisualRect() const { | 130 LayoutRect LayoutSVGBlock::absoluteVisualRect() const { |
131 return SVGLayoutSupport::visualRectInAncestorSpace(*this, *view()); | 131 return SVGLayoutSupport::visualRectInAncestorSpace(*this, *view()); |
132 } | 132 } |
133 | 133 |
134 bool LayoutSVGBlock::mapToVisualRectInAncestorSpace( | 134 bool LayoutSVGBlock::mapToVisualRectInAncestorSpaceInternal( |
135 const LayoutBoxModelObject* ancestor, | 135 const LayoutBoxModelObject* ancestor, |
136 LayoutRect& rect, | 136 TransformState& transformState, |
137 VisualRectFlags) const { | 137 VisualRectFlags) const { |
| 138 transformState.flatten(); |
| 139 LayoutRect rect(transformState.lastPlanarQuad().boundingBox()); |
138 // Convert from local HTML coordinates to local SVG coordinates. | 140 // Convert from local HTML coordinates to local SVG coordinates. |
139 rect.moveBy(location()); | 141 rect.moveBy(location()); |
140 // Apply other mappings on local SVG coordinates. | 142 // Apply other mappings on local SVG coordinates. |
141 return SVGLayoutSupport::mapToVisualRectInAncestorSpace( | 143 bool retval = SVGLayoutSupport::mapToVisualRectInAncestorSpace( |
142 *this, ancestor, FloatRect(rect), rect); | 144 *this, ancestor, FloatRect(rect), rect); |
| 145 transformState.setQuad(FloatQuad(FloatRect(rect))); |
| 146 return retval; |
143 } | 147 } |
144 | 148 |
145 bool LayoutSVGBlock::nodeAtPoint(HitTestResult&, | 149 bool LayoutSVGBlock::nodeAtPoint(HitTestResult&, |
146 const HitTestLocation&, | 150 const HitTestLocation&, |
147 const LayoutPoint&, | 151 const LayoutPoint&, |
148 HitTestAction) { | 152 HitTestAction) { |
149 ASSERT_NOT_REACHED(); | 153 ASSERT_NOT_REACHED(); |
150 return false; | 154 return false; |
151 } | 155 } |
152 | 156 |
153 } // namespace blink | 157 } // namespace blink |
OLD | NEW |