зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1693597 - P2: Rename ProxyAccessible to RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105671
This commit is contained in:
Родитель
6e49732365
Коммит
6e8749d0da
|
@ -7,7 +7,7 @@
|
|||
#define mozilla_a11y_AccessibleWrap_h_
|
||||
|
||||
#include "LocalAccessible.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
#include "mozilla/java/GeckoBundleWrappers.h"
|
||||
#include "mozilla/java/SessionAccessibilityWrappers.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
@ -112,7 +112,7 @@ class AccessibleWrap : public LocalAccessible {
|
|||
static uint32_t GetFlags(role aRole, uint64_t aState, uint8_t aActionCount);
|
||||
};
|
||||
|
||||
static inline AccessibleWrap* WrapperFor(const ProxyAccessible* aProxy) {
|
||||
static inline AccessibleWrap* WrapperFor(const RemoteAccessible* aProxy) {
|
||||
return reinterpret_cast<AccessibleWrap*>(aProxy->GetWrapper());
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "Platform.h"
|
||||
#include "ProxyAccessibleWrap.h"
|
||||
#include "RemoteAccessibleWrap.h"
|
||||
#include "DocAccessibleWrap.h"
|
||||
#include "SessionAccessibility.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
#include "mozilla/Components.h"
|
||||
#include "nsIAccessibleEvent.h"
|
||||
#include "nsIAccessiblePivot.h"
|
||||
|
@ -25,19 +25,19 @@ void a11y::PlatformInit() {}
|
|||
|
||||
void a11y::PlatformShutdown() { NS_IF_RELEASE(sStringBundle); }
|
||||
|
||||
void a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t aInterfaces) {
|
||||
void a11y::ProxyCreated(RemoteAccessible* aProxy, uint32_t aInterfaces) {
|
||||
AccessibleWrap* wrapper = nullptr;
|
||||
if (aProxy->IsDoc()) {
|
||||
wrapper = new DocProxyAccessibleWrap(aProxy->AsDoc());
|
||||
wrapper = new DocRemoteAccessibleWrap(aProxy->AsDoc());
|
||||
} else {
|
||||
wrapper = new ProxyAccessibleWrap(aProxy);
|
||||
wrapper = new RemoteAccessibleWrap(aProxy);
|
||||
}
|
||||
|
||||
wrapper->AddRef();
|
||||
aProxy->SetWrapper(reinterpret_cast<uintptr_t>(wrapper));
|
||||
}
|
||||
|
||||
void a11y::ProxyDestroyed(ProxyAccessible* aProxy) {
|
||||
void a11y::ProxyDestroyed(RemoteAccessible* aProxy) {
|
||||
AccessibleWrap* wrapper =
|
||||
reinterpret_cast<AccessibleWrap*>(aProxy->GetWrapper());
|
||||
|
||||
|
@ -53,7 +53,7 @@ void a11y::ProxyDestroyed(ProxyAccessible* aProxy) {
|
|||
wrapper->Release();
|
||||
}
|
||||
|
||||
void a11y::ProxyEvent(ProxyAccessible* aTarget, uint32_t aEventType) {
|
||||
void a11y::ProxyEvent(RemoteAccessible* aTarget, uint32_t aEventType) {
|
||||
RefPtr<SessionAccessibility> sessionAcc =
|
||||
SessionAccessibility::GetInstanceFor(aTarget);
|
||||
if (!sessionAcc) {
|
||||
|
@ -67,7 +67,7 @@ void a11y::ProxyEvent(ProxyAccessible* aTarget, uint32_t aEventType) {
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyStateChangeEvent(ProxyAccessible* aTarget, uint64_t aState,
|
||||
void a11y::ProxyStateChangeEvent(RemoteAccessible* aTarget, uint64_t aState,
|
||||
bool aEnabled) {
|
||||
RefPtr<SessionAccessibility> sessionAcc =
|
||||
SessionAccessibility::GetInstanceFor(aTarget);
|
||||
|
@ -99,7 +99,7 @@ void a11y::ProxyStateChangeEvent(ProxyAccessible* aTarget, uint64_t aState,
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset,
|
||||
void a11y::ProxyCaretMoveEvent(RemoteAccessible* aTarget, int32_t aOffset,
|
||||
bool aIsSelectionCollapsed) {
|
||||
RefPtr<SessionAccessibility> sessionAcc =
|
||||
SessionAccessibility::GetInstanceFor(aTarget);
|
||||
|
@ -109,7 +109,7 @@ void a11y::ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset,
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyTextChangeEvent(ProxyAccessible* aTarget, const nsString& aStr,
|
||||
void a11y::ProxyTextChangeEvent(RemoteAccessible* aTarget, const nsString& aStr,
|
||||
int32_t aStart, uint32_t aLen, bool aIsInsert,
|
||||
bool aFromUser) {
|
||||
RefPtr<SessionAccessibility> sessionAcc =
|
||||
|
@ -121,19 +121,20 @@ void a11y::ProxyTextChangeEvent(ProxyAccessible* aTarget, const nsString& aStr,
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyShowHideEvent(ProxyAccessible* aTarget,
|
||||
ProxyAccessible* aParent, bool aInsert,
|
||||
void a11y::ProxyShowHideEvent(RemoteAccessible* aTarget,
|
||||
RemoteAccessible* aParent, bool aInsert,
|
||||
bool aFromUser) {
|
||||
// We rely on the window content changed events to be dispatched
|
||||
// after the viewport cache is refreshed.
|
||||
}
|
||||
|
||||
void a11y::ProxySelectionEvent(ProxyAccessible*, ProxyAccessible*, uint32_t) {}
|
||||
void a11y::ProxySelectionEvent(RemoteAccessible*, RemoteAccessible*, uint32_t) {
|
||||
}
|
||||
|
||||
void a11y::ProxyVirtualCursorChangeEvent(
|
||||
ProxyAccessible* aTarget, ProxyAccessible* aOldPosition,
|
||||
RemoteAccessible* aTarget, RemoteAccessible* aOldPosition,
|
||||
int32_t aOldStartOffset, int32_t aOldEndOffset,
|
||||
ProxyAccessible* aNewPosition, int32_t aNewStartOffset,
|
||||
RemoteAccessible* aNewPosition, int32_t aNewStartOffset,
|
||||
int32_t aNewEndOffset, int16_t aReason, int16_t aBoundaryType,
|
||||
bool aFromUser) {
|
||||
if (!aNewPosition || !aFromUser) {
|
||||
|
@ -160,7 +161,7 @@ void a11y::ProxyVirtualCursorChangeEvent(
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyScrollingEvent(ProxyAccessible* aTarget, uint32_t aEventType,
|
||||
void a11y::ProxyScrollingEvent(RemoteAccessible* aTarget, uint32_t aEventType,
|
||||
uint32_t aScrollX, uint32_t aScrollY,
|
||||
uint32_t aMaxScrollX, uint32_t aMaxScrollY) {
|
||||
if (aEventType == nsIAccessibleEvent::EVENT_SCROLLING) {
|
||||
|
@ -174,7 +175,7 @@ void a11y::ProxyScrollingEvent(ProxyAccessible* aTarget, uint32_t aEventType,
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyAnnouncementEvent(ProxyAccessible* aTarget,
|
||||
void a11y::ProxyAnnouncementEvent(RemoteAccessible* aTarget,
|
||||
const nsString& aAnnouncement,
|
||||
uint16_t aPriority) {
|
||||
RefPtr<SessionAccessibility> sessionAcc =
|
||||
|
@ -186,8 +187,8 @@ void a11y::ProxyAnnouncementEvent(ProxyAccessible* aTarget,
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyBatch(ProxyAccessible* aDocument, const uint64_t aBatchType,
|
||||
const nsTArray<ProxyAccessible*>& aAccessibles,
|
||||
void a11y::ProxyBatch(RemoteAccessible* aDocument, const uint64_t aBatchType,
|
||||
const nsTArray<RemoteAccessible*>& aAccessibles,
|
||||
const nsTArray<BatchData>& aData) {
|
||||
RefPtr<SessionAccessibility> sessionAcc =
|
||||
SessionAccessibility::GetInstanceFor(aDocument);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "ProxyAccessibleWrap.h"
|
||||
#include "RemoteAccessibleWrap.h"
|
||||
#include "LocalAccessible-inl.h"
|
||||
|
||||
#include "nsPersistentProperties.h"
|
||||
|
@ -12,7 +12,7 @@
|
|||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
ProxyAccessibleWrap::ProxyAccessibleWrap(ProxyAccessible* aProxy)
|
||||
RemoteAccessibleWrap::RemoteAccessibleWrap(RemoteAccessible* aProxy)
|
||||
: AccessibleWrap(nullptr, nullptr) {
|
||||
mType = eProxyType;
|
||||
mBits.proxy = aProxy;
|
||||
|
@ -29,7 +29,7 @@ ProxyAccessibleWrap::ProxyAccessibleWrap(ProxyAccessible* aProxy)
|
|||
mGenericTypes |= eHyperText;
|
||||
}
|
||||
|
||||
auto doc = reinterpret_cast<DocProxyAccessibleWrap*>(
|
||||
auto doc = reinterpret_cast<DocRemoteAccessibleWrap*>(
|
||||
Proxy()->Document()->GetWrapper());
|
||||
if (doc) {
|
||||
mID = AcquireID();
|
||||
|
@ -37,8 +37,8 @@ ProxyAccessibleWrap::ProxyAccessibleWrap(ProxyAccessible* aProxy)
|
|||
}
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::Shutdown() {
|
||||
auto doc = reinterpret_cast<DocProxyAccessibleWrap*>(
|
||||
void RemoteAccessibleWrap::Shutdown() {
|
||||
auto doc = reinterpret_cast<DocRemoteAccessibleWrap*>(
|
||||
Proxy()->Document()->GetWrapper());
|
||||
if (mID && doc) {
|
||||
doc->RemoveID(mID);
|
||||
|
@ -52,112 +52,113 @@ void ProxyAccessibleWrap::Shutdown() {
|
|||
|
||||
// LocalAccessible
|
||||
|
||||
already_AddRefed<nsIPersistentProperties> ProxyAccessibleWrap::Attributes() {
|
||||
already_AddRefed<nsIPersistentProperties> RemoteAccessibleWrap::Attributes() {
|
||||
AutoTArray<Attribute, 10> attrs;
|
||||
Proxy()->Attributes(&attrs);
|
||||
return AttributeArrayToProperties(attrs);
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessibleWrap::ChildCount() const {
|
||||
uint32_t RemoteAccessibleWrap::ChildCount() const {
|
||||
return Proxy()->ChildrenCount();
|
||||
}
|
||||
|
||||
LocalAccessible* ProxyAccessibleWrap::LocalChildAt(uint32_t aIndex) const {
|
||||
ProxyAccessible* child = Proxy()->RemoteChildAt(aIndex);
|
||||
LocalAccessible* RemoteAccessibleWrap::LocalChildAt(uint32_t aIndex) const {
|
||||
RemoteAccessible* child = Proxy()->RemoteChildAt(aIndex);
|
||||
return child ? WrapperFor(child) : nullptr;
|
||||
}
|
||||
|
||||
ENameValueFlag ProxyAccessibleWrap::Name(nsString& aName) const {
|
||||
ENameValueFlag RemoteAccessibleWrap::Name(nsString& aName) const {
|
||||
Proxy()->Name(aName);
|
||||
return eNameOK;
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::Value(nsString& aValue) const {
|
||||
void RemoteAccessibleWrap::Value(nsString& aValue) const {
|
||||
Proxy()->Value(aValue);
|
||||
}
|
||||
|
||||
uint64_t ProxyAccessibleWrap::State() { return Proxy()->State(); }
|
||||
uint64_t RemoteAccessibleWrap::State() { return Proxy()->State(); }
|
||||
|
||||
nsIntRect ProxyAccessibleWrap::Bounds() const { return Proxy()->Bounds(); }
|
||||
nsIntRect RemoteAccessibleWrap::Bounds() const { return Proxy()->Bounds(); }
|
||||
|
||||
void ProxyAccessibleWrap::ScrollTo(uint32_t aHow) const {
|
||||
void RemoteAccessibleWrap::ScrollTo(uint32_t aHow) const {
|
||||
Proxy()->ScrollTo(aHow);
|
||||
}
|
||||
|
||||
uint8_t ProxyAccessibleWrap::ActionCount() const {
|
||||
uint8_t RemoteAccessibleWrap::ActionCount() const {
|
||||
return Proxy()->ActionCount();
|
||||
}
|
||||
|
||||
bool ProxyAccessibleWrap::DoAction(uint8_t aIndex) const {
|
||||
bool RemoteAccessibleWrap::DoAction(uint8_t aIndex) const {
|
||||
return Proxy()->DoAction(aIndex);
|
||||
}
|
||||
|
||||
// Other
|
||||
|
||||
void ProxyAccessibleWrap::SetTextContents(const nsAString& aText) {
|
||||
void RemoteAccessibleWrap::SetTextContents(const nsAString& aText) {
|
||||
Proxy()->ReplaceText(PromiseFlatString(aText));
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::GetTextContents(nsAString& aText) {
|
||||
void RemoteAccessibleWrap::GetTextContents(nsAString& aText) {
|
||||
nsAutoString text;
|
||||
Proxy()->TextSubstring(0, -1, text);
|
||||
aText.Assign(text);
|
||||
}
|
||||
|
||||
bool ProxyAccessibleWrap::GetSelectionBounds(int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
bool RemoteAccessibleWrap::GetSelectionBounds(int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
nsAutoString unused;
|
||||
return Proxy()->SelectionBoundsAt(0, unused, aStartOffset, aEndOffset);
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::PivotTo(int32_t aGranularity, bool aForward,
|
||||
bool aInclusive) {
|
||||
void RemoteAccessibleWrap::PivotTo(int32_t aGranularity, bool aForward,
|
||||
bool aInclusive) {
|
||||
Unused << Proxy()->Document()->GetPlatformExtension()->SendPivot(
|
||||
Proxy()->ID(), aGranularity, aForward, aInclusive);
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::ExploreByTouch(float aX, float aY) {
|
||||
void RemoteAccessibleWrap::ExploreByTouch(float aX, float aY) {
|
||||
Unused << Proxy()->Document()->GetPlatformExtension()->SendExploreByTouch(
|
||||
Proxy()->ID(), aX, aY);
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::NavigateText(int32_t aGranularity,
|
||||
int32_t aStartOffset, int32_t aEndOffset,
|
||||
bool aForward, bool aSelect) {
|
||||
void RemoteAccessibleWrap::NavigateText(int32_t aGranularity,
|
||||
int32_t aStartOffset,
|
||||
int32_t aEndOffset, bool aForward,
|
||||
bool aSelect) {
|
||||
Unused << Proxy()->Document()->GetPlatformExtension()->SendNavigateText(
|
||||
Proxy()->ID(), aGranularity, aStartOffset, aEndOffset, aForward, aSelect);
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::SetSelection(int32_t aStart, int32_t aEnd) {
|
||||
void RemoteAccessibleWrap::SetSelection(int32_t aStart, int32_t aEnd) {
|
||||
Unused << Proxy()->Document()->GetPlatformExtension()->SendSetSelection(
|
||||
Proxy()->ID(), aStart, aEnd);
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::Cut() {
|
||||
void RemoteAccessibleWrap::Cut() {
|
||||
Unused << Proxy()->Document()->GetPlatformExtension()->SendCut(Proxy()->ID());
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::Copy() {
|
||||
void RemoteAccessibleWrap::Copy() {
|
||||
Unused << Proxy()->Document()->GetPlatformExtension()->SendCopy(
|
||||
Proxy()->ID());
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::Paste() {
|
||||
void RemoteAccessibleWrap::Paste() {
|
||||
Unused << Proxy()->Document()->GetPlatformExtension()->SendPaste(
|
||||
Proxy()->ID());
|
||||
}
|
||||
|
||||
role ProxyAccessibleWrap::WrapperRole() { return Proxy()->Role(); }
|
||||
role RemoteAccessibleWrap::WrapperRole() { return Proxy()->Role(); }
|
||||
|
||||
AccessibleWrap* ProxyAccessibleWrap::WrapperParent() {
|
||||
AccessibleWrap* RemoteAccessibleWrap::WrapperParent() {
|
||||
return Proxy()->RemoteParent() ? WrapperFor(Proxy()->RemoteParent())
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
bool ProxyAccessibleWrap::WrapperRangeInfo(double* aCurVal, double* aMinVal,
|
||||
double* aMaxVal, double* aStep) {
|
||||
bool RemoteAccessibleWrap::WrapperRangeInfo(double* aCurVal, double* aMinVal,
|
||||
double* aMaxVal, double* aStep) {
|
||||
if (HasNumericValue()) {
|
||||
ProxyAccessible* proxy = Proxy();
|
||||
RemoteAccessible* proxy = Proxy();
|
||||
*aCurVal = proxy->CurValue();
|
||||
*aMinVal = proxy->MinValue();
|
||||
*aMaxVal = proxy->MaxValue();
|
||||
|
@ -168,6 +169,6 @@ bool ProxyAccessibleWrap::WrapperRangeInfo(double* aCurVal, double* aMinVal,
|
|||
return false;
|
||||
}
|
||||
|
||||
void ProxyAccessibleWrap::WrapperDOMNodeID(nsString& aDOMNodeID) {
|
||||
void RemoteAccessibleWrap::WrapperDOMNodeID(nsString& aDOMNodeID) {
|
||||
Proxy()->DOMNodeID(aDOMNodeID);
|
||||
}
|
|
@ -5,8 +5,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. *
|
||||
*/
|
||||
|
||||
#ifndef MOZILLA_A11Y_ProxyAccessibleWrap_h
|
||||
#define MOZILLA_A11Y_ProxyAccessibleWrap_h
|
||||
#ifndef MOZILLA_A11Y_RemoteAccessibleWrap_h
|
||||
#define MOZILLA_A11Y_RemoteAccessibleWrap_h
|
||||
|
||||
#include "AccessibleWrap.h"
|
||||
#include "DocAccessibleParent.h"
|
||||
|
@ -21,9 +21,9 @@ namespace a11y {
|
|||
* a local or remote accessibles. NOTE: This shouldn't be regarded as a full
|
||||
* Accessible implementation.
|
||||
*/
|
||||
class ProxyAccessibleWrap : public AccessibleWrap {
|
||||
class RemoteAccessibleWrap : public AccessibleWrap {
|
||||
public:
|
||||
explicit ProxyAccessibleWrap(ProxyAccessible* aProxy);
|
||||
explicit RemoteAccessibleWrap(RemoteAccessible* aProxy);
|
||||
|
||||
virtual void Shutdown() override;
|
||||
|
||||
|
@ -87,10 +87,10 @@ class ProxyAccessibleWrap : public AccessibleWrap {
|
|||
double* aMaxVal, double* aStep) override;
|
||||
};
|
||||
|
||||
class DocProxyAccessibleWrap : public ProxyAccessibleWrap {
|
||||
class DocRemoteAccessibleWrap : public RemoteAccessibleWrap {
|
||||
public:
|
||||
explicit DocProxyAccessibleWrap(DocAccessibleParent* aProxy)
|
||||
: ProxyAccessibleWrap(aProxy) {
|
||||
explicit DocRemoteAccessibleWrap(DocAccessibleParent* aProxy)
|
||||
: RemoteAccessibleWrap(aProxy) {
|
||||
mGenericTypes |= eDocument;
|
||||
|
||||
if (aProxy->IsTopLevel()) {
|
||||
|
@ -113,20 +113,20 @@ class DocProxyAccessibleWrap : public ProxyAccessibleWrap {
|
|||
mStateFlags |= eIsDefunct;
|
||||
}
|
||||
|
||||
DocProxyAccessibleWrap* ParentDocument() {
|
||||
DocRemoteAccessibleWrap* ParentDocument() {
|
||||
DocAccessibleParent* proxy = static_cast<DocAccessibleParent*>(Proxy());
|
||||
MOZ_ASSERT(proxy);
|
||||
if (DocAccessibleParent* parent = proxy->ParentDoc()) {
|
||||
return reinterpret_cast<DocProxyAccessibleWrap*>(parent->GetWrapper());
|
||||
return reinterpret_cast<DocRemoteAccessibleWrap*>(parent->GetWrapper());
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DocProxyAccessibleWrap* GetChildDocumentAt(uint32_t aIndex) {
|
||||
DocRemoteAccessibleWrap* GetChildDocumentAt(uint32_t aIndex) {
|
||||
auto doc = Proxy()->AsDoc();
|
||||
if (doc && doc->ChildDocCount() > aIndex) {
|
||||
return reinterpret_cast<DocProxyAccessibleWrap*>(
|
||||
return reinterpret_cast<DocRemoteAccessibleWrap*>(
|
||||
doc->ChildDocAt(aIndex)->GetWrapper());
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
#include "AccessibleOrProxy.h"
|
||||
#include "DocAccessibleParent.h"
|
||||
#include "DocAccessible-inl.h"
|
||||
#include "ProxyAccessibleWrap.h"
|
||||
#include "RemoteAccessibleWrap.h"
|
||||
#include "SessionAccessibility.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
|
||||
|
@ -23,7 +23,7 @@ RootAccessibleWrap::RootAccessibleWrap(dom::Document* aDoc,
|
|||
RootAccessibleWrap::~RootAccessibleWrap() {}
|
||||
|
||||
AccessibleWrap* RootAccessibleWrap::GetContentAccessible() {
|
||||
if (ProxyAccessible* proxy = GetPrimaryRemoteTopLevelContentDoc()) {
|
||||
if (RemoteAccessible* proxy = GetPrimaryRemoteTopLevelContentDoc()) {
|
||||
return WrapperFor(proxy);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ AccessibleWrap* RootAccessibleWrap::FindAccessibleById(int32_t aID) {
|
|||
}
|
||||
|
||||
if (contentAcc->IsProxy()) {
|
||||
return FindAccessibleById(static_cast<DocProxyAccessibleWrap*>(contentAcc),
|
||||
return FindAccessibleById(static_cast<DocRemoteAccessibleWrap*>(contentAcc),
|
||||
aID);
|
||||
}
|
||||
|
||||
|
@ -61,12 +61,12 @@ AccessibleWrap* RootAccessibleWrap::FindAccessibleById(int32_t aID) {
|
|||
}
|
||||
|
||||
AccessibleWrap* RootAccessibleWrap::FindAccessibleById(
|
||||
DocProxyAccessibleWrap* aDoc, int32_t aID) {
|
||||
DocRemoteAccessibleWrap* aDoc, int32_t aID) {
|
||||
AccessibleWrap* acc = aDoc->GetAccessibleByID(aID);
|
||||
uint32_t index = 0;
|
||||
while (!acc) {
|
||||
auto child =
|
||||
static_cast<DocProxyAccessibleWrap*>(aDoc->GetChildDocumentAt(index++));
|
||||
auto child = static_cast<DocRemoteAccessibleWrap*>(
|
||||
aDoc->GetChildDocumentAt(index++));
|
||||
if (!child) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ class PresShell;
|
|||
|
||||
namespace a11y {
|
||||
|
||||
class DocProxyAccessibleWrap;
|
||||
class DocRemoteAccessibleWrap;
|
||||
|
||||
class RootAccessibleWrap : public RootAccessible {
|
||||
public:
|
||||
|
@ -29,7 +29,7 @@ class RootAccessibleWrap : public RootAccessible {
|
|||
AccessibleWrap* FindAccessibleById(DocAccessibleWrap* aDocument, int32_t aID);
|
||||
|
||||
// Recursively searches for the accessible ID within the proxy document tree.
|
||||
AccessibleWrap* FindAccessibleById(DocProxyAccessibleWrap* aDocument,
|
||||
AccessibleWrap* FindAccessibleById(DocRemoteAccessibleWrap* aDocument,
|
||||
int32_t aID);
|
||||
};
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ void SessionAccessibility::Paste(int32_t aID) {
|
|||
}
|
||||
|
||||
RefPtr<SessionAccessibility> SessionAccessibility::GetInstanceFor(
|
||||
ProxyAccessible* aAccessible) {
|
||||
RemoteAccessible* aAccessible) {
|
||||
auto tab =
|
||||
static_cast<dom::BrowserParent*>(aAccessible->Document()->Manager());
|
||||
dom::Element* frame = tab->GetOwnerElement();
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace mozilla {
|
|||
namespace a11y {
|
||||
|
||||
class AccessibleWrap;
|
||||
class ProxyAccessible;
|
||||
class RemoteAccessible;
|
||||
class RootAccessibleWrap;
|
||||
class BatchData;
|
||||
|
||||
|
@ -43,7 +43,7 @@ class SessionAccessibility final
|
|||
|
||||
static void Init();
|
||||
static RefPtr<SessionAccessibility> GetInstanceFor(
|
||||
ProxyAccessible* aAccessible);
|
||||
RemoteAccessible* aAccessible);
|
||||
static RefPtr<SessionAccessibility> GetInstanceFor(
|
||||
LocalAccessible* aAccessible);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ SOURCES += [
|
|||
"AccessibleWrap.cpp",
|
||||
"DocAccessibleWrap.cpp",
|
||||
"Platform.cpp",
|
||||
"ProxyAccessibleWrap.cpp",
|
||||
"RemoteAccessibleWrap.cpp",
|
||||
"RootAccessibleWrap.cpp",
|
||||
"SessionAccessibility.cpp",
|
||||
"TraversalRule.cpp",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "nsAccUtils.h"
|
||||
#include "mozilla/a11y/PDocAccessible.h"
|
||||
#include "OuterDocAccessible.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "DocAccessibleParent.h"
|
||||
#include "RootAccessible.h"
|
||||
#include "TableAccessible.h"
|
||||
|
@ -518,7 +518,7 @@ const gchar* getNameCB(AtkObject* aAtkObj) {
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
|
||||
if (accWrap) {
|
||||
accWrap->Name(name);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
proxy->Name(name);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
@ -559,7 +559,7 @@ const gchar* getDescriptionCB(AtkObject* aAtkObj) {
|
|||
if (accWrap->IsDefunct()) return nullptr;
|
||||
|
||||
accWrap->Description(uniDesc);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
proxy->Description(uniDesc);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
@ -687,7 +687,7 @@ AtkAttributeSet* getAttributesCB(AtkObject* aAtkObj) {
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
|
||||
if (accWrap) return GetAttributeSet(accWrap);
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(aAtkObj);
|
||||
RemoteAccessible* proxy = GetProxy(aAtkObj);
|
||||
if (!proxy) return nullptr;
|
||||
|
||||
AutoTArray<Attribute, 10> attrs;
|
||||
|
@ -750,7 +750,7 @@ gint getChildCountCB(AtkObject* aAtkObj) {
|
|||
}
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(aAtkObj);
|
||||
RemoteAccessible* proxy = GetProxy(aAtkObj);
|
||||
if (proxy && !nsAccUtils::MustPrune(proxy)) {
|
||||
return proxy->EmbeddedChildCount();
|
||||
}
|
||||
|
@ -777,16 +777,16 @@ AtkObject* refChildCB(AtkObject* aAtkObj, gint aChildIndex) {
|
|||
} else {
|
||||
OuterDocAccessible* docOwner = accWrap->AsOuterDoc();
|
||||
if (docOwner) {
|
||||
ProxyAccessible* proxyDoc = docOwner->RemoteChildDoc();
|
||||
RemoteAccessible* proxyDoc = docOwner->RemoteChildDoc();
|
||||
if (proxyDoc) childAtkObj = GetWrapperFor(proxyDoc);
|
||||
}
|
||||
}
|
||||
} else if (ProxyAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
if (nsAccUtils::MustPrune(proxy)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ProxyAccessible* child = proxy->EmbeddedChildAt(aChildIndex);
|
||||
RemoteAccessible* child = proxy->EmbeddedChildAt(aChildIndex);
|
||||
if (child) childAtkObj = GetWrapperFor(child);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
@ -807,8 +807,8 @@ AtkObject* refChildCB(AtkObject* aAtkObj, gint aChildIndex) {
|
|||
gint getIndexInParentCB(AtkObject* aAtkObj) {
|
||||
// We don't use LocalAccessible::IndexInParent() because we don't include text
|
||||
// leaf nodes as children in ATK.
|
||||
if (ProxyAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
if (ProxyAccessible* parent = proxy->RemoteParent()) {
|
||||
if (RemoteAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
if (RemoteAccessible* parent = proxy->RemoteParent()) {
|
||||
return parent->IndexOfEmbeddedChild(proxy);
|
||||
}
|
||||
|
||||
|
@ -863,7 +863,7 @@ AtkStateSet* refStateSetCB(AtkObject* aAtkObj) {
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
|
||||
if (accWrap) {
|
||||
TranslateStates(accWrap->State(), accWrap->Role(), state_set);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
TranslateStates(proxy->State(), proxy->Role(), state_set);
|
||||
} else {
|
||||
TranslateStates(states::DEFUNCT, roles::NOTHING, state_set);
|
||||
|
@ -889,7 +889,7 @@ static void UpdateAtkRelation(RelationType aType, LocalAccessible* aAcc,
|
|||
}
|
||||
|
||||
if (aType == RelationType::EMBEDS && aAcc->IsRoot()) {
|
||||
if (ProxyAccessible* proxyDoc =
|
||||
if (RemoteAccessible* proxyDoc =
|
||||
aAcc->AsRoot()->GetPrimaryRemoteTopLevelContentDoc()) {
|
||||
targets.AppendElement(GetWrapperFor(proxyDoc));
|
||||
}
|
||||
|
@ -913,9 +913,9 @@ AtkRelationSet* refRelationSetCB(AtkObject* aAtkObj) {
|
|||
#undef RELATIONTYPE
|
||||
};
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
if (RemoteAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
nsTArray<RelationType> types;
|
||||
nsTArray<nsTArray<ProxyAccessible*>> targetSets;
|
||||
nsTArray<nsTArray<RemoteAccessible*>> targetSets;
|
||||
proxy->Relations(&types, &targetSets);
|
||||
|
||||
size_t relationCount = types.Length();
|
||||
|
@ -980,7 +980,7 @@ AccessibleWrap* GetAccessibleWrap(AtkObject* aAtkObj) {
|
|||
return accWrap;
|
||||
}
|
||||
|
||||
ProxyAccessible* GetProxy(AtkObject* aObj) {
|
||||
RemoteAccessible* GetProxy(AtkObject* aObj) {
|
||||
return GetInternalObj(aObj).AsProxy();
|
||||
}
|
||||
|
||||
|
@ -990,7 +990,7 @@ AccessibleOrProxy GetInternalObj(AtkObject* aObj) {
|
|||
return MAI_ATK_OBJECT(aObj)->accWrap;
|
||||
}
|
||||
|
||||
AtkObject* GetWrapperFor(ProxyAccessible* aProxy) {
|
||||
AtkObject* GetWrapperFor(RemoteAccessible* aProxy) {
|
||||
return reinterpret_cast<AtkObject*>(aProxy->GetWrapper() & ~IS_PROXY);
|
||||
}
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ AtkObject* GetWrapperFor(AccessibleOrProxy aObj) {
|
|||
return AccessibleWrap::GetAtkObject(aObj.AsAccessible());
|
||||
}
|
||||
|
||||
static uint16_t GetInterfacesForProxy(ProxyAccessible* aProxy,
|
||||
static uint16_t GetInterfacesForProxy(RemoteAccessible* aProxy,
|
||||
uint32_t aInterfaces) {
|
||||
uint16_t interfaces = 1 << MAI_INTERFACE_COMPONENT;
|
||||
if (aInterfaces & Interfaces::HYPERTEXT) {
|
||||
|
@ -1039,7 +1039,7 @@ static uint16_t GetInterfacesForProxy(ProxyAccessible* aProxy,
|
|||
return interfaces;
|
||||
}
|
||||
|
||||
void a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t aInterfaces) {
|
||||
void a11y::ProxyCreated(RemoteAccessible* aProxy, uint32_t aInterfaces) {
|
||||
GType type = GetMaiAtkType(GetInterfacesForProxy(aProxy, aInterfaces));
|
||||
NS_ASSERTION(type, "why don't we have a type!");
|
||||
|
||||
|
@ -1053,7 +1053,7 @@ void a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t aInterfaces) {
|
|||
aProxy->SetWrapper(reinterpret_cast<uintptr_t>(obj) | IS_PROXY);
|
||||
}
|
||||
|
||||
void a11y::ProxyDestroyed(ProxyAccessible* aProxy) {
|
||||
void a11y::ProxyDestroyed(RemoteAccessible* aProxy) {
|
||||
auto obj = reinterpret_cast<MaiAtkObject*>(aProxy->GetWrapper() & ~IS_PROXY);
|
||||
if (!obj) {
|
||||
return;
|
||||
|
@ -1340,7 +1340,7 @@ nsresult AccessibleWrap::HandleAccEvent(AccEvent* aEvent) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void a11y::ProxyEvent(ProxyAccessible* aTarget, uint32_t aEventType) {
|
||||
void a11y::ProxyEvent(RemoteAccessible* aTarget, uint32_t aEventType) {
|
||||
AtkObject* wrapper = GetWrapperFor(aTarget);
|
||||
|
||||
switch (aEventType) {
|
||||
|
@ -1385,13 +1385,13 @@ void a11y::ProxyEvent(ProxyAccessible* aTarget, uint32_t aEventType) {
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyStateChangeEvent(ProxyAccessible* aTarget, uint64_t aState,
|
||||
void a11y::ProxyStateChangeEvent(RemoteAccessible* aTarget, uint64_t aState,
|
||||
bool aEnabled) {
|
||||
MaiAtkObject* atkObj = MAI_ATK_OBJECT(GetWrapperFor(aTarget));
|
||||
atkObj->FireStateChangeEvent(aState, aEnabled);
|
||||
}
|
||||
|
||||
void a11y::ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset,
|
||||
void a11y::ProxyCaretMoveEvent(RemoteAccessible* aTarget, int32_t aOffset,
|
||||
bool aIsSelectionCollapsed) {
|
||||
AtkObject* wrapper = GetWrapperFor(aTarget);
|
||||
g_signal_emit_by_name(wrapper, "text_caret_moved", aOffset);
|
||||
|
@ -1426,7 +1426,7 @@ void MaiAtkObject::FireStateChangeEvent(uint64_t aState, bool aEnabled) {
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyTextChangeEvent(ProxyAccessible* aTarget, const nsString& aStr,
|
||||
void a11y::ProxyTextChangeEvent(RemoteAccessible* aTarget, const nsString& aStr,
|
||||
int32_t aStart, uint32_t aLen, bool aIsInsert,
|
||||
bool aFromUser) {
|
||||
MaiAtkObject* atkObj = MAI_ATK_OBJECT(GetWrapperFor(aTarget));
|
||||
|
@ -1468,8 +1468,8 @@ void MaiAtkObject::FireTextChangeEvent(const nsString& aStr, int32_t aStart,
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyShowHideEvent(ProxyAccessible* aTarget,
|
||||
ProxyAccessible* aParent, bool aInsert,
|
||||
void a11y::ProxyShowHideEvent(RemoteAccessible* aTarget,
|
||||
RemoteAccessible* aParent, bool aInsert,
|
||||
bool aFromUser) {
|
||||
MaiAtkObject* obj = MAI_ATK_OBJECT(GetWrapperFor(aTarget));
|
||||
obj->FireAtkShowHideEvent(GetWrapperFor(aParent), aInsert, aFromUser);
|
||||
|
@ -1490,7 +1490,7 @@ void MaiAtkObject::FireAtkShowHideEvent(AtkObject* aParent, bool aIsAdded,
|
|||
g_signal_emit_by_name(aParent, signal_name, indexInParent, this, nullptr);
|
||||
}
|
||||
|
||||
void a11y::ProxySelectionEvent(ProxyAccessible*, ProxyAccessible* aWidget,
|
||||
void a11y::ProxySelectionEvent(RemoteAccessible*, RemoteAccessible* aWidget,
|
||||
uint32_t) {
|
||||
MaiAtkObject* obj = MAI_ATK_OBJECT(GetWrapperFor(aWidget));
|
||||
g_signal_emit_by_name(obj, "selection_changed");
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
class ProxyAccessible;
|
||||
class RemoteAccessible;
|
||||
}
|
||||
} // namespace mozilla
|
||||
|
||||
|
@ -64,9 +64,9 @@ typedef struct _MaiAtkSocketClass {
|
|||
extern "C" GType (*gAtkTableCellGetTypeFunc)();
|
||||
|
||||
mozilla::a11y::AccessibleWrap* GetAccessibleWrap(AtkObject* aAtkObj);
|
||||
mozilla::a11y::ProxyAccessible* GetProxy(AtkObject* aAtkObj);
|
||||
mozilla::a11y::RemoteAccessible* GetProxy(AtkObject* aAtkObj);
|
||||
mozilla::a11y::AccessibleOrProxy GetInternalObj(AtkObject* aObj);
|
||||
AtkObject* GetWrapperFor(mozilla::a11y::ProxyAccessible* aProxy);
|
||||
AtkObject* GetWrapperFor(mozilla::a11y::RemoteAccessible* aProxy);
|
||||
AtkObject* GetWrapperFor(mozilla::a11y::AccessibleOrProxy aObj);
|
||||
|
||||
extern int atkMajorVersion, atkMinorVersion, atkMicroVersion;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "nsIURI.h"
|
||||
#include "nsMaiHyperlink.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
|
@ -176,7 +176,7 @@ AtkObject* getObjectCB(AtkHyperlink* aLink, gint aLinkIndex) {
|
|||
return AccessibleWrap::GetAtkObject(anchor);
|
||||
}
|
||||
|
||||
ProxyAccessible* anchor = maiLink->Proxy()->AnchorAt(aLinkIndex);
|
||||
RemoteAccessible* anchor = maiLink->Proxy()->AnchorAt(aLinkIndex);
|
||||
return anchor ? GetWrapperFor(anchor) : nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class MaiHyperlink {
|
|||
return link;
|
||||
}
|
||||
|
||||
ProxyAccessible* Proxy() const { return mHyperlink.AsProxy(); }
|
||||
RemoteAccessible* Proxy() const { return mHyperlink.AsProxy(); }
|
||||
|
||||
protected:
|
||||
AccessibleOrProxy mHyperlink;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "nsMai.h"
|
||||
#include "Role.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "nsString.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
@ -23,7 +23,7 @@ static gboolean doActionCB(AtkAction* aAction, gint aActionIndex) {
|
|||
return accWrap->DoAction(aActionIndex);
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction));
|
||||
RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aAction));
|
||||
return proxy && proxy->DoAction(aActionIndex);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ static gint getActionCountCB(AtkAction* aAction) {
|
|||
return accWrap->ActionCount();
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction));
|
||||
RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aAction));
|
||||
return proxy ? proxy->ActionCount() : 0;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ static const gchar* getActionDescriptionCB(AtkAction* aAction,
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
|
||||
if (accWrap) {
|
||||
accWrap->ActionDescriptionAt(aActionIndex, description);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aAction))) {
|
||||
proxy->ActionDescriptionAt(aActionIndex, description);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
@ -57,7 +57,7 @@ static const gchar* getActionNameCB(AtkAction* aAction, gint aActionIndex) {
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
|
||||
if (accWrap) {
|
||||
accWrap->ActionNameAt(aActionIndex, autoStr);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aAction))) {
|
||||
proxy->ActionNameAt(aActionIndex, autoStr);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
@ -71,7 +71,7 @@ static const gchar* getKeyBindingCB(AtkAction* aAction, gint aActionIndex) {
|
|||
AccessibleWrap* acc = GetAccessibleWrap(ATK_OBJECT(aAction));
|
||||
if (acc) {
|
||||
AccessibleWrap::GetKeyBinding(acc, keyBindingsStr);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aAction))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aAction))) {
|
||||
proxy->AtkKeyBinding(keyBindingsStr);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "nsMai.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/a11y/DocAccessibleParent.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
#include "mozilla/dom/BrowserParent.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
@ -39,7 +39,7 @@ static gboolean grabFocusCB(AtkComponent* aComponent) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(atkObject);
|
||||
RemoteAccessible* proxy = GetProxy(atkObject);
|
||||
if (proxy) {
|
||||
proxy->TakeFocus();
|
||||
return TRUE;
|
||||
|
@ -57,7 +57,7 @@ static gboolean scrollToCB(AtkComponent* aComponent, AtkScrollType type) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(atkObject);
|
||||
RemoteAccessible* proxy = GetProxy(atkObject);
|
||||
if (proxy) {
|
||||
proxy->ScrollTo(type);
|
||||
return TRUE;
|
||||
|
@ -76,7 +76,7 @@ static gboolean scrollToPointCB(AtkComponent* aComponent, AtkCoordType coords,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(atkObject);
|
||||
RemoteAccessible* proxy = GetProxy(atkObject);
|
||||
if (proxy) {
|
||||
proxy->ScrollToPoint(coords, x, y);
|
||||
return TRUE;
|
||||
|
@ -162,7 +162,7 @@ void getExtentsHelper(AtkObject* aAtkObj, gint* aX, gint* aY, gint* aWidth,
|
|||
return;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
if (RemoteAccessible* proxy = GetProxy(aAtkObj)) {
|
||||
proxy->Extents(aCoordType == ATK_XY_WINDOW, aX, aY, aWidth, aHeight);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "AccessibleWrap.h"
|
||||
#include "DocAccessible.h"
|
||||
#include "nsMai.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
@ -46,7 +46,7 @@ const gchar* getDocumentLocaleCB(AtkDocument* aDocument) {
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aDocument));
|
||||
if (accWrap) {
|
||||
accWrap->Language(locale);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aDocument))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aDocument))) {
|
||||
proxy->Language(locale);
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ AtkAttributeSet* getDocumentAttributesCB(AtkDocument* aDocument) {
|
|||
document->URL(url);
|
||||
document->DocType(w3cDocType);
|
||||
document->MimeType(mimeType);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aDocument))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aDocument))) {
|
||||
proxy->URLDocTypeMimeType(url, w3cDocType, mimeType);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
@ -97,7 +97,7 @@ AtkAttributeSet* getDocumentAttributesCB(AtkDocument* aDocument) {
|
|||
|
||||
const gchar* getDocumentAttributeValueCB(AtkDocument* aDocument,
|
||||
const gchar* aAttrName) {
|
||||
ProxyAccessible* proxy = nullptr;
|
||||
RemoteAccessible* proxy = nullptr;
|
||||
DocAccessible* document = nullptr;
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aDocument));
|
||||
if (accWrap) {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "LocalAccessible-inl.h"
|
||||
#include "HyperTextAccessible-inl.h"
|
||||
#include "nsMai.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
|
@ -26,7 +26,7 @@ static void setTextContentsCB(AtkEditableText* aText, const gchar* aString) {
|
|||
|
||||
NS_ConvertUTF8toUTF16 strContent(aString);
|
||||
text->ReplaceText(strContent);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
NS_ConvertUTF8toUTF16 strContent(aString);
|
||||
proxy->ReplaceText(strContent);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ static void insertTextCB(AtkEditableText* aText, const gchar* aString,
|
|||
|
||||
NS_ConvertUTF8toUTF16 strContent(aString);
|
||||
text->InsertText(strContent, *aPosition);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
NS_ConvertUTF8toUTF16 strContent(aString);
|
||||
proxy->InsertText(strContent, *aPosition);
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ static void copyTextCB(AtkEditableText* aText, gint aStartPos, gint aEndPos) {
|
|||
}
|
||||
|
||||
text->CopyText(aStartPos, aEndPos);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
proxy->CopyText(aStartPos, aEndPos);
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ static void cutTextCB(AtkEditableText* aText, gint aStartPos, gint aEndPos) {
|
|||
}
|
||||
|
||||
text->CutText(aStartPos, aEndPos);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
proxy->CutText(aStartPos, aEndPos);
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ static void deleteTextCB(AtkEditableText* aText, gint aStartPos, gint aEndPos) {
|
|||
}
|
||||
|
||||
text->DeleteText(aStartPos, aEndPos);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
proxy->DeleteText(aStartPos, aEndPos);
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ static void pasteTextCB(AtkEditableText* aText, gint aPosition) {
|
|||
}
|
||||
|
||||
text->PasteText(aPosition);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
proxy->PasteText(aPosition);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "HyperTextAccessible.h"
|
||||
#include "nsMai.h"
|
||||
#include "nsMaiHyperlink.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
@ -30,8 +30,8 @@ static AtkHyperlink* getLinkCB(AtkHypertext* aText, gint aLinkIndex) {
|
|||
}
|
||||
|
||||
atkHyperLink = AccessibleWrap::GetAtkObject(hyperLink);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
ProxyAccessible* proxyLink = proxy->LinkAt(aLinkIndex);
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
RemoteAccessible* proxyLink = proxy->LinkAt(aLinkIndex);
|
||||
if (!proxyLink) return nullptr;
|
||||
|
||||
atkHyperLink = GetWrapperFor(proxyLink);
|
||||
|
@ -49,7 +49,7 @@ static gint getLinkCountCB(AtkHypertext* aText) {
|
|||
return hyperText->LinkCount();
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return proxy->LinkCount();
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ static gint getLinkIndexCB(AtkHypertext* aText, gint aCharIndex) {
|
|||
return hyperText->LinkIndexAtOffset(aCharIndex);
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return proxy->LinkIndexAtOffset(aCharIndex);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "mozilla/Likely.h"
|
||||
#include "nsMai.h"
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
|
@ -31,7 +31,7 @@ static void getImagePositionCB(AtkImage* aImage, gint* aAccX, gint* aAccY,
|
|||
if (accWrap && accWrap->IsImage()) {
|
||||
ImageAccessible* image = accWrap->AsImage();
|
||||
pos = image->Position(geckoCoordType);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aImage))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aImage))) {
|
||||
pos = proxy->ImagePosition(geckoCoordType);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ static void getImageSizeCB(AtkImage* aImage, gint* aAccWidth,
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aImage));
|
||||
if (accWrap && accWrap->IsImage()) {
|
||||
size = accWrap->AsImage()->Size();
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aImage))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aImage))) {
|
||||
size = proxy->ImageSize();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "LocalAccessible-inl.h"
|
||||
#include "AccessibleWrap.h"
|
||||
#include "nsMai.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
#include <atk/atk.h>
|
||||
|
@ -24,7 +24,7 @@ static gboolean addSelectionCB(AtkSelection* aSelection, gint i) {
|
|||
return accWrap->AddItemToSelection(i);
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
return proxy->AddItemToSelection(i);
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ static gboolean clearSelectionCB(AtkSelection* aSelection) {
|
|||
return accWrap->UnselectAll();
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
return proxy->UnselectAll();
|
||||
}
|
||||
|
||||
|
@ -54,8 +54,8 @@ static AtkObject* refSelectionCB(AtkSelection* aSelection, gint i) {
|
|||
}
|
||||
|
||||
atkObj = AccessibleWrap::GetAtkObject(selectedItem);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
ProxyAccessible* selectedItem = proxy->GetSelectedItem(i);
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
RemoteAccessible* selectedItem = proxy->GetSelectedItem(i);
|
||||
if (selectedItem) {
|
||||
atkObj = GetWrapperFor(selectedItem);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ static gint getSelectionCountCB(AtkSelection* aSelection) {
|
|||
return accWrap->SelectedItemCount();
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
return proxy->SelectedItemCount();
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ static gboolean isChildSelectedCB(AtkSelection* aSelection, gint i) {
|
|||
return accWrap->IsItemSelected(i);
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
return proxy->IsItemSelected(i);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ static gboolean removeSelectionCB(AtkSelection* aSelection, gint i) {
|
|||
return accWrap->RemoveItemFromSelection(i);
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
return proxy->RemoveItemFromSelection(i);
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ static gboolean selectAllSelectionCB(AtkSelection* aSelection) {
|
|||
return accWrap->SelectAll();
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aSelection))) {
|
||||
return proxy->SelectAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "TableAccessible.h"
|
||||
#include "TableCellAccessible.h"
|
||||
#include "nsMai.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "nsArrayUtils.h"
|
||||
|
||||
#include "mozilla/Likely.h"
|
||||
|
@ -34,8 +34,8 @@ static AtkObject* refAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
|
|||
}
|
||||
|
||||
cellAtkObj = AccessibleWrap::GetAtkObject(cell);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
ProxyAccessible* cell = proxy->TableCellAt(aRowIdx, aColIdx);
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
RemoteAccessible* cell = proxy->TableCellAt(aRowIdx, aColIdx);
|
||||
if (!cell) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ static gint getIndexAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
|
|||
return static_cast<gint>(accWrap->AsTable()->CellIndexAt(aRowIdx, aColIdx));
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gint>(proxy->TableCellIndexAt(aRowIdx, aColIdx));
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ static gint getColumnAtIndexCB(AtkTable* aTable, gint aIdx) {
|
|||
return static_cast<gint>(accWrap->AsTable()->ColIndexAt(aIdx));
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gint>(proxy->TableColumnIndexAt(aIdx));
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ static gint getRowAtIndexCB(AtkTable* aTable, gint aIdx) {
|
|||
return static_cast<gint>(accWrap->AsTable()->RowIndexAt(aIdx));
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gint>(proxy->TableRowIndexAt(aIdx));
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ static gint getColumnCountCB(AtkTable* aTable) {
|
|||
return static_cast<gint>(accWrap->AsTable()->ColCount());
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gint>(proxy->TableColumnCount());
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ static gint getRowCountCB(AtkTable* aTable) {
|
|||
return static_cast<gint>(accWrap->AsTable()->RowCount());
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gint>(proxy->TableRowCount());
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ static gint getColumnExtentAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
|
|||
return static_cast<gint>(accWrap->AsTable()->ColExtentAt(aRowIdx, aColIdx));
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gint>(proxy->TableColumnExtentAt(aRowIdx, aColIdx));
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ static gint getRowExtentAtCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
|
|||
return static_cast<gint>(accWrap->AsTable()->RowExtentAt(aRowIdx, aColIdx));
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gint>(proxy->TableRowExtentAt(aRowIdx, aColIdx));
|
||||
}
|
||||
|
||||
|
@ -164,8 +164,8 @@ static AtkObject* getCaptionCB(AtkTable* aTable) {
|
|||
return caption ? AccessibleWrap::GetAtkObject(caption) : nullptr;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
ProxyAccessible* caption = proxy->TableCaption();
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
RemoteAccessible* caption = proxy->TableCaption();
|
||||
return caption ? GetWrapperFor(caption) : nullptr;
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ static const gchar* getColumnDescriptionCB(AtkTable* aTable, gint aColumn) {
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
|
||||
if (accWrap) {
|
||||
accWrap->AsTable()->ColDescription(aColumn, autoStr);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
proxy->TableColumnDescription(aColumn, autoStr);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
@ -194,8 +194,8 @@ static AtkObject* getColumnHeaderCB(AtkTable* aTable, gint aColIdx) {
|
|||
return header ? AccessibleWrap::GetAtkObject(header) : nullptr;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
ProxyAccessible* header = proxy->AtkTableColumnHeader(aColIdx);
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
RemoteAccessible* header = proxy->AtkTableColumnHeader(aColIdx);
|
||||
return header ? GetWrapperFor(header) : nullptr;
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ static const gchar* getRowDescriptionCB(AtkTable* aTable, gint aRow) {
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
|
||||
if (accWrap) {
|
||||
accWrap->AsTable()->RowDescription(aRow, autoStr);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
proxy->TableRowDescription(aRow, autoStr);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
@ -224,8 +224,8 @@ static AtkObject* getRowHeaderCB(AtkTable* aTable, gint aRowIdx) {
|
|||
return header ? AccessibleWrap::GetAtkObject(header) : nullptr;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
ProxyAccessible* header = proxy->AtkTableRowHeader(aRowIdx);
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
RemoteAccessible* header = proxy->AtkTableRowHeader(aRowIdx);
|
||||
return header ? GetWrapperFor(header) : nullptr;
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ static gint getSelectedColumnsCB(AtkTable* aTable, gint** aSelected) {
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
|
||||
if (accWrap) {
|
||||
accWrap->AsTable()->SelectedColIndices(&cols);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
proxy->TableSelectedColumnIndices(&cols);
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -271,7 +271,7 @@ static gint getSelectedRowsCB(AtkTable* aTable, gint** aSelected) {
|
|||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable));
|
||||
if (accWrap) {
|
||||
accWrap->AsTable()->SelectedRowIndices(&rows);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
proxy->TableSelectedRowIndices(&rows);
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -293,7 +293,7 @@ static gboolean isColumnSelectedCB(AtkTable* aTable, gint aColIdx) {
|
|||
if (accWrap) {
|
||||
return static_cast<gboolean>(accWrap->AsTable()->IsColSelected(aColIdx));
|
||||
}
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gboolean>(proxy->TableColumnSelected(aColIdx));
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,7 @@ static gboolean isRowSelectedCB(AtkTable* aTable, gint aRowIdx) {
|
|||
if (accWrap) {
|
||||
return static_cast<gboolean>(accWrap->AsTable()->IsRowSelected(aRowIdx));
|
||||
}
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gboolean>(proxy->TableRowSelected(aRowIdx));
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,7 @@ static gboolean isCellSelectedCB(AtkTable* aTable, gint aRowIdx, gint aColIdx) {
|
|||
return static_cast<gboolean>(
|
||||
accWrap->AsTable()->IsCellSelected(aRowIdx, aColIdx));
|
||||
}
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTable))) {
|
||||
return static_cast<gboolean>(proxy->TableCellSelected(aRowIdx, aColIdx));
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "TableAccessible.h"
|
||||
#include "TableCellAccessible.h"
|
||||
#include "nsMai.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "nsArrayUtils.h"
|
||||
|
||||
#include "mozilla/Likely.h"
|
||||
|
@ -26,7 +26,7 @@ static gint GetColumnSpanCB(AtkTableCell* aCell) {
|
|||
return accWrap->AsTableCell()->ColExtent();
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
return proxy->ColExtent();
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ static gboolean GetRowSpanCB(AtkTableCell* aCell) {
|
|||
return accWrap->AsTableCell()->RowExtent();
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
return proxy->RowExtent();
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ static gboolean GetPositionCB(AtkTableCell* aCell, gint* aRow, gint* aCol) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
uint32_t rowIdx = 0, colIdx = 0;
|
||||
proxy->GetPosition(&rowIdx, &colIdx);
|
||||
*aCol = colIdx;
|
||||
|
@ -82,7 +82,7 @@ static gboolean GetColumnRowSpanCB(AtkTableCell* aCell, gint* aCol, gint* aRow,
|
|||
return true;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
uint32_t colIdx = 0, rowIdx = 0, colExtent = 0, rowExtent = 0;
|
||||
proxy->GetColRowExtents(&colIdx, &rowIdx, &colExtent, &rowExtent);
|
||||
*aCol = colIdx;
|
||||
|
@ -107,8 +107,8 @@ static AtkObject* GetTableCB(AtkTableCell* aTableCell) {
|
|||
return tableAcc ? AccessibleWrap::GetAtkObject(tableAcc) : nullptr;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aTableCell))) {
|
||||
ProxyAccessible* table = proxy->TableOfACell();
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aTableCell))) {
|
||||
RemoteAccessible* table = proxy->TableOfACell();
|
||||
return table ? GetWrapperFor(table) : nullptr;
|
||||
}
|
||||
|
||||
|
@ -133,15 +133,15 @@ static GPtrArray* GetColumnHeaderCellsCB(AtkTableCell* aCell) {
|
|||
return atkHeaders;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
AutoTArray<ProxyAccessible*, 10> headers;
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
AutoTArray<RemoteAccessible*, 10> headers;
|
||||
proxy->ColHeaderCells(&headers);
|
||||
if (headers.IsEmpty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GPtrArray* atkHeaders = g_ptr_array_sized_new(headers.Length());
|
||||
for (ProxyAccessible* header : headers) {
|
||||
for (RemoteAccessible* header : headers) {
|
||||
AtkObject* atkHeader = GetWrapperFor(header);
|
||||
g_object_ref(atkHeader);
|
||||
g_ptr_array_add(atkHeaders, atkHeader);
|
||||
|
@ -171,15 +171,15 @@ static GPtrArray* GetRowHeaderCellsCB(AtkTableCell* aCell) {
|
|||
return atkHeaders;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
AutoTArray<ProxyAccessible*, 10> headers;
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
|
||||
AutoTArray<RemoteAccessible*, 10> headers;
|
||||
proxy->RowHeaderCells(&headers);
|
||||
if (headers.IsEmpty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GPtrArray* atkHeaders = g_ptr_array_sized_new(headers.Length());
|
||||
for (ProxyAccessible* header : headers) {
|
||||
for (RemoteAccessible* header : headers) {
|
||||
AtkObject* atkHeader = GetWrapperFor(header);
|
||||
g_object_ref(atkHeader);
|
||||
g_ptr_array_add(atkHeaders, atkHeader);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "LocalAccessible-inl.h"
|
||||
#include "HyperTextAccessible-inl.h"
|
||||
#include "nsMai.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
|
@ -143,7 +143,7 @@ static gchar* getTextCB(AtkText* aText, gint aStartOffset, gint aEndOffset) {
|
|||
? DOMtoATK::AtkStringConvertFlags::ConvertTextToAsterisks
|
||||
: DOMtoATK::AtkStringConvertFlags::None);
|
||||
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return DOMtoATK::NewATKString(proxy, aStartOffset, aEndOffset,
|
||||
DOMtoATK::AtkStringConvertFlags::None);
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ static gchar* getTextAfterOffsetCB(AtkText* aText, gint aOffset,
|
|||
text->TextAfterOffset(aOffset, aBoundaryType, &startOffset, &endOffset,
|
||||
autoStr);
|
||||
ConvertTexttoAsterisks(accWrap, autoStr);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
proxy->GetTextAfterOffset(aOffset, aBoundaryType, autoStr, &startOffset,
|
||||
&endOffset);
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ static gchar* getTextAtOffsetCB(AtkText* aText, gint aOffset,
|
|||
text->TextAtOffset(aOffset, aBoundaryType, &startOffset, &endOffset,
|
||||
autoStr);
|
||||
ConvertTexttoAsterisks(accWrap, autoStr);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
proxy->GetTextAtOffset(aOffset, aBoundaryType, autoStr, &startOffset,
|
||||
&endOffset);
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ static gunichar getCharacterAtOffsetCB(AtkText* aText, gint aOffset) {
|
|||
return DOMtoATK::ATKCharacter(text, aOffset);
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return DOMtoATK::ATKCharacter(proxy, aOffset);
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ static gchar* getTextBeforeOffsetCB(AtkText* aText, gint aOffset,
|
|||
text->TextBeforeOffset(aOffset, aBoundaryType, &startOffset, &endOffset,
|
||||
autoStr);
|
||||
ConvertTexttoAsterisks(accWrap, autoStr);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
proxy->GetTextBeforeOffset(aOffset, aBoundaryType, autoStr, &startOffset,
|
||||
&endOffset);
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ static gint getCaretOffsetCB(AtkText* aText) {
|
|||
return static_cast<gint>(text->CaretOffset());
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return static_cast<gint>(proxy->CaretOffset());
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ static AtkAttributeSet* getRunAttributesCB(AtkText* aText, gint aOffset,
|
|||
return ConvertToAtkTextAttributeSet(attributes);
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText));
|
||||
RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText));
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ static AtkAttributeSet* getDefaultAttributesCB(AtkText* aText) {
|
|||
return ConvertToAtkTextAttributeSet(attributes);
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText));
|
||||
RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText));
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -382,7 +382,7 @@ static void getCharacterExtentsCB(AtkText* aText, gint aOffset, gint* aX,
|
|||
}
|
||||
|
||||
rect = text->CharBounds(aOffset, geckoCoordType);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
rect = proxy->CharBounds(aOffset, geckoCoordType);
|
||||
} else {
|
||||
return;
|
||||
|
@ -418,7 +418,7 @@ static void getRangeExtentsCB(AtkText* aText, gint aStartOffset,
|
|||
}
|
||||
|
||||
rect = text->TextBounds(aStartOffset, aEndOffset, geckoCoordType);
|
||||
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
} else if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
rect = proxy->TextBounds(aStartOffset, aEndOffset, geckoCoordType);
|
||||
} else {
|
||||
return;
|
||||
|
@ -439,7 +439,7 @@ static gint getCharacterCountCB(AtkText* aText) {
|
|||
: static_cast<gint>(textAcc->CharacterCount());
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return proxy->CharacterCount();
|
||||
}
|
||||
|
||||
|
@ -462,7 +462,7 @@ static gint getOffsetAtPointCB(AtkText* aText, gint aX, gint aY,
|
|||
: nsIAccessibleCoordinateType::COORDTYPE_WINDOW_RELATIVE)));
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return static_cast<gint>(proxy->OffsetAtPoint(
|
||||
aX, aY,
|
||||
(aCoords == ATK_XY_SCREEN
|
||||
|
@ -484,7 +484,7 @@ static gint getTextSelectionCountCB(AtkText* aText) {
|
|||
return text->SelectionCount();
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return proxy->SelectionCount();
|
||||
}
|
||||
|
||||
|
@ -507,7 +507,7 @@ static gchar* getTextSelectionCB(AtkText* aText, gint aSelectionNum,
|
|||
|
||||
return getTextCB(aText, *aStartOffset, *aEndOffset);
|
||||
}
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
nsString data;
|
||||
proxy->SelectionBoundsAt(aSelectionNum, data, &startOffset, &endOffset);
|
||||
*aStartOffset = startOffset;
|
||||
|
@ -531,7 +531,7 @@ static gboolean addTextSelectionCB(AtkText* aText, gint aStartOffset,
|
|||
|
||||
return text->AddToSelection(aStartOffset, aEndOffset);
|
||||
}
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return proxy->AddToSelection(aStartOffset, aEndOffset);
|
||||
}
|
||||
|
||||
|
@ -548,7 +548,7 @@ static gboolean removeTextSelectionCB(AtkText* aText, gint aSelectionNum) {
|
|||
|
||||
return text->RemoveFromSelection(aSelectionNum);
|
||||
}
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return proxy->RemoveFromSelection(aSelectionNum);
|
||||
}
|
||||
|
||||
|
@ -566,7 +566,7 @@ static gboolean setTextSelectionCB(AtkText* aText, gint aSelectionNum,
|
|||
|
||||
return text->SetSelectionBoundsAt(aSelectionNum, aStartOffset, aEndOffset);
|
||||
}
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
return proxy->SetSelectionBoundsAt(aSelectionNum, aStartOffset, aEndOffset);
|
||||
}
|
||||
|
||||
|
@ -585,7 +585,7 @@ static gboolean setCaretOffsetCB(AtkText* aText, gint aOffset) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
if (RemoteAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
|
||||
proxy->SetCaretOffset(aOffset);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -607,7 +607,7 @@ static gboolean scrollSubstringToCB(AtkText* aText, gint aStartOffset,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(atkObject);
|
||||
RemoteAccessible* proxy = GetProxy(atkObject);
|
||||
if (proxy) {
|
||||
proxy->ScrollSubstringTo(aStartOffset, aEndOffset, aType);
|
||||
return TRUE;
|
||||
|
@ -631,7 +631,7 @@ static gboolean scrollSubstringToPointCB(AtkText* aText, gint aStartOffset,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetProxy(atkObject);
|
||||
RemoteAccessible* proxy = GetProxy(atkObject);
|
||||
if (proxy) {
|
||||
proxy->ScrollSubstringToPoint(aStartOffset, aEndOffset, aCoords, aX, aY);
|
||||
return TRUE;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "AccessibleWrap.h"
|
||||
#include "nsMai.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
|
@ -18,7 +18,7 @@ using namespace mozilla::a11y;
|
|||
extern "C" {
|
||||
|
||||
static void getCurrentValueCB(AtkValue* obj, GValue* value) {
|
||||
ProxyAccessible* proxy = nullptr;
|
||||
RemoteAccessible* proxy = nullptr;
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(obj));
|
||||
if (!accWrap) {
|
||||
proxy = GetProxy(ATK_OBJECT(obj));
|
||||
|
@ -36,7 +36,7 @@ static void getCurrentValueCB(AtkValue* obj, GValue* value) {
|
|||
}
|
||||
|
||||
static void getMaximumValueCB(AtkValue* obj, GValue* value) {
|
||||
ProxyAccessible* proxy = nullptr;
|
||||
RemoteAccessible* proxy = nullptr;
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(obj));
|
||||
if (!accWrap) {
|
||||
proxy = GetProxy(ATK_OBJECT(obj));
|
||||
|
@ -54,7 +54,7 @@ static void getMaximumValueCB(AtkValue* obj, GValue* value) {
|
|||
}
|
||||
|
||||
static void getMinimumValueCB(AtkValue* obj, GValue* value) {
|
||||
ProxyAccessible* proxy = nullptr;
|
||||
RemoteAccessible* proxy = nullptr;
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(obj));
|
||||
if (!accWrap) {
|
||||
proxy = GetProxy(ATK_OBJECT(obj));
|
||||
|
@ -72,7 +72,7 @@ static void getMinimumValueCB(AtkValue* obj, GValue* value) {
|
|||
}
|
||||
|
||||
static void getMinimumIncrementCB(AtkValue* obj, GValue* minimumIncrement) {
|
||||
ProxyAccessible* proxy = nullptr;
|
||||
RemoteAccessible* proxy = nullptr;
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(obj));
|
||||
if (!accWrap) {
|
||||
proxy = GetProxy(ATK_OBJECT(obj));
|
||||
|
@ -92,7 +92,7 @@ static void getMinimumIncrementCB(AtkValue* obj, GValue* minimumIncrement) {
|
|||
}
|
||||
|
||||
static gboolean setCurrentValueCB(AtkValue* obj, const GValue* value) {
|
||||
ProxyAccessible* proxy = nullptr;
|
||||
RemoteAccessible* proxy = nullptr;
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(obj));
|
||||
if (!accWrap) {
|
||||
proxy = GetProxy(ATK_OBJECT(obj));
|
||||
|
|
|
@ -16,7 +16,7 @@ int32_t AccessibleOrProxy::IndexInParent() const {
|
|||
return AsAccessible()->IndexInParent();
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = AsProxy();
|
||||
RemoteAccessible* proxy = AsProxy();
|
||||
if (!proxy) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -38,12 +38,12 @@ AccessibleOrProxy AccessibleOrProxy::Parent() const {
|
|||
return AsAccessible()->LocalParent();
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = AsProxy();
|
||||
RemoteAccessible* proxy = AsProxy();
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (ProxyAccessible* parent = proxy->RemoteParent()) {
|
||||
if (RemoteAccessible* parent = proxy->RemoteParent()) {
|
||||
return parent;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ AccessibleOrProxy AccessibleOrProxy::ChildAtPoint(
|
|||
if (IsProxy()) {
|
||||
return AsProxy()->ChildAtPoint(aX, aY, aWhichChild);
|
||||
}
|
||||
ProxyAccessible* childDoc = RemoteChildDoc();
|
||||
RemoteAccessible* childDoc = RemoteChildDoc();
|
||||
if (childDoc) {
|
||||
// This is an OuterDocAccessible.
|
||||
nsIntRect docRect = AsAccessible()->Bounds();
|
||||
|
@ -75,13 +75,13 @@ AccessibleOrProxy AccessibleOrProxy::ChildAtPoint(
|
|||
childDoc = target.RemoteChildDoc();
|
||||
if (childDoc) {
|
||||
// LocalAccessible::ChildAtPoint stopped at an OuterDocAccessible, since it
|
||||
// can't traverse into ProxyAccessibles. Continue the search from childDoc.
|
||||
// can't traverse into RemoteAccessibles. Continue the search from childDoc.
|
||||
return childDoc->ChildAtPoint(aX, aY, aWhichChild);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
ProxyAccessible* AccessibleOrProxy::RemoteChildDoc() const {
|
||||
RemoteAccessible* AccessibleOrProxy::RemoteChildDoc() const {
|
||||
MOZ_ASSERT(!IsNull());
|
||||
if (IsProxy()) {
|
||||
return nullptr;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define mozilla_a11y_AccessibleOrProxy_h
|
||||
|
||||
#include "mozilla/a11y/LocalAccessible.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
@ -17,22 +17,22 @@ namespace mozilla {
|
|||
namespace a11y {
|
||||
|
||||
/**
|
||||
* This class stores a LocalAccessible* or a ProxyAccessible* in a safe manner
|
||||
* This class stores a LocalAccessible* or a RemoteAccessible* in a safe manner
|
||||
* with size sizeof(void*).
|
||||
*/
|
||||
class AccessibleOrProxy {
|
||||
public:
|
||||
MOZ_IMPLICIT AccessibleOrProxy(LocalAccessible* aAcc)
|
||||
: mBits(reinterpret_cast<uintptr_t>(aAcc)) {}
|
||||
MOZ_IMPLICIT AccessibleOrProxy(ProxyAccessible* aProxy)
|
||||
MOZ_IMPLICIT AccessibleOrProxy(RemoteAccessible* aProxy)
|
||||
: mBits(aProxy ? (reinterpret_cast<uintptr_t>(aProxy) | IS_PROXY) : 0) {}
|
||||
MOZ_IMPLICIT AccessibleOrProxy(decltype(nullptr)) : mBits(0) {}
|
||||
MOZ_IMPLICIT AccessibleOrProxy() : mBits(0) {}
|
||||
|
||||
bool IsProxy() const { return mBits & IS_PROXY; }
|
||||
ProxyAccessible* AsProxy() const {
|
||||
RemoteAccessible* AsProxy() const {
|
||||
if (IsProxy()) {
|
||||
return reinterpret_cast<ProxyAccessible*>(mBits & ~IS_PROXY);
|
||||
return reinterpret_cast<RemoteAccessible*>(mBits & ~IS_PROXY);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
@ -75,7 +75,7 @@ class AccessibleOrProxy {
|
|||
return AsProxy()->RemoteChildAt(aIdx);
|
||||
}
|
||||
|
||||
ProxyAccessible* childDoc = RemoteChildDoc();
|
||||
RemoteAccessible* childDoc = RemoteChildDoc();
|
||||
if (childDoc && aIdx == 0) {
|
||||
return childDoc;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ class AccessibleOrProxy {
|
|||
return AsProxy()->RemoteFirstChild();
|
||||
}
|
||||
|
||||
ProxyAccessible* childDoc = RemoteChildDoc();
|
||||
RemoteAccessible* childDoc = RemoteChildDoc();
|
||||
if (childDoc) {
|
||||
return childDoc;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class AccessibleOrProxy {
|
|||
return AsProxy()->RemoteLastChild();
|
||||
}
|
||||
|
||||
ProxyAccessible* childDoc = RemoteChildDoc();
|
||||
RemoteAccessible* childDoc = RemoteChildDoc();
|
||||
if (childDoc) {
|
||||
return childDoc;
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ class AccessibleOrProxy {
|
|||
/**
|
||||
* If this is an OuterDocAccessible, return the remote child document.
|
||||
*/
|
||||
ProxyAccessible* RemoteChildDoc() const;
|
||||
RemoteAccessible* RemoteChildDoc() const;
|
||||
|
||||
uintptr_t mBits;
|
||||
static const uintptr_t IS_PROXY = 0x1;
|
||||
|
|
|
@ -103,8 +103,8 @@ class PivotRoleRule : public PivotRule {
|
|||
};
|
||||
|
||||
/**
|
||||
* This rule matches any local LocalAccessible (i.e. not ProxyAccessible) in the
|
||||
* same document as the anchor. That is, it includes any descendant
|
||||
* This rule matches any local LocalAccessible (i.e. not RemoteAccessible) in
|
||||
* the same document as the anchor. That is, it includes any descendant
|
||||
* OuterDocAccessible, but not its descendants.
|
||||
*/
|
||||
class LocalAccInSameDocRule : public PivotRule {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
class ProxyAccessible;
|
||||
class RemoteAccessible;
|
||||
|
||||
enum EPlatformDisabledState {
|
||||
ePlatformIsForceEnabled = -1,
|
||||
|
@ -82,63 +82,63 @@ void PlatformInit();
|
|||
void PlatformShutdown();
|
||||
|
||||
/**
|
||||
* called when a new ProxyAccessible is created, so the platform may setup a
|
||||
* called when a new RemoteAccessible is created, so the platform may setup a
|
||||
* wrapper for it, or take other action.
|
||||
*/
|
||||
void ProxyCreated(ProxyAccessible* aProxy, uint32_t aInterfaces);
|
||||
void ProxyCreated(RemoteAccessible* aProxy, uint32_t aInterfaces);
|
||||
|
||||
/**
|
||||
* Called just before a ProxyAccessible is destroyed so its wrapper can be
|
||||
* Called just before a RemoteAccessible is destroyed so its wrapper can be
|
||||
* disposed of and other action taken.
|
||||
*/
|
||||
void ProxyDestroyed(ProxyAccessible*);
|
||||
void ProxyDestroyed(RemoteAccessible*);
|
||||
|
||||
/**
|
||||
* Callied when an event is fired on a proxied accessible.
|
||||
*/
|
||||
void ProxyEvent(ProxyAccessible* aTarget, uint32_t aEventType);
|
||||
void ProxyStateChangeEvent(ProxyAccessible* aTarget, uint64_t aState,
|
||||
void ProxyEvent(RemoteAccessible* aTarget, uint32_t aEventType);
|
||||
void ProxyStateChangeEvent(RemoteAccessible* aTarget, uint64_t aState,
|
||||
bool aEnabled);
|
||||
|
||||
#if defined(XP_WIN)
|
||||
void ProxyFocusEvent(ProxyAccessible* aTarget,
|
||||
void ProxyFocusEvent(RemoteAccessible* aTarget,
|
||||
const LayoutDeviceIntRect& aCaretRect);
|
||||
void ProxyCaretMoveEvent(ProxyAccessible* aTarget,
|
||||
void ProxyCaretMoveEvent(RemoteAccessible* aTarget,
|
||||
const LayoutDeviceIntRect& aCaretRect);
|
||||
#else
|
||||
void ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset,
|
||||
void ProxyCaretMoveEvent(RemoteAccessible* aTarget, int32_t aOffset,
|
||||
bool aIsSelectionCollapsed);
|
||||
#endif
|
||||
void ProxyTextChangeEvent(ProxyAccessible* aTarget, const nsString& aStr,
|
||||
void ProxyTextChangeEvent(RemoteAccessible* aTarget, const nsString& aStr,
|
||||
int32_t aStart, uint32_t aLen, bool aIsInsert,
|
||||
bool aFromUser);
|
||||
void ProxyShowHideEvent(ProxyAccessible* aTarget, ProxyAccessible* aParent,
|
||||
void ProxyShowHideEvent(RemoteAccessible* aTarget, RemoteAccessible* aParent,
|
||||
bool aInsert, bool aFromUser);
|
||||
void ProxySelectionEvent(ProxyAccessible* aTarget, ProxyAccessible* aWidget,
|
||||
void ProxySelectionEvent(RemoteAccessible* aTarget, RemoteAccessible* aWidget,
|
||||
uint32_t aType);
|
||||
|
||||
#if defined(ANDROID)
|
||||
MOZ_CAN_RUN_SCRIPT
|
||||
void ProxyVirtualCursorChangeEvent(ProxyAccessible* aTarget,
|
||||
ProxyAccessible* aOldPosition,
|
||||
void ProxyVirtualCursorChangeEvent(RemoteAccessible* aTarget,
|
||||
RemoteAccessible* aOldPosition,
|
||||
int32_t aOldStartOffset,
|
||||
int32_t aOldEndOffset,
|
||||
ProxyAccessible* aNewPosition,
|
||||
RemoteAccessible* aNewPosition,
|
||||
int32_t aNewStartOffset,
|
||||
int32_t aNewEndOffset, int16_t aReason,
|
||||
int16_t aBoundaryType, bool aFromUser);
|
||||
|
||||
void ProxyScrollingEvent(ProxyAccessible* aTarget, uint32_t aEventType,
|
||||
void ProxyScrollingEvent(RemoteAccessible* aTarget, uint32_t aEventType,
|
||||
uint32_t aScrollX, uint32_t aScrollY,
|
||||
uint32_t aMaxScrollX, uint32_t aMaxScrollY);
|
||||
|
||||
void ProxyAnnouncementEvent(ProxyAccessible* aTarget,
|
||||
void ProxyAnnouncementEvent(RemoteAccessible* aTarget,
|
||||
const nsString& aAnnouncement, uint16_t aPriority);
|
||||
|
||||
class BatchData;
|
||||
|
||||
void ProxyBatch(ProxyAccessible* aDocument, const uint64_t aBatchType,
|
||||
const nsTArray<ProxyAccessible*>& aAccessibles,
|
||||
void ProxyBatch(RemoteAccessible* aDocument, const uint64_t aBatchType,
|
||||
const nsTArray<RemoteAccessible*>& aAccessibles,
|
||||
const nsTArray<BatchData>& aData);
|
||||
|
||||
bool LocalizeString(
|
||||
|
@ -148,10 +148,10 @@ bool LocalizeString(
|
|||
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
class TextRangeData;
|
||||
void ProxyTextSelectionChangeEvent(ProxyAccessible* aTarget,
|
||||
void ProxyTextSelectionChangeEvent(RemoteAccessible* aTarget,
|
||||
const nsTArray<TextRangeData>& aSelection);
|
||||
|
||||
void ProxyRoleChangedEvent(ProxyAccessible* aTarget, const a11y::role& aRole);
|
||||
void ProxyRoleChangedEvent(RemoteAccessible* aTarget, const a11y::role& aRole);
|
||||
#endif
|
||||
|
||||
} // namespace a11y
|
||||
|
|
|
@ -44,7 +44,7 @@ class HyperTextAccessible;
|
|||
class ImageAccessible;
|
||||
class KeyBinding;
|
||||
class OuterDocAccessible;
|
||||
class ProxyAccessible;
|
||||
class RemoteAccessible;
|
||||
class Relation;
|
||||
class RootAccessible;
|
||||
class TableAccessible;
|
||||
|
@ -604,7 +604,7 @@ class LocalAccessible : public nsISupports {
|
|||
bool IsMenuPopup() const { return mType == eMenuPopupType; }
|
||||
|
||||
bool IsProxy() const { return mType == eProxyType; }
|
||||
ProxyAccessible* Proxy() const {
|
||||
RemoteAccessible* Proxy() const {
|
||||
MOZ_ASSERT(IsProxy());
|
||||
return mBits.proxy;
|
||||
}
|
||||
|
@ -1210,7 +1210,7 @@ class LocalAccessible : public nsISupports {
|
|||
|
||||
union {
|
||||
AccGroupInfo* groupInfo;
|
||||
ProxyAccessible* proxy;
|
||||
RemoteAccessible* proxy;
|
||||
} mutable mBits;
|
||||
friend class AccGroupInfo;
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ bool OuterDocAccessible::IsAcceptableChild(nsIContent* aEl) const {
|
|||
#if defined(XP_WIN)
|
||||
|
||||
LocalAccessible* OuterDocAccessible::RemoteChildDocAccessible() const {
|
||||
ProxyAccessible* docProxy = RemoteChildDoc();
|
||||
RemoteAccessible* docProxy = RemoteChildDoc();
|
||||
if (docProxy) {
|
||||
// We're in the parent process, but we're embedding a remote document.
|
||||
return WrapperFor(docProxy);
|
||||
|
|
|
@ -707,7 +707,7 @@ void RootAccessible::HandleTreeInvalidatedEvent(
|
|||
}
|
||||
#endif
|
||||
|
||||
ProxyAccessible* RootAccessible::GetPrimaryRemoteTopLevelContentDoc() const {
|
||||
RemoteAccessible* RootAccessible::GetPrimaryRemoteTopLevelContentDoc() const {
|
||||
nsCOMPtr<nsIDocShellTreeOwner> owner;
|
||||
mDocumentNode->GetDocShell()->GetTreeOwner(getter_AddRefs(owner));
|
||||
NS_ENSURE_TRUE(owner, nullptr);
|
||||
|
|
|
@ -42,7 +42,7 @@ class RootAccessible : public DocAccessibleWrap, public nsIDOMEventListener {
|
|||
/**
|
||||
* Return the primary remote top level document if any.
|
||||
*/
|
||||
ProxyAccessible* GetPrimaryRemoteTopLevelContentDoc() const;
|
||||
RemoteAccessible* GetPrimaryRemoteTopLevelContentDoc() const;
|
||||
|
||||
protected:
|
||||
virtual ~RootAccessible();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/a11y/DocAccessibleChildBase.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
|
||||
#include "LocalAccessible-inl.h"
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvShowEvent(
|
|||
return IPC_FAIL(this, "No children being added");
|
||||
}
|
||||
|
||||
ProxyAccessible* parent = GetAccessible(aData.ID());
|
||||
RemoteAccessible* parent = GetAccessible(aData.ID());
|
||||
|
||||
// XXX This should really never happen, but sometimes we fail to fire the
|
||||
// required show events.
|
||||
|
@ -98,7 +98,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvShowEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* target = parent->RemoteChildAt(newChildIdx);
|
||||
RemoteAccessible* target = parent->RemoteChildAt(newChildIdx);
|
||||
ProxyShowHideEvent(target, parent, true, aFromUser);
|
||||
|
||||
if (!nsCoreUtils::AccEventObserversExist()) {
|
||||
|
@ -117,7 +117,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvShowEvent(
|
|||
}
|
||||
|
||||
uint32_t DocAccessibleParent::AddSubtree(
|
||||
ProxyAccessible* aParent, const nsTArray<a11y::AccessibleData>& aNewTree,
|
||||
RemoteAccessible* aParent, const nsTArray<a11y::AccessibleData>& aNewTree,
|
||||
uint32_t aIdx, uint32_t aIdxInParent) {
|
||||
if (aNewTree.Length() <= aIdx) {
|
||||
NS_ERROR("bad index in serialized tree!");
|
||||
|
@ -131,7 +131,7 @@ uint32_t DocAccessibleParent::AddSubtree(
|
|||
return 0;
|
||||
}
|
||||
|
||||
ProxyAccessible* newProxy = new ProxyAccessible(
|
||||
RemoteAccessible* newProxy = new RemoteAccessible(
|
||||
newChild.ID(), aParent, this, newChild.Role(), newChild.Interfaces());
|
||||
|
||||
aParent->AddChildAt(aIdxInParent, newProxy);
|
||||
|
@ -187,13 +187,13 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvHideEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* root = rootEntry->mProxy;
|
||||
RemoteAccessible* root = rootEntry->mProxy;
|
||||
if (!root) {
|
||||
NS_ERROR("invalid root being removed!");
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* parent = root->RemoteParent();
|
||||
RemoteAccessible* parent = root->RemoteParent();
|
||||
ProxyShowHideEvent(root, parent, false, aFromUser);
|
||||
|
||||
RefPtr<xpcAccHideEvent> event = nullptr;
|
||||
|
@ -201,9 +201,9 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvHideEvent(
|
|||
uint32_t type = nsIAccessibleEvent::EVENT_HIDE;
|
||||
xpcAccessibleGeneric* xpcAcc = GetXPCAccessible(root);
|
||||
xpcAccessibleGeneric* xpcParent = GetXPCAccessible(parent);
|
||||
ProxyAccessible* next = root->RemoteNextSibling();
|
||||
RemoteAccessible* next = root->RemoteNextSibling();
|
||||
xpcAccessibleGeneric* xpcNext = next ? GetXPCAccessible(next) : nullptr;
|
||||
ProxyAccessible* prev = root->RemotePrevSibling();
|
||||
RemoteAccessible* prev = root->RemotePrevSibling();
|
||||
xpcAccessibleGeneric* xpcPrev = prev ? GetXPCAccessible(prev) : nullptr;
|
||||
xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this);
|
||||
nsINode* node = nullptr;
|
||||
|
@ -229,7 +229,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetAccessible(aID);
|
||||
RemoteAccessible* proxy = GetAccessible(aID);
|
||||
if (!proxy) {
|
||||
NS_ERROR("no proxy for event!");
|
||||
return IPC_OK();
|
||||
|
@ -258,7 +258,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvStateChangeEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* target = GetAccessible(aID);
|
||||
RemoteAccessible* target = GetAccessible(aID);
|
||||
if (!target) {
|
||||
NS_ERROR("we don't know about the target of a state change event!");
|
||||
return IPC_OK();
|
||||
|
@ -294,7 +294,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvCaretMoveEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetAccessible(aID);
|
||||
RemoteAccessible* proxy = GetAccessible(aID);
|
||||
if (!proxy) {
|
||||
NS_ERROR("unknown caret move event target!");
|
||||
return IPC_OK();
|
||||
|
@ -329,7 +329,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvTextChangeEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* target = GetAccessible(aID);
|
||||
RemoteAccessible* target = GetAccessible(aID);
|
||||
if (!target) {
|
||||
NS_ERROR("text change event target is unknown!");
|
||||
return IPC_OK();
|
||||
|
@ -369,8 +369,8 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvSelectionEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* target = GetAccessible(aID);
|
||||
ProxyAccessible* widget = GetAccessible(aWidgetID);
|
||||
RemoteAccessible* target = GetAccessible(aID);
|
||||
RemoteAccessible* widget = GetAccessible(aWidgetID);
|
||||
if (!target || !widget) {
|
||||
NS_ERROR("invalid id in selection event");
|
||||
return IPC_OK();
|
||||
|
@ -399,9 +399,9 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvVirtualCursorChangeEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* target = GetAccessible(aID);
|
||||
ProxyAccessible* oldPosition = GetAccessible(aOldPositionID);
|
||||
ProxyAccessible* newPosition = GetAccessible(aNewPositionID);
|
||||
RemoteAccessible* target = GetAccessible(aID);
|
||||
RemoteAccessible* oldPosition = GetAccessible(aOldPositionID);
|
||||
RemoteAccessible* newPosition = GetAccessible(aNewPositionID);
|
||||
|
||||
if (!target) {
|
||||
NS_ERROR("no proxy for event!");
|
||||
|
@ -439,7 +439,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvScrollingEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* target = GetAccessible(aID);
|
||||
RemoteAccessible* target = GetAccessible(aID);
|
||||
if (!target) {
|
||||
NS_ERROR("no proxy for event!");
|
||||
return IPC_OK();
|
||||
|
@ -476,7 +476,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvAnnouncementEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* target = GetAccessible(aID);
|
||||
RemoteAccessible* target = GetAccessible(aID);
|
||||
if (!target) {
|
||||
NS_ERROR("no proxy for event!");
|
||||
return IPC_OK();
|
||||
|
@ -507,7 +507,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvTextSelectionChangeEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* target = GetAccessible(aID);
|
||||
RemoteAccessible* target = GetAccessible(aID);
|
||||
if (!target) {
|
||||
NS_ERROR("no proxy for event!");
|
||||
return IPC_OK();
|
||||
|
@ -595,7 +595,7 @@ ipc::IPCResult DocAccessibleParent::AddChildDoc(DocAccessibleParent* aChildDoc,
|
|||
return IPC_FAIL(this, "binding to nonexistant proxy!");
|
||||
}
|
||||
|
||||
ProxyAccessible* outerDoc = e->mProxy;
|
||||
RemoteAccessible* outerDoc = e->mProxy;
|
||||
MOZ_ASSERT(outerDoc);
|
||||
|
||||
// OuterDocAccessibles are expected to only have a document as a child.
|
||||
|
@ -802,7 +802,7 @@ bool DocAccessibleParent::CheckDocTree() const {
|
|||
}
|
||||
|
||||
xpcAccessibleGeneric* DocAccessibleParent::GetXPCAccessible(
|
||||
ProxyAccessible* aProxy) {
|
||||
RemoteAccessible* aProxy) {
|
||||
xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this);
|
||||
MOZ_ASSERT(doc);
|
||||
|
||||
|
@ -883,7 +883,7 @@ void DocAccessibleParent::SendParentCOMProxy(LocalAccessible* aOuterDoc) {
|
|||
if (NS_WARN_IF(!nativeAcc)) {
|
||||
// Couldn't get a COM proxy for the outer doc. That probably means it died,
|
||||
// but the parent process hasn't received a message to remove it from the
|
||||
// ProxyAccessible tree yet.
|
||||
// RemoteAccessible tree yet.
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -943,7 +943,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvFocusEvent(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = GetAccessible(aID);
|
||||
RemoteAccessible* proxy = GetAccessible(aID);
|
||||
if (!proxy) {
|
||||
NS_ERROR("no proxy for event!");
|
||||
return IPC_OK();
|
||||
|
@ -977,7 +977,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvBatch(
|
|||
if (mShutdown) {
|
||||
return IPC_OK();
|
||||
}
|
||||
nsTArray<ProxyAccessible*> proxies(aData.Length());
|
||||
nsTArray<RemoteAccessible*> proxies(aData.Length());
|
||||
for (size_t i = 0; i < aData.Length(); i++) {
|
||||
DocAccessibleParent* doc = static_cast<DocAccessibleParent*>(
|
||||
aData.ElementAt(i).Document().get_PDocAccessibleParent());
|
||||
|
@ -987,7 +987,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvBatch(
|
|||
continue;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = doc->GetAccessible(aData.ElementAt(i).ID());
|
||||
RemoteAccessible* proxy = doc->GetAccessible(aData.ElementAt(i).ID());
|
||||
if (!proxy) {
|
||||
MOZ_ASSERT_UNREACHABLE("No proxy found!");
|
||||
continue;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "mozilla/a11y/PDocAccessibleParent.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
#include "mozilla/Tuple.h"
|
||||
#include "nsClassHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
|
@ -28,13 +28,13 @@ class DocAccessiblePlatformExtParent;
|
|||
* These objects live in the main process and comunicate with and represent
|
||||
* an accessible document in a content process.
|
||||
*/
|
||||
class DocAccessibleParent : public ProxyAccessible,
|
||||
class DocAccessibleParent : public RemoteAccessible,
|
||||
public PDocAccessibleParent {
|
||||
public:
|
||||
NS_INLINE_DECL_REFCOUNTING(DocAccessibleParent);
|
||||
|
||||
DocAccessibleParent()
|
||||
: ProxyAccessible(this),
|
||||
: RemoteAccessible(this),
|
||||
mParentDoc(kNoParentDoc),
|
||||
#if defined(XP_WIN)
|
||||
mEmulatedWindowHandle(nullptr),
|
||||
|
@ -184,7 +184,7 @@ class DocAccessibleParent : public ProxyAccessible,
|
|||
* notifies the main process a child document has been removed.
|
||||
*/
|
||||
void RemoveChildDoc(DocAccessibleParent* aChildDoc) {
|
||||
ProxyAccessible* parent = aChildDoc->RemoteParent();
|
||||
RemoteAccessible* parent = aChildDoc->RemoteParent();
|
||||
MOZ_ASSERT(parent);
|
||||
if (parent) {
|
||||
aChildDoc->RemoteParent()->ClearChildDoc(aChildDoc);
|
||||
|
@ -194,7 +194,7 @@ class DocAccessibleParent : public ProxyAccessible,
|
|||
MOZ_ASSERT(result);
|
||||
}
|
||||
|
||||
void RemoveAccessible(ProxyAccessible* aAccessible) {
|
||||
void RemoveAccessible(RemoteAccessible* aAccessible) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(mAccessibles.GetEntry(aAccessible->ID()));
|
||||
mAccessibles.RemoveEntry(aAccessible->ID());
|
||||
}
|
||||
|
@ -202,14 +202,14 @@ class DocAccessibleParent : public ProxyAccessible,
|
|||
/**
|
||||
* Return the accessible for given id.
|
||||
*/
|
||||
ProxyAccessible* GetAccessible(uintptr_t aID) {
|
||||
RemoteAccessible* GetAccessible(uintptr_t aID) {
|
||||
if (!aID) return this;
|
||||
|
||||
ProxyEntry* e = mAccessibles.GetEntry(aID);
|
||||
return e ? e->mProxy : nullptr;
|
||||
}
|
||||
|
||||
const ProxyAccessible* GetAccessible(uintptr_t aID) const {
|
||||
const RemoteAccessible* GetAccessible(uintptr_t aID) const {
|
||||
return const_cast<DocAccessibleParent*>(this)->GetAccessible(aID);
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ class DocAccessibleParent : public ProxyAccessible,
|
|||
* called when either of these is created.
|
||||
* @param aOuterDoc The OuterDocAccessible to be returned as the parent of
|
||||
* this document. Only GetNativeInterface() is called on this, so it
|
||||
* may be a ProxyAccessibleWrap or similar.
|
||||
* may be a RemoteAccessibleWrap or similar.
|
||||
*/
|
||||
void SendParentCOMProxy(LocalAccessible* aOuterDoc);
|
||||
|
||||
|
@ -293,14 +293,14 @@ class DocAccessibleParent : public ProxyAccessible,
|
|||
|
||||
enum { ALLOW_MEMMOVE = true };
|
||||
|
||||
ProxyAccessible* mProxy;
|
||||
RemoteAccessible* mProxy;
|
||||
};
|
||||
|
||||
uint32_t AddSubtree(ProxyAccessible* aParent,
|
||||
uint32_t AddSubtree(RemoteAccessible* aParent,
|
||||
const nsTArray<AccessibleData>& aNewTree, uint32_t aIdx,
|
||||
uint32_t aIdxInParent);
|
||||
[[nodiscard]] bool CheckDocTree() const;
|
||||
xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy);
|
||||
xpcAccessibleGeneric* GetXPCAccessible(RemoteAccessible* aProxy);
|
||||
|
||||
nsTArray<uint64_t> mChildDocs;
|
||||
uint64_t mParentDoc;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#include "mozilla/a11y/DocAccessibleParent.h"
|
||||
#include "mozilla/a11y/DocManager.h"
|
||||
#include "mozilla/a11y/Platform.h"
|
||||
#include "mozilla/a11y/ProxyAccessibleBase.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessibleBase.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/BrowserParent.h"
|
||||
|
@ -21,7 +21,7 @@ namespace mozilla {
|
|||
namespace a11y {
|
||||
|
||||
template <class Derived>
|
||||
void ProxyAccessibleBase<Derived>::Shutdown() {
|
||||
void RemoteAccessibleBase<Derived>::Shutdown() {
|
||||
MOZ_DIAGNOSTIC_ASSERT(!IsDoc());
|
||||
xpcAccessibleDocument* xpcDoc =
|
||||
GetAccService()->GetCachedXPCDocument(Document());
|
||||
|
@ -48,7 +48,8 @@ void ProxyAccessibleBase<Derived>::Shutdown() {
|
|||
}
|
||||
|
||||
template <class Derived>
|
||||
void ProxyAccessibleBase<Derived>::SetChildDoc(DocAccessibleParent* aChildDoc) {
|
||||
void RemoteAccessibleBase<Derived>::SetChildDoc(
|
||||
DocAccessibleParent* aChildDoc) {
|
||||
MOZ_ASSERT(aChildDoc);
|
||||
MOZ_ASSERT(mChildren.Length() == 0);
|
||||
mChildren.AppendElement(aChildDoc);
|
||||
|
@ -56,7 +57,7 @@ void ProxyAccessibleBase<Derived>::SetChildDoc(DocAccessibleParent* aChildDoc) {
|
|||
}
|
||||
|
||||
template <class Derived>
|
||||
void ProxyAccessibleBase<Derived>::ClearChildDoc(
|
||||
void RemoteAccessibleBase<Derived>::ClearChildDoc(
|
||||
DocAccessibleParent* aChildDoc) {
|
||||
MOZ_ASSERT(aChildDoc);
|
||||
// This is possible if we're replacing one document with another: Doc 1
|
||||
|
@ -68,7 +69,7 @@ void ProxyAccessibleBase<Derived>::ClearChildDoc(
|
|||
}
|
||||
|
||||
template <class Derived>
|
||||
uint32_t ProxyAccessibleBase<Derived>::EmbeddedChildCount() const {
|
||||
uint32_t RemoteAccessibleBase<Derived>::EmbeddedChildCount() const {
|
||||
size_t count = 0, kids = mChildren.Length();
|
||||
for (size_t i = 0; i < kids; i++) {
|
||||
if (mChildren[i]->IsEmbeddedObject()) {
|
||||
|
@ -80,7 +81,7 @@ uint32_t ProxyAccessibleBase<Derived>::EmbeddedChildCount() const {
|
|||
}
|
||||
|
||||
template <class Derived>
|
||||
int32_t ProxyAccessibleBase<Derived>::IndexOfEmbeddedChild(
|
||||
int32_t RemoteAccessibleBase<Derived>::IndexOfEmbeddedChild(
|
||||
const Derived* aChild) {
|
||||
size_t index = 0, kids = mChildren.Length();
|
||||
for (size_t i = 0; i < kids; i++) {
|
||||
|
@ -97,7 +98,7 @@ int32_t ProxyAccessibleBase<Derived>::IndexOfEmbeddedChild(
|
|||
}
|
||||
|
||||
template <class Derived>
|
||||
Derived* ProxyAccessibleBase<Derived>::EmbeddedChildAt(size_t aChildIdx) {
|
||||
Derived* RemoteAccessibleBase<Derived>::EmbeddedChildAt(size_t aChildIdx) {
|
||||
size_t index = 0, kids = mChildren.Length();
|
||||
for (size_t i = 0; i < kids; i++) {
|
||||
if (!mChildren[i]->IsEmbeddedObject()) {
|
||||
|
@ -115,7 +116,8 @@ Derived* ProxyAccessibleBase<Derived>::EmbeddedChildAt(size_t aChildIdx) {
|
|||
}
|
||||
|
||||
template <class Derived>
|
||||
LocalAccessible* ProxyAccessibleBase<Derived>::OuterDocOfRemoteBrowser() const {
|
||||
LocalAccessible* RemoteAccessibleBase<Derived>::OuterDocOfRemoteBrowser()
|
||||
const {
|
||||
auto tab = static_cast<dom::BrowserParent*>(mDoc->Manager());
|
||||
dom::Element* frame = tab->GetOwnerElement();
|
||||
NS_ASSERTION(frame, "why isn't the tab in a frame!");
|
||||
|
@ -127,7 +129,7 @@ LocalAccessible* ProxyAccessibleBase<Derived>::OuterDocOfRemoteBrowser() const {
|
|||
}
|
||||
|
||||
template <class Derived>
|
||||
void ProxyAccessibleBase<Derived>::SetParent(Derived* aParent) {
|
||||
void RemoteAccessibleBase<Derived>::SetParent(Derived* aParent) {
|
||||
MOZ_ASSERT(IsDoc(), "we should only reparent documents");
|
||||
if (!aParent) {
|
||||
mParent = kNoParent;
|
||||
|
@ -138,7 +140,7 @@ void ProxyAccessibleBase<Derived>::SetParent(Derived* aParent) {
|
|||
}
|
||||
|
||||
template <class Derived>
|
||||
Derived* ProxyAccessibleBase<Derived>::RemoteParent() const {
|
||||
Derived* RemoteAccessibleBase<Derived>::RemoteParent() const {
|
||||
if (mParent == kNoParent) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -163,7 +165,7 @@ Derived* ProxyAccessibleBase<Derived>::RemoteParent() const {
|
|||
return parentDoc->GetAccessible(mParent);
|
||||
}
|
||||
|
||||
template class ProxyAccessibleBase<ProxyAccessible>;
|
||||
template class RemoteAccessibleBase<RemoteAccessible>;
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
|
@ -4,8 +4,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_a11y_ProxyAccessibleBase_h
|
||||
#define mozilla_a11y_ProxyAccessibleBase_h
|
||||
#ifndef mozilla_a11y_RemoteAccessibleBase_h
|
||||
#define mozilla_a11y_RemoteAccessibleBase_h
|
||||
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "nsIAccessibleText.h"
|
||||
|
@ -22,7 +22,7 @@ namespace a11y {
|
|||
class LocalAccessible;
|
||||
class Attribute;
|
||||
class DocAccessibleParent;
|
||||
class ProxyAccessible;
|
||||
class RemoteAccessible;
|
||||
enum class RelationType;
|
||||
|
||||
enum Interfaces {
|
||||
|
@ -38,9 +38,9 @@ enum Interfaces {
|
|||
};
|
||||
|
||||
template <class Derived>
|
||||
class ProxyAccessibleBase {
|
||||
class RemoteAccessibleBase {
|
||||
public:
|
||||
~ProxyAccessibleBase() { MOZ_ASSERT(!mWrapper); }
|
||||
~RemoteAccessibleBase() { MOZ_ASSERT(!mWrapper); }
|
||||
|
||||
void AddChildAt(uint32_t aIdx, Derived* aChild) {
|
||||
mChildren.InsertElementAt(aIdx, aChild);
|
||||
|
@ -155,8 +155,9 @@ class ProxyAccessibleBase {
|
|||
}
|
||||
|
||||
protected:
|
||||
ProxyAccessibleBase(uint64_t aID, Derived* aParent, DocAccessibleParent* aDoc,
|
||||
role aRole, uint32_t aInterfaces)
|
||||
RemoteAccessibleBase(uint64_t aID, Derived* aParent,
|
||||
DocAccessibleParent* aDoc, role aRole,
|
||||
uint32_t aInterfaces)
|
||||
: mParent(aParent->ID()),
|
||||
mDoc(aDoc),
|
||||
mWrapper(0),
|
||||
|
@ -169,7 +170,7 @@ class ProxyAccessibleBase {
|
|||
mIsHyperText(aInterfaces & Interfaces::HYPERTEXT),
|
||||
mIsSelection(aInterfaces & Interfaces::SELECTION) {}
|
||||
|
||||
explicit ProxyAccessibleBase(DocAccessibleParent* aThisAsDoc)
|
||||
explicit RemoteAccessibleBase(DocAccessibleParent* aThisAsDoc)
|
||||
: mParent(kNoParent),
|
||||
mDoc(aThisAsDoc),
|
||||
mWrapper(0),
|
||||
|
@ -212,7 +213,7 @@ class ProxyAccessibleBase {
|
|||
const bool mIsSelection : 1;
|
||||
};
|
||||
|
||||
extern template class ProxyAccessibleBase<ProxyAccessible>;
|
||||
extern template class RemoteAccessibleBase<RemoteAccessible>;
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
|
@ -4,12 +4,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_a11y_ProxyAccessibleShared_h
|
||||
#define mozilla_a11y_ProxyAccessibleShared_h
|
||||
#ifndef mozilla_a11y_RemoteAccessibleShared_h
|
||||
#define mozilla_a11y_RemoteAccessibleShared_h
|
||||
|
||||
/**
|
||||
* These are function declarations shared between win/ProxyAccessible.h and
|
||||
* other/ProxyAccessible.h.
|
||||
* These are function declarations shared between win/RemoteAccessible.h and
|
||||
* other/RemoteAccessible.h.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -51,13 +51,13 @@ void Attributes(nsTArray<Attribute>* aAttrs) const;
|
|||
/**
|
||||
* Return set of targets of given relation type.
|
||||
*/
|
||||
nsTArray<ProxyAccessible*> RelationByType(RelationType aType) const;
|
||||
nsTArray<RemoteAccessible*> RelationByType(RelationType aType) const;
|
||||
|
||||
/**
|
||||
* Get all relations for this accessible.
|
||||
*/
|
||||
void Relations(nsTArray<RelationType>* aTypes,
|
||||
nsTArray<nsTArray<ProxyAccessible*>>* aTargetSets) const;
|
||||
nsTArray<nsTArray<RemoteAccessible*>>* aTargetSets) const;
|
||||
|
||||
bool IsSearchbox() const;
|
||||
|
||||
|
@ -156,17 +156,17 @@ uint32_t AnchorCount(bool* aOk);
|
|||
|
||||
void AnchorURIAt(uint32_t aIndex, nsCString& aURI, bool* aOk);
|
||||
|
||||
ProxyAccessible* AnchorAt(uint32_t aIndex);
|
||||
RemoteAccessible* AnchorAt(uint32_t aIndex);
|
||||
|
||||
uint32_t LinkCount();
|
||||
|
||||
ProxyAccessible* LinkAt(const uint32_t& aIndex);
|
||||
RemoteAccessible* LinkAt(const uint32_t& aIndex);
|
||||
|
||||
int32_t LinkIndexOf(ProxyAccessible* aLink);
|
||||
int32_t LinkIndexOf(RemoteAccessible* aLink);
|
||||
|
||||
int32_t LinkIndexAtOffset(uint32_t aOffset);
|
||||
|
||||
ProxyAccessible* TableOfACell();
|
||||
RemoteAccessible* TableOfACell();
|
||||
|
||||
uint32_t ColIdx();
|
||||
|
||||
|
@ -181,17 +181,17 @@ uint32_t RowExtent();
|
|||
void GetColRowExtents(uint32_t* aColIdx, uint32_t* aRowIdx,
|
||||
uint32_t* aColExtent, uint32_t* aRowExtent);
|
||||
|
||||
void ColHeaderCells(nsTArray<ProxyAccessible*>* aCells);
|
||||
void ColHeaderCells(nsTArray<RemoteAccessible*>* aCells);
|
||||
|
||||
void RowHeaderCells(nsTArray<ProxyAccessible*>* aCells);
|
||||
void RowHeaderCells(nsTArray<RemoteAccessible*>* aCells);
|
||||
|
||||
bool IsCellSelected();
|
||||
|
||||
ProxyAccessible* TableCaption();
|
||||
RemoteAccessible* TableCaption();
|
||||
void TableSummary(nsString& aSummary);
|
||||
uint32_t TableColumnCount();
|
||||
uint32_t TableRowCount();
|
||||
ProxyAccessible* TableCellAt(uint32_t aRow, uint32_t aCol);
|
||||
RemoteAccessible* TableCellAt(uint32_t aRow, uint32_t aCol);
|
||||
int32_t TableCellIndexAt(uint32_t aRow, uint32_t aCol);
|
||||
int32_t TableColumnIndexAt(uint32_t aCellIndex);
|
||||
int32_t TableRowIndexAt(uint32_t aCellIndex);
|
||||
|
@ -207,7 +207,7 @@ bool TableCellSelected(uint32_t aRow, uint32_t aCol);
|
|||
uint32_t TableSelectedCellCount();
|
||||
uint32_t TableSelectedColumnCount();
|
||||
uint32_t TableSelectedRowCount();
|
||||
void TableSelectedCells(nsTArray<ProxyAccessible*>* aCellIDs);
|
||||
void TableSelectedCells(nsTArray<RemoteAccessible*>* aCellIDs);
|
||||
void TableSelectedCellIndices(nsTArray<uint32_t>* aCellIndices);
|
||||
void TableSelectedColumnIndices(nsTArray<uint32_t>* aColumnIndices);
|
||||
void TableSelectedRowIndices(nsTArray<uint32_t>* aRowIndices);
|
||||
|
@ -216,12 +216,12 @@ void TableSelectRow(uint32_t aRow);
|
|||
void TableUnselectColumn(uint32_t aCol);
|
||||
void TableUnselectRow(uint32_t aRow);
|
||||
bool TableIsProbablyForLayout();
|
||||
ProxyAccessible* AtkTableColumnHeader(int32_t aCol);
|
||||
ProxyAccessible* AtkTableRowHeader(int32_t aRow);
|
||||
RemoteAccessible* AtkTableColumnHeader(int32_t aCol);
|
||||
RemoteAccessible* AtkTableRowHeader(int32_t aRow);
|
||||
|
||||
void SelectedItems(nsTArray<ProxyAccessible*>* aSelectedItems);
|
||||
void SelectedItems(nsTArray<RemoteAccessible*>* aSelectedItems);
|
||||
uint32_t SelectedItemCount();
|
||||
ProxyAccessible* GetSelectedItem(uint32_t aIndex);
|
||||
RemoteAccessible* GetSelectedItem(uint32_t aIndex);
|
||||
bool IsItemSelected(uint32_t aIndex);
|
||||
bool AddItemToSelection(uint32_t aIndex);
|
||||
bool RemoveItemFromSelection(uint32_t aIndex);
|
||||
|
@ -246,9 +246,9 @@ double MaxValue();
|
|||
double Step();
|
||||
|
||||
void TakeFocus();
|
||||
ProxyAccessible* FocusedChild();
|
||||
ProxyAccessible* ChildAtPoint(int32_t aX, int32_t aY,
|
||||
LocalAccessible::EWhichChildAtPoint aWhichChild);
|
||||
RemoteAccessible* FocusedChild();
|
||||
RemoteAccessible* ChildAtPoint(int32_t aX, int32_t aY,
|
||||
LocalAccessible::EWhichChildAtPoint aWhichChild);
|
||||
nsIntRect Bounds();
|
||||
nsIntRect BoundsInCSSPixels();
|
||||
|
|
@ -27,9 +27,9 @@ mozilla::ipc::IPCResult DocAccessiblePlatformExtParent::RecvSetPivotBoundaries(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyAccessible* first =
|
||||
RemoteAccessible* first =
|
||||
static_cast<DocAccessibleParent*>(aFirstDoc)->GetAccessible(aFirst);
|
||||
ProxyAccessible* last =
|
||||
RemoteAccessible* last =
|
||||
static_cast<DocAccessibleParent*>(aLastDoc)->GetAccessible(aLast);
|
||||
|
||||
// We may not have proxy accessibles available yet for those accessibles
|
||||
|
|
|
@ -44,14 +44,14 @@ if CONFIG["ACCESSIBILITY"]:
|
|||
EXPORTS.mozilla.a11y += [
|
||||
"DocAccessibleChildBase.h",
|
||||
"DocAccessibleParent.h",
|
||||
"ProxyAccessibleBase.h",
|
||||
"ProxyAccessibleShared.h",
|
||||
"RemoteAccessibleBase.h",
|
||||
"RemoteAccessibleShared.h",
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
"DocAccessibleChildBase.cpp",
|
||||
"DocAccessibleParent.cpp",
|
||||
"ProxyAccessibleBase.cpp",
|
||||
"RemoteAccessibleBase.cpp",
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "LocalAccessible-inl.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "Relation.h"
|
||||
#include "HyperTextAccessible-inl.h"
|
||||
#include "TextLeafAccessible.h"
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_a11y_ProxyAccessible_h
|
||||
#define mozilla_a11y_ProxyAccessible_h
|
||||
|
||||
#include "LocalAccessible.h"
|
||||
#include "mozilla/a11y/ProxyAccessibleBase.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "nsIAccessibleText.h"
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
class ProxyAccessible : public ProxyAccessibleBase<ProxyAccessible> {
|
||||
public:
|
||||
ProxyAccessible(uint64_t aID, ProxyAccessible* aParent,
|
||||
DocAccessibleParent* aDoc, role aRole, uint32_t aInterfaces)
|
||||
: ProxyAccessibleBase(aID, aParent, aDoc, aRole, aInterfaces)
|
||||
|
||||
{
|
||||
MOZ_COUNT_CTOR(ProxyAccessible);
|
||||
}
|
||||
|
||||
MOZ_COUNTED_DTOR(ProxyAccessible)
|
||||
|
||||
#include "mozilla/a11y/ProxyAccessibleShared.h"
|
||||
|
||||
protected:
|
||||
explicit ProxyAccessible(DocAccessibleParent* aThisAsDoc)
|
||||
: ProxyAccessibleBase(aThisAsDoc) {
|
||||
MOZ_COUNT_CTOR(ProxyAccessible);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
|
@ -4,7 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "mozilla/a11y/DocAccessibleParent.h"
|
||||
#include "DocAccessible.h"
|
||||
#include "mozilla/a11y/DocManager.h"
|
||||
|
@ -18,50 +18,50 @@
|
|||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
uint64_t ProxyAccessible::State() const {
|
||||
uint64_t RemoteAccessible::State() const {
|
||||
uint64_t state = 0;
|
||||
Unused << mDoc->SendState(mID, &state);
|
||||
return state;
|
||||
}
|
||||
|
||||
uint64_t ProxyAccessible::NativeState() const {
|
||||
uint64_t RemoteAccessible::NativeState() const {
|
||||
uint64_t state = 0;
|
||||
Unused << mDoc->SendNativeState(mID, &state);
|
||||
return state;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::Name(nsString& aName) const {
|
||||
uint32_t RemoteAccessible::Name(nsString& aName) const {
|
||||
uint32_t flag;
|
||||
Unused << mDoc->SendName(mID, &aName, &flag);
|
||||
return flag;
|
||||
}
|
||||
|
||||
void ProxyAccessible::Value(nsString& aValue) const {
|
||||
void RemoteAccessible::Value(nsString& aValue) const {
|
||||
Unused << mDoc->SendValue(mID, &aValue);
|
||||
}
|
||||
|
||||
void ProxyAccessible::Help(nsString& aHelp) const {
|
||||
void RemoteAccessible::Help(nsString& aHelp) const {
|
||||
Unused << mDoc->SendHelp(mID, &aHelp);
|
||||
}
|
||||
|
||||
void ProxyAccessible::Description(nsString& aDesc) const {
|
||||
void RemoteAccessible::Description(nsString& aDesc) const {
|
||||
Unused << mDoc->SendDescription(mID, &aDesc);
|
||||
}
|
||||
|
||||
void ProxyAccessible::Attributes(nsTArray<Attribute>* aAttrs) const {
|
||||
void RemoteAccessible::Attributes(nsTArray<Attribute>* aAttrs) const {
|
||||
Unused << mDoc->SendAttributes(mID, aAttrs);
|
||||
}
|
||||
|
||||
nsTArray<ProxyAccessible*> ProxyAccessible::RelationByType(
|
||||
nsTArray<RemoteAccessible*> RemoteAccessible::RelationByType(
|
||||
RelationType aType) const {
|
||||
nsTArray<uint64_t> targetIDs;
|
||||
Unused << mDoc->SendRelationByType(mID, static_cast<uint32_t>(aType),
|
||||
&targetIDs);
|
||||
|
||||
size_t targetCount = targetIDs.Length();
|
||||
nsTArray<ProxyAccessible*> targets(targetCount);
|
||||
nsTArray<RemoteAccessible*> targets(targetCount);
|
||||
for (size_t i = 0; i < targetCount; i++) {
|
||||
if (ProxyAccessible* proxy = mDoc->GetAccessible(targetIDs[i])) {
|
||||
if (RemoteAccessible* proxy = mDoc->GetAccessible(targetIDs[i])) {
|
||||
targets.AppendElement(proxy);
|
||||
}
|
||||
}
|
||||
|
@ -69,9 +69,9 @@ nsTArray<ProxyAccessible*> ProxyAccessible::RelationByType(
|
|||
return targets;
|
||||
}
|
||||
|
||||
void ProxyAccessible::Relations(
|
||||
void RemoteAccessible::Relations(
|
||||
nsTArray<RelationType>* aTypes,
|
||||
nsTArray<nsTArray<ProxyAccessible*>>* aTargetSets) const {
|
||||
nsTArray<nsTArray<RemoteAccessible*>>* aTargetSets) const {
|
||||
nsTArray<RelationTargets> ipcRelations;
|
||||
Unused << mDoc->SendRelations(mID, &ipcRelations);
|
||||
|
||||
|
@ -83,9 +83,9 @@ void ProxyAccessible::Relations(
|
|||
if (type > static_cast<uint32_t>(RelationType::LAST)) continue;
|
||||
|
||||
size_t targetCount = ipcRelations[i].Targets().Length();
|
||||
nsTArray<ProxyAccessible*> targets(targetCount);
|
||||
nsTArray<RemoteAccessible*> targets(targetCount);
|
||||
for (size_t j = 0; j < targetCount; j++) {
|
||||
if (ProxyAccessible* proxy =
|
||||
if (RemoteAccessible* proxy =
|
||||
mDoc->GetAccessible(ipcRelations[i].Targets()[j])) {
|
||||
targets.AppendElement(proxy);
|
||||
}
|
||||
|
@ -98,289 +98,292 @@ void ProxyAccessible::Relations(
|
|||
}
|
||||
}
|
||||
|
||||
bool ProxyAccessible::IsSearchbox() const {
|
||||
bool RemoteAccessible::IsSearchbox() const {
|
||||
bool retVal = false;
|
||||
Unused << mDoc->SendIsSearchbox(mID, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
nsAtom* ProxyAccessible::LandmarkRole() const {
|
||||
nsAtom* RemoteAccessible::LandmarkRole() const {
|
||||
nsString landmark;
|
||||
Unused << mDoc->SendLandmarkRole(mID, &landmark);
|
||||
return NS_GetStaticAtom(landmark);
|
||||
}
|
||||
|
||||
nsStaticAtom* ProxyAccessible::ARIARoleAtom() const {
|
||||
nsStaticAtom* RemoteAccessible::ARIARoleAtom() const {
|
||||
nsString role;
|
||||
Unused << mDoc->SendARIARoleAtom(mID, &role);
|
||||
return NS_GetStaticAtom(role);
|
||||
}
|
||||
|
||||
GroupPos ProxyAccessible::GroupPosition() {
|
||||
GroupPos RemoteAccessible::GroupPosition() {
|
||||
GroupPos groupPos;
|
||||
Unused << mDoc->SendGroupPosition(mID, &groupPos.level, &groupPos.setSize,
|
||||
&groupPos.posInSet);
|
||||
return groupPos;
|
||||
}
|
||||
|
||||
void ProxyAccessible::ScrollTo(uint32_t aScrollType) {
|
||||
void RemoteAccessible::ScrollTo(uint32_t aScrollType) {
|
||||
Unused << mDoc->SendScrollTo(mID, aScrollType);
|
||||
}
|
||||
|
||||
void ProxyAccessible::ScrollToPoint(uint32_t aScrollType, int32_t aX,
|
||||
int32_t aY) {
|
||||
void RemoteAccessible::ScrollToPoint(uint32_t aScrollType, int32_t aX,
|
||||
int32_t aY) {
|
||||
Unused << mDoc->SendScrollToPoint(mID, aScrollType, aX, aY);
|
||||
}
|
||||
|
||||
void ProxyAccessible::Announce(const nsString& aAnnouncement,
|
||||
uint16_t aPriority) {
|
||||
void RemoteAccessible::Announce(const nsString& aAnnouncement,
|
||||
uint16_t aPriority) {
|
||||
Unused << mDoc->SendAnnounce(mID, aAnnouncement, aPriority);
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::CaretLineNumber() {
|
||||
int32_t RemoteAccessible::CaretLineNumber() {
|
||||
int32_t line = -1;
|
||||
Unused << mDoc->SendCaretOffset(mID, &line);
|
||||
return line;
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::CaretOffset() {
|
||||
int32_t RemoteAccessible::CaretOffset() {
|
||||
int32_t offset = 0;
|
||||
Unused << mDoc->SendCaretOffset(mID, &offset);
|
||||
return offset;
|
||||
}
|
||||
|
||||
void ProxyAccessible::SetCaretOffset(int32_t aOffset) {
|
||||
void RemoteAccessible::SetCaretOffset(int32_t aOffset) {
|
||||
Unused << mDoc->SendSetCaretOffset(mID, aOffset);
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::CharacterCount() {
|
||||
int32_t RemoteAccessible::CharacterCount() {
|
||||
int32_t count = 0;
|
||||
Unused << mDoc->SendCharacterCount(mID, &count);
|
||||
return count;
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::SelectionCount() {
|
||||
int32_t RemoteAccessible::SelectionCount() {
|
||||
int32_t count = 0;
|
||||
Unused << mDoc->SendSelectionCount(mID, &count);
|
||||
return count;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::TextSubstring(int32_t aStartOffset, int32_t aEndOfset,
|
||||
nsString& aText) const {
|
||||
bool RemoteAccessible::TextSubstring(int32_t aStartOffset, int32_t aEndOfset,
|
||||
nsString& aText) const {
|
||||
bool valid;
|
||||
Unused << mDoc->SendTextSubstring(mID, aStartOffset, aEndOfset, &aText,
|
||||
&valid);
|
||||
return valid;
|
||||
}
|
||||
|
||||
void ProxyAccessible::GetTextAfterOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText, int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
Unused << mDoc->SendGetTextAfterOffset(mID, aOffset, aBoundaryType, &aText,
|
||||
aStartOffset, aEndOffset);
|
||||
}
|
||||
|
||||
void ProxyAccessible::GetTextAtOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText, int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
Unused << mDoc->SendGetTextAtOffset(mID, aOffset, aBoundaryType, &aText,
|
||||
aStartOffset, aEndOffset);
|
||||
}
|
||||
|
||||
void ProxyAccessible::GetTextBeforeOffset(int32_t aOffset,
|
||||
void RemoteAccessible::GetTextAfterOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText,
|
||||
int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
Unused << mDoc->SendGetTextAfterOffset(mID, aOffset, aBoundaryType, &aText,
|
||||
aStartOffset, aEndOffset);
|
||||
}
|
||||
|
||||
void RemoteAccessible::GetTextAtOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText, int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
Unused << mDoc->SendGetTextAtOffset(mID, aOffset, aBoundaryType, &aText,
|
||||
aStartOffset, aEndOffset);
|
||||
}
|
||||
|
||||
void RemoteAccessible::GetTextBeforeOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText,
|
||||
int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
Unused << mDoc->SendGetTextBeforeOffset(mID, aOffset, aBoundaryType, &aText,
|
||||
aStartOffset, aEndOffset);
|
||||
}
|
||||
|
||||
char16_t ProxyAccessible::CharAt(int32_t aOffset) {
|
||||
char16_t RemoteAccessible::CharAt(int32_t aOffset) {
|
||||
uint16_t retval = 0;
|
||||
Unused << mDoc->SendCharAt(mID, aOffset, &retval);
|
||||
return static_cast<char16_t>(retval);
|
||||
}
|
||||
|
||||
void ProxyAccessible::TextAttributes(bool aIncludeDefAttrs, int32_t aOffset,
|
||||
nsTArray<Attribute>* aAttributes,
|
||||
int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
void RemoteAccessible::TextAttributes(bool aIncludeDefAttrs, int32_t aOffset,
|
||||
nsTArray<Attribute>* aAttributes,
|
||||
int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
Unused << mDoc->SendTextAttributes(mID, aIncludeDefAttrs, aOffset,
|
||||
aAttributes, aStartOffset, aEndOffset);
|
||||
}
|
||||
|
||||
void ProxyAccessible::DefaultTextAttributes(nsTArray<Attribute>* aAttrs) {
|
||||
void RemoteAccessible::DefaultTextAttributes(nsTArray<Attribute>* aAttrs) {
|
||||
Unused << mDoc->SendDefaultTextAttributes(mID, aAttrs);
|
||||
}
|
||||
|
||||
nsIntRect ProxyAccessible::TextBounds(int32_t aStartOffset, int32_t aEndOffset,
|
||||
uint32_t aCoordType) {
|
||||
nsIntRect RemoteAccessible::TextBounds(int32_t aStartOffset, int32_t aEndOffset,
|
||||
uint32_t aCoordType) {
|
||||
nsIntRect rect;
|
||||
Unused << mDoc->SendTextBounds(mID, aStartOffset, aEndOffset, aCoordType,
|
||||
&rect);
|
||||
return rect;
|
||||
}
|
||||
|
||||
nsIntRect ProxyAccessible::CharBounds(int32_t aOffset, uint32_t aCoordType) {
|
||||
nsIntRect RemoteAccessible::CharBounds(int32_t aOffset, uint32_t aCoordType) {
|
||||
nsIntRect rect;
|
||||
Unused << mDoc->SendCharBounds(mID, aOffset, aCoordType, &rect);
|
||||
return rect;
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::OffsetAtPoint(int32_t aX, int32_t aY,
|
||||
uint32_t aCoordType) {
|
||||
int32_t RemoteAccessible::OffsetAtPoint(int32_t aX, int32_t aY,
|
||||
uint32_t aCoordType) {
|
||||
int32_t retVal = -1;
|
||||
Unused << mDoc->SendOffsetAtPoint(mID, aX, aY, aCoordType, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::SelectionBoundsAt(int32_t aSelectionNum, nsString& aData,
|
||||
int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
bool RemoteAccessible::SelectionBoundsAt(int32_t aSelectionNum, nsString& aData,
|
||||
int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
bool retVal = false;
|
||||
Unused << mDoc->SendSelectionBoundsAt(mID, aSelectionNum, &retVal, &aData,
|
||||
aStartOffset, aEndOffset);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::SetSelectionBoundsAt(int32_t aSelectionNum,
|
||||
int32_t aStartOffset,
|
||||
int32_t aEndOffset) {
|
||||
bool RemoteAccessible::SetSelectionBoundsAt(int32_t aSelectionNum,
|
||||
int32_t aStartOffset,
|
||||
int32_t aEndOffset) {
|
||||
bool retVal = false;
|
||||
Unused << mDoc->SendSetSelectionBoundsAt(mID, aSelectionNum, aStartOffset,
|
||||
aEndOffset, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::AddToSelection(int32_t aStartOffset, int32_t aEndOffset) {
|
||||
bool RemoteAccessible::AddToSelection(int32_t aStartOffset,
|
||||
int32_t aEndOffset) {
|
||||
bool retVal = false;
|
||||
Unused << mDoc->SendAddToSelection(mID, aStartOffset, aEndOffset, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::RemoveFromSelection(int32_t aSelectionNum) {
|
||||
bool RemoteAccessible::RemoveFromSelection(int32_t aSelectionNum) {
|
||||
bool retVal = false;
|
||||
Unused << mDoc->SendRemoveFromSelection(mID, aSelectionNum, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
void ProxyAccessible::ScrollSubstringTo(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aScrollType) {
|
||||
void RemoteAccessible::ScrollSubstringTo(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aScrollType) {
|
||||
Unused << mDoc->SendScrollSubstringTo(mID, aStartOffset, aEndOffset,
|
||||
aScrollType);
|
||||
}
|
||||
|
||||
void ProxyAccessible::ScrollSubstringToPoint(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aCoordinateType,
|
||||
int32_t aX, int32_t aY) {
|
||||
void RemoteAccessible::ScrollSubstringToPoint(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aCoordinateType,
|
||||
int32_t aX, int32_t aY) {
|
||||
Unused << mDoc->SendScrollSubstringToPoint(mID, aStartOffset, aEndOffset,
|
||||
aCoordinateType, aX, aY);
|
||||
}
|
||||
|
||||
void ProxyAccessible::Text(nsString* aText) {
|
||||
void RemoteAccessible::Text(nsString* aText) {
|
||||
Unused << mDoc->SendText(mID, aText);
|
||||
}
|
||||
|
||||
void ProxyAccessible::ReplaceText(const nsString& aText) {
|
||||
void RemoteAccessible::ReplaceText(const nsString& aText) {
|
||||
Unused << mDoc->SendReplaceText(mID, aText);
|
||||
}
|
||||
|
||||
bool ProxyAccessible::InsertText(const nsString& aText, int32_t aPosition) {
|
||||
bool RemoteAccessible::InsertText(const nsString& aText, int32_t aPosition) {
|
||||
bool valid;
|
||||
Unused << mDoc->SendInsertText(mID, aText, aPosition, &valid);
|
||||
return valid;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::CopyText(int32_t aStartPos, int32_t aEndPos) {
|
||||
bool RemoteAccessible::CopyText(int32_t aStartPos, int32_t aEndPos) {
|
||||
bool valid;
|
||||
Unused << mDoc->SendCopyText(mID, aStartPos, aEndPos, &valid);
|
||||
return valid;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::CutText(int32_t aStartPos, int32_t aEndPos) {
|
||||
bool RemoteAccessible::CutText(int32_t aStartPos, int32_t aEndPos) {
|
||||
bool valid;
|
||||
Unused << mDoc->SendCutText(mID, aStartPos, aEndPos, &valid);
|
||||
return valid;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::DeleteText(int32_t aStartPos, int32_t aEndPos) {
|
||||
bool RemoteAccessible::DeleteText(int32_t aStartPos, int32_t aEndPos) {
|
||||
bool valid;
|
||||
Unused << mDoc->SendDeleteText(mID, aStartPos, aEndPos, &valid);
|
||||
return valid;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::PasteText(int32_t aPosition) {
|
||||
bool RemoteAccessible::PasteText(int32_t aPosition) {
|
||||
bool valid;
|
||||
Unused << mDoc->SendPasteText(mID, aPosition, &valid);
|
||||
return valid;
|
||||
}
|
||||
|
||||
nsIntPoint ProxyAccessible::ImagePosition(uint32_t aCoordType) {
|
||||
nsIntPoint RemoteAccessible::ImagePosition(uint32_t aCoordType) {
|
||||
nsIntPoint retVal;
|
||||
Unused << mDoc->SendImagePosition(mID, aCoordType, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
nsIntSize ProxyAccessible::ImageSize() {
|
||||
nsIntSize RemoteAccessible::ImageSize() {
|
||||
nsIntSize retVal;
|
||||
Unused << mDoc->SendImageSize(mID, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::StartOffset(bool* aOk) {
|
||||
uint32_t RemoteAccessible::StartOffset(bool* aOk) {
|
||||
uint32_t retVal = 0;
|
||||
Unused << mDoc->SendStartOffset(mID, &retVal, aOk);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::EndOffset(bool* aOk) {
|
||||
uint32_t RemoteAccessible::EndOffset(bool* aOk) {
|
||||
uint32_t retVal = 0;
|
||||
Unused << mDoc->SendEndOffset(mID, &retVal, aOk);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::IsLinkValid() {
|
||||
bool RemoteAccessible::IsLinkValid() {
|
||||
bool retVal = false;
|
||||
Unused << mDoc->SendIsLinkValid(mID, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::AnchorCount(bool* aOk) {
|
||||
uint32_t RemoteAccessible::AnchorCount(bool* aOk) {
|
||||
uint32_t retVal = 0;
|
||||
Unused << mDoc->SendAnchorCount(mID, &retVal, aOk);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
void ProxyAccessible::AnchorURIAt(uint32_t aIndex, nsCString& aURI, bool* aOk) {
|
||||
void RemoteAccessible::AnchorURIAt(uint32_t aIndex, nsCString& aURI,
|
||||
bool* aOk) {
|
||||
Unused << mDoc->SendAnchorURIAt(mID, aIndex, &aURI, aOk);
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::AnchorAt(uint32_t aIndex) {
|
||||
RemoteAccessible* RemoteAccessible::AnchorAt(uint32_t aIndex) {
|
||||
uint64_t id = 0;
|
||||
bool ok = false;
|
||||
Unused << mDoc->SendAnchorAt(mID, aIndex, &id, &ok);
|
||||
return ok ? mDoc->GetAccessible(id) : nullptr;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::LinkCount() {
|
||||
uint32_t RemoteAccessible::LinkCount() {
|
||||
uint32_t retVal = 0;
|
||||
Unused << mDoc->SendLinkCount(mID, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::LinkAt(const uint32_t& aIndex) {
|
||||
RemoteAccessible* RemoteAccessible::LinkAt(const uint32_t& aIndex) {
|
||||
uint64_t linkID = 0;
|
||||
bool ok = false;
|
||||
Unused << mDoc->SendLinkAt(mID, aIndex, &linkID, &ok);
|
||||
return ok ? mDoc->GetAccessible(linkID) : nullptr;
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::LinkIndexOf(ProxyAccessible* aLink) {
|
||||
int32_t RemoteAccessible::LinkIndexOf(RemoteAccessible* aLink) {
|
||||
int32_t retVal = -1;
|
||||
if (aLink) {
|
||||
Unused << mDoc->SendLinkIndexOf(mID, aLink->ID(), &retVal);
|
||||
|
@ -389,55 +392,55 @@ int32_t ProxyAccessible::LinkIndexOf(ProxyAccessible* aLink) {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::LinkIndexAtOffset(uint32_t aOffset) {
|
||||
int32_t RemoteAccessible::LinkIndexAtOffset(uint32_t aOffset) {
|
||||
int32_t retVal = -1;
|
||||
Unused << mDoc->SendLinkIndexAtOffset(mID, aOffset, &retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::TableOfACell() {
|
||||
RemoteAccessible* RemoteAccessible::TableOfACell() {
|
||||
uint64_t tableID = 0;
|
||||
bool ok = false;
|
||||
Unused << mDoc->SendTableOfACell(mID, &tableID, &ok);
|
||||
return ok ? mDoc->GetAccessible(tableID) : nullptr;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::ColIdx() {
|
||||
uint32_t RemoteAccessible::ColIdx() {
|
||||
uint32_t index = 0;
|
||||
Unused << mDoc->SendColIdx(mID, &index);
|
||||
return index;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::RowIdx() {
|
||||
uint32_t RemoteAccessible::RowIdx() {
|
||||
uint32_t index = 0;
|
||||
Unused << mDoc->SendRowIdx(mID, &index);
|
||||
return index;
|
||||
}
|
||||
|
||||
void ProxyAccessible::GetColRowExtents(uint32_t* aColIdx, uint32_t* aRowIdx,
|
||||
uint32_t* aColExtent,
|
||||
uint32_t* aRowExtent) {
|
||||
void RemoteAccessible::GetColRowExtents(uint32_t* aColIdx, uint32_t* aRowIdx,
|
||||
uint32_t* aColExtent,
|
||||
uint32_t* aRowExtent) {
|
||||
Unused << mDoc->SendGetColRowExtents(mID, aColIdx, aRowIdx, aColExtent,
|
||||
aRowExtent);
|
||||
}
|
||||
|
||||
void ProxyAccessible::GetPosition(uint32_t* aColIdx, uint32_t* aRowIdx) {
|
||||
void RemoteAccessible::GetPosition(uint32_t* aColIdx, uint32_t* aRowIdx) {
|
||||
Unused << mDoc->SendGetPosition(mID, aColIdx, aRowIdx);
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::ColExtent() {
|
||||
uint32_t RemoteAccessible::ColExtent() {
|
||||
uint32_t extent = 0;
|
||||
Unused << mDoc->SendColExtent(mID, &extent);
|
||||
return extent;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::RowExtent() {
|
||||
uint32_t RemoteAccessible::RowExtent() {
|
||||
uint32_t extent = 0;
|
||||
Unused << mDoc->SendRowExtent(mID, &extent);
|
||||
return extent;
|
||||
}
|
||||
|
||||
void ProxyAccessible::ColHeaderCells(nsTArray<ProxyAccessible*>* aCells) {
|
||||
void RemoteAccessible::ColHeaderCells(nsTArray<RemoteAccessible*>* aCells) {
|
||||
nsTArray<uint64_t> targetIDs;
|
||||
Unused << mDoc->SendColHeaderCells(mID, &targetIDs);
|
||||
|
||||
|
@ -447,7 +450,7 @@ void ProxyAccessible::ColHeaderCells(nsTArray<ProxyAccessible*>* aCells) {
|
|||
}
|
||||
}
|
||||
|
||||
void ProxyAccessible::RowHeaderCells(nsTArray<ProxyAccessible*>* aCells) {
|
||||
void RemoteAccessible::RowHeaderCells(nsTArray<RemoteAccessible*>* aCells) {
|
||||
nsTArray<uint64_t> targetIDs;
|
||||
Unused << mDoc->SendRowHeaderCells(mID, &targetIDs);
|
||||
|
||||
|
@ -457,124 +460,126 @@ void ProxyAccessible::RowHeaderCells(nsTArray<ProxyAccessible*>* aCells) {
|
|||
}
|
||||
}
|
||||
|
||||
bool ProxyAccessible::IsCellSelected() {
|
||||
bool RemoteAccessible::IsCellSelected() {
|
||||
bool selected = false;
|
||||
Unused << mDoc->SendIsCellSelected(mID, &selected);
|
||||
return selected;
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::TableCaption() {
|
||||
RemoteAccessible* RemoteAccessible::TableCaption() {
|
||||
uint64_t captionID = 0;
|
||||
bool ok = false;
|
||||
Unused << mDoc->SendTableCaption(mID, &captionID, &ok);
|
||||
return ok ? mDoc->GetAccessible(captionID) : nullptr;
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableSummary(nsString& aSummary) {
|
||||
void RemoteAccessible::TableSummary(nsString& aSummary) {
|
||||
Unused << mDoc->SendTableSummary(mID, &aSummary);
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::TableColumnCount() {
|
||||
uint32_t RemoteAccessible::TableColumnCount() {
|
||||
uint32_t count = 0;
|
||||
Unused << mDoc->SendTableColumnCount(mID, &count);
|
||||
return count;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::TableRowCount() {
|
||||
uint32_t RemoteAccessible::TableRowCount() {
|
||||
uint32_t count = 0;
|
||||
Unused << mDoc->SendTableRowCount(mID, &count);
|
||||
return count;
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::TableCellAt(uint32_t aRow, uint32_t aCol) {
|
||||
RemoteAccessible* RemoteAccessible::TableCellAt(uint32_t aRow, uint32_t aCol) {
|
||||
uint64_t cellID = 0;
|
||||
bool ok = false;
|
||||
Unused << mDoc->SendTableCellAt(mID, aRow, aCol, &cellID, &ok);
|
||||
return ok ? mDoc->GetAccessible(cellID) : nullptr;
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::TableCellIndexAt(uint32_t aRow, uint32_t aCol) {
|
||||
int32_t RemoteAccessible::TableCellIndexAt(uint32_t aRow, uint32_t aCol) {
|
||||
int32_t index = 0;
|
||||
Unused << mDoc->SendTableCellIndexAt(mID, aRow, aCol, &index);
|
||||
return index;
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::TableColumnIndexAt(uint32_t aCellIndex) {
|
||||
int32_t RemoteAccessible::TableColumnIndexAt(uint32_t aCellIndex) {
|
||||
int32_t index = 0;
|
||||
Unused << mDoc->SendTableColumnIndexAt(mID, aCellIndex, &index);
|
||||
return index;
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::TableRowIndexAt(uint32_t aCellIndex) {
|
||||
int32_t RemoteAccessible::TableRowIndexAt(uint32_t aCellIndex) {
|
||||
int32_t index = 0;
|
||||
Unused << mDoc->SendTableRowIndexAt(mID, aCellIndex, &index);
|
||||
return index;
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableRowAndColumnIndicesAt(uint32_t aCellIndex,
|
||||
int32_t* aRow, int32_t* aCol) {
|
||||
void RemoteAccessible::TableRowAndColumnIndicesAt(uint32_t aCellIndex,
|
||||
int32_t* aRow,
|
||||
int32_t* aCol) {
|
||||
Unused << mDoc->SendTableRowAndColumnIndicesAt(mID, aCellIndex, aRow, aCol);
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::TableColumnExtentAt(uint32_t aRow, uint32_t aCol) {
|
||||
uint32_t RemoteAccessible::TableColumnExtentAt(uint32_t aRow, uint32_t aCol) {
|
||||
uint32_t extent = 0;
|
||||
Unused << mDoc->SendTableColumnExtentAt(mID, aRow, aCol, &extent);
|
||||
return extent;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::TableRowExtentAt(uint32_t aRow, uint32_t aCol) {
|
||||
uint32_t RemoteAccessible::TableRowExtentAt(uint32_t aRow, uint32_t aCol) {
|
||||
uint32_t extent = 0;
|
||||
Unused << mDoc->SendTableRowExtentAt(mID, aRow, aCol, &extent);
|
||||
return extent;
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableColumnDescription(uint32_t aCol,
|
||||
nsString& aDescription) {
|
||||
void RemoteAccessible::TableColumnDescription(uint32_t aCol,
|
||||
nsString& aDescription) {
|
||||
Unused << mDoc->SendTableColumnDescription(mID, aCol, &aDescription);
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableRowDescription(uint32_t aRow,
|
||||
nsString& aDescription) {
|
||||
void RemoteAccessible::TableRowDescription(uint32_t aRow,
|
||||
nsString& aDescription) {
|
||||
Unused << mDoc->SendTableRowDescription(mID, aRow, &aDescription);
|
||||
}
|
||||
|
||||
bool ProxyAccessible::TableColumnSelected(uint32_t aCol) {
|
||||
bool RemoteAccessible::TableColumnSelected(uint32_t aCol) {
|
||||
bool selected = false;
|
||||
Unused << mDoc->SendTableColumnSelected(mID, aCol, &selected);
|
||||
return selected;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::TableRowSelected(uint32_t aRow) {
|
||||
bool RemoteAccessible::TableRowSelected(uint32_t aRow) {
|
||||
bool selected = false;
|
||||
Unused << mDoc->SendTableRowSelected(mID, aRow, &selected);
|
||||
return selected;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::TableCellSelected(uint32_t aRow, uint32_t aCol) {
|
||||
bool RemoteAccessible::TableCellSelected(uint32_t aRow, uint32_t aCol) {
|
||||
bool selected = false;
|
||||
Unused << mDoc->SendTableCellSelected(mID, aRow, aCol, &selected);
|
||||
return selected;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::TableSelectedCellCount() {
|
||||
uint32_t RemoteAccessible::TableSelectedCellCount() {
|
||||
uint32_t count = 0;
|
||||
Unused << mDoc->SendTableSelectedCellCount(mID, &count);
|
||||
return count;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::TableSelectedColumnCount() {
|
||||
uint32_t RemoteAccessible::TableSelectedColumnCount() {
|
||||
uint32_t count = 0;
|
||||
Unused << mDoc->SendTableSelectedColumnCount(mID, &count);
|
||||
return count;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::TableSelectedRowCount() {
|
||||
uint32_t RemoteAccessible::TableSelectedRowCount() {
|
||||
uint32_t count = 0;
|
||||
Unused << mDoc->SendTableSelectedRowCount(mID, &count);
|
||||
return count;
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableSelectedCells(nsTArray<ProxyAccessible*>* aCellIDs) {
|
||||
void RemoteAccessible::TableSelectedCells(
|
||||
nsTArray<RemoteAccessible*>* aCellIDs) {
|
||||
AutoTArray<uint64_t, 30> cellIDs;
|
||||
Unused << mDoc->SendTableSelectedCells(mID, &cellIDs);
|
||||
aCellIDs->SetCapacity(cellIDs.Length());
|
||||
|
@ -583,58 +588,59 @@ void ProxyAccessible::TableSelectedCells(nsTArray<ProxyAccessible*>* aCellIDs) {
|
|||
}
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableSelectedCellIndices(
|
||||
void RemoteAccessible::TableSelectedCellIndices(
|
||||
nsTArray<uint32_t>* aCellIndices) {
|
||||
Unused << mDoc->SendTableSelectedCellIndices(mID, aCellIndices);
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableSelectedColumnIndices(
|
||||
void RemoteAccessible::TableSelectedColumnIndices(
|
||||
nsTArray<uint32_t>* aColumnIndices) {
|
||||
Unused << mDoc->SendTableSelectedColumnIndices(mID, aColumnIndices);
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableSelectedRowIndices(nsTArray<uint32_t>* aRowIndices) {
|
||||
void RemoteAccessible::TableSelectedRowIndices(
|
||||
nsTArray<uint32_t>* aRowIndices) {
|
||||
Unused << mDoc->SendTableSelectedRowIndices(mID, aRowIndices);
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableSelectColumn(uint32_t aCol) {
|
||||
void RemoteAccessible::TableSelectColumn(uint32_t aCol) {
|
||||
Unused << mDoc->SendTableSelectColumn(mID, aCol);
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableSelectRow(uint32_t aRow) {
|
||||
void RemoteAccessible::TableSelectRow(uint32_t aRow) {
|
||||
Unused << mDoc->SendTableSelectRow(mID, aRow);
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableUnselectColumn(uint32_t aCol) {
|
||||
void RemoteAccessible::TableUnselectColumn(uint32_t aCol) {
|
||||
Unused << mDoc->SendTableUnselectColumn(mID, aCol);
|
||||
}
|
||||
|
||||
void ProxyAccessible::TableUnselectRow(uint32_t aRow) {
|
||||
void RemoteAccessible::TableUnselectRow(uint32_t aRow) {
|
||||
Unused << mDoc->SendTableUnselectRow(mID, aRow);
|
||||
}
|
||||
|
||||
bool ProxyAccessible::TableIsProbablyForLayout() {
|
||||
bool RemoteAccessible::TableIsProbablyForLayout() {
|
||||
bool forLayout = false;
|
||||
Unused << mDoc->SendTableIsProbablyForLayout(mID, &forLayout);
|
||||
return forLayout;
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::AtkTableColumnHeader(int32_t aCol) {
|
||||
RemoteAccessible* RemoteAccessible::AtkTableColumnHeader(int32_t aCol) {
|
||||
uint64_t headerID = 0;
|
||||
bool ok = false;
|
||||
Unused << mDoc->SendAtkTableColumnHeader(mID, aCol, &headerID, &ok);
|
||||
return ok ? mDoc->GetAccessible(headerID) : nullptr;
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::AtkTableRowHeader(int32_t aRow) {
|
||||
RemoteAccessible* RemoteAccessible::AtkTableRowHeader(int32_t aRow) {
|
||||
uint64_t headerID = 0;
|
||||
bool ok = false;
|
||||
Unused << mDoc->SendAtkTableRowHeader(mID, aRow, &headerID, &ok);
|
||||
return ok ? mDoc->GetAccessible(headerID) : nullptr;
|
||||
}
|
||||
|
||||
void ProxyAccessible::SelectedItems(
|
||||
nsTArray<ProxyAccessible*>* aSelectedItems) {
|
||||
void RemoteAccessible::SelectedItems(
|
||||
nsTArray<RemoteAccessible*>* aSelectedItems) {
|
||||
AutoTArray<uint64_t, 10> itemIDs;
|
||||
Unused << mDoc->SendSelectedItems(mID, &itemIDs);
|
||||
aSelectedItems->SetCapacity(itemIDs.Length());
|
||||
|
@ -643,136 +649,136 @@ void ProxyAccessible::SelectedItems(
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::SelectedItemCount() {
|
||||
uint32_t RemoteAccessible::SelectedItemCount() {
|
||||
uint32_t count = 0;
|
||||
Unused << mDoc->SendSelectedItemCount(mID, &count);
|
||||
return count;
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::GetSelectedItem(uint32_t aIndex) {
|
||||
RemoteAccessible* RemoteAccessible::GetSelectedItem(uint32_t aIndex) {
|
||||
uint64_t selectedItemID = 0;
|
||||
bool ok = false;
|
||||
Unused << mDoc->SendGetSelectedItem(mID, aIndex, &selectedItemID, &ok);
|
||||
return ok ? mDoc->GetAccessible(selectedItemID) : nullptr;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::IsItemSelected(uint32_t aIndex) {
|
||||
bool RemoteAccessible::IsItemSelected(uint32_t aIndex) {
|
||||
bool selected = false;
|
||||
Unused << mDoc->SendIsItemSelected(mID, aIndex, &selected);
|
||||
return selected;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::AddItemToSelection(uint32_t aIndex) {
|
||||
bool RemoteAccessible::AddItemToSelection(uint32_t aIndex) {
|
||||
bool success = false;
|
||||
Unused << mDoc->SendAddItemToSelection(mID, aIndex, &success);
|
||||
return success;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::RemoveItemFromSelection(uint32_t aIndex) {
|
||||
bool RemoteAccessible::RemoveItemFromSelection(uint32_t aIndex) {
|
||||
bool success = false;
|
||||
Unused << mDoc->SendRemoveItemFromSelection(mID, aIndex, &success);
|
||||
return success;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::SelectAll() {
|
||||
bool RemoteAccessible::SelectAll() {
|
||||
bool success = false;
|
||||
Unused << mDoc->SendSelectAll(mID, &success);
|
||||
return success;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::UnselectAll() {
|
||||
bool RemoteAccessible::UnselectAll() {
|
||||
bool success = false;
|
||||
Unused << mDoc->SendUnselectAll(mID, &success);
|
||||
return success;
|
||||
}
|
||||
|
||||
void ProxyAccessible::TakeSelection() {
|
||||
void RemoteAccessible::TakeSelection() {
|
||||
Unused << mDoc->SendTakeSelection(mID);
|
||||
}
|
||||
|
||||
void ProxyAccessible::SetSelected(bool aSelect) {
|
||||
void RemoteAccessible::SetSelected(bool aSelect) {
|
||||
Unused << mDoc->SendSetSelected(mID, aSelect);
|
||||
}
|
||||
|
||||
bool ProxyAccessible::DoAction(uint8_t aIndex) {
|
||||
bool RemoteAccessible::DoAction(uint8_t aIndex) {
|
||||
bool success = false;
|
||||
Unused << mDoc->SendDoAction(mID, aIndex, &success);
|
||||
return success;
|
||||
}
|
||||
|
||||
uint8_t ProxyAccessible::ActionCount() {
|
||||
uint8_t RemoteAccessible::ActionCount() {
|
||||
uint8_t count = 0;
|
||||
Unused << mDoc->SendActionCount(mID, &count);
|
||||
return count;
|
||||
}
|
||||
|
||||
void ProxyAccessible::ActionDescriptionAt(uint8_t aIndex,
|
||||
nsString& aDescription) {
|
||||
void RemoteAccessible::ActionDescriptionAt(uint8_t aIndex,
|
||||
nsString& aDescription) {
|
||||
Unused << mDoc->SendActionDescriptionAt(mID, aIndex, &aDescription);
|
||||
}
|
||||
|
||||
void ProxyAccessible::ActionNameAt(uint8_t aIndex, nsString& aName) {
|
||||
void RemoteAccessible::ActionNameAt(uint8_t aIndex, nsString& aName) {
|
||||
Unused << mDoc->SendActionNameAt(mID, aIndex, &aName);
|
||||
}
|
||||
|
||||
KeyBinding ProxyAccessible::AccessKey() {
|
||||
KeyBinding RemoteAccessible::AccessKey() {
|
||||
uint32_t key = 0;
|
||||
uint32_t modifierMask = 0;
|
||||
Unused << mDoc->SendAccessKey(mID, &key, &modifierMask);
|
||||
return KeyBinding(key, modifierMask);
|
||||
}
|
||||
|
||||
KeyBinding ProxyAccessible::KeyboardShortcut() {
|
||||
KeyBinding RemoteAccessible::KeyboardShortcut() {
|
||||
uint32_t key = 0;
|
||||
uint32_t modifierMask = 0;
|
||||
Unused << mDoc->SendKeyboardShortcut(mID, &key, &modifierMask);
|
||||
return KeyBinding(key, modifierMask);
|
||||
}
|
||||
|
||||
void ProxyAccessible::AtkKeyBinding(nsString& aBinding) {
|
||||
void RemoteAccessible::AtkKeyBinding(nsString& aBinding) {
|
||||
Unused << mDoc->SendAtkKeyBinding(mID, &aBinding);
|
||||
}
|
||||
|
||||
double ProxyAccessible::CurValue() {
|
||||
double RemoteAccessible::CurValue() {
|
||||
double val = UnspecifiedNaN<double>();
|
||||
Unused << mDoc->SendCurValue(mID, &val);
|
||||
return val;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::SetCurValue(double aValue) {
|
||||
bool RemoteAccessible::SetCurValue(double aValue) {
|
||||
bool success = false;
|
||||
Unused << mDoc->SendSetCurValue(mID, aValue, &success);
|
||||
return success;
|
||||
}
|
||||
|
||||
double ProxyAccessible::MinValue() {
|
||||
double RemoteAccessible::MinValue() {
|
||||
double val = UnspecifiedNaN<double>();
|
||||
Unused << mDoc->SendMinValue(mID, &val);
|
||||
return val;
|
||||
}
|
||||
|
||||
double ProxyAccessible::MaxValue() {
|
||||
double RemoteAccessible::MaxValue() {
|
||||
double val = UnspecifiedNaN<double>();
|
||||
Unused << mDoc->SendMaxValue(mID, &val);
|
||||
return val;
|
||||
}
|
||||
|
||||
double ProxyAccessible::Step() {
|
||||
double RemoteAccessible::Step() {
|
||||
double step = UnspecifiedNaN<double>();
|
||||
Unused << mDoc->SendStep(mID, &step);
|
||||
return step;
|
||||
}
|
||||
|
||||
void ProxyAccessible::TakeFocus() { Unused << mDoc->SendTakeFocus(mID); }
|
||||
void RemoteAccessible::TakeFocus() { Unused << mDoc->SendTakeFocus(mID); }
|
||||
|
||||
ProxyAccessible* ProxyAccessible::FocusedChild() {
|
||||
RemoteAccessible* RemoteAccessible::FocusedChild() {
|
||||
if (mOuterDoc) {
|
||||
// If FocusedChild was called on an outer doc, it should behave
|
||||
// like a non-doc accessible and return its focused child, or null.
|
||||
// If the inner doc is OOP (fission), calling FocusedChild on the outer
|
||||
// doc would return null.
|
||||
MOZ_ASSERT(ChildrenCount() == 1);
|
||||
ProxyAccessible* child = RemoteFirstChild();
|
||||
RemoteAccessible* child = RemoteFirstChild();
|
||||
MOZ_ASSERT(child->IsDoc());
|
||||
return (child->State() & states::FOCUSED) ? child : nullptr;
|
||||
}
|
||||
|
@ -802,9 +808,9 @@ ProxyAccessible* ProxyAccessible::FocusedChild() {
|
|||
return useDoc ? useDoc->GetAccessible(resultID) : nullptr;
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::ChildAtPoint(
|
||||
RemoteAccessible* RemoteAccessible::ChildAtPoint(
|
||||
int32_t aX, int32_t aY, LocalAccessible::EWhichChildAtPoint aWhichChild) {
|
||||
ProxyAccessible* target = this;
|
||||
RemoteAccessible* target = this;
|
||||
do {
|
||||
if (target->mOuterDoc) {
|
||||
MOZ_ASSERT(target->ChildrenCount() == 1);
|
||||
|
@ -838,51 +844,51 @@ ProxyAccessible* ProxyAccessible::ChildAtPoint(
|
|||
return target;
|
||||
}
|
||||
|
||||
nsIntRect ProxyAccessible::Bounds() {
|
||||
nsIntRect RemoteAccessible::Bounds() {
|
||||
nsIntRect rect;
|
||||
Unused << mDoc->SendExtents(mID, false, &(rect.x), &(rect.y), &(rect.width),
|
||||
&(rect.height));
|
||||
return rect;
|
||||
}
|
||||
|
||||
nsIntRect ProxyAccessible::BoundsInCSSPixels() {
|
||||
nsIntRect RemoteAccessible::BoundsInCSSPixels() {
|
||||
nsIntRect rect;
|
||||
Unused << mDoc->SendExtentsInCSSPixels(mID, &rect.x, &rect.y, &rect.width,
|
||||
&rect.height);
|
||||
return rect;
|
||||
}
|
||||
|
||||
void ProxyAccessible::Language(nsString& aLocale) {
|
||||
void RemoteAccessible::Language(nsString& aLocale) {
|
||||
Unused << mDoc->SendLanguage(mID, &aLocale);
|
||||
}
|
||||
|
||||
void ProxyAccessible::DocType(nsString& aType) {
|
||||
void RemoteAccessible::DocType(nsString& aType) {
|
||||
Unused << mDoc->SendDocType(mID, &aType);
|
||||
}
|
||||
|
||||
void ProxyAccessible::Title(nsString& aTitle) {
|
||||
void RemoteAccessible::Title(nsString& aTitle) {
|
||||
Unused << mDoc->SendTitle(mID, &aTitle);
|
||||
}
|
||||
|
||||
void ProxyAccessible::URL(nsString& aURL) {
|
||||
void RemoteAccessible::URL(nsString& aURL) {
|
||||
Unused << mDoc->SendURL(mID, &aURL);
|
||||
}
|
||||
|
||||
void ProxyAccessible::MimeType(nsString aMime) {
|
||||
void RemoteAccessible::MimeType(nsString aMime) {
|
||||
Unused << mDoc->SendMimeType(mID, &aMime);
|
||||
}
|
||||
|
||||
void ProxyAccessible::URLDocTypeMimeType(nsString& aURL, nsString& aDocType,
|
||||
nsString& aMimeType) {
|
||||
void RemoteAccessible::URLDocTypeMimeType(nsString& aURL, nsString& aDocType,
|
||||
nsString& aMimeType) {
|
||||
Unused << mDoc->SendURLDocTypeMimeType(mID, &aURL, &aDocType, &aMimeType);
|
||||
}
|
||||
|
||||
void ProxyAccessible::Extents(bool aNeedsScreenCoords, int32_t* aX, int32_t* aY,
|
||||
int32_t* aWidth, int32_t* aHeight) {
|
||||
void RemoteAccessible::Extents(bool aNeedsScreenCoords, int32_t* aX,
|
||||
int32_t* aY, int32_t* aWidth, int32_t* aHeight) {
|
||||
Unused << mDoc->SendExtents(mID, aNeedsScreenCoords, aX, aY, aWidth, aHeight);
|
||||
}
|
||||
|
||||
void ProxyAccessible::DOMNodeID(nsString& aID) {
|
||||
void RemoteAccessible::DOMNodeID(nsString& aID) {
|
||||
Unused << mDoc->SendDOMNodeID(mID, &aID);
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_a11y_RemoteAccessible_h
|
||||
#define mozilla_a11y_RemoteAccessible_h
|
||||
|
||||
#include "LocalAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessibleBase.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "nsIAccessibleText.h"
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
class RemoteAccessible : public RemoteAccessibleBase<RemoteAccessible> {
|
||||
public:
|
||||
RemoteAccessible(uint64_t aID, RemoteAccessible* aParent,
|
||||
DocAccessibleParent* aDoc, role aRole, uint32_t aInterfaces)
|
||||
: RemoteAccessibleBase(aID, aParent, aDoc, aRole, aInterfaces)
|
||||
|
||||
{
|
||||
MOZ_COUNT_CTOR(RemoteAccessible);
|
||||
}
|
||||
|
||||
MOZ_COUNTED_DTOR(RemoteAccessible)
|
||||
|
||||
#include "mozilla/a11y/RemoteAccessibleShared.h"
|
||||
|
||||
protected:
|
||||
explicit RemoteAccessible(DocAccessibleParent* aThisAsDoc)
|
||||
: RemoteAccessibleBase(aThisAsDoc) {
|
||||
MOZ_COUNT_CTOR(RemoteAccessible);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
|
@ -13,12 +13,12 @@ if CONFIG["ACCESSIBILITY"]:
|
|||
|
||||
EXPORTS.mozilla.a11y += [
|
||||
"DocAccessibleChild.h",
|
||||
"ProxyAccessible.h",
|
||||
"RemoteAccessible.h",
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
"DocAccessibleChild.cpp",
|
||||
"ProxyAccessible.cpp",
|
||||
"RemoteAccessible.cpp",
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "Accessible2.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "ia2AccessibleRelation.h"
|
||||
#include "ia2AccessibleValue.h"
|
||||
#include "IGeckoCustom.h"
|
||||
|
@ -26,7 +26,7 @@ static const VARIANT kChildIdSelf = {{{VT_I4}}};
|
|||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
bool ProxyAccessible::GetCOMInterface(void** aOutAccessible) const {
|
||||
bool RemoteAccessible::GetCOMInterface(void** aOutAccessible) const {
|
||||
if (!aOutAccessible) {
|
||||
return false;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ bool ProxyAccessible::GetCOMInterface(void** aOutAccessible) const {
|
|||
// See if we can lazily obtain a COM proxy
|
||||
AccessibleWrap* wrap = WrapperFor(this);
|
||||
bool isDefunct = false;
|
||||
ProxyAccessible* thisPtr = const_cast<ProxyAccessible*>(this);
|
||||
RemoteAccessible* thisPtr = const_cast<RemoteAccessible*>(this);
|
||||
// NB: Don't pass CHILDID_SELF here, use the absolute MSAA ID. Otherwise
|
||||
// GetIAccessibleFor will recurse into this function and we will just
|
||||
// overflow the stack.
|
||||
|
@ -87,7 +87,7 @@ struct InterfaceIID<IAccessible2_2> {
|
|||
*/
|
||||
template <typename Interface>
|
||||
static already_AddRefed<Interface> QueryInterface(
|
||||
const ProxyAccessible* aProxy) {
|
||||
const RemoteAccessible* aProxy) {
|
||||
RefPtr<IAccessible> acc;
|
||||
if (!aProxy->GetCOMInterface((void**)getter_AddRefs(acc))) {
|
||||
return nullptr;
|
||||
|
@ -102,8 +102,8 @@ static already_AddRefed<Interface> QueryInterface(
|
|||
return acc2.forget();
|
||||
}
|
||||
|
||||
static ProxyAccessible* GetProxyFor(DocAccessibleParent* aDoc,
|
||||
IUnknown* aCOMProxy) {
|
||||
static RemoteAccessible* GetProxyFor(DocAccessibleParent* aDoc,
|
||||
IUnknown* aCOMProxy) {
|
||||
RefPtr<IGeckoCustom> custom;
|
||||
if (FAILED(aCOMProxy->QueryInterface(IID_IGeckoCustom,
|
||||
(void**)getter_AddRefs(custom)))) {
|
||||
|
@ -118,7 +118,7 @@ static ProxyAccessible* GetProxyFor(DocAccessibleParent* aDoc,
|
|||
return aDoc->GetAccessible(id);
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::Name(nsString& aName) const {
|
||||
uint32_t RemoteAccessible::Name(nsString& aName) const {
|
||||
/* The return values here exist only to match behvaiour required
|
||||
* by the header declaration of this function. On Mac, we'd like
|
||||
* to return the associated ENameValueFlag, but we don't have
|
||||
|
@ -140,7 +140,7 @@ uint32_t ProxyAccessible::Name(nsString& aName) const {
|
|||
return eNameOK;
|
||||
}
|
||||
|
||||
void ProxyAccessible::Value(nsString& aValue) const {
|
||||
void RemoteAccessible::Value(nsString& aValue) const {
|
||||
aValue.Truncate();
|
||||
RefPtr<IAccessible> acc;
|
||||
if (!GetCOMInterface((void**)getter_AddRefs(acc))) {
|
||||
|
@ -156,7 +156,7 @@ void ProxyAccessible::Value(nsString& aValue) const {
|
|||
aValue = (wchar_t*)resultWrap;
|
||||
}
|
||||
|
||||
double ProxyAccessible::Step() {
|
||||
double RemoteAccessible::Step() {
|
||||
RefPtr<IGeckoCustom> custom = QueryInterface<IGeckoCustom>(this);
|
||||
if (!custom) {
|
||||
return 0;
|
||||
|
@ -171,7 +171,7 @@ double ProxyAccessible::Step() {
|
|||
return increment;
|
||||
}
|
||||
|
||||
void ProxyAccessible::Description(nsString& aDesc) const {
|
||||
void RemoteAccessible::Description(nsString& aDesc) const {
|
||||
aDesc.Truncate();
|
||||
RefPtr<IAccessible> acc;
|
||||
if (!GetCOMInterface((void**)getter_AddRefs(acc))) {
|
||||
|
@ -187,7 +187,7 @@ void ProxyAccessible::Description(nsString& aDesc) const {
|
|||
aDesc = (wchar_t*)resultWrap;
|
||||
}
|
||||
|
||||
uint64_t ProxyAccessible::State() const {
|
||||
uint64_t RemoteAccessible::State() const {
|
||||
RefPtr<IGeckoCustom> custom = QueryInterface<IGeckoCustom>(this);
|
||||
if (!custom) {
|
||||
return 0;
|
||||
|
@ -201,7 +201,7 @@ uint64_t ProxyAccessible::State() const {
|
|||
return state;
|
||||
}
|
||||
|
||||
nsIntRect ProxyAccessible::Bounds() {
|
||||
nsIntRect RemoteAccessible::Bounds() {
|
||||
nsIntRect rect;
|
||||
|
||||
RefPtr<IAccessible> acc;
|
||||
|
@ -221,7 +221,7 @@ nsIntRect ProxyAccessible::Bounds() {
|
|||
return rect;
|
||||
}
|
||||
|
||||
nsIntRect ProxyAccessible::BoundsInCSSPixels() {
|
||||
nsIntRect RemoteAccessible::BoundsInCSSPixels() {
|
||||
RefPtr<IGeckoCustom> custom = QueryInterface<IGeckoCustom>(this);
|
||||
if (!custom) {
|
||||
return nsIntRect();
|
||||
|
@ -233,7 +233,7 @@ nsIntRect ProxyAccessible::BoundsInCSSPixels() {
|
|||
return rect;
|
||||
}
|
||||
|
||||
void ProxyAccessible::Language(nsString& aLocale) {
|
||||
void RemoteAccessible::Language(nsString& aLocale) {
|
||||
aLocale.Truncate();
|
||||
|
||||
RefPtr<IAccessible> acc;
|
||||
|
@ -329,7 +329,7 @@ static bool ConvertBSTRAttributesToArray(const nsAString& aStr,
|
|||
return true;
|
||||
}
|
||||
|
||||
void ProxyAccessible::Attributes(nsTArray<Attribute>* aAttrs) const {
|
||||
void RemoteAccessible::Attributes(nsTArray<Attribute>* aAttrs) const {
|
||||
aAttrs->Clear();
|
||||
|
||||
RefPtr<IAccessible> acc;
|
||||
|
@ -354,11 +354,11 @@ void ProxyAccessible::Attributes(nsTArray<Attribute>* aAttrs) const {
|
|||
nsDependentString((wchar_t*)attrs, attrsWrap.length()), aAttrs);
|
||||
}
|
||||
|
||||
nsTArray<ProxyAccessible*> ProxyAccessible::RelationByType(
|
||||
nsTArray<RemoteAccessible*> RemoteAccessible::RelationByType(
|
||||
RelationType aType) const {
|
||||
RefPtr<IAccessible2_2> acc = QueryInterface<IAccessible2_2>(this);
|
||||
if (!acc) {
|
||||
return nsTArray<ProxyAccessible*>();
|
||||
return nsTArray<RemoteAccessible*>();
|
||||
}
|
||||
|
||||
_bstr_t relationType;
|
||||
|
@ -370,7 +370,7 @@ nsTArray<ProxyAccessible*> ProxyAccessible::RelationByType(
|
|||
}
|
||||
|
||||
if (!relationType) {
|
||||
return nsTArray<ProxyAccessible*>();
|
||||
return nsTArray<RemoteAccessible*>();
|
||||
}
|
||||
|
||||
IUnknown** targets;
|
||||
|
@ -378,10 +378,10 @@ nsTArray<ProxyAccessible*> ProxyAccessible::RelationByType(
|
|||
HRESULT hr =
|
||||
acc->get_relationTargetsOfType(relationType, 0, &targets, &nTargets);
|
||||
if (FAILED(hr)) {
|
||||
return nsTArray<ProxyAccessible*>();
|
||||
return nsTArray<RemoteAccessible*>();
|
||||
}
|
||||
|
||||
nsTArray<ProxyAccessible*> proxies;
|
||||
nsTArray<RemoteAccessible*> proxies;
|
||||
for (long idx = 0; idx < nTargets; idx++) {
|
||||
IUnknown* target = targets[idx];
|
||||
proxies.AppendElement(GetProxyFor(Document(), target));
|
||||
|
@ -392,7 +392,7 @@ nsTArray<ProxyAccessible*> ProxyAccessible::RelationByType(
|
|||
return proxies;
|
||||
}
|
||||
|
||||
double ProxyAccessible::CurValue() {
|
||||
double RemoteAccessible::CurValue() {
|
||||
RefPtr<IAccessibleValue> acc = QueryInterface<IAccessibleValue>(this);
|
||||
if (!acc) {
|
||||
return UnspecifiedNaN<double>();
|
||||
|
@ -407,7 +407,7 @@ double ProxyAccessible::CurValue() {
|
|||
return currentValue.dblVal;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::SetCurValue(double aValue) {
|
||||
bool RemoteAccessible::SetCurValue(double aValue) {
|
||||
RefPtr<IAccessibleValue> acc = QueryInterface<IAccessibleValue>(this);
|
||||
if (!acc) {
|
||||
return false;
|
||||
|
@ -421,7 +421,7 @@ bool ProxyAccessible::SetCurValue(double aValue) {
|
|||
return SUCCEEDED(hr);
|
||||
}
|
||||
|
||||
double ProxyAccessible::MinValue() {
|
||||
double RemoteAccessible::MinValue() {
|
||||
RefPtr<IAccessibleValue> acc = QueryInterface<IAccessibleValue>(this);
|
||||
if (!acc) {
|
||||
return UnspecifiedNaN<double>();
|
||||
|
@ -436,7 +436,7 @@ double ProxyAccessible::MinValue() {
|
|||
return minimumValue.dblVal;
|
||||
}
|
||||
|
||||
double ProxyAccessible::MaxValue() {
|
||||
double RemoteAccessible::MaxValue() {
|
||||
RefPtr<IAccessibleValue> acc = QueryInterface<IAccessibleValue>(this);
|
||||
if (!acc) {
|
||||
return UnspecifiedNaN<double>();
|
||||
|
@ -467,8 +467,8 @@ static IA2TextBoundaryType GetIA2TextBoundary(
|
|||
}
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::OffsetAtPoint(int32_t aX, int32_t aY,
|
||||
uint32_t aCoordinateType) {
|
||||
int32_t RemoteAccessible::OffsetAtPoint(int32_t aX, int32_t aY,
|
||||
uint32_t aCoordinateType) {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return -1;
|
||||
|
@ -495,8 +495,8 @@ int32_t ProxyAccessible::OffsetAtPoint(int32_t aX, int32_t aY,
|
|||
return static_cast<int32_t>(offset);
|
||||
}
|
||||
|
||||
bool ProxyAccessible::TextSubstring(int32_t aStartOffset, int32_t aEndOffset,
|
||||
nsString& aText) const {
|
||||
bool RemoteAccessible::TextSubstring(int32_t aStartOffset, int32_t aEndOffset,
|
||||
nsString& aText) const {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return false;
|
||||
|
@ -515,11 +515,11 @@ bool ProxyAccessible::TextSubstring(int32_t aStartOffset, int32_t aEndOffset,
|
|||
return true;
|
||||
}
|
||||
|
||||
void ProxyAccessible::GetTextBeforeOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText,
|
||||
int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
void RemoteAccessible::GetTextBeforeOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText,
|
||||
int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return;
|
||||
|
@ -539,10 +539,11 @@ void ProxyAccessible::GetTextBeforeOffset(int32_t aOffset,
|
|||
aText = (wchar_t*)result;
|
||||
}
|
||||
|
||||
void ProxyAccessible::GetTextAfterOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText, int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
void RemoteAccessible::GetTextAfterOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText,
|
||||
int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return;
|
||||
|
@ -562,10 +563,10 @@ void ProxyAccessible::GetTextAfterOffset(int32_t aOffset,
|
|||
*aEndOffset = end;
|
||||
}
|
||||
|
||||
void ProxyAccessible::GetTextAtOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText, int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
void RemoteAccessible::GetTextAtOffset(int32_t aOffset,
|
||||
AccessibleTextBoundary aBoundaryType,
|
||||
nsString& aText, int32_t* aStartOffset,
|
||||
int32_t* aEndOffset) {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return;
|
||||
|
@ -585,7 +586,8 @@ void ProxyAccessible::GetTextAtOffset(int32_t aOffset,
|
|||
*aEndOffset = end;
|
||||
}
|
||||
|
||||
bool ProxyAccessible::AddToSelection(int32_t aStartOffset, int32_t aEndOffset) {
|
||||
bool RemoteAccessible::AddToSelection(int32_t aStartOffset,
|
||||
int32_t aEndOffset) {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return false;
|
||||
|
@ -595,7 +597,7 @@ bool ProxyAccessible::AddToSelection(int32_t aStartOffset, int32_t aEndOffset) {
|
|||
static_cast<long>(aEndOffset)));
|
||||
}
|
||||
|
||||
bool ProxyAccessible::RemoveFromSelection(int32_t aSelectionNum) {
|
||||
bool RemoteAccessible::RemoveFromSelection(int32_t aSelectionNum) {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return false;
|
||||
|
@ -604,7 +606,7 @@ bool ProxyAccessible::RemoveFromSelection(int32_t aSelectionNum) {
|
|||
return SUCCEEDED(acc->removeSelection(static_cast<long>(aSelectionNum)));
|
||||
}
|
||||
|
||||
int32_t ProxyAccessible::CaretOffset() {
|
||||
int32_t RemoteAccessible::CaretOffset() {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return -1;
|
||||
|
@ -619,7 +621,7 @@ int32_t ProxyAccessible::CaretOffset() {
|
|||
return static_cast<int32_t>(offset);
|
||||
}
|
||||
|
||||
void ProxyAccessible::SetCaretOffset(int32_t aOffset) {
|
||||
void RemoteAccessible::SetCaretOffset(int32_t aOffset) {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return;
|
||||
|
@ -631,9 +633,9 @@ void ProxyAccessible::SetCaretOffset(int32_t aOffset) {
|
|||
/**
|
||||
* aScrollType should be one of the nsIAccessiblescrollType constants.
|
||||
*/
|
||||
void ProxyAccessible::ScrollSubstringTo(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aScrollType) {
|
||||
void RemoteAccessible::ScrollSubstringTo(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aScrollType) {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return;
|
||||
|
@ -647,10 +649,10 @@ void ProxyAccessible::ScrollSubstringTo(int32_t aStartOffset,
|
|||
/**
|
||||
* aCoordinateType is one of the nsIAccessibleCoordinateType constants.
|
||||
*/
|
||||
void ProxyAccessible::ScrollSubstringToPoint(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aCoordinateType,
|
||||
int32_t aX, int32_t aY) {
|
||||
void RemoteAccessible::ScrollSubstringToPoint(int32_t aStartOffset,
|
||||
int32_t aEndOffset,
|
||||
uint32_t aCoordinateType,
|
||||
int32_t aX, int32_t aY) {
|
||||
RefPtr<IAccessibleText> acc = QueryInterface<IAccessibleText>(this);
|
||||
if (!acc) {
|
||||
return;
|
||||
|
@ -672,7 +674,7 @@ void ProxyAccessible::ScrollSubstringToPoint(int32_t aStartOffset,
|
|||
static_cast<long>(aX), static_cast<long>(aY));
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::StartOffset(bool* aOk) {
|
||||
uint32_t RemoteAccessible::StartOffset(bool* aOk) {
|
||||
RefPtr<IAccessibleHyperlink> acc = QueryInterface<IAccessibleHyperlink>(this);
|
||||
if (!acc) {
|
||||
*aOk = false;
|
||||
|
@ -684,7 +686,7 @@ uint32_t ProxyAccessible::StartOffset(bool* aOk) {
|
|||
return static_cast<uint32_t>(startOffset);
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::EndOffset(bool* aOk) {
|
||||
uint32_t RemoteAccessible::EndOffset(bool* aOk) {
|
||||
RefPtr<IAccessibleHyperlink> acc = QueryInterface<IAccessibleHyperlink>(this);
|
||||
if (!acc) {
|
||||
*aOk = false;
|
||||
|
@ -696,7 +698,7 @@ uint32_t ProxyAccessible::EndOffset(bool* aOk) {
|
|||
return static_cast<uint32_t>(endOffset);
|
||||
}
|
||||
|
||||
bool ProxyAccessible::IsLinkValid() {
|
||||
bool RemoteAccessible::IsLinkValid() {
|
||||
RefPtr<IAccessibleHyperlink> acc = QueryInterface<IAccessibleHyperlink>(this);
|
||||
if (!acc) {
|
||||
return false;
|
||||
|
@ -710,7 +712,7 @@ bool ProxyAccessible::IsLinkValid() {
|
|||
return valid;
|
||||
}
|
||||
|
||||
uint32_t ProxyAccessible::AnchorCount(bool* aOk) {
|
||||
uint32_t RemoteAccessible::AnchorCount(bool* aOk) {
|
||||
*aOk = false;
|
||||
RefPtr<IGeckoCustom> custom = QueryInterface<IGeckoCustom>(this);
|
||||
if (!custom) {
|
||||
|
@ -726,7 +728,7 @@ uint32_t ProxyAccessible::AnchorCount(bool* aOk) {
|
|||
return count;
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::AnchorAt(uint32_t aIdx) {
|
||||
RemoteAccessible* RemoteAccessible::AnchorAt(uint32_t aIdx) {
|
||||
RefPtr<IAccessibleHyperlink> link =
|
||||
QueryInterface<IAccessibleHyperlink>(this);
|
||||
if (!link) {
|
||||
|
@ -739,12 +741,12 @@ ProxyAccessible* ProxyAccessible::AnchorAt(uint32_t aIdx) {
|
|||
}
|
||||
|
||||
MOZ_ASSERT(anchor.vt == VT_UNKNOWN);
|
||||
ProxyAccessible* proxyAnchor = GetProxyFor(Document(), anchor.punkVal);
|
||||
RemoteAccessible* proxyAnchor = GetProxyFor(Document(), anchor.punkVal);
|
||||
anchor.punkVal->Release();
|
||||
return proxyAnchor;
|
||||
}
|
||||
|
||||
void ProxyAccessible::DOMNodeID(nsString& aID) {
|
||||
void RemoteAccessible::DOMNodeID(nsString& aID) {
|
||||
aID.Truncate();
|
||||
RefPtr<IGeckoCustom> custom = QueryInterface<IGeckoCustom>(this);
|
||||
if (!custom) {
|
||||
|
@ -760,7 +762,7 @@ void ProxyAccessible::DOMNodeID(nsString& aID) {
|
|||
aID = (wchar_t*)resultWrap;
|
||||
}
|
||||
|
||||
void ProxyAccessible::TakeFocus() {
|
||||
void RemoteAccessible::TakeFocus() {
|
||||
RefPtr<IAccessible> acc;
|
||||
if (!GetCOMInterface((void**)getter_AddRefs(acc))) {
|
||||
return;
|
||||
|
@ -768,14 +770,14 @@ void ProxyAccessible::TakeFocus() {
|
|||
acc->accSelect(SELFLAG_TAKEFOCUS, kChildIdSelf);
|
||||
}
|
||||
|
||||
ProxyAccessible* ProxyAccessible::ChildAtPoint(
|
||||
RemoteAccessible* RemoteAccessible::ChildAtPoint(
|
||||
int32_t aX, int32_t aY, LocalAccessible::EWhichChildAtPoint aWhichChild) {
|
||||
RefPtr<IAccessible2_2> target = QueryInterface<IAccessible2_2>(this);
|
||||
if (!target) {
|
||||
return nullptr;
|
||||
}
|
||||
DocAccessibleParent* doc = Document();
|
||||
ProxyAccessible* proxy = this;
|
||||
RemoteAccessible* proxy = this;
|
||||
// accHitTest only does direct children, but we might want the deepest child.
|
||||
for (;;) {
|
||||
VARIANT childVar;
|
|
@ -4,11 +4,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_a11y_ProxyAccessible_h
|
||||
#define mozilla_a11y_ProxyAccessible_h
|
||||
#ifndef mozilla_a11y_RemoteAccessible_h
|
||||
#define mozilla_a11y_RemoteAccessible_h
|
||||
|
||||
#include "LocalAccessible.h"
|
||||
#include "mozilla/a11y/ProxyAccessibleBase.h"
|
||||
#include "mozilla/a11y/RemoteAccessibleBase.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
@ -19,18 +19,18 @@
|
|||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
class ProxyAccessible : public ProxyAccessibleBase<ProxyAccessible> {
|
||||
class RemoteAccessible : public RemoteAccessibleBase<RemoteAccessible> {
|
||||
public:
|
||||
ProxyAccessible(uint64_t aID, ProxyAccessible* aParent,
|
||||
DocAccessibleParent* aDoc, role aRole, uint32_t aInterfaces)
|
||||
: ProxyAccessibleBase(aID, aParent, aDoc, aRole, aInterfaces),
|
||||
RemoteAccessible(uint64_t aID, RemoteAccessible* aParent,
|
||||
DocAccessibleParent* aDoc, role aRole, uint32_t aInterfaces)
|
||||
: RemoteAccessibleBase(aID, aParent, aDoc, aRole, aInterfaces),
|
||||
mSafeToRecurse(true) {
|
||||
MOZ_COUNT_CTOR(ProxyAccessible);
|
||||
MOZ_COUNT_CTOR(RemoteAccessible);
|
||||
}
|
||||
|
||||
MOZ_COUNTED_DTOR(ProxyAccessible)
|
||||
MOZ_COUNTED_DTOR(RemoteAccessible)
|
||||
|
||||
#include "mozilla/a11y/ProxyAccessibleShared.h"
|
||||
#include "mozilla/a11y/RemoteAccessibleShared.h"
|
||||
|
||||
bool GetCOMInterface(void** aOutAccessible) const;
|
||||
void SetCOMInterface(const RefPtr<IAccessible>& aIAccessible) {
|
||||
|
@ -45,9 +45,9 @@ class ProxyAccessible : public ProxyAccessibleBase<ProxyAccessible> {
|
|||
}
|
||||
|
||||
protected:
|
||||
explicit ProxyAccessible(DocAccessibleParent* aThisAsDoc)
|
||||
: ProxyAccessibleBase(aThisAsDoc) {
|
||||
MOZ_COUNT_CTOR(ProxyAccessible);
|
||||
explicit RemoteAccessible(DocAccessibleParent* aThisAsDoc)
|
||||
: RemoteAccessibleBase(aThisAsDoc) {
|
||||
MOZ_COUNT_CTOR(RemoteAccessible);
|
||||
}
|
||||
|
||||
private:
|
|
@ -27,7 +27,7 @@ if CONFIG["ACCESSIBILITY"]:
|
|||
"DocAccessibleChild.h",
|
||||
"HandlerProvider.h",
|
||||
"PlatformChild.h",
|
||||
"ProxyAccessible.h",
|
||||
"RemoteAccessible.h",
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
|
@ -36,7 +36,7 @@ if CONFIG["ACCESSIBILITY"]:
|
|||
"DocAccessibleChild.cpp",
|
||||
"HandlerProvider.cpp",
|
||||
"PlatformChild.cpp",
|
||||
"ProxyAccessible.cpp",
|
||||
"RemoteAccessible.cpp",
|
||||
]
|
||||
|
||||
# Give some symbols a unique name in each translation unit, to avoid
|
||||
|
|
|
@ -108,7 +108,7 @@ GeckoTextMarker GeckoTextMarker::MarkerFromIndex(const AccessibleOrProxy& aRoot,
|
|||
DocAccessibleParent* ipcDoc = aRoot.AsProxy()->Document();
|
||||
Unused << ipcDoc->GetPlatformExtension()->SendOffsetAtIndex(
|
||||
aRoot.AsProxy()->ID(), aIndex, &containerID, &offset);
|
||||
ProxyAccessible* container = ipcDoc->GetAccessible(containerID);
|
||||
RemoteAccessible* container = ipcDoc->GetAccessible(containerID);
|
||||
return GeckoTextMarker(container, offset);
|
||||
} else if (auto htWrap = static_cast<HyperTextAccessibleWrap*>(
|
||||
aRoot.AsAccessible()->AsHyperText())) {
|
||||
|
@ -235,7 +235,7 @@ bool GeckoTextMarker::Next() {
|
|||
DocAccessibleParent* ipcDoc = mContainer.AsProxy()->Document();
|
||||
Unused << ipcDoc->GetPlatformExtension()->SendNextClusterAt(
|
||||
mContainer.AsProxy()->ID(), mOffset, &nextContainerID, &nextOffset);
|
||||
ProxyAccessible* nextContainer = ipcDoc->GetAccessible(nextContainerID);
|
||||
RemoteAccessible* nextContainer = ipcDoc->GetAccessible(nextContainerID);
|
||||
bool moved = nextContainer != mContainer.AsProxy() || nextOffset != mOffset;
|
||||
mContainer = nextContainer;
|
||||
mOffset = nextOffset;
|
||||
|
@ -260,7 +260,7 @@ bool GeckoTextMarker::Previous() {
|
|||
DocAccessibleParent* ipcDoc = mContainer.AsProxy()->Document();
|
||||
Unused << ipcDoc->GetPlatformExtension()->SendPreviousClusterAt(
|
||||
mContainer.AsProxy()->ID(), mOffset, &prevContainerID, &prevOffset);
|
||||
ProxyAccessible* prevContainer = ipcDoc->GetAccessible(prevContainerID);
|
||||
RemoteAccessible* prevContainer = ipcDoc->GetAccessible(prevContainerID);
|
||||
bool moved = prevContainer != mContainer.AsProxy() || prevOffset != mOffset;
|
||||
mContainer = prevContainer;
|
||||
mOffset = prevOffset;
|
||||
|
@ -498,7 +498,7 @@ NSAttributedString* GeckoTextMarkerRange::AttributedText() const {
|
|||
for (size_t i = 0; i < textAttributesRuns.Length(); i++) {
|
||||
nsTArray<Attribute>& attributes =
|
||||
textAttributesRuns.ElementAt(i).TextAttributes();
|
||||
ProxyAccessible* container =
|
||||
RemoteAccessible* container =
|
||||
ipcDoc->GetAccessible(textAttributesRuns.ElementAt(i).ContainerID());
|
||||
|
||||
NSAttributedString* substr = [[[NSAttributedString alloc]
|
||||
|
|
|
@ -182,7 +182,7 @@ using namespace mozilla::a11y;
|
|||
return;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = geckoAcc.AsProxy();
|
||||
RemoteAccessible* proxy = geckoAcc.AsProxy();
|
||||
if (ipcDoc &&
|
||||
((ipcDoc != proxy->Document()) || (idx + 1 == [matches count]))) {
|
||||
// If the ipcDoc doesn't match the current proxy's doc, we crossed into a
|
||||
|
@ -193,7 +193,7 @@ using namespace mozilla::a11y;
|
|||
accIds, mResultLimit, EWhichPostFilter::eContainsText, searchText,
|
||||
&matchIds);
|
||||
for (size_t i = 0; i < matchIds.Length(); i++) {
|
||||
if (ProxyAccessible* postMatch =
|
||||
if (RemoteAccessible* postMatch =
|
||||
ipcDoc->GetAccessible(matchIds.ElementAt(i))) {
|
||||
if (mozAccessible* nativePostMatch =
|
||||
GetNativeFromGeckoAccessible(postMatch)) {
|
||||
|
|
|
@ -124,7 +124,7 @@ using namespace mozilla::a11y;
|
|||
DocAccessible* acc = mGeckoAccessible.AsAccessible()->AsDoc();
|
||||
acc->URL(url);
|
||||
} else {
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
proxy->URL(url);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ NSArray<mozAccessible*>* ConvertToNSArray(nsTArray<LocalAccessible*>& aArray);
|
|||
|
||||
// convert an array of Gecko proxy accessibles to an NSArray of native
|
||||
// accessibles
|
||||
NSArray<mozAccessible*>* ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray);
|
||||
NSArray<mozAccessible*>* ConvertToNSArray(nsTArray<RemoteAccessible*>& aArray);
|
||||
|
||||
/**
|
||||
* Get a localized string from the string bundle.
|
||||
|
|
|
@ -34,13 +34,13 @@ NSArray<mozAccessible*>* ConvertToNSArray(nsTArray<LocalAccessible*>& aArray) {
|
|||
|
||||
// convert an array of Gecko proxy accessibles to an NSArray of native
|
||||
// accessibles
|
||||
NSArray<mozAccessible*>* ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray) {
|
||||
NSArray<mozAccessible*>* ConvertToNSArray(nsTArray<RemoteAccessible*>& aArray) {
|
||||
NSMutableArray* nativeArray = [[NSMutableArray alloc] init];
|
||||
|
||||
// iterate through the list, and get each native accessible.
|
||||
size_t totalCount = aArray.Length();
|
||||
for (size_t i = 0; i < totalCount; i++) {
|
||||
ProxyAccessible* curAccessible = aArray.ElementAt(i);
|
||||
RemoteAccessible* curAccessible = aArray.ElementAt(i);
|
||||
mozAccessible* curNative = GetNativeFromGeckoAccessible(curAccessible);
|
||||
if (curNative)
|
||||
[nativeArray addObject:GetObjectOrRepresentedView(curNative)];
|
||||
|
@ -67,7 +67,7 @@ NSString* GetAccAttr(mozAccessible* aNativeAccessible, const char* aAttrName) {
|
|||
[aNativeAccessible geckoAccessible].AsAccessible()) {
|
||||
nsCOMPtr<nsIPersistentProperties> attributes = acc->Attributes();
|
||||
attributes->GetStringProperty(nsCString(aAttrName), result);
|
||||
} else if (ProxyAccessible* proxy =
|
||||
} else if (RemoteAccessible* proxy =
|
||||
[aNativeAccessible geckoAccessible].AsProxy()) {
|
||||
AutoTArray<Attribute, 10> attrs;
|
||||
proxy->Attributes(&attrs);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#import "MOXTextMarkerDelegate.h"
|
||||
|
||||
#include "Platform.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "AccessibleOrProxy.h"
|
||||
#include "DocAccessibleParent.h"
|
||||
#include "mozTableAccessible.h"
|
||||
|
@ -40,7 +40,7 @@ void PlatformInit() {}
|
|||
|
||||
void PlatformShutdown() {}
|
||||
|
||||
void ProxyCreated(ProxyAccessible* aProxy, uint32_t) {
|
||||
void ProxyCreated(RemoteAccessible* aProxy, uint32_t) {
|
||||
if (aProxy->Role() == roles::WHITESPACE) {
|
||||
// We don't create a native object if we're child of a "flat" accessible;
|
||||
// for example, on OS X buttons shouldn't have any children, because that
|
||||
|
@ -50,7 +50,7 @@ void ProxyCreated(ProxyAccessible* aProxy, uint32_t) {
|
|||
}
|
||||
|
||||
// Pass in dummy state for now as retrieving proxy state requires IPC.
|
||||
// Note that we can use ProxyAccessible::IsTable* functions here because they
|
||||
// Note that we can use RemoteAccessible::IsTable* functions here because they
|
||||
// do not use IPC calls but that might change after bug 1210477.
|
||||
Class type;
|
||||
if (aProxy->IsTable()) {
|
||||
|
@ -69,7 +69,7 @@ void ProxyCreated(ProxyAccessible* aProxy, uint32_t) {
|
|||
aProxy->SetWrapper(reinterpret_cast<uintptr_t>(mozWrapper));
|
||||
}
|
||||
|
||||
void ProxyDestroyed(ProxyAccessible* aProxy) {
|
||||
void ProxyDestroyed(RemoteAccessible* aProxy) {
|
||||
mozAccessible* wrapper = GetNativeFromGeckoAccessible(aProxy);
|
||||
[wrapper expire];
|
||||
[wrapper release];
|
||||
|
@ -80,7 +80,7 @@ void ProxyDestroyed(ProxyAccessible* aProxy) {
|
|||
}
|
||||
}
|
||||
|
||||
void ProxyEvent(ProxyAccessible* aProxy, uint32_t aEventType) {
|
||||
void ProxyEvent(RemoteAccessible* aProxy, uint32_t aEventType) {
|
||||
// Ignore event that we don't escape below, they aren't yet supported.
|
||||
if (aEventType != nsIAccessibleEvent::EVENT_FOCUS &&
|
||||
aEventType != nsIAccessibleEvent::EVENT_VALUE_CHANGE &&
|
||||
|
@ -101,7 +101,7 @@ void ProxyEvent(ProxyAccessible* aProxy, uint32_t aEventType) {
|
|||
}
|
||||
}
|
||||
|
||||
void ProxyStateChangeEvent(ProxyAccessible* aProxy, uint64_t aState,
|
||||
void ProxyStateChangeEvent(RemoteAccessible* aProxy, uint64_t aState,
|
||||
bool aEnabled) {
|
||||
mozAccessible* wrapper = GetNativeFromGeckoAccessible(aProxy);
|
||||
if (wrapper) {
|
||||
|
@ -109,7 +109,7 @@ void ProxyStateChangeEvent(ProxyAccessible* aProxy, uint64_t aState,
|
|||
}
|
||||
}
|
||||
|
||||
void ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset,
|
||||
void ProxyCaretMoveEvent(RemoteAccessible* aTarget, int32_t aOffset,
|
||||
bool aIsSelectionCollapsed) {
|
||||
mozAccessible* wrapper = GetNativeFromGeckoAccessible(aTarget);
|
||||
MOXTextMarkerDelegate* delegate =
|
||||
|
@ -132,10 +132,10 @@ void ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset,
|
|||
}
|
||||
}
|
||||
|
||||
void ProxyTextChangeEvent(ProxyAccessible* aTarget, const nsString& aStr,
|
||||
void ProxyTextChangeEvent(RemoteAccessible* aTarget, const nsString& aStr,
|
||||
int32_t aStart, uint32_t aLen, bool aIsInsert,
|
||||
bool aFromUser) {
|
||||
ProxyAccessible* acc = aTarget;
|
||||
RemoteAccessible* acc = aTarget;
|
||||
// If there is a text input ancestor, use it as the event source.
|
||||
while (acc && GetTypeFromRole(acc->Role()) != [mozTextAccessible class]) {
|
||||
acc = acc->RemoteParent();
|
||||
|
@ -147,9 +147,9 @@ void ProxyTextChangeEvent(ProxyAccessible* aTarget, const nsString& aStr,
|
|||
at:aStart];
|
||||
}
|
||||
|
||||
void ProxyShowHideEvent(ProxyAccessible*, ProxyAccessible*, bool, bool) {}
|
||||
void ProxyShowHideEvent(RemoteAccessible*, RemoteAccessible*, bool, bool) {}
|
||||
|
||||
void ProxySelectionEvent(ProxyAccessible* aTarget, ProxyAccessible* aWidget,
|
||||
void ProxySelectionEvent(RemoteAccessible* aTarget, RemoteAccessible* aWidget,
|
||||
uint32_t aEventType) {
|
||||
mozAccessible* wrapper = GetNativeFromGeckoAccessible(aWidget);
|
||||
if (wrapper) {
|
||||
|
@ -157,15 +157,15 @@ void ProxySelectionEvent(ProxyAccessible* aTarget, ProxyAccessible* aWidget,
|
|||
}
|
||||
}
|
||||
|
||||
void ProxyTextSelectionChangeEvent(ProxyAccessible* aTarget,
|
||||
void ProxyTextSelectionChangeEvent(RemoteAccessible* aTarget,
|
||||
const nsTArray<TextRangeData>& aSelection) {
|
||||
if (aSelection.Length()) {
|
||||
MOXTextMarkerDelegate* delegate =
|
||||
[MOXTextMarkerDelegate getOrCreateForDoc:aTarget->Document()];
|
||||
DocAccessibleParent* doc = aTarget->Document();
|
||||
ProxyAccessible* startContainer =
|
||||
RemoteAccessible* startContainer =
|
||||
doc->GetAccessible(aSelection[0].StartID());
|
||||
ProxyAccessible* endContainer = doc->GetAccessible(aSelection[0].EndID());
|
||||
RemoteAccessible* endContainer = doc->GetAccessible(aSelection[0].EndID());
|
||||
// Cache the selection.
|
||||
[delegate setSelectionFrom:startContainer
|
||||
at:aSelection[0].StartOffset()
|
||||
|
@ -180,7 +180,7 @@ void ProxyTextSelectionChangeEvent(ProxyAccessible* aTarget,
|
|||
}
|
||||
}
|
||||
|
||||
void ProxyRoleChangedEvent(ProxyAccessible* aTarget, const a11y::role& aRole) {
|
||||
void ProxyRoleChangedEvent(RemoteAccessible* aTarget, const a11y::role& aRole) {
|
||||
if (mozAccessible* wrapper = GetNativeFromGeckoAccessible(aTarget)) {
|
||||
[wrapper handleRoleChanged:aRole];
|
||||
}
|
||||
|
|
|
@ -321,7 +321,7 @@ uint16_t RotorHeadingLevelRule::Match(const AccessibleOrProxy& aAccOrProxy) {
|
|||
int32_t currLevel = 0;
|
||||
if (LocalAccessible* acc = aAccOrProxy.AsAccessible()) {
|
||||
currLevel = acc->GroupPosition().level;
|
||||
} else if (ProxyAccessible* proxy = aAccOrProxy.AsProxy()) {
|
||||
} else if (RemoteAccessible* proxy = aAccOrProxy.AsProxy()) {
|
||||
currLevel = proxy->GroupPosition().level;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "AccessibleWrap.h"
|
||||
#include "ProxyAccessible.h"
|
||||
#include "RemoteAccessible.h"
|
||||
#include "AccessibleOrProxy.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
@ -36,7 +36,7 @@ inline mozAccessible* GetNativeFromGeckoAccessible(
|
|||
return native;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = aAccOrProxy.AsProxy();
|
||||
RemoteAccessible* proxy = aAccOrProxy.AsProxy();
|
||||
return reinterpret_cast<mozAccessible*>(proxy->GetWrapper());
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ static const uint64_t kCacheInitialized = ((uint64_t)0x1) << 63;
|
|||
state = acc->State();
|
||||
}
|
||||
|
||||
if (ProxyAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
if (RemoteAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
state = proxy->State();
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ static const uint64_t kCacheInitialized = ((uint64_t)0x1) << 63;
|
|||
MOZ_ASSERT(!mGeckoAccessible.IsNull());
|
||||
|
||||
LocalAccessible* acc = mGeckoAccessible.AsAccessible();
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
|
||||
mozAccessible* focusedChild = nil;
|
||||
if (acc) {
|
||||
|
@ -242,7 +242,7 @@ static const uint64_t kCacheInitialized = ((uint64_t)0x1) << 63;
|
|||
}
|
||||
}
|
||||
} else if (proxy) {
|
||||
ProxyAccessible* focusedGeckoChild = proxy->FocusedChild();
|
||||
RemoteAccessible* focusedGeckoChild = proxy->FocusedChild();
|
||||
if (focusedGeckoChild) {
|
||||
focusedChild = GetNativeFromGeckoAccessible(focusedGeckoChild);
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ static const uint64_t kCacheInitialized = ((uint64_t)0x1) << 63;
|
|||
MOZ_ASSERT(!mGeckoAccessible.IsNull());
|
||||
|
||||
LocalAccessible* acc = mGeckoAccessible.AsAccessible();
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
|
||||
// Deal with landmarks first
|
||||
// macOS groups the specific landmark types of DPub ARIA into two broad
|
||||
|
@ -584,7 +584,7 @@ struct RoleDescrComparator {
|
|||
}
|
||||
|
||||
LocalAccessible* acc = mGeckoAccessible.AsAccessible();
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
nsAutoString name;
|
||||
|
||||
/* If our accessible is:
|
||||
|
@ -676,7 +676,7 @@ struct RoleDescrComparator {
|
|||
if (LocalAccessible* acc = mGeckoAccessible.AsAccessible()) {
|
||||
docAcc = acc->Document();
|
||||
} else {
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
LocalAccessible* outerDoc = proxy->OuterDocOfRemoteBrowser();
|
||||
if (outerDoc) docAcc = outerDoc->Document();
|
||||
}
|
||||
|
@ -981,8 +981,8 @@ struct RoleDescrComparator {
|
|||
return relations;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
nsTArray<ProxyAccessible*> rel = proxy->RelationByType(relationType);
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
nsTArray<RemoteAccessible*> rel = proxy->RelationByType(relationType);
|
||||
return utils::ConvertToNSArray(rel);
|
||||
}
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ enum CheckboxValue {
|
|||
if ((IsNaN(min) || newVal >= min) && (IsNaN(max) || newVal <= max)) {
|
||||
acc->SetCurValue(newVal);
|
||||
}
|
||||
} else if (ProxyAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
} else if (RemoteAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
double newVal = proxy->CurValue() + (proxy->Step() * factor);
|
||||
double min = proxy->MinValue();
|
||||
double max = proxy->MaxValue();
|
||||
|
|
|
@ -23,7 +23,7 @@ using namespace mozilla::a11y;
|
|||
// XXX use the flattening API when there are available
|
||||
// see bug 768298
|
||||
acc->GetContent()->GetTextContent(title, rv);
|
||||
} else if (ProxyAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
} else if (RemoteAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
proxy->Title(title);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ using namespace mozilla::a11y;
|
|||
GroupPos groupPos;
|
||||
if (LocalAccessible* acc = mGeckoAccessible.AsAccessible()) {
|
||||
groupPos = acc->GroupPosition();
|
||||
} else if (ProxyAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
} else if (RemoteAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
groupPos = proxy->GroupPosition();
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ using namespace mozilla::a11y;
|
|||
nsAutoString value;
|
||||
if (LocalAccessible* acc = mGeckoAccessible.AsAccessible()) {
|
||||
acc->Value(value);
|
||||
} else if (ProxyAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
} else if (RemoteAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
proxy->Value(value);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,11 +63,11 @@ enum CachedBool { eCachedBoolMiss, eCachedTrue, eCachedFalse };
|
|||
}
|
||||
}
|
||||
|
||||
} else if (ProxyAccessible* proxy = [mParent geckoAccessible].AsProxy()) {
|
||||
} else if (RemoteAccessible* proxy = [mParent geckoAccessible].AsProxy()) {
|
||||
uint32_t numRows = proxy->TableRowCount();
|
||||
|
||||
for (uint32_t j = 0; j < numRows; j++) {
|
||||
ProxyAccessible* cell = proxy->TableCellAt(j, mIndex);
|
||||
RemoteAccessible* cell = proxy->TableCellAt(j, mIndex);
|
||||
mozAccessible* nativeCell =
|
||||
cell ? GetNativeFromGeckoAccessible(cell) : nil;
|
||||
if ([nativeCell isAccessibilityElement]) {
|
||||
|
@ -199,7 +199,7 @@ enum CachedBool { eCachedBoolMiss, eCachedTrue, eCachedFalse };
|
|||
if (LocalAccessible* acc = mGeckoAccessible.AsAccessible()) {
|
||||
tableGuess = acc->AsTable()->IsProbablyLayoutTable();
|
||||
} else {
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
tableGuess = proxy->TableIsProbablyForLayout();
|
||||
}
|
||||
|
||||
|
@ -385,7 +385,7 @@ enum CachedBool { eCachedBoolMiss, eCachedTrue, eCachedFalse };
|
|||
return
|
||||
[NSValue valueWithRange:NSMakeRange(cell->RowIdx(), cell->RowExtent())];
|
||||
} else {
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
return [NSValue
|
||||
valueWithRange:NSMakeRange(proxy->RowIdx(), proxy->RowExtent())];
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ enum CachedBool { eCachedBoolMiss, eCachedTrue, eCachedFalse };
|
|||
return
|
||||
[NSValue valueWithRange:NSMakeRange(cell->ColIdx(), cell->ColExtent())];
|
||||
} else {
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
return [NSValue
|
||||
valueWithRange:NSMakeRange(proxy->ColIdx(), proxy->ColExtent())];
|
||||
}
|
||||
|
@ -414,8 +414,8 @@ enum CachedBool { eCachedBoolMiss, eCachedTrue, eCachedFalse };
|
|||
cell->RowHeaderCells(&headerCells);
|
||||
return utils::ConvertToNSArray(headerCells);
|
||||
} else {
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
nsTArray<ProxyAccessible*> headerCells;
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
nsTArray<RemoteAccessible*> headerCells;
|
||||
proxy->RowHeaderCells(&headerCells);
|
||||
return utils::ConvertToNSArray(headerCells);
|
||||
}
|
||||
|
@ -430,8 +430,8 @@ enum CachedBool { eCachedBoolMiss, eCachedTrue, eCachedFalse };
|
|||
cell->ColHeaderCells(&headerCells);
|
||||
return utils::ConvertToNSArray(headerCells);
|
||||
} else {
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
nsTArray<ProxyAccessible*> headerCells;
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
nsTArray<RemoteAccessible*> headerCells;
|
||||
proxy->ColHeaderCells(&headerCells);
|
||||
return utils::ConvertToNSArray(headerCells);
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ enum CachedBool { eCachedBoolMiss, eCachedTrue, eCachedFalse };
|
|||
GroupPos groupPos;
|
||||
if (LocalAccessible* acc = mGeckoAccessible.AsAccessible()) {
|
||||
groupPos = acc->GroupPosition();
|
||||
} else if (ProxyAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
} else if (RemoteAccessible* proxy = mGeckoAccessible.AsProxy()) {
|
||||
groupPos = proxy->GroupPosition();
|
||||
}
|
||||
// mac expects 0-indexed levels, but groupPos.level is 1-indexed
|
||||
|
|
|
@ -94,7 +94,7 @@ inline NSString* ToNSString(id aValue) {
|
|||
}
|
||||
return nsCocoaUtils::ToNSString(invalidStr);
|
||||
} else {
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
// Similar to the acc case above, we iterate through our attributes
|
||||
// to find the value for `invalid`.
|
||||
AutoTArray<Attribute, 10> attrs;
|
||||
|
@ -151,7 +151,7 @@ inline NSString* ToNSString(id aValue) {
|
|||
|
||||
if (mRole == roles::ENTRY) {
|
||||
LocalAccessible* acc = mGeckoAccessible.AsAccessible();
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
if ((acc && acc->IsSearchbox()) || (proxy && proxy->IsSearchbox())) {
|
||||
return @"AXSearchField";
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ inline NSString* ToNSString(id aValue) {
|
|||
textAcc->InsertText(text, start);
|
||||
}
|
||||
} else {
|
||||
ProxyAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
RemoteAccessible* proxy = mGeckoAccessible.AsProxy();
|
||||
nsString data;
|
||||
proxy->SelectionBoundsAt(0, data, &start, &end);
|
||||
proxy->DeleteText(start, end - start);
|
||||
|
|
|
@ -13,20 +13,22 @@ void a11y::PlatformInit() {}
|
|||
|
||||
void a11y::PlatformShutdown() {}
|
||||
|
||||
void a11y::ProxyCreated(ProxyAccessible*, uint32_t) {}
|
||||
void a11y::ProxyCreated(RemoteAccessible*, uint32_t) {}
|
||||
|
||||
void a11y::ProxyDestroyed(ProxyAccessible*) {}
|
||||
void a11y::ProxyDestroyed(RemoteAccessible*) {}
|
||||
|
||||
void a11y::ProxyEvent(ProxyAccessible*, uint32_t) {}
|
||||
void a11y::ProxyEvent(RemoteAccessible*, uint32_t) {}
|
||||
|
||||
void a11y::ProxyStateChangeEvent(ProxyAccessible*, uint64_t, bool) {}
|
||||
void a11y::ProxyStateChangeEvent(RemoteAccessible*, uint64_t, bool) {}
|
||||
|
||||
void a11y::ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset,
|
||||
void a11y::ProxyCaretMoveEvent(RemoteAccessible* aTarget, int32_t aOffset,
|
||||
bool aIsSelectionCollapsed) {}
|
||||
|
||||
void a11y::ProxyTextChangeEvent(ProxyAccessible*, const nsString&, int32_t,
|
||||
void a11y::ProxyTextChangeEvent(RemoteAccessible*, const nsString&, int32_t,
|
||||
uint32_t, bool, bool) {}
|
||||
|
||||
void a11y::ProxyShowHideEvent(ProxyAccessible*, ProxyAccessible*, bool, bool) {}
|
||||
void a11y::ProxyShowHideEvent(RemoteAccessible*, RemoteAccessible*, bool,
|
||||
bool) {}
|
||||
|
||||
void a11y::ProxySelectionEvent(ProxyAccessible*, ProxyAccessible*, uint32_t) {}
|
||||
void a11y::ProxySelectionEvent(RemoteAccessible*, RemoteAccessible*, uint32_t) {
|
||||
}
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
class ProxyAccessibleWrap : public AccessibleWrap {
|
||||
class RemoteAccessibleWrap : public AccessibleWrap {
|
||||
public:
|
||||
explicit ProxyAccessibleWrap(ProxyAccessible* aProxy)
|
||||
explicit RemoteAccessibleWrap(RemoteAccessible* aProxy)
|
||||
: AccessibleWrap(nullptr, nullptr) {
|
||||
mType = eProxyType;
|
||||
mBits.proxy = aProxy;
|
||||
|
@ -31,9 +31,9 @@ class ProxyAccessibleWrap : public AccessibleWrap {
|
|||
}
|
||||
};
|
||||
|
||||
class HyperTextProxyAccessibleWrap : public HyperTextAccessibleWrap {
|
||||
class HyperTextRemoteAccessibleWrap : public HyperTextAccessibleWrap {
|
||||
public:
|
||||
explicit HyperTextProxyAccessibleWrap(ProxyAccessible* aProxy)
|
||||
explicit HyperTextRemoteAccessibleWrap(RemoteAccessible* aProxy)
|
||||
: HyperTextAccessibleWrap(nullptr, nullptr) {
|
||||
mType = eProxyType;
|
||||
mBits.proxy = aProxy;
|
||||
|
@ -49,10 +49,10 @@ class HyperTextProxyAccessibleWrap : public HyperTextAccessibleWrap {
|
|||
}
|
||||
};
|
||||
|
||||
class DocProxyAccessibleWrap : public HyperTextProxyAccessibleWrap {
|
||||
class DocRemoteAccessibleWrap : public HyperTextRemoteAccessibleWrap {
|
||||
public:
|
||||
explicit DocProxyAccessibleWrap(ProxyAccessible* aProxy)
|
||||
: HyperTextProxyAccessibleWrap(aProxy) {
|
||||
explicit DocRemoteAccessibleWrap(RemoteAccessible* aProxy)
|
||||
: HyperTextRemoteAccessibleWrap(aProxy) {
|
||||
mGenericTypes |= eDocument;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ class DocProxyAccessibleWrap : public HyperTextProxyAccessibleWrap {
|
|||
}
|
||||
|
||||
virtual nsIntRect Bounds() const override {
|
||||
// OuterDocAccessible can return a DocProxyAccessibleWrap as a child.
|
||||
// OuterDocAccessible can return a DocRemoteAccessibleWrap as a child.
|
||||
// LocalAccessible::ChildAtPoint on an ancestor might retrieve this proxy
|
||||
// and call Bounds() on it. This will crash on a proxy, so we override it to
|
||||
// do nothing here.
|
||||
|
@ -80,24 +80,24 @@ class DocProxyAccessibleWrap : public HyperTextProxyAccessibleWrap {
|
|||
};
|
||||
|
||||
template <typename T>
|
||||
inline ProxyAccessible* HyperTextProxyFor(T* aWrapper) {
|
||||
inline RemoteAccessible* HyperTextProxyFor(T* aWrapper) {
|
||||
static_assert(std::is_base_of<IUnknown, T>::value,
|
||||
"only IAccessible* should be passed in");
|
||||
auto wrapper = static_cast<HyperTextProxyAccessibleWrap*>(aWrapper);
|
||||
auto wrapper = static_cast<HyperTextRemoteAccessibleWrap*>(aWrapper);
|
||||
return wrapper->IsProxy() ? wrapper->Proxy() : nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub AccessibleWrap used in a content process for an embedded document
|
||||
* residing in another content process.
|
||||
* There is no ProxyAccessible here, since those only exist in the parent
|
||||
* process. However, like ProxyAccessibleWrap, the only real method that
|
||||
* There is no RemoteAccessible here, since those only exist in the parent
|
||||
* process. However, like RemoteAccessibleWrap, the only real method that
|
||||
* gets called is GetNativeInterface, which returns a COM proxy for the
|
||||
* document.
|
||||
*/
|
||||
class RemoteIframeDocProxyAccessibleWrap : public HyperTextAccessibleWrap {
|
||||
class RemoteIframeDocRemoteAccessibleWrap : public HyperTextAccessibleWrap {
|
||||
public:
|
||||
explicit RemoteIframeDocProxyAccessibleWrap(IDispatch* aCOMProxy)
|
||||
explicit RemoteIframeDocRemoteAccessibleWrap(IDispatch* aCOMProxy)
|
||||
: HyperTextAccessibleWrap(nullptr, nullptr), mCOMProxy(aCOMProxy) {
|
||||
mType = eProxyType;
|
||||
mBits.proxy = nullptr;
|
||||
|
@ -114,7 +114,7 @@ class RemoteIframeDocProxyAccessibleWrap : public HyperTextAccessibleWrap {
|
|||
}
|
||||
|
||||
virtual nsIntRect Bounds() const override {
|
||||
// OuterDocAccessible can return a RemoteIframeDocProxyAccessibleWrap as a
|
||||
// OuterDocAccessible can return a RemoteIframeDocRemoteAccessibleWrap as a
|
||||
// child. LocalAccessible::ChildAtPoint on an ancestor might retrieve this
|
||||
// proxy and call Bounds() on it. This will crash on a proxy, so we override
|
||||
// it to do nothing here.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "nsIAccessibleEvent.h"
|
||||
#include "nsWindowsHelpers.h"
|
||||
#include "nsWinUtils.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
#include "ProxyWrappers.h"
|
||||
#include "ServiceProvider.h"
|
||||
#include "Relation.h"
|
||||
|
@ -1167,10 +1167,10 @@ nsresult AccessibleWrap::HandleAccEvent(AccEvent* aEvent) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
DocProxyAccessibleWrap* AccessibleWrap::DocProxyWrapper() const {
|
||||
DocRemoteAccessibleWrap* AccessibleWrap::DocProxyWrapper() const {
|
||||
MOZ_ASSERT(IsProxy());
|
||||
|
||||
ProxyAccessible* proxy = Proxy();
|
||||
RemoteAccessible* proxy = Proxy();
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -1178,7 +1178,7 @@ DocProxyAccessibleWrap* AccessibleWrap::DocProxyWrapper() const {
|
|||
AccessibleWrap* acc = WrapperFor(proxy->Document());
|
||||
MOZ_ASSERT(acc->IsDoc());
|
||||
|
||||
return static_cast<DocProxyAccessibleWrap*>(acc);
|
||||
return static_cast<DocRemoteAccessibleWrap*>(acc);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1223,7 +1223,7 @@ HWND AccessibleWrap::GetHWNDFor(LocalAccessible* aAccessible) {
|
|||
}
|
||||
|
||||
if (aAccessible->IsProxy()) {
|
||||
ProxyAccessible* proxy = aAccessible->Proxy();
|
||||
RemoteAccessible* proxy = aAccessible->Proxy();
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -1308,7 +1308,7 @@ static LocalAccessible* GetAccessibleInSubtree(DocAccessible* aDoc,
|
|||
|
||||
static already_AddRefed<IDispatch> GetProxiedAccessibleInSubtree(
|
||||
const DocAccessibleParent* aDoc, const VARIANT& aVarChild) {
|
||||
auto wrapper = static_cast<DocProxyAccessibleWrap*>(WrapperFor(aDoc));
|
||||
auto wrapper = static_cast<DocRemoteAccessibleWrap*>(WrapperFor(aDoc));
|
||||
RefPtr<IAccessible> comProxy;
|
||||
int32_t docWrapperChildId = AccessibleWrap::GetChildIDFor(wrapper);
|
||||
// Only document accessible proxies at the top level of their content process
|
||||
|
@ -1603,7 +1603,7 @@ void AccessibleWrap::UpdateSystemCaretFor(LocalAccessible* aAccessible) {
|
|||
|
||||
/* static */
|
||||
void AccessibleWrap::UpdateSystemCaretFor(
|
||||
ProxyAccessible* aProxy, const LayoutDeviceIntRect& aCaretRect) {
|
||||
RemoteAccessible* aProxy, const LayoutDeviceIntRect& aCaretRect) {
|
||||
::DestroyCaret();
|
||||
|
||||
// The HWND should be the real widget HWND, not an emulated HWND.
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "ia2AccessibleValue.h"
|
||||
#include "mozilla/a11y/AccessibleHandler.h"
|
||||
#include "mozilla/a11y/MsaaIdGenerator.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/mscom/Utils.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
class DocProxyAccessibleWrap;
|
||||
class DocRemoteAccessibleWrap;
|
||||
|
||||
class AccessibleWrap : public LocalAccessible,
|
||||
public ia2Accessible,
|
||||
|
@ -173,7 +173,7 @@ class AccessibleWrap : public LocalAccessible,
|
|||
* Gecko is still responsible for drawing its own caret
|
||||
*/
|
||||
void UpdateSystemCaretFor(LocalAccessible* aAccessible);
|
||||
static void UpdateSystemCaretFor(ProxyAccessible* aProxy,
|
||||
static void UpdateSystemCaretFor(RemoteAccessible* aProxy,
|
||||
const LayoutDeviceIntRect& aCaretRect);
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,7 @@ class AccessibleWrap : public LocalAccessible,
|
|||
/**
|
||||
* Return the wrapper for the document's proxy.
|
||||
*/
|
||||
DocProxyAccessibleWrap* DocProxyWrapper() const;
|
||||
DocRemoteAccessibleWrap* DocProxyWrapper() const;
|
||||
|
||||
/**
|
||||
* Creates ITypeInfo for LIBID_Accessibility if it's needed and returns it.
|
||||
|
@ -310,7 +310,7 @@ class AccessibleWrap : public LocalAccessible,
|
|||
nsTArray<RefPtr<IUnknown>> mAssociatedCOMObjectsForDisconnection;
|
||||
};
|
||||
|
||||
static inline AccessibleWrap* WrapperFor(const ProxyAccessible* aProxy) {
|
||||
static inline AccessibleWrap* WrapperFor(const RemoteAccessible* aProxy) {
|
||||
return reinterpret_cast<AccessibleWrap*>(aProxy->GetWrapper());
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "HyperTextAccessibleWrap.h"
|
||||
#include "nsIWindowsRegKey.h"
|
||||
#include "nsWinUtils.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
#include "mozilla/mscom/ActivationContext.h"
|
||||
#include "mozilla/mscom/InterceptorLog.h"
|
||||
#include "mozilla/mscom/Registration.h"
|
||||
|
@ -68,14 +68,14 @@ void a11y::PlatformShutdown() {
|
|||
}
|
||||
}
|
||||
|
||||
void a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t aInterfaces) {
|
||||
void a11y::ProxyCreated(RemoteAccessible* aProxy, uint32_t aInterfaces) {
|
||||
AccessibleWrap* wrapper = nullptr;
|
||||
if (aInterfaces & Interfaces::DOCUMENT) {
|
||||
wrapper = new DocProxyAccessibleWrap(aProxy);
|
||||
wrapper = new DocRemoteAccessibleWrap(aProxy);
|
||||
} else if (aInterfaces & Interfaces::HYPERTEXT) {
|
||||
wrapper = new HyperTextProxyAccessibleWrap(aProxy);
|
||||
wrapper = new HyperTextRemoteAccessibleWrap(aProxy);
|
||||
} else {
|
||||
wrapper = new ProxyAccessibleWrap(aProxy);
|
||||
wrapper = new RemoteAccessibleWrap(aProxy);
|
||||
}
|
||||
|
||||
wrapper->SetProxyInterfaces(aInterfaces);
|
||||
|
@ -83,7 +83,7 @@ void a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t aInterfaces) {
|
|||
aProxy->SetWrapper(reinterpret_cast<uintptr_t>(wrapper));
|
||||
}
|
||||
|
||||
void a11y::ProxyDestroyed(ProxyAccessible* aProxy) {
|
||||
void a11y::ProxyDestroyed(RemoteAccessible* aProxy) {
|
||||
AccessibleWrap* wrapper =
|
||||
reinterpret_cast<AccessibleWrap*>(aProxy->GetWrapper());
|
||||
|
||||
|
@ -101,16 +101,16 @@ void a11y::ProxyDestroyed(ProxyAccessible* aProxy) {
|
|||
wrapper->Release();
|
||||
}
|
||||
|
||||
void a11y::ProxyEvent(ProxyAccessible* aTarget, uint32_t aEventType) {
|
||||
void a11y::ProxyEvent(RemoteAccessible* aTarget, uint32_t aEventType) {
|
||||
AccessibleWrap::FireWinEvent(WrapperFor(aTarget), aEventType);
|
||||
}
|
||||
|
||||
void a11y::ProxyStateChangeEvent(ProxyAccessible* aTarget, uint64_t, bool) {
|
||||
void a11y::ProxyStateChangeEvent(RemoteAccessible* aTarget, uint64_t, bool) {
|
||||
AccessibleWrap::FireWinEvent(WrapperFor(aTarget),
|
||||
nsIAccessibleEvent::EVENT_STATE_CHANGE);
|
||||
}
|
||||
|
||||
void a11y::ProxyFocusEvent(ProxyAccessible* aTarget,
|
||||
void a11y::ProxyFocusEvent(RemoteAccessible* aTarget,
|
||||
const LayoutDeviceIntRect& aCaretRect) {
|
||||
FocusManager* focusMgr = FocusMgr();
|
||||
if (focusMgr && focusMgr->FocusedAccessible()) {
|
||||
|
@ -129,14 +129,14 @@ void a11y::ProxyFocusEvent(ProxyAccessible* aTarget,
|
|||
nsIAccessibleEvent::EVENT_FOCUS);
|
||||
}
|
||||
|
||||
void a11y::ProxyCaretMoveEvent(ProxyAccessible* aTarget,
|
||||
void a11y::ProxyCaretMoveEvent(RemoteAccessible* aTarget,
|
||||
const LayoutDeviceIntRect& aCaretRect) {
|
||||
AccessibleWrap::UpdateSystemCaretFor(aTarget, aCaretRect);
|
||||
AccessibleWrap::FireWinEvent(WrapperFor(aTarget),
|
||||
nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED);
|
||||
}
|
||||
|
||||
void a11y::ProxyTextChangeEvent(ProxyAccessible* aText, const nsString& aStr,
|
||||
void a11y::ProxyTextChangeEvent(RemoteAccessible* aText, const nsString& aStr,
|
||||
int32_t aStart, uint32_t aLen, bool aInsert,
|
||||
bool) {
|
||||
AccessibleWrap* wrapper = WrapperFor(aText);
|
||||
|
@ -164,7 +164,7 @@ void a11y::ProxyTextChangeEvent(ProxyAccessible* aText, const nsString& aStr,
|
|||
AccessibleWrap::FireWinEvent(wrapper, eventType);
|
||||
}
|
||||
|
||||
void a11y::ProxyShowHideEvent(ProxyAccessible* aTarget, ProxyAccessible*,
|
||||
void a11y::ProxyShowHideEvent(RemoteAccessible* aTarget, RemoteAccessible*,
|
||||
bool aInsert, bool) {
|
||||
uint32_t event =
|
||||
aInsert ? nsIAccessibleEvent::EVENT_SHOW : nsIAccessibleEvent::EVENT_HIDE;
|
||||
|
@ -172,7 +172,7 @@ void a11y::ProxyShowHideEvent(ProxyAccessible* aTarget, ProxyAccessible*,
|
|||
AccessibleWrap::FireWinEvent(wrapper, event);
|
||||
}
|
||||
|
||||
void a11y::ProxySelectionEvent(ProxyAccessible* aTarget, ProxyAccessible*,
|
||||
void a11y::ProxySelectionEvent(RemoteAccessible* aTarget, RemoteAccessible*,
|
||||
uint32_t aType) {
|
||||
AccessibleWrap* wrapper = WrapperFor(aTarget);
|
||||
AccessibleWrap::FireWinEvent(wrapper, aType);
|
||||
|
|
|
@ -116,7 +116,7 @@ RootAccessibleWrap::accNavigate(
|
|||
|
||||
LocalAccessible* target = nullptr;
|
||||
// Get the document in the active tab.
|
||||
ProxyAccessible* docProxy = GetPrimaryRemoteTopLevelContentDoc();
|
||||
RemoteAccessible* docProxy = GetPrimaryRemoteTopLevelContentDoc();
|
||||
if (docProxy) {
|
||||
target = WrapperFor(docProxy);
|
||||
} else {
|
||||
|
@ -152,7 +152,7 @@ RootAccessibleWrap::get_accFocus(
|
|||
// Focus might be in a remote document.
|
||||
// (The base implementation can't handle this.)
|
||||
// Get the document in the active tab.
|
||||
ProxyAccessible* docProxy = GetPrimaryRemoteTopLevelContentDoc();
|
||||
RemoteAccessible* docProxy = GetPrimaryRemoteTopLevelContentDoc();
|
||||
if (!docProxy) {
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ nsAccessibleRelation::nsAccessibleRelation(uint32_t aType, Relation* aRel)
|
|||
}
|
||||
|
||||
nsAccessibleRelation::nsAccessibleRelation(
|
||||
uint32_t aType, const nsTArray<ProxyAccessible*>* aTargets)
|
||||
uint32_t aType, const nsTArray<RemoteAccessible*>* aTargets)
|
||||
: mType(aType) {
|
||||
mTargets = do_CreateInstance(NS_ARRAY_CONTRACTID);
|
||||
for (uint32_t idx = 0; idx < aTargets->Length(); ++idx) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "nsTArray.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "mozilla/a11y/RemoteAccessible.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
@ -27,7 +27,7 @@ class nsAccessibleRelation final : public nsIAccessibleRelation {
|
|||
nsAccessibleRelation(uint32_t aType, Relation* aRel);
|
||||
|
||||
nsAccessibleRelation(uint32_t aType,
|
||||
const nsTArray<ProxyAccessible*>* aTargets);
|
||||
const nsTArray<RemoteAccessible*>* aTargets);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIACCESSIBLERELATION
|
||||
|
|
|
@ -48,7 +48,7 @@ xpcAccessible::GetNextSibling(nsIAccessible** aNextSibling) {
|
|||
return rv;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = IntlGeneric().AsProxy();
|
||||
RemoteAccessible* proxy = IntlGeneric().AsProxy();
|
||||
NS_ENSURE_STATE(proxy);
|
||||
|
||||
NS_IF_ADDREF(*aNextSibling = ToXPC(proxy->RemoteNextSibling()));
|
||||
|
@ -68,7 +68,7 @@ xpcAccessible::GetPreviousSibling(nsIAccessible** aPreviousSibling) {
|
|||
return rv;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = IntlGeneric().AsProxy();
|
||||
RemoteAccessible* proxy = IntlGeneric().AsProxy();
|
||||
NS_ENSURE_STATE(proxy);
|
||||
|
||||
NS_IF_ADDREF(*aPreviousSibling = ToXPC(proxy->RemotePrevSibling()));
|
||||
|
@ -192,7 +192,7 @@ xpcAccessible::GetDOMNode(nsINode** aDOMNode) {
|
|||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessible::GetId(nsAString& aID) {
|
||||
ProxyAccessible* proxy = IntlGeneric().AsProxy();
|
||||
RemoteAccessible* proxy = IntlGeneric().AsProxy();
|
||||
if (!proxy) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ xpcAccessible::GetName(nsAString& aName) {
|
|||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
nsAutoString name;
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
proxy->Name(name);
|
||||
} else {
|
||||
Intl()->Name(name);
|
||||
|
@ -276,7 +276,7 @@ xpcAccessible::GetDescription(nsAString& aDescription) {
|
|||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
nsAutoString desc;
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
proxy->Description(desc);
|
||||
} else {
|
||||
Intl()->Description(desc);
|
||||
|
@ -292,7 +292,7 @@ xpcAccessible::GetLanguage(nsAString& aLanguage) {
|
|||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
nsAutoString lang;
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
proxy->Language(lang);
|
||||
} else {
|
||||
Intl()->Language(lang);
|
||||
|
@ -307,7 +307,7 @@ xpcAccessible::GetValue(nsAString& aValue) {
|
|||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
nsAutoString value;
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
proxy->Value(value);
|
||||
} else {
|
||||
Intl()->Value(value);
|
||||
|
@ -323,7 +323,7 @@ xpcAccessible::GetHelp(nsAString& aHelp) {
|
|||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
nsAutoString help;
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -344,7 +344,7 @@ xpcAccessible::GetAccessKey(nsAString& aAccessKey) {
|
|||
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -362,7 +362,7 @@ xpcAccessible::GetKeyboardShortcut(nsAString& aKeyBinding) {
|
|||
aKeyBinding.Truncate();
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -389,7 +389,7 @@ xpcAccessible::GetAttributes(nsIPersistentProperties** aAttributes) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = IntlGeneric().AsProxy();
|
||||
RemoteAccessible* proxy = IntlGeneric().AsProxy();
|
||||
AutoTArray<Attribute, 10> attrs;
|
||||
proxy->Attributes(&attrs);
|
||||
|
||||
|
@ -521,8 +521,8 @@ xpcAccessible::GetRelationByType(uint32_t aType,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
ProxyAccessible* proxy = IntlGeneric().AsProxy();
|
||||
nsTArray<ProxyAccessible*> targets =
|
||||
RemoteAccessible* proxy = IntlGeneric().AsProxy();
|
||||
nsTArray<RemoteAccessible*> targets =
|
||||
proxy->RelationByType(static_cast<RelationType>(aType));
|
||||
NS_ADDREF(*aRelation = new nsAccessibleRelation(aType, &targets));
|
||||
|
||||
|
@ -584,7 +584,7 @@ xpcAccessible::GetFocusedChild(nsIAccessible** aChild) {
|
|||
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -645,7 +645,7 @@ NS_IMETHODIMP
|
|||
xpcAccessible::SetSelected(bool aSelect) {
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -662,7 +662,7 @@ NS_IMETHODIMP
|
|||
xpcAccessible::TakeSelection() {
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -679,7 +679,7 @@ NS_IMETHODIMP
|
|||
xpcAccessible::TakeFocus() {
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
proxy->TakeFocus();
|
||||
} else {
|
||||
Intl()->TakeFocus();
|
||||
|
@ -694,7 +694,7 @@ xpcAccessible::GetActionCount(uint8_t* aActionCount) {
|
|||
*aActionCount = 0;
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -711,7 +711,7 @@ NS_IMETHODIMP
|
|||
xpcAccessible::GetActionName(uint8_t aIndex, nsAString& aName) {
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -732,7 +732,7 @@ NS_IMETHODIMP
|
|||
xpcAccessible::GetActionDescription(uint8_t aIndex, nsAString& aDescription) {
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -753,7 +753,7 @@ NS_IMETHODIMP
|
|||
xpcAccessible::DoAction(uint8_t aIndex) {
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -768,7 +768,7 @@ NS_IMETHODIMP
|
|||
xpcAccessible::ScrollTo(uint32_t aHow) {
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -786,7 +786,7 @@ NS_IMETHODIMP
|
|||
xpcAccessible::ScrollToPoint(uint32_t aCoordinateType, int32_t aX, int32_t aY) {
|
||||
if (IntlGeneric().IsNull()) return NS_ERROR_FAILURE;
|
||||
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
@ -801,7 +801,7 @@ xpcAccessible::ScrollToPoint(uint32_t aCoordinateType, int32_t aX, int32_t aY) {
|
|||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessible::Announce(const nsAString& aAnnouncement, uint16_t aPriority) {
|
||||
if (ProxyAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
if (RemoteAccessible* proxy = IntlGeneric().AsProxy()) {
|
||||
#if defined(XP_WIN)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#else
|
||||
|
|
|
@ -177,7 +177,7 @@ xpcAccessibleGeneric* xpcAccessibleDocument::GetAccessible(
|
|||
}
|
||||
|
||||
xpcAccessibleGeneric* xpcAccessibleDocument::GetXPCAccessible(
|
||||
ProxyAccessible* aProxy) {
|
||||
RemoteAccessible* aProxy) {
|
||||
MOZ_ASSERT(mRemote);
|
||||
MOZ_ASSERT(aProxy->Document() == mIntl.AsProxy());
|
||||
if (aProxy->IsDoc()) {
|
||||
|
|
|
@ -28,7 +28,7 @@ class xpcAccessibleDocument : public xpcAccessibleHyperText,
|
|||
mCache(kDefaultCacheLength),
|
||||
mRemote(false) {}
|
||||
|
||||
xpcAccessibleDocument(ProxyAccessible* aProxy, uint32_t aInterfaces)
|
||||
xpcAccessibleDocument(RemoteAccessible* aProxy, uint32_t aInterfaces)
|
||||
: xpcAccessibleHyperText(aProxy, aInterfaces),
|
||||
mCache(kDefaultCacheLength),
|
||||
mRemote(true) {}
|
||||
|
@ -52,7 +52,7 @@ class xpcAccessibleDocument : public xpcAccessibleHyperText,
|
|||
* Return XPCOM wrapper for the internal accessible.
|
||||
*/
|
||||
xpcAccessibleGeneric* GetAccessible(LocalAccessible* aAccessible);
|
||||
xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy);
|
||||
xpcAccessibleGeneric* GetXPCAccessible(RemoteAccessible* aProxy);
|
||||
|
||||
virtual void Shutdown() override;
|
||||
|
||||
|
@ -82,7 +82,7 @@ class xpcAccessibleDocument : public xpcAccessibleHyperText,
|
|||
}
|
||||
}
|
||||
|
||||
void NotifyOfShutdown(ProxyAccessible* aProxy) {
|
||||
void NotifyOfShutdown(RemoteAccessible* aProxy) {
|
||||
MOZ_ASSERT(mRemote);
|
||||
xpcAccessibleGeneric* xpcAcc = mCache.Get(aProxy);
|
||||
if (xpcAcc) {
|
||||
|
@ -98,8 +98,8 @@ class xpcAccessibleDocument : public xpcAccessibleHyperText,
|
|||
|
||||
friend class DocManager;
|
||||
friend class DocAccessible;
|
||||
friend class ProxyAccessible;
|
||||
friend class ProxyAccessibleBase<ProxyAccessible>;
|
||||
friend class RemoteAccessible;
|
||||
friend class RemoteAccessibleBase<RemoteAccessible>;
|
||||
friend class xpcAccessibleGeneric;
|
||||
|
||||
xpcAccessibleDocument(const xpcAccessibleDocument&) = delete;
|
||||
|
|
|
@ -40,7 +40,7 @@ xpcAccessibleGeneric::~xpcAccessibleGeneric() {
|
|||
xpcDoc->NotifyOfShutdown(acc);
|
||||
}
|
||||
} else {
|
||||
ProxyAccessible* proxy = mIntl.AsProxy();
|
||||
RemoteAccessible* proxy = mIntl.AsProxy();
|
||||
if (!proxy->IsDoc()) {
|
||||
xpcDoc = GetAccService()->GetXPCDocument(proxy->Document());
|
||||
xpcDoc->NotifyOfShutdown(proxy);
|
||||
|
|
|
@ -33,7 +33,7 @@ class xpcAccessibleGeneric : public xpcAccessible,
|
|||
if (aInternal->IsLink()) mSupportedIfaces |= eHyperLink;
|
||||
}
|
||||
|
||||
xpcAccessibleGeneric(ProxyAccessible* aProxy, uint8_t aInterfaces)
|
||||
xpcAccessibleGeneric(RemoteAccessible* aProxy, uint8_t aInterfaces)
|
||||
: mIntl(aProxy), mSupportedIfaces(aInterfaces) {}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -715,7 +715,7 @@ xpcAccessibleHyperText::GetLinkIndex(nsIAccessibleHyperLink* aLink,
|
|||
#else
|
||||
xpcAccessibleHyperText* linkHyperText =
|
||||
static_cast<xpcAccessibleHyperText*>(xpcLink.get());
|
||||
ProxyAccessible* proxyLink = linkHyperText->mIntl.AsProxy();
|
||||
RemoteAccessible* proxyLink = linkHyperText->mIntl.AsProxy();
|
||||
if (proxyLink) {
|
||||
*aIndex = mIntl.AsProxy()->LinkIndexOf(proxyLink);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class xpcAccessibleHyperText : public xpcAccessibleGeneric,
|
|||
}
|
||||
}
|
||||
|
||||
xpcAccessibleHyperText(ProxyAccessible* aProxy, uint32_t aInterfaces)
|
||||
xpcAccessibleHyperText(RemoteAccessible* aProxy, uint32_t aInterfaces)
|
||||
: xpcAccessibleGeneric(aProxy, aInterfaces) {
|
||||
mSupportedIfaces |= eText;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ class xpcAccessibleImage : public xpcAccessibleGeneric,
|
|||
explicit xpcAccessibleImage(LocalAccessible* aIntl)
|
||||
: xpcAccessibleGeneric(aIntl) {}
|
||||
|
||||
xpcAccessibleImage(ProxyAccessible* aProxy, uint32_t aInterfaces)
|
||||
xpcAccessibleImage(RemoteAccessible* aProxy, uint32_t aInterfaces)
|
||||
: xpcAccessibleGeneric(aProxy, aInterfaces) {}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -22,7 +22,7 @@ class xpcAccessibleTable : public xpcAccessibleHyperText,
|
|||
explicit xpcAccessibleTable(LocalAccessible* aIntl)
|
||||
: xpcAccessibleHyperText(aIntl) {}
|
||||
|
||||
xpcAccessibleTable(ProxyAccessible* aProxy, uint32_t aInterfaces)
|
||||
xpcAccessibleTable(RemoteAccessible* aProxy, uint32_t aInterfaces)
|
||||
: xpcAccessibleHyperText(aProxy, aInterfaces) {}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -23,7 +23,7 @@ class xpcAccessibleTableCell : public xpcAccessibleHyperText,
|
|||
explicit xpcAccessibleTableCell(LocalAccessible* aIntl)
|
||||
: xpcAccessibleHyperText(aIntl) {}
|
||||
|
||||
xpcAccessibleTableCell(ProxyAccessible* aProxy, uint32_t aInterfaces)
|
||||
xpcAccessibleTableCell(RemoteAccessible* aProxy, uint32_t aInterfaces)
|
||||
: xpcAccessibleHyperText(aProxy, aInterfaces) {}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#ifdef ACCESSIBILITY
|
||||
# include "mozilla/a11y/DocAccessibleParent.h"
|
||||
# include "mozilla/a11y/Platform.h"
|
||||
# include "mozilla/a11y/ProxyAccessibleBase.h"
|
||||
# include "mozilla/a11y/RemoteAccessibleBase.h"
|
||||
# include "nsAccessibilityService.h"
|
||||
# if defined(XP_WIN)
|
||||
# include "mozilla/a11y/AccessibleWrap.h"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#ifdef ACCESSIBILITY
|
||||
# ifdef XP_WIN
|
||||
# include "mozilla/a11y/ProxyAccessible.h"
|
||||
# include "mozilla/a11y/RemoteAccessible.h"
|
||||
# include "mozilla/a11y/ProxyWrappers.h"
|
||||
# endif
|
||||
# include "mozilla/a11y/DocAccessible.h"
|
||||
|
@ -156,7 +156,7 @@ BrowserBridgeChild::RecvSetEmbeddedDocAccessibleCOMProxy(
|
|||
}
|
||||
RefPtr<IDispatch> comProxy(aCOMProxy.Get());
|
||||
mEmbeddedDocAccessible =
|
||||
new a11y::RemoteIframeDocProxyAccessibleWrap(comProxy);
|
||||
new a11y::RemoteIframeDocRemoteAccessibleWrap(comProxy);
|
||||
#endif
|
||||
return IPC_OK();
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
namespace mozilla {
|
||||
|
||||
namespace a11y {
|
||||
class RemoteIframeDocProxyAccessibleWrap;
|
||||
class RemoteIframeDocRemoteAccessibleWrap;
|
||||
}
|
||||
|
||||
namespace dom {
|
||||
|
@ -58,7 +58,7 @@ class BrowserBridgeChild : public PBrowserBridgeChild {
|
|||
already_AddRefed<BrowserBridgeHost> FinishInit(nsFrameLoader* aFrameLoader);
|
||||
|
||||
#if defined(ACCESSIBILITY) && defined(XP_WIN)
|
||||
a11y::RemoteIframeDocProxyAccessibleWrap* GetEmbeddedDocAccessible() {
|
||||
a11y::RemoteIframeDocRemoteAccessibleWrap* GetEmbeddedDocAccessible() {
|
||||
return mEmbeddedDocAccessible;
|
||||
}
|
||||
#endif
|
||||
|
@ -111,7 +111,7 @@ class BrowserBridgeChild : public PBrowserBridgeChild {
|
|||
RefPtr<nsFrameLoader> mFrameLoader;
|
||||
RefPtr<BrowsingContext> mBrowsingContext;
|
||||
#if defined(ACCESSIBILITY) && defined(XP_WIN)
|
||||
RefPtr<a11y::RemoteIframeDocProxyAccessibleWrap> mEmbeddedDocAccessible;
|
||||
RefPtr<a11y::RemoteIframeDocRemoteAccessibleWrap> mEmbeddedDocAccessible;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#ifdef ACCESSIBILITY
|
||||
# include "mozilla/a11y/DocAccessibleParent.h"
|
||||
# include "mozilla/a11y/Platform.h"
|
||||
# include "mozilla/a11y/ProxyAccessibleBase.h"
|
||||
# include "mozilla/a11y/RemoteAccessibleBase.h"
|
||||
# include "nsAccessibilityService.h"
|
||||
#endif
|
||||
#include "mozilla/Components.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче