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

Unified Diff: third_party/WebKit/Source/core/editing/PlainTextRange.cpp

Issue 2949763002: Introduce Position constructor with const Node& (Closed)
Patch Set: 2017-06-21T13:23:13 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 | « no previous file | third_party/WebKit/Source/core/editing/Position.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/PlainTextRange.cpp
diff --git a/third_party/WebKit/Source/core/editing/PlainTextRange.cpp b/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
index 849d7e4d817c015c5f46f1b219d66d78b977bc1d..90eefdb4938d41017e4de2a8a88620539bcd197d 100644
--- a/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
+++ b/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
@@ -184,10 +184,10 @@ PlainTextRange PlainTextRange::Create(const ContainerNode& scope,
DocumentLifecycle::DisallowTransitionScope disallow_transition(
scope.GetDocument().Lifecycle());
- size_t start = TextIterator::RangeLength(
- Position(&const_cast<ContainerNode&>(scope), 0), range.StartPosition());
- size_t end = TextIterator::RangeLength(
- Position(&const_cast<ContainerNode&>(scope), 0), range.EndPosition());
+ size_t start =
+ TextIterator::RangeLength(Position(scope, 0), range.StartPosition());
+ size_t end =
+ TextIterator::RangeLength(Position(scope, 0), range.EndPosition());
return PlainTextRange(start, end);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698