| Index: Source/core/editing/markup.cpp
|
| diff --git a/Source/core/editing/markup.cpp b/Source/core/editing/markup.cpp
|
| index 35f44dd4812903505005216ef265c9dcb7e39b39..293e68945158728032a3786b81845f68f9b3d04a 100644
|
| --- a/Source/core/editing/markup.cpp
|
| +++ b/Source/core/editing/markup.cpp
|
| @@ -1073,4 +1073,18 @@ void replaceChildrenWithText(ContainerNode* container, const String& text, Excep
|
| containerNode->appendChild(textNode.release(), es);
|
| }
|
|
|
| +void mergeWithNextTextNode(PassRefPtr<Node> node, ExceptionState& es)
|
| +{
|
| + ASSERT(node && node->isTextNode());
|
| + Node* next = node->nextSibling();
|
| + if (!next || !next->isTextNode())
|
| + return;
|
| +
|
| + RefPtr<Text> textNode = toText(node.get());
|
| + RefPtr<Text> textNext = toText(next);
|
| + textNode->appendData(textNext->data());
|
| + if (textNext->parentNode()) // Might have been removed by mutation event.
|
| + textNext->remove(es);
|
| +}
|
| +
|
| }
|
|
|