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

Issue 2916463002: Refactor DocumentMarkerController::Add*Marker() methods (Closed)

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

Description

Refactor DocumentMarkerController::Add*Marker() methods Currently there's a lot of duplicated code in all the MarkerType-specific DocumentMarkerController::Add*Marker() methods. This CL factors out the common logic into an AddMarkerInternal() method, and renames the existing (private) AddMarker() method to AddMarkerToNode(). This CL also adds some filtering to avoid constructing DocumentMarkers with start/end offsets that are the same (the current version of the code constructs these DocumentMarkers, then filters them out before actually adding them), or when the range returned by TextIterator is not a text node (we don't currently do this filtering). BUG=707867 Review-Url: https://codereview.chromium.org/2916463002 Cr-Commit-Position: refs/heads/master@{#475840} Committed: https://chromium.googlesource.com/chromium/src/+/68adbbbf1a52544dbd52c2248e530f722d638b34

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rebase, fix comment #

Total comments: 2

Patch Set 3 : Add const #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -35 lines) Patch
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h View 1 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp View 1 2 3 3 chunks +45 lines, -34 lines 0 comments Download

Messages

Total messages: 28 (16 generated)
rlanday
The filtering in this change was requested by xiaochengh@ in https://codereview.chromium.org/2904093002#msg19
3 years, 6 months ago (2017-05-30 23:36:56 UTC) #4
Xiaocheng
Thanks for the patch! https://codereview.chromium.org/2916463002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp File third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp (right): https://codereview.chromium.org/2916463002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#newcode215 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:215: // TODO(editing-dev): TextIterator sometimes emits ...
3 years, 6 months ago (2017-05-30 23:51:19 UTC) #7
rlanday
https://codereview.chromium.org/2916463002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp File third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp (right): https://codereview.chromium.org/2916463002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#newcode215 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:215: // TODO(editing-dev): TextIterator sometimes emits ranges where the current ...
3 years, 6 months ago (2017-05-30 23:52:28 UTC) #8
rlanday
Updated (rebased, changed comment)
3 years, 6 months ago (2017-05-30 23:59:43 UTC) #10
Xiaocheng
lgtm, thanks!
3 years, 6 months ago (2017-05-31 00:39:54 UTC) #12
yosin_UTC9
lgtm w/ nits Thanks for doing this! https://codereview.chromium.org/2916463002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp File third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp (right): https://codereview.chromium.org/2916463002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#newcode201 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:201: for (TextIterator ...
3 years, 6 months ago (2017-05-31 02:01:14 UTC) #13
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/2916463002/40001
3 years, 6 months ago (2017-05-31 02:09:36 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/306717)
3 years, 6 months ago (2017-05-31 03:55:29 UTC) #18
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/2916463002/60001
3 years, 6 months ago (2017-05-31 04:17:03 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/306783)
3 years, 6 months ago (2017-05-31 06:01:34 UTC) #23
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/2916463002/60001
3 years, 6 months ago (2017-05-31 06:47:48 UTC) #25
commit-bot: I haz the power
3 years, 6 months ago (2017-05-31 07:39:00 UTC) #28
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/68adbbbf1a52544dbd52c2248e53...

Powered by Google App Engine
This is Rietveld 408576698