Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: Source/core/svg/SVGTests.cpp

Issue 15398006: SVGTests should lazyAttach (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698