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

Issue 2822963002: [DMC #1.3] Add DocumentMarkerController::ListForType() (Closed)

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

Description

Add DocumentMarkerController::ListForType() Helper method that makes it slightly cleaner to look up the MarkerList* for a given type when we're holding the MarkerLists* for a Node. Alternatively, we could have a method that takes a Node* instead of a MarkerLists*, but then we'd lose the optimization in the call sites where we can return early if there's no MarkerLists* for the given Node. I found two places to use this in the current version of the code, and there will be more after we rewrite some of the loops to use the DocumentMarkerList interface being added in https://codereview.chromium.org/2820633002 . BUG=707867 Review-Url: https://codereview.chromium.org/2822963002 Cr-Commit-Position: refs/heads/master@{#465127} Committed: https://chromium.googlesource.com/chromium/src/+/b5a0bdbe8b745676efac4996f50c0558bb17b839

Patch Set 1 #

Total comments: 7

Patch Set 2 : Fix nits, remove a dependency #

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

Depends on Patchset:

Messages

Total messages: 18 (13 generated)
rlanday
https://codereview.chromium.org/2822963002/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/2822963002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#newcode81 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:81: DocumentMarkerController::ListForType(MarkerLists* marker_lists, I was confused when writing this why ...
3 years, 8 months ago (2017-04-17 08:19:46 UTC) #2
yosin_UTC9
lgtm https://codereview.chromium.org/2822963002/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/2822963002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#newcode83 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:83: size_t marker_list_index = MarkerTypeToMarkerIndex(type); nit: s/size_t/const size_t/ https://codereview.chromium.org/2822963002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#newcode84 ...
3 years, 8 months ago (2017-04-17 09:13:44 UTC) #5
rlanday
https://codereview.chromium.org/2822963002/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/2822963002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#newcode84 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:84: return marker_lists->at(marker_list_index); Ah, I didn't realize this did bounds ...
3 years, 8 months ago (2017-04-18 01:48:04 UTC) #8
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/2822963002/20001
3 years, 8 months ago (2017-04-18 03:34:59 UTC) #15
commit-bot: I haz the power
3 years, 8 months ago (2017-04-18 03:39:10 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/b5a0bdbe8b745676efac4996f50c...

Powered by Google App Engine
This is Rietveld 408576698