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

Issue 2117543003: [InputEvent] Fill |data| field for 'input' event InsertText (Closed)

Created:
4 years, 5 months ago by chongz
Modified:
4 years, 5 months ago
Reviewers:
yosin_UTC9
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] Fill |data| field for 'input' event InsertText According to spec only InsertText and InsertNonText has |data| field. This CL fills |data| field for 'input' event InsertText ('beforeinput' already has it), InsertNonText is not supported yet. The |data| text is retrieved from the last |InsertTextCommand| of current |TypingCommand|, return empty string if the last command is not |InsertTextCommand|. (e.g. |InsertLineBreakCommand|) Note: |TypingCommand| has member |m_textToInsert| but it's only recording the first text of current open command. SPEC=http://w3c.github.io/editing/input-events.html#h-interface-inputevent-attributes BUG=585875 Committed: https://crrev.com/bfd2e5aec10ceceecda09fe7440e4a5e3e2bc648 Cr-Commit-Position: refs/heads/master@{#404192}

Patch Set 1 : Add tests for InputEvent.data #

Total comments: 8

Patch Set 2 : Add virtual function |textData()| to |EditCommand| #

Total comments: 6

Patch Set 3 : Rename |EditCommand::textData()| to |EditCommand::textDataForInputEvent()| #

Total comments: 1

Patch Set 4 : Removed |dataFromCommand()| helper function #

Messages

Total messages: 18 (8 generated)
chongz
yosin@ PTAL at this 'input' event CL for |data| field, thanks!
4 years, 5 months ago (2016-07-04 21:47:21 UTC) #4
yosin_UTC9
It seems we have virtual member function EditCommand::textData(), we don't need to have |isInsertTextCommand()|. virtual ...
4 years, 5 months ago (2016-07-05 01:22:08 UTC) #5
chongz
yosin@ I've changed |textOfLastCommand()| to |virtual EditCommand::textData()| and removed type dispatching. PTAL again, thanks! https://codereview.chromium.org/2117543003/diff/20001/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-data-keyboard.html ...
4 years, 5 months ago (2016-07-05 20:33:28 UTC) #6
yosin_UTC9
https://codereview.chromium.org/2117543003/diff/40001/third_party/WebKit/Source/core/editing/Editor.cpp File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/2117543003/diff/40001/third_party/WebKit/Source/core/editing/Editor.cpp#newcode145 third_party/WebKit/Source/core/editing/Editor.cpp:145: String dataFromCommand(const CompositeEditCommand* command) It seems having |EditCommand::textDataForInputEvent()| makes ...
4 years, 5 months ago (2016-07-06 01:20:56 UTC) #7
chongz
yosin@ I've changed |EditCommand::textData()| to |EditCommand::textDataForInputEvent()| and moved implementation to .cpp files, PTAL again, thanks! ...
4 years, 5 months ago (2016-07-06 23:34:32 UTC) #9
yosin_UTC9
lgtm w/ small nit https://codereview.chromium.org/2117543003/diff/80001/third_party/WebKit/Source/core/editing/Editor.cpp File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/2117543003/diff/80001/third_party/WebKit/Source/core/editing/Editor.cpp#newcode146 third_party/WebKit/Source/core/editing/Editor.cpp:146: String dataFromCommand(const CompositeEditCommand* command) We ...
4 years, 5 months ago (2016-07-07 00:44:32 UTC) #10
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/2117543003/100001
4 years, 5 months ago (2016-07-07 18:37:21 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:100001)
4 years, 5 months ago (2016-07-07 18:50:28 UTC) #15
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-07 18:50:33 UTC) #16
commit-bot: I haz the power
4 years, 5 months ago (2016-07-07 18:54:11 UTC) #18
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/bfd2e5aec10ceceecda09fe7440e4a5e3e2bc648
Cr-Commit-Position: refs/heads/master@{#404192}

Powered by Google App Engine
This is Rietveld 408576698