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

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

Issue 492053002: Use LayoutRect during addFocusRingRects to avoid loss of precision (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline (pixel tests about focus rings. 1-pixel width diff at the edge because of different rounding) Created 6 years, 3 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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGShape.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 281 }
282 } 282 }
283 } 283 }
284 284
285 if (style()->outlineWidth()) 285 if (style()->outlineWidth())
286 paintOutline(childPaintInfo, IntRect(boundingBox)); 286 paintOutline(childPaintInfo, IntRect(boundingBox));
287 } 287 }
288 288
289 // This method is called from inside paintOutline() since we call paintOutline() 289 // This method is called from inside paintOutline() since we call paintOutline()
290 // while transformed to our coord system, return local coords 290 // while transformed to our coord system, return local coords
291 void RenderSVGShape::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint &, const RenderLayerModelObject*) const 291 void RenderSVGShape::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPo int&, const RenderLayerModelObject*) const
292 { 292 {
293 IntRect rect = enclosingIntRect(paintInvalidationRectInLocalCoordinates()); 293 LayoutRect rect = LayoutRect(paintInvalidationRectInLocalCoordinates());
294 if (!rect.isEmpty()) 294 if (!rect.isEmpty())
295 rects.append(rect); 295 rects.append(rect);
296 } 296 }
297 297
298 bool RenderSVGShape::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu lt& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) 298 bool RenderSVGShape::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu lt& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
299 { 299 {
300 // We only draw in the foreground phase, so we only hit-test then. 300 // We only draw in the foreground phase, so we only hit-test then.
301 if (hitTestAction != HitTestForeground) 301 if (hitTestAction != HitTestForeground)
302 return false; 302 return false;
303 303
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 return; 451 return;
452 452
453 ASSERT(m_path); 453 ASSERT(m_path);
454 454
455 SVGMarkerData markerData(m_markerPositions); 455 SVGMarkerData markerData(m_markerPositions);
456 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); 456 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement);
457 markerData.pathIsDone(); 457 markerData.pathIsDone();
458 } 458 }
459 459
460 } 460 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGShape.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698