diff --git a/accessible/src/base/DocManager.cpp b/accessible/src/base/DocManager.cpp index 39861563bdd4..4a1aa8134862 100644 --- a/accessible/src/base/DocManager.cpp +++ b/accessible/src/base/DocManager.cpp @@ -117,10 +117,10 @@ DocManager::Shutdown() //////////////////////////////////////////////////////////////////////////////// // nsISupports -NS_IMPL_THREADSAFE_ISUPPORTS3(DocManager, - nsIWebProgressListener, - nsIDOMEventListener, - nsISupportsWeakReference) +NS_IMPL_ISUPPORTS3(DocManager, + nsIWebProgressListener, + nsIDOMEventListener, + nsISupportsWeakReference) //////////////////////////////////////////////////////////////////////////////// // nsIWebProgressListener diff --git a/accessible/src/base/DocManager.h b/accessible/src/base/DocManager.h index f61b9dc0ca2e..180fd774fff1 100644 --- a/accessible/src/base/DocManager.h +++ b/accessible/src/base/DocManager.h @@ -29,7 +29,7 @@ class DocManager : public nsIWebProgressListener, public: virtual ~DocManager() { } - NS_DECL_ISUPPORTS + NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIWEBPROGRESSLISTENER NS_DECL_NSIDOMEVENTLISTENER diff --git a/accessible/src/base/nsTextEquivUtils.cpp b/accessible/src/base/nsTextEquivUtils.cpp index d602314380e0..2d77c2d2488b 100644 --- a/accessible/src/base/nsTextEquivUtils.cpp +++ b/accessible/src/base/nsTextEquivUtils.cpp @@ -55,19 +55,6 @@ nsTextEquivUtils::GetNameFromSubtree(Accessible* aAccessible, return NS_OK; } -void -nsTextEquivUtils::GetTextEquivFromSubtree(Accessible* aAccessible, - nsString& aTextEquiv) -{ - aTextEquiv.Truncate(); - - uint32_t nameRule = GetRoleRule(aAccessible->Role()); - if (nameRule & eNameFromSubtreeIfReqRule) { - AppendFromAccessibleChildren(aAccessible, &aTextEquiv); - aTextEquiv.CompressWhitespace(); - } -} - nsresult nsTextEquivUtils::GetTextEquivFromIDRefs(Accessible* aAccessible, nsIAtom *aIDRefsAttr, diff --git a/accessible/src/base/nsTextEquivUtils.h b/accessible/src/base/nsTextEquivUtils.h index 1280fe619096..0615e20b4335 100644 --- a/accessible/src/base/nsTextEquivUtils.h +++ b/accessible/src/base/nsTextEquivUtils.h @@ -55,11 +55,16 @@ public: /** * Calculates text equivalent from the subtree. Similar to GetNameFromSubtree. - * The difference it returns not empty result for things like HTML p, i.e. - * if the role has eNameFromSubtreeIfReq rule. + * However it returns not empty result for things like HTML p. */ static void GetTextEquivFromSubtree(Accessible* aAccessible, - nsString& aTextEquiv); + nsString& aTextEquiv) + { + aTextEquiv.Truncate(); + + AppendFromAccessibleChildren(aAccessible, &aTextEquiv); + aTextEquiv.CompressWhitespace(); + } /** * Calculates text equivalent for the given accessible from its IDRefs diff --git a/accessible/src/generic/Accessible.cpp b/accessible/src/generic/Accessible.cpp index d678f5d92126..3f0ec2b2a83a 100644 --- a/accessible/src/generic/Accessible.cpp +++ b/accessible/src/generic/Accessible.cpp @@ -1681,6 +1681,12 @@ Accessible::Value(nsString& aValue) return; } + // Value of textbox is a textified subtree. + if (mRoleMapEntry->Is(nsGkAtoms::textbox)) { + nsTextEquivUtils::GetTextEquivFromSubtree(this, aValue); + return; + } + // Value of combobox is a text of current or selected item. if (mRoleMapEntry->Is(nsGkAtoms::combobox)) { Accessible* option = CurrentItem(); diff --git a/accessible/tests/mochitest/value/test_general.html b/accessible/tests/mochitest/value/test_general.html index 74602ae722a4..12e718ba17ce 100644 --- a/accessible/tests/mochitest/value/test_general.html +++ b/accessible/tests/mochitest/value/test_general.html @@ -50,6 +50,11 @@ testValue("aria_main_link", href); testValue("aria_navigation_link", href); + ////////////////////////////////////////////////////////////////////////// + // ARIA textboxes + + testValue("aria_textbox1", "helo"); + ////////////////////////////////////////////////////////////////////////// // ARIA comboboxes @@ -83,12 +88,17 @@ - Mozilla Bug 494807 + Bug 494807 - Mozilla Bug 819273 + title="ARIA combobox should have accessible value"> + Bug 819273 + + + Bug 887250