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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 } | 1113 } |
1114 } | 1114 } |
1115 | 1115 |
1116 clearFlag(IsAttachedFlag); | 1116 clearFlag(IsAttachedFlag); |
1117 | 1117 |
1118 #ifndef NDEBUG | 1118 #ifndef NDEBUG |
1119 detachingNode = 0; | 1119 detachingNode = 0; |
1120 #endif | 1120 #endif |
1121 } | 1121 } |
1122 | 1122 |
| 1123 void Node::reattachWhitespaceSiblings() const |
| 1124 { |
| 1125 for (Node* sibling = nextSibling(); sibling; sibling = sibling->nextSibling(
)) { |
| 1126 if (sibling->renderer()) |
| 1127 return; |
| 1128 if (sibling->isTextNode() && toText(sibling)->containsOnlyWhitespace()) |
| 1129 sibling->reattach(); |
| 1130 } |
| 1131 } |
| 1132 |
1123 // FIXME: This code is used by editing. Seems like it could move over there and
not pollute Node. | 1133 // FIXME: This code is used by editing. Seems like it could move over there and
not pollute Node. |
1124 Node *Node::previousNodeConsideringAtomicNodes() const | 1134 Node *Node::previousNodeConsideringAtomicNodes() const |
1125 { | 1135 { |
1126 if (previousSibling()) { | 1136 if (previousSibling()) { |
1127 Node *n = previousSibling(); | 1137 Node *n = previousSibling(); |
1128 while (!isAtomicNode(n) && n->lastChild()) | 1138 while (!isAtomicNode(n) && n->lastChild()) |
1129 n = n->lastChild(); | 1139 n = n->lastChild(); |
1130 return n; | 1140 return n; |
1131 } | 1141 } |
1132 else if (parentNode()) { | 1142 else if (parentNode()) { |
(...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2755 node->showTreeForThis(); | 2765 node->showTreeForThis(); |
2756 } | 2766 } |
2757 | 2767 |
2758 void showNodePath(const WebCore::Node* node) | 2768 void showNodePath(const WebCore::Node* node) |
2759 { | 2769 { |
2760 if (node) | 2770 if (node) |
2761 node->showNodePathForThis(); | 2771 node->showNodePathForThis(); |
2762 } | 2772 } |
2763 | 2773 |
2764 #endif | 2774 #endif |
OLD | NEW |