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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 { | 242 { |
243 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) | 243 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) |
244 return true; | 244 return true; |
245 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); | 245 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); |
246 } | 246 } |
247 | 247 |
248 void SVGSVGElement::collectStyleForPresentationAttribute(const QualifiedName& na
me, const AtomicString& value, MutableStylePropertySet* style) | 248 void SVGSVGElement::collectStyleForPresentationAttribute(const QualifiedName& na
me, const AtomicString& value, MutableStylePropertySet* style) |
249 { | 249 { |
250 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute
(name); | 250 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute
(name); |
251 if (property == m_x) { | 251 if (property == m_x) { |
252 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyX, *m
_x->currentValue()); | 252 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, m_x->curren
tValue()->asCSSPrimitiveValue()); |
253 } else if (property == m_y) { | 253 } else if (property == m_y) { |
254 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m
_y->currentValue()); | 254 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, m_y->curren
tValue()->asCSSPrimitiveValue()); |
255 } else if (isOutermostSVGSVGElement() && (property == m_width || property ==
m_height)) { | 255 } else if (isOutermostSVGSVGElement() && (property == m_width || property ==
m_height)) { |
256 if (property == m_width) | 256 if (property == m_width) |
257 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyW
idth, *m_width->currentValue()); | 257 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, m_w
idth->currentValue()->asCSSPrimitiveValue()); |
258 else if (property == m_height) | 258 else if (property == m_height) |
259 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyH
eight, *m_height->currentValue()); | 259 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, m_
height->currentValue()->asCSSPrimitiveValue()); |
260 } else { | 260 } else { |
261 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st
yle); | 261 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st
yle); |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) | 265 void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) |
266 { | 266 { |
267 bool updateRelativeLengthsOrViewBox = false; | 267 bool updateRelativeLengthsOrViewBox = false; |
268 bool widthChanged = attrName == SVGNames::widthAttr; | 268 bool widthChanged = attrName == SVGNames::widthAttr; |
269 bool heightChanged = attrName == SVGNames::heightAttr; | 269 bool heightChanged = attrName == SVGNames::heightAttr; |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 visitor->trace(m_width); | 769 visitor->trace(m_width); |
770 visitor->trace(m_height); | 770 visitor->trace(m_height); |
771 visitor->trace(m_translation); | 771 visitor->trace(m_translation); |
772 visitor->trace(m_timeContainer); | 772 visitor->trace(m_timeContainer); |
773 visitor->trace(m_viewSpec); | 773 visitor->trace(m_viewSpec); |
774 SVGGraphicsElement::trace(visitor); | 774 SVGGraphicsElement::trace(visitor); |
775 SVGFitToViewBox::trace(visitor); | 775 SVGFitToViewBox::trace(visitor); |
776 } | 776 } |
777 | 777 |
778 } // namespace blink | 778 } // namespace blink |
OLD | NEW |