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

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

Issue 2537143004: Stop a SVG <use> element from modifying its UA shadow tree when it is removed (Closed)
Patch Set: Created 4 years 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 | « 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, 2006, 2007, 2008 Nikolas Zimmermann 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
5 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
6 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 6 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
7 * Copyright (C) 2012 University of Szeged 7 * Copyright (C) 2012 University of Szeged
8 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 8 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 return InsertionDone; 121 return InsertionDone;
122 ASSERT(!m_targetElementInstance || !isWellFormedDocument(&document())); 122 ASSERT(!m_targetElementInstance || !isWellFormedDocument(&document()));
123 ASSERT(!hasPendingResources() || !isWellFormedDocument(&document())); 123 ASSERT(!hasPendingResources() || !isWellFormedDocument(&document()));
124 invalidateShadowTree(); 124 invalidateShadowTree();
125 return InsertionDone; 125 return InsertionDone;
126 } 126 }
127 127
128 void SVGUseElement::removedFrom(ContainerNode* rootParent) { 128 void SVGUseElement::removedFrom(ContainerNode* rootParent) {
129 SVGGraphicsElement::removedFrom(rootParent); 129 SVGGraphicsElement::removedFrom(rootParent);
130 if (rootParent->isConnected()) { 130 if (rootParent->isConnected()) {
131 clearShadowTree(); 131 clearInstanceRoot();
132 removeAllOutgoingReferences();
132 cancelShadowTreeRecreation(); 133 cancelShadowTreeRecreation();
133 } 134 }
134 } 135 }
135 136
136 static void transferUseWidthAndHeightIfNeeded( 137 static void transferUseWidthAndHeightIfNeeded(
137 const SVGUseElement& use, 138 const SVGUseElement& use,
138 SVGElement& shadowElement, 139 SVGElement& shadowElement,
139 const SVGElement& originalElement) { 140 const SVGElement& originalElement) {
140 DEFINE_STATIC_LOCAL(const AtomicString, hundredPercentString, ("100%")); 141 DEFINE_STATIC_LOCAL(const AtomicString, hundredPercentString, ("100%"));
141 // Use |originalElement| for checking the element type, because we will 142 // Use |originalElement| for checking the element type, because we will
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 730
730 if (m_resource) 731 if (m_resource)
731 m_resource->removeClient(this); 732 m_resource->removeClient(this);
732 733
733 m_resource = resource; 734 m_resource = resource;
734 if (m_resource) 735 if (m_resource)
735 m_resource->addClient(this); 736 m_resource->addClient(this);
736 } 737 }
737 738
738 } // namespace blink 739 } // namespace blink
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