scrollTop value changes by 1px when you scroll to a fractional position and then allow some time to pass
Categories
(Core :: Layout: Scrolling and Overflow, defect, P3)
Tracking
()
People
(Reporter: dholbert, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
|
991 bytes,
text/html
|
Details |
Spinning this off from bug 1802466, where this was giving me some troublesome test failures after I had a fix for the main bug over there.
STR:
- Load attached testcase, ideally on a configuration with
window.devicePixelRatio = 1. (A different devicePixelRatio may require a different fracitonal value in the testcase.) - Click the button in the testcase, and look at the results in the
alert()popup that appears.
ACTUAL RESULTS:
The popup says:
scrollTop values: 1231, 1230
BUG: the measurements differ.
EXPECTED RESULTS:
No difference in scrollTop values.
I think this is our APZ code doing some async clamping or rounding after-the-fact (notably, after the JS has yielded with setTimeout or similar). It's unexpected that this produces a web-exposed change in scroll position. This is responsible for a WPT test-failure in bug 1802466, where there's a vertical-writing-mode input element with a fractional height (since its size comes from the font metrics of some number of characters placed one after the other). The test in that bug is carefully checking that scrollTop does not change when text is entered into such an input; and this bug causes that test to spuriously fail in some cases, even after my Gecko fix for a different issue over there is landed.
Comment 1•2 years ago
•
|
||
I think this is probably caused by either bug 1774315 or SnapCoord which was dropped in bug 1745969 but revived in bug 1817126 due to bug 1801098. And of course bug 1674687 is also involving.
Anyways, this is our long standing issue we'd want to fix.
Comment 2•2 years ago
|
||
Yeah bug 1774315 removed very similar android annotations as the ones left in your patch.
Comment 3•2 years ago
|
||
The severity field is not set for this bug.
:hiro, could you have a look please?
For more information, please visit BugBot documentation.
Updated•2 years ago
|
Description
•