From 18534f1d12080f990518a23874d9e5936626bb31 Mon Sep 17 00:00:00 2001 From: Iulian Moraru Date: Wed, 24 May 2023 06:39:16 +0300 Subject: [PATCH] Backed out changeset 492778e5c97b (bug 1832686) for causing browser-a11y failures on browser_test_general.js. CLOSED TREE --- accessible/ipc/RemoteAccessibleBase.cpp | 16 ---------- .../browser/hittest/browser_test_general.js | 31 ------------------- 2 files changed, 47 deletions(-) diff --git a/accessible/ipc/RemoteAccessibleBase.cpp b/accessible/ipc/RemoteAccessibleBase.cpp index bdfb0902b6a4..88a55f726757 100644 --- a/accessible/ipc/RemoteAccessibleBase.cpp +++ b/accessible/ipc/RemoteAccessibleBase.cpp @@ -499,22 +499,6 @@ Accessible* RemoteAccessibleBase::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; } } diff --git a/accessible/tests/browser/hittest/browser_test_general.js b/accessible/tests/browser/hittest/browser_test_general.js index 07a82df188e0..1c586a935262 100644 --- a/accessible/tests/browser/hittest/browser_test_general.js +++ b/accessible/tests/browser/hittest/browser_test_general.js @@ -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( - ` - - - I am some invisible text - - `, - 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 } -);