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
af819d8e10
commit
a3a8b6d628
@ -282,27 +282,6 @@ function getApplicationAccessible()
|
||||
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.
|
||||
*
|
||||
|
@ -51,7 +51,6 @@
|
||||
this.invoke = function removeChildSpan_invoke()
|
||||
{
|
||||
// remove HTML span, a first child of the node
|
||||
ensureAccessibleTree(this.DOMNode);
|
||||
this.DOMNode.removeChild(this.DOMNode.firstChild);
|
||||
}
|
||||
|
||||
@ -158,8 +157,6 @@
|
||||
|
||||
this.invoke = function removeChildren_invoke()
|
||||
{
|
||||
ensureAccessibleTree(this.DOMNode);
|
||||
|
||||
if (aLastToFirst) {
|
||||
while (this.DOMNode.firstChild)
|
||||
this.DOMNode.removeChild(this.DOMNode.lastChild);
|
||||
|
@ -129,11 +129,6 @@
|
||||
gTreeBox.view = gView;
|
||||
}
|
||||
|
||||
this.finalCheck = function setTreeView_finalCheck(aEvent)
|
||||
{
|
||||
ensureAccessibleTree(gTree);
|
||||
}
|
||||
|
||||
this.getID = function setTreeView_getID() { return "set tree view"; }
|
||||
|
||||
this.eventSeq = [
|
||||
@ -174,11 +169,30 @@
|
||||
{
|
||||
this.invoke = function invalidateColumn_invoke()
|
||||
{
|
||||
// Make sure accessibles for the tree is created because it makes
|
||||
// sure accessible events will be fired.
|
||||
// Make sure tree children accessibles are created otherwise they won't
|
||||
// be a cause of name changed events.
|
||||
ensureAccessibleTree(gTree);
|
||||
// Make sure accessible subtree of XUL tree is created otherwise no
|
||||
// name change events for cell accessibles are emitted.
|
||||
var tree = getAccessible(gTree);
|
||||
var child = tree.firstChild;
|
||||
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()
|
||||
var firstCol = gTree.columns.getFirstColumn();
|
||||
|
@ -122,8 +122,6 @@ function testNamesForMarkupRules(aMarkupElm, aContainer)
|
||||
if (gDumpToConsole)
|
||||
dump("\nProcessing markup rules '" + aMarkupElm.getAttribute("id") + "'\n");
|
||||
|
||||
ensureAccessibleTree(aContainer);
|
||||
|
||||
var serializer = new XMLSerializer();
|
||||
|
||||
var expr = "//html/body/div[@id='test']/" + aMarkupElm.getAttribute("ref");
|
||||
|
Loading…
Reference in New Issue
Block a user