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

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

Issue 2574793002: [Editing] Store |CommandSource| in |CompositeEditCommand| (Closed)
Patch Set: Created 4 years 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/InsertParagraphSeparatorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
index ff2e6a09079c510e35f5016ef5a3538d3ab37668..da23057babd7359bc984feb31bdb3b55dd642727 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
@@ -63,9 +63,10 @@ static Element* highestVisuallyEquivalentDivBelowRoot(Element* startBlock) {
InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand(
Document& document,
+ CommandSource source,
bool mustUseDefaultParagraphElement,
bool pasteBlockquoteIntoUnquotedArea)
- : CompositeEditCommand(document),
+ : CompositeEditCommand(document, source),
m_mustUseDefaultParagraphElement(mustUseDefaultParagraphElement),
m_pasteBlockquoteIntoUnquotedArea(pasteBlockquoteIntoUnquotedArea) {}
@@ -205,8 +206,9 @@ void InsertParagraphSeparatorCommand::doApply(EditingState* editingState) {
|| (!canonicalPos.isNull() &&
isDisplayInsideTable(canonicalPos.anchorNode())) ||
(!canonicalPos.isNull() && isHTMLHRElement(*canonicalPos.anchorNode()))) {
- applyCommandToComposite(InsertLineBreakCommand::create(document()),
- editingState);
+ applyCommandToComposite(
+ InsertLineBreakCommand::create(document(), commandSource()),
+ editingState);
return;
}

Powered by Google App Engine
This is Rietveld 408576698