| Index: Source/core/dom/Node.cpp
|
| diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
|
| index 7279f0162b99c7de545c988f7f261a37a6a04faf..09dad25fc81f22313941c74156c01e7c0dd55d46 100644
|
| --- a/Source/core/dom/Node.cpp
|
| +++ b/Source/core/dom/Node.cpp
|
| @@ -59,6 +59,7 @@
|
| #include "core/dom/shadow/InsertionPoint.h"
|
| #include "core/dom/shadow/ShadowRoot.h"
|
| #include "core/editing/htmlediting.h"
|
| +#include "core/editing/markup.h"
|
| #include "core/events/BeforeLoadEvent.h"
|
| #include "core/events/Event.h"
|
| #include "core/events/EventDispatchMediator.h"
|
| @@ -1497,11 +1498,7 @@ void Node::setTextContent(const String& text)
|
| case ELEMENT_NODE:
|
| case ATTRIBUTE_NODE:
|
| case DOCUMENT_FRAGMENT_NODE: {
|
| - RefPtr<ContainerNode> container = toContainerNode(this);
|
| - ChildListMutationScope mutation(*this);
|
| - container->removeChildren();
|
| - if (!text.isEmpty())
|
| - container->appendChild(document().createTextNode(text), ASSERT_NO_EXCEPTION);
|
| + replaceChildrenWithText(toContainerNode(this), text, ASSERT_NO_EXCEPTION);
|
| return;
|
| }
|
| case DOCUMENT_NODE:
|
|
|