Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: Source/core/rendering/svg/RenderSVGContainer.cpp

Issue 45733010: Add pointer-events="bounding-box" for svg content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 if (!SVGRenderSupport::pointInClippingArea(this, localPoint)) 176 if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
177 return false; 177 return false;
178 178
179 for (RenderObject* child = lastChild(); child; child = child->previousSiblin g()) { 179 for (RenderObject* child = lastChild(); child; child = child->previousSiblin g()) {
180 if (child->nodeAtFloatPoint(request, result, localPoint, hitTestAction)) { 180 if (child->nodeAtFloatPoint(request, result, localPoint, hitTestAction)) {
181 updateHitTestResult(result, roundedLayoutPoint(localPoint)); 181 updateHitTestResult(result, roundedLayoutPoint(localPoint));
182 return true; 182 return true;
183 } 183 }
184 } 184 }
185 185
186 // Spec: Only graphical elements can be targeted by the mouse, period. 186 // Spec: Only graphical elements can be targeted by the mouse, period.
pdr. 2013/11/01 03:42:00 We should remove this comment now.
Erik Dahlström (inactive) 2013/11/29 16:30:48 Done.
187 // 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." 187 // 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."
pdr. 2013/11/01 03:42:00 Can you move this comment above "return false;"?
Erik Dahlström (inactive) 2013/11/29 16:30:48 Done.
188
189 // pointer-events=boundingBox makes it possible for containers to be direct targets
pdr. 2013/11/01 03:42:00 Can you add an assert here that the object boundin
Erik Dahlström (inactive) 2013/11/29 16:30:48 Done.
190 if (style()->pointerEvents() == PE_BOUNDINGBOX && objectBoundingBox().contai ns(localPoint)) {
191 updateHitTestResult(result, roundedLayoutPoint(localPoint));
192 return true;
193 }
194
188 return false; 195 return false;
189 } 196 }
190 197
191 } 198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698