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

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

Issue 1294543005: Move execCommand related files in core/editing/ related files into core/editing/commands/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-17T17:57:33 Created 5 years, 4 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: 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);

Powered by Google App Engine
This is Rietveld 408576698