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

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

Issue 2952983002: Make Position::FirstPositionInNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-23T10:37:43 Created 3 years, 6 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/InsertLineBreakCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
index 7ab8a9f6e77c52a1803b06db0deea12f082ba0b0..4d8630f5f7f29783687248a4f9de637f1c08b5ca 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
@@ -169,7 +169,7 @@ void InsertLineBreakCommand::DoApply(EditingState* editing_state) {
InsertNodeBefore(node_to_insert, text_node, editing_state);
if (editing_state->IsAborted())
return;
- Position ending_position = Position::FirstPositionInNode(text_node);
+ Position ending_position = Position::FirstPositionInNode(*text_node);
// Handle whitespace that occurs after the split
GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
@@ -190,7 +190,7 @@ void InsertLineBreakCommand::DoApply(EditingState* editing_state) {
InsertNodeAt(nbsp_node, position_before_text_node, editing_state);
if (editing_state->IsAborted())
return;
- ending_position = Position::FirstPositionInNode(nbsp_node);
+ ending_position = Position::FirstPositionInNode(*nbsp_node);
}
}

Powered by Google App Engine
This is Rietveld 408576698