| Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| index 119bdb6bdcbf8fcbae6172e65137ce082cc81c09..5ec5142351d9917d16c93412fa7ba116eee04229 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| @@ -364,7 +364,7 @@ void CompositeEditCommand::insertNodeAt(RawPtr<Node> insertChild, const Position
|
| splitTextNode(toText(refChild), offset);
|
|
|
| // Mutation events (bug 22634) from the text node insertion may have removed the refChild
|
| - if (!refChild->inDocument())
|
| + if (!refChild->inShadowIncludingDocument())
|
| return;
|
| insertNodeBefore(insertChild, refChild, editingState);
|
| } else {
|
| @@ -466,7 +466,7 @@ HTMLSpanElement* CompositeEditCommand::replaceElementWithSpanPreservingChildrenA
|
| // Returning a raw pointer here is OK because the command is retained by
|
| // applyCommandToComposite (thus retaining the span), and the span is also
|
| // in the DOM tree, and thus alive whie it has a parent.
|
| - ASSERT(command->spanElement()->inDocument());
|
| + ASSERT(command->spanElement()->inShadowIncludingDocument());
|
| return command->spanElement();
|
| }
|
|
|
| @@ -1053,7 +1053,7 @@ void CompositeEditCommand::pushAnchorElementDown(Element* anchorNode, EditingSta
|
| if (editingState->isAborted())
|
| return;
|
| // Clones of anchorNode have been pushed down, now remove it.
|
| - if (anchorNode->inDocument())
|
| + if (anchorNode->inShadowIncludingDocument())
|
| removeNodePreservingChildren(anchorNode, editingState);
|
| }
|
|
|
| @@ -1100,7 +1100,7 @@ void CompositeEditCommand::cloneParagraphUnderNewElement(const Position& start,
|
|
|
| // Scripts specified in javascript protocol may remove |outerNode|
|
| // during insertion, e.g. <iframe src="javascript:...">
|
| - if (!outerNode->inDocument())
|
| + if (!outerNode->inShadowIncludingDocument())
|
| return;
|
|
|
| // Handle the case of paragraphs with more than one node,
|
| @@ -1311,11 +1311,11 @@ void CompositeEditCommand::moveParagraphs(const VisiblePosition& startOfParagrap
|
| if (editingState->isAborted())
|
| return;
|
|
|
| - ASSERT(destination.deepEquivalent().inDocument());
|
| + ASSERT(destination.deepEquivalent().inShadowIncludingDocument());
|
| cleanupAfterDeletion(editingState, destination);
|
| if (editingState->isAborted())
|
| return;
|
| - ASSERT(destination.deepEquivalent().inDocument());
|
| + ASSERT(destination.deepEquivalent().inShadowIncludingDocument());
|
|
|
| // Add a br if pruning an empty block level element caused a collapse. For example:
|
| // foo^
|
|
|