OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * Copyright (C) 2009 Google, Inc. | 3 * Copyright (C) 2009 Google, Inc. |
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 SVGRenderSupport::computeFloatRectForRepaint(this, paintInvalidationContaine
r, r, fixed, paintInvalidationState); | 161 SVGRenderSupport::computeFloatRectForRepaint(this, paintInvalidationContaine
r, r, fixed, paintInvalidationState); |
162 rect = enclosingLayoutRect(r); | 162 rect = enclosingLayoutRect(r); |
163 } | 163 } |
164 | 164 |
165 bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit
TestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction
) | 165 bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit
TestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction
) |
166 { | 166 { |
167 // Embedded content is drawn in the foreground phase. | 167 // Embedded content is drawn in the foreground phase. |
168 if (hitTestAction != HitTestForeground) | 168 if (hitTestAction != HitTestForeground) |
169 return false; | 169 return false; |
170 | 170 |
171 FloatPoint localPoint = localTransform().inverse().mapPoint(pointInParent); | 171 AffineTransform localTransform = this->localTransform(); |
| 172 if (!localTransform.isInvertible()) |
| 173 return false; |
| 174 |
| 175 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent); |
172 | 176 |
173 // Early exit if local point is not contained in clipped viewport area | 177 // Early exit if local point is not contained in clipped viewport area |
174 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo
int)) | 178 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo
int)) |
175 return false; | 179 return false; |
176 | 180 |
177 // FOs establish a stacking context, so we need to hit-test all layers. | 181 // FOs establish a stacking context, so we need to hit-test all layers. |
178 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); | 182 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); |
179 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestForeground) | 183 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestForeground) |
180 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestFloat) | 184 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestFloat) |
181 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestChildBlockBackgrounds); | 185 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestChildBlockBackgrounds); |
182 } | 186 } |
183 | 187 |
184 } | 188 } |
OLD | NEW |