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

Unified Diff: third_party/WebKit/Source/core/editing/commands/InsertListCommand.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/InsertListCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
index 35f06d19e328d199d7f1dacb99b0d3eae3987c62..96bd5559a4e780d1710577122d1ad90d3dbb2d1a 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
@@ -175,7 +175,7 @@ void InsertListCommand::doApply(EditingState* editingState)
// infinite loop and because there is no more work to be done.
// FIXME(<rdar://problem/5983974>): The endingSelection() may be incorrect here. Compute
// the new location of endOfSelection and use it as the end of the new selection.
- if (!startOfLastParagraph.deepEquivalent().inDocument())
+ if (!startOfLastParagraph.deepEquivalent().inShadowIncludingDocument())
return;
setEndingSelection(startOfCurrentParagraph);
@@ -288,7 +288,7 @@ bool InsertListCommand::doApplyForSingleParagraph(bool forceCreateList, const HT
// Manually remove listNode because moveParagraphWithClones sometimes leaves it behind in the document.
// See the bug 33668 and editing/execCommand/insert-list-orphaned-item-with-nested-lists.html.
// FIXME: This might be a bug in moveParagraphWithClones or deleteSelection.
- if (listElement && listElement->inDocument()) {
+ if (listElement && listElement->inShadowIncludingDocument()) {
removeNode(listElement, editingState);
if (editingState->isAborted())
return false;

Powered by Google App Engine
This is Rietveld 408576698