Skip to content

Commit

Permalink
[css-viewport] Remove assert for offsetTop after modifying zoom prope…
Browse files Browse the repository at this point in the history
…rty (#45927)

There's no spec about what we should do with the scrollTop value
after applying zoom. Which makes Firefox fail the test:
css/css-viewport/zoom/scroll-top-test-with-zoom.html

Anyway checking that intermediate value is not relevant for this test,
that is checking that the scrollTop value doesn't change
when coming back to the initial zoom level.
So this patch removes the assert checking that value.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1891910
for more details.
  • Loading branch information
mrego committed Apr 29, 2024
1 parent fd6e317 commit 7047dc1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions css/css-viewport/zoom/scroll-top-test-with-zoom.html
Expand Up @@ -23,9 +23,7 @@
}, "Initial scrollTop with no zoom");

document.body.style.zoom = 1.2;
test(function() {
assert_approx_equals(container.scrollTop, 77, 0.99, "scrollTop should remain consistent within 1 px after zooming in");
}, "scrollTop after increasing zoom level");
document.body.offsetTop;

document.body.style.zoom = 1;
test(function() {
Expand Down

0 comments on commit 7047dc1

Please sign in to comment.