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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 static inline void removeDisallowedElementsFromSubtree(Element* subtree) | 670 static inline void removeDisallowedElementsFromSubtree(Element* subtree) |
671 { | 671 { |
672 ASSERT(!subtree->inDocument()); | 672 ASSERT(!subtree->inDocument()); |
673 Element* element = ElementTraversal::firstWithin(subtree); | 673 Element* element = ElementTraversal::firstWithin(subtree); |
674 while (element) { | 674 while (element) { |
675 if (isDisallowedElement(element)) { | 675 if (isDisallowedElement(element)) { |
676 Element* next = ElementTraversal::nextSkippingChildren(element, subt
ree); | 676 Element* next = ElementTraversal::nextSkippingChildren(element, subt
ree); |
677 // The subtree is not in document so this won't generate events that
could mutate the tree. | 677 // The subtree is not in document so this won't generate events that
could mutate the tree. |
678 element->parentNode()->removeChild(element); | 678 element->parentNode()->removeChild(element); |
679 element = next; | 679 element = next; |
680 } else | 680 } else { |
681 element = ElementTraversal::next(element, subtree); | 681 element = ElementTraversal::next(*element, subtree); |
| 682 } |
682 } | 683 } |
683 } | 684 } |
684 | 685 |
685 void SVGUseElement::buildShadowTree(SVGElement* target, SVGElementInstance* targ
etInstance) | 686 void SVGUseElement::buildShadowTree(SVGElement* target, SVGElementInstance* targ
etInstance) |
686 { | 687 { |
687 // For instance <use> on <foreignObject> (direct case). | 688 // For instance <use> on <foreignObject> (direct case). |
688 if (isDisallowedElement(target)) | 689 if (isDisallowedElement(target)) |
689 return; | 690 return; |
690 | 691 |
691 RefPtr<Element> newChild = targetInstance->correspondingElement()->cloneElem
entWithChildren(); | 692 RefPtr<Element> newChild = targetInstance->correspondingElement()->cloneElem
entWithChildren(); |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 | 995 |
995 if (m_resource) | 996 if (m_resource) |
996 m_resource->removeClient(this); | 997 m_resource->removeClient(this); |
997 | 998 |
998 m_resource = resource; | 999 m_resource = resource; |
999 if (m_resource) | 1000 if (m_resource) |
1000 m_resource->addClient(this); | 1001 m_resource->addClient(this); |
1001 } | 1002 } |
1002 | 1003 |
1003 } | 1004 } |
OLD | NEW |