From 85a3b00160430ac2141b7dd5fab8e5989d71f3dd Mon Sep 17 00:00:00 2001 From: Nathan LaPre Date: Fri, 7 Jul 2023 03:22:07 +0000 Subject: [PATCH] Bug 1840732 Part 1: Remove unnecessary includes from accessible/base, r=Jamie This revision removes unnecessary include directives from cpp files in the accessible/base directory. These suggestions came from the Include What You Use tool. Differential Revision: https://phabricator.services.mozilla.com/D182288 --- accessible/base/ARIAMap.cpp | 1 - accessible/base/AccAttributes.cpp | 1 - accessible/base/AccEvent.cpp | 1 - accessible/base/AccIterator.cpp | 1 - accessible/base/CachedTableAccessible.cpp | 1 - accessible/base/DocManager.cpp | 5 ----- accessible/base/EventQueue.cpp | 1 - accessible/base/EventTree.cpp | 4 ---- accessible/base/Filters.cpp | 2 -- accessible/base/FocusManager.cpp | 4 ---- accessible/base/Logging.cpp | 1 - accessible/base/Pivot.cpp | 4 ---- accessible/base/SelectionManager.cpp | 1 - accessible/base/TextAttrs.cpp | 3 --- accessible/base/TextLeafRange.cpp | 3 --- accessible/base/TextRange-inl.h | 1 - accessible/base/TextUpdater.cpp | 2 -- accessible/base/TreeWalker.cpp | 2 -- accessible/base/nsAccUtils.cpp | 3 --- accessible/base/nsAccessibilityService.cpp | 5 ----- accessible/base/nsTextEquivUtils.cpp | 2 -- 21 files changed, 48 deletions(-) diff --git a/accessible/base/ARIAMap.cpp b/accessible/base/ARIAMap.cpp index 815cfb1a393d..e630ca21f100 100644 --- a/accessible/base/ARIAMap.cpp +++ b/accessible/base/ARIAMap.cpp @@ -14,7 +14,6 @@ #include "States.h" #include "nsAttrName.h" -#include "nsGenericHTMLElement.h" #include "nsWhitespaceTokenizer.h" #include "mozilla/BinarySearch.h" diff --git a/accessible/base/AccAttributes.cpp b/accessible/base/AccAttributes.cpp index 2c557fe66be1..4018f09074c7 100644 --- a/accessible/base/AccAttributes.cpp +++ b/accessible/base/AccAttributes.cpp @@ -5,7 +5,6 @@ #include "AccAttributes.h" #include "StyleInfo.h" -#include "mozilla/Maybe.h" #include "mozilla/ToString.h" #include "nsAtom.h" diff --git a/accessible/base/AccEvent.cpp b/accessible/base/AccEvent.cpp index 0dc92aad2a4e..91f532c0e8df 100644 --- a/accessible/base/AccEvent.cpp +++ b/accessible/base/AccEvent.cpp @@ -7,7 +7,6 @@ #include "AccEvent.h" #include "nsAccUtils.h" -#include "DocAccessible.h" #include "xpcAccEvents.h" #include "States.h" #include "TextRange.h" diff --git a/accessible/base/AccIterator.cpp b/accessible/base/AccIterator.cpp index d137e3eb8485..d45e167887ed 100644 --- a/accessible/base/AccIterator.cpp +++ b/accessible/base/AccIterator.cpp @@ -7,7 +7,6 @@ #include "AccGroupInfo.h" #include "DocAccessible-inl.h" #include "XULTreeAccessible.h" -#include "nsAccUtils.h" #include "mozilla/a11y/DocAccessibleParent.h" #include "mozilla/dom/DocumentOrShadowRoot.h" diff --git a/accessible/base/CachedTableAccessible.cpp b/accessible/base/CachedTableAccessible.cpp index 70cdabfa94aa..7fa95126f881 100644 --- a/accessible/base/CachedTableAccessible.cpp +++ b/accessible/base/CachedTableAccessible.cpp @@ -7,7 +7,6 @@ #include "CachedTableAccessible.h" #include "AccIterator.h" -#include "DocAccessibleParent.h" #include "HTMLTableAccessible.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/StaticPtr.h" diff --git a/accessible/base/DocManager.cpp b/accessible/base/DocManager.cpp index 82d427a248d6..b7a5203e40f4 100644 --- a/accessible/base/DocManager.cpp +++ b/accessible/base/DocManager.cpp @@ -7,9 +7,7 @@ #include "DocManager.h" #include "ApplicationAccessible.h" -#include "ARIAMap.h" #include "DocAccessible-inl.h" -#include "DocAccessibleChild.h" #include "DocAccessibleParent.h" #include "nsAccessibilityService.h" #include "Platform.h" @@ -28,11 +26,8 @@ #include "nsIChannel.h" #include "nsIInterfaceRequestorUtils.h" #include "nsIWebNavigation.h" -#include "nsServiceManagerUtils.h" #include "nsIWebProgress.h" #include "nsCoreUtils.h" -#include "nsXULAppAPI.h" -#include "mozilla/dom/BrowserChild.h" #include "xpcAccessibleDocument.h" using namespace mozilla; diff --git a/accessible/base/EventQueue.cpp b/accessible/base/EventQueue.cpp index d64b358f5eee..84a1383fe870 100644 --- a/accessible/base/EventQueue.cpp +++ b/accessible/base/EventQueue.cpp @@ -7,7 +7,6 @@ #include "LocalAccessible-inl.h" #include "nsEventShell.h" -#include "DocAccessible.h" #include "DocAccessibleChild.h" #include "nsTextEquivUtils.h" #ifdef A11Y_LOG diff --git a/accessible/base/EventTree.cpp b/accessible/base/EventTree.cpp index 87a72a7e3346..29cf66e4932a 100644 --- a/accessible/base/EventTree.cpp +++ b/accessible/base/EventTree.cpp @@ -5,12 +5,8 @@ #include "EventTree.h" -#include "LocalAccessible-inl.h" #include "EmbeddedObjCollector.h" #include "NotificationController.h" -#include "nsEventShell.h" -#include "DocAccessible.h" -#include "DocAccessible-inl.h" #ifdef A11Y_LOG # include "Logging.h" #endif diff --git a/accessible/base/Filters.cpp b/accessible/base/Filters.cpp index 412f7c348e1b..3ef58dc4fefa 100644 --- a/accessible/base/Filters.cpp +++ b/accessible/base/Filters.cpp @@ -5,8 +5,6 @@ #include "Filters.h" #include "LocalAccessible-inl.h" -#include "nsAccUtils.h" -#include "Role.h" #include "States.h" using namespace mozilla::a11y; diff --git a/accessible/base/FocusManager.cpp b/accessible/base/FocusManager.cpp index d856f504b3a7..57cfd7034e1e 100644 --- a/accessible/base/FocusManager.cpp +++ b/accessible/base/FocusManager.cpp @@ -5,16 +5,12 @@ #include "FocusManager.h" #include "LocalAccessible-inl.h" -#include "AccIterator.h" #include "DocAccessible-inl.h" #include "nsAccessibilityService.h" -#include "nsAccUtils.h" #include "nsEventShell.h" -#include "Role.h" #include "nsFocusManager.h" #include "mozilla/a11y/DocAccessibleParent.h" -#include "mozilla/a11y/DocManager.h" #include "mozilla/EventStateManager.h" #include "mozilla/dom/Element.h" #include "mozilla/dom/BrowsingContext.h" diff --git a/accessible/base/Logging.cpp b/accessible/base/Logging.cpp index 7b4551e77f8e..67bf76ee5b1d 100644 --- a/accessible/base/Logging.cpp +++ b/accessible/base/Logging.cpp @@ -16,7 +16,6 @@ #include "nsDocShellLoadTypes.h" #include "nsIChannel.h" -#include "nsIInterfaceRequestorUtils.h" #include "nsIWebProgress.h" #include "prenv.h" #include "nsIDocShellTreeItem.h" diff --git a/accessible/base/Pivot.cpp b/accessible/base/Pivot.cpp index 686f1a6371e8..146d9207cfac 100644 --- a/accessible/base/Pivot.cpp +++ b/accessible/base/Pivot.cpp @@ -8,14 +8,10 @@ #include "AccIterator.h" #include "LocalAccessible.h" #include "RemoteAccessible.h" -#include "DocAccessible.h" #include "nsAccUtils.h" #include "nsIAccessiblePivot.h" #include "mozilla/a11y/Accessible.h" -#include "mozilla/a11y/HyperTextAccessibleBase.h" -#include "mozilla/dom/ChildIterator.h" -#include "mozilla/dom/Element.h" using namespace mozilla; using namespace mozilla::a11y; diff --git a/accessible/base/SelectionManager.cpp b/accessible/base/SelectionManager.cpp index ba5984e9de94..97721bb439e4 100644 --- a/accessible/base/SelectionManager.cpp +++ b/accessible/base/SelectionManager.cpp @@ -15,7 +15,6 @@ #include "TextLeafRange.h" #include "mozilla/PresShell.h" -#include "mozilla/dom/Document.h" #include "mozilla/dom/Selection.h" #include "mozilla/dom/Element.h" diff --git a/accessible/base/TextAttrs.cpp b/accessible/base/TextAttrs.cpp index d8f555b1ab92..e1ca62e549ba 100644 --- a/accessible/base/TextAttrs.cpp +++ b/accessible/base/TextAttrs.cpp @@ -5,7 +5,6 @@ #include "TextAttrs.h" -#include "LocalAccessible-inl.h" #include "AccAttributes.h" #include "nsAccUtils.h" #include "nsCoreUtils.h" @@ -15,10 +14,8 @@ #include "nsFontMetrics.h" #include "nsLayoutUtils.h" #include "nsContainerFrame.h" -#include "nsStyleUtil.h" #include "HyperTextAccessible.h" #include "mozilla/AppUnits.h" -#include "mozilla/gfx/2D.h" using namespace mozilla; using namespace mozilla::a11y; diff --git a/accessible/base/TextLeafRange.cpp b/accessible/base/TextLeafRange.cpp index b68e9b324dff..eee00d0f6c6a 100644 --- a/accessible/base/TextLeafRange.cpp +++ b/accessible/base/TextLeafRange.cpp @@ -15,17 +15,14 @@ #include "mozilla/BinarySearch.h" #include "mozilla/Casting.h" #include "mozilla/dom/CharacterData.h" -#include "mozilla/dom/Document.h" #include "mozilla/dom/HTMLInputElement.h" #include "mozilla/PresShell.h" #include "mozilla/intl/Segmenter.h" #include "mozilla/intl/WordBreaker.h" #include "mozilla/StaticPrefs_layout.h" #include "mozilla/TextEditor.h" -#include "nsAccessibilityService.h" #include "nsAccUtils.h" #include "nsBlockFrame.h" -#include "nsContentUtils.h" #include "nsFrameSelection.h" #include "nsIAccessiblePivot.h" #include "nsILineIterator.h" diff --git a/accessible/base/TextRange-inl.h b/accessible/base/TextRange-inl.h index af6761bc0d10..3c53bd50384d 100644 --- a/accessible/base/TextRange-inl.h +++ b/accessible/base/TextRange-inl.h @@ -8,7 +8,6 @@ #define mozilla_a11y_TextRange_inl_h__ #include "TextRange.h" -#include "HyperTextAccessible.h" namespace mozilla { namespace a11y { diff --git a/accessible/base/TextUpdater.cpp b/accessible/base/TextUpdater.cpp index a4e40334ca81..29f8ac11f317 100644 --- a/accessible/base/TextUpdater.cpp +++ b/accessible/base/TextUpdater.cpp @@ -5,10 +5,8 @@ #include "TextUpdater.h" -#include "LocalAccessible-inl.h" #include "CacheConstants.h" #include "DocAccessible-inl.h" -#include "nsAccessibilityService.h" #include "TextLeafAccessible.h" #include diff --git a/accessible/base/TreeWalker.cpp b/accessible/base/TreeWalker.cpp index 20cbeaeac1f9..ff314bd83c3e 100644 --- a/accessible/base/TreeWalker.cpp +++ b/accessible/base/TreeWalker.cpp @@ -5,8 +5,6 @@ #include "TreeWalker.h" -#include "LocalAccessible.h" -#include "AccIterator.h" #include "nsAccessibilityService.h" #include "DocAccessible.h" diff --git a/accessible/base/nsAccUtils.cpp b/accessible/base/nsAccUtils.cpp index ecd1701ad64f..c2bcae5c6d81 100644 --- a/accessible/base/nsAccUtils.cpp +++ b/accessible/base/nsAccUtils.cpp @@ -5,7 +5,6 @@ #include "nsAccUtils.h" -#include "LocalAccessible-inl.h" #include "AccAttributes.h" #include "ARIAMap.h" #include "nsCoreUtils.h" @@ -21,8 +20,6 @@ #include "nsIBaseWindow.h" #include "nsIDocShellTreeOwner.h" #include "nsIDOMXULContainerElement.h" -#include "nsISimpleEnumerator.h" -#include "mozilla/a11y/PDocAccessibleChild.h" #include "mozilla/a11y/RemoteAccessible.h" #include "mozilla/dom/Document.h" #include "mozilla/dom/Element.h" diff --git a/accessible/base/nsAccessibilityService.cpp b/accessible/base/nsAccessibilityService.cpp index fcca592eb21f..8e0a973ba04c 100644 --- a/accessible/base/nsAccessibilityService.cpp +++ b/accessible/base/nsAccessibilityService.cpp @@ -6,7 +6,6 @@ #include "nsAccessibilityService.h" // NOTE: alphabetically ordered -#include "AccAttributes.h" #include "ApplicationAccessibleWrap.h" #include "ARIAGridAccessible.h" #include "ARIAMap.h" @@ -22,7 +21,6 @@ #include "HTMLTableAccessible.h" #include "HyperTextAccessibleWrap.h" #include "RootAccessible.h" -#include "StyleInfo.h" #include "nsAccUtils.h" #include "nsArrayUtils.h" #include "nsAttrName.h" @@ -41,7 +39,6 @@ #include "States.h" #include "Statistics.h" #include "TextLeafAccessible.h" -#include "TreeWalker.h" #include "xpcAccessibleApplication.h" #ifdef XP_WIN @@ -55,12 +52,10 @@ #include "nsExceptionHandler.h" #include "nsImageFrame.h" -#include "nsINamed.h" #include "nsIObserverService.h" #include "nsMenuPopupFrame.h" #include "nsLayoutUtils.h" #include "nsTreeBodyFrame.h" -#include "nsTreeColumns.h" #include "nsTreeUtils.h" #include "mozilla/a11y/AccTypes.h" #include "mozilla/ArrayUtils.h" diff --git a/accessible/base/nsTextEquivUtils.cpp b/accessible/base/nsTextEquivUtils.cpp index 695cab6e5b33..7f4cc8b35f70 100644 --- a/accessible/base/nsTextEquivUtils.cpp +++ b/accessible/base/nsTextEquivUtils.cpp @@ -7,13 +7,11 @@ #include "nsTextEquivUtils.h" -#include "LocalAccessible.h" #include "LocalAccessible-inl.h" #include "AccIterator.h" #include "nsCoreUtils.h" #include "mozilla/dom/ChildIterator.h" #include "mozilla/dom/Text.h" -#include "nsIContentInlines.h" using namespace mozilla; using namespace mozilla::a11y;