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, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights 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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 static_cast<Element*>(node.get())->normalizeAttributes(); | 635 static_cast<Element*>(node.get())->normalizeAttributes(); |
636 | 636 |
637 if (node == this) | 637 if (node == this) |
638 break; | 638 break; |
639 | 639 |
640 if (type != TEXT_NODE) { | 640 if (type != TEXT_NODE) { |
641 node = node->traverseNextNodePostOrder(); | 641 node = node->traverseNextNodePostOrder(); |
642 continue; | 642 continue; |
643 } | 643 } |
644 | 644 |
645 Text* text = static_cast<Text*>(node.get()); | 645 RefPtr<Text> text = static_cast<Text*>(node.get()); |
646 | 646 |
647 // Remove empty text nodes. | 647 // Remove empty text nodes. |
648 if (!text->length()) { | 648 if (!text->length()) { |
649 // Care must be taken to get the next node before removing the curre
nt node. | 649 // Care must be taken to get the next node before removing the curre
nt node. |
650 node = node->traverseNextNodePostOrder(); | 650 node = node->traverseNextNodePostOrder(); |
651 ExceptionCode ec; | 651 ExceptionCode ec; |
652 text->remove(ec); | 652 text->remove(ec); |
653 continue; | 653 continue; |
654 } | 654 } |
655 | 655 |
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2958 | 2958 |
2959 #ifndef NDEBUG | 2959 #ifndef NDEBUG |
2960 | 2960 |
2961 void showTree(const WebCore::Node* node) | 2961 void showTree(const WebCore::Node* node) |
2962 { | 2962 { |
2963 if (node) | 2963 if (node) |
2964 node->showTreeForThis(); | 2964 node->showTreeForThis(); |
2965 } | 2965 } |
2966 | 2966 |
2967 #endif | 2967 #endif |
OLD | NEW |