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

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.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/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index 253830d2f5df062bb647f0fa894825b1b86b4ac4..21d0a7b64ca3aca9f9ee5bd041aeebd7fa2deae1 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -1504,7 +1504,7 @@ void CompositeEditCommand::MoveParagraphs(
GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
destination_index = TextIterator::RangeLength(
- Position::FirstPositionInNode(GetDocument().documentElement()),
+ Position::FirstPositionInNode(*GetDocument().documentElement()),
destination.ToParentAnchoredPosition(),
TextIteratorBehavior::AllVisiblePositionsRangeLengthBehavior());
@@ -1678,7 +1678,7 @@ bool CompositeEditCommand::BreakOutOfEmptyListItem(
return false;
SetEndingSelection(SelectionInDOMTree::Builder()
- .Collapse(Position::FirstPositionInNode(new_block))
+ .Collapse(Position::FirstPositionInNode(*new_block))
.SetIsDirectional(EndingSelection().IsDirectional())
.Build());

Powered by Google App Engine
This is Rietveld 408576698