mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 114687. Active Accessibility: Bounds calculation off by how far we're scrolled into the document. r=jgaunt, rs=waterson
This commit is contained in:
parent
266d5c3d9d
commit
80e7ab4873
@ -805,15 +805,18 @@ void nsAccessible::GetScreenOrigin(nsIPresContext *aPresContext, nsIFrame *aFram
|
||||
// Look for a widget so we can get screen coordinates
|
||||
nsIView* view = nsnull;
|
||||
aFrame->GetView(aPresContext, &view);
|
||||
nsPoint origin;
|
||||
if (view) {
|
||||
view->GetWidget(*getter_AddRefs(widget));
|
||||
if (widget)
|
||||
break;
|
||||
// Include position of view in calculation of starting coordinates
|
||||
view->GetPosition(&origin.x, &origin.y);
|
||||
}
|
||||
else {
|
||||
// No widget yet, so count up the coordinates of the frame
|
||||
aFrame->GetOrigin(origin);
|
||||
}
|
||||
|
||||
// No widget yet, so count up the coordinates of the frame
|
||||
nsPoint origin;
|
||||
aFrame->GetOrigin(origin);
|
||||
offsetX += origin.x;
|
||||
offsetY += origin.y;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user