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

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

Issue 266063002: Store SVGElement instead of SVGElementInstance for instancesForElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix nits Created 6 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
« no previous file with comments | « Source/core/svg/SVGElementRareData.h ('k') | 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, 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 { 892 {
893 if (!inActiveDocument() || m_needsShadowTreeRecreation) 893 if (!inActiveDocument() || m_needsShadowTreeRecreation)
894 return; 894 return;
895 scheduleShadowTreeRecreation(); 895 scheduleShadowTreeRecreation();
896 invalidateDependentShadowTrees(); 896 invalidateDependentShadowTrees();
897 } 897 }
898 898
899 void SVGUseElement::invalidateDependentShadowTrees() 899 void SVGUseElement::invalidateDependentShadowTrees()
900 { 900 {
901 // Recursively invalidate dependent <use> shadow trees 901 // Recursively invalidate dependent <use> shadow trees
902 const HashSet<SVGElementInstance*>& instances = instancesForElement(); 902 const HashSet<SVGElement*>& instances = instancesForElement();
903 const HashSet<SVGElementInstance*>::const_iterator end = instances.end(); 903 const HashSet<SVGElement*>::const_iterator end = instances.end();
904 for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) { 904 for (HashSet<SVGElement*>::const_iterator it = instances.begin(); it != end; ++it) {
905 if (SVGUseElement* element = (*it)->correspondingUseElement()) { 905 if (SVGUseElement* element = (*it)->correspondingUseElement()) {
906 ASSERT(element->inDocument()); 906 ASSERT(element->inDocument());
907 element->invalidateShadowTree(); 907 element->invalidateShadowTree();
908 } 908 }
909 } 909 }
910 } 910 }
911 911
912 void SVGUseElement::transferUseAttributesToReplacedElement(SVGElement* from, SVG Element* to) const 912 void SVGUseElement::transferUseAttributesToReplacedElement(SVGElement* from, SVG Element* to) const
913 { 913 {
914 ASSERT(from); 914 ASSERT(from);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 997
998 if (m_resource) 998 if (m_resource)
999 m_resource->removeClient(this); 999 m_resource->removeClient(this);
1000 1000
1001 m_resource = resource; 1001 m_resource = resource;
1002 if (m_resource) 1002 if (m_resource)
1003 m_resource->addClient(this); 1003 m_resource->addClient(this);
1004 } 1004 }
1005 1005
1006 } 1006 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElementRareData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698