[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

Review-Url: https://codereview.chromium.org/2117543003
Cr-Commit-Position: refs/heads/master@{#404192}
10 files changed