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

Unified Diff: third_party/WebKit/Source/core/editing/commands/UndoStack.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 | « no previous file | third_party/WebKit/Source/core/editing/commands/UndoStep.h » ('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/UndoStack.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/UndoStack.cpp b/third_party/WebKit/Source/core/editing/commands/UndoStack.cpp
index 7f435982f87767a5c40c03c6590b17436a7cefc5..460b6afe82649400ce05ead0929371dc615f969a 100644
--- a/third_party/WebKit/Source/core/editing/commands/UndoStack.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/UndoStack.cpp
@@ -45,6 +45,8 @@ UndoStack* UndoStack::create() {
}
void UndoStack::registerUndoStep(UndoStep* step) {
+ if (m_undoStack.size())
+ DCHECK_GE(step->sequenceNumber(), m_undoStack.back()->sequenceNumber());
if (m_undoStack.size() == maximumUndoStackDepth)
m_undoStack.removeFirst(); // drop oldest item off the far end
if (!m_inRedo)
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/UndoStep.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698