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

Issue 2780313002: [WIP] Refactor DocumentMarker (Closed)

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

Description

Refactor DocumentMarker Eliminate DocumentMarkerDetails in favor of making DocumentMarker a polymorphic class hierarchy (since we're already subclassing it for TextMarker anyway) Depends on https://codereview.chromium.org/2763893002/ CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 BUG=707867

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 5

Patch Set 3 : Rebase #

Patch Set 4 : Move accessor methods into derived classes #

Total comments: 4

Patch Set 5 : Undo accessor move, add TODO #

Patch Set 6 : Add missing files #

Patch Set 7 : Re-add whitespace I accidentally lost #

Patch Set 8 : Move CompositionMarkerList::at() into this CL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -216 lines) Patch
M third_party/WebKit/Source/core/editing/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/CompositionMarker.h View 4 5 1 chunk +46 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/CompositionMarker.cpp View 5 6 1 chunk +39 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.cpp View 1 2 3 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarker.h View 1 2 3 4 3 chunks +14 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp View 1 2 4 2 chunks +5 lines, -158 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp View 4 3 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerListTest.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerTest.cpp View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/EditingMarkerListTest.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.h View 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/SpellCheckMarker.cpp View 5 1 chunk +31 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListTest.cpp View 1 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h View 1 4 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/TextMatchMarker.cpp View 1 chunk +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/markers/TextMatchMarkerList.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 31 (24 generated)
rlanday
3 years, 8 months ago (2017-03-29 23:13:42 UTC) #6
Xiaocheng
https://codereview.chromium.org/2780313002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h File third_party/WebKit/Source/core/editing/markers/DocumentMarker.h (right): https://codereview.chromium.org/2780313002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h#newcode144 third_party/WebKit/Source/core/editing/markers/DocumentMarker.h:144: virtual const String& description() const; These functions only make ...
3 years, 8 months ago (2017-03-29 23:40:11 UTC) #10
rlanday
https://codereview.chromium.org/2780313002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp File third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp (left): https://codereview.chromium.org/2780313002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#oldcode67 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:67: DCHECK(type != DocumentMarker::TextMatch); On 2017/03/29 at 23:40:11, Xiaocheng wrote: ...
3 years, 8 months ago (2017-03-31 01:34:53 UTC) #15
Xiaocheng
Almost good. https://codereview.chromium.org/2780313002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp File third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp (left): https://codereview.chromium.org/2780313002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#oldcode67 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:67: DCHECK(type != DocumentMarker::TextMatch); On 2017/03/31 at 01:34:53, ...
3 years, 8 months ago (2017-03-31 02:01:01 UTC) #17
rlanday
https://codereview.chromium.org/2780313002/diff/60001/third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h File third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h (right): https://codereview.chromium.org/2780313002/diff/60001/third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h#newcode19 third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h:19: CompositionMarker* at(size_t index) final; On 2017/03/31 at 02:01:01, Xiaocheng ...
3 years, 8 months ago (2017-03-31 17:40:41 UTC) #18
rlanday
On 2017/03/31 at 02:01:01, xiaochengh wrote: > Hmm... I didn't expect these accessors to be ...
3 years, 8 months ago (2017-03-31 18:03:34 UTC) #20
Xiaocheng
3 years, 8 months ago (2017-03-31 19:59:18 UTC) #26
lgtm

https://codereview.chromium.org/2780313002/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h
(right):

https://codereview.chromium.org/2780313002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/editing/markers/CompositionMarkerList.h:19:
CompositionMarker* at(size_t index) final;
On 2017/03/31 at 17:40:41, rlanday wrote:
> On 2017/03/31 at 02:01:01, Xiaocheng wrote:
> > virtual |at()| should be in some previous patch.
> 
> I don't think this makes sense, there is no CompositionMarker class until this
patch, so this method would be exactly the same as its parent...

Yeah, you're right!

Powered by Google App Engine
This is Rietveld 408576698