Chromium Code Reviews| 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 4a6ad4ebe8e99d88f69cefa6660e4c857011ab46..d83d5aee41f2677290c9c5860f7d1d4d1c08bc98 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp |
| +++ b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp |
| @@ -184,7 +184,8 @@ void InsertListCommand::doApply(EditingState* editingState) { |
| startOfParagraph(visibleEndOfSelection, CanSkipOverEditingBoundary) |
| .deepEquivalent(); |
| - Range* currentSelection = firstRangeOf(endingSelection()); |
| + Range* currentSelection = |
| + createRange(firstEphemeralRangeOf(endingSelection())); |
| ContainerNode* scopeForStartOfSelection = nullptr; |
| ContainerNode* scopeForEndOfSelection = nullptr; |
| // FIXME: This is an inefficient way to keep selection alive because |
| @@ -296,9 +297,9 @@ void InsertListCommand::doApply(EditingState* editingState) { |
| return; |
| } |
| - DCHECK(firstRangeOf(endingSelection())); |
| - doApplyForSingleParagraph(false, listTag, *firstRangeOf(endingSelection()), |
| - editingState); |
| + Range* const range = createRange(firstEphemeralRangeOf(endingSelection())); |
| + DCHECK(!range); |
|
Xiaocheng
2017/03/02 20:14:29
Remove '!'
yosin_UTC9
2017/03/03 04:22:35
Done.
(my brain is still damaged...)
|
| + doApplyForSingleParagraph(false, listTag, *range, editingState); |
| } |
| InputEvent::InputType InsertListCommand::inputType() const { |