Chromium Code Reviews| Index: Source/core/editing/UndoStack.cpp |
| diff --git a/Source/core/editing/UndoStack.cpp b/Source/core/editing/UndoStack.cpp |
| index 1ffd4273e98587e652a99fd26b6cc4afcb380c04..4359edbed61b8fc1bb573e639a55bb144c0c340f 100644 |
| --- a/Source/core/editing/UndoStack.cpp |
| +++ b/Source/core/editing/UndoStack.cpp |
| @@ -121,4 +121,13 @@ void UndoStack::redo() |
| } |
| } |
| +void UndoStack::clear() |
| +{ |
| + if (canUndo()) |
|
eseidel
2014/03/04 02:08:16
Why check canUndo here?
|
| + m_undoStack.clear(); |
| + |
| + if (canRedo()) |
| + m_redoStack.clear(); |
| +} |
| + |
| } // namesace WebCore |