mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1774708: Queue cache update for viewport cache when transform change detected r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D159529
This commit is contained in:
parent
0f31530407
commit
f52164c7b8
@ -3757,6 +3757,9 @@ void LocalAccessible::MaybeQueueCacheUpdateForStyleChanges() {
|
||||
}
|
||||
|
||||
if (sendTransformUpdate) {
|
||||
// If our transform matrix has changed, it's possible our
|
||||
// viewport cache has also changed.
|
||||
mDoc->SetViewportCacheDirty(true);
|
||||
// Queuing a cache update for the TransformMatrix domain doesn't
|
||||
// necessarily mean we'll send the matrix itself, we may
|
||||
// send a DeleteEntry() instead. See BundleFieldsForCache for
|
||||
|
@ -158,3 +158,26 @@ addAccessibleTask(
|
||||
},
|
||||
{ chrome: true, iframe: true, remoteIframe: true }
|
||||
);
|
||||
|
||||
// test dynamic translation
|
||||
addAccessibleTask(
|
||||
`<div id="container" style="position: absolute; left: -300px; top: 100px;">Hello</div><button id="b" onclick="container.style.transform = 'translateX(400px)'">Move</button>`,
|
||||
async function(browser, accDoc) {
|
||||
const container = findAccessibleChildByID(accDoc, "container");
|
||||
await untilCacheOk(
|
||||
() => testVisibility(container, true, false),
|
||||
"container should be off screen and visible"
|
||||
);
|
||||
await invokeContentTask(browser, [], () => {
|
||||
let b = content.document.getElementById("b");
|
||||
b.click();
|
||||
});
|
||||
|
||||
await waitForContentPaint(browser);
|
||||
await untilCacheOk(
|
||||
() => testVisibility(container, false, false),
|
||||
"container should be on screen and visible"
|
||||
);
|
||||
},
|
||||
{ chrome: true, iframe: true, remoteIframe: true }
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user