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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp

Issue 2265113002: More const LayoutObject references in SVGLayoutSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates())); 229 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates()));
230 } 230 }
231 231
232 bool LayoutSVGShape::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& p ointInParent, HitTestAction hitTestAction) 232 bool LayoutSVGShape::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& p ointInParent, HitTestAction hitTestAction)
233 { 233 {
234 // We only draw in the foreground phase, so we only hit-test then. 234 // We only draw in the foreground phase, so we only hit-test then.
235 if (hitTestAction != HitTestForeground) 235 if (hitTestAction != HitTestForeground)
236 return false; 236 return false;
237 237
238 FloatPoint localPoint; 238 FloatPoint localPoint;
239 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToSVG ParentTransform(), pointInParent, localPoint)) 239 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(*this, localToSV GParentTransform(), pointInParent, localPoint))
240 return false; 240 return false;
241 241
242 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_GEOMETRY_HITTESTIN G, result.hitTestRequest(), style()->pointerEvents()); 242 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_GEOMETRY_HITTESTIN G, result.hitTestRequest(), style()->pointerEvents());
243 if (nodeAtFloatPointInternal(result.hitTestRequest(), localPoint, hitRules)) { 243 if (nodeAtFloatPointInternal(result.hitTestRequest(), localPoint, hitRules)) {
244 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPoint); 244 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPoint);
245 updateHitTestResult(result, localLayoutPoint); 245 updateHitTestResult(result, localLayoutPoint);
246 if (result.addNodeToListBasedTestResult(element(), localLayoutPoint) == StopHitTesting) 246 if (result.addNodeToListBasedTestResult(element(), localLayoutPoint) == StopHitTesting)
247 return true; 247 return true;
248 } 248 }
249 249
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 302 }
303 303
304 LayoutSVGShapeRareData& LayoutSVGShape::ensureRareData() const 304 LayoutSVGShapeRareData& LayoutSVGShape::ensureRareData() const
305 { 305 {
306 if (!m_rareData) 306 if (!m_rareData)
307 m_rareData = wrapUnique(new LayoutSVGShapeRareData()); 307 m_rareData = wrapUnique(new LayoutSVGShapeRareData());
308 return *m_rareData.get(); 308 return *m_rareData.get();
309 } 309 }
310 310
311 } // namespace blink 311 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698