| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google, Inc. All rights reserved. | 3 * Copyright (C) 2012 Google, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 void UndoStack::redo() | 106 void UndoStack::redo() |
| 107 { | 107 { |
| 108 if (canRedo()) { | 108 if (canRedo()) { |
| 109 UndoStepStack::iterator back = --m_redoStack.end(); | 109 UndoStepStack::iterator back = --m_redoStack.end(); |
| 110 UndoStep* step(back->get()); | 110 UndoStep* step(back->get()); |
| 111 m_redoStack.remove(back); | 111 m_redoStack.remove(back); |
| 112 | 112 |
| 113 ASSERT(!m_inRedo); | 113 DCHECK(!m_inRedo); |
| 114 TemporaryChange<bool> redoScope(m_inRedo, true); | 114 TemporaryChange<bool> redoScope(m_inRedo, true); |
| 115 step->reapply(); | 115 step->reapply(); |
| 116 // reapply will call us back to push this command onto the undo stack. | 116 // reapply will call us back to push this command onto the undo stack. |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 | 119 |
| 120 DEFINE_TRACE(UndoStack) | 120 DEFINE_TRACE(UndoStack) |
| 121 { | 121 { |
| 122 visitor->trace(m_undoStack); | 122 visitor->trace(m_undoStack); |
| 123 visitor->trace(m_redoStack); | 123 visitor->trace(m_redoStack); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace blink | 126 } // namespace blink |
| OLD | NEW |