Bug 98752. Clear consistent MSAA events to indicate when busy loading a page, and when finished. r=jgaunt, sr=vidur

This commit is contained in:
aaronl%netscape.com 2001-09-20 04:09:23 +00:00
Родитель d7ce7107ad
Коммит e29215b1e8
3 изменённых файлов: 65 добавлений и 3 удалений

Просмотреть файл

@ -51,6 +51,7 @@
#include "nsIDocShellTreeItem.h"
#include "nsIPresContext.h"
#include "nsPromiseFlatString.h"
#include "nsINameSpaceManager.h"
/* For documentation of the accessibility architecture,
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
@ -221,6 +222,52 @@ STDMETHODIMP SimpleDOMNode::get_attributes(
}
STDMETHODIMP SimpleDOMNode::get_attributesForNames(
/* [in] */ unsigned short aNumAttribs,
/* [length_is][size_is][in] */ BSTR __RPC_FAR *aAttribNames,
/* [length_is][size_is][in] */ short __RPC_FAR *aNameSpaceID,
/* [length_is][size_is][retval] */ BSTR __RPC_FAR *aAttribValues)
{
nsCOMPtr<nsIDOMElement> domElement;
nsCOMPtr<nsIContent> content;
GetElementAndContentFor(domElement, content);
if (!domElement || !content)
return E_FAIL;
nsCOMPtr<nsIDocument> doc;
content->GetDocument(*getter_AddRefs(doc));
if (!doc)
return E_FAIL;
nsCOMPtr<nsINameSpaceManager> nameSpaceManager;
doc->GetNameSpaceManager(*getter_AddRefs(nameSpaceManager));
PRInt32 index;
for (index = 0; index < aNumAttribs; index++) {
aAttribValues[index] = nsnull;
if (aAttribNames[index]) {
nsAutoString attributeValue, nameSpaceURI;
nsAutoString attributeName(nsDependentString(NS_STATIC_CAST(PRUnichar*,aAttribNames[index])));
nsresult rv;
if (aNameSpaceID[index]>0 &&
NS_SUCCEEDED(nameSpaceManager->GetNameSpaceURI(aNameSpaceID[index], nameSpaceURI)))
rv = domElement->GetAttributeNS(nameSpaceURI, attributeName, attributeValue);
else
rv = domElement->GetAttribute(attributeName, attributeValue);
if (NS_SUCCEEDED(rv))
aAttribValues[index] = ::SysAllocString(attributeValue.get());
}
}
return S_OK;
}
NS_IMETHODIMP SimpleDOMNode::GetComputedStyleDeclaration(nsIDOMCSSStyleDeclaration **aCssDecl, PRUint32 *aLength)
{
nsCOMPtr<nsIDOMElement> domElement;

Просмотреть файл

@ -76,6 +76,12 @@ class SimpleDOMNode : public ISimpleDOMNode
/* [length_is][size_is][out] */ BSTR __RPC_FAR *attribValues,
/* [out][retval] */ unsigned short __RPC_FAR *numAttribs);
virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_attributesForNames(
/* [in] */ unsigned short maxAttribs,
/* [length_is][size_is][in] */ BSTR __RPC_FAR *attribNames,
/* [length_is][size_is][in] */ short __RPC_FAR *nameSpaceID,
/* [length_is][size_is][retval] */ BSTR __RPC_FAR *attribValues);
virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_computedStyle(
/* [in] */ unsigned short maxStyleProperties,
/* [in] */ boolean useAlternateView,

Просмотреть файл

@ -85,10 +85,12 @@ import "oaidl.idl";
const long DISPID_NODE_NODEINFO = -5900;
const long DISPID_NODE_ATTRIBUTES = -5901;
const long DISPID_NODE_COMPSTYLE = -5902;
const long DISPID_NODE_COMPSTYLEFORPROPS = -5903;
const long DISPID_NODE_ATTRIBUTESFORNAMES = -5902;
const long DISPID_NODE_COMPSTYLE = -5903;
const long DISPID_NODE_COMPSTYLEFORPROPS = -5904;
[object, uuid(772cf37b-261b-4b5e-87ba-ff629cfcab3a)]
[object, uuid(96917748-8922-4fd9-8a73-d72e8aad671a)]
interface ISimpleDOMNode : IUnknown
{
const unsigned short NODETYPE_ELEMENT = 1;
@ -120,6 +122,13 @@ interface ISimpleDOMNode : IUnknown
[out, retval] unsigned short *numAttribs
);
[propget, id(DISPID_NODE_ATTRIBUTESFORNAMES)] HRESULT attributesForNames(
[in] unsigned short numAttribs,
[in, size_is(numAttribs), length_is(numAttribs)] BSTR *attribNames,
[in, size_is(numAttribs), length_is(numAttribs)] short *nameSpaceID,
[out, retval, size_is(numAttribs), length_is(numAttribs)] BSTR *attribValues
);
[propget, id(DISPID_NODE_COMPSTYLE)] HRESULT computedStyle(
[in] unsigned short maxStyleProperties,
[in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes