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

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

Issue 2788473003: Use EphmeralRange insteadof Range in CompositeEditCommands::isNodeVisiblyContainedWithin()
Patch Set: update Created 3 years, 9 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 23a25f842ba74b45c22a1b87a3b23338ca128fbd..51fda8b19e789315f7df686305dfce1ea8b34161 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
@@ -363,7 +363,8 @@ bool InsertListCommand::doApplyForSingleParagraph(
// If the entire list is selected, then convert the whole list.
if (switchListType &&
- isNodeVisiblyContainedWithin(*listElement, currentSelection)) {
+ isNodeVisiblyContainedWithin(*listElement,
+ EphemeralRange(&currentSelection))) {
bool rangeStartIsInList =
visiblePositionBeforeNode(*listElement).deepEquivalent() ==
createVisiblePosition(currentSelection.startPosition())

Powered by Google App Engine
This is Rietveld 408576698