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

Unified Diff: third_party/WebKit/Source/core/html/TextControlElement.cpp

Issue 2950053002: Make Position::BeforeNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-21T17:56:36 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/TextControlElement.cpp
diff --git a/third_party/WebKit/Source/core/html/TextControlElement.cpp b/third_party/WebKit/Source/core/html/TextControlElement.cpp
index a70ced7f90d83addaaf62d0ac36d22022a715cfb..fd8032bd330b6dacb6b1c0384d60e939ae0bf98c 100644
--- a/third_party/WebKit/Source/core/html/TextControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/TextControlElement.cpp
@@ -339,7 +339,7 @@ static Position PositionForIndex(HTMLElement* inner_editor, unsigned index) {
for (Node& node : NodeTraversal::DescendantsOf(*inner_editor)) {
if (node.HasTagName(brTag)) {
if (remaining_characters_to_move_forward == 0)
- return Position::BeforeNode(&node);
+ return Position::BeforeNode(*&node);
--remaining_characters_to_move_forward;
last_br_or_text = &node;
continue;
@@ -365,7 +365,7 @@ unsigned TextControlElement::IndexForPosition(HTMLElement* inner_editor,
passed_position.IsNull())
return 0;
- if (Position::BeforeNode(inner_editor) == passed_position)
+ if (Position::BeforeNode(*inner_editor) == passed_position)
return 0;
unsigned index = 0;
« no previous file with comments | « third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698