OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google, Inc. | 2 * Copyright (C) 2012 Google, Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 return; | 67 return; |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 clearPath(); | 71 clearPath(); |
72 | 72 |
73 m_fillBoundingBox = FloatRect(m_center.x() - m_radii.width(), m_center.y() -
m_radii.height(), 2 * m_radii.width(), 2 * m_radii.height()); | 73 m_fillBoundingBox = FloatRect(m_center.x() - m_radii.width(), m_center.y() -
m_radii.height(), 2 * m_radii.width(), 2 * m_radii.height()); |
74 m_strokeBoundingBox = m_fillBoundingBox; | 74 m_strokeBoundingBox = m_fillBoundingBox; |
75 if (style()->svgStyle().hasStroke()) | 75 if (style()->svgStyle().hasStroke()) |
76 m_strokeBoundingBox.inflate(strokeWidth() / 2); | 76 m_strokeBoundingBox.inflate(strokeWidth() / 2); |
| 77 if (element()) |
| 78 element()->setNeedsResizeObserverUpdate(); |
77 } | 79 } |
78 | 80 |
79 void LayoutSVGEllipse::calculateRadiiAndCenter() | 81 void LayoutSVGEllipse::calculateRadiiAndCenter() |
80 { | 82 { |
81 ASSERT(element()); | 83 ASSERT(element()); |
82 SVGLengthContext lengthContext(element()); | 84 SVGLengthContext lengthContext(element()); |
83 m_center = FloatPoint( | 85 m_center = FloatPoint( |
84 lengthContext.valueForLength(style()->svgStyle().cx(), styleRef(), SVGLe
ngthMode::Width), | 86 lengthContext.valueForLength(style()->svgStyle().cx(), styleRef(), SVGLe
ngthMode::Width), |
85 lengthContext.valueForLength(style()->svgStyle().cy(), styleRef(), SVGLe
ngthMode::Height)); | 87 lengthContext.valueForLength(style()->svgStyle().cy(), styleRef(), SVGLe
ngthMode::Height)); |
86 | 88 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 return xrX * xrX + yrY * yrY <= 1.0; | 125 return xrX * xrX + yrY * yrY <= 1.0; |
124 } | 126 } |
125 | 127 |
126 bool LayoutSVGEllipse::hasContinuousStroke() const | 128 bool LayoutSVGEllipse::hasContinuousStroke() const |
127 { | 129 { |
128 const SVGComputedStyle& svgStyle = style()->svgStyle(); | 130 const SVGComputedStyle& svgStyle = style()->svgStyle(); |
129 return svgStyle.strokeDashArray()->isEmpty(); | 131 return svgStyle.strokeDashArray()->isEmpty(); |
130 } | 132 } |
131 | 133 |
132 } // namespace blink | 134 } // namespace blink |
OLD | NEW |