OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (!SVGRenderSupport::pointInClippingArea(this, localPoint)) | 179 if (!SVGRenderSupport::pointInClippingArea(this, localPoint)) |
180 return false; | 180 return false; |
181 | 181 |
182 for (RenderObject* child = lastChild(); child; child = child->previousSiblin
g()) { | 182 for (RenderObject* child = lastChild(); child; child = child->previousSiblin
g()) { |
183 if (child->nodeAtFloatPoint(request, result, localPoint, hitTestAction))
{ | 183 if (child->nodeAtFloatPoint(request, result, localPoint, hitTestAction))
{ |
184 updateHitTestResult(result, roundedLayoutPoint(localPoint)); | 184 updateHitTestResult(result, roundedLayoutPoint(localPoint)); |
185 return true; | 185 return true; |
186 } | 186 } |
187 } | 187 } |
188 | 188 |
189 // Spec: Only graphical elements can be targeted by the mouse, period. | 189 // pointer-events=boundingBox makes it possible for containers to be direct
targets |
| 190 if (style()->pointerEvents() == PE_BOUNDINGBOX) { |
| 191 ASSERT(isObjectBoundingBoxValid()); |
| 192 if (objectBoundingBox().contains(localPoint)) { |
| 193 updateHitTestResult(result, roundedLayoutPoint(localPoint)); |
| 194 return true; |
| 195 } |
| 196 } |
190 // 16.4: "If there are no graphics elements whose relevant graphics content
is under the pointer (i.e., there is no target element), the event is not dispat
ched." | 197 // 16.4: "If there are no graphics elements whose relevant graphics content
is under the pointer (i.e., there is no target element), the event is not dispat
ched." |
191 return false; | 198 return false; |
192 } | 199 } |
193 | 200 |
194 } | 201 } |
OLD | NEW |