Open Bug 1851066 Opened 2 years ago Updated 1 year ago

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)

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

Attached file testcase 1

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:

  1. Load attached testcase, ideally on a configuration with window.devicePixelRatio = 1. (A different devicePixelRatio may require a different fracitonal value in the testcase.)
  2. 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.

See Also: → 1802466

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.

Component: Panning and Zooming → Layout: Scrolling and Overflow
See Also: → 1774315, 1674687

Yeah bug 1774315 removed very similar android annotations as the ones left in your patch.

The severity field is not set for this bug.
:hiro, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(hikezoe.birchill)
Severity: -- → S3
Depends on: 1774315, 1674687
Flags: needinfo?(hikezoe.birchill)
Priority: -- → P3
See Also: 1774315, 1674687
Depends on: 1946610
No longer depends on: 1774315
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: