| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |