зеркало из https://github.com/mozilla/gecko-dev.git
Backing out changes - sorry
This commit is contained in:
Родитель
2cb8fd21af
Коммит
dbec3b7bc7
|
@ -20,7 +20,6 @@
|
|||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -36,7 +35,6 @@
|
|||
#include "nsHTMLFormControlAccessible.h"
|
||||
#include "nsHTMLLinkAccessible.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIXULDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -128,11 +126,6 @@ NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
// Commenting this out for now.
|
||||
// It was requested that we always use pane objects instead of client objects.
|
||||
// However, it might be asked that we put client objects back.
|
||||
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
shell->GetPresContext(getter_AddRefs(context));
|
||||
nsCOMPtr<nsISupports> container;
|
||||
|
@ -150,18 +143,9 @@ NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
|
|||
}
|
||||
|
||||
*aAccRole = ROLE_CLIENT;
|
||||
*/
|
||||
|
||||
*aAccRole = ROLE_PANE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetAccState(PRUint32 *aAccState)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetAccState(aAccState);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetAccValue(nsAWritableString& aAccValue)
|
||||
{
|
||||
return GetURL(aAccValue);
|
||||
|
@ -446,35 +430,3 @@ NS_IMETHODIMP nsDocAccessibleMixin::GetDocument(nsIDocument **doc)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocAccessibleMixin::GetAccState(PRUint32 *aAccState)
|
||||
{
|
||||
// Screen readers need to know when the document is finished loading (STATE_BUSY flag)
|
||||
// We do it this way, rather than via nsIWebProgressListener, because
|
||||
// if accessibility was turned on after a document already finished loading,
|
||||
// we would get no state changes from nsIWebProgressListener.
|
||||
// The GetBusyFlags method, however, always has the current busy state information for us.
|
||||
|
||||
*aAccState = 0;
|
||||
if (mDocument) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
mDocument->GetShellAt(0, getter_AddRefs(presShell));
|
||||
if (presShell) {
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
presShell->GetPresContext(getter_AddRefs(context));
|
||||
if (context) {
|
||||
nsCOMPtr<nsISupports> container;
|
||||
context->GetContainer(getter_AddRefs(container));
|
||||
if (container) {
|
||||
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
|
||||
if (docShell) {
|
||||
PRUint32 busyFlags;
|
||||
docShell->GetBusyFlags(&busyFlags);
|
||||
if (busyFlags != nsIDocShell::BUSY_FLAGS_NONE)
|
||||
*aAccState = nsIAccessible::STATE_BUSY;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -40,8 +40,6 @@ class nsDocAccessibleMixin
|
|||
|
||||
NS_DECL_NSIACCESSIBLEDOCUMENT
|
||||
|
||||
NS_IMETHOD GetAccState(PRUint32 *aAccState);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIDocument> mDocument;
|
||||
};
|
||||
|
@ -65,7 +63,6 @@ class nsRootAccessible : public nsAccessible,
|
|||
NS_IMETHOD GetAccValue(nsAWritableString& aAccValue);
|
||||
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
|
||||
NS_IMETHOD GetAccState(PRUint32 *aAccState);
|
||||
|
||||
// ----- nsIAccessibleEventReceiver -------------------
|
||||
|
||||
|
|
|
@ -106,10 +106,7 @@ NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccRole(PRUint32 *_retval)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccState(PRUint32 *aAccState)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetAccState(aAccState);
|
||||
}
|
||||
// ------- nsIAccessibleDocument Methods (5) ---------------
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetURL(nsAWritableString& aURL)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,6 @@ class nsHTMLIFrameAccessible : public nsHTMLBlockAccessible,
|
|||
NS_IMETHOD GetAccName(nsAWritableString& aAccName);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& AccValue);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
|
||||
NS_IMETHOD GetAccState(PRUint32 *aAccState);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIAccessible> mRootAccessible;
|
||||
|
|
|
@ -106,10 +106,7 @@ NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccRole(PRUint32 *_retval)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetAccState(PRUint32 *aAccState)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetAccState(aAccState);
|
||||
}
|
||||
// ------- nsIAccessibleDocument Methods (5) ---------------
|
||||
|
||||
NS_IMETHODIMP nsHTMLIFrameAccessible::GetURL(nsAWritableString& aURL)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,6 @@ class nsHTMLIFrameAccessible : public nsHTMLBlockAccessible,
|
|||
NS_IMETHOD GetAccName(nsAWritableString& aAccName);
|
||||
NS_IMETHOD GetAccValue(nsAWritableString& AccValue);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
|
||||
NS_IMETHOD GetAccState(PRUint32 *aAccState);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIAccessible> mRootAccessible;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsRootAccessible.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -36,7 +35,6 @@
|
|||
#include "nsHTMLFormControlAccessible.h"
|
||||
#include "nsHTMLLinkAccessible.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIXULDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -128,11 +126,6 @@ NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
// Commenting this out for now.
|
||||
// It was requested that we always use pane objects instead of client objects.
|
||||
// However, it might be asked that we put client objects back.
|
||||
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
shell->GetPresContext(getter_AddRefs(context));
|
||||
nsCOMPtr<nsISupports> container;
|
||||
|
@ -150,18 +143,9 @@ NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
|
|||
}
|
||||
|
||||
*aAccRole = ROLE_CLIENT;
|
||||
*/
|
||||
|
||||
*aAccRole = ROLE_PANE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetAccState(PRUint32 *aAccState)
|
||||
{
|
||||
return nsDocAccessibleMixin::GetAccState(aAccState);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsRootAccessible::GetAccValue(nsAWritableString& aAccValue)
|
||||
{
|
||||
return GetURL(aAccValue);
|
||||
|
@ -446,35 +430,3 @@ NS_IMETHODIMP nsDocAccessibleMixin::GetDocument(nsIDocument **doc)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocAccessibleMixin::GetAccState(PRUint32 *aAccState)
|
||||
{
|
||||
// Screen readers need to know when the document is finished loading (STATE_BUSY flag)
|
||||
// We do it this way, rather than via nsIWebProgressListener, because
|
||||
// if accessibility was turned on after a document already finished loading,
|
||||
// we would get no state changes from nsIWebProgressListener.
|
||||
// The GetBusyFlags method, however, always has the current busy state information for us.
|
||||
|
||||
*aAccState = 0;
|
||||
if (mDocument) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
mDocument->GetShellAt(0, getter_AddRefs(presShell));
|
||||
if (presShell) {
|
||||
nsCOMPtr<nsIPresContext> context;
|
||||
presShell->GetPresContext(getter_AddRefs(context));
|
||||
if (context) {
|
||||
nsCOMPtr<nsISupports> container;
|
||||
context->GetContainer(getter_AddRefs(container));
|
||||
if (container) {
|
||||
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container));
|
||||
if (docShell) {
|
||||
PRUint32 busyFlags;
|
||||
docShell->GetBusyFlags(&busyFlags);
|
||||
if (busyFlags != nsIDocShell::BUSY_FLAGS_NONE)
|
||||
*aAccState = nsIAccessible::STATE_BUSY;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -40,8 +40,6 @@ class nsDocAccessibleMixin
|
|||
|
||||
NS_DECL_NSIACCESSIBLEDOCUMENT
|
||||
|
||||
NS_IMETHOD GetAccState(PRUint32 *aAccState);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIDocument> mDocument;
|
||||
};
|
||||
|
@ -65,7 +63,6 @@ class nsRootAccessible : public nsAccessible,
|
|||
NS_IMETHOD GetAccValue(nsAWritableString& aAccValue);
|
||||
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
|
||||
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
|
||||
NS_IMETHOD GetAccState(PRUint32 *aAccState);
|
||||
|
||||
// ----- nsIAccessibleEventReceiver -------------------
|
||||
|
||||
|
|
|
@ -59,8 +59,8 @@ components\nspng.dll
|
|||
|
||||
; accessibility (out of process API support)
|
||||
; see http://www.mozilla.org/projects/ui/accessibility/vendors-win.html
|
||||
components\accessibility.dll
|
||||
components\accessibility.xpt
|
||||
;components\accessibility.dll
|
||||
;components\accessibility.xpt
|
||||
|
||||
; appshell
|
||||
components\appshell.dll
|
||||
|
|
Загрузка…
Ссылка в новой задаче