All ports of WebKit handles composition & textEvent events in inconsistent ways.
In addition, keyboard events are still dispatched to the DOM during a composition.
According to W3C DOM Level 3 events,
1) A browser should fire compositionstart, compositionupdate, and compositionend event during a composition.
2) The textEvent event should be dispatched after a compositionend event if the composition has not been canceled.
3) While a composition session is active, keyboard events should not be dispatched to the DOM (i.e., the text composition system "swallows" the keyboard events), and only compositionupdate events may be dispatched to indicate the composition process.
Therefore, it is necessary to fix the problems as follows:
1) IME Composition events should be handled consistently in all ports of WebKit.
2) Keyboard events should not be dispatched during a composition.
3) The textInput event should be dispatched after a compositionend event.
Created attachment 62642 [details]
composition status table
The attached png file shows the status of DOM events during a Hangul(Korean alphabet) composition.
Created attachment 62644 [details]
Korean Hangul Composition Event Test (updated)
The attached png file shows the status of DOM events during a Hangul(Korean alphabet) composition
Created attachment 62645 [details]
This test case is brought from https://bugzilla.mozilla.org/show_bug.cgi?id=354358 and tweaked a bit.
Created attachment 62647 [details]
Korean Hangul Composition Event Test2 (updated)