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

Issue 2784753002: Add TextMatchMarkerList in preparation for DocumentMarkerController refactor (Closed)

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

Description

Add TextMatchMarkerList in preparation for DocumentMarkerController refactor I have this patch committed locally on top of the patch that adds SpellCheckMarkerList: https://codereview.chromium.org/2770413003 although I'm not sure there are any actual dependencies on that. This marker list is a little more involved than the others because I'm introducing a subclass of DocumentMarker called TextMatchMarker to hold the rendered-rect information that TextMatch markers need. Currently this information is stored in RenderedDocumentMarker, which I'm actually leaving in place in this patch since we're not switching DocumentMarkerController over to use the new lists yet. So that code is still creating TextMatch markers as DocumentMarkers directly (not TextMatchMarkers) and calling RenderedDocumentMarker::create() to get a RenderedDocumentMarker. To make my TextMatchMarker subclass work properly, I had to make DocumentMarker's copy constructor protected and force callers to use a new clone() method. This required some small changes to DocumentMarkerController. Right now we support having different data on different types of DocumentMarkers by having different "DocumentMarkerDetails" subclasses we attach to them; we may want to rewrite DocumentMarker at some point so the other markers are subclasses themselves like TextMatchMarker is in this CL. BUG=707867

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Remove unnecessary TextMatchMarker constructor #

Total comments: 4

Patch Set 4 : Make requested changes #

Total comments: 2

Patch Set 5 : Make at() return TextMatchMarker* #

Patch Set 6 : Remove "explicit" #

Unified diffs Side-by-side diffs Delta from patch set Stats (+337 lines, -0 lines) Patch
M third_party/WebKit/Source/core/editing/BUILD.gn View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h View 1 2 1 chunk +64 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/TextMatchMarker.cpp View 1 chunk +46 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/TextMatchMarkerList.h View 1 2 3 4 5 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/TextMatchMarkerList.cpp View 1 2 3 4 1 chunk +76 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListTest.cpp View 1 2 3 1 chunk +96 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 29 (21 generated)
rlanday
3 years, 8 months ago (2017-03-29 00:12:12 UTC) #4
Xiaocheng
https://codereview.chromium.org/2784753002/diff/40001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h File third_party/WebKit/Source/core/editing/markers/DocumentMarker.h (right): https://codereview.chromium.org/2784753002/diff/40001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h#newcode137 third_party/WebKit/Source/core/editing/markers/DocumentMarker.h:137: virtual DocumentMarker* clone() const; The introduction of clone() seems ...
3 years, 8 months ago (2017-03-29 23:20:57 UTC) #14
rlanday
https://codereview.chromium.org/2784753002/diff/40001/third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListTest.cpp File third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListTest.cpp (right): https://codereview.chromium.org/2784753002/diff/40001/third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListTest.cpp#newcode88 third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListTest.cpp:88: On 2017/03/29 at 23:20:57, Xiaocheng wrote: > Do we ...
3 years, 8 months ago (2017-03-29 23:54:56 UTC) #15
Xiaocheng
On 2017/03/29 at 23:54:56, rlanday wrote: > https://codereview.chromium.org/2784753002/diff/40001/third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListTest.cpp > File third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListTest.cpp (right): > > https://codereview.chromium.org/2784753002/diff/40001/third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListTest.cpp#newcode88 ...
3 years, 8 months ago (2017-03-29 23:57:55 UTC) #16
rlanday
On 2017/03/29 at 23:57:55, xiaochengh wrote: > On 2017/03/29 at 23:54:56, rlanday wrote: > > ...
3 years, 8 months ago (2017-03-30 20:43:22 UTC) #20
Xiaocheng
Looks good with a nit. I have an idea about further polishing the DML class, ...
3 years, 8 months ago (2017-03-30 21:12:07 UTC) #22
rlanday
On 2017/03/30 at 21:12:07, xiaochengh wrote: > Looks good with a nit. > > I ...
3 years, 8 months ago (2017-03-31 17:19:13 UTC) #27
Xiaocheng
3 years, 8 months ago (2017-03-31 18:11:26 UTC) #28
lgtm

Powered by Google App Engine
This is Rietveld 408576698