Bug 4708 - kEventTextInputGetSelectedText doesn't return any text from WebHTMLViews
Summary: kEventTextInputGetSelectedText doesn't return any text from WebHTMLViews
Status: RESOLVED DUPLICATE of bug 4680
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-28 04:40 PDT by Alexey Proskuryakov
Modified: 2005-09-28 10:39 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2005-08-28 04:40:30 PDT
When an input method asks a WebHTMLView for the currently selected text, nothing is returned. 

Steps to reproduce:
1. Open WebCore/layout-tests/editing/inserting/typing-001.html
2. Type something with Kotoeri Hiragana, confirm the inline input area
3. Select one character
4. Press Control-1 or Control-2 (Search similar Kanji, Convert to related character)

Expected results: an inline input area is created from the selection
Actual results: nothing happens

Discussion: here is how the reply to kEventTextInputGetSelectedText looks like (note the emply 
kEventParamTextInputReplyText 'trtx'):

(gdb) call (void)_DebugPrintEvent(0x5CD49D0)
Displaying event 5CD49D0...
   Class           text
   Kind            6
   When               3132.53
   Priority        Standard
   RetainCount     1
   Queued          No
   Info            kEventTextInputGetSelectedText
   Parameters
        param: tsci
           type: cmpi
           size: 4
           data: 00FFFFFF810003
                     
        param: buff
           type: long
           size: 4
           data: 00000100
                     
        param: tssm
           type: magn
           size: 4
           data: 00000001
                     
        param: tssl
           type: intl
           size: 2
           data: 0001
                   
        param: tsrc
           type: long
           size: 4
           data: 04FFFFFFE92230
                   "0
        param: trsl
           type: intl
           size: 4
           data: 0001000B
                     
        param: trtx
           type: utxt
           size: 0
           data:
Comment 1 Alexey Proskuryakov 2005-09-28 10:39:10 PDT
This is fixed by implementing attributedSubstringFromRange

*** This bug has been marked as a duplicate of 4680 ***