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