Skip to content

Commit 6447e90

Browse files
authored
Merge 4a40cb3 into 9081610
2 parents 9081610 + 4a40cb3 commit 6447e90

70 files changed

Lines changed: 2918 additions & 413 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

devDocs/technicalDesignOverview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ It is divided into several distinct components.
8282
### Launcher
8383
The launcher is the module which the user executes to start NVDA.
8484
It is contained in the file `nvda.pyw`.
85-
Refer to [startupShutdown documentation](./devDocs/startupShutdown.md).
85+
Refer to [startupShutdown documentation](./startupShutdown.md).
8686

8787
### Core
8888
The core (in the function `core.main`) loads the configuration, initialises all other components and then enters the main loop.

include/liblouis

Submodule liblouis updated 144 files

nvdaHelper/espeak/sconscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ env.Append(
103103
# Preprocessor definitions. Espeak Features
104104
'/DUSE_SPEECHPLAYER=1',
105105
'/DUSE_KLATT=1',
106-
'/DHAVE_SONIC_H=1',
106+
'/DUSE_LIBSONIC=1',
107107
])
108108

109109
env.Append(

nvdaHelper/liblouis/sconscript

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ env['CC'] = 'clang-cl'
5959
if 'analyze' in env['nvdaHelperDebugFlags']:
6060
env.Append(CCFLAGS='/analyze-')
6161

62-
# Starting from Clang 15, the -Wint-conversion warning diagnostic for implicit int <-> pointer conversions
63-
# now defaults to an error in all C language modes.
64-
# Downgrade this to a warning so we can still build.
65-
env.Append(CCFLAGS='-Wno-error=int-conversion')
66-
6762
env.Append(CPPDEFINES=[
6863
# The Visual C++ C Runtime deprecates standard POSIX APIs that conflict with
6964
# reserved ISO C names (like strdup) in favour of non-portable conforming

nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ std::vector<CComQIPtr<IAccessible2>> GeckoVBufBackend_t::getRelationElementsOfTy
6363

6464
const bool isChrome = this->toolkitName.compare(L"Chrome") == 0;
6565
if (isChrome) {
66-
// A bug in Chrome causes a buffer overrun if numRelations is less than the total number of targets the node has.
67-
// TODO: has this been reported?
68-
// numRelations cannot be correctly determined due to another bug: https://crbug.com/1399184
66+
// Due to a bug in Chrome, nTargets is not respected https://crbug.com/1399184
6967
// As a work around, request all targets (by setting numRelations to 0).
7068
// There is no major performance hit to fetch all targets in Chrome as Chrome is already fetching all targets either way.
7169
// In Firefox there would be extra cross-process calls.

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ For reference, the following run time dependencies are included in Git submodule
9191
* [eSpeak NG](https://github.com/espeak-ng/espeak-ng), version 1.52-dev commit `a51235aa`
9292
* [Sonic](https://github.com/waywardgeek/sonic), commit 1d705135
9393
* [IAccessible2](https://wiki.linuxfoundation.org/accessibility/iaccessible2/start), commit cbc1f29631780
94-
* [liblouis](http://www.liblouis.org/), version 3.23.0
94+
* [liblouis](http://www.liblouis.org/), version 3.24.0
9595
* [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/), version 42.0
9696
* NVDA images and sounds
9797
* [Adobe Acrobat accessibility interface, version XI](https://download.macromedia.com/pub/developer/acrobat/AcrobatAccess.zip)

source/COMRegistrationFixes/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A part of NonVisual Desktop Access (NVDA)
2-
# Copyright (C) 2018-2021 NV Access Limited, Luke Davis (Open Source Systems, Ltd.)
2+
# Copyright (C) 2018-2023 NV Access Limited, Luke Davis (Open Source Systems, Ltd.)
33
# This file is covered by the GNU General Public License.
44
# See the file COPYING for more details.
55

@@ -110,13 +110,13 @@ def apply64bitRegistryPatch(fileName: str) -> None:
110110
log.debug(f"Applied 64-bit registry patch from {fileName}")
111111

112112

113-
def fixCOMRegistrations():
113+
def fixCOMRegistrations() -> None:
114114
"""Registers most common COM proxies, in case they have accidentally been unregistered or overwritten by
115115
3rd party software installs or uninstalls.
116116
"""
117-
is64bit = os.environ.get("PROCESSOR_ARCHITEW6432", "").endswith("64")
118117
winVer = winVersion.getWinVer()
119118
OSMajorMinor = (winVer.major, winVer.minor)
119+
is64bit = winVer.processorArchitecture.endswith("64")
120120
log.debug(
121121
f"Fixing COM registrations for Windows {OSMajorMinor[0]}.{OSMajorMinor[1]}, "
122122
"{} bit.".format("64" if is64bit else "32")

source/NVDAHelper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A part of NonVisual Desktop Access (NVDA)
2-
# Copyright (C) 2008-2022 NV Access Limited, Peter Vagner, Davy Kager, Mozilla Corporation, Google LLC,
2+
# Copyright (C) 2008-2023 NV Access Limited, Peter Vagner, Davy Kager, Mozilla Corporation, Google LLC,
33
# Leonard de Ruijter
44
# This file is covered by the GNU General Public License.
55
# See the file COPYING for more details.
@@ -528,7 +528,7 @@ def terminate(self):
528528
winKernel.closeHandle(self._process)
529529

530530

531-
def initialize():
531+
def initialize() -> None:
532532
global _remoteLib, _remoteLoaderAMD64, _remoteLoaderARM64
533533
global localLib, generateBeep, VBuf_getTextInRange, lastLanguageID, lastLayoutString
534534
hkl=c_ulong(windll.User32.GetKeyboardLayout(0)).value
@@ -595,7 +595,7 @@ def initialize():
595595
#Manually start the in-process manager thread for this NVDA main thread now, as a slow system can cause this action to confuse WX
596596
_remoteLib.initInprocManagerThreadIfNeeded()
597597
versionedLibARM64Path
598-
arch = os.environ.get('PROCESSOR_ARCHITEW6432')
598+
arch = winVersion.getWinVer().processorArchitecture
599599
if arch == 'AMD64':
600600
_remoteLoaderAMD64 = _RemoteLoader(versionedLibAMD64Path)
601601
elif arch == 'ARM64':

source/NVDAObjects/IAccessible/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A part of NonVisual Desktop Access (NVDA)
2-
# Copyright (C) 2006-2022 NV Access Limited, Babbage B.V.
2+
# Copyright (C) 2006-2023 NV Access Limited, Babbage B.V.
33
# This file is covered by the GNU General Public License.
44
# See the file COPYING for more details.
55

@@ -1688,7 +1688,7 @@ def event_valueChange(self):
16881688
return
16891689
return super(IAccessible, self).event_valueChange()
16901690

1691-
def event_alert(self):
1691+
def event_alert(self) -> None:
16921692
if self.role != controlTypes.Role.ALERT:
16931693
# Ignore alert events on objects that aren't alerts.
16941694
return
@@ -1702,9 +1702,11 @@ def event_alert(self):
17021702
if self in api.getFocusAncestors():
17031703
return
17041704
speech.speakObject(self, reason=controlTypes.OutputReason.FOCUS, priority=speech.Spri.NOW)
1705+
braille.handler.message(braille.getPropertiesBraille(name=self.name, role=self.role))
17051706
for child in self.recursiveDescendants:
17061707
if controlTypes.State.FOCUSABLE in child.states:
17071708
speech.speakObject(child, reason=controlTypes.OutputReason.FOCUS, priority=speech.Spri.NOW)
1709+
braille.handler.message(braille.getPropertiesBraille(name=self.name, role=self.role))
17081710

17091711
def event_caret(self):
17101712
focus = api.getFocusObject()

source/NVDAObjects/IAccessible/ia2Web.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@
55

66
"""Base classes with common support for browsers exposing IAccessible2.
77
"""
8-
import typing
8+
99
from typing import (
10-
Iterable,
10+
Generator,
11+
Optional,
12+
Tuple,
1113
)
1214
from ctypes import c_short
1315
from comtypes import COMError, BSTR
1416

1517
import oleacc
1618
from annotation import (
19+
_AnnotationRolesT,
1720
AnnotationTarget,
1821
AnnotationOrigin,
1922
)
@@ -57,21 +60,24 @@ def __bool__(self) -> bool:
5760
)
5861

5962
@property
60-
def targets(self) -> Iterable[AnnotationTarget]:
63+
def targets(self) -> Tuple[AnnotationTarget]:
6164
if not bool(self):
6265
# optimisation that avoids having to fetch details relations which may be a more costly procedure.
6366
if config.conf["debugLog"]["annotations"]:
6467
log.debug("no annotations available")
6568
return
6669

67-
ia2WebAnnotationTargetsGen = (
70+
return tuple(
6871
IA2WebAnnotationTarget(rel)
6972
for rel in self._originObj.detailsRelations
7073
)
71-
yield from ia2WebAnnotationTargetsGen
7274

7375
@property
74-
def roles(self) -> Iterable[controlTypes.Role]:
76+
def roles(self) -> _AnnotationRolesT:
77+
return tuple(self._rolesGenerator)
78+
79+
@property
80+
def _rolesGenerator(self) -> Generator[Optional[controlTypes.Role], None, None]:
7581
"""
7682
Since Chromium exposes the roles via the "details-roles" IA2Attributes, an optimisation can be used
7783
to return them.
@@ -95,11 +101,6 @@ def roles(self) -> Iterable[controlTypes.Role]:
95101
log.debug(f"detailsRole: {repr(detailsRole)}")
96102
yield detailsRole
97103

98-
@property
99-
def summaries(self) -> Iterable[str]:
100-
for target in self.targets:
101-
yield target.summary
102-
103104

104105
class Ia2Web(IAccessible):
105106
IAccessibleTableUsesTableCellIndexAttrib=True
@@ -129,7 +130,7 @@ def _get_positionInfo(self):
129130
return info
130131

131132
def _get_descriptionFrom(self) -> controlTypes.DescriptionFrom:
132-
ia2attrDescriptionFrom: typing.Optional[str] = self.IA2Attributes.get("description-from")
133+
ia2attrDescriptionFrom: Optional[str] = self.IA2Attributes.get("description-from")
133134
try:
134135
return controlTypes.DescriptionFrom(ia2attrDescriptionFrom)
135136
except ValueError:
@@ -144,14 +145,13 @@ def _get_annotations(self) -> "AnnotationOrigin":
144145
annotationOrigin = IA2WebAnnotation(self)
145146
return annotationOrigin
146147

147-
def _get_detailsSummary(self) -> typing.Optional[str]:
148+
def _get_detailsSummary(self) -> Optional[str]:
148149
log.warning(
149150
"NVDAObject.detailsSummary is deprecated. Use NVDAObject.annotations instead.",
150151
stack_info=True,
151152
)
152-
for summary in self.annotations.summaries:
153-
# just take the first for now.
154-
return summary
153+
# just take the first for now.
154+
return self.annotations.targets[0].summary
155155

156156
@property
157157
def hasDetails(self) -> bool:
@@ -161,14 +161,13 @@ def hasDetails(self) -> bool:
161161
)
162162
return bool(self.annotations)
163163

164-
def _get_detailsRole(self) -> typing.Optional[controlTypes.Role]:
164+
def _get_detailsRole(self) -> Optional[controlTypes.Role]:
165165
log.warning(
166166
"NVDAObject.detailsRole is deprecated. Use NVDAObject.annotations instead.",
167167
stack_info=True,
168168
)
169-
for role in self.annotations.roles:
170-
# just take the first for now.
171-
return role
169+
# just take the first for now.
170+
return self.annotations.roles[0]
172171

173172
def _get_isCurrent(self) -> controlTypes.IsCurrent:
174173
ia2attrCurrent: str = self.IA2Attributes.get("current", "false")

0 commit comments

Comments
 (0)