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

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

Issue 2639483002: Add sequence number to undo steps (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
Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index 1774c343bd4b279a416abf17b1d09ecdefb22783..1ad5830bf0228f4b06d27a79c279a633de5fd3d3 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -98,7 +98,8 @@ EditCommandComposition::EditCommandComposition(
m_endingSelection(endingSelection),
m_startingRootEditableElement(startingSelection.rootEditableElement()),
m_endingRootEditableElement(endingSelection.rootEditableElement()),
- m_inputType(inputType) {}
+ m_inputType(inputType),
+ m_sequence(0) {}
bool EditCommandComposition::belongsTo(const LocalFrame& frame) const {
DCHECK(m_document);
@@ -150,6 +151,14 @@ InputEvent::InputType EditCommandComposition::inputType() const {
return m_inputType;
}
+int EditCommandComposition::sequence() const {
+ return m_sequence;
+}
+
+void EditCommandComposition::setSequence(int sequence) {
+ m_sequence = sequence;
+}
+
void EditCommandComposition::append(SimpleEditCommand* command) {
m_commands.push_back(command);
}

Powered by Google App Engine
This is Rietveld 408576698