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

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

Issue 17045008: HashSet: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' meth… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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
« no previous file with comments | « Source/core/svg/SVGTextPositioningElement.cpp ('k') | Source/core/svg/SVGViewElement.cpp » ('j') | 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, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 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 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
6 * Copyright (C) 2012 University of Szeged 6 * Copyright (C) 2012 University of Szeged
7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 if (supportedAttributes.isEmpty()) { 127 if (supportedAttributes.isEmpty()) {
128 SVGTests::addSupportedAttributes(supportedAttributes); 128 SVGTests::addSupportedAttributes(supportedAttributes);
129 SVGLangSpace::addSupportedAttributes(supportedAttributes); 129 SVGLangSpace::addSupportedAttributes(supportedAttributes);
130 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes ); 130 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes );
131 SVGURIReference::addSupportedAttributes(supportedAttributes); 131 SVGURIReference::addSupportedAttributes(supportedAttributes);
132 supportedAttributes.add(SVGNames::xAttr); 132 supportedAttributes.add(SVGNames::xAttr);
133 supportedAttributes.add(SVGNames::yAttr); 133 supportedAttributes.add(SVGNames::yAttr);
134 supportedAttributes.add(SVGNames::widthAttr); 134 supportedAttributes.add(SVGNames::widthAttr);
135 supportedAttributes.add(SVGNames::heightAttr); 135 supportedAttributes.add(SVGNames::heightAttr);
136 } 136 }
137 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato r>(attrName); 137 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
138 } 138 }
139 139
140 void SVGUseElement::parseAttribute(const QualifiedName& name, const AtomicString & value) 140 void SVGUseElement::parseAttribute(const QualifiedName& name, const AtomicString & value)
141 { 141 {
142 SVGParsingError parseError = NoError; 142 SVGParsingError parseError = NoError;
143 143
144 if (!isSupportedAttribute(name)) 144 if (!isSupportedAttribute(name))
145 SVGStyledTransformableElement::parseAttribute(name, value); 145 SVGStyledTransformableElement::parseAttribute(name, value);
146 else if (name == SVGNames::xAttr) 146 else if (name == SVGNames::xAttr)
147 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 147 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 allowedElementTags.add(SVGNames::svgTag); 355 allowedElementTags.add(SVGNames::svgTag);
356 allowedElementTags.add(SVGNames::switchTag); 356 allowedElementTags.add(SVGNames::switchTag);
357 allowedElementTags.add(SVGNames::symbolTag); 357 allowedElementTags.add(SVGNames::symbolTag);
358 allowedElementTags.add(SVGNames::textTag); 358 allowedElementTags.add(SVGNames::textTag);
359 allowedElementTags.add(SVGNames::textPathTag); 359 allowedElementTags.add(SVGNames::textPathTag);
360 allowedElementTags.add(SVGNames::titleTag); 360 allowedElementTags.add(SVGNames::titleTag);
361 allowedElementTags.add(SVGNames::trefTag); 361 allowedElementTags.add(SVGNames::trefTag);
362 allowedElementTags.add(SVGNames::tspanTag); 362 allowedElementTags.add(SVGNames::tspanTag);
363 allowedElementTags.add(SVGNames::useTag); 363 allowedElementTags.add(SVGNames::useTag);
364 } 364 }
365 return !allowedElementTags.contains<QualifiedName, SVGAttributeHashTranslato r>(element->tagQName()); 365 return !allowedElementTags.contains<SVGAttributeHashTranslator>(element->tag QName());
366 } 366 }
367 367
368 static bool subtreeContainsDisallowedElement(Node* start) 368 static bool subtreeContainsDisallowedElement(Node* start)
369 { 369 {
370 if (isDisallowedElement(start)) 370 if (isDisallowedElement(start))
371 return true; 371 return true;
372 372
373 for (Node* cur = start->firstChild(); cur; cur = cur->nextSibling()) { 373 for (Node* cur = start->firstChild(); cur; cur = cur->nextSibling()) {
374 if (subtreeContainsDisallowedElement(cur)) 374 if (subtreeContainsDisallowedElement(cur))
375 return true; 375 return true;
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 989
990 if (m_cachedDocument) 990 if (m_cachedDocument)
991 m_cachedDocument->removeClient(this); 991 m_cachedDocument->removeClient(this);
992 992
993 m_cachedDocument = cachedDocument; 993 m_cachedDocument = cachedDocument;
994 if (m_cachedDocument) 994 if (m_cachedDocument)
995 m_cachedDocument->addClient(this); 995 m_cachedDocument->addClient(this);
996 } 996 }
997 997
998 } 998 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGTextPositioningElement.cpp ('k') | Source/core/svg/SVGViewElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698