Some browser fixes.

This commit is contained in:
lilmike committed 2026-10-24 12:07:02 -07:00
1 parent 8a560a25a5
commit 7c032a5f6e
22 files changed
+631 -31

No files matched your search

+6 -3
View File
@@ -87,7 +87,7 @@ type nativeTreeCache struct {
// captureNativeTree copies the desktop or, when reviewBusName is set, just the
// focused application's subtree. The latter keeps flat review independent of
// unrelated AT-SPI providers that can be slow or transiently unavailable.
func captureNativeTree(ctx context.Context, root *C.AtspiAccessible, reviewBusName string, document, documentText, captureSound bool, retained map[ObjectID]*C.AtspiAccessible, cache nativeTreeCache) (ObjectID, []TreeNode, error) {
func captureNativeTree(ctx context.Context, root *C.AtspiAccessible, reviewBusName string, document, documentText bool, retained map[ObjectID]*C.AtspiAccessible, cache nativeTreeCache) (ObjectID, []TreeNode, error) {
trace := capture_diagnostics(ctx)
trace.begin_stage("tree-setup", ObjectID{}, "")
reviewOnly := !document && reviewBusName != ""
@@ -148,12 +148,15 @@ func captureNativeTree(ctx context.Context, root *C.AtspiAccessible, reviewBusNa
// cached children and interfaces for slow native providers.
source.cached_properties &^= C.ATSPI_CACHE_STATES
}
// Navigation refreshes sound geometry only for the announced target,
// after scrolling. Capturing it for every descendant repeats native
// ancestor walks and can exhaust the document capture deadline.
applicationName, knownApplication := applicationNames[nativeObjectID(source).BusName]
if knownApplication {
snapshot = snapshotFromNativeWithOptions(source, !document, false, document, document && captureSound, false)
snapshot = snapshotFromNativeWithOptions(source, !document, false, document, false, false)
snapshot.ApplicationName = applicationName
} else {
snapshot = snapshotFromNativeWithCaret(source, !document, false, document, document && captureSound)
snapshot = snapshotFromNativeWithCaret(source, !document, false, document, false)
}
}
trace.progress(snapshot.Role, len(nodes), len(pending)+1, textBytes)