Backed out changeset a2b189275d7a (bug 1268544) for asserting in Windows M(oth) jobs. r=backout on a CLOSED TREE

--HG--
rename : accessible/ipc/other/DocAccessibleChild.cpp => accessible/ipc/DocAccessibleChild.cpp
rename : accessible/ipc/other/DocAccessibleChild.h => accessible/ipc/DocAccessibleChild.h
rename : accessible/ipc/win/PDocAccessible.ipdl => accessible/ipc/PDocAccessible.ipdl
This commit is contained in:
Sebastian Hengst 2016-08-19 10:04:23 +02:00
Родитель 8e027d975c
Коммит 87b8b23d92
21 изменённых файлов: 148 добавлений и 589 удалений

Просмотреть файл

@ -36,7 +36,6 @@ LOCAL_INCLUDES += [
'/accessible/generic',
'/accessible/html',
'/accessible/ipc',
'/accessible/ipc/other',
'/accessible/xpcom',
'/accessible/xul',
'/other-licenses/atk-1.0',

Просмотреть файл

@ -854,11 +854,11 @@ Accessible::HandleAccEvent(AccEvent* aEvent)
ipcDoc->SendEvent(id, aEvent->GetEventType());
break;
case nsIAccessibleEvent::EVENT_STATE_CHANGE: {
AccStateChangeEvent* event = downcast_accEvent(aEvent);
ipcDoc->SendStateChangeEvent(id, event->GetState(),
event->IsStateEnabled());
break;
}
AccStateChangeEvent* event = downcast_accEvent(aEvent);
ipcDoc->SendStateChangeEvent(id, event->GetState(),
event->IsStateEnabled());
break;
}
case nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED: {
AccCaretMoveEvent* event = downcast_accEvent(aEvent);
ipcDoc->SendCaretMoveEvent(id, event->GetCaretOffset());
@ -873,7 +873,7 @@ Accessible::HandleAccEvent(AccEvent* aEvent)
event->IsTextInserted(),
event->IsFromUserInput());
break;
}
}
case nsIAccessibleEvent::EVENT_SELECTION:
case nsIAccessibleEvent::EVENT_SELECTION_ADD:
case nsIAccessibleEvent::EVENT_SELECTION_REMOVE: {
@ -882,9 +882,9 @@ Accessible::HandleAccEvent(AccEvent* aEvent)
reinterpret_cast<uintptr_t>(selEvent->Widget());
ipcDoc->SendSelectionEvent(id, widgetID, aEvent->GetEventType());
break;
}
}
default:
ipcDoc->SendEvent(id, aEvent->GetEventType());
ipcDoc->SendEvent(id, aEvent->GetEventType());
}
}
}

Просмотреть файл

@ -577,7 +577,7 @@ protected:
*/
void SetIPCDoc(DocAccessibleChild* aIPCDoc) { mIPCDoc = aIPCDoc; }
friend class DocAccessibleChildBase;
friend class DocAccessibleChild;
/**
* Used to fire scrolling end event after page scroll.

Просмотреть файл

@ -28,6 +28,7 @@ UNIFIED_SOURCES += [
LOCAL_INCLUDES += [
'/accessible/base',
'/accessible/html',
'/accessible/ipc',
'/accessible/xpcom',
'/accessible/xul',
'/dom/base',
@ -35,15 +36,6 @@ LOCAL_INCLUDES += [
'/layout/xul',
]
if CONFIG['OS_ARCH'] == 'WINNT':
LOCAL_INCLUDES += [
'/accessible/ipc/win',
]
else:
LOCAL_INCLUDES += [
'/accessible/ipc/other',
]
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
LOCAL_INCLUDES += [
'/accessible/atk',

Просмотреть файл

@ -24,6 +24,63 @@
namespace mozilla {
namespace a11y {
static uint32_t
InterfacesFor(Accessible* aAcc)
{
uint32_t interfaces = 0;
if (aAcc->IsHyperText() && aAcc->AsHyperText()->IsTextRole())
interfaces |= Interfaces::HYPERTEXT;
if (aAcc->IsLink())
interfaces |= Interfaces::HYPERLINK;
if (aAcc->HasNumericValue())
interfaces |= Interfaces::VALUE;
if (aAcc->IsImage())
interfaces |= Interfaces::IMAGE;
if (aAcc->IsTable()) {
interfaces |= Interfaces::TABLE;
}
if (aAcc->IsTableCell())
interfaces |= Interfaces::TABLECELL;
if (aAcc->IsDoc())
interfaces |= Interfaces::DOCUMENT;
if (aAcc->IsSelect()) {
interfaces |= Interfaces::SELECTION;
}
if (aAcc->ActionCount()) {
interfaces |= Interfaces::ACTION;
}
return interfaces;
}
static void
SerializeTree(Accessible* aRoot, nsTArray<AccessibleData>& aTree)
{
uint64_t id = reinterpret_cast<uint64_t>(aRoot->UniqueID());
uint32_t role = aRoot->Role();
uint32_t childCount = aRoot->ChildCount();
uint32_t interfaces = InterfacesFor(aRoot);
// OuterDocAccessibles are special because we don't want to serialize the
// child doc here, we'll call PDocAccessibleConstructor in
// NotificationController.
MOZ_ASSERT(!aRoot->IsDoc(), "documents shouldn't be serialized");
if (aRoot->IsOuterDoc())
childCount = 0;
aTree.AppendElement(AccessibleData(id, role, childCount, interfaces));
for (uint32_t i = 0; i < childCount; i++)
SerializeTree(aRoot->GetChildAt(i), aTree);
}
Accessible*
DocAccessibleChild::IdToAccessible(const uint64_t& aID) const
{
@ -85,6 +142,18 @@ DocAccessibleChild::IdToTableAccessible(const uint64_t& aID) const
return (acc && acc->IsTable()) ? acc->AsTable() : nullptr;
}
void
DocAccessibleChild::ShowEvent(AccShowEvent* aShowEvent)
{
Accessible* parent = aShowEvent->Parent();
uint64_t parentID = parent->IsDoc() ? 0 : reinterpret_cast<uint64_t>(parent->UniqueID());
uint32_t idxInParent = aShowEvent->InsertionIndex();
nsTArray<AccessibleData> shownTree;
ShowEventData data(parentID, idxInParent, shownTree);
SerializeTree(aShowEvent->GetAccessible(), data.NewTree());
SendShowEvent(data, aShowEvent->IsFromUserInput());
}
bool
DocAccessibleChild::RecvState(const uint64_t& aID, uint64_t* aState)
{

Просмотреть файл

@ -7,36 +7,58 @@
#ifndef mozilla_a11y_DocAccessibleChild_h
#define mozilla_a11y_DocAccessibleChild_h
#include "mozilla/a11y/DocAccessibleChildBase.h"
#include "mozilla/a11y/DocAccessible.h"
#include "mozilla/a11y/PDocAccessibleChild.h"
#include "nsISupportsImpl.h"
namespace mozilla {
namespace a11y {
class Accessible;
class HyperTextAccessible;
class TextLeafAccessible;
class ImageAccessible;
class TableAccessible;
class TableCellAccessible;
class AccShowEvent;
/*
* These objects handle content side communication for an accessible document,
* and their lifetime is the same as the document they represent.
*/
class DocAccessibleChild : public DocAccessibleChildBase
/*
* These objects handle content side communication for an accessible document,
* and their lifetime is the same as the document they represent.
*/
class DocAccessibleChild : public PDocAccessibleChild
{
public:
explicit DocAccessibleChild(DocAccessible* aDoc)
: DocAccessibleChildBase(aDoc)
{
MOZ_COUNT_CTOR_INHERITED(DocAccessibleChild, DocAccessibleChildBase);
}
explicit DocAccessibleChild(DocAccessible* aDoc) :
mDoc(aDoc)
{ MOZ_COUNT_CTOR(DocAccessibleChild); }
~DocAccessibleChild()
{
MOZ_COUNT_DTOR_INHERITED(DocAccessibleChild, DocAccessibleChildBase);
// Shutdown() should have been called, but maybe it isn't if the process is
// killed?
MOZ_ASSERT(!mDoc);
if (mDoc)
mDoc->SetIPCDoc(nullptr);
MOZ_COUNT_DTOR(DocAccessibleChild);
}
void Shutdown()
{
mDoc->SetIPCDoc(nullptr);
mDoc = nullptr;
SendShutdown();
}
virtual void ActorDestroy(ActorDestroyReason) override
{
if (!mDoc)
return;
mDoc->SetIPCDoc(nullptr);
mDoc = nullptr;
}
void ShowEvent(AccShowEvent* aShowEvent);
/*
* Return the state for the accessible with given ID.
*/
@ -474,6 +496,8 @@ private:
bool PersistentPropertiesToArray(nsIPersistentProperties* aProps,
nsTArray<Attribute>* aAttributes);
DocAccessible* mDoc;
};
}

Просмотреть файл

@ -1,99 +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/. */
#include "mozilla/a11y/DocAccessibleChildBase.h"
#include "mozilla/a11y/ProxyAccessible.h"
#include "Accessible-inl.h"
namespace mozilla {
namespace a11y {
/* static */ uint32_t
DocAccessibleChildBase::InterfacesFor(Accessible* aAcc)
{
uint32_t interfaces = 0;
if (aAcc->IsHyperText() && aAcc->AsHyperText()->IsTextRole())
interfaces |= Interfaces::HYPERTEXT;
if (aAcc->IsLink())
interfaces |= Interfaces::HYPERLINK;
if (aAcc->HasNumericValue())
interfaces |= Interfaces::VALUE;
if (aAcc->IsImage())
interfaces |= Interfaces::IMAGE;
if (aAcc->IsTable()) {
interfaces |= Interfaces::TABLE;
}
if (aAcc->IsTableCell())
interfaces |= Interfaces::TABLECELL;
if (aAcc->IsDoc())
interfaces |= Interfaces::DOCUMENT;
if (aAcc->IsSelect()) {
interfaces |= Interfaces::SELECTION;
}
if (aAcc->ActionCount()) {
interfaces |= Interfaces::ACTION;
}
return interfaces;
}
/* static */ void
DocAccessibleChildBase::SerializeTree(Accessible* aRoot,
nsTArray<AccessibleData>& aTree)
{
uint64_t id = reinterpret_cast<uint64_t>(aRoot->UniqueID());
uint32_t role = aRoot->Role();
uint32_t childCount = aRoot->ChildCount();
uint32_t interfaces = InterfacesFor(aRoot);
#if defined(XP_WIN)
IAccessibleHolder holder(CreateHolderFromAccessible(aRoot));
#endif
// OuterDocAccessibles are special because we don't want to serialize the
// child doc here, we'll call PDocAccessibleConstructor in
// NotificationController.
MOZ_ASSERT(!aRoot->IsDoc(), "documents shouldn't be serialized");
if (aRoot->IsOuterDoc()) {
childCount = 0;
}
#if defined(XP_WIN)
aTree.AppendElement(AccessibleData(id, role, childCount, interfaces,
holder));
#else
aTree.AppendElement(AccessibleData(id, role, childCount, interfaces));
#endif
for (uint32_t i = 0; i < childCount; i++) {
SerializeTree(aRoot->GetChildAt(i), aTree);
}
}
void
DocAccessibleChildBase::ShowEvent(AccShowEvent* aShowEvent)
{
Accessible* parent = aShowEvent->Parent();
uint64_t parentID = parent->IsDoc() ? 0 : reinterpret_cast<uint64_t>(parent->UniqueID());
uint32_t idxInParent = aShowEvent->InsertionIndex();
nsTArray<AccessibleData> shownTree;
ShowEventData data(parentID, idxInParent, shownTree);
SerializeTree(aShowEvent->GetAccessible(), data.NewTree());
SendShowEvent(data, aShowEvent->IsFromUserInput());
}
} // namespace a11y
} // namespace mozilla

Просмотреть файл

@ -1,70 +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_DocAccessibleChildBase_h
#define mozilla_a11y_DocAccessibleChildBase_h
#include "mozilla/a11y/DocAccessible.h"
#include "mozilla/a11y/PDocAccessibleChild.h"
#include "nsISupportsImpl.h"
namespace mozilla {
namespace a11y {
class Accessible;
class AccShowEvent;
class DocAccessibleChildBase : public PDocAccessibleChild
{
public:
explicit DocAccessibleChildBase(DocAccessible* aDoc)
: mDoc(aDoc)
{
MOZ_COUNT_CTOR(DocAccessibleChildBase);
}
~DocAccessibleChildBase()
{
// Shutdown() should have been called, but maybe it isn't if the process is
// killed?
MOZ_ASSERT(!mDoc);
if (mDoc) {
mDoc->SetIPCDoc(nullptr);
}
MOZ_COUNT_DTOR(DocAccessibleChildBase);
}
void Shutdown()
{
mDoc->SetIPCDoc(nullptr);
mDoc = nullptr;
SendShutdown();
}
void ShowEvent(AccShowEvent* aShowEvent);
virtual void ActorDestroy(ActorDestroyReason) override
{
if (!mDoc) {
return;
}
mDoc->SetIPCDoc(nullptr);
mDoc = nullptr;
}
protected:
static uint32_t InterfacesFor(Accessible* aAcc);
static void SerializeTree(Accessible* aRoot, nsTArray<AccessibleData>& aTree);
DocAccessible* mDoc;
};
} // namespace a11y
} // namespace mozilla
#endif // mozilla_a11y_DocAccessibleChildBase_h

Просмотреть файл

@ -6,6 +6,7 @@
#include "DocAccessibleParent.h"
#include "mozilla/a11y/Platform.h"
#include "ProxyAccessible.h"
#include "mozilla/dom/TabParent.h"
#include "xpcAccessibleDocument.h"
#include "xpcAccEvents.h"
@ -102,24 +103,9 @@ DocAccessibleParent::AddSubtree(ProxyAccessible* aParent,
}
auto role = static_cast<a11y::role>(newChild.Role());
#if defined(XP_WIN)
const IAccessibleHolder& proxyStream = newChild.COMProxy();
RefPtr<IAccessible> comPtr(proxyStream.Get());
if (!comPtr) {
NS_ERROR("Could not obtain remote IAccessible interface");
return 0;
}
ProxyAccessible* newProxy =
new ProxyAccessible(newChild.ID(), aParent, this, role,
newChild.Interfaces(), comPtr);
#else
ProxyAccessible* newProxy =
new ProxyAccessible(newChild.ID(), aParent, this, role,
newChild.Interfaces());
#endif
aParent->AddChildAt(aIdxInParent, newProxy);
mAccessibles.PutEntry(newChild.ID())->mProxy = newProxy;
ProxyCreated(newProxy, newChild.Interfaces());
@ -466,32 +452,5 @@ DocAccessibleParent::GetXPCAccessible(ProxyAccessible* aProxy)
return doc->GetXPCAccessible(aProxy);
}
#if defined(XP_WIN)
/**
* @param aCOMProxy COM Proxy to the document in the content process.
* @param aParentCOMProxy COM Proxy to the OuterDocAccessible that is
* the parent of the document. The content process will use this
* proxy when traversing up across the content/chrome boundary.
*/
bool
DocAccessibleParent::RecvCOMProxy(const IAccessibleHolder& aCOMProxy,
IAccessibleHolder* aParentCOMProxy)
{
RefPtr<IAccessible> ptr(aCOMProxy.Get());
SetCOMInterface(ptr);
Accessible* outerDoc = OuterDocOfRemoteBrowser();
MOZ_ASSERT(outerDoc);
IAccessible* rawNative = nullptr;
if (outerDoc) {
outerDoc->GetNativeInterface((void**) &rawNative);
}
aParentCOMProxy->Set(IAccessibleHolder::COMPtrType(rawNative));
return true;
}
#endif // defined(XP_WIN)
} // a11y
} // mozilla

Просмотреть файл

@ -8,8 +8,8 @@
#define mozilla_a11y_DocAccessibleParent_h
#include "nsAccessibilityService.h"
#include "ProxyAccessible.h"
#include "mozilla/a11y/PDocAccessibleParent.h"
#include "mozilla/a11y/ProxyAccessible.h"
#include "nsClassHashtable.h"
#include "nsHashKeys.h"
#include "nsISupportsImpl.h"
@ -142,11 +142,6 @@ public:
const DocAccessibleParent* ChildDocAt(size_t aIdx) const
{ return mChildDocs[aIdx]; }
#if defined(XP_WIN)
virtual bool RecvCOMProxy(const IAccessibleHolder& aCOMProxy,
IAccessibleHolder* aParentCOMProxy) override;
#endif
private:
class ProxyEntry : public PLDHashEntryHdr

Просмотреть файл

@ -4,22 +4,38 @@
# 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/.
if CONFIG['OS_ARCH'] == 'WINNT':
DIRS += ['win']
LOCAL_INCLUDES += [
'/accessible/ipc/win',
'/accessible/windows/ia2',
'/accessible/windows/msaa',
IPDL_SOURCES += ['PDocAccessible.ipdl']
# with --disable-accessibility we need to compile PDocAccessible.ipdl, but not
# the C++.
if CONFIG['ACCESSIBILITY']:
EXPORTS.mozilla.a11y += [
'DocAccessibleChild.h',
'DocAccessibleParent.h',
'ProxyAccessible.h'
]
else:
DIRS += ['other']
LOCAL_INCLUDES += [
'/accessible/ipc/other',
SOURCES += [
'DocAccessibleChild.cpp',
'DocAccessibleParent.cpp',
'ProxyAccessible.cpp'
]
LOCAL_INCLUDES += [
'../base',
'../generic',
'../xpcom',
]
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
LOCAL_INCLUDES += [
'/accessible/atk',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
LOCAL_INCLUDES += [
'/accessible/windows/ia2',
'/accessible/windows/msaa',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
LOCAL_INCLUDES += [
'/accessible/mac',
@ -29,30 +45,9 @@ else:
'/accessible/other',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
# with --disable-accessibility we need to compile PDocAccessible.ipdl, but not
# the C++.
if CONFIG['ACCESSIBILITY']:
EXPORTS.mozilla.a11y += [
'DocAccessibleChildBase.h',
'DocAccessibleParent.h',
'ProxyAccessible.h'
]
UNIFIED_SOURCES += [
'DocAccessibleChildBase.cpp',
'DocAccessibleParent.cpp',
'ProxyAccessible.cpp'
]
LOCAL_INCLUDES += [
'/accessible/base',
'/accessible/generic',
'/accessible/xpcom',
]
FINAL_LIBRARY = 'xul'
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']

Просмотреть файл

@ -1,47 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
IPDL_SOURCES += ['PDocAccessible.ipdl']
# with --disable-accessibility we need to compile PDocAccessible.ipdl, but not
# the C++.
if CONFIG['ACCESSIBILITY']:
EXPORTS.mozilla.a11y += [
'DocAccessibleChild.h',
'ProxyAccessible.h'
]
SOURCES += [
'DocAccessibleChild.cpp',
'ProxyAccessible.cpp'
]
LOCAL_INCLUDES += [
'../../base',
'../../generic',
'../../xpcom',
]
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
LOCAL_INCLUDES += [
'/accessible/atk',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
LOCAL_INCLUDES += [
'/accessible/mac',
]
else:
LOCAL_INCLUDES += [
'/accessible/other',
]
include('/ipc/chromium/chromium-config.mozbuild')
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
FINAL_LIBRARY = 'xul'

Просмотреть файл

@ -1,50 +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/. */
#include "mozilla/a11y/COMPtrTypes.h"
#include "MainThreadUtils.h"
#include "mozilla/a11y/Accessible.h"
#include "mozilla/Move.h"
#include "mozilla/mscom/MainThreadHandoff.h"
#include "mozilla/RefPtr.h"
using mozilla::mscom::MainThreadHandoff;
using mozilla::mscom::STAUniquePtr;
namespace mozilla {
namespace a11y {
IAccessibleHolder
CreateHolderFromAccessible(Accessible* aAccToWrap)
{
MOZ_ASSERT(aAccToWrap && NS_IsMainThread());
if (!aAccToWrap) {
return nullptr;
}
IAccessible* rawNative = nullptr;
aAccToWrap->GetNativeInterface((void**)&rawNative);
MOZ_ASSERT(rawNative);
if (!rawNative) {
return nullptr;
}
STAUniquePtr<IAccessible> iaToProxy(rawNative);
IAccessible* rawIntercepted = nullptr;
HRESULT hr = MainThreadHandoff::WrapInterface(iaToProxy, &rawIntercepted);
MOZ_ASSERT(SUCCEEDED(hr));
if (FAILED(hr)) {
return nullptr;
}
IAccessibleHolder::COMPtrType iaIntercepted(rawIntercepted);
return IAccessibleHolder(Move(iaIntercepted));
}
} // namespace a11y
} // namespace mozilla

Просмотреть файл

@ -1,27 +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_COMPtrTypes_h
#define mozilla_a11y_COMPtrTypes_h
#include "mozilla/mscom/COMPtrHolder.h"
#include <oleacc.h>
namespace mozilla {
namespace a11y {
typedef mozilla::mscom::COMPtrHolder<IAccessible, IID_IAccessible> IAccessibleHolder;
class Accessible;
IAccessibleHolder
CreateHolderFromAccessible(Accessible* aAccToWrap);
} // namespace a11y
} // namespace mozilla
#endif // mozilla_a11y_COMPtrTypes_h

Просмотреть файл

@ -1,36 +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/. */
#include "DocAccessibleChild.h"
#include "Accessible-inl.h"
namespace mozilla {
namespace a11y {
DocAccessibleChild::DocAccessibleChild(DocAccessible* aDoc)
: DocAccessibleChildBase(aDoc)
{
MOZ_COUNT_CTOR_INHERITED(DocAccessibleChild, DocAccessibleChildBase);
}
DocAccessibleChild::~DocAccessibleChild()
{
MOZ_COUNT_DTOR_INHERITED(DocAccessibleChild, DocAccessibleChildBase);
}
void
DocAccessibleChild::SendCOMProxy(const IAccessibleHolder& aProxy)
{
IAccessibleHolder parentProxy;
PDocAccessibleChild::SendCOMProxy(aProxy, &parentProxy);
mParentProxy.reset(parentProxy.Release());
MOZ_ASSERT(mParentProxy);
}
} // namespace a11y
} // namespace mozilla

Просмотреть файл

@ -1,37 +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_DocAccessibleChild_h
#define mozilla_a11y_DocAccessibleChild_h
#include "mozilla/a11y/COMPtrTypes.h"
#include "mozilla/a11y/DocAccessibleChildBase.h"
#include "mozilla/mscom/Ptr.h"
namespace mozilla {
namespace a11y {
/*
* These objects handle content side communication for an accessible document,
* and their lifetime is the same as the document they represent.
*/
class DocAccessibleChild : public DocAccessibleChildBase
{
public:
explicit DocAccessibleChild(DocAccessible* aDoc);
~DocAccessibleChild();
void SendCOMProxy(const IAccessibleHolder& aProxy);
IAccessible* GetParentIAccessible() const { return mParentProxy.get(); }
private:
mscom::ProxyUniquePtr<IAccessible> mParentProxy;
};
} // namespace a11y
} // namespace mozilla
#endif // mozilla_a11y_DocAccessibleChild_h

Просмотреть файл

@ -1,73 +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/. */
include protocol PBrowser;
using mozilla::a11y::IAccessibleHolder from "mozilla/a11y/COMPtrTypes.h";
namespace mozilla {
namespace a11y {
struct AccessibleData
{
uint64_t ID;
uint32_t Role;
uint32_t ChildrenCount;
uint32_t Interfaces;
IAccessibleHolder COMProxy;
};
struct ShowEventData
{
uint64_t ID;
uint32_t Idx;
AccessibleData[] NewTree;
};
struct Attribute
{
nsCString Name;
nsString Value;
};
sync protocol PDocAccessible
{
manager PBrowser;
parent:
async Shutdown();
/*
* Notify the parent process the document in the child process is firing an
* event.
*/
async Event(uint64_t aID, uint32_t type);
async ShowEvent(ShowEventData data, bool aFromuser);
async HideEvent(uint64_t aRootID, bool aFromUser);
async StateChangeEvent(uint64_t aID, uint64_t aState, bool aEnabled);
async CaretMoveEvent(uint64_t aID, int32_t aOffset);
async TextChangeEvent(uint64_t aID, nsString aStr, int32_t aStart, uint32_t aLen,
bool aIsInsert, bool aFromUser);
async SelectionEvent(uint64_t aID, uint64_t aWidgetID, uint32_t aType);
async RoleChangedEvent(uint32_t aRole);
/*
* Tell the parent document to bind the existing document as a new child
* document.
*/
async BindChildDoc(PDocAccessible aChildDoc, uint64_t aID);
// For now we'll add the command to send the proxy here. This might move to
// PDocAccessible constructor in PBrowser.
sync COMProxy(IAccessibleHolder aDocCOMProxy)
returns(IAccessibleHolder aParentCOMProxy);
child:
async __delete__();
};
}
}

Просмотреть файл

@ -1,32 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
IPDL_SOURCES += ['PDocAccessible.ipdl']
# with --disable-accessibility we need to compile PDocAccessible.ipdl, but not
# the C++.
if CONFIG['ACCESSIBILITY']:
EXPORTS.mozilla.a11y += [
'COMPtrTypes.h',
'DocAccessibleChild.h',
]
SOURCES += [
'COMPtrTypes.cpp',
'DocAccessibleChild.cpp',
]
LOCAL_INCLUDES += [
'/accessible/base',
'/accessible/generic',
'/accessible/windows/ia2',
'/accessible/windows/msaa',
'/accessible/xpcom',
]
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

Просмотреть файл

@ -32,7 +32,6 @@ LOCAL_INCLUDES += [
'/accessible/generic',
'/accessible/html',
'/accessible/ipc',
'/accessible/ipc/other',
'/accessible/xul',
'/layout/generic',
'/layout/xul',

Просмотреть файл

@ -49,8 +49,6 @@ LOCAL_INCLUDES += [
'/accessible/base',
'/accessible/generic',
'/accessible/html',
'/accessible/ipc',
'/accessible/ipc/win',
'/accessible/windows',
'/accessible/windows/ia2',
'/accessible/windows/sdn',