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

Unified Diff: third_party/WebKit/Source/core/editing/iterators/TextIterator.h

Issue 1691053004: Make copyTextTo() of text iterators check the length parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/iterators/TextIterator.h
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIterator.h b/third_party/WebKit/Source/core/editing/iterators/TextIterator.h
index 8e0b8b822bb04947ef4ac62d747d2b140d298454..29eebff624dd89683221bbdd48b37bb30eb54526 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.h
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.h
@@ -82,6 +82,7 @@ public:
// Calculate the minimum |actualLength >= minLength| such that code units
// with offset range [position, position + actualLength) are whole code
// points. Append these code points to |output| and return |actualLength|.
+ // TODO(xiaochengh): Use (start, end) instead of (start, length).
int copyTextTo(ForwardsTextBuffer* output, int position, int minLength) const;
// TODO(xiaochengh): Avoid default parameters.
int copyTextTo(ForwardsTextBuffer* output, int position = 0) const;

Powered by Google App Engine
This is Rietveld 408576698