mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 09:54:42 +00:00
Backed out changeset 85de6d1cd724 (bug 1837414) for causing browser-a11y failures on browser_test_general.js. CLOSED TREE
This commit is contained in:
parent
80d2c1b74b
commit
3f7ad1f211
@ -3282,9 +3282,8 @@ already_AddRefed<AccAttributes> LocalAccessible::BundleFieldsForCache(
|
||||
|
||||
nsLayoutUtils::GetFramesForArea(
|
||||
RelativeTo{rootFrame}, scrollPort, frames,
|
||||
{{// We don't add the ::OnlyVisible option here, because
|
||||
// it means we always consider frames with pointer-events: none.
|
||||
// See usage of HitTestIsForVisibility in nsDisplayList::HitTest.
|
||||
{{// We only care about visible content for hittesting.
|
||||
nsLayoutUtils::FrameForPointOption::OnlyVisible,
|
||||
// This flag ensures the display lists are built, even if
|
||||
// the page hasn't finished loading.
|
||||
nsLayoutUtils::FrameForPointOption::IgnorePaintSuppression,
|
||||
|
@ -338,38 +338,3 @@ addAccessibleTask(
|
||||
},
|
||||
{ chrome: false, iframe: true, remoteIframe: true }
|
||||
);
|
||||
|
||||
/**
|
||||
* Verify that hit testing correctly ignores
|
||||
* elements with pointer-events: none;
|
||||
*/
|
||||
addAccessibleTask(
|
||||
`<div id="container" style="position:relative;"><button id="obscured">click me</button><div id="overlay" style="pointer-events:none; top:0; bottom:0; left:0; right:0; position: absolute;"></div></div><button id="clickable">I am clickable</button>`,
|
||||
async function (browser, docAcc) {
|
||||
const container = findAccessibleChildByID(docAcc, "container");
|
||||
const obscured = findAccessibleChildByID(docAcc, "obscured");
|
||||
const clickable = findAccessibleChildByID(docAcc, "clickable");
|
||||
const dpr = await getContentDPR(browser);
|
||||
let [targetX, targetY, targetW, targetH] = Layout.getBounds(obscured, dpr);
|
||||
const [x, y] = Layout.getBounds(docAcc, dpr);
|
||||
await testChildAtPoint(
|
||||
dpr,
|
||||
targetX - x + targetW / 2,
|
||||
targetY - y + targetH / 2,
|
||||
docAcc,
|
||||
container, // Direct Child
|
||||
obscured // Deepest Child
|
||||
);
|
||||
|
||||
[targetX, targetY, targetW, targetH] = Layout.getBounds(clickable, dpr);
|
||||
await testChildAtPoint(
|
||||
dpr,
|
||||
targetX - x + targetW / 2,
|
||||
targetY - y + targetH / 2,
|
||||
docAcc,
|
||||
clickable, // Direct Child
|
||||
clickable // Deepest Child
|
||||
);
|
||||
},
|
||||
{ chrome: true, iframe: true, remoteIframe: true }
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user