зеркало из https://github.com/mozilla/gecko-dev.git
small changes for 22752 ctrl left and right. r=cmanske
This commit is contained in:
Родитель
6537e5a176
Коммит
118e690267
|
@ -1187,9 +1187,9 @@ nsresult nsFrame::GetContentAndOffsetsFromPoint(nsIPresContext* aCX,
|
|||
result = mContent->GetParent(*aNewContent);
|
||||
if (*aNewContent){
|
||||
result = (*aNewContent)->IndexOf(mContent, aContentOffset);
|
||||
if (NS_FAILED(result))
|
||||
if (NS_FAILED(result) || aContentOffset < 0)
|
||||
{
|
||||
return result;
|
||||
return (result?result:NS_ERROR_FAILURE);
|
||||
}
|
||||
aBeginFrameContent = PR_TRUE;
|
||||
if (thisRect.Contains(aPoint))
|
||||
|
|
|
@ -2591,6 +2591,10 @@ nsTextFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
|
|||
{
|
||||
if (NS_SUCCEEDED(result = aPos->mResultFrame->PeekOffset(aPresContext, aPos)))
|
||||
return NS_OK;//else fall through
|
||||
else if (aPos->mDirection == eDirNext)
|
||||
aPos->mContentOffset = mContentOffset + mContentLength;
|
||||
else
|
||||
aPos->mContentOffset = mContentOffset;
|
||||
}
|
||||
else
|
||||
aPos->mResultContent = mContent;
|
||||
|
|
|
@ -1187,9 +1187,9 @@ nsresult nsFrame::GetContentAndOffsetsFromPoint(nsIPresContext* aCX,
|
|||
result = mContent->GetParent(*aNewContent);
|
||||
if (*aNewContent){
|
||||
result = (*aNewContent)->IndexOf(mContent, aContentOffset);
|
||||
if (NS_FAILED(result))
|
||||
if (NS_FAILED(result) || aContentOffset < 0)
|
||||
{
|
||||
return result;
|
||||
return (result?result:NS_ERROR_FAILURE);
|
||||
}
|
||||
aBeginFrameContent = PR_TRUE;
|
||||
if (thisRect.Contains(aPoint))
|
||||
|
|
|
@ -2591,6 +2591,10 @@ nsTextFrame::PeekOffset(nsIPresContext* aPresContext, nsPeekOffsetStruct *aPos)
|
|||
{
|
||||
if (NS_SUCCEEDED(result = aPos->mResultFrame->PeekOffset(aPresContext, aPos)))
|
||||
return NS_OK;//else fall through
|
||||
else if (aPos->mDirection == eDirNext)
|
||||
aPos->mContentOffset = mContentOffset + mContentLength;
|
||||
else
|
||||
aPos->mContentOffset = mContentOffset;
|
||||
}
|
||||
else
|
||||
aPos->mResultContent = mContent;
|
||||
|
|
Загрузка…
Ссылка в новой задаче