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

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

Issue 661643005: Pass more const RenderObject& in the vicinity of paint-servers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: const RenderObject& Created 6 years, 2 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
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 { 105 {
106 return path().contains(point, fillRule); 106 return path().contains(point, fillRule);
107 } 107 }
108 108
109 bool RenderSVGShape::fillContains(const FloatPoint& point, bool requiresFill, co nst WindRule fillRule) 109 bool RenderSVGShape::fillContains(const FloatPoint& point, bool requiresFill, co nst WindRule fillRule)
110 { 110 {
111 if (!m_fillBoundingBox.contains(point)) 111 if (!m_fillBoundingBox.contains(point))
112 return false; 112 return false;
113 113
114 bool hasFallback; 114 bool hasFallback;
115 if (requiresFill && !RenderSVGResource::requestPaintingResource(ApplyToFillM ode, this, style(), hasFallback)) 115 if (requiresFill && !RenderSVGResource::requestPaintingResource(ApplyToFillM ode, *this, style(), hasFallback))
116 return false; 116 return false;
117 117
118 return shapeDependentFillContains(point, fillRule); 118 return shapeDependentFillContains(point, fillRule);
119 } 119 }
120 120
121 bool RenderSVGShape::strokeContains(const FloatPoint& point, bool requiresStroke ) 121 bool RenderSVGShape::strokeContains(const FloatPoint& point, bool requiresStroke )
122 { 122 {
123 if (!strokeBoundingBox().contains(point)) 123 if (!strokeBoundingBox().contains(point))
124 return false; 124 return false;
125 125
126 bool hasFallback; 126 bool hasFallback;
127 if (requiresStroke && !RenderSVGResource::requestPaintingResource(ApplyToStr okeMode, this, style(), hasFallback)) 127 if (requiresStroke && !RenderSVGResource::requestPaintingResource(ApplyToStr okeMode, *this, style(), hasFallback))
128 return false; 128 return false;
129 129
130 return shapeDependentStrokeContains(point); 130 return shapeDependentStrokeContains(point);
131 } 131 }
132 132
133 void RenderSVGShape::layout() 133 void RenderSVGShape::layout()
134 { 134 {
135 bool updateCachedBoundariesInParents = false; 135 bool updateCachedBoundariesInParents = false;
136 136
137 if (m_needsShapeUpdate || m_needsBoundariesUpdate) { 137 if (m_needsShapeUpdate || m_needsBoundariesUpdate) {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 ASSERT(resources); 437 ASSERT(resources);
438 438
439 RenderSVGResourceMarker* markerStart = resources->markerStart(); 439 RenderSVGResourceMarker* markerStart = resources->markerStart();
440 440
441 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien tType() == SVGMarkerOrientAutoStartReverse : false); 441 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien tType() == SVGMarkerOrientAutoStartReverse : false);
442 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); 442 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement);
443 markerData.pathIsDone(); 443 markerData.pathIsDone();
444 } 444 }
445 445
446 } 446 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp ('k') | Source/core/rendering/svg/SVGRenderTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698