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

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

Issue 877553002: Fix ellipse hit testing in the non-circle case (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Lazily create the path Created 5 years, 10 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
« 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 , m_needsTransformUpdate(true) // Default is true, so we grab a AffineTransf orm object once from SVGGraphicsElement. 49 , m_needsTransformUpdate(true) // Default is true, so we grab a AffineTransf orm object once from SVGGraphicsElement.
50 { 50 {
51 } 51 }
52 52
53 RenderSVGShape::~RenderSVGShape() 53 RenderSVGShape::~RenderSVGShape()
54 { 54 {
55 } 55 }
56 56
57 void RenderSVGShape::updateShapeFromElement() 57 void RenderSVGShape::updateShapeFromElement()
58 { 58 {
59 m_path.clear(); 59 clearPath();
60 m_path = adoptPtr(new Path); 60 m_path = adoptPtr(new Path);
61 ASSERT(RenderSVGShape::isShapeEmpty()); 61 ASSERT(RenderSVGShape::isShapeEmpty());
62 62
63 updatePathFromGraphicsElement(toSVGGraphicsElement(element()), path()); 63 updatePathFromGraphicsElement(toSVGGraphicsElement(element()), path());
64 processMarkerPositions(); 64 processMarkerPositions();
65 65
66 m_fillBoundingBox = calculateObjectBoundingBox(); 66 m_fillBoundingBox = calculateObjectBoundingBox();
67 m_hitTestStrokeBoundingBox = calculateHitTestStrokeBoundingBox(); 67 m_hitTestStrokeBoundingBox = calculateHitTestStrokeBoundingBox();
68 m_strokeBoundingBox = style()->svgStyle().hasStroke() ? m_hitTestStrokeBound ingBox : m_fillBoundingBox; 68 m_strokeBoundingBox = style()->svgStyle().hasStroke() ? m_hitTestStrokeBound ingBox : m_fillBoundingBox;
69 } 69 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 SVGRenderSupport::intersectPaintInvalidationRectWithResources(this, m_paintI nvalidationBoundingBox); 257 SVGRenderSupport::intersectPaintInvalidationRectWithResources(this, m_paintI nvalidationBoundingBox);
258 } 258 }
259 259
260 float RenderSVGShape::strokeWidth() const 260 float RenderSVGShape::strokeWidth() const
261 { 261 {
262 SVGLengthContext lengthContext(element()); 262 SVGLengthContext lengthContext(element());
263 return style()->svgStyle().strokeWidth()->value(lengthContext); 263 return style()->svgStyle().strokeWidth()->value(lengthContext);
264 } 264 }
265 265
266 } 266 }
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