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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 m_strokeBoundingBox = calculateUpdatedStrokeBoundingBox(); | 46 m_strokeBoundingBox = calculateUpdatedStrokeBoundingBox(); |
47 if (element()) | 47 if (element()) |
48 element()->setNeedsResizeObserverUpdate(); | 48 element()->setNeedsResizeObserverUpdate(); |
49 } | 49 } |
50 | 50 |
51 FloatRect LayoutSVGPath::hitTestStrokeBoundingBox() const { | 51 FloatRect LayoutSVGPath::hitTestStrokeBoundingBox() const { |
52 const SVGComputedStyle& svgStyle = style()->svgStyle(); | 52 const SVGComputedStyle& svgStyle = style()->svgStyle(); |
53 if (svgStyle.hasStroke()) | 53 if (svgStyle.hasStroke()) |
54 return m_strokeBoundingBox; | 54 return m_strokeBoundingBox; |
55 | 55 |
56 // Implementation of http://dev.w3.org/fxtf/css-masking-1/#compute-stroke-boun
ding-box | 56 // Implementation of |
| 57 // http://dev.w3.org/fxtf/css-masking-1/#compute-stroke-bounding-box |
57 // except that we ignore whether the stroke is none. | 58 // except that we ignore whether the stroke is none. |
58 | 59 |
59 FloatRect box = m_fillBoundingBox; | 60 FloatRect box = m_fillBoundingBox; |
60 | 61 |
61 const float strokeWidth = this->strokeWidth(); | 62 const float strokeWidth = this->strokeWidth(); |
62 if (strokeWidth <= 0) | 63 if (strokeWidth <= 0) |
63 return box; | 64 return box; |
64 | 65 |
65 float delta = strokeWidth / 2; | 66 float delta = strokeWidth / 2; |
66 | 67 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 140 |
140 SVGMarkerData markerData( | 141 SVGMarkerData markerData( |
141 m_markerPositions, | 142 m_markerPositions, |
142 markerStart ? markerStart->orientType() == SVGMarkerOrientAutoStartReverse | 143 markerStart ? markerStart->orientType() == SVGMarkerOrientAutoStartReverse |
143 : false); | 144 : false); |
144 path().apply(&markerData, SVGMarkerData::updateFromPathElement); | 145 path().apply(&markerData, SVGMarkerData::updateFromPathElement); |
145 markerData.pathIsDone(); | 146 markerData.pathIsDone(); |
146 } | 147 } |
147 | 148 |
148 } // namespace blink | 149 } // namespace blink |
OLD | NEW |