Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1108)

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h

Issue 2641803002: Move EditCommand::starting/endingSelection() to CompositeEditCommand (1/2) (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
index 947d8f11752a1d22243bc6a0ac43ff90101309a1..2a26f4b4fb43df6a95b9984397a413711a797e09 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
@@ -51,6 +51,19 @@ class CORE_EXPORT CompositeEditCommand : public EditCommand {
~CompositeEditCommand() override;
+ const VisibleSelection& startingSelection() const {
+ return m_startingSelection;
+ }
+ const VisibleSelection& endingSelection() const { return m_endingSelection; }
+
+ void setStartingSelection(const VisibleSelection&);
+ void setEndingSelection(const SelectionInDOMTree&);
+ // TODO(yosin): |setEndingVisibleSelection()| will take |SelectionInUndoStep|
+ // You should not use this function other than copying existing selection.
+ void setEndingVisibleSelection(const VisibleSelection&);
+
+ void setParent(CompositeEditCommand*) override;
+
// Returns |false| if the command failed. e.g. It's aborted.
bool apply();
bool isFirstCommand(EditCommand* command) {
@@ -223,6 +236,8 @@ class CORE_EXPORT CompositeEditCommand : public EditCommand {
private:
bool isCompositeEditCommand() const final { return true; }
+ VisibleSelection m_startingSelection;
+ VisibleSelection m_endingSelection;
Member<UndoStep> m_undoStep;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698