summaryrefslogtreecommitdiffstats
path: root/accessible/windows/msaa/ServiceProvider.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /accessible/windows/msaa/ServiceProvider.cpp
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/windows/msaa/ServiceProvider.cpp')
-rw-r--r--accessible/windows/msaa/ServiceProvider.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/accessible/windows/msaa/ServiceProvider.cpp b/accessible/windows/msaa/ServiceProvider.cpp
index b2b005f3b4..ba04d0ecde 100644
--- a/accessible/windows/msaa/ServiceProvider.cpp
+++ b/accessible/windows/msaa/ServiceProvider.cpp
@@ -16,7 +16,7 @@
#include "uiaRawElmProvider.h"
#include "mozilla/a11y/DocAccessibleChild.h"
-#include "mozilla/Preferences.h"
+#include "mozilla/StaticPrefs_accessibility.h"
#include "ISimpleDOM.h"
@@ -40,17 +40,6 @@ ServiceProvider::QueryService(REFGUID aGuidService, REFIID aIID,
if (!acc) {
return CO_E_OBJNOTCONNECTED;
}
- AccessibleWrap* localAcc = mMsaa->LocalAcc();
-
- // UIA IAccessibleEx
- if (aGuidService == IID_IAccessibleEx &&
- Preferences::GetBool("accessibility.uia.enable") && localAcc) {
- uiaRawElmProvider* accEx = new uiaRawElmProvider(localAcc);
- HRESULT hr = accEx->QueryInterface(aIID, aInstancePtr);
- if (FAILED(hr)) delete accEx;
-
- return hr;
- }
// Provide a special service ID for getting the accessible for the browser tab
// document that contains this accessible object. If this accessible object
@@ -96,8 +85,12 @@ ServiceProvider::QueryService(REFGUID aGuidService, REFIID aIID,
{0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8}};
if (aGuidService == IID_ISimpleDOMNode ||
aGuidService == IID_SimpleDOMDeprecated ||
- aGuidService == IID_IAccessible || aGuidService == IID_IAccessible2)
+ aGuidService == IID_IAccessible || aGuidService == IID_IAccessible2 ||
+ // UIA IAccessibleEx
+ (aGuidService == IID_IAccessibleEx &&
+ StaticPrefs::accessibility_uia_enable())) {
return mMsaa->QueryInterface(aIID, aInstancePtr);
+ }
return E_INVALIDARG;
}