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

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

Issue 2639483002: Add sequence number to undo steps (Closed)
Patch Set: Rebase Created 3 years, 10 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 | « third_party/WebKit/Source/core/editing/commands/UndoStep.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/commands/UndoStep.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/UndoStep.cpp b/third_party/WebKit/Source/core/editing/commands/UndoStep.cpp
index bbc47d2ad5d3750119842c5ce9b93e9867679904..95272c8391d293c24241157e712d90c0d61a0704 100644
--- a/third_party/WebKit/Source/core/editing/commands/UndoStep.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/UndoStep.cpp
@@ -9,6 +9,10 @@
namespace blink {
+namespace {
+uint64_t s_currentSequenceNumber = 0;
+}
+
UndoStep* UndoStep::create(Document* document,
const VisibleSelection& startingSelection,
const VisibleSelection& endingSelection,
@@ -25,7 +29,8 @@ UndoStep::UndoStep(Document* document,
m_endingSelection(endingSelection),
m_startingRootEditableElement(startingSelection.rootEditableElement()),
m_endingRootEditableElement(endingSelection.rootEditableElement()),
- m_inputType(inputType) {}
+ m_inputType(inputType),
+ m_sequenceNumber(++s_currentSequenceNumber) {}
void UndoStep::unapply() {
DCHECK(m_document);
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/UndoStep.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698