OSDN Git Service

Merge WebKit at r71558: Initial merge by git.
[android-x86/external-webkit.git] / WebCore / editing / RemoveFormatCommand.cpp
index f8807e2..42833cb 100644 (file)
 #include "RemoveFormatCommand.h"
 
 #include "ApplyStyleCommand.h"
-#include "CSSComputedStyleDeclaration.h"
-#include "CSSMutableStyleDeclaration.h"
-#include "CSSValueKeywords.h"
-#include "Editor.h"
+#include "EditingStyle.h"
+#include "Element.h"
 #include "Frame.h"
-#include "HTMLElement.h"
 #include "HTMLNames.h"
-#include "VisibleSelection.h"
 #include "SelectionController.h"
-#include "TextIterator.h"
-#include "TypingCommand.h"
-#include "htmlediting.h"
 
 namespace WebCore {
 
@@ -92,9 +85,9 @@ 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 = ApplyStyleCommand::editingStyleAtPosition(Position(root, 0));
+    RefPtr<EditingStyle> defaultStyle = EditingStyle::create(root);
 
-    applyCommandToComposite(ApplyStyleCommand::create(document(), defaultStyle.get(), isElementForRemoveFormatCommand, editingAction()));
+    applyCommandToComposite(ApplyStyleCommand::create(document(), defaultStyle->style(), isElementForRemoveFormatCommand, editingAction()));
 }
 
 }