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

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

Issue 2955823002: Make VisiblePosition::FirstPositionInNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-26T13:57:23 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/InsertListCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
index b3a5d0f7ef2ee9c0c6719d253fd41fe719e675f6..5d6f8c884035865639dd5617b70bf4788feb49c6 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
@@ -384,7 +384,7 @@ bool InsertListCommand::DoApplyForSingleParagraph(
GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
Node* first_child_in_list =
- EnclosingListChild(VisiblePosition::FirstPositionInNode(list_element)
+ EnclosingListChild(VisiblePosition::FirstPositionInNode(*list_element)
.DeepEquivalent()
.AnchorNode(),
list_element);
@@ -394,7 +394,7 @@ bool InsertListCommand::DoApplyForSingleParagraph(
: list_element;
MoveParagraphWithClones(
- VisiblePosition::FirstPositionInNode(list_element),
+ VisiblePosition::FirstPositionInNode(*list_element),
VisiblePosition::LastPositionInNode(list_element), new_list,
outer_block, editing_state);
if (editing_state->IsAborted())
@@ -460,7 +460,7 @@ void InsertListCommand::UnlistifyParagraph(
VisiblePosition end;
DCHECK(list_child_node);
if (isHTMLLIElement(*list_child_node)) {
- start = VisiblePosition::FirstPositionInNode(list_child_node);
+ start = VisiblePosition::FirstPositionInNode(*list_child_node);
end = VisiblePosition::LastPositionInNode(list_child_node);
next_list_child = list_child_node->nextSibling();
previous_list_child = list_child_node->previousSibling();

Powered by Google App Engine
This is Rietveld 408576698