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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 return 1; | 73 return 1; |
74 return toSVGPathElement(*element()).pathLengthScaleFactor(); | 74 return toSVGPathElement(*element()).pathLengthScaleFactor(); |
75 } | 75 } |
76 | 76 |
77 void LayoutSVGShape::updateShapeFromElement() | 77 void LayoutSVGShape::updateShapeFromElement() |
78 { | 78 { |
79 createPath(); | 79 createPath(); |
80 | 80 |
81 m_fillBoundingBox = calculateObjectBoundingBox(); | 81 m_fillBoundingBox = calculateObjectBoundingBox(); |
82 m_strokeBoundingBox = calculateStrokeBoundingBox(); | 82 m_strokeBoundingBox = calculateStrokeBoundingBox(); |
| 83 if (element()) |
| 84 element()->sizeMayHaveChanged(); |
83 } | 85 } |
84 | 86 |
85 FloatRect LayoutSVGShape::hitTestStrokeBoundingBox() const | 87 FloatRect LayoutSVGShape::hitTestStrokeBoundingBox() const |
86 { | 88 { |
87 if (style()->svgStyle().hasStroke()) | 89 if (style()->svgStyle().hasStroke()) |
88 return m_strokeBoundingBox; | 90 return m_strokeBoundingBox; |
89 | 91 |
90 // Implementation of http://dev.w3.org/fxtf/css-masking-1/#compute-stroke-bo
unding-box | 92 // Implementation of http://dev.w3.org/fxtf/css-masking-1/#compute-stroke-bo
unding-box |
91 // for the <rect> / <ellipse> / <circle> case except that we ignore whether | 93 // for the <rect> / <ellipse> / <circle> case except that we ignore whether |
92 // the stroke is none. | 94 // the stroke is none. |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } | 302 } |
301 | 303 |
302 LayoutSVGShapeRareData& LayoutSVGShape::ensureRareData() const | 304 LayoutSVGShapeRareData& LayoutSVGShape::ensureRareData() const |
303 { | 305 { |
304 if (!m_rareData) | 306 if (!m_rareData) |
305 m_rareData = wrapUnique(new LayoutSVGShapeRareData()); | 307 m_rareData = wrapUnique(new LayoutSVGShapeRareData()); |
306 return *m_rareData.get(); | 308 return *m_rareData.get(); |
307 } | 309 } |
308 | 310 |
309 } // namespace blink | 311 } // namespace blink |
OLD | NEW |