test_bug1831148.html uses a fixed epsilon that fails at large scroll offsets when layout.disable-pixel-alignment is enabled
Categories
(Core :: Layout, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: hiro, Assigned: hiro)
References
Details
Attachments
(1 file)
When layout.disable-pixel-alignment is true (bug 2048146), test_bug1831148.html fails on macosx1500-aarch64 with errors like "scrollTop and BCR top match - got 9126261.199996948, expected 9126260 epsilon: +/- 1".
The test compares outer.scrollTop (a double) against a value derived from getBoundingClientRect(), whose coordinates are stored internally as 32-bit floats (CSSPoint). At the multi-million-pixel scroll offsets the test exercises, one float ULP already exceeds a CSS pixel, so the two values unavoidably diverge by an amount that grows with the coordinate magnitude. The fixed epsilon does not account for this, so the comparison fails once the divergence passes ~1px.
Fix: scale the epsilon with the float ULP at the compared magnitude.
Test dashboard: https://tests.firefox.dev/test.html?test=layout/generic/test/test_bug1831148.html
| Assignee | ||
Comment 1•25 days ago
|
||
getBoundingClientRect() coordinates are stored internally as 32-bit floats
(CSSPoint), whereas scrollTop is reported as a double. At the multi-million-pixel
scroll offsets this test exercises, one float ULP exceeds a CSS pixel, so the two
values unavoidably diverge by an amount that grows with the coordinate magnitude.
The fixed epsilon did not account for this and failed once the divergence passed
~1px (exposed by enabling layout.disable-pixel-alignment in bug 2048146).
Scale the tolerance with the float ULP at the compared magnitude.
Updated•25 days ago
|
Description
•