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(); | |
79 } | 77 } |
80 | 78 |
81 void LayoutSVGEllipse::calculateRadiiAndCenter() | 79 void LayoutSVGEllipse::calculateRadiiAndCenter() |
82 { | 80 { |
83 ASSERT(element()); | 81 ASSERT(element()); |
84 SVGLengthContext lengthContext(element()); | 82 SVGLengthContext lengthContext(element()); |
85 m_center = FloatPoint( | 83 m_center = FloatPoint( |
86 lengthContext.valueForLength(style()->svgStyle().cx(), styleRef(), SVGLe
ngthMode::Width), | 84 lengthContext.valueForLength(style()->svgStyle().cx(), styleRef(), SVGLe
ngthMode::Width), |
87 lengthContext.valueForLength(style()->svgStyle().cy(), styleRef(), SVGLe
ngthMode::Height)); | 85 lengthContext.valueForLength(style()->svgStyle().cy(), styleRef(), SVGLe
ngthMode::Height)); |
88 | 86 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 return xrX * xrX + yrY * yrY <= 1.0; | 123 return xrX * xrX + yrY * yrY <= 1.0; |
126 } | 124 } |
127 | 125 |
128 bool LayoutSVGEllipse::hasContinuousStroke() const | 126 bool LayoutSVGEllipse::hasContinuousStroke() const |
129 { | 127 { |
130 const SVGComputedStyle& svgStyle = style()->svgStyle(); | 128 const SVGComputedStyle& svgStyle = style()->svgStyle(); |
131 return svgStyle.strokeDashArray()->isEmpty(); | 129 return svgStyle.strokeDashArray()->isEmpty(); |
132 } | 130 } |
133 | 131 |
134 } // namespace blink | 132 } // namespace blink |
OLD | NEW |