Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index e08d54e55da2f5c90cd28f11b6e491676b43b89a..7bac0d8efa01fb8e92b970026ec7b548fa11fd01 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -997,6 +997,16 @@ void Node::detach(const AttachContext& context) |
#endif |
} |
+void Node::reattachWhitespaceSiblings() const |
+{ |
+ for (Node* sibling = nextSibling(); sibling; sibling = sibling->nextSibling()) { |
+ if (sibling->isTextNode() && toText(sibling)->containsOnlyWhitespace()) |
+ sibling->reattach(); |
+ else if (sibling->renderer()) |
+ return; |
+ } |
+} |
+ |
// FIXME: This code is used by editing. Seems like it could move over there and not pollute Node. |
Node *Node::previousNodeConsideringAtomicNodes() const |
{ |