Commit 80e7ab48 authored by aaronl%netscape.com's avatar aaronl%netscape.com
Browse files

Bug 114687. Active Accessibility: Bounds calculation off by how far we're...

Bug 114687. Active Accessibility: Bounds calculation off by how far we're scrolled into the document. r=jgaunt, rs=waterson
parent 266d5c3d
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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 
      nsPoint origin;
        aFrame->GetOrigin(origin);
      }
      offsetX += origin.x;
      offsetY += origin.y;