Index: Source/core/editing/commands/InsertListCommand.cpp |
diff --git a/Source/core/editing/InsertListCommand.cpp b/Source/core/editing/commands/InsertListCommand.cpp |
similarity index 99% |
rename from Source/core/editing/InsertListCommand.cpp |
rename to Source/core/editing/commands/InsertListCommand.cpp |
index 9ad50f6c0fa3954af9f4c7b3d439715462dd97c6..4d389125924b7b36b56188e7f8b5eac8048ff25b 100644 |
--- a/Source/core/editing/InsertListCommand.cpp |
+++ b/Source/core/editing/commands/InsertListCommand.cpp |
@@ -24,7 +24,7 @@ |
*/ |
#include "config.h" |
-#include "core/editing/InsertListCommand.h" |
+#include "core/editing/commands/InsertListCommand.h" |
#include "bindings/core/v8/ExceptionStatePlaceholder.h" |
#include "core/HTMLNames.h" |
@@ -218,9 +218,10 @@ bool InsertListCommand::doApplyForSingleParagraph(bool forceCreateList, const HT |
listElement = fixOrphanedListChild(listChildNode); |
listElement = mergeWithNeighboringLists(listElement); |
} |
- if (!listElement->hasTagName(listTag)) |
+ if (!listElement->hasTagName(listTag)) { |
// listChildNode will be removed from the list and a list of type m_type will be created. |
switchListType = true; |
+ } |
// If the list is of the desired type, and we are not removing the list, then exit early. |
if (!switchListType && forceCreateList) |
@@ -362,11 +363,11 @@ PassRefPtrWillBeRawPtr<HTMLElement> InsertListCommand::listifyParagraph(const Vi |
HTMLElement* previousList = adjacentEnclosingList(start, start.previous(CannotCrossEditingBoundary), listTag); |
HTMLElement* nextList = adjacentEnclosingList(start, end.next(CannotCrossEditingBoundary), listTag); |
RefPtrWillBeRawPtr<HTMLElement> listElement = nullptr; |
- if (previousList) |
+ if (previousList) { |
appendNode(listItemElement, previousList); |
- else if (nextList) |
+ } else if (nextList) { |
insertNodeAt(listItemElement, positionBeforeNode(nextList)); |
- else { |
+ } else { |
// Create the list. |
listElement = createHTMLElement(document(), listTag); |
appendNode(listItemElement, listElement); |