OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 if (attrName == SVGNames::xAttr || attrName== SVGNames::yAttr | 68 if (attrName == SVGNames::xAttr || attrName== SVGNames::yAttr |
69 || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) | 69 || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) |
70 return true; | 70 return true; |
71 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); | 71 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); |
72 } | 72 } |
73 | 73 |
74 void SVGForeignObjectElement::collectStyleForPresentationAttribute(const Qualifi
edName& name, const AtomicString& value, MutableStylePropertySet* style) | 74 void SVGForeignObjectElement::collectStyleForPresentationAttribute(const Qualifi
edName& name, const AtomicString& value, MutableStylePropertySet* style) |
75 { | 75 { |
76 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute
(name); | 76 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute
(name); |
77 if (property == m_width) | 77 if (property == m_width) |
78 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyWidth
, *m_width->currentValue()); | 78 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, m_width
->currentValue()->asCSSPrimitiveValue()); |
79 else if (property == m_height) | 79 else if (property == m_height) |
80 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyHeigh
t, *m_height->currentValue()); | 80 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, m_heig
ht->currentValue()->asCSSPrimitiveValue()); |
81 else if (property == m_x) | 81 else if (property == m_x) |
82 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyX, *m
_x->currentValue()); | 82 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, m_x->curren
tValue()->asCSSPrimitiveValue()); |
83 else if (property == m_y) | 83 else if (property == m_y) |
84 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m
_y->currentValue()); | 84 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, m_y->curren
tValue()->asCSSPrimitiveValue()); |
85 else | 85 else |
86 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st
yle); | 86 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st
yle); |
87 } | 87 } |
88 | 88 |
89 void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName) | 89 void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName) |
90 { | 90 { |
91 bool isWidthHeightAttribute = attrName == SVGNames::widthAttr | 91 bool isWidthHeightAttribute = attrName == SVGNames::widthAttr |
92 || attrName == SVGNames::heightAttr; | 92 || attrName == SVGNames::heightAttr; |
93 bool isXYAttribute = attrName == SVGNames::xAttr || attrName == SVGNames::yA
ttr; | 93 bool isXYAttribute = attrName == SVGNames::xAttr || attrName == SVGNames::yA
ttr; |
94 | 94 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 bool SVGForeignObjectElement::selfHasRelativeLengths() const | 135 bool SVGForeignObjectElement::selfHasRelativeLengths() const |
136 { | 136 { |
137 return m_x->currentValue()->isRelative() | 137 return m_x->currentValue()->isRelative() |
138 || m_y->currentValue()->isRelative() | 138 || m_y->currentValue()->isRelative() |
139 || m_width->currentValue()->isRelative() | 139 || m_width->currentValue()->isRelative() |
140 || m_height->currentValue()->isRelative(); | 140 || m_height->currentValue()->isRelative(); |
141 } | 141 } |
142 | 142 |
143 } // namespace blink | 143 } // namespace blink |
OLD | NEW |