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

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

Issue 2627103003: [EditCommandSource] Pass source through |CompositeEditCommand| ctor instead of |apply(source)| (Closed)
Patch Set: Created 3 years, 11 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/IndentOutdentCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
index 9ccdd187d5c680ccbd0422516f51d0e32dcc85ac..563787173634d305b5acc8bbf0076e769e98bc4c 100644
--- a/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
@@ -55,9 +55,11 @@ static bool isHTMLListOrBlockquoteElement(const Node* node) {
}
IndentOutdentCommand::IndentOutdentCommand(Document& document,
+ EditCommandSource source,
EIndentType typeOfAction)
: ApplyBlockElementCommand(
document,
+ source,
blockquoteTag,
"margin: 0 0 0 40px; border: none; padding: 0px;"),
m_typeOfAction(typeOfAction) {}
@@ -210,13 +212,15 @@ void IndentOutdentCommand::outdentParagraph(EditingState* editingState) {
// Use InsertListCommand to remove the selection from the list
if (isHTMLOListElement(*enclosingElement)) {
applyCommandToComposite(
- InsertListCommand::create(document(), InsertListCommand::OrderedList),
+ InsertListCommand::create(document(), EditCommandSource::kInternal,
+ InsertListCommand::OrderedList),
editingState);
return;
}
if (isHTMLUListElement(*enclosingElement)) {
applyCommandToComposite(
- InsertListCommand::create(document(), InsertListCommand::UnorderedList),
+ InsertListCommand::create(document(), EditCommandSource::kInternal,
+ InsertListCommand::UnorderedList),
editingState);
return;
}

Powered by Google App Engine
This is Rietveld 408576698