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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.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/ApplyBlockElementCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
index a1c3139ee58ae6b9a24069ee7d76f7f8dfffada0..a2d4f001a8c433b1e2b2d84e670dfe44fa174339 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
@@ -279,7 +279,7 @@ void ApplyBlockElementCommand::RangeForParagraphSplittingTextNodesIfNeeded(
SplitTextNode(start_text, start_offset);
GetDocument().UpdateStyleAndLayoutTree();
- start = Position::FirstPositionInNode(start_text);
+ start = Position::FirstPositionInNode(*start_text);
if (is_start_and_end_on_same_node) {
DCHECK_GE(end.OffsetInContainerNode(), start_offset);
end = Position(start_text, end.OffsetInContainerNode() - start_offset);
@@ -360,7 +360,7 @@ ApplyBlockElementCommand::EndOfNextParagrahSplittingTextNodesIfNeeded(
if (!style->PreserveNewline() ||
!end_of_next_paragraph_position.OffsetInContainerNode() ||
!IsNewLineAtPosition(
- Position::FirstPositionInNode(end_of_next_paragraph_text)))
+ Position::FirstPositionInNode(*end_of_next_paragraph_text)))
return end_of_next_paragraph;
// \n at the beginning of the text node immediately following the current

Powered by Google App Engine
This is Rietveld 408576698