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

Issue 1691053004: Make copyTextTo() of text iterators check the length parameter (Closed)

Created:
4 years, 10 months ago by Xiaocheng
Modified:
4 years, 10 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make copyTextTo() of text iterators check the length parameter This CL makes |copyTextTo()| function shrinks the |minLength| parameter to |length() - position| if it exceeds that value. This CL will be utilized by a follow-up CL: crrev.com/1678803002 BUG=n/a TEST=n/a; no behavior change Committed: https://crrev.com/3c1491ceac9b05efd7d6170e4a4222eb9be2598f Cr-Commit-Position: refs/heads/master@{#375154}

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -2 lines) Patch
M third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp View 1 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/iterators/TextIterator.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp View 1 1 chunk +4 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 11 (5 generated)
Xiaocheng
PTAL.
4 years, 10 months ago (2016-02-12 06:18:22 UTC) #3
yosin_UTC9
lgtm I think using |start|+|end| is better than |position|+|length| and cleaner code. https://codereview.chromium.org/1691053004/diff/1/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp File third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp ...
4 years, 10 months ago (2016-02-12 08:28:18 UTC) #4
Xiaocheng
Yeah, it appears that (start, end) gives cleaner code. As this change affects quite some ...
4 years, 10 months ago (2016-02-12 08:44:07 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1691053004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1691053004/20001
4 years, 10 months ago (2016-02-12 08:45:54 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 10 months ago (2016-02-12 10:17:24 UTC) #9
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:42:31 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/3c1491ceac9b05efd7d6170e4a4222eb9be2598f
Cr-Commit-Position: refs/heads/master@{#375154}

Powered by Google App Engine
This is Rietveld 408576698