#ifndef Editor_h
#define Editor_h
-#include "core/clipboard/ClipboardAccessPolicy.h"
+#include "core/clipboard/DataTransferAccessPolicy.h"
#include "core/dom/DocumentMarker.h"
#include "core/editing/EditAction.h"
#include "core/editing/EditingBehavior.h"
#include "platform/PasteMode.h"
#include "platform/heap/Handle.h"
-namespace WebCore {
+namespace blink {
-class Clipboard;
class CompositeEditCommand;
+class DataTransfer;
class EditCommand;
class EditCommandComposition;
class EditorClient;
static void countEvent(ExecutionContext*, const Event*);
void copyImage(const HitTestResult&);
- void indent();
- void outdent();
void transpose();
bool shouldDeleteRange(Range*) const;
TriState selectionHasStyle(CSSPropertyID, const String& value) const;
String selectionStartCSSPropertyValue(CSSPropertyID);
- TriState selectionUnorderedListState() const;
- TriState selectionOrderedListState() const;
-
void removeFormattingAndStyle();
void clearLastEditCommand();
Command command(const String& commandName); // Command source is CommandFromMenuOrKeyBinding.
Command command(const String& commandName, EditorCommandSource);
- bool insertText(const String&, Event* triggeringEvent);
+ // |Editor::executeCommand| is implementation of |WebFrame::executeCommand|
+ // rather than |Document::execCommand|.
+ bool executeCommand(const String&);
+ bool executeCommand(const String& commandName, const String& value);
+
+ bool insertText(const String&, KeyboardEvent* triggeringEvent);
bool insertTextWithoutSendingTextEvent(const String&, bool selectInsertedText, TextEvent* triggeringEvent);
bool insertLineBreak();
bool insertParagraphSeparator();
void pasteAsFragment(PassRefPtrWillBeRawPtr<DocumentFragment>, bool smartReplace, bool matchStyle);
void pasteAsPlainText(const String&, bool smartReplace);
- Node* findEventTargetFrom(const VisibleSelection&) const;
+ Element* findEventTargetFrom(const VisibleSelection&) const;
bool findString(const String&, FindOptions);
// FIXME: Switch callers over to the FindOptions version and retire this one.
void pasteAsPlainTextWithPasteboard(Pasteboard*);
void pasteWithPasteboard(Pasteboard*);
void writeSelectionToPasteboard(Pasteboard*, Range*, const String& plainText);
- bool dispatchCPPEvent(const AtomicString&, ClipboardAccessPolicy, PasteMode = AllMimeTypes);
+ bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMode = AllMimeTypes);
void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent);
void changeSelectionAfterCommand(const VisibleSelection& newSelection, FrameSelection::SetSelectionOptions);
void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection, FrameSelection::SetSelectionOptions);
- Node* findEventTargetFromSelection() const;
+ Element* findEventTargetFromSelection() const;
PassRefPtrWillBeRawPtr<Range> rangeOfString(const String&, Range*, FindOptions);
SpellChecker& spellChecker() const;
- bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
+ bool handleEditingKeyboardEvent(blink::KeyboardEvent*);
};
inline void Editor::setStartNewKillRingSequence(bool flag)
}
-} // namespace WebCore
+} // namespace blink
#endif // Editor_h