WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
14331
WebKit/Windows doesn't support IMEs
https://bugs.webkit.org/show_bug.cgi?id=14331
Summary
WebKit/Windows doesn't support IMEs
808caaa4.8ce9.9cd6c799e9f6
Reported
2007-06-23 03:23:02 PDT
In Japanese(FE) environment, WebKit/safari cannot accept IME composition result. So many users shoud use notepad or something to enter Japanese.... (Type Japanese with notepad, copy to clipboard, and paste to Safari/WebKit) Windows+IME doesn't obey WM_KEYDOWN - WM_CHAR - WM_KEYUP sequence. At IME composition startup, WM_KEYDOWN with wParam==VK_PROCESSKEY sent without proceeding WM_CHAR/WM_KEYUP. During IME compotision, WM_KEYDOWN without WM_CHAR is sent. At candidate selection, result is sent by WM_IME_CHAR without WM_KEYDOWN/WM_KEYUP, and not WM_CHAR. At IME composition ended, WM_KEYUP without WM_KEYDOWN sent. Out-of-sequence-WM_KEY-message may takes L"\x0" to text input class, so sending form content breaks off at that L"\x0" point, as it treated as cstr-terminating. I think Apple team now implementing 'Full IME support' with Aqua theme, may be. Many FE evaluator feels Safari for Windows good and try it widely ASAP. I wish more nice WM_KEY/WM_CHAR handling model in WebViewWndProc implementation for FE envilonment. Below is sample implementation. Works almost well with floating composition window. ...works very well, nice experience. volatile LONG cIMEComposition=0; volatile LONG cWMKeyMessagesPassThruTicketCount=0; volatile LONG cWMKeyDownMessagesCountForCheckingPair=0; LRESULT CALLBACK MyWebVwWndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch(uMsg){ case WM_IME_STARTCOMPOSITION: cIMEComposition++; break; case WM_IME_ENDCOMPOSITION: cIMEComposition--; if(cIMEComposition<0) cIMEComposition=0; cWMKeyDownMessagesCountForCheckingPair=0; break; case WM_IME_CHAR: cWMKeyMessagesPassThruTicketCount+=2; // 2 times... WM_KEYDOWN and WM_KEYUP PostMessageW(hwnd, WM_KEYDOWN, wParam, lParam); PostMessageW(hwnd, WM_CHAR, wParam, lParam); PostMessageW(hwnd, WM_KEYUP, wParam, lParam | 0xc0000000); return 0; case WM_KEYUP: if(!cWMKeyDownMessagesCountForCheckingPair) break; // bypass NOT paired with WM_KEYDOWN cWMKeyDownMessagesCountForCheckingPair--; if(cWMKeyDownMessagesCountForCheckingPair<0) cWMKeyDownMessagesCountForCheckingPair=0; goto L1; case WM_KEYDOWN: if(wParam==VK_PROCESSKEY) break; cWMKeyDownMessagesCountForCheckingPair++; // ----- L1: if(cIMEComposition) { // NOT bypass WM_KEY* from WM_IME_CHAR above // with this demo code, suppose WM_KEY* reach very soon after PostMessageW above if(cWMKeyMessagesPassThruTicketCount){ cWMKeyMessagesPassThruTicketCount--; if(cWMKeyMessagesPassThruTicketCount<0) cWMKeyMessagesPassThruTicketCount=0; // thru } else { break; } } // NOT IME composition mode, pass to WebVwWndProcW default: return WebVwWndProcW(hwnd,uMsg,wParam,lParam); } return DefWindowProcW(hwnd, uMsg, wParam, lParam); }
Attachments
spyxx log with Safari/IME. example WM sequence.
(10.94 KB, text/plain)
2007-06-23 18:39 PDT
,
808caaa4.8ce9.9cd6c799e9f6
no flags
Details
Basic IME support
(18.79 KB, patch)
2007-07-13 21:27 PDT
,
Oliver Hunt
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
808caaa4.8ce9.9cd6c799e9f6
Comment 1
2007-06-23 03:28:56 PDT
> ...works very well, nice experience.
means: Safari/Webkit ...works very well with Japanese, nice experience.
808caaa4.8ce9.9cd6c799e9f6
Comment 2
2007-06-23 18:39:04 PDT
Created
attachment 15203
[details]
spyxx log with Safari/IME. example WM sequence. Example spyxx log. With Safari, search box. Filtered by 'IME messages'+'Keyboard messages'. I typed simply 'aaa', and enter IME composition, type 'ringo' and do composition(with Space/Enter Key), and leaved IME. And typed simply 'yyy' again, and escaped Safari-window with Alt+Tab.
Oliver Hunt
Comment 3
2007-06-27 02:46:11 PDT
<
rdar://problem/5231528
>
Oliver Hunt
Comment 4
2007-06-27 20:08:21 PDT
This is clearly a p1, assigning to self.
808caaa4.8ce9.9cd6c799e9f6
Comment 5
2007-07-13 03:39:59 PDT
errata. example below is buggy. anonymous reporter (2ch,net/software, poster ID:6tWs8t100) said comma cannot be inputed via IME. need to be fixed like this: PostMessageW(hwnd, WM_CHAR, wParam, lParam); WebVwWndProcW(hwnd, WM_KEYDOWN, 0xFFFF, lParam); PostMessageW(hwnd, WM_KEYUP, 0xFFFF, lParam | 0xc0000000);
Oliver Hunt
Comment 6
2007-07-13 21:27:11 PDT
Created
attachment 15511
[details]
Basic IME support
Oliver Hunt
Comment 7
2007-07-14 01:24:51 PDT
Reviewed by darin + alexey Landed
r24285
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug