Bug 1818726 part 2: Remove the aDispatchShowEvent argument to PDocAccessible::Cache. r=eeejay

This is no longer used.

Differential Revision: https://phabricator.services.mozilla.com/D171047
This commit is contained in:
James Teh 2023-02-28 09:19:33 +00:00
Родитель a1cc7c8fe9
Коммит 5f7a89e17f
7 изменённых файлов: 8 добавлений и 38 удалений

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

@ -492,7 +492,7 @@ void nsAccessibilityService::NotifyOfResolutionChange(
RefPtr<AccAttributes> fields = new AccAttributes();
fields->SetAttribute(nsGkAtoms::resolution, aResolution);
data.AppendElement(mozilla::a11y::CacheData(0, fields));
document->IPCDoc()->SendCache(CacheUpdateType::Update, data, false);
document->IPCDoc()->SendCache(CacheUpdateType::Update, data);
}
}
}
@ -507,7 +507,7 @@ void nsAccessibilityService::NotifyOfDevPixelRatioChange(
fields->SetAttribute(nsGkAtoms::_moz_device_pixel_ratio,
aAppUnitsPerDevPixel);
data.AppendElement(mozilla::a11y::CacheData(0, fields));
document->IPCDoc()->SendCache(CacheUpdateType::Update, data, false);
document->IPCDoc()->SendCache(CacheUpdateType::Update, data);
}
}
}

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

@ -1548,7 +1548,7 @@ void DocAccessible::ProcessQueuedCacheUpdates() {
}
if (data.Length()) {
IPCDoc()->SendCache(CacheUpdateType::Update, data, false);
IPCDoc()->SendCache(CacheUpdateType::Update, data);
}
}

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

@ -3143,7 +3143,7 @@ void LocalAccessible::SendCache(uint64_t aCacheDomain,
}
nsTArray<CacheData> data;
data.AppendElement(CacheData(ID(), fields));
ipcDoc->SendCache(aUpdateType, data, false);
ipcDoc->SendCache(aUpdateType, data);
if (profiler_thread_is_being_profiled_for_markers()) {
nsAutoCString updateTypeStr;

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

@ -639,7 +639,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvScrollingEvent(
mozilla::ipc::IPCResult DocAccessibleParent::RecvCache(
const mozilla::a11y::CacheUpdateType& aUpdateType,
nsTArray<CacheData>&& aData, const bool& aDispatchShowEvent) {
nsTArray<CacheData>&& aData) {
ACQUIRE_ANDROID_LOCK
if (mShutdown) {
return IPC_OK();
@ -655,30 +655,6 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvCache(
remote->ApplyCache(aUpdateType, entry.Fields());
}
if (aDispatchShowEvent && !aData.IsEmpty()) {
// We might need to dispatch a show event for an initial cache push. We
// should never dispatch a show event for a (non-initial) cache update.
MOZ_ASSERT(aUpdateType == CacheUpdateType::Initial);
RemoteAccessible* target = GetAccessible(aData.ElementAt(0).ID());
if (!target) {
MOZ_ASSERT_UNREACHABLE("No remote found for initial cache push!");
return IPC_OK();
}
// We never dispatch a show event for the doc itself.
MOZ_ASSERT(!target->IsDoc() && target->RemoteParent());
ProxyShowHideEvent(target, target->RemoteParent(), true, false);
if (nsCoreUtils::AccEventObserversExist()) {
xpcAccessibleGeneric* xpcAcc = GetXPCAccessible(target);
xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this);
nsINode* node = nullptr;
RefPtr<xpcAccEvent> event = new xpcAccEvent(
nsIAccessibleEvent::EVENT_SHOW, xpcAcc, doc, node, false);
nsCoreUtils::DispatchAccEvent(std::move(event));
}
}
if (nsCOMPtr<nsIObserverService> obsService =
services::GetObserverService()) {
obsService->NotifyObservers(nullptr, NS_ACCESSIBLE_CACHE_TOPIC, nullptr);

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

@ -151,7 +151,7 @@ class DocAccessibleParent : public RemoteAccessible,
virtual mozilla::ipc::IPCResult RecvCache(
const mozilla::a11y::CacheUpdateType& aUpdateType,
nsTArray<CacheData>&& aData, const bool& aDispatchShowEvent) override;
nsTArray<CacheData>&& aData) override;
virtual mozilla::ipc::IPCResult RecvSelectedAccessiblesChanged(
nsTArray<uint64_t>&& aSelectedIDs,

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

@ -131,11 +131,8 @@ parent:
/*
* Cache The World
* aDispatchShowEvent is true when a show event with the first accessible in
* the cache list as the target should be dispatched after the cache is
* populated. The show event will have a from-user flag value of false.
*/
async Cache(CacheUpdateType aUpdateType, CacheData[] aData, bool aDispatchShowEvent);
async Cache(CacheUpdateType aUpdateType, CacheData[] aData);
/*
* Lists of accessibles that either gained or lost a selected state.

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

@ -98,11 +98,8 @@ parent:
/*
* Cache The World
* aDispatchShowEvent is true when a show event with the first accessible in
* the cache list as the target should be dispatched after the cache is
* populated. The show event will have a from-user flag value of false.
*/
async Cache(CacheUpdateType aUpdateType, CacheData[] aData, bool aDispatchShowEvent);
async Cache(CacheUpdateType aUpdateType, CacheData[] aData);
/*
* Lists of accessibles that either gained or lost a selected state.