Bug 207936:[trunk] JA IME: cursor position is off before and after text is committed
r=sfraser sr=kin git-svn-id: svn://10.0.0.236/trunk@143568 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5366,6 +5366,12 @@ nsTypedSelection::SetCanCacheFrameOffset(PRBool aCanCacheFrameOffset)
|
||||
|
||||
mCachedOffsetForFrame->mCanCacheFrameOffset = aCanCacheFrameOffset;
|
||||
|
||||
// clean up cached frame when turn off cache
|
||||
// fix bug 207936
|
||||
if (!aCanCacheFrameOffset) {
|
||||
mCachedOffsetForFrame->mLastCaretFrame = nsnull;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -5376,7 +5382,8 @@ nsTypedSelection::GetCachedFrameOffset(nsIFrame *aFrame, PRInt32 inOffset, nsPoi
|
||||
mCachedOffsetForFrame = new CachedOffsetForFrame;
|
||||
}
|
||||
|
||||
if (mCachedOffsetForFrame->mCanCacheFrameOffset &&
|
||||
if (mCachedOffsetForFrame->mCanCacheFrameOffset &&
|
||||
mCachedOffsetForFrame->mLastCaretFrame &&
|
||||
(aFrame == mCachedOffsetForFrame->mLastCaretFrame) &&
|
||||
(inOffset == mCachedOffsetForFrame->mLastContentOffset))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user