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

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

Issue 272623003: Stop using SVGElementInstance in SVGElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Do shadow dom deletion later Created 6 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 | « Source/core/svg/SVGElementInstance.cpp ('k') | 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) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
6 * Copyright (C) 2012 University of Szeged 6 * Copyright (C) 2012 University of Szeged
7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 void SVGUseElement::scheduleShadowTreeRecreation() 317 void SVGUseElement::scheduleShadowTreeRecreation()
318 { 318 {
319 if (!referencedScope() || inUseShadowTree()) 319 if (!referencedScope() || inUseShadowTree())
320 return; 320 return;
321 m_needsShadowTreeRecreation = true; 321 m_needsShadowTreeRecreation = true;
322 document().scheduleUseShadowTreeUpdate(*this); 322 document().scheduleUseShadowTreeUpdate(*this);
323 } 323 }
324 324
325 void SVGUseElement::clearResourceReferences() 325 void SVGUseElement::clearResourceReferences()
326 { 326 {
327 // FIXME: We should try to optimize this, to at least allow partial reclones .
328 if (ShadowRoot* shadowTreeRootElement = userAgentShadowRoot())
329 shadowTreeRootElement->removeChildren();
330
331 if (m_targetElementInstance) { 327 if (m_targetElementInstance) {
332 m_targetElementInstance->detach(); 328 m_targetElementInstance->detach();
333 m_targetElementInstance = nullptr; 329 m_targetElementInstance = nullptr;
334 } 330 }
335 331
332 // FIXME: We should try to optimize this, to at least allow partial reclones .
333 if (ShadowRoot* shadowTreeRootElement = userAgentShadowRoot())
334 shadowTreeRootElement->removeChildren();
335
336 m_needsShadowTreeRecreation = false; 336 m_needsShadowTreeRecreation = false;
337 document().unscheduleUseShadowTreeUpdate(*this); 337 document().unscheduleUseShadowTreeUpdate(*this);
338 338
339 document().accessSVGExtensions().removeAllTargetReferencesForElement(this); 339 document().accessSVGExtensions().removeAllTargetReferencesForElement(this);
340 } 340 }
341 341
342 void SVGUseElement::buildPendingResource() 342 void SVGUseElement::buildPendingResource()
343 { 343 {
344 if (!referencedScope() || inUseShadowTree()) 344 if (!referencedScope() || inUseShadowTree())
345 return; 345 return;
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 920
921 if (m_resource) 921 if (m_resource)
922 m_resource->removeClient(this); 922 m_resource->removeClient(this);
923 923
924 m_resource = resource; 924 m_resource = resource;
925 if (m_resource) 925 if (m_resource)
926 m_resource->addClient(this); 926 m_resource->addClient(this);
927 } 927 }
928 928
929 } 929 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElementInstance.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698