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

Issue 2868413002: [DMC #5.55] Add DocumentMarkerList::MarkerType() (Closed)

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

Description

Add DocumentMarkerList::MarkerType() We need a method on DocumentMarkerList that returns the marker type the list supports so we know when we can safely cast a DocumentMarkerList* to an impl type. This CL adds two subclasses of SpellCheckMarkerListImpl, SpellingMarkerListImpl, and GrammarMarkerListImpl, so we can implement this method. Note that adding this method also requires modifying GenericDocumentMarkerListImpl to take a MarkerType param (we're going to eliminate GenericDocumentMarkerListImpl once we add TextMatchMarkerListImpl but we need this for now). BUG=707867 Review-Url: https://codereview.chromium.org/2868413002 Cr-Commit-Position: refs/heads/master@{#472206} Committed: https://chromium.googlesource.com/chromium/src/+/d8b7adbe4b26fedd0a87ffd74aaac141a4694490

Patch Set 1 #

Patch Set 2 : Add missing files #

Total comments: 11

Patch Set 3 : Respond to comments #

Patch Set 4 : Split tests into SpellingMarkerListImplTest.cpp and GrammarMarkerListImplTest.cpp #

Total comments: 3

Patch Set 5 : Add missing file, fix nits #

Patch Set 6 : GrammarMarkerListImplTest doesn't need CreateMarker() #

Total comments: 1

Patch Set 7 : Fix mistake in comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -172 lines) Patch
M third_party/WebKit/Source/core/editing/BUILD.gn View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/markers/CompositionMarkerListImpl.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/CompositionMarkerListImpl.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h View 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.h View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/GrammarMarkerListImpl.h View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/GrammarMarkerListImpl.cpp View 1 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/GrammarMarkerListImplTest.cpp View 1 2 3 4 5 6 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImpl.h View 1 2 2 chunks +8 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImplTest.cpp View 1 2 3 1 chunk +0 lines, -150 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/SpellingMarkerListImpl.h View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/markers/SpellingMarkerListImpl.cpp View 1 1 chunk +13 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/core/editing/markers/SpellingMarkerListImplTest.cpp View 1 2 3 7 chunks +22 lines, -11 lines 0 comments Download

Messages

Total messages: 33 (17 generated)
rlanday
Note: I also have another version of this CL where I added a marker_type_ member ...
3 years, 7 months ago (2017-05-11 15:50:44 UTC) #2
Xiaocheng
I prefer having a marker_type_ member in SpellCheckMarkerListImpl. Reasons: 1. One less class 2. No ...
3 years, 7 months ago (2017-05-11 18:40:17 UTC) #3
yosin_UTC9
On 2017/05/11 at 18:40:17, xiaochengh wrote: > I prefer having a marker_type_ member in SpellCheckMarkerListImpl. ...
3 years, 7 months ago (2017-05-12 04:59:03 UTC) #4
yosin_UTC9
Good shape. Wait for xiaochengh@'s reply about having SpellCheckerMarkerListImpl::maker_type_ https://codereview.chromium.org/2868413002/diff/20001/third_party/WebKit/Source/core/editing/markers/CompositionMarkerListImpl.h File third_party/WebKit/Source/core/editing/markers/CompositionMarkerListImpl.h (right): https://codereview.chromium.org/2868413002/diff/20001/third_party/WebKit/Source/core/editing/markers/CompositionMarkerListImpl.h#newcode23 third_party/WebKit/Source/core/editing/markers/CompositionMarkerListImpl.h:23: ...
3 years, 7 months ago (2017-05-12 05:00:04 UTC) #5
Xiaocheng
Memory consumption is a strong reason not to introduce an extra field. Let's go with ...
3 years, 7 months ago (2017-05-12 18:23:00 UTC) #6
rlanday
Updated
3 years, 7 months ago (2017-05-12 20:06:16 UTC) #7
rlanday
https://codereview.chromium.org/2868413002/diff/20001/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImplTest.cpp File third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImplTest.cpp (right): https://codereview.chromium.org/2868413002/diff/20001/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImplTest.cpp#newcode13 third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImplTest.cpp:13: class SpellCheckMarkerListImplForTesting : public SpellCheckMarkerListImpl { On 2017/05/12 at ...
3 years, 7 months ago (2017-05-12 21:07:02 UTC) #8
yosin_UTC9
https://codereview.chromium.org/2868413002/diff/20001/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImplTest.cpp File third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImplTest.cpp (right): https://codereview.chromium.org/2868413002/diff/20001/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImplTest.cpp#newcode13 third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImplTest.cpp:13: class SpellCheckMarkerListImplForTesting : public SpellCheckMarkerListImpl { On 2017/05/12 at ...
3 years, 7 months ago (2017-05-15 04:03:04 UTC) #9
rlanday
On 2017/05/15 at 04:03:04, yosin wrote: > I propose having only "SpellingMarkerListImplTest.cpp" and "GrammerMarkerListImpl.cpp": > ...
3 years, 7 months ago (2017-05-15 18:29:57 UTC) #12
yosin_UTC9
Please add "GrammarMarkerListImplTest.cpp" into this patch. "analyze" step said: ERROR at //third_party/WebKit/Source/core/editing/BUILD.gn:265:1: Source file not ...
3 years, 7 months ago (2017-05-16 01:20:49 UTC) #15
rlanday
Updated. Sorry about the missing file :(
3 years, 7 months ago (2017-05-16 02:50:55 UTC) #19
yosin_UTC9
lgtm % very small nit https://codereview.chromium.org/2868413002/diff/100001/third_party/WebKit/Source/core/editing/markers/GrammarMarkerListImplTest.cpp File third_party/WebKit/Source/core/editing/markers/GrammarMarkerListImplTest.cpp (right): https://codereview.chromium.org/2868413002/diff/100001/third_party/WebKit/Source/core/editing/markers/GrammarMarkerListImplTest.cpp#newcode14 third_party/WebKit/Source/core/editing/markers/GrammarMarkerListImplTest.cpp:14: // GrammarMarkerListImplTest.cpp. nit: s/GrammarMarkerListImplTest.cpp/SpellingMarkerListImplTest.cpp/
3 years, 7 months ago (2017-05-16 04:35:18 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/2868413002/120001
3 years, 7 months ago (2017-05-16 04:48:17 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/427558)
3 years, 7 months ago (2017-05-16 06:15:32 UTC) #28
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/2868413002/120001
3 years, 7 months ago (2017-05-16 18:18:05 UTC) #30
commit-bot: I haz the power
3 years, 7 months ago (2017-05-16 20:36:39 UTC) #33
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/d8b7adbe4b26fedd0a87ffd74aaa...

Powered by Google App Engine
This is Rietveld 408576698