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

Issue 1965543002: [InputEvent] Support |sequence<Range> getRanges()| in 'beforeinput' (Closed)

Created:
4 years, 7 months ago by chongz
Modified:
4 years, 6 months ago
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[InputEvent] Support |sequence<Range> getRanges()| in 'beforeinput' This is the first step to support |getRanges()| in 'beforeinput', the next step will be introducing |StaticRange| and change the method to |sequence<StaticRange> getRanges()|. This CL adds supports to all delete related actions, such as delete-character/word/line/paragraph (forward and backward). Will add support to other inputTypes when the spec is ready. SPEC=http://w3c.github.io/editing/input-events.html BUG=609142 Committed: https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef Cr-Commit-Position: refs/heads/master@{#397131}

Patch Set 1 #

Total comments: 4

Patch Set 2 : dtapuska's review #

Total comments: 11

Patch Set 3 : Use SelectionModifier, rename RangeVector #

Total comments: 8

Patch Set 4 : Yosin's review #

Total comments: 2

Patch Set 5 : Rebase & add TODOs for |base::MakeUnique<T>| #

Total comments: 4

Patch Set 6 : Don't use |std::unique_ptr<>| with |HeapVector| #

Total comments: 10

Patch Set 7 : Ojan's review #

Total comments: 2

Patch Set 8 : Update comments about store and clear |Range| #

Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -12 lines) Patch
A third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html View 1 1 chunk +78 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Range.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.cpp View 1 2 3 4 5 6 7 2 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Editor.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodController.cpp View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp View 1 2 3 4 5 4 chunks +43 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/InputEvent.h View 1 2 3 4 5 6 7 2 chunks +23 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/InputEvent.cpp View 1 2 3 4 5 6 7 4 chunks +47 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/InputEvent.idl View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/InputEventInit.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 43 (11 generated)
chongz
dtapuska@ can you take a look at this CL please? Thanks! (I will fix the ...
4 years, 7 months ago (2016-05-10 13:27:38 UTC) #2
dtapuska
https://codereview.chromium.org/1965543002/diff/1/third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html File third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html (right): https://codereview.chromium.org/1965543002/diff/1/third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html#newcode44 third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html:44: eventSender.keyDown('backspace', [isMacOSX ? 'altKey' : 'ctrlKey']); copyKey can be ...
4 years, 7 months ago (2016-05-12 02:00:09 UTC) #3
chongz
Hi dtapuska@, can you take a look again please? Thanks! https://codereview.chromium.org/1965543002/diff/1/third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html File third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html (right): https://codereview.chromium.org/1965543002/diff/1/third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html#newcode44 ...
4 years, 7 months ago (2016-05-12 20:53:49 UTC) #4
chongz
yosin@ can you take a look at this CL please? Thanks!
4 years, 7 months ago (2016-05-13 02:36:02 UTC) #6
yosin_UTC9
https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp File third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp (right): https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp#newcode139 third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp:139: selection->modify(FrameSelection::AlterationExtend, direction, granularity); Please use functions in VisbileUnits.h, rather ...
4 years, 7 months ago (2016-05-13 05:26:12 UTC) #7
yosin_UTC9
https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp File third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp (right): https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp#newcode139 third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp:139: selection->modify(FrameSelection::AlterationExtend, direction, granularity); On 2016/05/13 at 05:26:12, Yosi_UTC9 wrote: ...
4 years, 7 months ago (2016-05-13 05:42:34 UTC) #8
dtapuska
https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/dom/Range.h File third_party/WebKit/Source/core/dom/Range.h (right): https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/dom/Range.h#newcode174 third_party/WebKit/Source/core/dom/Range.h:174: using HeapRanges = HeapVector<Member<Range>>; On 2016/05/12 20:53:49, chongz wrote: ...
4 years, 7 months ago (2016-05-13 13:27:17 UTC) #9
chongz
On 2016/05/13 05:42:34, Yosi_UTC9 wrote: > https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp > File third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp (right): > > https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp#newcode139 > ...
4 years, 7 months ago (2016-05-17 03:14:04 UTC) #10
yosin_UTC9
On 2016/05/17 at 03:14:04, chongz wrote: > On 2016/05/13 05:42:34, Yosi_UTC9 wrote: > > https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp ...
4 years, 7 months ago (2016-05-17 05:06:08 UTC) #11
yosin_UTC9
On 2016/05/17 at 05:06:08, Yosi_UTC9 wrote: > On 2016/05/17 at 03:14:04, chongz wrote: > > ...
4 years, 7 months ago (2016-05-19 03:43:48 UTC) #12
chongz
yosin@ PTAL, thanks! https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/dom/Range.h File third_party/WebKit/Source/core/dom/Range.h (right): https://codereview.chromium.org/1965543002/diff/20001/third_party/WebKit/Source/core/dom/Range.h#newcode174 third_party/WebKit/Source/core/dom/Range.h:174: using HeapRanges = HeapVector<Member<Range>>; On 2016/05/13 ...
4 years, 7 months ago (2016-05-19 04:41:48 UTC) #13
yosin_UTC9
https://codereview.chromium.org/1965543002/diff/40001/third_party/WebKit/Source/core/editing/Editor.h File third_party/WebKit/Source/core/editing/Editor.h (right): https://codereview.chromium.org/1965543002/diff/40001/third_party/WebKit/Source/core/editing/Editor.h#newcode151 third_party/WebKit/Source/core/editing/Editor.h:151: RangeVector* getRanges() const; Let's use std::unique_ptr<RangeVector> https://codereview.chromium.org/1965543002/diff/40001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp File third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp ...
4 years, 7 months ago (2016-05-19 05:01:02 UTC) #14
chongz
yosin@ I've updated as per your comments, PTAL, thanks! https://codereview.chromium.org/1965543002/diff/40001/third_party/WebKit/Source/core/editing/Editor.h File third_party/WebKit/Source/core/editing/Editor.h (right): https://codereview.chromium.org/1965543002/diff/40001/third_party/WebKit/Source/core/editing/Editor.h#newcode151 third_party/WebKit/Source/core/editing/Editor.h:151: ...
4 years, 7 months ago (2016-05-25 05:38:57 UTC) #15
yosin_UTC9
lgtm https://codereview.chromium.org/1965543002/diff/60001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp File third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp (right): https://codereview.chromium.org/1965543002/diff/60001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp#newcode140 third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp:140: std::unique_ptr<RangeVector> ranges(new RangeVector); We should use |base::MakeUnique<T>| https://code.google.com/p/chromium/codesearch#chromium/src/base/memory/ptr_util.h
4 years, 7 months ago (2016-05-25 07:15:08 UTC) #16
dtapuska
lgtm
4 years, 7 months ago (2016-05-25 13:01:22 UTC) #17
chongz
ojan@ PTAL, thanks!
4 years, 7 months ago (2016-05-25 14:00:16 UTC) #19
chongz
ojan@ can you take a quick look at this CL please? Thanks! https://codereview.chromium.org/1965543002/diff/60001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp File third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp ...
4 years, 6 months ago (2016-05-27 15:46:14 UTC) #23
chongz
oilpan-reviews@ can I have a review on the usage of |std::unique_ptr<>| and |HeapVector<>|? Basically I'm ...
4 years, 6 months ago (2016-05-30 17:39:14 UTC) #25
sof
https://codereview.chromium.org/1965543002/diff/140001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp File third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp (right): https://codereview.chromium.org/1965543002/diff/140001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp#newcode141 third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp:141: std::unique_ptr<RangeVector> ranges(new RangeVector); On 2016/05/30 17:39:14, chongz wrote: > ...
4 years, 6 months ago (2016-05-30 18:30:42 UTC) #27
chongz
https://codereview.chromium.org/1965543002/diff/140001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp File third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp (right): https://codereview.chromium.org/1965543002/diff/140001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp#newcode141 third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp:141: std::unique_ptr<RangeVector> ranges(new RangeVector); On 2016/05/30 18:30:41, sof wrote: > ...
4 years, 6 months ago (2016-05-30 19:08:37 UTC) #28
sof
https://codereview.chromium.org/1965543002/diff/140001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp File third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp (right): https://codereview.chromium.org/1965543002/diff/140001/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp#newcode141 third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp:141: std::unique_ptr<RangeVector> ranges(new RangeVector); On 2016/05/30 19:08:37, chongz wrote: > ...
4 years, 6 months ago (2016-05-30 20:48:20 UTC) #29
ojan
https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/editing/EditingUtilities.cpp File third_party/WebKit/Source/core/editing/EditingUtilities.cpp (right): https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/editing/EditingUtilities.cpp#newcode1745 third_party/WebKit/Source/core/editing/EditingUtilities.cpp:1745: InputEvent* beforeInputEvent = InputEvent::createBeforeInput(InputEvent::InputType::InsertText, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing, nullptr); Should ...
4 years, 6 months ago (2016-05-31 17:47:29 UTC) #30
chongz
ojan@ Thanks for the review! I've added TODOs and detailed descriptions as per your comments, ...
4 years, 6 months ago (2016-05-31 18:32:26 UTC) #31
sof
drive-by-comment https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.idl File third_party/WebKit/Source/core/events/InputEvent.idl (right): https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.idl#newcode15 third_party/WebKit/Source/core/events/InputEvent.idl:15: sequence<Range> getRanges(); Web platform API-atypical for this to ...
4 years, 6 months ago (2016-05-31 18:34:24 UTC) #32
dtapuska
https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.idl File third_party/WebKit/Source/core/events/InputEvent.idl (right): https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.idl#newcode15 third_party/WebKit/Source/core/events/InputEvent.idl:15: sequence<Range> getRanges(); On 2016/05/31 18:34:24, sof wrote: > Web ...
4 years, 6 months ago (2016-05-31 18:37:19 UTC) #33
chongz
https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.idl File third_party/WebKit/Source/core/events/InputEvent.idl (right): https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.idl#newcode15 third_party/WebKit/Source/core/events/InputEvent.idl:15: sequence<Range> getRanges(); On 2016/05/31 18:34:24, sof wrote: > Web ...
4 years, 6 months ago (2016-05-31 18:41:42 UTC) #34
ojan
https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.cpp File third_party/WebKit/Source/core/events/InputEvent.cpp (right): https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.cpp#newcode127 third_party/WebKit/Source/core/events/InputEvent.cpp:127: // Clear |m_ranges| manually in case event object was ...
4 years, 6 months ago (2016-05-31 21:35:58 UTC) #35
chongz
On 2016/05/31 21:35:58, ojan wrote: > https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.cpp > File third_party/WebKit/Source/core/events/InputEvent.cpp (right): > > https://codereview.chromium.org/1965543002/diff/160001/third_party/WebKit/Source/core/events/InputEvent.cpp#newcode127 > ...
4 years, 6 months ago (2016-05-31 22:08:47 UTC) #36
ojan
lgtm once you make the comment a bit more clear. https://codereview.chromium.org/1965543002/diff/180001/third_party/WebKit/Source/core/events/InputEvent.cpp File third_party/WebKit/Source/core/events/InputEvent.cpp (right): https://codereview.chromium.org/1965543002/diff/180001/third_party/WebKit/Source/core/events/InputEvent.cpp#newcode98 ...
4 years, 6 months ago (2016-05-31 22:56:48 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1965543002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1965543002/200001
4 years, 6 months ago (2016-06-01 13:56:03 UTC) #40
commit-bot: I haz the power
Committed patchset #8 (id:200001)
4 years, 6 months ago (2016-06-01 14:00:48 UTC) #41
commit-bot: I haz the power
4 years, 6 months ago (2016-06-01 14:02:29 UTC) #43
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef
Cr-Commit-Position: refs/heads/master@{#397131}

Powered by Google App Engine
This is Rietveld 408576698