Bug 1013006 - Ignore actionCount on text leaves when checking if the subtree is flat. r=yzen

This commit is contained in:
Eitan Isaacson 2014-05-20 12:01:22 -07:00
parent a186a4f204
commit e8f5d4bd9f
2 changed files with 6 additions and 1 deletions

View File

@ -113,6 +113,11 @@ var gSimpleMatchFunc = function gSimpleMatchFunc(aAccessible) {
function isFlatSubtree(acc) {
for (let child = acc.firstChild; child; child = child.nextSibling) {
// text leafs inherit the actionCount of any ancestor that has a click
// listener.
if ([Roles.TEXT_LEAF, Roles.STATICTEXT].indexOf(child.role) >= 0) {
continue;
}
if (child.childCount > 0 || child.actionCount > 0) {
return false;
}

View File

@ -60,7 +60,7 @@
<dd>A esoteric weapon wielded by only the most formidable warriors,
for its unrelenting strict power is unfathomable.</dd>
</dl>
<ul id="list-2">
<ul id="list-2" onclick="alert('hi');">
<li id="listitem-2-1">Lists of Programming Languages</li>
<li id="listitem-2-2">Lisp
<ol id="list-3">