зеркало из https://github.com/mozilla/pjs.git
Bug 691248 - XUL tree items shouldn't pick up relations from XUL tree, r=tbsaunde
This commit is contained in:
Родитель
b841abc8f2
Коммит
2e7eafacca
|
@ -817,22 +817,17 @@ Relation
|
|||
nsXULTreeItemAccessibleBase::RelationByType(PRUint32 aType)
|
||||
{
|
||||
if (aType != nsIAccessibleRelation::RELATION_NODE_CHILD_OF)
|
||||
return nsAccessible::RelationByType(aType);
|
||||
return Relation();
|
||||
|
||||
Relation rel;
|
||||
PRInt32 parentIndex;
|
||||
if (!NS_SUCCEEDED(mTreeView->GetParentIndex(mRow, &parentIndex)))
|
||||
return rel;
|
||||
return Relation();
|
||||
|
||||
if (parentIndex == -1) {
|
||||
rel.AppendTarget(mParent);
|
||||
return rel;
|
||||
}
|
||||
if (parentIndex == -1)
|
||||
return Relation(mParent);
|
||||
|
||||
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(mParent);
|
||||
|
||||
rel.AppendTarget(treeAcc->GetTreeItemAccessible(parentIndex));
|
||||
return rel;
|
||||
return Relation(treeAcc->GetTreeItemAccessible(parentIndex));
|
||||
}
|
||||
|
||||
PRUint8
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "nsAccUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsEventShell.h"
|
||||
#include "Relation.h"
|
||||
#include "States.h"
|
||||
|
||||
#include "nsITreeSelection.h"
|
||||
|
@ -1237,6 +1238,12 @@ nsXULTreeGridCellAccessible::IndexInParent() const
|
|||
return GetColumnIndex();
|
||||
}
|
||||
|
||||
Relation
|
||||
nsXULTreeGridCellAccessible::RelationByType(PRUint32 aType)
|
||||
{
|
||||
return Relation();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeGridCellAccessible: public implementation
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@ public:
|
|||
virtual nsAccessible* FocusedChild();
|
||||
virtual nsresult GetAttributesInternal(nsIPersistentProperties *aAttributes);
|
||||
virtual PRInt32 IndexInParent() const;
|
||||
virtual Relation RelationByType(PRUint32 aType);
|
||||
virtual PRUint32 NativeRole();
|
||||
virtual PRUint64 NativeState();
|
||||
|
||||
|
|
|
@ -47,6 +47,10 @@
|
|||
var treeitem6 = treeitem5.nextSibling;
|
||||
testRelation(treeitem6, RELATION_NODE_CHILD_OF, [tree]);
|
||||
|
||||
// treeitems and treecells shouldn't pick up relations from tree
|
||||
testRelation(treeitem1, RELATION_LABELLED_BY, null);
|
||||
testRelation(treeitem1.firstChild, RELATION_LABELLED_BY, null);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -68,7 +72,12 @@
|
|||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=503727"
|
||||
title="Reorganize implementation of XUL tree accessibility">
|
||||
Mozilla Bug 503727
|
||||
</a><br/>
|
||||
</a>
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=691248"
|
||||
title="XUL tree items shouldn't pick up relations from XUL tree">
|
||||
Mozilla Bug 691248
|
||||
</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
</div>
|
||||
|
@ -77,9 +86,11 @@
|
|||
</body>
|
||||
|
||||
<vbox flex="1">
|
||||
<label control="tree" value="It's a tree"/>
|
||||
<tree id="tree" flex="1">
|
||||
<treecols>
|
||||
<treecol id="col" flex="1" primary="true" label="column"/>
|
||||
<treecol id="col2" flex="1" label="column2"/>
|
||||
</treecols>
|
||||
<treechildren/>
|
||||
</tree>
|
||||
|
|
Загрузка…
Ссылка в новой задаче