| 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 ASSERT(!m_targetElementInstance); | 385 ASSERT(!m_targetElementInstance); |
| 386 | 386 |
| 387 // <use> creates a "user agent" shadow root. Do not build the shadow/instanc
e tree for <use> | 387 // <use> creates a "user agent" shadow root. Do not build the shadow/instanc
e tree for <use> |
| 388 // elements living in a user agent shadow tree because they will get expande
d in a second | 388 // elements living in a user agent shadow tree because they will get expande
d in a second |
| 389 // pass -- see expandUseElementsInShadowTree(). | 389 // pass -- see expandUseElementsInShadowTree(). |
| 390 if (inUseShadowTree()) | 390 if (inUseShadowTree()) |
| 391 return; | 391 return; |
| 392 | 392 |
| 393 // Do not allow self-referencing. | 393 // Do not allow self-referencing. |
| 394 // 'target' may be null, if it's a non SVG namespaced element. | 394 // 'target' may be null, if it's a non SVG namespaced element. |
| 395 if (!target || target == this) | 395 if (!target || target == this || isDisallowedElement(target)) |
| 396 return; | 396 return; |
| 397 | 397 |
| 398 // Set up root SVG element in shadow tree. | 398 // Set up root SVG element in shadow tree. |
| 399 RefPtrWillBeRawPtr<Element> newChild = target->cloneElementWithoutChildren()
; | 399 RefPtrWillBeRawPtr<Element> newChild = target->cloneElementWithoutChildren()
; |
| 400 m_targetElementInstance = toSVGElement(newChild.get()); | 400 m_targetElementInstance = toSVGElement(newChild.get()); |
| 401 ShadowRoot* shadowTreeRootElement = closedShadowRoot(); | 401 ShadowRoot* shadowTreeRootElement = closedShadowRoot(); |
| 402 shadowTreeRootElement->appendChild(newChild.release()); | 402 shadowTreeRootElement->appendChild(newChild.release()); |
| 403 | 403 |
| 404 // Clone the target subtree into the shadow tree, not handling <use> and <sy
mbol> yet. | 404 // Clone the target subtree into the shadow tree, not handling <use> and <sy
mbol> yet. |
| 405 | 405 |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 | 781 |
| 782 if (m_resource) | 782 if (m_resource) |
| 783 m_resource->removeClient(this); | 783 m_resource->removeClient(this); |
| 784 | 784 |
| 785 m_resource = resource; | 785 m_resource = resource; |
| 786 if (m_resource) | 786 if (m_resource) |
| 787 m_resource->addClient(this); | 787 m_resource->addClient(this); |
| 788 } | 788 } |
| 789 | 789 |
| 790 } | 790 } |
| OLD | NEW |