Files
sousa-gecko/devtools/server/actors/accessibility
James Teh a43a8917d1 Bug 2021820 part 4: Skip non-PDF init work in nsAccessibilityService::Init for ePdfOutput. r=eeejay,devtools-reviewers,nchevobbe
When the only consumer is ePdfOutput, skip three init tasks that exist solely to support real a11y clients and are unnecessary when we only want to build the accessibility tree for a document being printed:

1. ApplicationAccessible::CreateInitialDocs, which forces creation of accessibles for every existing document.
2. PlatformInit, which starts the platform accessibility APIs.
3. Activation of the accessibility service in every content process.

These steps have been moved into a new FullInit function.
If a real client subsequently arrives while the service is running only for ePdfOutput, GetOrCreateAccService will need to perform these deferred steps at that point.
That promotion path will be added in a subsequent patch.

As part of this, the a11y-init-or-shutdown notification has been extended with a third possible value of "pdf" indicating that the engine has started in ePdfOutput-only mode.
This is necessary so that observers know the engine has started, but can distinguish this from the full init indicated by "1".

Differential Revision: https://phabricator.services.mozilla.com/D299956
2026-05-21 01:59:18 +00:00
..