diff --git a/.hgignore b/.hgignore index ea9e905d7965..e0e12f0ca2cd 100644 --- a/.hgignore +++ b/.hgignore @@ -3,7 +3,7 @@ # Filenames that should be ignored wherever they appear ~$ \.py(c|o)$ -(^|/)TAGS$ +(?i)(^|/)TAGS$ (^|/)ID$ (^|/)\.DS_Store$ diff --git a/accessible/public/nsIAccessibleProvider.idl b/accessible/public/nsIAccessibleProvider.idl index 749009712a24..3a85e3ee6b3c 100644 --- a/accessible/public/nsIAccessibleProvider.idl +++ b/accessible/public/nsIAccessibleProvider.idl @@ -98,7 +98,7 @@ interface nsIAccessibleProvider : nsISupports /** A combination of a tabs object and a tabpanels object */ const long XULTabBox = 0x00001018; - /** The collection of tab objects, useable in the TabBox and independant of + /** The collection of tab objects, usable in the TabBox and independent of it as well */ const long XULTabs = 0x00001019; diff --git a/accessible/src/base/nsAccessNode.cpp b/accessible/src/base/nsAccessNode.cpp index 9e9f0abcf302..dbfd479e6ba5 100644 --- a/accessible/src/base/nsAccessNode.cpp +++ b/accessible/src/base/nsAccessNode.cpp @@ -72,6 +72,7 @@ #include "nsRootAccessible.h" #include "nsFocusManager.h" #include "nsIObserverService.h" +#include "mozilla/Services.h" /* For documentation of the accessibility architecture, * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html @@ -281,14 +282,15 @@ void nsAccessNode::InitXPAccessibility() void nsAccessNode::NotifyA11yInitOrShutdown(PRBool aIsInit) { nsCOMPtr obsService = - do_GetService("@mozilla.org/observer-service;1"); + mozilla::services::GetObserverService(); NS_ASSERTION(obsService, "No observer service to notify of a11y init/shutdown"); - if (obsService) { - static const PRUnichar kInitIndicator[] = { '1', 0 }; - static const PRUnichar kShutdownIndicator[] = { '0', 0 }; - obsService->NotifyObservers(nsnull, "a11y-init-or-shutdown", - aIsInit ? kInitIndicator : kShutdownIndicator); - } + if (!obsService) + return; + + static const PRUnichar kInitIndicator[] = { '1', 0 }; + static const PRUnichar kShutdownIndicator[] = { '0', 0 }; + obsService->NotifyObservers(nsnull, "a11y-init-or-shutdown", + aIsInit ? kInitIndicator : kShutdownIndicator); } void nsAccessNode::ShutdownXPAccessibility() diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index 81e5408cd0f9..7b18354c9e69 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -85,6 +85,7 @@ #include "nsIWebProgress.h" #include "nsNetError.h" #include "nsDocShellLoadTypes.h" +#include "mozilla/Services.h" #ifdef MOZ_XUL #include "nsXULAlertAccessible.h" @@ -119,8 +120,8 @@ PRBool nsAccessibilityService::gIsShutdown = PR_TRUE; nsAccessibilityService::nsAccessibilityService() { // Add observers. - nsCOMPtr observerService = - do_GetService("@mozilla.org/observer-service;1"); + nsCOMPtr observerService = + mozilla::services::GetObserverService(); if (!observerService) return; @@ -155,11 +156,11 @@ nsAccessibilityService::Observe(nsISupports *aSubject, const char *aTopic, if (!nsCRT::strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { // Remove observers. - nsCOMPtr observerService = - do_GetService("@mozilla.org/observer-service;1"); - if (observerService) { + nsCOMPtr observerService = + mozilla::services::GetObserverService(); + if (observerService) observerService->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID); - } + nsCOMPtr progress(do_GetService(NS_DOCUMENTLOADER_SERVICE_CONTRACTID)); if (progress) progress->RemoveProgressListener(static_cast(this)); diff --git a/accessible/src/base/nsAccessible.cpp b/accessible/src/base/nsAccessible.cpp index 3aa0ff71d0ba..f00063d8efe2 100644 --- a/accessible/src/base/nsAccessible.cpp +++ b/accessible/src/base/nsAccessible.cpp @@ -405,7 +405,7 @@ nsAccessible::GetKeyboardShortcut(nsAString& aAccessKey) return NS_ERROR_FAILURE; PRUint32 key = nsCoreUtils::GetAccessKeyFor(content); - if (!key && content->IsNodeOfType(nsIContent::eELEMENT)) { + if (!key && content->IsElement()) { // Copy access key from label node unless it is labeled // via an ancestor