diff options
Diffstat (limited to 'accessible/windows/msaa/Compatibility.h')
-rw-r--r-- | accessible/windows/msaa/Compatibility.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/accessible/windows/msaa/Compatibility.h b/accessible/windows/msaa/Compatibility.h index d1e1b0e9ac..05d2e82400 100644 --- a/accessible/windows/msaa/Compatibility.h +++ b/accessible/windows/msaa/Compatibility.h @@ -13,8 +13,14 @@ #include <stdint.h> -namespace mozilla { -namespace a11y { +namespace mozilla::a11y { + +enum class SuppressionReasons : uint8_t { + None = 0, + Clipboard = 1 << 0, + SnapLayouts = 1 << 1, +}; +MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(SuppressionReasons); /** * Used to get compatibility modes. Note, modes are computed at accessibility @@ -78,7 +84,11 @@ class Compatibility { unsigned long long aVersion); static void SuppressA11yForClipboardCopy(); - static bool IsA11ySuppressedForClipboardCopy(); + static void SuppressA11yForSnapLayouts(); + static bool IsA11ySuppressed() { + return A11ySuppressionReasons() != SuppressionReasons::None; + } + static SuppressionReasons A11ySuppressionReasons(); private: Compatibility(); @@ -112,8 +122,7 @@ class Compatibility { static uint32_t sConsumers; }; -} // namespace a11y -} // namespace mozilla +} // namespace mozilla::a11y // Convert the 4 (decimal) components of a DLL version number into a // single unsigned long long, as needed by |