Bug 254966. Make css scrollable elements tab navigable. r=mats, sr=roc
git-svn-id: svn://10.0.0.236/trunk@161578 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -3665,22 +3665,21 @@ nsIScrollableView*
|
||||
PresShell::GetViewToScroll()
|
||||
{
|
||||
nsCOMPtr<nsIEventStateManager> esm = mPresContext->EventStateManager();
|
||||
nsIFrame* selectionFrame = nsnull;
|
||||
nsIScrollableView* scrollView = nsnull;
|
||||
nsCOMPtr<nsIContent> selectionContent, endSelectionContent; // NOT USED
|
||||
PRUint32 selectionOffset; // NOT USED
|
||||
esm->GetDocSelectionLocation(getter_AddRefs(selectionContent),
|
||||
getter_AddRefs(endSelectionContent),
|
||||
&selectionFrame,
|
||||
&selectionOffset);
|
||||
if (selectionFrame) {
|
||||
nsCOMPtr<nsIScrollableViewProvider> svp = do_QueryInterface(selectionFrame);
|
||||
if (svp) {
|
||||
svp->GetScrollableView(mPresContext, &scrollView);
|
||||
} else {
|
||||
nsIView* selectionView = selectionFrame->GetClosestView();
|
||||
if (selectionView)
|
||||
scrollView = nsLayoutUtils::GetNearestScrollingView(selectionView);
|
||||
nsCOMPtr<nsIContent> focusedContent;
|
||||
esm->GetFocusedContent(getter_AddRefs(focusedContent));
|
||||
if (focusedContent) {
|
||||
nsIFrame* startFrame = nsnull;
|
||||
GetPrimaryFrameFor(focusedContent, &startFrame);
|
||||
if (startFrame) {
|
||||
nsCOMPtr<nsIScrollableViewProvider> svp = do_QueryInterface(startFrame);
|
||||
if (svp) {
|
||||
svp->GetScrollableView(mPresContext, &scrollView);
|
||||
} else {
|
||||
nsIView* startView = startFrame->GetClosestView();
|
||||
if (startView)
|
||||
scrollView = nsLayoutUtils::GetNearestScrollingView(startView);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!scrollView) {
|
||||
|
||||
Reference in New Issue
Block a user