mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 20:49:27 +00:00
Bug 207936:[trunk] JA IME: cursor position is off before and after text is committed
r=sfraser sr=kin
This commit is contained in:
parent
213fe95837
commit
a0b6278dce
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user