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

Issue 2781623010: Add DocumentMarker::clone() (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 DocumentMarker::clone() Being split off from https://codereview.chromium.org/2784753002, where I'm adding a subclass of DocumentMarker for TextMatchMarker, which necessitates a virtual clone method so DocumentMarker subclasses can be copied properly. I'm planning to add subclasses for the other types of DocumentMarker in https://codereview.chromium.org/2780313002. BUG=707867

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add missing file #

Patch Set 3 : Take const reference instead of prematurely cloning marker #

Total comments: 1

Patch Set 4 : Rebase #

Total comments: 6

Patch Set 5 : Make clone() protected, add cloneWithNewOffsets() #

Patch Set 6 : Remove dependency that's messing with trybots #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -8 lines) Patch
M third_party/WebKit/Source/core/editing/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarker.h View 1 2 3 4 5 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp View 1 2 3 4 5 2 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/RenderedDocumentMarker.h View 2 chunks +5 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/RenderedDocumentMarker.cpp View 1 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (26 generated)
rlanday
3 years, 8 months ago (2017-03-30 01:48:18 UTC) #3
Xiaocheng
https://codereview.chromium.org/2781623010/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/2781623010/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#newcode384 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:384: DocumentMarker* marker = (*i)->clone(); No need to change this ...
3 years, 8 months ago (2017-03-30 02:20:28 UTC) #7
rlanday
On 2017/03/30 at 02:20:28, xiaochengh wrote: > https://codereview.chromium.org/2781623010/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/2781623010/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#newcode384 ...
3 years, 8 months ago (2017-03-30 06:38:36 UTC) #14
Xiaocheng
Almost good. https://codereview.chromium.org/2781623010/diff/40001/third_party/WebKit/Source/core/editing/markers/RenderedDocumentMarker.cpp File third_party/WebKit/Source/core/editing/markers/RenderedDocumentMarker.cpp (right): https://codereview.chromium.org/2781623010/diff/40001/third_party/WebKit/Source/core/editing/markers/RenderedDocumentMarker.cpp#newcode1 third_party/WebKit/Source/core/editing/markers/RenderedDocumentMarker.cpp:1: // Copyright 2017 The Chromium Authors. All ...
3 years, 8 months ago (2017-03-30 18:02:56 UTC) #15
rlanday
On 2017/03/30 at 18:02:56, xiaochengh wrote: > Almost good. > > https://codereview.chromium.org/2781623010/diff/40001/third_party/WebKit/Source/core/editing/markers/RenderedDocumentMarker.cpp > File third_party/WebKit/Source/core/editing/markers/RenderedDocumentMarker.cpp ...
3 years, 8 months ago (2017-03-30 18:31:37 UTC) #16
Xiaocheng
lgtm Yeah, you did. I wasn't too focused...
3 years, 8 months ago (2017-03-30 18:47:25 UTC) #19
rlanday
yosin, can you please take a look at this now that xiaochengh has lgtm'ed?
3 years, 8 months ago (2017-03-31 19:05:39 UTC) #24
yosin_UTC9
https://codereview.chromium.org/2781623010/diff/60001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h File third_party/WebKit/Source/core/editing/markers/DocumentMarker.h (right): https://codereview.chromium.org/2781623010/diff/60001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h#newcode137 third_party/WebKit/Source/core/editing/markers/DocumentMarker.h:137: virtual DocumentMarker* clone() const; I don't understand why we ...
3 years, 8 months ago (2017-04-04 01:37:51 UTC) #26
yosin_UTC9
Since RenderedDocumentMarker is used only for painting tick markers for find-in-page, we don't need to ...
3 years, 8 months ago (2017-04-04 02:00:05 UTC) #27
Xiaocheng
On 2017/04/04 at 02:00:05, yosin wrote: > Since RenderedDocumentMarker is used only for painting tick ...
3 years, 8 months ago (2017-04-04 02:07:06 UTC) #28
rlanday
On 2017/04/04 at 02:00:05, yosin wrote: > Since RenderedDocumentMarker is used only for painting tick ...
3 years, 8 months ago (2017-04-04 02:07:29 UTC) #29
rlanday
https://codereview.chromium.org/2781623010/diff/60001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h File third_party/WebKit/Source/core/editing/markers/DocumentMarker.h (right): https://codereview.chromium.org/2781623010/diff/60001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h#newcode137 third_party/WebKit/Source/core/editing/markers/DocumentMarker.h:137: virtual DocumentMarker* clone() const; On 2017/04/04 at 01:37:51, yosin_UTC9 ...
3 years, 8 months ago (2017-04-04 02:07:46 UTC) #30
yosin_UTC9
https://codereview.chromium.org/2781623010/diff/60001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h File third_party/WebKit/Source/core/editing/markers/DocumentMarker.h (right): https://codereview.chromium.org/2781623010/diff/60001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h#newcode137 third_party/WebKit/Source/core/editing/markers/DocumentMarker.h:137: virtual DocumentMarker* clone() const; On 2017/04/04 at 02:07:46, rlanday ...
3 years, 8 months ago (2017-04-04 04:07:38 UTC) #31
rlanday
On 2017/04/04 at 04:07:38, yosin wrote: > I'm not a fan of clone or copy ...
3 years, 8 months ago (2017-04-04 06:03:24 UTC) #32
yosin_UTC9
On 2017/04/04 at 06:03:24, rlanday wrote: > On 2017/04/04 at 04:07:38, yosin wrote: > > ...
3 years, 8 months ago (2017-04-04 08:27:58 UTC) #33
rlanday
On 2017/04/04 at 08:27:58, yosin wrote: > On 2017/04/04 at 06:03:24, rlanday wrote: > > ...
3 years, 8 months ago (2017-04-04 18:20:05 UTC) #34
rlanday
3 years, 8 months ago (2017-04-04 23:39:32 UTC) #35
@yosin, I added the cloneWithNewOffsets() method and made clone() protected,
what do you think of this?

Powered by Google App Engine
This is Rietveld 408576698