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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGUseElement.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) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
5 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
6 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 6 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
7 * Copyright (C) 2012 University of Szeged 7 * Copyright (C) 2012 University of Szeged
8 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 8 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 lookupScope = m_resource->document(); 310 lookupScope = m_resource->document();
311 else 311 else
312 return nullptr; 312 return nullptr;
313 Element* target = lookupScope->getElementById(m_elementIdentifier); 313 Element* target = lookupScope->getElementById(m_elementIdentifier);
314 // TODO(fs): Why would the Element not be "connected" at this point? 314 // TODO(fs): Why would the Element not be "connected" at this point?
315 if (target && target->isConnected()) 315 if (target && target->isConnected())
316 return target; 316 return target;
317 // Don't record any pending references for external resources. 317 // Don't record any pending references for external resources.
318 if (!m_resource) { 318 if (!m_resource) {
319 treeScope().ensureSVGTreeScopedResources().addPendingResource( 319 treeScope().ensureSVGTreeScopedResources().addPendingResource(
320 m_elementIdentifier, this); 320 m_elementIdentifier, *this);
321 DCHECK(hasPendingResources()); 321 DCHECK(hasPendingResources());
322 } 322 }
323 return nullptr; 323 return nullptr;
324 } 324 }
325 325
326 void SVGUseElement::buildPendingResource() { 326 void SVGUseElement::buildPendingResource() {
327 if (inUseShadowTree()) 327 if (inUseShadowTree())
328 return; 328 return;
329 clearShadowTree(); 329 clearShadowTree();
330 cancelShadowTreeRecreation(); 330 cancelShadowTreeRecreation();
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 724
725 if (m_resource) 725 if (m_resource)
726 m_resource->removeClient(this); 726 m_resource->removeClient(this);
727 727
728 m_resource = resource; 728 m_resource = resource;
729 if (m_resource) 729 if (m_resource)
730 m_resource->addClient(this); 730 m_resource->addClient(this);
731 } 731 }
732 732
733 } // namespace blink 733 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698