зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
a1cc7c8fe9
Коммит
5f7a89e17f
|
@ -492,7 +492,7 @@ void nsAccessibilityService::NotifyOfResolutionChange(
|
||||||
RefPtr<AccAttributes> fields = new AccAttributes();
|
RefPtr<AccAttributes> fields = new AccAttributes();
|
||||||
fields->SetAttribute(nsGkAtoms::resolution, aResolution);
|
fields->SetAttribute(nsGkAtoms::resolution, aResolution);
|
||||||
data.AppendElement(mozilla::a11y::CacheData(0, fields));
|
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,
|
fields->SetAttribute(nsGkAtoms::_moz_device_pixel_ratio,
|
||||||
aAppUnitsPerDevPixel);
|
aAppUnitsPerDevPixel);
|
||||||
data.AppendElement(mozilla::a11y::CacheData(0, fields));
|
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()) {
|
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;
|
nsTArray<CacheData> data;
|
||||||
data.AppendElement(CacheData(ID(), fields));
|
data.AppendElement(CacheData(ID(), fields));
|
||||||
ipcDoc->SendCache(aUpdateType, data, false);
|
ipcDoc->SendCache(aUpdateType, data);
|
||||||
|
|
||||||
if (profiler_thread_is_being_profiled_for_markers()) {
|
if (profiler_thread_is_being_profiled_for_markers()) {
|
||||||
nsAutoCString updateTypeStr;
|
nsAutoCString updateTypeStr;
|
||||||
|
|
|
@ -639,7 +639,7 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvScrollingEvent(
|
||||||
|
|
||||||
mozilla::ipc::IPCResult DocAccessibleParent::RecvCache(
|
mozilla::ipc::IPCResult DocAccessibleParent::RecvCache(
|
||||||
const mozilla::a11y::CacheUpdateType& aUpdateType,
|
const mozilla::a11y::CacheUpdateType& aUpdateType,
|
||||||
nsTArray<CacheData>&& aData, const bool& aDispatchShowEvent) {
|
nsTArray<CacheData>&& aData) {
|
||||||
ACQUIRE_ANDROID_LOCK
|
ACQUIRE_ANDROID_LOCK
|
||||||
if (mShutdown) {
|
if (mShutdown) {
|
||||||
return IPC_OK();
|
return IPC_OK();
|
||||||
|
@ -655,30 +655,6 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvCache(
|
||||||
remote->ApplyCache(aUpdateType, entry.Fields());
|
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 =
|
if (nsCOMPtr<nsIObserverService> obsService =
|
||||||
services::GetObserverService()) {
|
services::GetObserverService()) {
|
||||||
obsService->NotifyObservers(nullptr, NS_ACCESSIBLE_CACHE_TOPIC, nullptr);
|
obsService->NotifyObservers(nullptr, NS_ACCESSIBLE_CACHE_TOPIC, nullptr);
|
||||||
|
|
|
@ -151,7 +151,7 @@ class DocAccessibleParent : public RemoteAccessible,
|
||||||
|
|
||||||
virtual mozilla::ipc::IPCResult RecvCache(
|
virtual mozilla::ipc::IPCResult RecvCache(
|
||||||
const mozilla::a11y::CacheUpdateType& aUpdateType,
|
const mozilla::a11y::CacheUpdateType& aUpdateType,
|
||||||
nsTArray<CacheData>&& aData, const bool& aDispatchShowEvent) override;
|
nsTArray<CacheData>&& aData) override;
|
||||||
|
|
||||||
virtual mozilla::ipc::IPCResult RecvSelectedAccessiblesChanged(
|
virtual mozilla::ipc::IPCResult RecvSelectedAccessiblesChanged(
|
||||||
nsTArray<uint64_t>&& aSelectedIDs,
|
nsTArray<uint64_t>&& aSelectedIDs,
|
||||||
|
|
|
@ -131,11 +131,8 @@ parent:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cache The World
|
* 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.
|
* Lists of accessibles that either gained or lost a selected state.
|
||||||
|
|
|
@ -98,11 +98,8 @@ parent:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cache The World
|
* 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.
|
* Lists of accessibles that either gained or lost a selected state.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче