1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "xpcAccessibleImage.h"
9 #include "ImageAccessible.h"
11 using namespace mozilla::a11y
;
13 ////////////////////////////////////////////////////////////////////////////////
16 NS_IMPL_ISUPPORTS_INHERITED(xpcAccessibleImage
, xpcAccessibleGeneric
,
19 ////////////////////////////////////////////////////////////////////////////////
23 xpcAccessibleImage::GetImagePosition(uint32_t aCoordType
, int32_t* aX
,
25 NS_ENSURE_ARG_POINTER(aX
);
27 NS_ENSURE_ARG_POINTER(aY
);
30 if (!Intl()) return NS_ERROR_FAILURE
;
32 LayoutDeviceIntPoint point
= Intl()->Position(aCoordType
);
39 xpcAccessibleImage::GetImageSize(int32_t* aWidth
, int32_t* aHeight
) {
40 NS_ENSURE_ARG_POINTER(aWidth
);
42 NS_ENSURE_ARG_POINTER(aHeight
);
45 if (!Intl()) return NS_ERROR_FAILURE
;
47 LayoutDeviceIntSize size
= Intl()->Size();
49 *aHeight
= size
.height
;