OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 rx * 2, ry * 2)); | 88 rx * 2, ry * 2)); |
89 | 89 |
90 return path; | 90 return path; |
91 } | 91 } |
92 | 92 |
93 void SVGEllipseElement::collectStyleForPresentationAttribute( | 93 void SVGEllipseElement::collectStyleForPresentationAttribute( |
94 const QualifiedName& name, | 94 const QualifiedName& name, |
95 const AtomicString& value, | 95 const AtomicString& value, |
96 MutableStylePropertySet* style) { | 96 MutableStylePropertySet* style) { |
97 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); | 97 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); |
98 if (property == m_cx) | 98 if (property == m_cx) { |
99 addPropertyToPresentationAttributeStyle( | 99 addPropertyToPresentationAttributeStyle(style, CSSPropertyCx, |
100 style, CSSPropertyCx, m_cx->currentValue()->asCSSPrimitiveValue()); | 100 m_cx->cssValue()); |
101 else if (property == m_cy) | 101 } else if (property == m_cy) { |
102 addPropertyToPresentationAttributeStyle( | 102 addPropertyToPresentationAttributeStyle(style, CSSPropertyCy, |
103 style, CSSPropertyCy, m_cy->currentValue()->asCSSPrimitiveValue()); | 103 m_cy->cssValue()); |
104 else if (property == m_rx) | 104 } else if (property == m_rx) { |
105 addPropertyToPresentationAttributeStyle( | 105 addPropertyToPresentationAttributeStyle(style, CSSPropertyRx, |
106 style, CSSPropertyRx, m_rx->currentValue()->asCSSPrimitiveValue()); | 106 m_rx->cssValue()); |
107 else if (property == m_ry) | 107 } else if (property == m_ry) { |
108 addPropertyToPresentationAttributeStyle( | 108 addPropertyToPresentationAttributeStyle(style, CSSPropertyRy, |
109 style, CSSPropertyRy, m_ry->currentValue()->asCSSPrimitiveValue()); | 109 m_ry->cssValue()); |
110 else | 110 } else { |
111 SVGGeometryElement::collectStyleForPresentationAttribute(name, value, | 111 SVGGeometryElement::collectStyleForPresentationAttribute(name, value, |
112 style); | 112 style); |
| 113 } |
113 } | 114 } |
114 | 115 |
115 void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) { | 116 void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) { |
116 if (attrName == SVGNames::cxAttr || attrName == SVGNames::cyAttr || | 117 if (attrName == SVGNames::cxAttr || attrName == SVGNames::cyAttr || |
117 attrName == SVGNames::rxAttr || attrName == SVGNames::ryAttr) { | 118 attrName == SVGNames::rxAttr || attrName == SVGNames::ryAttr) { |
118 SVGElement::InvalidationGuard invalidationGuard(this); | 119 SVGElement::InvalidationGuard invalidationGuard(this); |
119 | 120 |
120 invalidateSVGPresentationAttributeStyle(); | 121 invalidateSVGPresentationAttributeStyle(); |
121 setNeedsStyleRecalc(LocalStyleChange, | 122 setNeedsStyleRecalc(LocalStyleChange, |
122 StyleChangeReasonForTracing::fromAttribute(attrName)); | 123 StyleChangeReasonForTracing::fromAttribute(attrName)); |
(...skipping 16 matching lines...) Expand all Loading... |
139 m_cy->currentValue()->isRelative() || | 140 m_cy->currentValue()->isRelative() || |
140 m_rx->currentValue()->isRelative() || | 141 m_rx->currentValue()->isRelative() || |
141 m_ry->currentValue()->isRelative(); | 142 m_ry->currentValue()->isRelative(); |
142 } | 143 } |
143 | 144 |
144 LayoutObject* SVGEllipseElement::createLayoutObject(const ComputedStyle&) { | 145 LayoutObject* SVGEllipseElement::createLayoutObject(const ComputedStyle&) { |
145 return new LayoutSVGEllipse(this); | 146 return new LayoutSVGEllipse(this); |
146 } | 147 } |
147 | 148 |
148 } // namespace blink | 149 } // namespace blink |
OLD | NEW |