summaryrefslogtreecommitdiffstats
path: root/WebCore/editing/RemoveFormatCommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/editing/RemoveFormatCommand.cpp')
-rw-r--r--WebCore/editing/RemoveFormatCommand.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/WebCore/editing/RemoveFormatCommand.cpp b/WebCore/editing/RemoveFormatCommand.cpp
index e456df6..257172b 100644
--- a/WebCore/editing/RemoveFormatCommand.cpp
+++ b/WebCore/editing/RemoveFormatCommand.cpp
@@ -49,7 +49,10 @@ RemoveFormatCommand::RemoveFormatCommand(Document* document)
void RemoveFormatCommand::doApply()
{
Frame* frame = document()->frame();
-
+
+ if (!frame->selection()->selection().isNonOrphanedCaretOrRange())
+ return;
+
// Make a plain text string from the selection to remove formatting like tables and lists.
String string = plainText(frame->selection()->selection().toNormalizedRange().get());