OnUpdateComposition() may be called without new range instance by some TIPs when they starts to modify composition string. At this timing, TSFTextStore should append a pending action for dispatching keyboard event into the queue. Without this patch, OnUpdateComposition() creates incomplete pending action for composition update and then, MaybeDispatchKeyboardEventAsProcessedByIME() appends pending action for dispatching keyboard event from another point immediately (e.g., from SetText()), then, finally, the caller of MaybeDispatchKeyboardEventAsProcessedByIME() appends another pending action for composition update with proper composition string. Therefore, the first pending action for composition update clears composition string before actually updating it with new composition string. In other words, new pending action for dispatching keyboard event splits a pending composition update. So, this patch prevents the splitting. MozReview-Commit-ID: 9pYO9pm3Vh9
255 KiB
255 KiB