Loading accessible/src/atk/nsAccessNodeWrap.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ nsAccessNodeWrap::~nsAccessNodeWrap() void nsAccessNodeWrap::InitAccessibility() { nsAccessNode::InitXPAccessibility(); } void nsAccessNodeWrap::ShutdownAccessibility() Loading accessible/src/base/nsAccessNode.cpp +0 −16 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsIPresShell.h" #include "nsIServiceManager.h" #include "nsIStringBundle.h" #include "nsFocusManager.h" #include "nsPresContext.h" #include "mozilla/Services.h" Loading @@ -62,8 +61,6 @@ using namespace mozilla::a11y; * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html */ nsIStringBundle *nsAccessNode::gStringBundle = 0; ApplicationAccessible* nsAccessNode::gApplicationAccessible = nsnull; /* Loading Loading @@ -149,25 +146,12 @@ nsAccessNode::GetApplicationAccessible() return gApplicationAccessible; } void nsAccessNode::InitXPAccessibility() { nsCOMPtr<nsIStringBundleService> stringBundleService = mozilla::services::GetStringBundleService(); if (stringBundleService) { // Static variables are released in ShutdownAllXPAccessibility(); stringBundleService->CreateBundle(ACCESSIBLE_BUNDLE_URL, &gStringBundle); } } void nsAccessNode::ShutdownXPAccessibility() { // Called by nsAccessibilityService::Shutdown() // which happens when xpcom is shutting down // at exit of program NS_IF_RELEASE(gStringBundle); // Release gApplicationAccessible after everything else is shutdown // so we don't accidently create it again while tearing down root accessibles ApplicationAccessibleWrap::Unload(); Loading accessible/src/base/nsAccessNode.h +3 −10 Original line number Diff line number Diff line Loading @@ -69,9 +69,6 @@ class nsPresContext; class nsIFrame; class nsIDocShellTreeItem; #define ACCESSIBLE_BUNDLE_URL "chrome://global-platform/locale/accessible.properties" #define PLATFORM_KEYS_BUNDLE_URL "chrome://global-platform/locale/platformKeys.properties" class nsAccessNode: public nsISupports { public: Loading @@ -82,7 +79,6 @@ public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(nsAccessNode) static void InitXPAccessibility(); static void ShutdownXPAccessibility(); /** Loading Loading @@ -164,9 +160,6 @@ protected: nsCOMPtr<nsIContent> mContent; nsDocAccessible* mDoc; // Static data, we do our own refcounting for our static data. static nsIStringBundle* gStringBundle; private: nsAccessNode() MOZ_DELETE; nsAccessNode(const nsAccessNode&) MOZ_DELETE; Loading accessible/src/base/nsAccessible.cpp +20 −6 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ #include "nsLayoutUtils.h" #include "nsIPresShell.h" #include "nsIStringBundle.h" #include "nsPresContext.h" #include "nsIFrame.h" #include "nsIView.h" Loading Loading @@ -626,11 +627,23 @@ nsAccessible::GetIndexInParent(PRInt32 *aIndexInParent) } void nsAccessible::TranslateString(const nsAString& aKey, nsAString& aStringOut) nsAccessible::TranslateString(const nsString& aKey, nsAString& aStringOut) { nsXPIDLString xsValue; nsCOMPtr<nsIStringBundleService> stringBundleService = services::GetStringBundleService(); if (!stringBundleService) return; gStringBundle->GetStringFromName(PromiseFlatString(aKey).get(), getter_Copies(xsValue)); nsCOMPtr<nsIStringBundle> stringBundle; stringBundleService->CreateBundle( "chrome://global-platform/locale/accessible.properties", getter_AddRefs(stringBundle)); if (!stringBundle) return; nsXPIDLString xsValue; nsresult rv = stringBundle->GetStringFromName(aKey.get(), getter_Copies(xsValue)); if (NS_SUCCEEDED(rv)) aStringOut.Assign(xsValue); } Loading Loading @@ -3293,7 +3306,8 @@ KeyBinding::ToPlatformFormat(nsAString& aValue) const nsCOMPtr<nsIStringBundleService> stringBundleService = mozilla::services::GetStringBundleService(); if (stringBundleService) stringBundleService->CreateBundle(PLATFORM_KEYS_BUNDLE_URL, stringBundleService->CreateBundle( "chrome://global-platform/locale/platformKeys.properties", getter_AddRefs(keyStringBundle)); if (!keyStringBundle) Loading accessible/src/base/nsAccessible.h +1 −1 Original line number Diff line number Diff line Loading @@ -662,7 +662,7 @@ public: /** * Return the localized string for the given key. */ static void TranslateString(const nsAString& aKey, nsAString& aStringOut); static void TranslateString(const nsString& aKey, nsAString& aStringOut); /** * Return true if the accessible is defunct. Loading Loading
accessible/src/atk/nsAccessNodeWrap.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ nsAccessNodeWrap::~nsAccessNodeWrap() void nsAccessNodeWrap::InitAccessibility() { nsAccessNode::InitXPAccessibility(); } void nsAccessNodeWrap::ShutdownAccessibility() Loading
accessible/src/base/nsAccessNode.cpp +0 −16 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsIPresShell.h" #include "nsIServiceManager.h" #include "nsIStringBundle.h" #include "nsFocusManager.h" #include "nsPresContext.h" #include "mozilla/Services.h" Loading @@ -62,8 +61,6 @@ using namespace mozilla::a11y; * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html */ nsIStringBundle *nsAccessNode::gStringBundle = 0; ApplicationAccessible* nsAccessNode::gApplicationAccessible = nsnull; /* Loading Loading @@ -149,25 +146,12 @@ nsAccessNode::GetApplicationAccessible() return gApplicationAccessible; } void nsAccessNode::InitXPAccessibility() { nsCOMPtr<nsIStringBundleService> stringBundleService = mozilla::services::GetStringBundleService(); if (stringBundleService) { // Static variables are released in ShutdownAllXPAccessibility(); stringBundleService->CreateBundle(ACCESSIBLE_BUNDLE_URL, &gStringBundle); } } void nsAccessNode::ShutdownXPAccessibility() { // Called by nsAccessibilityService::Shutdown() // which happens when xpcom is shutting down // at exit of program NS_IF_RELEASE(gStringBundle); // Release gApplicationAccessible after everything else is shutdown // so we don't accidently create it again while tearing down root accessibles ApplicationAccessibleWrap::Unload(); Loading
accessible/src/base/nsAccessNode.h +3 −10 Original line number Diff line number Diff line Loading @@ -69,9 +69,6 @@ class nsPresContext; class nsIFrame; class nsIDocShellTreeItem; #define ACCESSIBLE_BUNDLE_URL "chrome://global-platform/locale/accessible.properties" #define PLATFORM_KEYS_BUNDLE_URL "chrome://global-platform/locale/platformKeys.properties" class nsAccessNode: public nsISupports { public: Loading @@ -82,7 +79,6 @@ public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(nsAccessNode) static void InitXPAccessibility(); static void ShutdownXPAccessibility(); /** Loading Loading @@ -164,9 +160,6 @@ protected: nsCOMPtr<nsIContent> mContent; nsDocAccessible* mDoc; // Static data, we do our own refcounting for our static data. static nsIStringBundle* gStringBundle; private: nsAccessNode() MOZ_DELETE; nsAccessNode(const nsAccessNode&) MOZ_DELETE; Loading
accessible/src/base/nsAccessible.cpp +20 −6 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ #include "nsLayoutUtils.h" #include "nsIPresShell.h" #include "nsIStringBundle.h" #include "nsPresContext.h" #include "nsIFrame.h" #include "nsIView.h" Loading Loading @@ -626,11 +627,23 @@ nsAccessible::GetIndexInParent(PRInt32 *aIndexInParent) } void nsAccessible::TranslateString(const nsAString& aKey, nsAString& aStringOut) nsAccessible::TranslateString(const nsString& aKey, nsAString& aStringOut) { nsXPIDLString xsValue; nsCOMPtr<nsIStringBundleService> stringBundleService = services::GetStringBundleService(); if (!stringBundleService) return; gStringBundle->GetStringFromName(PromiseFlatString(aKey).get(), getter_Copies(xsValue)); nsCOMPtr<nsIStringBundle> stringBundle; stringBundleService->CreateBundle( "chrome://global-platform/locale/accessible.properties", getter_AddRefs(stringBundle)); if (!stringBundle) return; nsXPIDLString xsValue; nsresult rv = stringBundle->GetStringFromName(aKey.get(), getter_Copies(xsValue)); if (NS_SUCCEEDED(rv)) aStringOut.Assign(xsValue); } Loading Loading @@ -3293,7 +3306,8 @@ KeyBinding::ToPlatformFormat(nsAString& aValue) const nsCOMPtr<nsIStringBundleService> stringBundleService = mozilla::services::GetStringBundleService(); if (stringBundleService) stringBundleService->CreateBundle(PLATFORM_KEYS_BUNDLE_URL, stringBundleService->CreateBundle( "chrome://global-platform/locale/platformKeys.properties", getter_AddRefs(keyStringBundle)); if (!keyStringBundle) Loading
accessible/src/base/nsAccessible.h +1 −1 Original line number Diff line number Diff line Loading @@ -662,7 +662,7 @@ public: /** * Return the localized string for the given key. */ static void TranslateString(const nsAString& aKey, nsAString& aStringOut); static void TranslateString(const nsString& aKey, nsAString& aStringOut); /** * Return true if the accessible is defunct. Loading