Bug 105618

Summary: [EFL][WK2] Fix the position of cursor when handling preedit string
Product: WebKit Reporter: Seokju Kwon <seokju>
Component: WebKit EFLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: dglazkov, gyuyoung.kim, hh.kaka, lucas.de.marchi, mcatanzaro, rakuco, ryuan.choi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Seokju Kwon
Reported 2012-12-20 23:02:07 PST
An input method may consume multiple key events in sequence and finally output the composed result. (To input Chinese, Japanese, Korean and other complex languages). Cursor position is incorrect when handling preedit string at this time.
Attachments
Patch (2.16 KB, patch)
2012-12-21 06:52 PST, Seokju Kwon
no flags
Patch (2.13 KB, patch)
2012-12-21 19:38 PST, Seokju Kwon
no flags
Patch (2.13 KB, patch)
2012-12-23 21:00 PST, Seokju Kwon
no flags
Patch (2.16 KB, patch)
2012-12-25 04:21 PST, Seokju Kwon
no flags
Seokju Kwon
Comment 1 2012-12-21 06:52:16 PST
WebKit Review Bot
Comment 2 2012-12-21 07:59:23 PST
Comment on attachment 180514 [details] Patch Attachment 180514 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15464324 New failing tests: inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
WebKit Review Bot
Comment 3 2012-12-21 08:40:33 PST
Comment on attachment 180514 [details] Patch Attachment 180514 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15451475 New failing tests: inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
Seokju Kwon
Comment 4 2012-12-21 19:38:35 PST
Ryuan Choi
Comment 5 2012-12-23 14:38:13 PST
Comment on attachment 180587 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180587&action=review LGTM without typo. > Source/WebKit2/ChangeLog:3 > + [EFL][WK2] Fix the postiion of cursor when handling preedit string position
Seokju Kwon
Comment 6 2012-12-23 21:00:17 PST
Seokju Kwon
Comment 7 2012-12-23 21:04:40 PST
(In reply to comment #5) > (From update of attachment 180587 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=180587&action=review > > LGTM without typo. > > > Source/WebKit2/ChangeLog:3 > > + [EFL][WK2] Fix the postiion of cursor when handling preedit string > > position Fixed. Than you for your review.
Seokju Kwon
Comment 8 2012-12-23 21:05:01 PST
(In reply to comment #7) > (In reply to comment #5) > > (From update of attachment 180587 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=180587&action=review > > > > LGTM without typo. > > > > > Source/WebKit2/ChangeLog:3 > > > + [EFL][WK2] Fix the postiion of cursor when handling preedit string > > > > position > > Fixed. Than you for your review. Than -> Thank :)
Laszlo Gombos
Comment 9 2012-12-24 23:05:37 PST
Comment on attachment 180640 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180640&action=review Overall looks good to me. > Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp:65 > + ecore_imf_context_preedit_string_get(context, &buffer, &preeditPosition); It would be great to validate preeditPosition (at least with ASSERT) after this call before using it later in the code.
Seokju Kwon
Comment 10 2012-12-25 04:18:47 PST
(In reply to comment #9) > (From update of attachment 180640 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=180640&action=review > > Overall looks good to me. > > > Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp:65 > > + ecore_imf_context_preedit_string_get(context, &buffer, &preeditPosition); > > It would be great to validate preeditPosition (at least with ASSERT) after this call before using it later in the code. Thanks, it is the position of cursor within the preedit string. And I will add it after this call.
Seokju Kwon
Comment 11 2012-12-25 04:21:07 PST
Chris Dumez
Comment 12 2012-12-25 04:27:36 PST
Comment on attachment 180707 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180707&action=review > Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp:74 > + int cursorPosition = preeditString.length() + preeditPosition; Why preeditString.length() + preeditPosition ? I thought preeditPosition was already the cursor position within the preedit string?
Seokju Kwon
Comment 13 2012-12-25 04:37:00 PST
(In reply to comment #12) > (From update of attachment 180707 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=180707&action=review > > > Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp:74 > > + int cursorPosition = preeditString.length() + preeditPosition; > > Why preeditString.length() + preeditPosition ? I thought preeditPosition was already the cursor position within the preedit string? It could be 0. (in case of korean)
Seokju Kwon
Comment 14 2012-12-25 13:35:30 PST
(In reply to comment #12) > (From update of attachment 180707 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=180707&action=review > > > Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp:74 > > + int cursorPosition = preeditString.length() + preeditPosition; > > Why preeditString.length() + preeditPosition ? I thought preeditPosition was already the cursor position within the preedit string? It is an offset into preedit string. We need cursor position for the argument of setCompositon. (not cursor position within preedit string)
Gyuyoung Kim
Comment 15 2012-12-25 22:46:54 PST
Comment on attachment 180707 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180707&action=review >>>> Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp:74 >>>> + int cursorPosition = preeditString.length() + preeditPosition; >>> >>> Why preeditString.length() + preeditPosition ? I thought preeditPosition was already the cursor position within the preedit string? >> >> It could be 0. (in case of korean) > > It is an offset into preedit string. > We need cursor position for the argument of setCompositon. (not cursor position within preedit string) By the way, I wonder if cursorPosition can support meaningful functionality. Because, EFL port doesn't support *selectionEnd* parameter though cursorPosition means *selectionStart* in Editor.h. In WebPageEfl.cpp, it sets last parameter with 0. void WebPage::setComposition(const String& compositionString, const Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition) { ... targetFrame->editor()->setComposition(compositionString, underlines, cursorPosition, 0); Shouldn't we support *selectionEnd* parameter as Qt and Mac ports ?
Gyuyoung Kim
Comment 16 2013-04-08 19:12:48 PDT
Any update ?
Seokju Kwon
Comment 17 2013-04-09 04:23:15 PDT
(In reply to comment #16) > Any update ? Oh. It seems that Ecore-imf doesn't fully support like other ports. So we can't get the other values from ecore-imf APIs. Need to take a look. :)
Michael Catanzaro
Comment 18 2017-03-11 10:49:56 PST
Closing this bug because the EFL port has been removed from trunk. If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.
Note You need to log in before you can comment on or make changes to this bug.