Don't use QueryInterface to get a view from a scrollable view b=258521 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@162561 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2776,13 +2776,11 @@ nsListControlFrame::ScrollToFrame(nsIContent* aOptElement)
|
||||
|
||||
if (NS_SUCCEEDED(result) && childframe) {
|
||||
if (NS_SUCCEEDED(result) && scrollableView) {
|
||||
const nsIView * clippedView;
|
||||
scrollableView->GetClipView(&clippedView);
|
||||
nscoord x;
|
||||
nscoord y;
|
||||
scrollableView->GetScrollPosition(x,y);
|
||||
// get the clipped rect
|
||||
nsRect rect = clippedView->GetBounds();
|
||||
nsRect rect = scrollableView->View()->GetBounds();
|
||||
// now move it by the offset of the scroll position
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
|
||||
Reference in New Issue
Block a user