Description[IME] Fire 'compositionend' after 'textInput' event and all other DOM updates
Before CL Blink/Webkit fires 'textInput' after 'compositionend', and 'textInput's default handler will modify DOM. (violates spec)
This CL cleans up code about events during composition, and only fire
'compositionend' event after 'textInput' event and all other DOM updates.
This CL follows option b) in BUG=41945
Potential interop issue:
Safari and Edge still fires 'textInput' after 'compositionend', so it might affect websites that gets IME input using shadow elements.
Alternative Approach (option c in the bug description):
Preserve the order but don't modify DOM in 'textInput' default handler. (matches Edge, but will affect websites with UA check)
PS: There is another issue about Chinese IBus IME on Linux where the order seems non-fixable, will create a separate issue.
SPEC=https://w3c.github.io/uievents/#compositionend
BUG=41945
Committed: https://crrev.com/afce9d93e76f2ff81baaa088a4ea25f67d1a76b3
Cr-Commit-Position: refs/heads/master@{#395930}
Patch Set 1 #
Total comments: 9
Patch Set 2 : yosin's review #Patch Set 3 : Add DCHECK for empty text, fix ImeTest.java #Messages
Total messages: 21 (12 generated)
|