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 using namespace mozilla::a11y
;
11 ////////////////////////////////////////////////////////////////////////////////
14 NS_IMPL_ISUPPORTS_INHERITED(xpcAccessibleImage
, xpcAccessibleGeneric
,
17 ////////////////////////////////////////////////////////////////////////////////
21 xpcAccessibleImage::GetImagePosition(uint32_t aCoordType
, int32_t* aX
,
23 NS_ENSURE_ARG_POINTER(aX
);
25 NS_ENSURE_ARG_POINTER(aY
);
28 if (!mIntl
) return NS_ERROR_FAILURE
;
30 LayoutDeviceIntPoint point
= mIntl
->Position(aCoordType
);
37 xpcAccessibleImage::GetImageSize(int32_t* aWidth
, int32_t* aHeight
) {
38 NS_ENSURE_ARG_POINTER(aWidth
);
40 NS_ENSURE_ARG_POINTER(aHeight
);
43 if (!mIntl
) return NS_ERROR_FAILURE
;
45 LayoutDeviceIntSize size
= mIntl
->Size();
47 *aHeight
= size
.height
;