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