Chromium Code Reviews| Index: Source/core/editing/CompositeEditCommand.cpp |
| diff --git a/Source/core/editing/CompositeEditCommand.cpp b/Source/core/editing/CompositeEditCommand.cpp |
| index 98e8af33e8ad90cf68acbd0ff955a0b0ce0bb379..30a20dfbc338dd4e0e79f672c7b5e0df419c9fdc 100644 |
| --- a/Source/core/editing/CompositeEditCommand.cpp |
| +++ b/Source/core/editing/CompositeEditCommand.cpp |
| @@ -156,8 +156,13 @@ CompositeEditCommand::~CompositeEditCommand() |
| ASSERT(isTopLevelCommand() || !m_composition); |
| } |
| +static int applyNestingCounter; |
| + |
| void CompositeEditCommand::apply() |
| { |
| + if (applyNestingCounter) |
| + return; |
| + |
| if (!endingSelection().isContentRichlyEditable()) { |
| switch (editingAction()) { |
| case EditActionTyping: |
| @@ -183,7 +188,9 @@ void CompositeEditCommand::apply() |
| ASSERT(frame); |
| { |
| EventQueueScope scope; |
| + ++applyNestingCounter; |
|
leviw_travelin_and_unemployed
2013/11/13 21:16:18
I like the idea... Can we make this RAII instead?
|
| doApply(); |
| + --applyNestingCounter; |
| } |
| // Only need to call appliedEditing for top-level commands, |