OLD | NEW |
---|---|
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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
384 | 384 |
385 // Clone the target subtree into the shadow tree, not handling <use> and <sy mbol> yet. | 385 // Clone the target subtree into the shadow tree, not handling <use> and <sy mbol> yet. |
386 | 386 |
387 // SVG specification does not say a word about <use> & cycles. My view on th is is: just ignore it! | 387 // SVG specification does not say a word about <use> & cycles. My view on th is is: just ignore it! |
388 // Non-appearing <use> content is easier to debug, then half-appearing conte nt. | 388 // Non-appearing <use> content is easier to debug, then half-appearing conte nt. |
389 if (!buildShadowTree(target, m_targetElementInstance.get(), false)) { | 389 if (!buildShadowTree(target, m_targetElementInstance.get(), false)) { |
390 clearResourceReferences(); | 390 clearResourceReferences(); |
391 return; | 391 return; |
392 } | 392 } |
393 | 393 |
394 // Add a reference such that if the target is removed we tear down the | |
395 // corresponding shadowtree. | |
396 addReferenceTo(target); | |
pdr.
2015/04/17 04:57:25
It's been a while since I've been in SVGUseElement
| |
397 | |
394 if (instanceTreeIsLoading(m_targetElementInstance.get())) | 398 if (instanceTreeIsLoading(m_targetElementInstance.get())) |
395 return; | 399 return; |
396 | 400 |
397 // Assure shadow tree building was successfull | 401 // Assure shadow tree building was successfull |
398 ASSERT(m_targetElementInstance); | 402 ASSERT(m_targetElementInstance); |
399 ASSERT(m_targetElementInstance->correspondingUseElement() == this); | 403 ASSERT(m_targetElementInstance->correspondingUseElement() == this); |
400 ASSERT(m_targetElementInstance->correspondingElement() == target); | 404 ASSERT(m_targetElementInstance->correspondingElement() == target); |
401 | 405 |
402 // Expand all <use> elements in the shadow tree. | 406 // Expand all <use> elements in the shadow tree. |
403 // Expand means: replace the actual <use> element by what it references. | 407 // Expand means: replace the actual <use> element by what it references. |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
762 | 766 |
763 if (m_resource) | 767 if (m_resource) |
764 m_resource->removeClient(this); | 768 m_resource->removeClient(this); |
765 | 769 |
766 m_resource = resource; | 770 m_resource = resource; |
767 if (m_resource) | 771 if (m_resource) |
768 m_resource->addClient(this); | 772 m_resource->addClient(this); |
769 } | 773 } |
770 | 774 |
771 } | 775 } |
OLD | NEW |