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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr | 82 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr |
83 || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) | 83 || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) |
84 return true; | 84 return true; |
85 return SVGElement::isPresentationAttributeWithSVGDOM(attrName); | 85 return SVGElement::isPresentationAttributeWithSVGDOM(attrName); |
86 } | 86 } |
87 | 87 |
88 void SVGMaskElement::collectStyleForPresentationAttribute(const QualifiedName& n
ame, const AtomicString& value, MutableStylePropertySet* style) | 88 void SVGMaskElement::collectStyleForPresentationAttribute(const QualifiedName& n
ame, const AtomicString& value, MutableStylePropertySet* style) |
89 { | 89 { |
90 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute
(name); | 90 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute
(name); |
91 if (property == m_x) | 91 if (property == m_x) |
92 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyX, *m
_x->currentValue()); | 92 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, m_x->curren
tValue()->asCSSPrimitiveValue()); |
93 else if (property == m_y) | 93 else if (property == m_y) |
94 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m
_y->currentValue()); | 94 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, m_y->curren
tValue()->asCSSPrimitiveValue()); |
95 else if (property == m_width) | 95 else if (property == m_width) |
96 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyWidth
, *m_width->currentValue()); | 96 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, m_width
->currentValue()->asCSSPrimitiveValue()); |
97 else if (property == m_height) | 97 else if (property == m_height) |
98 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyHeigh
t, *m_height->currentValue()); | 98 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, m_heig
ht->currentValue()->asCSSPrimitiveValue()); |
99 else | 99 else |
100 SVGElement::collectStyleForPresentationAttribute(name, value, style); | 100 SVGElement::collectStyleForPresentationAttribute(name, value, style); |
101 } | 101 } |
102 | 102 |
103 void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName) | 103 void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName) |
104 { | 104 { |
105 bool isLengthAttr = attrName == SVGNames::xAttr | 105 bool isLengthAttr = attrName == SVGNames::xAttr |
106 || attrName == SVGNames::yAttr | 106 || attrName == SVGNames::yAttr |
107 || attrName == SVGNames::widthAttr | 107 || attrName == SVGNames::widthAttr |
108 || attrName == SVGNames::heightAttr; | 108 || attrName == SVGNames::heightAttr; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 bool SVGMaskElement::selfHasRelativeLengths() const | 149 bool SVGMaskElement::selfHasRelativeLengths() const |
150 { | 150 { |
151 return m_x->currentValue()->isRelative() | 151 return m_x->currentValue()->isRelative() |
152 || m_y->currentValue()->isRelative() | 152 || m_y->currentValue()->isRelative() |
153 || m_width->currentValue()->isRelative() | 153 || m_width->currentValue()->isRelative() |
154 || m_height->currentValue()->isRelative(); | 154 || m_height->currentValue()->isRelative(); |
155 } | 155 } |
156 | 156 |
157 } // namespace blink | 157 } // namespace blink |
OLD | NEW |