Bug 1950235: Add markers to PlatformShowHideEvent call sites r=bdekoz
Differential Revision: https://phabricator.services.mozilla.com/D239457
This commit is contained in:
@@ -1004,14 +1004,30 @@ nsresult LocalAccessible::HandleAccEvent(AccEvent* aEvent) {
|
||||
|
||||
LocalAccessible* target = aEvent->GetAccessible();
|
||||
switch (aEvent->GetEventType()) {
|
||||
case nsIAccessibleEvent::EVENT_SHOW:
|
||||
case nsIAccessibleEvent::EVENT_SHOW: {
|
||||
// Scope for PerfStats
|
||||
AUTO_PROFILER_MARKER_TEXT("a11y::PlatformShowHideEvent", A11Y, {}, ""_ns);
|
||||
PerfStats::AutoMetricRecording<
|
||||
PerfStats::Metric::A11Y_PlatformShowHideEvent>
|
||||
autoRecording;
|
||||
// WITHIN THIS SCOPE, DO NOT ADD CODE ABOVE THIS BLOCK:
|
||||
// THIS CODE IS MEASURING TIMINGS.
|
||||
PlatformShowHideEvent(target, target->LocalParent(), true,
|
||||
aEvent->IsFromUserInput());
|
||||
break;
|
||||
case nsIAccessibleEvent::EVENT_HIDE:
|
||||
}
|
||||
case nsIAccessibleEvent::EVENT_HIDE: {
|
||||
// Scope for PerfStats
|
||||
AUTO_PROFILER_MARKER_TEXT("a11y::PlatformShowHideEvent", A11Y, {}, ""_ns);
|
||||
PerfStats::AutoMetricRecording<
|
||||
PerfStats::Metric::A11Y_PlatformShowHideEvent>
|
||||
autoRecording;
|
||||
// WITHIN THIS SCOPE, DO NOT ADD CODE ABOVE THIS BLOCK:
|
||||
// THIS CODE IS MEASURING TIMINGS.
|
||||
PlatformShowHideEvent(target, target->LocalParent(), false,
|
||||
aEvent->IsFromUserInput());
|
||||
break;
|
||||
}
|
||||
case nsIAccessibleEvent::EVENT_STATE_CHANGE: {
|
||||
AccStateChangeEvent* event = downcast_accEvent(aEvent);
|
||||
PlatformStateChangeEvent(target, event->GetState(),
|
||||
|
||||
@@ -185,7 +185,16 @@ mozilla::ipc::IPCResult DocAccessibleParent::ProcessShowEvent(
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
PlatformShowHideEvent(root, rootParent, true, aFromUser);
|
||||
{
|
||||
// Scope for PerfStats
|
||||
AUTO_PROFILER_MARKER_TEXT("a11y::PlatformShowHideEvent", A11Y, {}, ""_ns);
|
||||
PerfStats::AutoMetricRecording<
|
||||
PerfStats::Metric::A11Y_PlatformShowHideEvent>
|
||||
autoRecording;
|
||||
// WITHIN THIS SCOPE, DO NOT ADD CODE ABOVE THIS BLOCK:
|
||||
// THIS CODE IS MEASURING TIMINGS.
|
||||
PlatformShowHideEvent(root, rootParent, true, aFromUser);
|
||||
}
|
||||
|
||||
if (nsCOMPtr<nsIObserverService> obsService =
|
||||
services::GetObserverService()) {
|
||||
@@ -327,7 +336,16 @@ mozilla::ipc::IPCResult DocAccessibleParent::ProcessHideEvent(
|
||||
}
|
||||
|
||||
RemoteAccessible* parent = root->RemoteParent();
|
||||
PlatformShowHideEvent(root, parent, false, aFromUser);
|
||||
{
|
||||
// Scope for PerfStats
|
||||
AUTO_PROFILER_MARKER_TEXT("a11y::PlatformShowHideEvent", A11Y, {}, ""_ns);
|
||||
PerfStats::AutoMetricRecording<
|
||||
PerfStats::Metric::A11Y_PlatformShowHideEvent>
|
||||
autoRecording;
|
||||
// WITHIN THIS SCOPE, DO NOT ADD CODE ABOVE THIS BLOCK:
|
||||
// THIS CODE IS MEASURING TIMINGS.
|
||||
PlatformShowHideEvent(root, parent, false, aFromUser);
|
||||
}
|
||||
|
||||
RefPtr<xpcAccHideEvent> event = nullptr;
|
||||
if (nsCoreUtils::AccEventObserversExist()) {
|
||||
|
||||
@@ -77,7 +77,8 @@
|
||||
MACRO(A11Y_ProcessHideEvent) \
|
||||
MACRO(A11Y_SendCache) \
|
||||
MACRO(A11Y_WillRefresh) \
|
||||
MACRO(A11Y_AccessibilityServiceInit)
|
||||
MACRO(A11Y_AccessibilityServiceInit) \
|
||||
MACRO(A11Y_PlatformShowHideEvent)
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user