Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/Editor.h |
| diff --git a/third_party/WebKit/Source/core/editing/Editor.h b/third_party/WebKit/Source/core/editing/Editor.h |
| index 9cae6e9bd54aea620e3c1c893c92f6c77d417c27..3991fbe74aaaf89d6d80894a25bae99c7e877ef4 100644 |
| --- a/third_party/WebKit/Source/core/editing/Editor.h |
| +++ b/third_party/WebKit/Source/core/editing/Editor.h |
| @@ -44,6 +44,7 @@ |
| namespace blink { |
| class CompositeEditCommand; |
| +class DragData; |
| class DummyPageHolder; |
| class EditCommandComposition; |
| class EditorClient; |
| @@ -58,6 +59,9 @@ class TextEvent; |
| class UndoStack; |
| enum class DeleteDirection; |
| +enum class SmartDelete { Yes, No }; |
|
yosin_UTC9
2016/10/03 09:19:03
How about enum class DeleteMode { Simple, Smart }?
chongz
2016/10/04 02:18:39
Done.
|
| +enum class SmartInsert { Yes, No }; |
|
yosin_UTC9
2016/10/03 09:19:03
How about enum class InsertMode { Simple, Smart }?
chongz
2016/10/04 02:18:39
Done.
|
| +enum class ChosePlainText { Yes, No }; |
|
yosin_UTC9
2016/10/03 09:19:03
How about DragSourceType { HTMLSource, PlainTextSo
chongz
2016/10/04 02:18:39
Done.
|
| enum EditorCommandSource { CommandFromMenuOrKeyBinding, CommandFromDOM }; |
| enum EditorParagraphSeparator { EditorParagraphSeparatorIsDiv, EditorParagraphSeparatorIsP }; |
| @@ -106,10 +110,11 @@ public: |
| void removeFormattingAndStyle(); |
| + void registerCommandGroup(CompositeEditCommand* commandGroupWrapper); |
| void clearLastEditCommand(); |
| bool deleteWithDirection(DeleteDirection, TextGranularity, bool killRing, bool isTypingAction); |
| - void deleteSelectionWithSmartDelete(bool smartDelete, InputEvent::InputType); |
| + void deleteSelectionWithSmartDelete(bool smartDelete, InputEvent::InputType, const Position& referenceMovePosition = Position()); |
|
yosin_UTC9
2016/10/03 09:19:03
Is it better to use |SmartDelete| enum class inste
chongz
2016/10/04 02:18:39
Done.
|
| void applyStyle(StylePropertySet*, InputEvent::InputType); |
| void applyParagraphStyle(StylePropertySet*, InputEvent::InputType); |
| @@ -205,6 +210,7 @@ public: |
| void pasteAsPlainText(const String&, bool smartReplace); |
| Element* findEventTargetFrom(const VisibleSelection&) const; |
| + Element* findEventTargetFromSelection() const; |
| bool findString(const String&, FindOptions); |
| @@ -230,7 +236,10 @@ public: |
| // TODO(xiaochengh): Replace |bool| parameters by |enum|. |
| void replaceSelectionAfterDragging(DocumentFragment*, bool smartReplace, bool plainText); |
| - void moveSelectionAfterDragging(DocumentFragment*, const Position&, bool smartInsert, bool smartDelete); |
| + |
| + // Return false if frame was destroyed by event handler, should stop executing remaining actions. |
| + bool deleteSelectionAfterDraggingWithEvents(Element* dragSource, SmartDelete, const Position& referenceMovePosition); |
| + bool replaceSelectionAfterDraggingWithEvents(Element* dropTarget, DragData*, DocumentFragment*, Range* dropCaretRange, SmartInsert, ChosePlainText); |
| EditorParagraphSeparator defaultParagraphSeparator() const { return m_defaultParagraphSeparator; } |
| void setDefaultParagraphSeparator(EditorParagraphSeparator separator) { m_defaultParagraphSeparator = separator; } |
| @@ -289,8 +298,6 @@ private: |
| void changeSelectionAfterCommand(const VisibleSelection& newSelection, FrameSelection::SetSelectionOptions); |
| void notifyComponentsOnChangedSelection(); |
| - Element* findEventTargetFromSelection() const; |
| - |
| SpellChecker& spellChecker() const; |
| bool handleEditingKeyboardEvent(KeyboardEvent*); |