if (mCachedOffsetForFrame->mCanCacheFrameOffset &&
if (mCachedOffsetForFrame->mCanCacheFrameOffset && mCachedOffsetForFrame->mLastCaretFrame &&
nsTypedSelection::GetCachedFrameOffset(nsIFrame *aFrame, PRInt32 inOffset, nsPoint& aPoint){  if (!mCachedOffsetForFrame) {    mCachedOffsetForFrame = new CachedOffsetForFrame;  }  if (mCachedOffsetForFrame->mCanCacheFrameOffset &&       (aFrame == mCachedOffsetForFrame->mLastCaretFrame) &&      (inOffset == mCachedOffsetForFrame->mLastContentOffset))  {     // get cached frame offset     aPoint = mCachedOffsetForFrame->mCachedFrameOffset;  }   else  {     // recalculate frame offset and cache it     GetPointFromOffset(aFrame, inOffset, &aPoint);     if (mCachedOffsetForFrame->mCanCacheFrameOffset) {       mCachedOffsetForFrame->mCachedFrameOffset = aPoint;       mCachedOffsetForFrame->mLastCaretFrame = aFrame;       mCachedOffsetForFrame->mLastContentOffset = inOffset;      }  }  return NS_OK;}