| 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 778e50f556ffbc4e5bc36735d705130aae9856a5..2be0babc7f97466b6837beff9eec08d260a8e0f1 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/UndoStack.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/UndoStack.cpp
|
| @@ -28,7 +28,6 @@
|
|
|
| #include "core/dom/ContainerNode.h"
|
| #include "core/editing/commands/UndoStep.h"
|
| -#include "platform/EventDispatchForbiddenScope.h"
|
| #include "wtf/TemporaryChange.h"
|
|
|
| namespace blink {
|
| @@ -63,25 +62,6 @@ void UndoStack::registerRedoStep(UndoStep* step)
|
| m_redoStack.append(step);
|
| }
|
|
|
| -void UndoStack::didUnloadFrame(const LocalFrame& frame)
|
| -{
|
| - EventDispatchForbiddenScope assertNoEventDispatch;
|
| - filterOutUndoSteps(m_undoStack, frame);
|
| - filterOutUndoSteps(m_redoStack, frame);
|
| -}
|
| -
|
| -void UndoStack::filterOutUndoSteps(UndoStepStack& stack, const LocalFrame& frame)
|
| -{
|
| - UndoStepStack newStack;
|
| - while (!stack.isEmpty()) {
|
| - UndoStep* step = stack.first().get();
|
| - if (!step->belongsTo(frame))
|
| - newStack.append(step);
|
| - stack.removeFirst();
|
| - }
|
| - stack.swap(newStack);
|
| -}
|
| -
|
| bool UndoStack::canUndo() const
|
| {
|
| return !m_undoStack.isEmpty();
|
| @@ -117,6 +97,12 @@ void UndoStack::redo()
|
| }
|
| }
|
|
|
| +void UndoStack::clear()
|
| +{
|
| + m_undoStack.clear();
|
| + m_redoStack.clear();
|
| +}
|
| +
|
| DEFINE_TRACE(UndoStack)
|
| {
|
| visitor->trace(m_undoStack);
|
|
|