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

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

Issue 67473002: Have ElementTraversal / NodeTraversal's next() methods take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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/SVGSVGElement.cpp ('k') | Source/core/svg/animation/SMILTimeContainer.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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 static inline void removeDisallowedElementsFromSubtree(Element* subtree) 670 static inline void removeDisallowedElementsFromSubtree(Element* subtree)
671 { 671 {
672 ASSERT(!subtree->inDocument()); 672 ASSERT(!subtree->inDocument());
673 Element* element = ElementTraversal::firstWithin(subtree); 673 Element* element = ElementTraversal::firstWithin(subtree);
674 while (element) { 674 while (element) {
675 if (isDisallowedElement(element)) { 675 if (isDisallowedElement(element)) {
676 Element* next = ElementTraversal::nextSkippingChildren(element, subt ree); 676 Element* next = ElementTraversal::nextSkippingChildren(element, subt ree);
677 // The subtree is not in document so this won't generate events that could mutate the tree. 677 // The subtree is not in document so this won't generate events that could mutate the tree.
678 element->parentNode()->removeChild(element); 678 element->parentNode()->removeChild(element);
679 element = next; 679 element = next;
680 } else 680 } else {
681 element = ElementTraversal::next(element, subtree); 681 element = ElementTraversal::next(*element, subtree);
682 }
682 } 683 }
683 } 684 }
684 685
685 void SVGUseElement::buildShadowTree(SVGElement* target, SVGElementInstance* targ etInstance) 686 void SVGUseElement::buildShadowTree(SVGElement* target, SVGElementInstance* targ etInstance)
686 { 687 {
687 // For instance <use> on <foreignObject> (direct case). 688 // For instance <use> on <foreignObject> (direct case).
688 if (isDisallowedElement(target)) 689 if (isDisallowedElement(target))
689 return; 690 return;
690 691
691 RefPtr<Element> newChild = targetInstance->correspondingElement()->cloneElem entWithChildren(); 692 RefPtr<Element> newChild = targetInstance->correspondingElement()->cloneElem entWithChildren();
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 995
995 if (m_resource) 996 if (m_resource)
996 m_resource->removeClient(this); 997 m_resource->removeClient(this);
997 998
998 m_resource = resource; 999 m_resource = resource;
999 if (m_resource) 1000 if (m_resource)
1000 m_resource->addClient(this); 1001 m_resource->addClient(this);
1001 } 1002 }
1002 1003
1003 } 1004 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGSVGElement.cpp ('k') | Source/core/svg/animation/SMILTimeContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698