mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 725178 - Remove ensureAccessibleTree from common.js, r=surkov
This commit is contained in:
parent
e0d78fafbb
commit
264c070a34
@ -282,27 +282,6 @@ function getApplicationAccessible()
|
|||||||
QueryInterface(nsIAccessibleApplication);
|
QueryInterface(nsIAccessibleApplication);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Run through accessible tree of the given identifier so that we ensure
|
|
||||||
* accessible tree is created.
|
|
||||||
*/
|
|
||||||
function ensureAccessibleTree(aAccOrElmOrID)
|
|
||||||
{
|
|
||||||
var acc = getAccessible(aAccOrElmOrID);
|
|
||||||
if (!acc)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var child = acc.firstChild;
|
|
||||||
while (child) {
|
|
||||||
ensureAccessibleTree(child);
|
|
||||||
try {
|
|
||||||
child = child.nextSibling;
|
|
||||||
} catch (e) {
|
|
||||||
child = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare expected and actual accessibles trees.
|
* Compare expected and actual accessibles trees.
|
||||||
*
|
*
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
this.invoke = function removeChildSpan_invoke()
|
this.invoke = function removeChildSpan_invoke()
|
||||||
{
|
{
|
||||||
// remove HTML span, a first child of the node
|
// remove HTML span, a first child of the node
|
||||||
ensureAccessibleTree(this.DOMNode);
|
|
||||||
this.DOMNode.removeChild(this.DOMNode.firstChild);
|
this.DOMNode.removeChild(this.DOMNode.firstChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,8 +157,6 @@
|
|||||||
|
|
||||||
this.invoke = function removeChildren_invoke()
|
this.invoke = function removeChildren_invoke()
|
||||||
{
|
{
|
||||||
ensureAccessibleTree(this.DOMNode);
|
|
||||||
|
|
||||||
if (aLastToFirst) {
|
if (aLastToFirst) {
|
||||||
while (this.DOMNode.firstChild)
|
while (this.DOMNode.firstChild)
|
||||||
this.DOMNode.removeChild(this.DOMNode.lastChild);
|
this.DOMNode.removeChild(this.DOMNode.lastChild);
|
||||||
|
@ -129,11 +129,6 @@
|
|||||||
gTreeBox.view = gView;
|
gTreeBox.view = gView;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.finalCheck = function setTreeView_finalCheck(aEvent)
|
|
||||||
{
|
|
||||||
ensureAccessibleTree(gTree);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.getID = function setTreeView_getID() { return "set tree view"; }
|
this.getID = function setTreeView_getID() { return "set tree view"; }
|
||||||
|
|
||||||
this.eventSeq = [
|
this.eventSeq = [
|
||||||
@ -174,11 +169,30 @@
|
|||||||
{
|
{
|
||||||
this.invoke = function invalidateColumn_invoke()
|
this.invoke = function invalidateColumn_invoke()
|
||||||
{
|
{
|
||||||
// Make sure accessibles for the tree is created because it makes
|
// Make sure accessible subtree of XUL tree is created otherwise no
|
||||||
// sure accessible events will be fired.
|
// name change events for cell accessibles are emitted.
|
||||||
// Make sure tree children accessibles are created otherwise they won't
|
var tree = getAccessible(gTree);
|
||||||
// be a cause of name changed events.
|
var child = tree.firstChild;
|
||||||
ensureAccessibleTree(gTree);
|
var walkDown = true;
|
||||||
|
while (child != tree) {
|
||||||
|
if (walkDown) {
|
||||||
|
var grandChild = child.firstChild;
|
||||||
|
if (grandChild) {
|
||||||
|
child = grandChild;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var sibling = child.nextSibling;
|
||||||
|
if (sibling) {
|
||||||
|
child = sibling;
|
||||||
|
walkDown = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
child = child.parent;
|
||||||
|
walkDown = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Fire 'TreeInvalidated' event by InvalidateColumn()
|
// Fire 'TreeInvalidated' event by InvalidateColumn()
|
||||||
var firstCol = gTree.columns.getFirstColumn();
|
var firstCol = gTree.columns.getFirstColumn();
|
||||||
|
@ -122,8 +122,6 @@ function testNamesForMarkupRules(aMarkupElm, aContainer)
|
|||||||
if (gDumpToConsole)
|
if (gDumpToConsole)
|
||||||
dump("\nProcessing markup rules '" + aMarkupElm.getAttribute("id") + "'\n");
|
dump("\nProcessing markup rules '" + aMarkupElm.getAttribute("id") + "'\n");
|
||||||
|
|
||||||
ensureAccessibleTree(aContainer);
|
|
||||||
|
|
||||||
var serializer = new XMLSerializer();
|
var serializer = new XMLSerializer();
|
||||||
|
|
||||||
var expr = "//html/body/div[@id='test']/" + aMarkupElm.getAttribute("ref");
|
var expr = "//html/body/div[@id='test']/" + aMarkupElm.getAttribute("ref");
|
||||||
|
Loading…
Reference in New Issue
Block a user