| 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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 } | 990 } |
| 991 } | 991 } |
| 992 | 992 |
| 993 clearFlag(IsAttachedFlag); | 993 clearFlag(IsAttachedFlag); |
| 994 | 994 |
| 995 #ifndef NDEBUG | 995 #ifndef NDEBUG |
| 996 detachingNode = 0; | 996 detachingNode = 0; |
| 997 #endif | 997 #endif |
| 998 } | 998 } |
| 999 | 999 |
| 1000 void Node::reattachWhitespaceSiblings() const |
| 1001 { |
| 1002 for (Node* sibling = nextSibling(); sibling; sibling = sibling->nextSibling(
)) { |
| 1003 if (sibling->isTextNode() && toText(sibling)->containsOnlyWhitespace()) |
| 1004 sibling->reattach(); |
| 1005 else if (sibling->renderer()) |
| 1006 return; |
| 1007 } |
| 1008 } |
| 1009 |
| 1000 // FIXME: This code is used by editing. Seems like it could move over there and
not pollute Node. | 1010 // FIXME: This code is used by editing. Seems like it could move over there and
not pollute Node. |
| 1001 Node *Node::previousNodeConsideringAtomicNodes() const | 1011 Node *Node::previousNodeConsideringAtomicNodes() const |
| 1002 { | 1012 { |
| 1003 if (previousSibling()) { | 1013 if (previousSibling()) { |
| 1004 Node *n = previousSibling(); | 1014 Node *n = previousSibling(); |
| 1005 while (!isAtomicNode(n) && n->lastChild()) | 1015 while (!isAtomicNode(n) && n->lastChild()) |
| 1006 n = n->lastChild(); | 1016 n = n->lastChild(); |
| 1007 return n; | 1017 return n; |
| 1008 } | 1018 } |
| 1009 else if (parentNode()) { | 1019 else if (parentNode()) { |
| (...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2631 node->showTreeForThis(); | 2641 node->showTreeForThis(); |
| 2632 } | 2642 } |
| 2633 | 2643 |
| 2634 void showNodePath(const WebCore::Node* node) | 2644 void showNodePath(const WebCore::Node* node) |
| 2635 { | 2645 { |
| 2636 if (node) | 2646 if (node) |
| 2637 node->showNodePathForThis(); | 2647 node->showNodePathForThis(); |
| 2638 } | 2648 } |
| 2639 | 2649 |
| 2640 #endif | 2650 #endif |
| OLD | NEW |