Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/commands/RemoveNodeCommand.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/commands/RemoveNodeCommand.cpp b/third_party/WebKit/Source/core/editing/commands/RemoveNodeCommand.cpp |
| index a9b8eade27f555d254c08ed0f069fde070dfa466..b6404ec5e114178a1a7499be7b18080dea079c4f 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/RemoveNodeCommand.cpp |
| +++ b/third_party/WebKit/Source/core/editing/commands/RemoveNodeCommand.cpp |
| @@ -27,6 +27,7 @@ |
| #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| #include "core/dom/Node.h" |
| +#include "core/editing/commands/EditingState.h" |
| #include "wtf/Assertions.h" |
| namespace blink { |
| @@ -40,7 +41,7 @@ RemoveNodeCommand::RemoveNodeCommand(PassRefPtrWillBeRawPtr<Node> node, ShouldAs |
| ASSERT(m_node->parentNode()); |
| } |
| -void RemoveNodeCommand::doApply(EditingState*) |
| +void RemoveNodeCommand::doApply(EditingState* editingState) |
| { |
| ContainerNode* parent = m_node->parentNode(); |
| if (!parent || (m_shouldAssumeContentIsAlwaysEditable == DoNotAssumeContentIsAlwaysEditable |
| @@ -52,6 +53,8 @@ void RemoveNodeCommand::doApply(EditingState*) |
| m_refChild = m_node->nextSibling(); |
| m_node->remove(IGNORE_EXCEPTION); |
|
tkent
2016/02/10 05:24:54
Here is the backdoor of IFRAME unload event handle
yosin_UTC9
2016/02/10 05:32:17
It it better we check an exception from |Node::rem
tkent
2016/02/10 05:47:30
I don't think so. I believe this Node::remove() n
|
| + ASSERT_IN_EDITING_COMMAND(m_node->document().frame()); |
|
yosin_UTC9
2016/02/10 05:32:17
I love to have a comment for this assert what you
tkent
2016/02/10 05:47:30
Done.
|
| + ASSERT_IN_EDITING_COMMAND(m_node->document().documentElement()); |
| } |
| void RemoveNodeCommand::doUnapply() |