Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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^

Powered by Google App Engine
This is Rietveld 408576698