Bug 1645817 - Use overlay scrollbars win browser resolution test. r=kats

Using overlay scrollbars will avoid the need to account for the trimmed
space that is introduced after an overflowing zoom caused by scrollbars.

Differential Revision: https://phabricator.services.mozilla.com/D80102
This commit is contained in:
Eitan Isaacson 2020-06-18 11:21:41 +00:00
parent dbbc92362d
commit 29f8f3833e
2 changed files with 7 additions and 2 deletions

View File

@ -646,8 +646,8 @@ nsRect Accessible::BoundsInAppUnits() const {
unionRectTwips.MoveBy(-viewportOffset);
// We need to take into account a non-1 resolution set on the presshell.
// This happens in mobile platforms with async pinch zooming. Here we
// scale the bounds before adding the screen-relative offset.
// This happens with async pinch zooming. Here we scale the bounds before
// adding the screen-relative offset.
unionRectTwips.ScaleRoundOut(presShell->GetResolution());
// We have the union of the rectangle, now we need to put it in absolute
// screen coords.

View File

@ -45,6 +45,11 @@ async function testScaledBounds(browser, accDoc, scale, id, type = "object") {
}
async function runTests(browser, accDoc) {
// The scrollbars get in the way of container bounds calculation.
await SpecialPowers.pushPrefEnv({
set: [["ui.useOverlayScrollbars", 1]],
});
await testScaledBounds(browser, accDoc, 2.0, "p1");
await testScaledBounds(browser, accDoc, 0.5, "p2");
await testScaledBounds(browser, accDoc, 3.5, "b1");