[wpt-sync] Sync PR 65065 - layout: Round scroll area requests correctly so fractional offset does not result in incorrect result
Categories
(Core :: DOM: CSS Object Model, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 65065 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/65065
Details from upstream follow.
Jacob MacKenzie <jacobmacweb@proton.me> wrote:
layout: Round scroll area requests correctly so fractional offset does not result in incorrect result
Currently,
scrollHeighton the JS side is retrieved (through a chain of calls) from aRectthat is rounded incorrectly. This causes inconsistencies with other engines - and unexpected values (only off by one px, though). This meansscrollHeightandclientHeightcan differ just due to the position of the measured node.This changes that, to round origin and size independently so a fractional offset of the node does not result in inconsistent rounding of the scroll area.
Old behaviour:
<img width="2545" height="606" alt="image" src="https://github.com/user-attachments/assets/1e395735-9d73-44c2-95e9-297d9a2375ad" />New behaviour:
<img width="1477" height="236" alt="image" src="https://github.com/user-attachments/assets/14801a06-f41f-491b-9225-d5a72f3c3d0e" />Testing: WPT run locally, passing where expected. New
scrollWidthHeight-subpixel-position.tentative.htmlto test this case specifically, and its linked to https://github.com/w3c/csswg-drafts/issues/9866 which covers a similar discussion. I can confirm the test fails onmain(20/36 fail) and passes on my branch.
Fixes: #<!-- nolink -->49802Related Zulip: #general > Need opinions on issue posted on scrollHeight (issue linked)
Reviewed in servo/servo#49839
| Assignee | ||
Updated•15 days ago
|
| Assignee | ||
Comment 1•15 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=122956
| Assignee | ||
Comment 2•14 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 36 subtests
Status Summary
Firefox
OK : 1
PASS: 36
Chrome
OK : 1
PASS: 36
Safari
OK : 1
PASS: 36
Links
Comment 4•13 days ago
|
||
| bugherder | ||
Description
•