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

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

Issue 205983004: Use new Traversal<*Element> API in svg code for clarity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 6 years, 9 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 | Source/core/svg/SVGSVGElement.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, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 746
747 void SVGElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style) 747 void SVGElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
748 { 748 {
749 CSSPropertyID propertyID = cssPropertyIdForSVGAttributeName(name); 749 CSSPropertyID propertyID = cssPropertyIdForSVGAttributeName(name);
750 if (propertyID > 0) 750 if (propertyID > 0)
751 addPropertyToPresentationAttributeStyle(style, propertyID, value); 751 addPropertyToPresentationAttributeStyle(style, propertyID, value);
752 } 752 }
753 753
754 bool SVGElement::haveLoadedRequiredResources() 754 bool SVGElement::haveLoadedRequiredResources()
755 { 755 {
756 Node* child = firstChild(); 756 for (SVGElement* child = Traversal<SVGElement>::firstChild(*this); child; ch ild = Traversal<SVGElement>::nextSibling(*child)) {
757 while (child) { 757 if (!child->haveLoadedRequiredResources())
758 if (child->isSVGElement() && !toSVGElement(child)->haveLoadedRequiredRes ources())
759 return false; 758 return false;
760 child = child->nextSibling();
761 } 759 }
762 return true; 760 return true;
763 } 761 }
764 762
765 static inline void collectInstancesForSVGElement(SVGElement* element, HashSet<SV GElementInstance*>& instances) 763 static inline void collectInstancesForSVGElement(SVGElement* element, HashSet<SV GElementInstance*>& instances)
766 { 764 {
767 ASSERT(element); 765 ASSERT(element);
768 if (element->containingShadowRoot()) 766 if (element->containingShadowRoot())
769 return; 767 return;
770 768
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 animatableAttributes.add(SVGNames::zAttr); 1131 animatableAttributes.add(SVGNames::zAttr);
1134 } 1132 }
1135 1133
1136 if (name == classAttr) 1134 if (name == classAttr)
1137 return true; 1135 return true;
1138 1136
1139 return animatableAttributes.contains(name); 1137 return animatableAttributes.contains(name);
1140 } 1138 }
1141 #endif 1139 #endif
1142 } 1140 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698