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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 return false; | 167 return false; |
168 | 168 |
169 FloatPoint localPoint; | 169 FloatPoint localPoint; |
170 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToPar
entTransform(), pointInParent, localPoint)) | 170 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToPar
entTransform(), pointInParent, localPoint)) |
171 return false; | 171 return false; |
172 | 172 |
173 for (LayoutObject* child = lastChild(); child; child = child->previousSiblin
g()) { | 173 for (LayoutObject* child = lastChild(); child; child = child->previousSiblin
g()) { |
174 if (child->nodeAtFloatPoint(result, localPoint, hitTestAction)) { | 174 if (child->nodeAtFloatPoint(result, localPoint, hitTestAction)) { |
175 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPoint)
; | 175 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPoint)
; |
176 updateHitTestResult(result, localLayoutPoint); | 176 updateHitTestResult(result, localLayoutPoint); |
177 if (!result.addNodeToListBasedTestResult(child->node(), localLayoutP
oint)) | 177 if (result.addNodeToListBasedTestResult(child->node(), localLayoutPo
int) == StopHitTesting) |
178 return true; | 178 return true; |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 // pointer-events=boundingBox makes it possible for containers to be direct
targets | 182 // pointer-events=boundingBox makes it possible for containers to be direct
targets |
183 if (style()->pointerEvents() == PE_BOUNDINGBOX) { | 183 if (style()->pointerEvents() == PE_BOUNDINGBOX) { |
184 ASSERT(isObjectBoundingBoxValid()); | 184 ASSERT(isObjectBoundingBoxValid()); |
185 if (objectBoundingBox().contains(localPoint)) { | 185 if (objectBoundingBox().contains(localPoint)) { |
186 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPoint)
; | 186 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPoint)
; |
187 updateHitTestResult(result, localLayoutPoint); | 187 updateHitTestResult(result, localLayoutPoint); |
188 if (!result.addNodeToListBasedTestResult(element(), localLayoutPoint
)) | 188 if (result.addNodeToListBasedTestResult(element(), localLayoutPoint)
== StopHitTesting) |
189 return true; | 189 return true; |
190 } | 190 } |
191 } | 191 } |
192 // 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." | 192 // 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." |
193 return false; | 193 return false; |
194 } | 194 } |
195 | 195 |
196 } // namespace blink | 196 } // namespace blink |
OLD | NEW |