RESOLVED FIXED 15781
REGRESSION: Ligatures fail to form when typing in Devanagari (because WebKit can't handle a marked range that covers half of a composed character sequence)
https://bugs.webkit.org/show_bug.cgi?id=15781
Summary REGRESSION: Ligatures fail to form when typing in Devanagari (because WebKit ...
Oliver Hunt
Reported 2007-10-31 19:13:30 PDT
Create a new message in mail. Select the Devanagari keyboard. Begin typing. Characters that should form ligatures are rendered separately not in combination. For example, the key sequence K D Shift-comma should produce a single glyph (see picture) This problem only seems to happen with text typed directly into mail. Create the text in Text Edit (which works correctly) and copy into mail. The text will render correctly. The same problem happens with Gujarati, but not with Tamil or Arabic.
Attachments
Initial patch to allow sub-character composition ranges (6.81 KB, patch)
2007-10-31 19:17 PDT, Oliver Hunt
no flags
hackish fix (12.51 KB, patch)
2007-11-14 03:03 PST, Alexey Proskuryakov
justin.garcia: review+
Oliver Hunt
Comment 1 2007-10-31 19:15:35 PDT
This problem is like not being able to type the letter "A" in English. Nominating for Intl BRB review. 23/09/07 1:29 PM Darin Adler: I believe this problem occurs because of the behavior of the methods that the Devanagari input method uses to read from the document, rather than the ones it uses to write. The WebKit view has a system where it only returns part of the document to the input method which is probably causing the problem. 23/09/07 1:40 PM Darin Adler: That theory was wrong. The real bug here is that the text insertion command, told to select the inserted text, fails to. The proximate cause of this is that appliedEditing is not called in TypingCommand::typingAddedToOpenCommand because m_applyEditing is false. 23/09/07 1:51 PM Darin Adler: The Devanagari input method marks only one character from a composed character pair, and the code can't handle that. 23/09/07 2:10 PM Darin Adler: Fixing this requires changing our input method handling so that we never try to treat the marked text range (called the "composition" in our cross-platform code and on Windows) as a selection. Doing that requires teaching the editing machinery how to handle these non-selection ranges. 23/09/07 2:44 PM Darin Adler: I worked out a fix, not using selection for manipulating the marked range, and it seems to be working. However it's a pretty risky change -- I don't know what effect it will have on other input methods -- and I also don't have undo implemented yet. I also need to run the regression tests. 23/09/07 4:05 PM Darin Adler: Ollie, I attached my patch, which is a start at resolving this. The primary remaining issue is fitting this into the undo machinery. It also affects the results of some of the regression tests because of different delegate calls.
Oliver Hunt
Comment 2 2007-10-31 19:16:39 PDT
Alexey, can you look at this? I'll attach darin's partial fix
Oliver Hunt
Comment 3 2007-10-31 19:17:39 PDT
Created attachment 16972 [details] Initial patch to allow sub-character composition ranges
Alexey Proskuryakov
Comment 4 2007-11-02 05:47:23 PDT
See also: bug 15790.
Alexey Proskuryakov
Comment 5 2007-11-12 01:46:53 PST
Another example: typing "mfm" with Devanagari-Qwerty layout.
Maciej Stachowiak
Comment 6 2007-11-13 00:38:17 PST
Alexey Proskuryakov
Comment 7 2007-11-14 03:03:41 PST
Created attachment 17266 [details] hackish fix
Justin Garcia
Comment 8 2007-11-14 14:59:38 PST
Comment on attachment 17266 [details] hackish fix + However, this is not entirely new for them, as Roman accents are typed iin a similar manner. Typo. Looks like an OK temporary fix to me.
Alexey Proskuryakov
Comment 9 2007-11-14 21:50:20 PST
Committed revision 27809.
Note You need to log in before you can comment on or make changes to this bug.