summaryrefslogtreecommitdiffstats
path: root/WebCore/editing/AppendNodeCommand.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-12-15 10:12:09 +0000
committerSteve Block <steveblock@google.com>2009-12-17 17:41:10 +0000
commit643ca7872b450ea4efacab6188849e5aac2ba161 (patch)
tree6982576c228bcd1a7efe98afed544d840751094c /WebCore/editing/AppendNodeCommand.cpp
parentd026980fde6eb3b01c1fe49441174e89cd1be298 (diff)
downloadexternal_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.zip
external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.gz
external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.bz2
Merge webkit.org at r51976 : Initial merge by git.
Change-Id: Ib0e7e2f0fb4bee5a186610272edf3186f0986b43
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);
}