зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
dbbc92362d
Коммит
29f8f3833e
|
@ -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.
|
||||
|
|
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче