Bug 120813. Active Accessibility: fix bounds of root frame. The root frame's x,y position shouldn't have the current scroll position added to it, unlike it's child elements. r=jgaunt, rs=waterson

This commit is contained in:
aaronl%netscape.com 2002-01-24 05:12:29 +00:00
Родитель ecf2837085
Коммит ab9bb75d9a
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -995,7 +995,9 @@ NS_IMETHODIMP nsAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width,
if (presContext) {
nsRect orgRectPixels, pageRectPixels;
GetScreenOrigin(presContext, aBoundingFrame, &orgRectPixels);
GetScrollOffset(&pageRectPixels);
nsCOMPtr<nsIAccessibleEventReceiver> accessibleEventReceiver(do_QueryInterface(this));
if (!accessibleEventReceiver) // Only the root accessible object supports this interface
GetScrollOffset(&pageRectPixels); // Don't add scroll offsets for the root accessible
*x += orgRectPixels.x - pageRectPixels.x;
*y += orgRectPixels.y - pageRectPixels.y;
}