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

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

Issue 1074463004: Oilpan: fix build after r193369. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | 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) 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 if (LayoutSVGResourceMasker* masker = resources->masker()) 237 if (LayoutSVGResourceMasker* masker = resources->masker())
238 masker->removeClientFromCache(object); 238 masker->removeClientFromCache(object);
239 239
240 if (LayoutSVGResourceClipper* clipper = resources->clipper()) 240 if (LayoutSVGResourceClipper* clipper = resources->clipper())
241 clipper->removeClientFromCache(object); 241 clipper->removeClientFromCache(object);
242 } 242 }
243 243
244 if (!object->node() || !object->node()->isSVGElement()) 244 if (!object->node() || !object->node()->isSVGElement())
245 return; 245 return;
246
246 SVGElementSet* dependencies = toSVGElement(object->node())->setOfIncomingRef erences(); 247 SVGElementSet* dependencies = toSVGElement(object->node())->setOfIncomingRef erences();
247 if (!dependencies) 248 if (!dependencies)
248 return; 249 return;
249 250
250 // We allow cycles in SVGDocumentExtensions reference sets in order to avoid expensive 251 // We allow cycles in SVGDocumentExtensions reference sets in order to avoid expensive
251 // reference graph adjustments on changes, so we need to break possible cycl es here. 252 // reference graph adjustments on changes, so we need to break possible cycl es here.
252 // This strong reference is safe, as it is guaranteed that this set will be emptied 253 // This strong reference is safe, as it is guaranteed that this set will be emptied
253 // at the end of recursion. 254 // at the end of recursion.
254 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement>> SVGElementSet;
255 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SVGElementSet>, invalidatingDepen dencies, (adoptPtrWillBeNoop(new SVGElementSet))); 255 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SVGElementSet>, invalidatingDepen dencies, (adoptPtrWillBeNoop(new SVGElementSet)));
256 256
257 for (auto* element : *dependencies) { 257 for (SVGElement* element : *dependencies) {
258 if (LayoutObject* layoutObject = element->layoutObject()) { 258 if (LayoutObject* layoutObject = element->layoutObject()) {
259 if (UNLIKELY(!invalidatingDependencies->add(element).isNewEntry)) { 259 if (UNLIKELY(!invalidatingDependencies->add(element).isNewEntry)) {
260 // Reference cycle: we are in process of invalidating this depen dant. 260 // Reference cycle: we are in process of invalidating this depen dant.
261 continue; 261 continue;
262 } 262 }
263 263
264 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidati on(layoutObject, needsLayout); 264 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidati on(layoutObject, needsLayout);
265 invalidatingDependencies->remove(element); 265 invalidatingDependencies->remove(element);
266 } 266 }
267 } 267 }
(...skipping 18 matching lines...) Expand all
286 // This will process the rest of the ancestors. 286 // This will process the rest of the ancestors.
287 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); 287 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache();
288 break; 288 break;
289 } 289 }
290 290
291 current = current->parent(); 291 current = current->parent();
292 } 292 }
293 } 293 }
294 294
295 } 295 }
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