Backed out changeset e802d78f9459 (
bug 1074917)
--- a/accessible/atk/AccessibleWrap.cpp
+++ b/accessible/atk/AccessibleWrap.cpp
@@ -887,28 +887,29 @@ TranslateStates(uint64_t aState, AtkStat
bitMask <<= 1;
++ stateIndex;
}
}
AtkStateSet *
refStateSetCB(AtkObject *aAtkObj)
{
- AtkStateSet *state_set = nullptr;
- state_set = ATK_OBJECT_CLASS(parent_class)->ref_state_set(aAtkObj);
+ AtkStateSet *state_set = nullptr;
+ state_set = ATK_OBJECT_CLASS(parent_class)->ref_state_set(aAtkObj);
- AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
- if (accWrap)
+ AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
+ if (!accWrap) {
+ TranslateStates(states::DEFUNCT, state_set);
+ return state_set;
+ }
+
+ // Map states
TranslateStates(accWrap->State(), state_set);
- else if (ProxyAccessible* proxy = GetProxy(aAtkObj))
- TranslateStates(proxy->State(), state_set);
- else
- TranslateStates(states::DEFUNCT, state_set);
- return state_set;
+ return state_set;
}
static void
UpdateAtkRelation(RelationType aType, Accessible* aAcc,
AtkRelationType aAtkType, AtkRelationSet* aAtkSet)
{
if (aAtkType == ATK_RELATION_NULL)
return;
--- a/accessible/ipc/DocAccessibleChild.cpp
+++ b/accessible/ipc/DocAccessibleChild.cpp
@@ -31,24 +31,10 @@ DocAccessibleChild::ShowEvent(AccShowEve
Accessible* parent = aShowEvent->Parent();
uint64_t parentID = parent->IsDoc() ? 0 : reinterpret_cast<uint64_t>(parent->UniqueID());
uint32_t idxInParent = aShowEvent->GetAccessible()->IndexInParent();
nsTArray<AccessibleData> shownTree;
ShowEventData data(parentID, idxInParent, shownTree);
SerializeTree(aShowEvent->GetAccessible(), data.NewTree());
SendShowEvent(data);
}
-
-bool
-DocAccessibleChild::RecvState(const uint64_t& aID, uint64_t* aState)
-{
- Accessible* acc = mDoc->GetAccessibleByUniqueID((void*)aID);
- if (!acc) {
- *aState = states::DEFUNCT;
- return true;
- }
-
- *aState = acc->State();
-
- return true;
}
}
-}
--- a/accessible/ipc/DocAccessibleChild.h
+++ b/accessible/ipc/DocAccessibleChild.h
@@ -28,21 +28,16 @@ public:
~DocAccessibleChild()
{
mDoc->SetIPCDoc(nullptr);
MOZ_COUNT_DTOR(DocAccessibleChild);
}
void ShowEvent(AccShowEvent* aShowEvent);
- /*
- * Return the state for the accessible with given ID.
- */
- virtual bool RecvState(const uint64_t& aID, uint64_t* aState) MOZ_OVERRIDE;
-
private:
DocAccessible* mDoc;
};
}
}
#endif
--- a/accessible/ipc/PDocAccessible.ipdl
+++ b/accessible/ipc/PDocAccessible.ipdl
@@ -19,29 +19,26 @@ struct AccessibleData
struct ShowEventData
{
uint64_t ID;
uint32_t Idx;
AccessibleData[] NewTree;
};
-prio(normal upto high) sync protocol PDocAccessible
+protocol PDocAccessible
{
manager PContent;
parent:
__delete__();
/*
* Notify the parent process the document in the child process is firing an
* event.
*/
Event(uint32_t type);
ShowEvent(ShowEventData data);
HideEvent(uint64_t aRootID);
-
-child:
- prio(high) sync State(uint64_t aID) returns(uint64_t states);
};
}
}
--- a/accessible/ipc/ProxyAccessible.cpp
+++ b/accessible/ipc/ProxyAccessible.cpp
@@ -1,17 +1,16 @@
/* -*- 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 "ProxyAccessible.h"
#include "DocAccessibleParent.h"
-#include "mozilla/unused.h"
#include "mozilla/a11y/Platform.h"
namespace mozilla {
namespace a11y {
void
ProxyAccessible::Shutdown()
{
@@ -34,18 +33,10 @@ ProxyAccessible::SetChildDoc(DocAccessib
mChildren.AppendElement(aParent);
mOuterDoc = true;
} else {
MOZ_ASSERT(mChildren.Length() == 1);
mChildren.Clear();
mOuterDoc = false;
}
}
-
-uint64_t
-ProxyAccessible::State() const
-{
- uint64_t state = 0;
- unused << mDoc->SendState(mID, &state);
- return state;
}
}
-}
--- a/accessible/ipc/ProxyAccessible.h
+++ b/accessible/ipc/ProxyAccessible.h
@@ -49,21 +49,16 @@ public:
*/
ProxyAccessible* Parent() const { return mParent; }
/**
* Get the role of the accessible we're proxying.
*/
role Role() const { return mRole; }
- /*
- * Return the states for the proxied accessible.
- */
- uint64_t State() const;
-
/**
* Allow the platform to store a pointers worth of data on us.
*/
uintptr_t GetWrapper() const { return mWrapper; }
void SetWrapper(uintptr_t aWrapper) { mWrapper = aWrapper; }
/*
* Return the ID of the accessible being proxied.