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

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

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, 11 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 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2006 Apple Computer, Inc 5 * Copyright (C) 2006 Apple Computer, Inc
6 * Copyright (C) 2009 Google, Inc. 6 * Copyright (C) 2009 Google, Inc.
7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org>
8 * Copyright (C) 2011 University of Szeged 8 * Copyright (C) 2011 University of Szeged
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 virtual const Vector<MarkerPosition>* markerPositions() const { return 0; } 73 virtual const Vector<MarkerPosition>* markerPositions() const { return 0; }
74 74
75 float strokeWidth() const; 75 float strokeWidth() const;
76 76
77 virtual ShapeGeometryCodePath geometryCodePath() const { return PathGeometry ; } 77 virtual ShapeGeometryCodePath geometryCodePath() const { return PathGeometry ; }
78 virtual const Vector<FloatPoint>* zeroLengthLineCaps() const { return 0; } 78 virtual const Vector<FloatPoint>* zeroLengthLineCaps() const { return 0; }
79 79
80 virtual FloatRect objectBoundingBox() const override final { return m_fillBo undingBox; } 80 virtual FloatRect objectBoundingBox() const override final { return m_fillBo undingBox; }
81 81
82 protected: 82 protected:
83 void clearPath() { m_path.clear(); }
84
83 virtual void updateShapeFromElement(); 85 virtual void updateShapeFromElement();
84 virtual bool shapeDependentStrokeContains(const FloatPoint&); 86 virtual bool shapeDependentStrokeContains(const FloatPoint&);
85 virtual bool shapeDependentFillContains(const FloatPoint&, const WindRule) c onst; 87 virtual bool shapeDependentFillContains(const FloatPoint&, const WindRule) c onst;
86 88
87 // Give RenderSVGPath a hook for updating markers in updateShapeFromElement. 89 // Give RenderSVGPath a hook for updating markers in updateShapeFromElement.
88 virtual void processMarkerPositions() { }; 90 virtual void processMarkerPositions() { };
89 91
90 FloatRect m_fillBoundingBox; 92 FloatRect m_fillBoundingBox;
91 FloatRect m_strokeBoundingBox; 93 FloatRect m_strokeBoundingBox;
92 FloatRect m_hitTestStrokeBoundingBox; 94 FloatRect m_hitTestStrokeBoundingBox;
(...skipping 28 matching lines...) Expand all
121 bool m_needsBoundariesUpdate : 1; 123 bool m_needsBoundariesUpdate : 1;
122 bool m_needsShapeUpdate : 1; 124 bool m_needsShapeUpdate : 1;
123 bool m_needsTransformUpdate : 1; 125 bool m_needsTransformUpdate : 1;
124 }; 126 };
125 127
126 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape()); 128 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape());
127 129
128 } 130 }
129 131
130 #endif 132 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGEllipse.cpp ('k') | Source/core/rendering/svg/RenderSVGShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698