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 * Copyright (C) 2005 Alexander Kellett <lypanov@kde.org> | 4 * Copyright (C) 2005 Alexander Kellett <lypanov@kde.org> |
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 | 88 |
89 DEFINE_NODE_FACTORY(SVGMaskElement) | 89 DEFINE_NODE_FACTORY(SVGMaskElement) |
90 | 90 |
91 void SVGMaskElement::collectStyleForPresentationAttribute( | 91 void SVGMaskElement::collectStyleForPresentationAttribute( |
92 const QualifiedName& name, | 92 const QualifiedName& name, |
93 const AtomicString& value, | 93 const AtomicString& value, |
94 MutableStylePropertySet* style) { | 94 MutableStylePropertySet* style) { |
95 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); | 95 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); |
96 if (property == m_x) { | 96 if (property == m_x) { |
97 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, | 97 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(), |
98 m_x->cssValue()); | 98 m_x->cssValue()); |
99 } else if (property == m_y) { | 99 } else if (property == m_y) { |
100 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, | 100 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(), |
101 m_y->cssValue()); | 101 m_y->cssValue()); |
102 } else if (property == m_width) { | 102 } else if (property == m_width) { |
103 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, | 103 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(), |
104 m_width->cssValue()); | 104 m_width->cssValue()); |
105 } else if (property == m_height) { | 105 } else if (property == m_height) { |
106 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, | 106 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(), |
107 m_height->cssValue()); | 107 m_height->cssValue()); |
108 } else { | 108 } else { |
109 SVGElement::collectStyleForPresentationAttribute(name, value, style); | 109 SVGElement::collectStyleForPresentationAttribute(name, value, style); |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName) { | 113 void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName) { |
114 bool isLengthAttr = | 114 bool isLengthAttr = |
115 attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || | 115 attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || |
116 attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr; | 116 attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 } | 154 } |
155 | 155 |
156 bool SVGMaskElement::selfHasRelativeLengths() const { | 156 bool SVGMaskElement::selfHasRelativeLengths() const { |
157 return m_x->currentValue()->isRelative() || | 157 return m_x->currentValue()->isRelative() || |
158 m_y->currentValue()->isRelative() || | 158 m_y->currentValue()->isRelative() || |
159 m_width->currentValue()->isRelative() || | 159 m_width->currentValue()->isRelative() || |
160 m_height->currentValue()->isRelative(); | 160 m_height->currentValue()->isRelative(); |
161 } | 161 } |
162 | 162 |
163 } // namespace blink | 163 } // namespace blink |
OLD | NEW |