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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/UndoStep.h

Issue 2639483002: Add sequence number to undo steps (Closed)
Patch Set: Wed Jan 18 19:11:59 JST 2017 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/UndoStack.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const VisibleSelection& endingSelection() const { return m_endingSelection; } 58 const VisibleSelection& endingSelection() const { return m_endingSelection; }
59 void setStartingSelection(const VisibleSelection&); 59 void setStartingSelection(const VisibleSelection&);
60 void setEndingSelection(const VisibleSelection&); 60 void setEndingSelection(const VisibleSelection&);
61 Element* startingRootEditableElement() const { 61 Element* startingRootEditableElement() const {
62 return m_startingRootEditableElement.get(); 62 return m_startingRootEditableElement.get();
63 } 63 }
64 Element* endingRootEditableElement() const { 64 Element* endingRootEditableElement() const {
65 return m_endingRootEditableElement.get(); 65 return m_endingRootEditableElement.get();
66 } 66 }
67 67
68 uint64_t sequence() const { return m_sequence; }
yosin_UTC9 2017/01/19 06:40:52 s/sequence/sequenceNumber()/ Term "sequence" is a
Xiaocheng 2017/01/19 07:52:30 Will do.
69 void setSequence(uint64_t passedSequence) { m_sequence = passedSequence; }
70
68 DECLARE_TRACE(); 71 DECLARE_TRACE();
69 72
70 private: 73 private:
71 UndoStep(Document*, 74 UndoStep(Document*,
72 const VisibleSelection& startingSelection, 75 const VisibleSelection& startingSelection,
73 const VisibleSelection& endingSelection, 76 const VisibleSelection& endingSelection,
74 InputEvent::InputType); 77 InputEvent::InputType);
75 78
76 Member<Document> m_document; 79 Member<Document> m_document;
77 VisibleSelection m_startingSelection; 80 VisibleSelection m_startingSelection;
78 VisibleSelection m_endingSelection; 81 VisibleSelection m_endingSelection;
79 HeapVector<Member<SimpleEditCommand>> m_commands; 82 HeapVector<Member<SimpleEditCommand>> m_commands;
80 Member<Element> m_startingRootEditableElement; 83 Member<Element> m_startingRootEditableElement;
81 Member<Element> m_endingRootEditableElement; 84 Member<Element> m_endingRootEditableElement;
82 InputEvent::InputType m_inputType; 85 InputEvent::InputType m_inputType;
86 uint64_t m_sequence;
yosin_UTC9 2017/01/19 06:40:52 Can we make |const unit64_t m_sequenceNumber| and
Xiaocheng 2017/01/19 07:52:30 For undo steps, is the creation order same as the
83 }; 87 };
84 88
85 } // namespace blink 89 } // namespace blink
86 90
87 #endif 91 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/UndoStack.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698