OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 static_cast<Element*>(node.get())->normalizeAttributes(); | 708 static_cast<Element*>(node.get())->normalizeAttributes(); |
709 | 709 |
710 if (node == this) | 710 if (node == this) |
711 break; | 711 break; |
712 | 712 |
713 if (type != TEXT_NODE) { | 713 if (type != TEXT_NODE) { |
714 node = node->traverseNextNodePostOrder(); | 714 node = node->traverseNextNodePostOrder(); |
715 continue; | 715 continue; |
716 } | 716 } |
717 | 717 |
718 Text* text = static_cast<Text*>(node.get()); | 718 RefPtr<Text> text = static_cast<Text*>(node.get()); |
719 | 719 |
720 // Remove empty text nodes. | 720 // Remove empty text nodes. |
721 if (!text->length()) { | 721 if (!text->length()) { |
722 // Care must be taken to get the next node before removing the curre
nt node. | 722 // Care must be taken to get the next node before removing the curre
nt node. |
723 node = node->traverseNextNodePostOrder(); | 723 node = node->traverseNextNodePostOrder(); |
724 ExceptionCode ec; | 724 ExceptionCode ec; |
725 text->remove(ec); | 725 text->remove(ec); |
726 continue; | 726 continue; |
727 } | 727 } |
728 | 728 |
(...skipping 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3043 | 3043 |
3044 #ifndef NDEBUG | 3044 #ifndef NDEBUG |
3045 | 3045 |
3046 void showTree(const WebCore::Node* node) | 3046 void showTree(const WebCore::Node* node) |
3047 { | 3047 { |
3048 if (node) | 3048 if (node) |
3049 node->showTreeForThis(); | 3049 node->showTreeForThis(); |
3050 } | 3050 } |
3051 | 3051 |
3052 #endif | 3052 #endif |
OLD | NEW |