Re: [w3c/editing] EditContext: Do IME see the plaintext in `EditContext`? (#342)

> > 1. The first character rect in the editor (if there is no text, stores the caret rect for inserting first character)
> 
> Blink only caches rect of current selection, (or rect of the caret if no selection). What is the use of the first char rect for IME if the char is not in active composition?

According to the log, it was required for supporting Japanese IME on macOS Yosemite.
https://bugzilla.mozilla.org/show_bug.cgi?id=1171814

> > 1. Before/after character rects of anchor/focus point of Selection (This is required for allowing IME to show tooltip like UI around selection)
> 
> do you mean if the string is "A|BCD|EF" and selection is (1,4), Gecko caches rect for 'A''B' and 'D''E'? in this case Blink caches rect for 'BCD', is that not enough for IME?

It was supporting for query rect of previous character when caret is put at end of line. I don't remember the detail though.
https://bugzilla.mozilla.org/show_bug.cgi?id=1257446

> > 1. All characters' rects at last commit string only immediately after composition ends (this is required for Kakutei-undo feature of Japanese IMEs)
> 
> could you elaborate more? we already cache all chars in composition in 1) right? do you mean after comosition ends, we don't reset? and what is Kakutei-undo feature? how do we apply it?

Kakutei-Undo is that restore last composition string which is committed immediately before (i.e., if you move selection or typing other things, it may become not available). At this time, IME queries character rects of the last commit string **before** or **immediately after** starting new composition. I.e., this is required when there is no active composition, but Kakutei-Undo is available.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/342#issuecomment-939652669

Received on Monday, 11 October 2021 03:39:22 UTC