mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 352093. Update accessibility to handle windowless IFRAMES. r=alexsurkov
This commit is contained in:
parent
d6fc5e3bfb
commit
85dc2d2c9c
@ -2495,16 +2495,18 @@ nsAccessible::GetRelationByType(PRUint32 aRelationType,
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, accTarget);
|
||||
}
|
||||
|
||||
// If accessible is in its own Window then we should provide NODE_CHILD_OF relation
|
||||
// so that MSAA clients can easily get to true parent instead of getting to oleacc's
|
||||
// ROLE_WINDOW accessible which will prevent us from going up further (because it is
|
||||
// system generated and has no idea about the hierarchy above it).
|
||||
// If accessible is in its own Window, or is the root of a document,
|
||||
// then we should provide NODE_CHILD_OF relation so that MSAA clients
|
||||
// can easily get to true parent instead of getting to oleacc's
|
||||
// ROLE_WINDOW accessible which will prevent us from going up further
|
||||
// (because it is system generated and has no idea about the hierarchy
|
||||
// above it).
|
||||
nsIFrame *frame = GetFrame();
|
||||
if (frame) {
|
||||
nsIView *view = frame->GetViewExternal();
|
||||
if (view) {
|
||||
nsIScrollableFrame *scrollFrame = do_QueryFrame(frame);
|
||||
if (scrollFrame || view->GetWidget()) {
|
||||
if (scrollFrame || view->GetWidget() || !frame->GetParent()) {
|
||||
nsCOMPtr<nsIAccessible> accTarget;
|
||||
GetParent(getter_AddRefs(accTarget));
|
||||
return nsRelUtils::AddTarget(aRelationType, aRelation, accTarget);
|
||||
|
@ -106,7 +106,7 @@ nsDocAccessible::nsDocAccessible(nsIDOMNode *aDOMNode, nsIWeakReference* aShell)
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
if (vm) {
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
vm->GetWidget(getter_AddRefs(widget));
|
||||
vm->GetRootWidget(getter_AddRefs(widget));
|
||||
if (widget) {
|
||||
mWnd = widget->GetNativeData(NS_NATIVE_WINDOW);
|
||||
}
|
||||
|
@ -397,6 +397,9 @@ function getNodePrettyName(aNode)
|
||||
if (aNode.nodeType == nsIDOMNode.ELEMENT_NODE && aNode.hasAttribute("id"))
|
||||
return " '" + aNode.getAttribute("id") + "' ";
|
||||
|
||||
if (aNode.nodeType == nsIDOMNode.DOCUMENT_NODE)
|
||||
return " 'document node' ";
|
||||
|
||||
return " '" + aNode.localName + " node' ";
|
||||
} catch (e) {
|
||||
return "no node info";
|
||||
|
Loading…
Reference in New Issue
Block a user