From db9a295a8807db425f3a6adc8ec2946a2e2c1833 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Dec 2024 19:24:46 -0800 Subject: [PATCH 1/3] Fix math not being read in Chromium-based browers. Chromium made a change that causes a call to (correctly) return E_NOTIMPL. This simple fix catches the exception and moves on. The behavior should be the same as before the Chromium change. Only E_NOTIMPL is caught, other COMErrors are re-raised. Fixes #17421 --- source/NVDAObjects/IAccessible/ia2Web.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/NVDAObjects/IAccessible/ia2Web.py b/source/NVDAObjects/IAccessible/ia2Web.py index 50a7103a819..493084358af 100644 --- a/source/NVDAObjects/IAccessible/ia2Web.py +++ b/source/NVDAObjects/IAccessible/ia2Web.py @@ -12,6 +12,7 @@ ) from ctypes import c_short from comtypes import COMError, BSTR +from comtypes.hresult import E_NOTIMPL import oleacc from annotation import ( @@ -334,7 +335,13 @@ def _get_mathMl(self): # Try the data-mathml attribute. attrNames = (BSTR * 1)("data-mathml") namespaceIds = (c_short * 1)(0) - attr = node.attributesForNames(1, attrNames, namespaceIds) + try: + attr = node.attributesForNames(1, attrNames, namespaceIds) + except COMError as e: + if e.hresult != E_NOTIMPL: + log.debugWarning(f"MathML getting attr error: {e}") + raise + attr = None if attr: import mathPres From f866ffc05dbf2147f90d93d2fd5bf14a8b0dad63 Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Mon, 16 Dec 2024 21:27:45 +1100 Subject: [PATCH 2/3] update changes and version info --- user_docs/en/changes.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/user_docs/en/changes.md b/user_docs/en/changes.md index 8af13214c4d..619ef1307b5 100644 --- a/user_docs/en/changes.md +++ b/user_docs/en/changes.md @@ -1,5 +1,13 @@ # What's New in NVDA +## 2024.4.2 + +This is a patch release to fix a bug with reading math in Chromium Browsers (Chrome, Edge). + +### Bug fixes + +* Fixed bug with with reading math in Chromium Browsers (Chrome, Edge). (#17421, @NSoiffer) + ## 2024.4.1 This is a patch release to fix a bug when saving speech symbol dictionaries. From f082b3108b785a0a9e332e731c619ead89ad76ca Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Thu, 19 Dec 2024 12:41:16 +1100 Subject: [PATCH 3/3] Update user_docs/en/changes.md --- user_docs/en/changes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_docs/en/changes.md b/user_docs/en/changes.md index ea650737518..2ddfdd21de1 100644 --- a/user_docs/en/changes.md +++ b/user_docs/en/changes.md @@ -2,7 +2,7 @@ ## 2024.4.2 -This is a patch release to release bugs with reading math in Chromium, and braille devices. +This is a patch release to fix bugs with braille devices and reading math in Chromium. ### Bug fixes