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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResource.cpp

Issue 344883007: SVG: Move/rename reference management to SVGElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove sed script from CL Created 6 years, 5 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/SVGAnimateElement.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) 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 if (RenderSVGResourceMasker* masker = resources->masker()) 177 if (RenderSVGResourceMasker* masker = resources->masker())
178 masker->removeClientFromCache(object); 178 masker->removeClientFromCache(object);
179 179
180 if (RenderSVGResourceClipper* clipper = resources->clipper()) 180 if (RenderSVGResourceClipper* clipper = resources->clipper())
181 clipper->removeClientFromCache(object); 181 clipper->removeClientFromCache(object);
182 } 182 }
183 183
184 if (!object->node() || !object->node()->isSVGElement()) 184 if (!object->node() || !object->node()->isSVGElement())
185 return; 185 return;
186 SVGElementSet* dependencies = object->document().accessSVGExtensions().setOf ElementsReferencingTarget(toSVGElement(object->node())); 186 SVGElementSet* dependencies = toSVGElement(object->node())->setOfIncomingRef erences();
187 if (!dependencies) 187 if (!dependencies)
188 return; 188 return;
189 189
190 // We allow cycles in SVGDocumentExtensions reference sets in order to avoid expensive 190 // We allow cycles in SVGDocumentExtensions reference sets in order to avoid expensive
191 // reference graph adjustments on changes, so we need to break possible cycl es here. 191 // reference graph adjustments on changes, so we need to break possible cycl es here.
192 // This strong reference is safe, as it is guaranteed that this set will be emptied 192 // This strong reference is safe, as it is guaranteed that this set will be emptied
193 // at the end of recursion. 193 // at the end of recursion.
194 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement> > SVGElementSet; 194 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement> > SVGElementSet;
195 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SVGElementSet>, invalidatingDepen dencies, (adoptPtrWillBeNoop(new SVGElementSet))); 195 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SVGElementSet>, invalidatingDepen dencies, (adoptPtrWillBeNoop(new SVGElementSet)));
196 196
(...skipping 30 matching lines...) Expand all
227 // This will process the rest of the ancestors. 227 // This will process the rest of the ancestors.
228 toRenderSVGResourceContainer(current)->removeAllClientsFromCache(); 228 toRenderSVGResourceContainer(current)->removeAllClientsFromCache();
229 break; 229 break;
230 } 230 }
231 231
232 current = current->parent(); 232 current = current->parent();
233 } 233 }
234 } 234 }
235 235
236 } 236 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGAnimateElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698