Bug 43020

Summary: IME Composition events are handled inconsistently in each port
Product: WebKit Reporter: Joone Hur <joone>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Major CC: ap, daniel.danilatos, gyuyoung.kim, hbono
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 40518    
Attachments:
Description Flags
composition status table
none
Korean Hangul Composition Event Test (updated)
none
test case
none
Korean Hangul Composition Event Test2 (updated) none

Description Joone Hur 2010-07-26 22:09:45 PDT
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.
Comment 1 Joone Hur 2010-07-26 22:16:36 PDT
Created attachment 62642 [details]
composition status table

The attached png file shows the status of DOM events during a Hangul(Korean alphabet) composition.
Comment 2 Joone Hur 2010-07-26 22:27:58 PDT
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
Comment 3 Joone Hur 2010-07-26 22:52:46 PDT
Created attachment 62645 [details]
test case

This test case is brought from https://bugzilla.mozilla.org/show_bug.cgi?id=354358 and tweaked a bit.
Comment 4 Joone Hur 2010-07-26 23:00:20 PDT
Created attachment 62647 [details]
Korean Hangul Composition Event Test2 (updated)