bug 440770 - DOCUMENT_FRAME has a parent INTERNAL_FRAME with an action, r=aaronlev
authorMarco Zehe <marco.zehe@googlemail.com>
Tue, 24 Jun 2008 15:03:06 +0200
changeset 15487 0c8e64474660b88012e19cd67b158cfb5dc1415d
parent 15486 2cbe07bd5857f8c029102d736f2e8077f3011f7a
child 15493 4699797259f128b5e17f2ff6171fd7ff628f2713
push id261
push usermzehe@mozilla.com
push dateTue, 24 Jun 2008 13:06:18 +0000
treeherdermozilla-central@0c8e64474660 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaaronlev
bugs440770
milestone1.9.1a1pre
bug 440770 - DOCUMENT_FRAME has a parent INTERNAL_FRAME with an action, r=aaronlev
accessible/src/base/nsOuterDocAccessible.cpp
accessible/src/base/nsOuterDocAccessible.h
--- a/accessible/src/base/nsOuterDocAccessible.cpp
+++ b/accessible/src/base/nsOuterDocAccessible.cpp
@@ -143,8 +143,40 @@ nsOuterDocAccessible::GetAttributesInter
   aAttributes->GetStringProperty(NS_LITERAL_CSTRING("tag"), tag);
   if (!tag.IsEmpty()) {
     // We're overriding the ARIA attributes on an sub document, but we don't want to
     // override the other attributes
     return NS_OK;
   }
   return nsAccessible::GetAttributesInternal(aAttributes);
 }
+
+// Internal frame, which is the doc's parent, should not have a click action
+NS_IMETHODIMP
+nsOuterDocAccessible::GetNumActions(PRUint8 *aNumActions)
+{
+  NS_ENSURE_ARG_POINTER(aNumActions);
+  *aNumActions = 0;
+
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+nsOuterDocAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
+{
+  aName.Truncate();
+
+  return NS_ERROR_INVALID_ARG;
+}
+
+NS_IMETHODIMP
+nsOuterDocAccessible::GetActionDescription(PRUint8 aIndex, nsAString& aDescription)
+{
+  aDescription.Truncate();
+
+  return NS_ERROR_INVALID_ARG;
+}
+
+NS_IMETHODIMP
+nsOuterDocAccessible::DoAction(PRUint8 aIndex)
+{
+  return NS_ERROR_INVALID_ARG;
+}
--- a/accessible/src/base/nsOuterDocAccessible.h
+++ b/accessible/src/base/nsOuterDocAccessible.h
@@ -53,11 +53,15 @@ class nsOuterDocAccessible : public nsAc
                          nsIWeakReference* aShell);
 
     NS_IMETHOD GetRole(PRUint32 *aRole);
     NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
     NS_IMETHOD GetChildAtPoint(PRInt32 aX, PRInt32 aY,
                                nsIAccessible **aAccessible);
     void CacheChildren();
     nsresult GetAttributesInternal(nsIPersistentProperties *aAttributes);
+    NS_IMETHOD GetNumActions(PRUint8 *aNumActions);
+    NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
+    NS_IMETHODIMP GetActionDescription(PRUint8 aIndex, nsAString& aDescription);
+    NS_IMETHOD DoAction(PRUint8 aIndex);
 };
 
 #endif