4302 r=jfrancis sr=kin. pageup/down bug with navigation.
git-svn-id: svn://10.0.0.236/trunk@128157 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -626,8 +626,29 @@ nsGfxScrollFrame::GetContentAndOffsetsFromPoint(nsIPresContext* aCX,
|
||||
|
||||
nsIFrame* frame = nsnull;
|
||||
mInner->mScrollAreaBox->GetFrame(&frame);
|
||||
nsIView *view;
|
||||
nsPoint point(aPoint);
|
||||
nsPoint currentPoint;
|
||||
//we need to translate the coordinates to the inner
|
||||
nsresult result = GetClosestViewForFrame(aCX, this, &view);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
if (!view)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return frame->GetContentAndOffsetsFromPoint(aCX, aPoint, aNewContent, aContentOffset, aContentOffsetEnd, aBeginFrameContent);
|
||||
nsIView *innerView;
|
||||
result = GetClosestViewForFrame(aCX, frame, &innerView);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
while (view != innerView && innerView)
|
||||
{
|
||||
innerView->GetPosition(¤tPoint.x, ¤tPoint.y);
|
||||
point.x -= currentPoint.x;
|
||||
point.y -= currentPoint.y;
|
||||
innerView->GetParent(innerView);
|
||||
}
|
||||
|
||||
return frame->GetContentAndOffsetsFromPoint(aCX, point, aNewContent, aContentOffset, aContentOffsetEnd, aBeginFrameContent);
|
||||
}
|
||||
|
||||
PRIntn
|
||||
|
||||
Reference in New Issue
Block a user