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

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

Issue 2951073002: CANCELED: Make ComputeNodeBeforePosition() to return const Node* (Closed)
Patch Set: 2017-06-21T17:59:27 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/commands/ReplaceSelectionCommand.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..71f4a9b9875c9e79e5d704c481f5cc63629c7c75 100644
--- a/third_party/WebKit/Source/core/html/TextControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/TextControlElement.cpp
@@ -369,7 +369,7 @@ unsigned TextControlElement::IndexForPosition(HTMLElement* inner_editor,
return 0;
unsigned index = 0;
- Node* start_node = passed_position.ComputeNodeBeforePosition();
+ const Node* start_node = passed_position.ComputeNodeBeforePosition();
if (!start_node)
start_node = passed_position.ComputeContainerNode();
if (start_node == inner_editor && passed_position.IsAfterAnchor())
@@ -377,7 +377,7 @@ unsigned TextControlElement::IndexForPosition(HTMLElement* inner_editor,
DCHECK(start_node);
DCHECK(inner_editor->contains(start_node));
- for (Node* node = start_node; node;
+ for (const Node* node = start_node; node;
node = NodeTraversal::Previous(*node, inner_editor)) {
if (node->IsTextNode()) {
int length = ToText(*node).length();
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698