| Index: third_party/WebKit/Source/core/editing/commands/ReplaceNodeWithSpanCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceNodeWithSpanCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceNodeWithSpanCommand.cpp
|
| index 8a945b5b121461bb725b9ee84caef28a8a322670..66e2b6536d2aed6dba86a00329b4e56741a70513 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ReplaceNodeWithSpanCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ReplaceNodeWithSpanCommand.cpp
|
| @@ -50,7 +50,7 @@ ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand(HTMLElement* element)
|
|
|
| static void swapInNodePreservingAttributesAndChildren(HTMLElement* newElement, HTMLElement& elementToReplace)
|
| {
|
| - DCHECK(elementToReplace.inShadowIncludingDocument()) << elementToReplace;
|
| + DCHECK(elementToReplace.isConnected()) << elementToReplace;
|
| ContainerNode* parentNode = elementToReplace.parentNode();
|
| parentNode->insertBefore(newElement, &elementToReplace);
|
|
|
| @@ -67,7 +67,7 @@ static void swapInNodePreservingAttributesAndChildren(HTMLElement* newElement, H
|
|
|
| void ReplaceNodeWithSpanCommand::doApply(EditingState*)
|
| {
|
| - if (!m_elementToReplace->inShadowIncludingDocument())
|
| + if (!m_elementToReplace->isConnected())
|
| return;
|
| if (!m_spanElement)
|
| m_spanElement = HTMLSpanElement::create(m_elementToReplace->document());
|
| @@ -76,7 +76,7 @@ void ReplaceNodeWithSpanCommand::doApply(EditingState*)
|
|
|
| void ReplaceNodeWithSpanCommand::doUnapply()
|
| {
|
| - if (!m_spanElement->inShadowIncludingDocument())
|
| + if (!m_spanElement->isConnected())
|
| return;
|
| swapInNodePreservingAttributesAndChildren(m_elementToReplace.get(), *m_spanElement);
|
| }
|
|
|