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

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

Issue 2491703004: Replace roundedLayoutPoint with LayoutPoint (Closed)
Patch Set: Created 4 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) 2006 Alexander Kellett <lypanov@kde.org> 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org>
6 * Copyright (C) 2009 Google, Inc. 6 * Copyright (C) 2009 Google, Inc.
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 style()->pointerEvents()); 166 style()->pointerEvents());
167 bool isVisible = (style()->visibility() == EVisibility::Visible); 167 bool isVisible = (style()->visibility() == EVisibility::Visible);
168 if (isVisible || !hitRules.requireVisible) { 168 if (isVisible || !hitRules.requireVisible) {
169 FloatPoint localPoint; 169 FloatPoint localPoint;
170 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping( 170 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(
171 *this, localToSVGParentTransform(), pointInParent, localPoint)) 171 *this, localToSVGParentTransform(), pointInParent, localPoint))
172 return false; 172 return false;
173 173
174 if (hitRules.canHitFill || hitRules.canHitBoundingBox) { 174 if (hitRules.canHitFill || hitRules.canHitBoundingBox) {
175 if (m_objectBoundingBox.contains(localPoint)) { 175 if (m_objectBoundingBox.contains(localPoint)) {
176 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPoint); 176 const LayoutPoint& localLayoutPoint = LayoutPoint(localPoint);
177 updateHitTestResult(result, localLayoutPoint); 177 updateHitTestResult(result, localLayoutPoint);
178 if (result.addNodeToListBasedTestResult(element(), localLayoutPoint) == 178 if (result.addNodeToListBasedTestResult(element(), localLayoutPoint) ==
179 StopHitTesting) 179 StopHitTesting)
180 return true; 180 return true;
181 } 181 }
182 } 182 }
183 } 183 }
184 184
185 return false; 185 return false;
186 } 186 }
(...skipping 15 matching lines...) Expand all
202 202
203 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, 203 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects,
204 const LayoutPoint&, 204 const LayoutPoint&,
205 IncludeBlockVisualOverflowOrNot) const { 205 IncludeBlockVisualOverflowOrNot) const {
206 // this is called from paint() after the localTransform has already been 206 // this is called from paint() after the localTransform has already been
207 // applied 207 // applied
208 rects.append(LayoutRect(visualRectInLocalSVGCoordinates())); 208 rects.append(LayoutRect(visualRectInLocalSVGCoordinates()));
209 } 209 }
210 210
211 } // namespace blink 211 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698