| Index: Source/core/editing/CompositeEditCommand.cpp
|
| diff --git a/Source/core/editing/CompositeEditCommand.cpp b/Source/core/editing/CompositeEditCommand.cpp
|
| index 81703f44adf7df790a65c9db4fe6aa90892bad3c..ea5d01911afb1c539ddb9ad2024292f33e860178 100644
|
| --- a/Source/core/editing/CompositeEditCommand.cpp
|
| +++ b/Source/core/editing/CompositeEditCommand.cpp
|
| @@ -33,7 +33,6 @@
|
| #include "core/dom/DocumentMarkerController.h"
|
| #include "core/dom/NodeTraversal.h"
|
| #include "core/dom/Range.h"
|
| -#include "core/events/ScopedEventQueue.h"
|
| #include "core/dom/Text.h"
|
| #include "core/editing/AppendNodeCommand.h"
|
| #include "core/editing/ApplyStyleCommand.h"
|
| @@ -73,24 +72,6 @@ namespace WebCore {
|
|
|
| using namespace HTMLNames;
|
|
|
| -namespace {
|
| -class ReentrancyGuard {
|
| -public:
|
| - static bool isRecursiveCall() { return s_nestingCounter; }
|
| -
|
| - class Scope {
|
| - public:
|
| - Scope() { ++s_nestingCounter; }
|
| - ~Scope() { --s_nestingCounter; }
|
| - };
|
| - friend class Scope;
|
| -
|
| -private:
|
| - static int s_nestingCounter;
|
| -};
|
| -int ReentrancyGuard::s_nestingCounter;
|
| -}
|
| -
|
| PassRefPtr<EditCommandComposition> EditCommandComposition::create(Document* document,
|
| const VisibleSelection& startingSelection, const VisibleSelection& endingSelection, EditAction editAction)
|
| {
|
| @@ -182,14 +163,6 @@ CompositeEditCommand::~CompositeEditCommand()
|
|
|
| void CompositeEditCommand::apply()
|
| {
|
| - // We don't allow recusrive |apply()| to protect against attack code.
|
| - // Recursive call of |apply()| could be happened by moving iframe
|
| - // with script triggered by insertion, e.g. <iframe src="javascript:...">
|
| - // <iframe onload="...">. This usage is valid as of the specification
|
| - // although, it isn't common use case, rather it is used as attack code.
|
| - if (ReentrancyGuard::isRecursiveCall())
|
| - return;
|
| -
|
| if (!endingSelection().isContentRichlyEditable()) {
|
| switch (editingAction()) {
|
| case EditActionTyping:
|
| @@ -213,11 +186,7 @@ void CompositeEditCommand::apply()
|
|
|
| Frame* frame = document().frame();
|
| ASSERT(frame);
|
| - {
|
| - EventQueueScope eventQueueScope;
|
| - ReentrancyGuard::Scope reentrancyGuardScope;
|
| - doApply();
|
| - }
|
| + doApply();
|
|
|
| // Only need to call appliedEditing for top-level commands,
|
| // and TypingCommands do it on their own (see TypingCommand::typingAddedToOpenCommand).
|
|
|