OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2014 Google, Inc. | 5 * Copyright (C) 2014 Google, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 return false; | 231 return false; |
232 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); | 232 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); |
233 } | 233 } |
234 | 234 |
235 void SVGSVGElement::collectStyleForPresentationAttribute( | 235 void SVGSVGElement::collectStyleForPresentationAttribute( |
236 const QualifiedName& name, | 236 const QualifiedName& name, |
237 const AtomicString& value, | 237 const AtomicString& value, |
238 MutableStylePropertySet* style) { | 238 MutableStylePropertySet* style) { |
239 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); | 239 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); |
240 if (property == m_x) { | 240 if (property == m_x) { |
241 addPropertyToPresentationAttributeStyle( | 241 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, |
242 style, CSSPropertyX, m_x->currentValue()->asCSSPrimitiveValue()); | 242 m_x->cssValue()); |
243 } else if (property == m_y) { | 243 } else if (property == m_y) { |
244 addPropertyToPresentationAttributeStyle( | 244 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, |
245 style, CSSPropertyY, m_y->currentValue()->asCSSPrimitiveValue()); | 245 m_y->cssValue()); |
246 } else if (isOutermostSVGSVGElement() && | 246 } else if (isOutermostSVGSVGElement() && |
247 (property == m_width || property == m_height)) { | 247 (property == m_width || property == m_height)) { |
248 if (property == m_width) | 248 if (property == m_width) { |
249 addPropertyToPresentationAttributeStyle( | 249 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, |
250 style, CSSPropertyWidth, | 250 m_width->cssValue()); |
251 m_width->currentValue()->asCSSPrimitiveValue()); | 251 } else if (property == m_height) { |
252 else if (property == m_height) | 252 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, |
253 addPropertyToPresentationAttributeStyle( | 253 m_height->cssValue()); |
254 style, CSSPropertyHeight, | 254 } |
255 m_height->currentValue()->asCSSPrimitiveValue()); | |
256 } else { | 255 } else { |
257 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, | 256 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, |
258 style); | 257 style); |
259 } | 258 } |
260 } | 259 } |
261 | 260 |
262 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) { | 261 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) { |
263 bool updateRelativeLengthsOrViewBox = false; | 262 bool updateRelativeLengthsOrViewBox = false; |
264 bool widthOrHeightChanged = | 263 bool widthOrHeightChanged = |
265 attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr; | 264 attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr; |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 visitor->trace(m_width); | 789 visitor->trace(m_width); |
791 visitor->trace(m_height); | 790 visitor->trace(m_height); |
792 visitor->trace(m_translation); | 791 visitor->trace(m_translation); |
793 visitor->trace(m_timeContainer); | 792 visitor->trace(m_timeContainer); |
794 visitor->trace(m_viewSpec); | 793 visitor->trace(m_viewSpec); |
795 SVGGraphicsElement::trace(visitor); | 794 SVGGraphicsElement::trace(visitor); |
796 SVGFitToViewBox::trace(visitor); | 795 SVGFitToViewBox::trace(visitor); |
797 } | 796 } |
798 | 797 |
799 } // namespace blink | 798 } // namespace blink |
OLD | NEW |