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

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

Issue 411613002: [SVG] Reject hit-test queries when the element has a singular transform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months 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 | Annotate | Revision Log
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, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> 8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> 9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org>
10 * Copyright (C) 2011 University of Szeged 10 * Copyright (C) 2011 University of Szeged
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 if (!rect.isEmpty()) 295 if (!rect.isEmpty())
296 rects.append(rect); 296 rects.append(rect);
297 } 297 }
298 298
299 bool RenderSVGShape::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu lt& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) 299 bool RenderSVGShape::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu lt& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
300 { 300 {
301 // We only draw in the foreground phase, so we only hit-test then. 301 // We only draw in the foreground phase, so we only hit-test then.
302 if (hitTestAction != HitTestForeground) 302 if (hitTestAction != HitTestForeground)
303 return false; 303 return false;
304 304
305 FloatPoint localPoint = m_localTransform.inverse().mapPoint(pointInParent); 305 FloatPoint localPoint;
306 306 if (!SVGRenderSupport::transformToUserSpaceAndCheckClipping(this, m_localTra nsform, pointInParent, localPoint))
307 if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
308 return false; 307 return false;
309 308
310 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_GEOMETRY_HITTESTIN G, request, style()->pointerEvents()); 309 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_GEOMETRY_HITTESTIN G, request, style()->pointerEvents());
311 if (nodeAtFloatPointInternal(request, localPoint, hitRules)) { 310 if (nodeAtFloatPointInternal(request, localPoint, hitRules)) {
312 updateHitTestResult(result, roundedLayoutPoint(localPoint)); 311 updateHitTestResult(result, roundedLayoutPoint(localPoint));
313 return true; 312 return true;
314 } 313 }
315 314
316 return false; 315 return false;
317 } 316 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 return; 452 return;
454 453
455 ASSERT(m_path); 454 ASSERT(m_path);
456 455
457 SVGMarkerData markerData(m_markerPositions); 456 SVGMarkerData markerData(m_markerPositions);
458 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); 457 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement);
459 markerData.pathIsDone(); 458 markerData.pathIsDone();
460 } 459 }
461 460
462 } 461 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGRoot.cpp ('k') | Source/core/rendering/svg/RenderSVGText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698