Chromium Code Reviews
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)
|