зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 6c3a672524b7 (bug 1748878) for causing accessibility crashes. a=backout
This commit is contained in:
Родитель
f7739e2a4a
Коммит
e5a82d2e01
|
@ -660,11 +660,11 @@ mozilla::java::GeckoBundle::LocalRef AccessibleWrap::ToBundle(bool aSmall) {
|
|||
}
|
||||
|
||||
mozilla::java::GeckoBundle::LocalRef AccessibleWrap::ToBundle(
|
||||
const uint64_t aState, const LayoutDeviceIntRect& aBounds,
|
||||
const uint8_t aActionCount, const nsString& aName,
|
||||
const nsString& aTextValue, const nsString& aDOMNodeID,
|
||||
const nsString& aDescription, const double& aCurVal, const double& aMinVal,
|
||||
const double& aMaxVal, const double& aStep, AccAttributes* aAttributes) {
|
||||
const uint64_t aState, const nsIntRect& aBounds, const uint8_t aActionCount,
|
||||
const nsString& aName, const nsString& aTextValue,
|
||||
const nsString& aDOMNodeID, const nsString& aDescription,
|
||||
const double& aCurVal, const double& aMinVal, const double& aMaxVal,
|
||||
const double& aStep, AccAttributes* aAttributes) {
|
||||
if (!IsProxy() && IsDefunct()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ class AccessibleWrap : public LocalAccessible {
|
|||
mozilla::java::GeckoBundle::LocalRef ToBundle(bool aSmall = false);
|
||||
|
||||
mozilla::java::GeckoBundle::LocalRef ToBundle(
|
||||
const uint64_t aState, const LayoutDeviceIntRect& aBounds,
|
||||
const uint64_t aState, const nsIntRect& aBounds,
|
||||
const uint8_t aActionCount, const nsString& aName,
|
||||
const nsString& aTextValue, const nsString& aDOMNodeID,
|
||||
const nsString& aDescription,
|
||||
|
|
|
@ -74,9 +74,7 @@ void RemoteAccessibleWrap::Value(nsString& aValue) const {
|
|||
|
||||
uint64_t RemoteAccessibleWrap::State() { return Proxy()->State(); }
|
||||
|
||||
mozilla::LayoutDeviceIntRect RemoteAccessibleWrap::Bounds() const {
|
||||
return Proxy()->Bounds();
|
||||
}
|
||||
nsIntRect RemoteAccessibleWrap::Bounds() const { return Proxy()->Bounds(); }
|
||||
|
||||
void RemoteAccessibleWrap::ScrollTo(uint32_t aHow) const {
|
||||
Proxy()->ScrollTo(aHow);
|
||||
|
|
|
@ -41,7 +41,7 @@ class RemoteAccessibleWrap : public AccessibleWrap {
|
|||
|
||||
virtual uint64_t State() override;
|
||||
|
||||
virtual LayoutDeviceIntRect Bounds() const override;
|
||||
virtual nsIntRect Bounds() const override;
|
||||
|
||||
MOZ_CAN_RUN_SCRIPT
|
||||
virtual void ScrollTo(uint32_t aHow) const override;
|
||||
|
|
|
@ -105,8 +105,7 @@ AtkObject* refAccessibleAtPointHelper(AtkObject* aAtkObj, gint aX, gint aY,
|
|||
node = browser->GetOwnerElement();
|
||||
}
|
||||
MOZ_ASSERT(node);
|
||||
mozilla::LayoutDeviceIntPoint winCoords =
|
||||
nsCoreUtils::GetScreenCoordsForWindow(node);
|
||||
nsIntPoint winCoords = nsCoreUtils::GetScreenCoordsForWindow(node);
|
||||
aX += winCoords.x;
|
||||
aY += winCoords.y;
|
||||
}
|
||||
|
@ -139,11 +138,11 @@ void getExtentsHelper(AtkObject* aAtkObj, gint* aX, gint* aY, gint* aWidth,
|
|||
return;
|
||||
}
|
||||
|
||||
mozilla::LayoutDeviceIntRect screenRect = accWrap->Bounds();
|
||||
nsIntRect screenRect = accWrap->Bounds();
|
||||
if (screenRect.IsEmpty()) return;
|
||||
|
||||
if (aCoordType == ATK_XY_WINDOW) {
|
||||
mozilla::LayoutDeviceIntPoint winCoords =
|
||||
nsIntPoint winCoords =
|
||||
nsCoreUtils::GetScreenCoordsForWindow(accWrap->GetNode());
|
||||
screenRect.x -= winCoords.x;
|
||||
screenRect.y -= winCoords.y;
|
||||
|
|
|
@ -21,7 +21,7 @@ const gchar* getDescriptionCB(AtkObject* aAtkObj);
|
|||
|
||||
static void getImagePositionCB(AtkImage* aImage, gint* aAccX, gint* aAccY,
|
||||
AtkCoordType aCoordType) {
|
||||
LayoutDeviceIntPoint pos(-1, -1);
|
||||
nsIntPoint pos = nsIntPoint(-1, -1);
|
||||
uint32_t geckoCoordType =
|
||||
(aCoordType == ATK_XY_WINDOW)
|
||||
? nsIAccessibleCoordinateType::COORDTYPE_WINDOW_RELATIVE
|
||||
|
@ -45,7 +45,7 @@ static const gchar* getImageDescriptionCB(AtkImage* aImage) {
|
|||
|
||||
static void getImageSizeCB(AtkImage* aImage, gint* aAccWidth,
|
||||
gint* aAccHeight) {
|
||||
LayoutDeviceIntSize size(-1, -1);
|
||||
nsIntSize size = nsIntSize(-1, -1);
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aImage));
|
||||
if (accWrap && accWrap->IsImage()) {
|
||||
size = accWrap->AsImage()->Size();
|
||||
|
|
|
@ -323,7 +323,7 @@ static void getCharacterExtentsCB(AtkText* aText, gint aOffset, gint* aX,
|
|||
}
|
||||
*aX = *aY = *aWidth = *aHeight = -1;
|
||||
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
uint32_t geckoCoordType;
|
||||
if (aCoords == ATK_XY_SCREEN) {
|
||||
geckoCoordType = nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE;
|
||||
|
@ -359,7 +359,7 @@ static void getRangeExtentsCB(AtkText* aText, gint aStartOffset,
|
|||
}
|
||||
aRect->x = aRect->y = aRect->width = aRect->height = -1;
|
||||
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
uint32_t geckoCoordType;
|
||||
if (aCoords == ATK_XY_SCREEN) {
|
||||
geckoCoordType = nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE;
|
||||
|
|
|
@ -547,9 +547,8 @@ Accessible* Pivot::AtPoint(int32_t aX, int32_t aY, PivotRule& aRule) {
|
|||
|
||||
// Match if no node below this is a match
|
||||
if ((filtered & nsIAccessibleTraversalRule::FILTER_MATCH) && !match) {
|
||||
LayoutDeviceIntRect childRect = child->IsLocal()
|
||||
? child->AsLocal()->Bounds()
|
||||
: child->AsRemote()->Bounds();
|
||||
nsIntRect childRect = child->IsLocal() ? child->AsLocal()->Bounds()
|
||||
: child->AsRemote()->Bounds();
|
||||
// Double-check child's bounds since the deepest child may have been out
|
||||
// of bounds. This assures we don't return a false positive.
|
||||
if (childRect.Contains(aX, aY)) {
|
||||
|
|
|
@ -244,10 +244,10 @@ HyperTextAccessible* nsAccUtils::GetTextContainer(nsINode* aNode) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
LayoutDeviceIntPoint nsAccUtils::ConvertToScreenCoords(
|
||||
int32_t aX, int32_t aY, uint32_t aCoordinateType,
|
||||
LocalAccessible* aAccessible) {
|
||||
LayoutDeviceIntPoint coords(aX, aY);
|
||||
nsIntPoint nsAccUtils::ConvertToScreenCoords(int32_t aX, int32_t aY,
|
||||
uint32_t aCoordinateType,
|
||||
LocalAccessible* aAccessible) {
|
||||
nsIntPoint coords(aX, aY);
|
||||
|
||||
switch (aCoordinateType) {
|
||||
case nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE:
|
||||
|
@ -278,7 +278,7 @@ void nsAccUtils::ConvertScreenCoordsTo(int32_t* aX, int32_t* aY,
|
|||
break;
|
||||
|
||||
case nsIAccessibleCoordinateType::COORDTYPE_WINDOW_RELATIVE: {
|
||||
LayoutDeviceIntPoint coords =
|
||||
nsIntPoint coords =
|
||||
nsCoreUtils::GetScreenCoordsForWindow(aAccessible->GetNode());
|
||||
*aX -= coords.x;
|
||||
*aY -= coords.y;
|
||||
|
@ -286,7 +286,7 @@ void nsAccUtils::ConvertScreenCoordsTo(int32_t* aX, int32_t* aY,
|
|||
}
|
||||
|
||||
case nsIAccessibleCoordinateType::COORDTYPE_PARENT_RELATIVE: {
|
||||
LayoutDeviceIntPoint coords = GetScreenCoordsForParent(aAccessible);
|
||||
nsIntPoint coords = GetScreenCoordsForParent(aAccessible);
|
||||
*aX -= coords.x;
|
||||
*aY -= coords.y;
|
||||
break;
|
||||
|
@ -297,18 +297,16 @@ void nsAccUtils::ConvertScreenCoordsTo(int32_t* aX, int32_t* aY,
|
|||
}
|
||||
}
|
||||
|
||||
LayoutDeviceIntPoint nsAccUtils::GetScreenCoordsForParent(
|
||||
LocalAccessible* aAccessible) {
|
||||
nsIntPoint nsAccUtils::GetScreenCoordsForParent(LocalAccessible* aAccessible) {
|
||||
LocalAccessible* parent = aAccessible->LocalParent();
|
||||
if (!parent) return LayoutDeviceIntPoint(0, 0);
|
||||
if (!parent) return nsIntPoint(0, 0);
|
||||
|
||||
nsIFrame* parentFrame = parent->GetFrame();
|
||||
if (!parentFrame) return LayoutDeviceIntPoint(0, 0);
|
||||
if (!parentFrame) return nsIntPoint(0, 0);
|
||||
|
||||
nsRect rect = parentFrame->GetScreenRectInAppUnits();
|
||||
nscoord appUnitsRatio = parentFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
return LayoutDeviceIntPoint::FromAppUnitsToNearest(
|
||||
nsPoint(rect.X(), rect.Y()), appUnitsRatio);
|
||||
return nsPoint(rect.X(), rect.Y())
|
||||
.ToNearestPixels(parentFrame->PresContext()->AppUnitsPerDevPixel());
|
||||
}
|
||||
|
||||
bool nsAccUtils::GetLiveAttrValue(uint32_t aRule, nsAString& aValue) {
|
||||
|
|
|
@ -131,24 +131,24 @@ class nsAccUtils {
|
|||
/**
|
||||
* Converts the given coordinates to coordinates relative screen.
|
||||
*
|
||||
* @param aX [in] the given x coord in dev pixels
|
||||
* @param aY [in] the given y coord in dev pixels
|
||||
* @param aX [in] the given x coord
|
||||
* @param aY [in] the given y coord
|
||||
* @param aCoordinateType [in] specifies coordinates origin (refer to
|
||||
* nsIAccessibleCoordinateType)
|
||||
* @param aAccessible [in] the accessible if coordinates are given
|
||||
* relative it.
|
||||
* @return converted coordinates
|
||||
*/
|
||||
static LayoutDeviceIntPoint ConvertToScreenCoords(
|
||||
int32_t aX, int32_t aY, uint32_t aCoordinateType,
|
||||
LocalAccessible* aAccessible);
|
||||
static nsIntPoint ConvertToScreenCoords(int32_t aX, int32_t aY,
|
||||
uint32_t aCoordinateType,
|
||||
LocalAccessible* aAccessible);
|
||||
|
||||
/**
|
||||
* Converts the given coordinates relative screen to another coordinate
|
||||
* system.
|
||||
*
|
||||
* @param aX [in, out] the given x coord in dev pixels
|
||||
* @param aY [in, out] the given y coord in dev pixels
|
||||
* @param aX [in, out] the given x coord
|
||||
* @param aY [in, out] the given y coord
|
||||
* @param aCoordinateType [in] specifies coordinates origin (refer to
|
||||
* nsIAccessibleCoordinateType)
|
||||
* @param aAccessible [in] the accessible if coordinates are given
|
||||
|
@ -159,13 +159,11 @@ class nsAccUtils {
|
|||
LocalAccessible* aAccessible);
|
||||
|
||||
/**
|
||||
* Returns screen-relative coordinates (in dev pixels) for the parent of the
|
||||
* given accessible.
|
||||
* Returns coordinates relative screen for the parent of the given accessible.
|
||||
*
|
||||
* @param [in] aAccessible the accessible
|
||||
*/
|
||||
static LayoutDeviceIntPoint GetScreenCoordsForParent(
|
||||
LocalAccessible* aAccessible);
|
||||
static nsIntPoint GetScreenCoordsForParent(LocalAccessible* aAccessible);
|
||||
|
||||
/**
|
||||
* Get the 'live' or 'container-live' object attribute value from the given
|
||||
|
|
|
@ -255,12 +255,12 @@ nsresult nsCoreUtils::ScrollSubstringTo(nsIFrame* aFrame, nsRange* aRange,
|
|||
|
||||
void nsCoreUtils::ScrollFrameToPoint(nsIFrame* aScrollableFrame,
|
||||
nsIFrame* aFrame,
|
||||
const LayoutDeviceIntPoint& aPoint) {
|
||||
const nsIntPoint& aPoint) {
|
||||
nsIScrollableFrame* scrollableFrame = do_QueryFrame(aScrollableFrame);
|
||||
if (!scrollableFrame) return;
|
||||
|
||||
nsPoint point = LayoutDeviceIntPoint::ToAppUnits(
|
||||
aPoint, aFrame->PresContext()->AppUnitsPerDevPixel());
|
||||
nsPoint point =
|
||||
ToAppUnits(aPoint, aFrame->PresContext()->AppUnitsPerDevPixel());
|
||||
nsRect frameRect = aFrame->GetScreenRectInAppUnits();
|
||||
nsPoint deltaPoint = point - frameRect.TopLeft();
|
||||
|
||||
|
@ -322,8 +322,8 @@ void nsCoreUtils::ConvertScrollTypeToPercents(uint32_t aScrollType,
|
|||
*aHorizontal = ScrollAxis(whereX, whenX);
|
||||
}
|
||||
|
||||
LayoutDeviceIntPoint nsCoreUtils::GetScreenCoordsForWindow(nsINode* aNode) {
|
||||
LayoutDeviceIntPoint coords(0, 0);
|
||||
nsIntPoint nsCoreUtils::GetScreenCoordsForWindow(nsINode* aNode) {
|
||||
nsIntPoint coords(0, 0);
|
||||
nsCOMPtr<nsIDocShellTreeItem> treeItem(GetDocShellFor(aNode));
|
||||
if (!treeItem) return coords;
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
#include "nsPoint.h"
|
||||
#include "nsTArray.h"
|
||||
#include "Units.h"
|
||||
|
||||
class nsRange;
|
||||
class nsTreeColumn;
|
||||
|
@ -168,10 +167,10 @@ class nsCoreUtils {
|
|||
*
|
||||
* @param aScrollableFrame the scrollable frame
|
||||
* @param aFrame the frame to scroll
|
||||
* @param aPoint the point scroll to (in dev pixels)
|
||||
* @param aPoint the point scroll to
|
||||
*/
|
||||
static void ScrollFrameToPoint(nsIFrame* aScrollableFrame, nsIFrame* aFrame,
|
||||
const mozilla::LayoutDeviceIntPoint& aPoint);
|
||||
const nsIntPoint& aPoint);
|
||||
|
||||
/**
|
||||
* Converts scroll type constant defined in nsIAccessibleScrollType to
|
||||
|
@ -187,7 +186,7 @@ class nsCoreUtils {
|
|||
*
|
||||
* @param aNode the DOM node hosted in the window.
|
||||
*/
|
||||
static mozilla::LayoutDeviceIntPoint GetScreenCoordsForWindow(nsINode* aNode);
|
||||
static nsIntPoint GetScreenCoordsForWindow(nsINode* aNode);
|
||||
|
||||
/**
|
||||
* Return document shell for the given DOM node.
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "mozilla/a11y/AccTypes.h"
|
||||
#include "nsString.h"
|
||||
#include "nsRect.h"
|
||||
#include "Units.h"
|
||||
|
||||
class nsAtom;
|
||||
|
||||
|
@ -158,10 +157,7 @@ class Accessible {
|
|||
virtual double MaxValue() const = 0;
|
||||
virtual double Step() const = 0;
|
||||
|
||||
/**
|
||||
* Return boundaries in screen coordinates in device pixels.
|
||||
*/
|
||||
virtual LayoutDeviceIntRect Bounds() const = 0;
|
||||
virtual nsIntRect Bounds() const = 0;
|
||||
|
||||
/**
|
||||
* Returns text of accessible if accessible has text role otherwise empty
|
||||
|
|
|
@ -94,9 +94,7 @@ Relation ApplicationAccessible::RelationByType(
|
|||
return Relation();
|
||||
}
|
||||
|
||||
mozilla::LayoutDeviceIntRect ApplicationAccessible::Bounds() const {
|
||||
return mozilla::LayoutDeviceIntRect();
|
||||
}
|
||||
nsIntRect ApplicationAccessible::Bounds() const { return nsIntRect(); }
|
||||
|
||||
nsRect ApplicationAccessible::BoundsInAppUnits() const { return nsRect(); }
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class ApplicationAccessible : public AccessibleWrap {
|
|||
|
||||
// LocalAccessible
|
||||
virtual void Shutdown() override;
|
||||
virtual LayoutDeviceIntRect Bounds() const override;
|
||||
virtual nsIntRect Bounds() const override;
|
||||
virtual nsRect BoundsInAppUnits() const override;
|
||||
virtual already_AddRefed<AccAttributes> NativeAttributes() override;
|
||||
virtual GroupPos GroupPosition() override;
|
||||
|
|
|
@ -206,22 +206,22 @@ uint64_t HyperTextAccessible::NativeState() const {
|
|||
return states;
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect HyperTextAccessible::GetBoundsInFrame(
|
||||
nsIFrame* aFrame, uint32_t aStartRenderedOffset,
|
||||
uint32_t aEndRenderedOffset) {
|
||||
nsIntRect HyperTextAccessible::GetBoundsInFrame(nsIFrame* aFrame,
|
||||
uint32_t aStartRenderedOffset,
|
||||
uint32_t aEndRenderedOffset) {
|
||||
nsPresContext* presContext = mDoc->PresContext();
|
||||
if (!aFrame->IsTextFrame()) {
|
||||
return LayoutDeviceIntRect::FromAppUnitsToNearest(
|
||||
aFrame->GetScreenRectInAppUnits(), presContext->AppUnitsPerDevPixel());
|
||||
return aFrame->GetScreenRectInAppUnits().ToNearestPixels(
|
||||
presContext->AppUnitsPerDevPixel());
|
||||
}
|
||||
|
||||
// Substring must be entirely within the same text node.
|
||||
int32_t startContentOffset, endContentOffset;
|
||||
nsresult rv = RenderedToContentOffset(aFrame, aStartRenderedOffset,
|
||||
&startContentOffset);
|
||||
NS_ENSURE_SUCCESS(rv, LayoutDeviceIntRect());
|
||||
NS_ENSURE_SUCCESS(rv, nsIntRect());
|
||||
rv = RenderedToContentOffset(aFrame, aEndRenderedOffset, &endContentOffset);
|
||||
NS_ENSURE_SUCCESS(rv, LayoutDeviceIntRect());
|
||||
NS_ENSURE_SUCCESS(rv, nsIntRect());
|
||||
|
||||
nsIFrame* frame;
|
||||
int32_t startContentOffsetInFrame;
|
||||
|
@ -229,7 +229,7 @@ LayoutDeviceIntRect HyperTextAccessible::GetBoundsInFrame(
|
|||
// the primary frame passed in
|
||||
rv = aFrame->GetChildFrameContainingOffset(
|
||||
startContentOffset, false, &startContentOffsetInFrame, &frame);
|
||||
NS_ENSURE_SUCCESS(rv, LayoutDeviceIntRect());
|
||||
NS_ENSURE_SUCCESS(rv, nsIntRect());
|
||||
|
||||
nsRect screenRect;
|
||||
while (frame && startContentOffset < endContentOffset) {
|
||||
|
@ -248,13 +248,13 @@ LayoutDeviceIntRect HyperTextAccessible::GetBoundsInFrame(
|
|||
// Add the point where the string starts to the frameScreenRect
|
||||
nsPoint frameTextStartPoint;
|
||||
rv = frame->GetPointFromOffset(startContentOffset, &frameTextStartPoint);
|
||||
NS_ENSURE_SUCCESS(rv, LayoutDeviceIntRect());
|
||||
NS_ENSURE_SUCCESS(rv, nsIntRect());
|
||||
|
||||
// Use the point for the end offset to calculate the width
|
||||
nsPoint frameTextEndPoint;
|
||||
rv = frame->GetPointFromOffset(startContentOffset + frameSubStringLength,
|
||||
&frameTextEndPoint);
|
||||
NS_ENSURE_SUCCESS(rv, LayoutDeviceIntRect());
|
||||
NS_ENSURE_SUCCESS(rv, nsIntRect());
|
||||
|
||||
frameScreenRect.SetRectX(
|
||||
frameScreenRect.X() +
|
||||
|
@ -269,8 +269,7 @@ LayoutDeviceIntRect HyperTextAccessible::GetBoundsInFrame(
|
|||
frame = frame->GetNextContinuation();
|
||||
}
|
||||
|
||||
return LayoutDeviceIntRect::FromAppUnitsToNearest(
|
||||
screenRect, presContext->AppUnitsPerDevPixel());
|
||||
return screenRect.ToNearestPixels(presContext->AppUnitsPerDevPixel());
|
||||
}
|
||||
|
||||
uint32_t HyperTextAccessible::DOMPointToOffset(nsINode* aNode,
|
||||
|
@ -1425,12 +1424,12 @@ int32_t HyperTextAccessible::OffsetAtPoint(int32_t aX, int32_t aY,
|
|||
nsIFrame* hyperFrame = GetFrame();
|
||||
if (!hyperFrame) return -1;
|
||||
|
||||
LayoutDeviceIntPoint coords =
|
||||
nsIntPoint coords =
|
||||
nsAccUtils::ConvertToScreenCoords(aX, aY, aCoordType, this);
|
||||
|
||||
nsPresContext* presContext = mDoc->PresContext();
|
||||
nsPoint coordsInAppUnits = LayoutDeviceIntPoint::ToAppUnits(
|
||||
coords, presContext->AppUnitsPerDevPixel());
|
||||
nsPoint coordsInAppUnits =
|
||||
ToAppUnits(coords, presContext->AppUnitsPerDevPixel());
|
||||
|
||||
nsRect frameScreenRect = hyperFrame->GetScreenRectInAppUnits();
|
||||
if (!frameScreenRect.Contains(coordsInAppUnits.x, coordsInAppUnits.y)) {
|
||||
|
@ -1486,15 +1485,15 @@ int32_t HyperTextAccessible::OffsetAtPoint(int32_t aX, int32_t aY,
|
|||
return -1; // Not found
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect HyperTextAccessible::TextBounds(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aCoordType) {
|
||||
nsIntRect HyperTextAccessible::TextBounds(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aCoordType) {
|
||||
index_t startOffset = ConvertMagicOffset(aStartOffset);
|
||||
index_t endOffset = ConvertMagicOffset(aEndOffset);
|
||||
if (!startOffset.IsValid() || !endOffset.IsValid() ||
|
||||
startOffset > endOffset || endOffset > CharacterCount()) {
|
||||
NS_ERROR("Wrong in offset");
|
||||
return LayoutDeviceIntRect();
|
||||
return nsIntRect();
|
||||
}
|
||||
|
||||
if (CharacterCount() == 0) {
|
||||
|
@ -1502,16 +1501,16 @@ LayoutDeviceIntRect HyperTextAccessible::TextBounds(int32_t aStartOffset,
|
|||
// Empty content, use our own bound to at least get x,y coordinates
|
||||
nsIFrame* frame = GetFrame();
|
||||
if (!frame) {
|
||||
return LayoutDeviceIntRect();
|
||||
return nsIntRect();
|
||||
}
|
||||
return LayoutDeviceIntRect::FromAppUnitsToNearest(
|
||||
frame->GetScreenRectInAppUnits(), presContext->AppUnitsPerDevPixel());
|
||||
return frame->GetScreenRectInAppUnits().ToNearestPixels(
|
||||
presContext->AppUnitsPerDevPixel());
|
||||
}
|
||||
|
||||
int32_t childIdx = GetChildIndexAtOffset(startOffset);
|
||||
if (childIdx == -1) return LayoutDeviceIntRect();
|
||||
if (childIdx == -1) return nsIntRect();
|
||||
|
||||
LayoutDeviceIntRect bounds;
|
||||
nsIntRect bounds;
|
||||
int32_t prevOffset = GetChildOffset(childIdx);
|
||||
int32_t offset1 = startOffset - prevOffset;
|
||||
|
||||
|
@ -1541,9 +1540,8 @@ LayoutDeviceIntRect HyperTextAccessible::TextBounds(int32_t aStartOffset,
|
|||
// screen coordinates.
|
||||
nsPresContext* presContext = mDoc->PresContext();
|
||||
nsIFrame* rootFrame = presContext->PresShell()->GetRootFrame();
|
||||
LayoutDeviceIntRect orgRectPixels =
|
||||
LayoutDeviceIntRect::FromAppUnitsToNearest(
|
||||
rootFrame->GetScreenRectInAppUnits(),
|
||||
nsIntRect orgRectPixels =
|
||||
rootFrame->GetScreenRectInAppUnits().ToNearestPixels(
|
||||
presContext->AppUnitsPerDevPixel());
|
||||
bounds.MoveBy(-orgRectPixels.X(), -orgRectPixels.Y());
|
||||
bounds.ScaleRoundOut(presContext->PresShell()->GetResolution());
|
||||
|
@ -1805,7 +1803,7 @@ LayoutDeviceIntRect HyperTextAccessible::GetCaretRect(nsIWidget** aWidget) {
|
|||
// focus.
|
||||
return LayoutDeviceIntRect();
|
||||
}
|
||||
LayoutDeviceIntRect charRect = CharBounds(
|
||||
nsIntRect charRect = CharBounds(
|
||||
caretOffset, nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE);
|
||||
if (!charRect.IsEmpty()) {
|
||||
caretRect.SetTopEdge(charRect.Y());
|
||||
|
@ -1947,7 +1945,7 @@ void HyperTextAccessible::ScrollSubstringToPoint(int32_t aStartOffset,
|
|||
nsIFrame* frame = GetFrame();
|
||||
if (!frame) return;
|
||||
|
||||
LayoutDeviceIntPoint coords =
|
||||
nsIntPoint coords =
|
||||
nsAccUtils::ConvertToScreenCoords(aX, aY, aCoordinateType, this);
|
||||
|
||||
RefPtr<nsRange> domRange = nsRange::Create(mContent);
|
||||
|
@ -1957,8 +1955,8 @@ void HyperTextAccessible::ScrollSubstringToPoint(int32_t aStartOffset,
|
|||
}
|
||||
|
||||
nsPresContext* presContext = frame->PresContext();
|
||||
nsPoint coordsInAppUnits = LayoutDeviceIntPoint::ToAppUnits(
|
||||
coords, presContext->AppUnitsPerDevPixel());
|
||||
nsPoint coordsInAppUnits =
|
||||
ToAppUnits(coords, presContext->AppUnitsPerDevPixel());
|
||||
|
||||
bool initialScrolled = false;
|
||||
nsIFrame* parentFrame = frame;
|
||||
|
|
|
@ -184,19 +184,18 @@ class HyperTextAccessible : public AccessibleWrap,
|
|||
int32_t OffsetAtPoint(int32_t aX, int32_t aY, uint32_t aCoordType);
|
||||
|
||||
/**
|
||||
* Return a rect (in dev pixels) of the given text range relative given
|
||||
* coordinate system.
|
||||
* Return a rect of the given text range relative given coordinate system.
|
||||
*/
|
||||
LayoutDeviceIntRect TextBounds(
|
||||
nsIntRect TextBounds(
|
||||
int32_t aStartOffset, int32_t aEndOffset,
|
||||
uint32_t aCoordType =
|
||||
nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE);
|
||||
|
||||
/**
|
||||
* Return a rect (in dev pixels) for character at given offset relative given
|
||||
* coordinate system.
|
||||
* Return a rect for character at given offset relative given coordinate
|
||||
* system.
|
||||
*/
|
||||
LayoutDeviceIntRect CharBounds(int32_t aOffset, uint32_t aCoordType) {
|
||||
nsIntRect CharBounds(int32_t aOffset, uint32_t aCoordType) {
|
||||
int32_t endOffset = aOffset == static_cast<int32_t>(CharacterCount())
|
||||
? aOffset
|
||||
: aOffset + 1;
|
||||
|
@ -395,13 +394,11 @@ class HyperTextAccessible : public AccessibleWrap,
|
|||
EWordMovementType aWordMovementType = eDefaultBehavior);
|
||||
|
||||
/**
|
||||
* Return the boundaries (in dev pixels) of the substring in case of textual
|
||||
* frame or frame boundaries in case of non textual frame, offsets are
|
||||
* ignored.
|
||||
* Return the boundaries of the substring in case of textual frame or
|
||||
* frame boundaries in case of non textual frame, offsets are ignored.
|
||||
*/
|
||||
LayoutDeviceIntRect GetBoundsInFrame(nsIFrame* aFrame,
|
||||
uint32_t aStartRenderedOffset,
|
||||
uint32_t aEndRenderedOffset);
|
||||
nsIntRect GetBoundsInFrame(nsIFrame* aFrame, uint32_t aStartRenderedOffset,
|
||||
uint32_t aEndRenderedOffset);
|
||||
|
||||
// Selection helpers
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIURI.h"
|
||||
|
||||
namespace mozilla::a11y {
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(ImageAccessible, LinkableAccessible,
|
||||
imgINotificationObserver)
|
||||
|
@ -137,7 +137,7 @@ bool ImageAccessible::DoAction(uint8_t aIndex) const {
|
|||
nsCOMPtr<nsPIDOMWindowOuter> piWindow = document->GetWindow();
|
||||
if (!piWindow) return false;
|
||||
|
||||
RefPtr<dom::BrowsingContext> tmp;
|
||||
RefPtr<mozilla::dom::BrowsingContext> tmp;
|
||||
return NS_SUCCEEDED(piWindow->Open(spec, u""_ns, u""_ns,
|
||||
/* aLoadInfo = */ nullptr,
|
||||
/* aForceNoOpener = */ false,
|
||||
|
@ -147,13 +147,13 @@ bool ImageAccessible::DoAction(uint8_t aIndex) const {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ImageAccessible
|
||||
|
||||
LayoutDeviceIntPoint ImageAccessible::Position(uint32_t aCoordType) {
|
||||
LayoutDeviceIntPoint point = Bounds().TopLeft();
|
||||
nsIntPoint ImageAccessible::Position(uint32_t aCoordType) {
|
||||
nsIntPoint point = Bounds().TopLeft();
|
||||
nsAccUtils::ConvertScreenCoordsTo(&point.x, &point.y, aCoordType, this);
|
||||
return point;
|
||||
}
|
||||
|
||||
LayoutDeviceIntSize ImageAccessible::Size() { return Bounds().Size(); }
|
||||
nsIntSize ImageAccessible::Size() { return Bounds().Size(); }
|
||||
|
||||
// LocalAccessible
|
||||
already_AddRefed<AccAttributes> ImageAccessible::NativeAttributes() {
|
||||
|
@ -247,5 +247,3 @@ void ImageAccessible::Notify(imgIRequest* aRequest, int32_t aType,
|
|||
|
||||
mImageRequestStatus = status;
|
||||
}
|
||||
|
||||
} // namespace mozilla::a11y
|
||||
|
|
|
@ -37,8 +37,8 @@ class ImageAccessible : public LinkableAccessible,
|
|||
virtual bool DoAction(uint8_t aIndex) const override;
|
||||
|
||||
// ImageAccessible
|
||||
LayoutDeviceIntPoint Position(uint32_t aCoordType);
|
||||
LayoutDeviceIntSize Size();
|
||||
nsIntPoint Position(uint32_t aCoordType);
|
||||
nsIntSize Size();
|
||||
|
||||
protected:
|
||||
virtual ~ImageAccessible();
|
||||
|
|
|
@ -501,7 +501,7 @@ LocalAccessible* LocalAccessible::LocalChildAtPoint(
|
|||
// If we can't find the point in a child, we will return the fallback answer:
|
||||
// we return |this| if the point is within it, otherwise nullptr.
|
||||
LocalAccessible* fallbackAnswer = nullptr;
|
||||
LayoutDeviceIntRect rect = Bounds();
|
||||
nsIntRect rect = Bounds();
|
||||
if (rect.Contains(aX, aY)) fallbackAnswer = this;
|
||||
|
||||
if (nsAccUtils::MustPrune(this)) { // Do not dig any further
|
||||
|
@ -611,7 +611,7 @@ LocalAccessible* LocalAccessible::LocalChildAtPoint(
|
|||
for (uint32_t childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
LocalAccessible* child = accessible->LocalChildAt(childIdx);
|
||||
|
||||
LayoutDeviceIntRect childRect = child->Bounds();
|
||||
nsIntRect childRect = child->Bounds();
|
||||
if (childRect.Contains(aX, aY) &&
|
||||
(child->State() & states::INVISIBLE) == 0) {
|
||||
if (aWhichChild == EWhichChildAtPoint::DeepestChild) {
|
||||
|
@ -786,9 +786,9 @@ nsRect LocalAccessible::BoundsInAppUnits() const {
|
|||
return unionRectTwips;
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect LocalAccessible::Bounds() const {
|
||||
return LayoutDeviceIntRect::FromAppUnitsToNearest(
|
||||
BoundsInAppUnits(), mDoc->PresContext()->AppUnitsPerDevPixel());
|
||||
nsIntRect LocalAccessible::Bounds() const {
|
||||
return BoundsInAppUnits().ToNearestPixels(
|
||||
mDoc->PresContext()->AppUnitsPerDevPixel());
|
||||
}
|
||||
|
||||
nsIntRect LocalAccessible::BoundsInCSSPixels() const {
|
||||
|
@ -2296,7 +2296,7 @@ void LocalAccessible::ScrollToPoint(uint32_t aCoordinateType, int32_t aX,
|
|||
nsIFrame* frame = GetFrame();
|
||||
if (!frame) return;
|
||||
|
||||
LayoutDeviceIntPoint coords =
|
||||
nsIntPoint coords =
|
||||
nsAccUtils::ConvertToScreenCoords(aX, aY, aCoordinateType, this);
|
||||
|
||||
nsIFrame* parentFrame = frame;
|
||||
|
|
|
@ -406,7 +406,10 @@ class LocalAccessible : public nsISupports, public Accessible {
|
|||
*/
|
||||
virtual nsRect BoundsInAppUnits() const;
|
||||
|
||||
virtual LayoutDeviceIntRect Bounds() const override;
|
||||
/**
|
||||
* Return boundaries in screen coordinates.
|
||||
*/
|
||||
virtual nsIntRect Bounds() const override;
|
||||
|
||||
/**
|
||||
* Return boundaries in screen coordinates in CSS pixels.
|
||||
|
|
|
@ -77,7 +77,7 @@ role OuterDocAccessible::NativeRole() const { return roles::INTERNAL_FRAME; }
|
|||
|
||||
LocalAccessible* OuterDocAccessible::LocalChildAtPoint(
|
||||
int32_t aX, int32_t aY, EWhichChildAtPoint aWhichChild) {
|
||||
LayoutDeviceIntRect docRect = Bounds();
|
||||
nsIntRect docRect = Bounds();
|
||||
if (!docRect.Contains(aX, aY)) return nullptr;
|
||||
|
||||
// Always return the inner doc as direct child accessible unless bounds
|
||||
|
@ -212,7 +212,7 @@ Accessible* OuterDocAccessible::ChildAt(uint32_t aIndex) const {
|
|||
|
||||
Accessible* OuterDocAccessible::ChildAtPoint(int32_t aX, int32_t aY,
|
||||
EWhichChildAtPoint aWhichChild) {
|
||||
LayoutDeviceIntRect docRect = Bounds();
|
||||
nsIntRect docRect = Bounds();
|
||||
if (!docRect.Contains(aX, aY)) return nullptr;
|
||||
|
||||
// Always return the inner doc as direct child accessible unless bounds
|
||||
|
|
|
@ -194,8 +194,8 @@ uint64_t HTMLSelectOptionAccessible::NativeState() const {
|
|||
// <select> is not collapsed: compare bounds to calculate OFFSCREEN
|
||||
LocalAccessible* listAcc = LocalParent();
|
||||
if (listAcc) {
|
||||
LayoutDeviceIntRect optionRect = Bounds();
|
||||
LayoutDeviceIntRect listRect = listAcc->Bounds();
|
||||
nsIntRect optionRect = Bounds();
|
||||
nsIntRect listRect = listAcc->Bounds();
|
||||
if (optionRect.Y() < listRect.Y() ||
|
||||
optionRect.YMost() > listRect.YMost()) {
|
||||
state |= states::OFFSCREEN;
|
||||
|
|
|
@ -916,10 +916,10 @@ void DocAccessibleParent::MaybeInitWindowEmulation() {
|
|||
MOZ_ASSERT(rootDocument);
|
||||
|
||||
bool isActive = true;
|
||||
LayoutDeviceIntRect rect(CW_USEDEFAULT, CW_USEDEFAULT, 0, 0);
|
||||
nsIntRect rect(CW_USEDEFAULT, CW_USEDEFAULT, 0, 0);
|
||||
if (Compatibility::IsDolphin()) {
|
||||
rect = Bounds();
|
||||
LayoutDeviceIntRect rootRect = rootDocument->Bounds();
|
||||
nsIntRect rootRect = rootDocument->Bounds();
|
||||
rect.MoveToX(rootRect.X() - rect.X());
|
||||
rect.MoveToY(rect.Y() - rootRect.Y());
|
||||
|
||||
|
|
|
@ -270,12 +270,12 @@ Maybe<nsRect> RemoteAccessibleBase<Derived>::RetrieveCachedBounds() const {
|
|||
}
|
||||
|
||||
template <class Derived>
|
||||
LayoutDeviceIntRect RemoteAccessibleBase<Derived>::Bounds() const {
|
||||
nsIntRect RemoteAccessibleBase<Derived>::Bounds() const {
|
||||
if (mCachedFields) {
|
||||
Maybe<nsRect> maybeBounds = RetrieveCachedBounds();
|
||||
if (maybeBounds) {
|
||||
nsRect bounds = *maybeBounds;
|
||||
LayoutDeviceIntRect devPxBounds;
|
||||
nsIntRect devPxBounds;
|
||||
dom::CanonicalBrowsingContext* cbc =
|
||||
static_cast<dom::BrowserParent*>(mDoc->Manager())
|
||||
->GetBrowsingContext()
|
||||
|
@ -290,11 +290,11 @@ LayoutDeviceIntRect RemoteAccessibleBase<Derived>::Bounds() const {
|
|||
const_cast<Accessible*>(acc)->AsLocal()) {
|
||||
// LocalAccessible::Bounds returns screen-relative bounds in
|
||||
// dev pixels.
|
||||
LayoutDeviceIntRect localBounds = localAcc->Bounds();
|
||||
nsIntRect localBounds = localAcc->Bounds();
|
||||
|
||||
// Convert our existing `bounds` rect from app units to dev pixels
|
||||
devPxBounds = LayoutDeviceIntRect::FromAppUnitsToNearest(
|
||||
bounds, presContext->AppUnitsPerDevPixel());
|
||||
devPxBounds =
|
||||
bounds.ToNearestPixels(presContext->AppUnitsPerDevPixel());
|
||||
|
||||
// We factor in our zoom level before offsetting by
|
||||
// `localBounds`, which has already taken zoom into account.
|
||||
|
@ -351,14 +351,14 @@ LayoutDeviceIntRect RemoteAccessibleBase<Derived>::Bounds() const {
|
|||
// viewport. We calculate the difference and translate our bounds here.
|
||||
nsPoint viewportOffset = presShell->GetVisualViewportOffset() -
|
||||
presShell->GetLayoutViewportOffset();
|
||||
devPxBounds.MoveBy(-(LayoutDeviceIntPoint::FromAppUnitsToNearest(
|
||||
viewportOffset, presContext->AppUnitsPerDevPixel())));
|
||||
devPxBounds.MoveBy(-(
|
||||
viewportOffset.ToNearestPixels(presContext->AppUnitsPerDevPixel())));
|
||||
|
||||
return devPxBounds;
|
||||
}
|
||||
}
|
||||
|
||||
return LayoutDeviceIntRect();
|
||||
return nsIntRect();
|
||||
}
|
||||
|
||||
template <class Derived>
|
||||
|
|
|
@ -176,7 +176,7 @@ class RemoteAccessibleBase : public Accessible, public HyperTextAccessibleBase {
|
|||
virtual double MaxValue() const override;
|
||||
virtual double Step() const override;
|
||||
|
||||
virtual LayoutDeviceIntRect Bounds() const override;
|
||||
virtual nsIntRect Bounds() const override;
|
||||
|
||||
virtual uint64_t State() override;
|
||||
|
||||
|
|
|
@ -94,12 +94,12 @@ void GetTextBeforeOffset(int32_t aOffset, AccessibleTextBoundary aBoundaryType,
|
|||
|
||||
char16_t CharAt(int32_t aOffset);
|
||||
|
||||
LayoutDeviceIntRect TextBounds(
|
||||
nsIntRect TextBounds(
|
||||
int32_t aStartOffset, int32_t aEndOffset,
|
||||
uint32_t aCoordType =
|
||||
nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE);
|
||||
|
||||
LayoutDeviceIntRect CharBounds(int32_t aOffset, uint32_t aCoordType);
|
||||
nsIntRect CharBounds(int32_t aOffset, uint32_t aCoordType);
|
||||
|
||||
int32_t OffsetAtPoint(int32_t aX, int32_t aY, uint32_t aCoordType);
|
||||
|
||||
|
@ -133,9 +133,9 @@ bool DeleteText(int32_t aStartPos, int32_t aEndPos);
|
|||
|
||||
bool PasteText(int32_t aPosition);
|
||||
|
||||
LayoutDeviceIntPoint ImagePosition(uint32_t aCoordType);
|
||||
nsIntPoint ImagePosition(uint32_t aCoordType);
|
||||
|
||||
LayoutDeviceIntSize ImageSize();
|
||||
nsIntSize ImageSize();
|
||||
|
||||
uint32_t EndOffset(bool* aOk);
|
||||
|
||||
|
@ -234,7 +234,7 @@ RemoteAccessible* FocusedChild();
|
|||
virtual Accessible* ChildAtPoint(
|
||||
int32_t aX, int32_t aY,
|
||||
LocalAccessible::EWhichChildAtPoint aWhichChild) override;
|
||||
LayoutDeviceIntRect Bounds() const override;
|
||||
nsIntRect Bounds() const override;
|
||||
nsIntRect BoundsInCSSPixels();
|
||||
|
||||
void Language(nsString& aLocale);
|
||||
|
|
|
@ -109,12 +109,12 @@ mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvTextForRange(
|
|||
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvBoundsForRange(
|
||||
const uint64_t& aID, const int32_t& aStartOffset,
|
||||
const uint64_t& aEndContainer, const int32_t& aEndOffset,
|
||||
LayoutDeviceIntRect* aBounds) {
|
||||
nsIntRect* aBounds) {
|
||||
HyperTextAccessibleWrap* acc = IdToHyperTextAccessibleWrap(aID);
|
||||
HyperTextAccessibleWrap* endContainer =
|
||||
IdToHyperTextAccessibleWrap(aEndContainer);
|
||||
if (!acc || !endContainer) {
|
||||
*aBounds = LayoutDeviceIntRect();
|
||||
*aBounds = nsIntRect();
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class DocAccessiblePlatformExtChild : public PDocAccessiblePlatformExtChild {
|
|||
const int32_t& aStartOffset,
|
||||
const uint64_t& aEndContainer,
|
||||
const int32_t& aEndOffset,
|
||||
LayoutDeviceIntRect* aBounds);
|
||||
nsIntRect* aBounds);
|
||||
|
||||
mozilla::ipc::IPCResult RecvLengthForRange(const uint64_t& aID,
|
||||
const int32_t& aStartOffset,
|
||||
|
|
|
@ -11,7 +11,7 @@ include "mozilla/GfxMessageUtils.h";
|
|||
using mozilla::a11y::EWhichRange from "mozilla/a11y/IPCTypes.h";
|
||||
using mozilla::a11y::EWhichPostFilter from "mozilla/a11y/IPCTypes.h";
|
||||
[RefCounted] using mozilla::a11y::AccAttributes from "mozilla/a11y/IPCTypes.h";
|
||||
using mozilla::LayoutDeviceIntRect from "Units.h";
|
||||
using nsIntRect from "nsRect.h";
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -43,7 +43,7 @@ child:
|
|||
returns(nsString aText);
|
||||
|
||||
[Nested=inside_sync] sync BoundsForRange(uint64_t aID, int32_t aStartOffset, uint64_t aEndContainer, int32_t aEndOffset)
|
||||
returns(LayoutDeviceIntRect aRetVal);
|
||||
returns(nsIntRect aRetVal);
|
||||
|
||||
[Nested=inside_sync] sync LengthForRange(uint64_t aID, int32_t aStartOffset, uint64_t aEndContainer, int32_t aEndOffset)
|
||||
returns(int32_t aLength);
|
||||
|
|
|
@ -419,7 +419,7 @@ mozilla::ipc::IPCResult DocAccessibleChild::RecvDefaultTextAttributes(
|
|||
|
||||
mozilla::ipc::IPCResult DocAccessibleChild::RecvTextBounds(
|
||||
const uint64_t& aID, const int32_t& aStartOffset, const int32_t& aEndOffset,
|
||||
const uint32_t& aCoordType, LayoutDeviceIntRect* aRetVal) {
|
||||
const uint32_t& aCoordType, nsIntRect* aRetVal) {
|
||||
HyperTextAccessible* acc = IdToHyperTextAccessible(aID);
|
||||
if (acc && acc->IsTextRole()) {
|
||||
*aRetVal = acc->TextBounds(aStartOffset, aEndOffset, aCoordType);
|
||||
|
@ -430,7 +430,7 @@ mozilla::ipc::IPCResult DocAccessibleChild::RecvTextBounds(
|
|||
|
||||
mozilla::ipc::IPCResult DocAccessibleChild::RecvCharBounds(
|
||||
const uint64_t& aID, const int32_t& aOffset, const uint32_t& aCoordType,
|
||||
LayoutDeviceIntRect* aRetVal) {
|
||||
nsIntRect* aRetVal) {
|
||||
HyperTextAccessible* acc = IdToHyperTextAccessible(aID);
|
||||
if (acc && acc->IsTextRole()) {
|
||||
*aRetVal = acc->CharBounds(aOffset, aCoordType);
|
||||
|
@ -606,8 +606,7 @@ mozilla::ipc::IPCResult DocAccessibleChild::RecvPasteText(
|
|||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessibleChild::RecvImagePosition(
|
||||
const uint64_t& aID, const uint32_t& aCoordType,
|
||||
LayoutDeviceIntPoint* aRetVal) {
|
||||
const uint64_t& aID, const uint32_t& aCoordType, nsIntPoint* aRetVal) {
|
||||
ImageAccessible* acc = IdToImageAccessible(aID);
|
||||
if (acc) {
|
||||
*aRetVal = acc->Position(aCoordType);
|
||||
|
@ -616,8 +615,8 @@ mozilla::ipc::IPCResult DocAccessibleChild::RecvImagePosition(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessibleChild::RecvImageSize(
|
||||
const uint64_t& aID, LayoutDeviceIntSize* aRetVal) {
|
||||
mozilla::ipc::IPCResult DocAccessibleChild::RecvImageSize(const uint64_t& aID,
|
||||
nsIntSize* aRetVal) {
|
||||
ImageAccessible* acc = IdToImageAccessible(aID);
|
||||
if (acc) {
|
||||
*aRetVal = acc->Size();
|
||||
|
@ -1644,10 +1643,10 @@ mozilla::ipc::IPCResult DocAccessibleChild::RecvExtents(
|
|||
*aHeight = 0;
|
||||
LocalAccessible* acc = IdToAccessible(aID);
|
||||
if (acc && !acc->IsDefunct()) {
|
||||
LayoutDeviceIntRect screenRect = acc->Bounds();
|
||||
nsIntRect screenRect = acc->Bounds();
|
||||
if (!screenRect.IsEmpty()) {
|
||||
if (aNeedsScreenCoords) {
|
||||
LayoutDeviceIntPoint winCoords =
|
||||
nsIntPoint winCoords =
|
||||
nsCoreUtils::GetScreenCoordsForWindow(acc->GetNode());
|
||||
screenRect.x -= winCoords.x;
|
||||
screenRect.y -= winCoords.y;
|
||||
|
|
|
@ -143,14 +143,16 @@ class DocAccessibleChild : public DocAccessibleChildBase {
|
|||
virtual mozilla::ipc::IPCResult RecvDefaultTextAttributes(
|
||||
const uint64_t& aID, RefPtr<AccAttributes>* aAttributes) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvTextBounds(
|
||||
const uint64_t& aID, const int32_t& aStartOffset,
|
||||
const int32_t& aEndOffset, const uint32_t& aCoordType,
|
||||
LayoutDeviceIntRect* aRetVal) override;
|
||||
virtual mozilla::ipc::IPCResult RecvTextBounds(const uint64_t& aID,
|
||||
const int32_t& aStartOffset,
|
||||
const int32_t& aEndOffset,
|
||||
const uint32_t& aCoordType,
|
||||
nsIntRect* aRetVal) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvCharBounds(
|
||||
const uint64_t& aID, const int32_t& aOffset, const uint32_t& aCoordType,
|
||||
LayoutDeviceIntRect* aRetVal) override;
|
||||
virtual mozilla::ipc::IPCResult RecvCharBounds(const uint64_t& aID,
|
||||
const int32_t& aOffset,
|
||||
const uint32_t& aCoordType,
|
||||
nsIntRect* aRetVal) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvOffsetAtPoint(const uint64_t& aID,
|
||||
const int32_t& aX,
|
||||
|
@ -217,10 +219,10 @@ class DocAccessibleChild : public DocAccessibleChildBase {
|
|||
|
||||
virtual mozilla::ipc::IPCResult RecvImagePosition(
|
||||
const uint64_t& aID, const uint32_t& aCoordType,
|
||||
LayoutDeviceIntPoint* aRetVal) override;
|
||||
nsIntPoint* aRetVal) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvImageSize(
|
||||
const uint64_t& aID, LayoutDeviceIntSize* aRetVal) override;
|
||||
virtual mozilla::ipc::IPCResult RecvImageSize(const uint64_t& aID,
|
||||
nsIntSize* aRetVal) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvStartOffset(const uint64_t& aID,
|
||||
uint32_t* aRetVal,
|
||||
|
|
|
@ -12,14 +12,14 @@ include DocAccessibleTypes;
|
|||
|
||||
include "mozilla/GfxMessageUtils.h";
|
||||
|
||||
using LayoutDeviceIntRect from "Units.h";
|
||||
using LayoutDeviceIntPoint from "Units.h";
|
||||
using LayoutDeviceIntSize from "Units.h";
|
||||
using nsIntRect from "nsRect.h";
|
||||
using mozilla::a11y::role from "mozilla/a11y/IPCTypes.h";
|
||||
using mozilla::a11y::AccType from "mozilla/a11y/IPCTypes.h";
|
||||
using mozilla::a11y::AccGenericType from "mozilla/a11y/IPCTypes.h";
|
||||
[RefCounted] using mozilla::a11y::AccAttributes from "mozilla/a11y/IPCTypes.h";
|
||||
using mozilla::a11y::CacheUpdateType from "mozilla/a11y/IPCTypes.h";
|
||||
using mozilla::gfx::IntSize from "mozilla/gfx/Point.h";
|
||||
using mozilla::gfx::IntPoint from "mozilla/gfx/Point.h";
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -44,7 +44,7 @@ struct BatchData
|
|||
OriginDocument Document;
|
||||
uint64_t ID;
|
||||
uint64_t State;
|
||||
LayoutDeviceIntRect Bounds;
|
||||
nsIntRect Bounds;
|
||||
uint8_t ActionCount;
|
||||
nsString Name;
|
||||
nsString TextValue;
|
||||
|
@ -200,9 +200,9 @@ child:
|
|||
|
||||
[Nested=inside_sync] sync TextBounds(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset,
|
||||
uint32_t aCoordType)
|
||||
returns(LayoutDeviceIntRect aRetVal);
|
||||
returns(nsIntRect aRetVal);
|
||||
[Nested=inside_sync] sync CharBounds(uint64_t aID, int32_t aOffset, uint32_t aCoordType)
|
||||
returns(LayoutDeviceIntRect aRetVal);
|
||||
returns(nsIntRect aRetVal);
|
||||
|
||||
[Nested=inside_sync] sync OffsetAtPoint(uint64_t aID, int32_t aX, int32_t aY, uint32_t aCoordType)
|
||||
returns(int32_t aRetVal);
|
||||
|
@ -238,8 +238,8 @@ child:
|
|||
[Nested=inside_sync] sync PasteText(uint64_t aID, int32_t aPosition)
|
||||
returns(bool aValid);
|
||||
|
||||
[Nested=inside_sync] sync ImagePosition(uint64_t aID, uint32_t aCoordType) returns(LayoutDeviceIntPoint aRetVal);
|
||||
[Nested=inside_sync] sync ImageSize(uint64_t aID) returns(LayoutDeviceIntSize aRetVal);
|
||||
[Nested=inside_sync] sync ImagePosition(uint64_t aID, uint32_t aCoordType) returns(IntPoint aRetVal);
|
||||
[Nested=inside_sync] sync ImageSize(uint64_t aID) returns(IntSize aRetVal);
|
||||
|
||||
[Nested=inside_sync] sync StartOffset(uint64_t aID) returns(uint32_t aRetVal, bool aOk);
|
||||
[Nested=inside_sync] sync EndOffset(uint64_t aID) returns(uint32_t aRetVal, bool aOk);
|
||||
|
|
|
@ -260,18 +260,16 @@ already_AddRefed<AccAttributes> RemoteAccessible::DefaultTextAttributes() {
|
|||
return attrs.forget();
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect RemoteAccessible::TextBounds(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aCoordType) {
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect RemoteAccessible::TextBounds(int32_t aStartOffset, int32_t aEndOffset,
|
||||
uint32_t aCoordType) {
|
||||
nsIntRect rect;
|
||||
Unused << mDoc->SendTextBounds(mID, aStartOffset, aEndOffset, aCoordType,
|
||||
&rect);
|
||||
return rect;
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect RemoteAccessible::CharBounds(int32_t aOffset,
|
||||
uint32_t aCoordType) {
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect RemoteAccessible::CharBounds(int32_t aOffset, uint32_t aCoordType) {
|
||||
nsIntRect rect;
|
||||
Unused << mDoc->SendCharBounds(mID, aOffset, aCoordType, &rect);
|
||||
return rect;
|
||||
}
|
||||
|
@ -367,14 +365,14 @@ bool RemoteAccessible::PasteText(int32_t aPosition) {
|
|||
return valid;
|
||||
}
|
||||
|
||||
LayoutDeviceIntPoint RemoteAccessible::ImagePosition(uint32_t aCoordType) {
|
||||
LayoutDeviceIntPoint retVal;
|
||||
nsIntPoint RemoteAccessible::ImagePosition(uint32_t aCoordType) {
|
||||
nsIntPoint retVal;
|
||||
Unused << mDoc->SendImagePosition(mID, aCoordType, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
LayoutDeviceIntSize RemoteAccessible::ImageSize() {
|
||||
LayoutDeviceIntSize retVal;
|
||||
nsIntSize RemoteAccessible::ImageSize() {
|
||||
nsIntSize retVal;
|
||||
Unused << mDoc->SendImageSize(mID, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
@ -874,7 +872,7 @@ Accessible* RemoteAccessible::ChildAtPoint(
|
|||
if (target->IsOuterDoc()) {
|
||||
if (target->ChildCount() == 0) {
|
||||
// Return the OuterDoc if the requested point is within its bounds.
|
||||
LayoutDeviceIntRect rect = target->Bounds();
|
||||
nsIntRect rect = target->Bounds();
|
||||
if (rect.Contains(aX, aY)) {
|
||||
return target;
|
||||
}
|
||||
|
@ -887,7 +885,7 @@ Accessible* RemoteAccessible::ChildAtPoint(
|
|||
// process, so they stop at OOP iframes.
|
||||
if (aWhichChild == Accessible::EWhichChildAtPoint::DirectChild) {
|
||||
// Return the child document if it's within the bounds of the iframe.
|
||||
LayoutDeviceIntRect docRect = target->Bounds();
|
||||
nsIntRect docRect = target->Bounds();
|
||||
if (docRect.Contains(aX, aY)) {
|
||||
return childDoc;
|
||||
}
|
||||
|
@ -910,12 +908,12 @@ Accessible* RemoteAccessible::ChildAtPoint(
|
|||
return target;
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect RemoteAccessible::Bounds() const {
|
||||
nsIntRect RemoteAccessible::Bounds() const {
|
||||
if (StaticPrefs::accessibility_cache_enabled_AtStartup()) {
|
||||
return RemoteAccessibleBase<RemoteAccessible>::Bounds();
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
Unused << mDoc->SendExtents(mID, false, &(rect.x), &(rect.y), &(rect.width),
|
||||
&(rect.height));
|
||||
return rect;
|
||||
|
|
|
@ -223,12 +223,12 @@ uint64_t RemoteAccessible::State() {
|
|||
return state;
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect RemoteAccessible::Bounds() const {
|
||||
nsIntRect RemoteAccessible::Bounds() const {
|
||||
if (StaticPrefs::accessibility_cache_enabled_AtStartup()) {
|
||||
return RemoteAccessibleBase<RemoteAccessible>::Bounds();
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
|
||||
RefPtr<IAccessible> acc;
|
||||
if (!GetCOMInterface((void**)getter_AddRefs(acc))) {
|
||||
|
|
|
@ -530,7 +530,7 @@ int32_t GeckoTextMarkerRange::Length() const {
|
|||
}
|
||||
|
||||
NSValue* GeckoTextMarkerRange::Bounds() const {
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
if (mStart.mContainer->IsRemote() && mEnd.mContainer->IsRemote()) {
|
||||
DocAccessibleParent* ipcDoc = mStart.mContainer->AsRemote()->Document();
|
||||
Unused << ipcDoc->GetPlatformExtension()->SendBoundsForRange(
|
||||
|
|
|
@ -29,9 +29,9 @@ class HyperTextAccessibleWrap : public HyperTextAccessible {
|
|||
HyperTextAccessible* aEndContainer,
|
||||
int32_t aEndOffset);
|
||||
|
||||
LayoutDeviceIntRect BoundsForRange(int32_t aStartOffset,
|
||||
HyperTextAccessible* aEndContainer,
|
||||
int32_t aEndOffset);
|
||||
nsIntRect BoundsForRange(int32_t aStartOffset,
|
||||
HyperTextAccessible* aEndContainer,
|
||||
int32_t aEndOffset);
|
||||
|
||||
int32_t LengthForRange(int32_t aStartOffset,
|
||||
HyperTextAccessible* aEndContainer,
|
||||
|
|
|
@ -313,13 +313,13 @@ void HyperTextAccessibleWrap::AttributedTextForRange(
|
|||
}
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect HyperTextAccessibleWrap::BoundsForRange(
|
||||
nsIntRect HyperTextAccessibleWrap::BoundsForRange(
|
||||
int32_t aStartOffset, HyperTextAccessible* aEndContainer,
|
||||
int32_t aEndOffset) {
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
HyperTextIterator iter(this, aStartOffset, aEndContainer, aEndOffset);
|
||||
while (iter.Next()) {
|
||||
LayoutDeviceIntRect stringRect = iter.mCurrentContainer->TextBounds(
|
||||
nsIntRect stringRect = iter.mCurrentContainer->TextBounds(
|
||||
iter.mCurrentStartOffset, iter.mCurrentEndOffset);
|
||||
rect.UnionRect(rect, stringRect);
|
||||
}
|
||||
|
|
|
@ -689,9 +689,9 @@ struct RoleDescrComparator {
|
|||
- (NSValue*)moxFrame {
|
||||
MOZ_ASSERT(mGeckoAccessible);
|
||||
|
||||
LayoutDeviceIntRect rect = mGeckoAccessible->IsLocal()
|
||||
? mGeckoAccessible->AsLocal()->Bounds()
|
||||
: mGeckoAccessible->AsRemote()->Bounds();
|
||||
nsIntRect rect = mGeckoAccessible->IsLocal()
|
||||
? mGeckoAccessible->AsLocal()->Bounds()
|
||||
: mGeckoAccessible->AsRemote()->Bounds();
|
||||
NSScreen* mainView = [[NSScreen screens] objectAtIndex:0];
|
||||
CGFloat scaleFactor = nsCocoaUtils::GetBackingScaleFactor(mainView);
|
||||
|
||||
|
@ -906,11 +906,12 @@ struct RoleDescrComparator {
|
|||
- (void)moxPerformShowMenu {
|
||||
MOZ_ASSERT(mGeckoAccessible);
|
||||
|
||||
nsIntRect bounds = mGeckoAccessible->IsLocal()
|
||||
? mGeckoAccessible->AsLocal()->Bounds()
|
||||
: mGeckoAccessible->AsRemote()->Bounds();
|
||||
// We don't need to convert this rect into mac coordinates because the
|
||||
// mouse event synthesizer expects layout (gecko) coordinates.
|
||||
LayoutDeviceIntRect bounds = mGeckoAccessible->IsLocal()
|
||||
? mGeckoAccessible->AsLocal()->Bounds()
|
||||
: mGeckoAccessible->AsRemote()->Bounds();
|
||||
LayoutDeviceIntRect geckoRect = LayoutDeviceIntRect::FromUnknownRect(bounds);
|
||||
|
||||
LocalAccessible* rootAcc = mGeckoAccessible->IsLocal()
|
||||
? mGeckoAccessible->AsLocal()->RootAccessible()
|
||||
|
@ -920,8 +921,9 @@ struct RoleDescrComparator {
|
|||
id objOrView =
|
||||
GetObjectOrRepresentedView(GetNativeFromGeckoAccessible(rootAcc));
|
||||
|
||||
LayoutDeviceIntPoint p = LayoutDeviceIntPoint(
|
||||
bounds.X() + (bounds.Width() / 2), bounds.Y() + (bounds.Height() / 2));
|
||||
LayoutDeviceIntPoint p =
|
||||
LayoutDeviceIntPoint(geckoRect.X() + (geckoRect.Width() / 2),
|
||||
geckoRect.Y() + (geckoRect.Height() / 2));
|
||||
nsIWidget* widget = [objOrView widget];
|
||||
widget->SynthesizeNativeMouseEvent(
|
||||
p, nsIWidget::NativeMouseMessage::ButtonDown, MouseButton::eSecondary,
|
||||
|
|
|
@ -54,7 +54,7 @@ ia2AccessibleComponent::get_locationInParent(long* aX, long* aY) {
|
|||
uint64_t state = acc->State();
|
||||
if (state & states::INVISIBLE) return S_OK;
|
||||
|
||||
LayoutDeviceIntRect rect = acc->Bounds();
|
||||
nsIntRect rect = acc->Bounds();
|
||||
|
||||
// The coordinates of the returned position are relative to this object's
|
||||
// parent or relative to the screen on which this object is rendered if it
|
||||
|
@ -67,7 +67,7 @@ ia2AccessibleComponent::get_locationInParent(long* aX, long* aY) {
|
|||
|
||||
// The coordinates of the bounding box are given relative to the parent's
|
||||
// coordinate system.
|
||||
LayoutDeviceIntRect parentRect = acc->LocalParent()->Bounds();
|
||||
nsIntRect parentRect = acc->LocalParent()->Bounds();
|
||||
*aX = rect.X() - parentRect.X();
|
||||
*aY = rect.Y() - parentRect.Y();
|
||||
return S_OK;
|
||||
|
|
|
@ -63,7 +63,7 @@ ia2AccessibleImage::get_imagePosition(enum IA2CoordinateType aCoordType,
|
|||
? nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE
|
||||
: nsIAccessibleCoordinateType::COORDTYPE_PARENT_RELATIVE;
|
||||
|
||||
LayoutDeviceIntPoint pos = imageAcc->Position(geckoCoordType);
|
||||
nsIntPoint pos = imageAcc->Position(geckoCoordType);
|
||||
*aX = pos.x;
|
||||
*aY = pos.y;
|
||||
return S_OK;
|
||||
|
@ -79,7 +79,7 @@ ia2AccessibleImage::get_imageSize(long* aHeight, long* aWidth) {
|
|||
ImageAccessible* imageAcc = ImageAcc();
|
||||
if (!imageAcc) return CO_E_OBJNOTCONNECTED;
|
||||
|
||||
LayoutDeviceIntSize size = imageAcc->Size();
|
||||
nsIntSize size = imageAcc->Size();
|
||||
*aHeight = size.width;
|
||||
*aWidth = size.height;
|
||||
return S_OK;
|
||||
|
|
|
@ -111,7 +111,7 @@ ia2AccessibleText::get_characterExtents(long aOffset,
|
|||
(aCoordType == IA2_COORDTYPE_SCREEN_RELATIVE)
|
||||
? nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE
|
||||
: nsIAccessibleCoordinateType::COORDTYPE_PARENT_RELATIVE;
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
auto [textAcc, hr] = LocalTextAcc();
|
||||
if (!textAcc) {
|
||||
return hr;
|
||||
|
|
|
@ -77,10 +77,10 @@ void DocAccessibleWrap::DoInitialUpdate() {
|
|||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
a11y::RootAccessible* rootDocument = RootAccessible();
|
||||
bool isActive = true;
|
||||
LayoutDeviceIntRect rect(CW_USEDEFAULT, CW_USEDEFAULT, 0, 0);
|
||||
nsIntRect rect(CW_USEDEFAULT, CW_USEDEFAULT, 0, 0);
|
||||
if (Compatibility::IsDolphin()) {
|
||||
rect = Bounds();
|
||||
LayoutDeviceIntRect rootRect = rootDocument->Bounds();
|
||||
nsIntRect rootRect = rootDocument->Bounds();
|
||||
rect.MoveToX(rootRect.X() - rect.X());
|
||||
rect.MoveByY(-rootRect.Y());
|
||||
|
||||
|
|
|
@ -1523,7 +1523,7 @@ MsaaAccessible::accLocation(
|
|||
kVarChildIdSelf);
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect rect = Acc()->Bounds();
|
||||
nsIntRect rect = Acc()->Bounds();
|
||||
*pxLeft = rect.X();
|
||||
*pyTop = rect.Y();
|
||||
*pcxWidth = rect.Width();
|
||||
|
@ -1654,7 +1654,7 @@ MsaaAccessible::accHitTest(
|
|||
// This is an OOP iframe. ChildAtPoint can't traverse inside it. If the
|
||||
// coordinates are inside this iframe, return the COM proxy for the
|
||||
// OOP document.
|
||||
LayoutDeviceIntRect docRect = mAcc->AsLocal()->Bounds();
|
||||
nsIntRect docRect = mAcc->AsLocal()->Bounds();
|
||||
if (docRect.Contains(xLeft, yTop)) {
|
||||
pvarChild->vt = VT_DISPATCH;
|
||||
disp.forget(&pvarChild->pdispVal);
|
||||
|
|
|
@ -61,10 +61,10 @@ sdnTextAccessible::get_clippedSubstringBounds(
|
|||
document,
|
||||
"There must always be a doc accessible, but there isn't. Crash!");
|
||||
|
||||
LayoutDeviceIntRect docRect = document->Bounds();
|
||||
LayoutDeviceIntRect unclippedRect(x, y, width, height);
|
||||
nsIntRect docRect = document->Bounds();
|
||||
nsIntRect unclippedRect(x, y, width, height);
|
||||
|
||||
LayoutDeviceIntRect clippedRect;
|
||||
nsIntRect clippedRect;
|
||||
clippedRect.IntersectRect(unclippedRect, docRect);
|
||||
|
||||
*aX = clippedRect.X();
|
||||
|
|
|
@ -408,7 +408,7 @@ xpcAccessible::GetBounds(int32_t* aX, int32_t* aY, int32_t* aWidth,
|
|||
|
||||
if (!IntlGeneric()) return NS_ERROR_FAILURE;
|
||||
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
if (LocalAccessible* acc = IntlGeneric()->AsLocal()) {
|
||||
rect = acc->Bounds();
|
||||
} else {
|
||||
|
|
|
@ -231,7 +231,7 @@ xpcAccessibleHyperText::GetCharacterExtents(int32_t aOffset, int32_t* aX,
|
|||
|
||||
if (!mIntl) return NS_ERROR_FAILURE;
|
||||
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
if (mIntl->IsLocal()) {
|
||||
rect = IntlLocal()->CharBounds(aOffset, aCoordType);
|
||||
} else {
|
||||
|
@ -258,7 +258,7 @@ xpcAccessibleHyperText::GetRangeExtents(int32_t aStartOffset,
|
|||
|
||||
if (!mIntl) return NS_ERROR_FAILURE;
|
||||
|
||||
LayoutDeviceIntRect rect;
|
||||
nsIntRect rect;
|
||||
if (mIntl->IsLocal()) {
|
||||
rect = IntlLocal()->TextBounds(aStartOffset, aEndOffset, aCoordType);
|
||||
} else {
|
||||
|
|
|
@ -29,7 +29,7 @@ xpcAccessibleImage::GetImagePosition(uint32_t aCoordType, int32_t* aX,
|
|||
|
||||
if (!Intl()) return NS_ERROR_FAILURE;
|
||||
|
||||
LayoutDeviceIntPoint point = Intl()->Position(aCoordType);
|
||||
nsIntPoint point = Intl()->Position(aCoordType);
|
||||
*aX = point.x;
|
||||
*aY = point.y;
|
||||
return NS_OK;
|
||||
|
@ -44,7 +44,7 @@ xpcAccessibleImage::GetImageSize(int32_t* aWidth, int32_t* aHeight) {
|
|||
|
||||
if (!Intl()) return NS_ERROR_FAILURE;
|
||||
|
||||
LayoutDeviceIntSize size = Intl()->Size();
|
||||
nsIntSize size = Intl()->Size();
|
||||
*aWidth = size.width;
|
||||
*aHeight = size.height;
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче