зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
ecf2837085
Коммит
ab9bb75d9a
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче