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

Side by Side Diff: Source/core/layout/svg/LayoutSVGPath.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 return strokeBoundingBox; 72 return strokeBoundingBox;
73 } 73 }
74 74
75 bool LayoutSVGPath::shapeDependentStrokeContains(const FloatPoint& point) 75 bool LayoutSVGPath::shapeDependentStrokeContains(const FloatPoint& point)
76 { 76 {
77 if (LayoutSVGShape::shapeDependentStrokeContains(point)) 77 if (LayoutSVGShape::shapeDependentStrokeContains(point))
78 return true; 78 return true;
79 79
80 const SVGLayoutStyle& svgStyle = style()->svgStyle(); 80 const SVGComputedStyle& svgStyle = style()->svgStyle();
81 for (size_t i = 0; i < m_zeroLengthLinecapLocations.size(); ++i) { 81 for (size_t i = 0; i < m_zeroLengthLinecapLocations.size(); ++i) {
82 ASSERT(svgStyle.hasStroke()); 82 ASSERT(svgStyle.hasStroke());
83 float strokeWidth = this->strokeWidth(); 83 float strokeWidth = this->strokeWidth();
84 if (svgStyle.capStyle() == SquareCap) { 84 if (svgStyle.capStyle() == SquareCap) {
85 if (zeroLengthSubpathRect(m_zeroLengthLinecapLocations[i], strokeWid th).contains(point)) 85 if (zeroLengthSubpathRect(m_zeroLengthLinecapLocations[i], strokeWid th).contains(point))
86 return true; 86 return true;
87 } else { 87 } else {
88 ASSERT(svgStyle.capStyle() == RoundCap); 88 ASSERT(svgStyle.capStyle() == RoundCap);
89 FloatPoint radiusVector(point.x() - m_zeroLengthLinecapLocations[i]. x(), point.y() - m_zeroLengthLinecapLocations[i].y()); 89 FloatPoint radiusVector(point.x() - m_zeroLengthLinecapLocations[i]. x(), point.y() - m_zeroLengthLinecapLocations[i].y());
90 if (radiusVector.lengthSquared() < strokeWidth * strokeWidth * .25f) 90 if (radiusVector.lengthSquared() < strokeWidth * strokeWidth * .25f)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 ASSERT(resources); 165 ASSERT(resources);
166 166
167 LayoutSVGResourceMarker* markerStart = resources->markerStart(); 167 LayoutSVGResourceMarker* markerStart = resources->markerStart();
168 168
169 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien tType() == SVGMarkerOrientAutoStartReverse : false); 169 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien tType() == SVGMarkerOrientAutoStartReverse : false);
170 path().apply(&markerData, SVGMarkerData::updateFromPathElement); 170 path().apply(&markerData, SVGMarkerData::updateFromPathElement);
171 markerData.pathIsDone(); 171 markerData.pathIsDone();
172 } 172 }
173 173
174 } 174 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGModelObject.cpp ('k') | Source/core/layout/svg/LayoutSVGRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698