зеркало из https://github.com/mozilla/pjs.git
Bug 369821 all get (x,y) call which has aCoordType from atk side should consider coor type r=aaronleventhal a=mconnor
This commit is contained in:
Родитель
8265d52d8a
Коммит
3547488a7b
|
@ -72,9 +72,13 @@ refAccessibleAtPointCB(AtkComponent *aComponent,
|
|||
if (!accWrap || nsAccessibleWrap::MustPrune(accWrap))
|
||||
return nsnull;
|
||||
|
||||
// or ATK_XY_SCREEN what is definition this in nsIAccessible ???
|
||||
// nsIAccessible getChildAtPoint (x,y) is in screen pixels.
|
||||
if (aCoordType == ATK_XY_WINDOW) {
|
||||
/* deal with the coord type */
|
||||
nsCOMPtr<nsIDOMNode> domNode;
|
||||
accWrap->GetDOMNode(getter_AddRefs(domNode));
|
||||
nsIntPoint winCoords = nsAccUtils::GetScreenCoordsForWindow(domNode);
|
||||
aAccX += winCoords.x;
|
||||
aAccY += winCoords.y;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAccessible> pointAcc;
|
||||
|
|
|
@ -69,8 +69,18 @@ getImagePositionCB(AtkImage *aImage, gint *aAccX, gint *aAccY,
|
|||
return;
|
||||
|
||||
PRInt32 width, height; // dummy
|
||||
image->GetImageBounds(aAccX, aAccY, &width, &height);
|
||||
// TODO: translate (x,y) accroding aCoordType. see bug 369821
|
||||
// Returned in screen coordinates
|
||||
nsresult rv = image->GetImageBounds(aAccX, aAccY, &width, &height);
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
if (aCoordType == ATK_XY_WINDOW) {
|
||||
nsCOMPtr<nsIDOMNode> domNode;
|
||||
accWrap->GetDOMNode(getter_AddRefs(domNode));
|
||||
nsIntPoint winCoords = nsAccUtils::GetScreenCoordsForWindow(domNode);
|
||||
*aAccX -= winCoords.x;
|
||||
*aAccY -= winCoords.y;
|
||||
}
|
||||
}
|
||||
|
||||
const gchar *
|
||||
|
|
Загрузка…
Ссылка в новой задаче