mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1251897 - DocAccessible constructor doesn't have to take root element as an argument, r=davidb
This commit is contained in:
parent
7505fe3457
commit
afc80cad93
@ -14,9 +14,8 @@ using namespace mozilla::a11y;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DocAccessibleWrap::
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell) :
|
||||
DocAccessible(aDocument, aRootContent, aPresShell), mActivated(false)
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell) :
|
||||
DocAccessible(aDocument, aPresShell), mActivated(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,7 @@ namespace a11y {
|
||||
class DocAccessibleWrap : public DocAccessible
|
||||
{
|
||||
public:
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell);
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell);
|
||||
virtual ~DocAccessibleWrap();
|
||||
|
||||
bool mActivated;
|
||||
|
@ -470,17 +470,15 @@ DocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
|
||||
|
||||
// We only create root accessibles for the true root, otherwise create a
|
||||
// doc accessible.
|
||||
nsIContent *rootElm = nsCoreUtils::GetRoleContent(aDocument);
|
||||
RefPtr<DocAccessible> docAcc = isRootDoc ?
|
||||
new RootAccessibleWrap(aDocument, rootElm, presShell) :
|
||||
new DocAccessibleWrap(aDocument, rootElm, presShell);
|
||||
new RootAccessibleWrap(aDocument, presShell) :
|
||||
new DocAccessibleWrap(aDocument, presShell);
|
||||
|
||||
// Cache the document accessible into document cache.
|
||||
mDocAccessibleCache.Put(aDocument, docAcc);
|
||||
|
||||
// Initialize the document accessible.
|
||||
docAcc->Init();
|
||||
docAcc->SetRoleMapEntry(aria::GetRoleMap(aDocument));
|
||||
|
||||
// Bind the document to the tree.
|
||||
if (isRootDoc) {
|
||||
|
@ -76,9 +76,8 @@ static const uint32_t kRelationAttrsLen = ArrayLength(kRelationAttrs);
|
||||
// Constructor/desctructor
|
||||
|
||||
DocAccessible::
|
||||
DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell) :
|
||||
HyperTextAccessibleWrap(aRootContent, this),
|
||||
DocAccessible(nsIDocument* aDocument, nsIPresShell* aPresShell) :
|
||||
HyperTextAccessibleWrap(nullptr, this),
|
||||
// XXX aaronl should we use an algorithm for the initial cache size?
|
||||
mAccessibleCache(kDefaultCacheLength),
|
||||
mNodeToAccessibleMap(kDefaultCacheLength),
|
||||
@ -1465,7 +1464,7 @@ DocAccessible::DoInitialUpdate()
|
||||
// miss the notification (since content tree change notifications are ignored
|
||||
// prior to initial update). Make sure the content element is valid.
|
||||
nsIContent* contentElm = nsCoreUtils::GetRoleContent(mDocumentNode);
|
||||
if (mContent != contentElm) {
|
||||
if (contentElm) {
|
||||
mContent = contentElm;
|
||||
SetRoleMapEntry(aria::GetRoleMap(mContent));
|
||||
}
|
||||
|
@ -50,8 +50,7 @@ class DocAccessible : public HyperTextAccessibleWrap,
|
||||
|
||||
public:
|
||||
|
||||
DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell);
|
||||
DocAccessible(nsIDocument* aDocument, nsIPresShell* aPresShell);
|
||||
|
||||
// nsIScrollPositionListener
|
||||
virtual void ScrollPositionWillChange(nscoord aX, nscoord aY) override {}
|
||||
|
@ -59,9 +59,8 @@ NS_IMPL_ISUPPORTS_INHERITED0(RootAccessible, DocAccessible)
|
||||
// Constructor/destructor
|
||||
|
||||
RootAccessible::
|
||||
RootAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell) :
|
||||
DocAccessibleWrap(aDocument, aRootContent, aPresShell)
|
||||
RootAccessible(nsIDocument* aDocument, nsIPresShell* aPresShell) :
|
||||
DocAccessibleWrap(aDocument, aPresShell)
|
||||
{
|
||||
mType = eRootType;
|
||||
}
|
||||
|
@ -22,8 +22,7 @@ class RootAccessible : public DocAccessibleWrap,
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
public:
|
||||
RootAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell);
|
||||
RootAccessible(nsIDocument* aDocument, nsIPresShell* aPresShell);
|
||||
|
||||
// nsIDOMEventListener
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) override;
|
||||
|
@ -14,8 +14,7 @@ namespace a11y {
|
||||
class DocAccessibleWrap : public DocAccessible
|
||||
{
|
||||
public:
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell);
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell);
|
||||
virtual ~DocAccessibleWrap();
|
||||
|
||||
};
|
||||
|
@ -10,9 +10,8 @@
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
DocAccessibleWrap::
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell) :
|
||||
DocAccessible(aDocument, aRootContent, aPresShell)
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell) :
|
||||
DocAccessible(aDocument, aPresShell)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -18,8 +18,7 @@ namespace a11y {
|
||||
class RootAccessibleWrap : public RootAccessible
|
||||
{
|
||||
public:
|
||||
RootAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell);
|
||||
RootAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell);
|
||||
virtual ~RootAccessibleWrap();
|
||||
|
||||
Class GetNativeType ();
|
||||
|
@ -16,9 +16,8 @@
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
RootAccessibleWrap::
|
||||
RootAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell) :
|
||||
RootAccessible(aDocument, aRootContent, aPresShell)
|
||||
RootAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell) :
|
||||
RootAccessible(aDocument, aPresShell)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -25,9 +25,8 @@ using namespace mozilla::a11y;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DocAccessibleWrap::
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell) :
|
||||
DocAccessible(aDocument, aRootContent, aPresShell), mHWND(nullptr)
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell) :
|
||||
DocAccessible(aDocument, aPresShell), mHWND(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,7 @@ namespace a11y {
|
||||
class DocAccessibleWrap : public DocAccessible
|
||||
{
|
||||
public:
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell);
|
||||
DocAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell);
|
||||
virtual ~DocAccessibleWrap();
|
||||
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
@ -15,9 +15,8 @@ using namespace mozilla::a11y;
|
||||
// Constructor/desctructor
|
||||
|
||||
RootAccessibleWrap::
|
||||
RootAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell) :
|
||||
RootAccessible(aDocument, aRootContent, aPresShell)
|
||||
RootAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell) :
|
||||
RootAccessible(aDocument, aPresShell)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,7 @@ namespace a11y {
|
||||
class RootAccessibleWrap : public RootAccessible
|
||||
{
|
||||
public:
|
||||
RootAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell);
|
||||
RootAccessibleWrap(nsIDocument* aDocument, nsIPresShell* aPresShell);
|
||||
virtual ~RootAccessibleWrap();
|
||||
|
||||
// RootAccessible
|
||||
|
Loading…
Reference in New Issue
Block a user