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

Side by Side Diff: Source/core/svg/SVGDocumentExtensions.cpp

Issue 1127773003: This CL clean up patch in SVGElements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | Source/core/svg/SVGElement.h » ('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 Apple Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2007 Rob Buis <buis@kde.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 { 70 {
71 if (id.isEmpty()) 71 if (id.isEmpty())
72 return; 72 return;
73 73
74 m_resources.remove(id); 74 m_resources.remove(id);
75 } 75 }
76 76
77 LayoutSVGResourceContainer* SVGDocumentExtensions::resourceById(const AtomicStri ng& id) const 77 LayoutSVGResourceContainer* SVGDocumentExtensions::resourceById(const AtomicStri ng& id) const
78 { 78 {
79 if (id.isEmpty()) 79 if (id.isEmpty())
80 return 0; 80 return nullptr;
81 81
82 return m_resources.get(id); 82 return m_resources.get(id);
83 } 83 }
84 84
85 void SVGDocumentExtensions::serviceOnAnimationFrame(Document& document, double m onotonicAnimationStartTime) 85 void SVGDocumentExtensions::serviceOnAnimationFrame(Document& document, double m onotonicAnimationStartTime)
86 { 86 {
87 if (!document.svgExtensions()) 87 if (!document.svgExtensions())
88 return; 88 return;
89 document.accessSVGExtensions().serviceAnimations(monotonicAnimationStartTime ); 89 document.accessSVGExtensions().serviceAnimations(monotonicAnimationStartTime );
90 } 90 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 ASSERT(!m_pendingResourcesForRemoval.contains(id)); 269 ASSERT(!m_pendingResourcesForRemoval.contains(id));
270 270
271 OwnPtrWillBeMember<SVGPendingElements> existing = m_pendingResources.take(id ); 271 OwnPtrWillBeMember<SVGPendingElements> existing = m_pendingResources.take(id );
272 if (existing && !existing->isEmpty()) 272 if (existing && !existing->isEmpty())
273 m_pendingResourcesForRemoval.add(id, existing.release()); 273 m_pendingResourcesForRemoval.add(id, existing.release());
274 } 274 }
275 275
276 Element* SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval(cons t AtomicString& id) 276 Element* SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval(cons t AtomicString& id)
277 { 277 {
278 if (id.isEmpty()) 278 if (id.isEmpty())
279 return 0; 279 return nullptr;
280 280
281 SVGPendingElements* resourceSet = m_pendingResourcesForRemoval.get(id); 281 SVGPendingElements* resourceSet = m_pendingResourcesForRemoval.get(id);
282 if (!resourceSet || resourceSet->isEmpty()) 282 if (!resourceSet || resourceSet->isEmpty())
283 return 0; 283 return nullptr;
284 284
285 SVGPendingElements::iterator firstElement = resourceSet->begin(); 285 SVGPendingElements::iterator firstElement = resourceSet->begin();
286 Element* element = *firstElement; 286 Element* element = *firstElement;
287 287
288 resourceSet->remove(firstElement); 288 resourceSet->remove(firstElement);
289 289
290 if (resourceSet->isEmpty()) 290 if (resourceSet->isEmpty())
291 removePendingResourceForRemoval(id); 291 removePendingResourceForRemoval(id);
292 292
293 return element; 293 return element;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 #if ENABLE(OILPAN) 357 #if ENABLE(OILPAN)
358 visitor->trace(m_document); 358 visitor->trace(m_document);
359 visitor->trace(m_timeContainers); 359 visitor->trace(m_timeContainers);
360 visitor->trace(m_relativeLengthSVGRoots); 360 visitor->trace(m_relativeLengthSVGRoots);
361 visitor->trace(m_pendingResources); 361 visitor->trace(m_pendingResources);
362 visitor->trace(m_pendingResourcesForRemoval); 362 visitor->trace(m_pendingResourcesForRemoval);
363 #endif 363 #endif
364 } 364 }
365 365
366 } 366 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698