| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 | 65 |
| 66 DEFINE_NODE_FACTORY(SVGForeignObjectElement) | 66 DEFINE_NODE_FACTORY(SVGForeignObjectElement) |
| 67 | 67 |
| 68 void SVGForeignObjectElement::collectStyleForPresentationAttribute( | 68 void SVGForeignObjectElement::collectStyleForPresentationAttribute( |
| 69 const QualifiedName& name, | 69 const QualifiedName& name, |
| 70 const AtomicString& value, | 70 const AtomicString& value, |
| 71 MutableStylePropertySet* style) { | 71 MutableStylePropertySet* style) { |
| 72 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); | 72 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); |
| 73 if (property == m_width) { | 73 if (property == m_width) { |
| 74 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, | 74 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(), |
| 75 m_width->cssValue()); | 75 m_width->cssValue()); |
| 76 } else if (property == m_height) { | 76 } else if (property == m_height) { |
| 77 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, | 77 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(), |
| 78 m_height->cssValue()); | 78 m_height->cssValue()); |
| 79 } else if (property == m_x) { | 79 } else if (property == m_x) { |
| 80 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, | 80 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(), |
| 81 m_x->cssValue()); | 81 m_x->cssValue()); |
| 82 } else if (property == m_y) { | 82 } else if (property == m_y) { |
| 83 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, | 83 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(), |
| 84 m_y->cssValue()); | 84 m_y->cssValue()); |
| 85 } else { | 85 } else { |
| 86 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, | 86 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, |
| 87 style); | 87 style); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 void SVGForeignObjectElement::svgAttributeChanged( | 91 void SVGForeignObjectElement::svgAttributeChanged( |
| 92 const QualifiedName& attrName) { | 92 const QualifiedName& attrName) { |
| 93 bool isWidthHeightAttribute = | 93 bool isWidthHeightAttribute = |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 140 } |
| 141 | 141 |
| 142 bool SVGForeignObjectElement::selfHasRelativeLengths() const { | 142 bool SVGForeignObjectElement::selfHasRelativeLengths() const { |
| 143 return m_x->currentValue()->isRelative() || | 143 return m_x->currentValue()->isRelative() || |
| 144 m_y->currentValue()->isRelative() || | 144 m_y->currentValue()->isRelative() || |
| 145 m_width->currentValue()->isRelative() || | 145 m_width->currentValue()->isRelative() || |
| 146 m_height->currentValue()->isRelative(); | 146 m_height->currentValue()->isRelative(); |
| 147 } | 147 } |
| 148 | 148 |
| 149 } // namespace blink | 149 } // namespace blink |
| OLD | NEW |