| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 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 * | 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 bool SVGTests::handleAttributeChange(SVGElement* targetElement, const QualifiedN
ame& attrName) | 150 bool SVGTests::handleAttributeChange(SVGElement* targetElement, const QualifiedN
ame& attrName) |
| 151 { | 151 { |
| 152 ASSERT(targetElement); | 152 ASSERT(targetElement); |
| 153 if (!isKnownAttribute(attrName)) | 153 if (!isKnownAttribute(attrName)) |
| 154 return false; | 154 return false; |
| 155 if (!targetElement->inDocument()) | 155 if (!targetElement->inDocument()) |
| 156 return true; | 156 return true; |
| 157 | 157 |
| 158 bool valid = targetElement->isValid(); | 158 bool valid = targetElement->isValid(); |
| 159 bool attached = targetElement->attached(); | 159 if (valid && !targetElement->attached() && targetElement->parentNode()->atta
ched()) |
| 160 if (valid && !attached && targetElement->parentNode()->attached()) | 160 targetElement->lazyAttach(); |
| 161 targetElement->attach(); | 161 else if (!valid && targetElement->attached()) |
| 162 else if (!valid && attached) | |
| 163 targetElement->detach(); | 162 targetElement->detach(); |
| 164 | 163 |
| 165 return true; | 164 return true; |
| 166 } | 165 } |
| 167 | 166 |
| 168 void SVGTests::addSupportedAttributes(HashSet<QualifiedName>& supportedAttribute
s) | 167 void SVGTests::addSupportedAttributes(HashSet<QualifiedName>& supportedAttribute
s) |
| 169 { | 168 { |
| 170 supportedAttributes.add(SVGNames::requiredFeaturesAttr); | 169 supportedAttributes.add(SVGNames::requiredFeaturesAttr); |
| 171 supportedAttributes.add(SVGNames::requiredExtensionsAttr); | 170 supportedAttributes.add(SVGNames::requiredExtensionsAttr); |
| 172 supportedAttributes.add(SVGNames::systemLanguageAttr); | 171 supportedAttributes.add(SVGNames::systemLanguageAttr); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 return m_requiredExtensions.value; | 210 return m_requiredExtensions.value; |
| 212 } | 211 } |
| 213 | 212 |
| 214 SVGStringList& SVGTests::systemLanguage() | 213 SVGStringList& SVGTests::systemLanguage() |
| 215 { | 214 { |
| 216 m_systemLanguage.shouldSynchronize = true; | 215 m_systemLanguage.shouldSynchronize = true; |
| 217 return m_systemLanguage.value; | 216 return m_systemLanguage.value; |
| 218 } | 217 } |
| 219 | 218 |
| 220 } | 219 } |
| OLD | NEW |