summaryrefslogtreecommitdiff
path: root/accessible
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-10-10 23:09:26 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-01 14:47:16 +0200
commitddaee7c1be914cc28a28cbe27e5922215b3b2e6f (patch)
treecb8930a9ba1ed0ef574b7c2be9035b1a51201902 /accessible
parentc030a50228349fa1b2c0b4fbc2e83752324dd4d7 (diff)
downloaduxp-ddaee7c1be914cc28a28cbe27e5922215b3b2e6f.tar.gz
Issue #1830 - Remove --disable-xul config and conditionals.
Diffstat (limited to 'accessible')
-rw-r--r--accessible/base/AccIterator.cpp2
-rw-r--r--accessible/base/nsAccessibilityService.cpp6
-rw-r--r--accessible/base/nsAccessibilityService.h2
-rw-r--r--accessible/generic/DocAccessible.cpp6
-rw-r--r--accessible/generic/RootAccessible.cpp39
-rw-r--r--accessible/generic/RootAccessible.h12
-rw-r--r--accessible/moz.build6
-rw-r--r--accessible/windows/msaa/moz.build10
8 files changed, 18 insertions, 65 deletions
diff --git a/accessible/base/AccIterator.cpp b/accessible/base/AccIterator.cpp
index f6e890c502..6149ba0a3f 100644
--- a/accessible/base/AccIterator.cpp
+++ b/accessible/base/AccIterator.cpp
@@ -5,9 +5,7 @@
#include "AccIterator.h"
#include "AccGroupInfo.h"
-#ifdef MOZ_XUL
#include "XULTreeAccessible.h"
-#endif
#include "mozilla/dom/HTMLLabelElement.h"
diff --git a/accessible/base/nsAccessibilityService.cpp b/accessible/base/nsAccessibilityService.cpp
index 90d54e3ab6..ab0e8eb1af 100644
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -68,7 +68,6 @@
#include "mozilla/Services.h"
#include "nsDeckFrame.h"
-#ifdef MOZ_XUL
#include "XULAlertAccessible.h"
#include "XULColorPickerAccessible.h"
#include "XULComboboxAccessible.h"
@@ -79,7 +78,6 @@
#include "XULSliderAccessible.h"
#include "XULTabAccessible.h"
#include "XULTreeGridAccessibleWrap.h"
-#endif
#if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
#include "nsNPAPIPluginInstance.h"
@@ -1356,7 +1354,6 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
}
RefPtr<Accessible> accessible;
-#ifdef MOZ_XUL
// XUL controls
if (role.EqualsLiteral("xul:alert")) {
accessible = new XULAlertAccessible(aContent, aDoc);
@@ -1515,7 +1512,6 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
accessible = new XULToolbarButtonAccessible(aContent, aDoc);
}
-#endif // MOZ_XUL
return accessible.forget();
}
@@ -1739,7 +1735,6 @@ nsAccessibilityService::HasAccessible(nsIDOMNode* aDOMNode)
////////////////////////////////////////////////////////////////////////////////
// nsAccessibilityService private (DON'T put methods here)
-#ifdef MOZ_XUL
already_AddRefed<Accessible>
nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
DocAccessible* aDoc)
@@ -1769,7 +1764,6 @@ nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
new XULTreeGridAccessibleWrap(aContent, aDoc, treeFrame);
return accessible.forget();
}
-#endif
nsAccessibilityService*
GetOrCreateAccService(uint32_t aNewConsumer)
diff --git a/accessible/base/nsAccessibilityService.h b/accessible/base/nsAccessibilityService.h
index 1f32fc6779..6efc628b7a 100644
--- a/accessible/base/nsAccessibilityService.h
+++ b/accessible/base/nsAccessibilityService.h
@@ -274,13 +274,11 @@ private:
CreateAccessibleByFrameType(nsIFrame* aFrame, nsIContent* aContent,
Accessible* aContext);
-#ifdef MOZ_XUL
/**
* Create accessible for XUL tree element.
*/
already_AddRefed<Accessible>
CreateAccessibleForXULTree(nsIContent* aContent, DocAccessible* aDoc);
-#endif
/**
* Reference for accessibility service instance.
diff --git a/accessible/generic/DocAccessible.cpp b/accessible/generic/DocAccessible.cpp
index 8fda3b44f5..8c423193c0 100644
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -48,9 +48,7 @@
#include "mozilla/dom/DocumentType.h"
#include "mozilla/dom/Element.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
-#endif
using namespace mozilla;
using namespace mozilla::a11y;
@@ -210,11 +208,9 @@ DocAccessible::NativeRole()
return roles::CHROME_WINDOW;
if (itemType == nsIDocShellTreeItem::typeContent) {
-#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode));
if (xulDoc)
return roles::APPLICATION;
-#endif
return roles::DOCUMENT;
}
}
@@ -387,13 +383,11 @@ DocAccessible::URL(nsAString& aURL) const
void
DocAccessible::DocType(nsAString& aType) const
{
-#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode));
if (xulDoc) {
aType.AssignLiteral("window"); // doctype not implemented for XUL at time of writing - causes assertion
return;
}
-#endif
dom::DocumentType* docType = mDocumentNode->GetDoctype();
if (docType)
docType->GetPublicId(aType);
diff --git a/accessible/generic/RootAccessible.cpp b/accessible/generic/RootAccessible.cpp
index 8ca9b8c9cd..f3035008bb 100644
--- a/accessible/generic/RootAccessible.cpp
+++ b/accessible/generic/RootAccessible.cpp
@@ -19,9 +19,7 @@
#include "Relation.h"
#include "Role.h"
#include "States.h"
-#ifdef MOZ_XUL
#include "XULTreeAccessible.h"
-#endif
#include "mozilla/dom/Element.h"
@@ -43,10 +41,8 @@
#include "nsFocusManager.h"
#include "nsGlobalWindow.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
#include "nsIXULWindow.h"
-#endif
using namespace mozilla;
using namespace mozilla::a11y;
@@ -102,7 +98,6 @@ RootAccessible::NativeRole()
}
// RootAccessible protected member
-#ifdef MOZ_XUL
uint32_t
RootAccessible::GetChromeFlags()
{
@@ -122,7 +117,6 @@ RootAccessible::GetChromeFlags()
xulWin->GetChromeFlags(&chromeFlags);
return chromeFlags;
}
-#endif
uint64_t
RootAccessible::NativeState()
@@ -131,7 +125,6 @@ RootAccessible::NativeState()
if (state & states::DEFUNCT)
return state;
-#ifdef MOZ_XUL
uint32_t chromeFlags = GetChromeFlags();
if (chromeFlags & nsIWebBrowserChrome::CHROME_WINDOW_RESIZE)
state |= states::SIZEABLE;
@@ -142,7 +135,6 @@ RootAccessible::NativeState()
state |= states::MOVEABLE;
if (chromeFlags & nsIWebBrowserChrome::CHROME_MODAL)
state |= states::MODAL;
-#endif
nsFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm && fm->GetActiveWindow() == mDocumentNode->GetWindow())
@@ -292,7 +284,6 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
if (!accessible)
return;
-#ifdef MOZ_XUL
XULTreeAccessible* treeAcc = accessible->AsXULTree();
if (treeAcc) {
if (eventType.EqualsLiteral("TreeRowCountChanged")) {
@@ -305,7 +296,6 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
return;
}
}
-#endif
if (eventType.EqualsLiteral("RadioStateChange")) {
uint64_t state = accessible->State();
@@ -341,7 +331,6 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
}
Accessible* treeItemAcc = nullptr;
-#ifdef MOZ_XUL
// If it's a tree element, need the currently selected item.
if (treeAcc) {
treeItemAcc = accessible->CurrentItem();
@@ -385,29 +374,22 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
nsEventShell::FireEvent(selChangeEvent);
return;
}
- }
- else
-#endif
- if (eventType.EqualsLiteral("AlertActive")) {
+ } else if (eventType.EqualsLiteral("AlertActive")) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_ALERT, accessible);
- }
- else if (eventType.EqualsLiteral("popupshown")) {
+ } else if (eventType.EqualsLiteral("popupshown")) {
HandlePopupShownEvent(accessible);
- }
- else if (eventType.EqualsLiteral("DOMMenuInactive")) {
+ } else if (eventType.EqualsLiteral("DOMMenuInactive")) {
if (accessible->Role() == roles::MENUPOPUP) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
accessible);
}
- }
- else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
+ } else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
FocusMgr()->ActiveItemChanged(accessible);
#ifdef A11Y_LOG
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuItemActive", accessible);
#endif
- }
- else if (eventType.EqualsLiteral("DOMMenuItemInactive")) {
+ } else if (eventType.EqualsLiteral("DOMMenuItemInactive")) {
// Process DOMMenuItemInactive event for autocomplete only because this is
// unique widget that may acquire focus from autocomplete popup while popup
// stays open and has no active item. In case of XUL tree autocomplete
@@ -421,8 +403,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
logging::ActiveItemChangeCausedBy("DOMMenuItemInactive", accessible);
#endif
}
- }
- else if (eventType.EqualsLiteral("DOMMenuBarActive")) { // Always from user input
+ } else if (eventType.EqualsLiteral("DOMMenuBarActive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_START,
accessible, eFromUserInput);
@@ -440,8 +421,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
logging::ActiveItemChangeCausedBy("DOMMenuBarActive", accessible);
#endif
}
- }
- else if (eventType.EqualsLiteral("DOMMenuBarInactive")) { // Always from user input
+ } else if (eventType.EqualsLiteral("DOMMenuBarInactive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_END,
accessible, eFromUserInput);
@@ -450,8 +430,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuBarInactive", accessible);
#endif
- }
- else if (accessible->NeedsDOMUIEvent() &&
+ } else if (accessible->NeedsDOMUIEvent() &&
eventType.EqualsLiteral("ValueChange")) {
uint32_t event = accessible->HasNumericValue()
? nsIAccessibleEvent::EVENT_VALUE_CHANGE
@@ -650,7 +629,6 @@ RootAccessible::HandlePopupHidingEvent(nsINode* aPopupNode)
}
}
-#ifdef MOZ_XUL
void
RootAccessible::HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
XULTreeAccessible* aAccessible)
@@ -714,7 +692,6 @@ RootAccessible::HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
aAccessible->TreeViewInvalidated(startRow, endRow, startCol, endCol);
}
-#endif
ProxyAccessible*
RootAccessible::GetPrimaryRemoteTopLevelContentDoc() const
diff --git a/accessible/generic/RootAccessible.h b/accessible/generic/RootAccessible.h
index beb74cf4b6..ac1e83f5e1 100644
--- a/accessible/generic/RootAccessible.h
+++ b/accessible/generic/RootAccessible.h
@@ -70,14 +70,12 @@ protected:
*/
void HandlePopupHidingEvent(nsINode* aNode);
-#ifdef MOZ_XUL
- void HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
- XULTreeAccessible* aAccessible);
- void HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
- XULTreeAccessible* aAccessible);
+ void HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
+ XULTreeAccessible* aAccessible);
+ void HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
+ XULTreeAccessible* aAccessible);
- uint32_t GetChromeFlags();
-#endif
+ uint32_t GetChromeFlags();
};
inline RootAccessible*
diff --git a/accessible/moz.build b/accessible/moz.build
index c22a085f01..edfd88f504 100644
--- a/accessible/moz.build
+++ b/accessible/moz.build
@@ -19,12 +19,10 @@ DIRS += [ 'aom',
'interfaces',
'ipc',
'jsat',
- 'xpcom'
+ 'xpcom',
+ 'xul'
]
-if CONFIG['MOZ_XUL']:
- DIRS += ['xul']
-
TEST_DIRS += ['tests/mochitest']
BROWSER_CHROME_MANIFESTS += [
diff --git a/accessible/windows/msaa/moz.build b/accessible/windows/msaa/moz.build
index b929222d38..8a759f73b3 100644
--- a/accessible/windows/msaa/moz.build
+++ b/accessible/windows/msaa/moz.build
@@ -33,15 +33,11 @@ SOURCES += [
'RootAccessibleWrap.cpp',
'ServiceProvider.cpp',
'TextLeafAccessibleWrap.cpp',
+ 'XULListboxAccessibleWrap.cpp',
+ 'XULMenuAccessibleWrap.cpp',
+ 'XULTreeGridAccessibleWrap.cpp',
]
-if CONFIG['MOZ_XUL']:
- SOURCES += [
- 'XULListboxAccessibleWrap.cpp',
- 'XULMenuAccessibleWrap.cpp',
- 'XULTreeGridAccessibleWrap.cpp',
- ]
-
LOCAL_INCLUDES += [
'/accessible/base',
'/accessible/generic',