Closed Bug 1241408 Opened 10 years ago Closed 10 years ago

Google docs commits composition text per input with TSF and non-e10s mode

Categories

(Core :: Widget: Win32, defect)

Unspecified
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
e10s - ---
firefox45 --- fixed
firefox46 --- fixed
firefox47 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

Details

(Keywords: inputmethod)

Attachments

(1 file, 1 obsolete file)

- Env Windows 10 Nightly 2016-01-21 (not-e10s mode) Google Japanese IME - Step 1. Run Firefox with non-e10s mode 2. Open docs.google.com and new document 3. Focus document body 4. Input あああ 5. Hit [Enter] key to commit string 6. Input 'い' multiple times - Result When inputting 'い', this is committed. But composing state is kept, so character is duplicated. - Expected Result Don't commit character until user commits it - Note * This issue doesn't reproduce on e10s mode * This issue is only on Google Japanese IME with TSF mode 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::InsertTextAtSelection(dwFlags=TF_IAS_QUERYONLY, pchText=0x0 "", cch=0, pacpStart=0xa4499fde64, pacpEnd=0xa4499fde60, pChange=0xa4499fde68), IsComposing()=false 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false Although inputting first composition character, acpStart of selection doesn't become 0. If using e10s, it is always 0. 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::InsertTextAtSelection() succeeded: *pacpStart=3, *pacpEnd=3, *pChange={ acpStart=3, acpOldEnd=3, acpNewEnd=3 }) 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::InsertTextAtSelection(dwFlags=TF_IAS_QUERYONLY, pchText=0x0 "", cch=0, pacpStart=0xa4499fddc4, pacpEnd=0xa4499fddc0, pChange=0xa4499fddc8), IsComposing()=false 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::InsertTextAtSelection() succeeded: *pacpStart=3, *pacpEnd=3, *pChange={ acpStart=3, acpOldEnd=3, acpNewEnd=3 }) 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::OnStartComposition(pComposition=0x1df8c4c50a0, pfOk=0xa4499fde60), mComposition.mView=0x0 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::RecordCompositionStartAction(aComposition=0x1df8c4c50a0, aRange=0x1df8c4c3f68, aPreserveSelection=false), mComposition.mView=0x0 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::RecordCompositionStartAction(aComposition=0x1df8c4c50a0, aStart=3, aLength=0, aPreserveSelection=false), mComposition.mView=0x0 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::GetCurrentText(): retrieving text from the content... ... 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::SetSelection(ulCount=1, pSelection=a4499fde78 { acpStart=5, acpEnd=5, style={ ase=TS_AE_END, fInterimChar=false } }), mComposition.IsComposing()=true 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::SetSelectionInternal(pSelection={ acpStart=5, acpEnd=5, style={ ase=TS_AE_END, fInterimChar=false} }, aDispatchCompositionChangeEvent=true), mComposition.IsComposing()=true 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::CurrentSelection(): acpStart=6, acpEnd=6 (length=0), reverted=false 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::RestartCompositionIfNecessary(aRangeNew=0x0), mComposition.mView=0x1df8c4c50a0 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::RestartCompositionIfNecessary(), range=3-6, mComposition={ mStart=3, mString.Length()=5 } 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::CurrentSelection(): acpStart=6, acpEnd=6 (length=0), reverted=false 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::RestartComposition(aCompositionView=0x1df8c4c50a0, aNewRange=0x1df8c4c4a48 { newStart=3, newLength=3 }), mComposition={ mStart=3, mCompositionString.Length()=5 }, currentSelection={ IsDirty()=false, StartOffset()=6, Length()=0 } 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::CurrentSelection(): acpStart=6, acpEnd=6 (length=0), reverted=false 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::LockedContent(): mLockedContent={ mText="いいいいい" (Length()=5), mLastCompositionString="いい" (Length()=2), mMinTextModifiedOffset=5 } 0[1dffb31d800]: TSF: 0x1df8ef89790 TSFTextStore::RecordCompositionEndAction(), mComposition={ mView=0x1df8c4c50a0, mString="いいいいい" } Record compositionend unfortunately, so compositionend is dispatched
tracking-e10s: --- → -
selection is changed, but we don't mark dirty. So we should mark as dirty even if TSF has read lock.
Assignee: nobody → m_kato
Attached patch Mark dirty for selection (obsolete) — Splinter Review
Comment on attachment 8711529 [details] [diff] [review] Mark dirty for selection When using Google Docs with TSF/Google IME, we cannot input composing text well. When starting composition, we use current selection to recognize start position of composition, but it isn't valid on Google docs. After committed string, although selection will changed, selection cache into TSFTextStore isn't updated. Since it is during read lock, OnSelectionChangeInternal will return without setting selection. So we should mark dirty even if locked. This issue won't occur on e10s. Because OnSelection is from child process, so we don't have read lock on this situation.
Attachment #8711529 - Flags: review?(masayuki)
Comment on attachment 8711529 [details] [diff] [review] Mark dirty for selection I'm not sure if this is right approach since mSelection is assumed that it isn't dirty during mLockedContent is valid. If you just remove this early return, how does it work? Currently we support putting off to notify TSF of selection change until unlocking the document. This feature was implemented after this block had been written. I *guess* it works well for this case.
Flags: needinfo?(m_kato)
(In reply to Masayuki Nakano [:masayuki] (Mozilla Japan) from comment #4) > Comment on attachment 8711529 [details] [diff] [review] > Mark dirty for selection > > I'm not sure if this is right approach since mSelection is assumed that it > isn't dirty during mLockedContent is valid. > > If you just remove this early return, how does it work? Currently we support > putting off to notify TSF of selection change until unlocking the document. > This feature was implemented after this block had been written. I *guess* it > works well for this case. It works fine even if removing return by read lock.
Flags: needinfo?(m_kato)
Then, please do that. I think that that is better approach.
Attachment #8711529 - Flags: review?(masayuki)
Remove read lock check on OnSelectionChange
Attachment #8711529 - Attachment is obsolete: true
Attachment #8711599 - Flags: review?(masayuki)
Attachment #8711599 - Flags: review?(masayuki) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Target Milestone: mozilla46 → mozilla47
Comment on attachment 8711599 [details] [diff] [review] Update selection cache even if having read lock Approval Request Comment [Feature/regressing bug #]: Bug 478029 [User impact if declined]: All Google docs users that use Google Japanese IME. Users cannot input character via Japanese IME well. Firefox 45 is also ESR, so we should fix this for corporate users. [Describe test coverage new/current, TreeHerder]: landed in m-c [Risks and why]: Low. This removes unnecessary readonly check for TSF. [String/UUID change made/needed]: N/A
Attachment #8711599 - Flags: approval-mozilla-beta?
Attachment #8711599 - Flags: approval-mozilla-aurora?
Comment on attachment 8711599 [details] [diff] [review] Update selection cache even if having read lock Improve the situation for JP users. Taking it Should be in 45 beta 2.
Attachment #8711599 - Flags: approval-mozilla-beta?
Attachment #8711599 - Flags: approval-mozilla-beta+
Attachment #8711599 - Flags: approval-mozilla-aurora?
Attachment #8711599 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: