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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 void LayoutSVGResourceContainer::removeClient(LayoutObject* client) 164 void LayoutSVGResourceContainer::removeClient(LayoutObject* client)
165 { 165 {
166 ASSERT(client); 166 ASSERT(client);
167 removeClientFromCache(client, false); 167 removeClientFromCache(client, false);
168 m_clients.remove(client); 168 m_clients.remove(client);
169 } 169 }
170 170
171 void LayoutSVGResourceContainer::addClientLayer(Node* node) 171 void LayoutSVGResourceContainer::addClientLayer(Node* node)
172 { 172 {
173 ASSERT(node); 173 ASSERT(node);
174 if (!node->renderer() || !node->renderer()->hasLayer()) 174 if (!node->layoutObject() || !node->layoutObject()->hasLayer())
175 return; 175 return;
176 m_clientLayers.add(toLayoutBoxModelObject(node->renderer())->layer()); 176 m_clientLayers.add(toLayoutBoxModelObject(node->layoutObject())->layer());
177 clearInvalidationMask(); 177 clearInvalidationMask();
178 } 178 }
179 179
180 void LayoutSVGResourceContainer::addClientLayer(Layer* client) 180 void LayoutSVGResourceContainer::addClientLayer(Layer* client)
181 { 181 {
182 ASSERT(client); 182 ASSERT(client);
183 m_clientLayers.add(client); 183 m_clientLayers.add(client);
184 clearInvalidationMask(); 184 clearInvalidationMask();
185 } 185 }
186 186
(...skipping 25 matching lines...) Expand all
212 OwnPtrWillBeRawPtr<SVGDocumentExtensions::SVGPendingElements> clients(extens ions.removePendingResource(m_id)); 212 OwnPtrWillBeRawPtr<SVGDocumentExtensions::SVGPendingElements> clients(extens ions.removePendingResource(m_id));
213 213
214 // Cache us with the new id. 214 // Cache us with the new id.
215 extensions.addResource(m_id, this); 215 extensions.addResource(m_id, this);
216 216
217 // Update cached resources of pending clients. 217 // Update cached resources of pending clients.
218 const SVGDocumentExtensions::SVGPendingElements::const_iterator end = client s->end(); 218 const SVGDocumentExtensions::SVGPendingElements::const_iterator end = client s->end();
219 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients- >begin(); it != end; ++it) { 219 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients- >begin(); it != end; ++it) {
220 ASSERT((*it)->hasPendingResources()); 220 ASSERT((*it)->hasPendingResources());
221 extensions.clearHasPendingResourcesIfPossible(*it); 221 extensions.clearHasPendingResourcesIfPossible(*it);
222 LayoutObject* renderer = (*it)->renderer(); 222 LayoutObject* renderer = (*it)->layoutObject();
223 if (!renderer) 223 if (!renderer)
224 continue; 224 continue;
225 225
226 StyleDifference diff; 226 StyleDifference diff;
227 diff.setNeedsFullLayout(); 227 diff.setNeedsFullLayout();
228 SVGResourcesCache::clientStyleChanged(renderer, diff, renderer->styleRef ()); 228 SVGResourcesCache::clientStyleChanged(renderer, diff, renderer->styleRef ());
229 renderer->setNeedsLayoutAndFullPaintInvalidation(); 229 renderer->setNeedsLayoutAndFullPaintInvalidation();
230 } 230 }
231 } 231 }
232 232
(...skipping 19 matching lines...) Expand all
252 252
253 // We allow cycles in SVGDocumentExtensions reference sets in order to avoid expensive 253 // We allow cycles in SVGDocumentExtensions reference sets in order to avoid expensive
254 // reference graph adjustments on changes, so we need to break possible cycl es here. 254 // reference graph adjustments on changes, so we need to break possible cycl es here.
255 // This strong reference is safe, as it is guaranteed that this set will be emptied 255 // This strong reference is safe, as it is guaranteed that this set will be emptied
256 // at the end of recursion. 256 // at the end of recursion.
257 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement>> SVGElementSet; 257 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement>> SVGElementSet;
258 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SVGElementSet>, invalidatingDepen dencies, (adoptPtrWillBeNoop(new SVGElementSet))); 258 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SVGElementSet>, invalidatingDepen dencies, (adoptPtrWillBeNoop(new SVGElementSet)));
259 259
260 SVGElementSet::iterator end = dependencies->end(); 260 SVGElementSet::iterator end = dependencies->end();
261 for (SVGElementSet::iterator it = dependencies->begin(); it != end; ++it) { 261 for (SVGElementSet::iterator it = dependencies->begin(); it != end; ++it) {
262 if (LayoutObject* renderer = (*it)->renderer()) { 262 if (LayoutObject* renderer = (*it)->layoutObject()) {
263 if (UNLIKELY(!invalidatingDependencies->add(*it).isNewEntry)) { 263 if (UNLIKELY(!invalidatingDependencies->add(*it).isNewEntry)) {
264 // Reference cycle: we are in process of invalidating this depen dant. 264 // Reference cycle: we are in process of invalidating this depen dant.
265 continue; 265 continue;
266 } 266 }
267 267
268 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidati on(renderer, needsLayout); 268 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidati on(renderer, needsLayout);
269 invalidatingDependencies->remove(*it); 269 invalidatingDependencies->remove(*it);
270 } 270 }
271 } 271 }
272 } 272 }
(...skipping 17 matching lines...) Expand all
290 // This will process the rest of the ancestors. 290 // This will process the rest of the ancestors.
291 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); 291 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache();
292 break; 292 break;
293 } 293 }
294 294
295 current = current->parent(); 295 current = current->parent();
296 } 296 }
297 } 297 }
298 298
299 } 299 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGResourceClipper.cpp ('k') | Source/core/layout/svg/LayoutSVGResourceFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698