Chromium Code Reviews| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 | 150 |
| 151 bool SVGTests::handleAttributeChange(SVGElement* targetElement, const QualifiedN ame& attrName) | 151 bool SVGTests::handleAttributeChange(SVGElement* targetElement, const QualifiedN ame& attrName) |
| 152 { | 152 { |
| 153 ASSERT(targetElement); | 153 ASSERT(targetElement); |
| 154 if (!isKnownAttribute(attrName)) | 154 if (!isKnownAttribute(attrName)) |
| 155 return false; | 155 return false; |
| 156 if (!targetElement->inDocument()) | 156 if (!targetElement->inDocument()) |
| 157 return true; | 157 return true; |
| 158 | 158 |
| 159 bool valid = targetElement->isValid(); | 159 bool valid = targetElement->isValid(); |
| 160 bool attached = targetElement->attached(); | 160 if (valid && !targetElement->attached()) |
|
pdr.
2013/05/18 03:37:59
You removed the parentNode check here which was ad
| |
| 161 if (valid && !attached && targetElement->parentNode()->attached()) | 161 targetElement->lazyAttach(); |
| 162 targetElement->attach(); | 162 else if (!valid && targetElement->attached()) |
| 163 else if (!valid && attached) | |
| 164 targetElement->detach(); | 163 targetElement->detach(); |
| 165 | 164 |
| 166 return true; | 165 return true; |
| 167 } | 166 } |
| 168 | 167 |
| 169 void SVGTests::addSupportedAttributes(HashSet<QualifiedName>& supportedAttribute s) | 168 void SVGTests::addSupportedAttributes(HashSet<QualifiedName>& supportedAttribute s) |
| 170 { | 169 { |
| 171 supportedAttributes.add(SVGNames::requiredFeaturesAttr); | 170 supportedAttributes.add(SVGNames::requiredFeaturesAttr); |
| 172 supportedAttributes.add(SVGNames::requiredExtensionsAttr); | 171 supportedAttributes.add(SVGNames::requiredExtensionsAttr); |
| 173 supportedAttributes.add(SVGNames::systemLanguageAttr); | 172 supportedAttributes.add(SVGNames::systemLanguageAttr); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 | 213 |
| 215 SVGStringList& SVGTests::systemLanguage() | 214 SVGStringList& SVGTests::systemLanguage() |
| 216 { | 215 { |
| 217 m_systemLanguage.shouldSynchronize = true; | 216 m_systemLanguage.shouldSynchronize = true; |
| 218 return m_systemLanguage.value; | 217 return m_systemLanguage.value; |
| 219 } | 218 } |
| 220 | 219 |
| 221 } | 220 } |
| 222 | 221 |
| 223 #endif // ENABLE(SVG) | 222 #endif // ENABLE(SVG) |
| OLD | NEW |