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, 3 insertions, 2 deletions
diff --git a/WebCore/editing/RemoveFormatCommand.cpp b/WebCore/editing/RemoveFormatCommand.cpp
index 6d681ee..9243adc 100644
--- a/WebCore/editing/RemoveFormatCommand.cpp
+++ b/WebCore/editing/RemoveFormatCommand.cpp
@@ -35,6 +35,7 @@
#include "SelectionController.h"
#include "TextIterator.h"
#include "TypingCommand.h"
+#include "ApplyStyleCommand.h"
namespace WebCore {
@@ -55,8 +56,8 @@ void RemoveFormatCommand::doApply()
// Get the default style for this editable root, it's the style that we'll give the
// content that we're operating on.
Node* root = frame->selection()->rootEditableElement();
- RefPtr<CSSMutableStyleDeclaration> defaultStyle = computedStyle(root)->copyInheritableProperties();
-
+ RefPtr<CSSMutableStyleDeclaration> defaultStyle = editingStyleAtPosition(Position(root, 0));
+
// Delete the selected content.
// FIXME: We should be able to leave this to insertText, but its delete operation
// doesn't preserve the style we're about to set.