Skip to content

Commit

Permalink
Backed out changeset 492778e5c97b (bug 1832686) for causing browser-a…
Browse files Browse the repository at this point in the history
…11y failures on browser_test_general.js. CLOSED TREE
  • Loading branch information
Iulian Moraru committed May 24, 2023
1 parent 415beb8 commit 18534f1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
16 changes: 0 additions & 16 deletions accessible/ipc/RemoteAccessibleBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,22 +499,6 @@ Accessible* RemoteAccessibleBase<Derived>::ChildAtPoint(
// first match we encounter is guaranteed to be the
// deepest match.
lastMatch = acc;
if (lastMatch->Role() == roles::TEXT_CONTAINER) {
// We've matched on a generic, we probably want its
// inner text leaf (if one exists). Drill down through
// subsequent generics, regardless of whether the point
// we want is actually contained therein."
while (lastMatch->ChildCount() == 1) {
if (lastMatch->Role() == roles::TEXT_CONTAINER) {
lastMatch = lastMatch->RemoteChildAt(0);
} else {
break;
}
}
// If we failed to find a text leaf, fall back to the
// original generic match.
lastMatch = lastMatch->IsTextLeaf() ? lastMatch : acc;
}
break;
}
}
Expand Down
31 changes: 0 additions & 31 deletions accessible/tests/browser/hittest/browser_test_general.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,34 +276,3 @@ addAccessibleTask(
},
{ chrome: true, iframe: true, remoteIframe: true }
);

/**
* Verify that hit testing is appropriately fuzzy when working with generics.
* If we match on a generic which contains additional generics and a single text
* leaf, we should return the text leaf as the deepest match instead of the
* generic itself.
*/
addAccessibleTask(
`
<a href="example.com" id="link">
<span style="overflow:hidden;" id="generic">
<span aria-hidden="true" id="visible">I am some visible text</span><span id="invisible" style="overflow:hidden; height: 1px; width: 1px; position:absolute; clip: rect(0 0 0 0); display:block;">I am some invisible text</span>
</span>
</a>`,
async function (browser, docAcc) {
const link = findAccessibleChildByID(docAcc, "link");
const generic = findAccessibleChildByID(docAcc, "generic");
const invisible = findAccessibleChildByID(docAcc, "invisible");
const dpr = await getContentDPR(browser);

await testChildAtPoint(
dpr,
1,
1,
link,
generic, // Direct Child
invisible.firstChild // Deepest Child
);
},
{ chrome: true, iframe: true, remoteIframe: true }
);

0 comments on commit 18534f1

Please sign in to comment.