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

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

Issue 2705163008: Cleanup the SVGTreeScopeResources interface (Closed)
Patch Set: Rebase Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // removal will be signaled after processing all the clients.) 94 // removal will be signaled after processing all the clients.)
95 SVGResources* resources = 95 SVGResources* resources =
96 SVGResourcesCache::cachedResourcesForLayoutObject(client); 96 SVGResourcesCache::cachedResourcesForLayoutObject(client);
97 // Or else the client wouldn't be in the list in the first place. 97 // Or else the client wouldn't be in the list in the first place.
98 DCHECK(resources); 98 DCHECK(resources);
99 resources->resourceDestroyed(this); 99 resources->resourceDestroyed(this);
100 100
101 // Add a pending resolution based on the id of the old resource. 101 // Add a pending resolution based on the id of the old resource.
102 Element* clientElement = toElement(client->node()); 102 Element* clientElement = toElement(client->node());
103 svgTreeScopeResourcesFromElement(clientElement) 103 svgTreeScopeResourcesFromElement(clientElement)
104 .addPendingResource(m_id, clientElement); 104 .addPendingResource(m_id, *clientElement);
105 } 105 }
106 106
107 removeAllClientsFromCache(); 107 removeAllClientsFromCache();
108 } 108 }
109 109
110 void LayoutSVGResourceContainer::idChanged() { 110 void LayoutSVGResourceContainer::idChanged() {
111 // Invalidate all our current clients. 111 // Invalidate all our current clients.
112 removeAllClientsFromCache(); 112 removeAllClientsFromCache();
113 113
114 // Remove old id, that is guaranteed to be present in cache. 114 // Remove old id, that is guaranteed to be present in cache.
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // This will process the rest of the ancestors. 268 // This will process the rest of the ancestors.
269 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); 269 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache();
270 break; 270 break;
271 } 271 }
272 272
273 current = current->parent(); 273 current = current->parent();
274 } 274 }
275 } 275 }
276 276
277 } // namespace blink 277 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/layout/svg/SVGResources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698