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

Issue 2912283002: Use remembered progress to handle replaced elements in TextIterator (Closed)

Created:
3 years, 6 months ago by Xiaocheng
Modified:
3 years, 6 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use remembered progress to handle replaced elements in TextIterator This patch utilizes the "remembered progress" mechanism in TextIterator to handle a replaced element when it emits multiple text runs. In this way, the control flow becomes cleaner as we don't need to go into the mail loop of TextIterator::Advance() again. Follow-up patches will remove the return value of HandlePlacedElement() because this patch makes it almost useless. BUG=721957 TEST=n/a; shouldn't have any behavioral change Review-Url: https://codereview.chromium.org/2912283002 Cr-Commit-Position: refs/heads/master@{#475977} Committed: https://chromium.googlesource.com/chromium/src/+/529b9affa165a95a6b9369809ab26d7c5d37466b

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -3 lines) Patch
M third_party/WebKit/Source/core/editing/iterators/TextIterator.h View 1 chunk +2 lines, -1 line 2 comments Download
M third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp View 5 chunks +14 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 14 (9 generated)
Xiaocheng
PTAL.
3 years, 6 months ago (2017-05-31 06:41:55 UTC) #5
yosin_UTC9
lgtm w/ nit https://codereview.chromium.org/2912283002/diff/1/third_party/WebKit/Source/core/editing/iterators/TextIterator.h File third_party/WebKit/Source/core/editing/iterators/TextIterator.h (right): https://codereview.chromium.org/2912283002/diff/1/third_party/WebKit/Source/core/editing/iterators/TextIterator.h#newcode227 third_party/WebKit/Source/core/editing/iterators/TextIterator.h:227: bool needs_handle_replaced_element_; nit: Initialize needs_handle_replaced_element_ here ...
3 years, 6 months ago (2017-05-31 07:23:01 UTC) #6
Xiaocheng
https://codereview.chromium.org/2912283002/diff/1/third_party/WebKit/Source/core/editing/iterators/TextIterator.h File third_party/WebKit/Source/core/editing/iterators/TextIterator.h (right): https://codereview.chromium.org/2912283002/diff/1/third_party/WebKit/Source/core/editing/iterators/TextIterator.h#newcode227 third_party/WebKit/Source/core/editing/iterators/TextIterator.h:227: bool needs_handle_replaced_element_; On 2017/05/31 at 07:23:01, yosin_UTC9 wrote: > ...
3 years, 6 months ago (2017-05-31 18:05:58 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2912283002/1
3 years, 6 months ago (2017-05-31 18:06:30 UTC) #11
commit-bot: I haz the power
3 years, 6 months ago (2017-05-31 19:12:56 UTC) #14
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/529b9affa165a95a6b9369809ab2...

Powered by Google App Engine
This is Rietveld 408576698