Chromium Code Reviews| 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..7c50a2942978072a03f64afddd4fc47f45682075 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/UndoStack.cpp |
| +++ b/third_party/WebKit/Source/core/editing/commands/UndoStack.cpp |
| @@ -63,23 +63,12 @@ void UndoStack::registerRedoStep(UndoStep* step) |
| m_redoStack.append(step); |
| } |
| -void UndoStack::didUnloadFrame(const LocalFrame& frame) |
| +void UndoStack::didUnloadFrame() |
| { |
| + // TODO(xiaochengh): What's the use of this scope? Can we remove it? |
|
yosin_UTC9
2016/07/01 09:21:21
This event scope to prevent JavaScript event handl
Xiaocheng
2016/07/04 06:29:23
Thanks. This method is removed.
|
| 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); |
| + m_undoStack.clear(); |
| + m_redoStack.clear(); |
| } |
| bool UndoStack::canUndo() const |