Closed Bug 1066594 Opened 11 years ago Closed 11 years ago

[TSF]Microsoft IME 2010 remove typed text by converting character

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: kuroweb, Assigned: masayuki)

Details

(Keywords: inputmethod)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:35.0) Gecko/20100101 Firefox/35.0 Build ID: 20140912030202 Steps to reproduce: 1) Microsoft IME 2010 enabled, and input "あいうえお". 2) Cursor move to begining of line. 3) Type to "にほんご". 4) convert via [space] key. 5) continue to type "か". Actual results: 日本語かいうえお Expected results: 日本語かあいうえお
Component: Untriaged → General
OS: Windows 8.1 → Windows 7
Hardware: x86 → x86_64
Assignee: nobody → masayuki
Status: UNCONFIRMED → NEW
Component: General → Widget: Win32
Ever confirmed: true
Keywords: inputmethod
OS: Windows 7 → Windows 8.1
Product: Firefox → Core
Hardware: x86_64 → x86
Version: 35 Branch → Trunk
OS: Windows 8.1 → Windows 7
Hardware: x86 → x86_64
The log: > 0[280f140]: TSF: 0xab123e0 nsTextStore::RequestLock(dwLockFlags=TS_LF_READWRITE | TS_LF_SYNC, phrSession=0x6fe794), mLock=not-specified > 0[280f140]: TSF: 0xab123e0 Locking (TS_LF_READWRITE) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection(ulIndex=4294967295, ulCount=1, pSelection=0x6fe274, pcFetched=0x6fe378) > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetText(acpStart=0, acpEnd=-1, pchPlain=0x76b79760, cchPlainReq=128, pcchPlainOut=0x6fdd78, prgRunInfo=0x76b79860, ulRunInfoReq=33, pulRunInfoOut=0x76b791f8, pacpNext=0x76b79210), mComposition={ mStart=0, mString.Length()=3, IsComposing()=true } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::LockedContent(): mLockedContent={ mText.Length()=8 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetText() succeeded: pcchPlainOut=0x6fdd78, *prgRunInfo={ uCount=8, type=TS_RT_PLAIN }, *pulRunInfoOut=1991741944, *pacpNext=1991741968) > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnUpdateComposition(pComposition=0x16dec870, pRangeNew=0x0), mComposition.mView=0x16dec870 > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnUpdateComposition() succeeded but not complete > 0[280f140]: TSF: 0xab123e0 nsTextStore::SetText(dwFlags=not-specified, acpStart=3, acpEnd=3, pchText=0x1def201c "か", cch=1, pChange=0x6fdf24), mComposition.IsComposing()=true > 0[280f140]: TSF: 0xab123e0 nsTextStore::SetSelectionInternal(pSelection={ acpStart=3, acpEnd=3, style={ ase=TS_AE_END, fInterimChar=false} }, aDispatchTextEvent=false), mComposition.IsComposing()=true > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::InsertTextAtSelectionInternal(aInsertStr="か", aTextChange=0x6fdf24), IsComposing=true > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::LockedContent(): mLockedContent={ mText.Length()=8 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::InsertTextAtSelectionInternal() succeeded: mWidget=0xcf96c00, mWidget->Destroyed()=false, aTextChange={ acpStart=3, acpOldEnd=3, acpNewEnd=4 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::SetText() succeeded: pChange={ acpStart=3, acpOldEnd=3, acpNewEnd=4 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetText(acpStart=0, acpEnd=-1, pchPlain=0x76b79760, cchPlainReq=128, pcchPlainOut=0x6fdaac, prgRunInfo=0x76b79860, ulRunInfoReq=33, pulRunInfoOut=0x76b791f8, pacpNext=0x76b79210), mComposition={ mStart=0, mString.Length()=4, IsComposing()=true } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::LockedContent(): mLockedContent={ mText.Length()=9 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetText() succeeded: pcchPlainOut=0x6fdaac, *prgRunInfo={ uCount=9, type=TS_RT_PLAIN }, *pulRunInfoOut=1991741944, *pacpNext=1991741968) > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnUpdateComposition(pComposition=0x16dec870, pRangeNew=0x0), mComposition.mView=0x16dec870 > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnUpdateComposition() succeeded but not complete > 0[280f140]: TSF: 0xab123e0 nsTextStore::SetSelection(ulCount=1, pSelection=6fe230 { acpStart=3, acpEnd=3, style={ ase=TS_AE_NONE, fInterimChar=false } }), mComposition.IsComposing()=true > 0[280f140]: TSF: 0xab123e0 nsTextStore::SetSelectionInternal(pSelection={ acpStart=3, acpEnd=3, style={ ase=TS_AE_NONE, fInterimChar=false} }, aDispatchTextEvent=true), mComposition.IsComposing()=true > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary(aRangeNew=0x0), mComposition.mView=0x16dec870 > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary(), range=0-4, mComposition={ mStart=0, mString.Length()=4 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionUpdateAction(), mComposition={ mView=0x16dec870, mString="日本語か" } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute(): GetDisplayAttribute range=0-3 (hr=S_OK) > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute() FAILED due to ITfProperty::GetValue() returns non-VT_I4 value > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute(): GetDisplayAttribute range=3-4 (hr=S_OK) > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute() succeeded: Result={ crText:{ TF_CT_NONE }, crBk:{ TF_CT_NONE }, lsStyle: TF_LS_SQUIGGLE, fBoldLine: false, crLine:{ TF_CT_NONE }, bAttr: TF_ATTR_INPUT } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionUpdateAction() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::SetSelection() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::SetSelection(ulCount=1, pSelection=6fe230 { acpStart=4, acpEnd=4, style={ ase=TS_AE_NONE, fInterimChar=false } }), mComposition.IsComposing()=true > 0[280f140]: TSF: 0xab123e0 nsTextStore::SetSelectionInternal(pSelection={ acpStart=4, acpEnd=4, style={ ase=TS_AE_NONE, fInterimChar=false} }, aDispatchTextEvent=true), mComposition.IsComposing()=true > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary(aRangeNew=0x0), mComposition.mView=0x16dec870 > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary(), range=0-4, mComposition={ mStart=0, mString.Length()=4 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionUpdateAction(), mComposition={ mView=0x16dec870, mString="日本語か" } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute(): GetDisplayAttribute range=0-3 (hr=S_OK) > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute() FAILED due to ITfProperty::GetValue() returns non-VT_I4 value > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute(): GetDisplayAttribute range=3-4 (hr=S_OK) > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute() succeeded: Result={ crText:{ TF_CT_NONE }, crBk:{ TF_CT_NONE }, lsStyle: TF_LS_SQUIGGLE, fBoldLine: false, crLine:{ TF_CT_NONE }, bAttr: TF_ATTR_INPUT } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionUpdateAction() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::SetSelection() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnUpdateComposition(pComposition=0x16dec870, pRangeNew=0x2b649214), mComposition.mView=0x16dec870 > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary(aRangeNew=0x2b649214), mComposition.mView=0x16dec870 > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary(), range=0-4, mComposition={ mStart=0, mString.Length()=4 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionUpdateAction(), mComposition={ mView=0x16dec870, mString="日本語か" } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute(): GetDisplayAttribute range=0-3 (hr=S_OK) > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute() FAILED due to ITfProperty::GetValue() returns non-VT_I4 value > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute(): GetDisplayAttribute range=3-4 (hr=S_OK) > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute() succeeded: Result={ crText:{ TF_CT_NONE }, crBk:{ TF_CT_NONE }, lsStyle: TF_LS_SQUIGGLE, fBoldLine: false, crLine:{ TF_CT_NONE }, bAttr: TF_ATTR_INPUT } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionUpdateAction() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnUpdateComposition() succeeded: mComposition={ mStart=0, mString="日本語か" }, CurrentSelection()={ acpStart=4, acpEnd=4, style.ase=TS_AE_END } > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnUpdateComposition(pComposition=0x16dec870, pRangeNew=0x2b6491dc), mComposition.mView=0x16dec870 > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary(aRangeNew=0x2b6491dc), mComposition.mView=0x16dec870 > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary(), range=3-4, mComposition={ mStart=0, mString.Length()=4 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartComposition(aCompositionView=0x16dec870, aNewRange=0x2b6491dc { newStart=3, newLength=1 }), mComposition={ mStart=0, mCompositionString.Length()=4 }, currentSelection={ IsDirty()=false, StartOffset()=4, Length()=0 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::LockedContent(): mLockedContent={ mText.Length()=9 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionEndAction(), mComposition={ mView=0x16dec870, mString="日本語" } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=3, acpEnd=3 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::LockedContent(): mLockedContent={ mText.Length()=8 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionEndAction(), succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionStartAction(pComposition=0x16dec870, aRange=0x2b6491dc, aPreserveSelection=true), mComposition.mView=0x0 > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::LockedContent(): mLockedContent={ mText.Length()=9 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionStartAction() succeeded: mComposition={ mStart=3, mString.Length()=1, mSelection={ acpStart=4, acpEnd=4, style.ase=TS_AE_END, style.fInterimChar=false } } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RestartCompositionIfNecessary() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionUpdateAction(), mComposition={ mView=0x16dec870, mString="か" } > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute(): GetDisplayAttribute range=-3-0 (hr=S_OK) > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute() FAILED due to ITfProperty::GetValue() returns non-VT_I4 value > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute(): GetDisplayAttribute range=0-1 (hr=S_OK) > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetDisplayAttribute() succeeded: Result={ crText:{ TF_CT_NONE }, crBk:{ TF_CT_NONE }, lsStyle: TF_LS_SQUIGGLE, fBoldLine: false, crLine:{ TF_CT_NONE }, bAttr: TF_ATTR_INPUT } > 0[280f140]: TSF: 0xab123e0 nsTextStore::RecordCompositionUpdateAction() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnUpdateComposition() succeeded: mComposition={ mStart=3, mString="か" }, CurrentSelection()={ acpStart=4, acpEnd=4, style.ase=TS_AE_END } > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection(ulIndex=4294967295, ulCount=1, pSelection=0x6fe1ec, pcFetched=0x6fe2a4) > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetStatus(pdcs=0x6fe2d4) > 0[280f140]: TSF: 0xab123e0 nsTextStore::RequestSupportedAttrs(dwFlags=no flags (0), cFilterAttrs=1) > 0[280f140]: TSF: 0xab123e0 nsTextStore::HandleRequestAttrs(aFlags=no flags (0), aFilterCount=1) > 0[280f140]: TSF: 0xab123e0 nsTextStore::HandleRequestAttrs(), requested attr=TSATTRID_Text_Orientation > 0[280f140]: TSF: 0xab123e0 nsTextStore::RetrieveRequestedAttrs() called ulCount=1, mRequestedAttrValues=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::RetrieveRequestedAttrs() called for unknown TS_ATTRVAL, *pcFetched=0 (S_OK) > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection(ulIndex=4294967295, ulCount=1, pSelection=0x6fe39c, pcFetched=0x6fe488) > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection(ulIndex=4294967295, ulCount=1, pSelection=0x6fe39c, pcFetched=0x6fe488) > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection() succeeded > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection(ulIndex=4294967295, ulCount=1, pSelection=0x6fe39c, pcFetched=0x6fe488) > 0[280f140]: TSF: 0xab123e0 nsTextStore::CurrentSelection(): acpStart=4, acpEnd=4 (length=0), reverted=false > 0[280f140]: TSF: 0xab123e0 nsTextStore::GetSelection() succeeded > 0[280f140]: TSF: 0xab123e0 Unlocked (TS_LF_READWRITE) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions() flushing COMPOSITION_UPDATE={ mData="日本語", mRanges=0x19124aa0, mRanges->Length()=1 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions(), dispatching text event... > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions() flushing COMPOSITION_END={ mData="日本語" } > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions(), dispatching text event... > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions(), dispatching compositionend event... > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions() flushing COMPOSITION_START={ mSelectionStart=3, mSelectionLength=1 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnSelectionChangeInternal(), mSink=0x16c408f4, mSinkMask=TS_AS_TEXT_CHANGE | TS_AS_SEL_CHANGE | TS_AS_LAYOUT_CHANGE | TS_AS_ATTR_CHANGE | TS_AS_STATUS_CHANGE, mIsRecordingActionsWithoutLock=false, mComposition.IsComposing()=true > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions() dispatching compositionstart event... > 0[280f140]: TSF: 0xab123e0 nsTextStore::OnLayoutChangeInternal(), calling mSink->OnLayoutChange()... > 0[280f140]: TSF: 0xab123e0 nsTextStore::RequestLock(dwLockFlags=TS_LF_READ, phrSession=0x6fd864), mLock=TS_LF_READWRITE > 0[280f140]: TSF: 0xab123e0 nsTextStore::RequestLock() didn't allow to lock, *phrSession=TS_E_SYNCHRONOUS > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions() flushing COMPOSITION_UPDATE={ mData="か", mRanges=0x1c2d0960, mRanges->Length()=4 } > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions(), dispatching compositionupdate event... > 0[280f140]: TSF: 0xab123e0 nsTextStore::FlushPendingActions(), dispatching text event... > 0[280f140]: TSF: 0xab123e0 nsTextStore::RequestLock() succeeded: *phrSession=S_OK
Attached patch PatchSplinter Review
The cause of this bug is, restoring composition string is not performed before dispatching compositionstart (in FlushPendingActions()). Therefore, the pre-restored content is overwritten. So, when a part of composition is committed, we should restart composition normally. And then, restore the composition string and selection. This emulates ITextStore::SetText() and ITextStore::SetSelection() correctly. And this patch changes RecordCompositionUpdateAction() too. MS-IME includes the committed range. Therefore, it puts a strange range to the TextEvent. It should ignore the ranges outside of composition string. Finally, this patch changes the log in RecordCompositionEndAction(). It's indentation is wrong. It makes me confused at researching the log.
Attachment #8489933 - Flags: review?(VYV03354)
Attachment #8489933 - Flags: review?(VYV03354) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: