Skip to content

Build and register ISimpleDOM proxy ourselves (AKA fix broken math in Firefox/Chrome on some systems) #7308

@jcsteh

Description

@jcsteh

Steps to reproduce:

  1. Open this URL in Firefox or Chrome: data:text/html,<math><mi>x</mi></math>
  2. Use the cursor keys to read the document.

Expected behavior:

"x" should be reported.

Actual behavior:

On some systems/builds of software, nothing is reported and the following is logged:

DEBUGWARNING - NVDAObjects.IAccessible.ia2Web.Math._get_mathMl (11:45:38.736):
Error retrieving math. Not supported in this browser or ISimpleDOM COM proxy not registered.
Traceback (most recent call last):
  File "NVDAObjects\IAccessible\ia2Web.pyc", line 63, in _get_mathMl
  File "comtypes\__init__.pyc", line 1078, in QueryInterface
COMError: (-2147467262, 'No such interface supported', (None, None, None, 0, None))

Additional info:

This occurs when the 32 bit and/or 64 bit ISimpleDOM COM proxy is not registered. (For 64 bit browsers, we need both.) This can happen for several reasons:

  1. 64 bit builds of Firefox don't install the 32 bit proxy. This will only become more prevalent as more users migrate to 64 bit builds.
  2. I suspect (but am not certain) that Chrome doesn't ever install the proxy, regardless of bitness.
  3. If you uninstall a Mozilla app while other Mozilla apps are still installed, that might unregister the proxy.
  4. Possibly other obscure edge cases I haven't thought of.

The key point is that we simply cannot rely on this being installed correctly. Instead, we should build it and register it ourselves using CoRegisterClassObject/CoRegisterPSClsid as we do for IAccessible2 (see installIA2Support in nvdaHelper/remote/IA2Support.cpp).

P2 because this breaks math support for Firefox and Chrome for an increasing number of users.

Metadata

Metadata

Labels

feature/mathp3https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priorityz 2017webfix (archived)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions