summaryrefslogtreecommitdiffstats
path: root/WebCore/editing/AppendNodeCommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/editing/AppendNodeCommand.cpp')
-rw-r--r--WebCore/editing/AppendNodeCommand.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/WebCore/editing/AppendNodeCommand.cpp b/WebCore/editing/AppendNodeCommand.cpp
index ef79e9c..6178641 100644
--- a/WebCore/editing/AppendNodeCommand.cpp
+++ b/WebCore/editing/AppendNodeCommand.cpp
@@ -44,12 +44,18 @@ AppendNodeCommand::AppendNodeCommand(PassRefPtr<Element> parent, PassRefPtr<Node
void AppendNodeCommand::doApply()
{
+ if (!m_parent->isContentEditable() && m_parent->attached())
+ return;
+
ExceptionCode ec;
m_parent->appendChild(m_node.get(), ec);
}
void AppendNodeCommand::doUnapply()
{
+ if (!m_parent->isContentEditable())
+ return;
+
ExceptionCode ec;
m_node->remove(ec);
}