Index: Source/core/editing/InsertListCommand.cpp |
diff --git a/Source/core/editing/InsertListCommand.cpp b/Source/core/editing/InsertListCommand.cpp |
index 0ad5d2b85edac63604212bc5a0992c53cd8bd2eb..df9cb378959c13b2bc5e9afe24d067c4a0ae7413 100644 |
--- a/Source/core/editing/InsertListCommand.cpp |
+++ b/Source/core/editing/InsertListCommand.cpp |
@@ -242,7 +242,7 @@ |
if (rangeStartIsInList && newList) |
currentSelection.setStart(newList, 0, IGNORE_EXCEPTION); |
if (rangeEndIsInList && newList) |
- currentSelection.setEnd(newList, lastOffsetInNode(*newList), IGNORE_EXCEPTION); |
+ currentSelection.setEnd(newList, lastOffsetInNode(newList.get()), IGNORE_EXCEPTION); |
setEndingSelection(VisiblePosition(firstPositionInNode(newList.get()))); |
@@ -308,7 +308,7 @@ |
} else |
insertNodeAfter(nodeToInsert, listNode); |
- VisiblePosition insertionPoint = VisiblePosition(positionBeforeNode(*placeholder)); |
+ VisiblePosition insertionPoint = VisiblePosition(positionBeforeNode(placeholder.get())); |
moveParagraphs(start, end, insertionPoint, /* preserveSelection */ true, /* preserveStyle */ true, listChildNode); |
} |
@@ -348,11 +348,11 @@ |
Element* previousList = adjacentEnclosingList(start, start.previous(CannotCrossEditingBoundary), listTag); |
Element* nextList = adjacentEnclosingList(start, end.next(CannotCrossEditingBoundary), listTag); |
RefPtr<HTMLElement> listElement; |
- if (previousList) { |
+ if (previousList) |
appendNode(listItemElement, previousList); |
- } else if (nextList) { |
- insertNodeAt(listItemElement, positionBeforeNode(*nextList)); |
- } else { |
+ else if (nextList) |
+ insertNodeAt(listItemElement, positionBeforeNode(nextList)); |
+ else { |
// Create the list. |
listElement = createHTMLElement(document(), listTag); |
appendNode(listItemElement, listElement); |
@@ -362,7 +362,7 @@ |
// by a br or a '\n', will invalidate start and end. Insert |
// a placeholder and then recompute start and end. |
RefPtr<Node> placeholder = insertBlockPlaceholder(start.deepEquivalent()); |
- start = VisiblePosition(positionBeforeNode(*placeholder)); |
+ start = VisiblePosition(positionBeforeNode(placeholder.get())); |
end = start; |
} |
@@ -390,7 +390,7 @@ |
} |
} |
- moveParagraph(start, end, VisiblePosition(positionBeforeNode(*placeholder)), true); |
+ moveParagraph(start, end, VisiblePosition(positionBeforeNode(placeholder.get())), true); |
if (listElement) |
return mergeWithNeighboringLists(listElement); |