Bug 287638

Summary: Element with `overflow: scroll` does not correctly account for margins of its child to determine the scrollable area with `writing-mode: vertical-rl`
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Layout and RenderingAssignee: alan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, bfulgham, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=285754
https://bugs.webkit.org/show_bug.cgi?id=287790
https://bugs.webkit.org/show_bug.cgi?id=287802
Attachments:
Description Flags
Test
none
Patch
none
[fast-cq]Patch none

Antoine Quint
Reported 2025-02-13 09:39:21 PST
Look at the attached test case which is this simple HTML and CSS: ``` <style> #scroller { overflow: scroll; width: 80px; height: 100px; writing-mode: vertical-rl; background-color: gray; } #target { margin: 150px; width: 50px; height: 50px; background-color: green; } </style> <div id=scroller> <div id=target></div> </div> ``` In Chrome, `scroller.scrollHeight` returns `350` while in ToT as of 290337@main it returns `200`, as if `margin` for the `#target` was `0` and not `150px`. This affects imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-inset-animation.html.
Attachments
Test (395 bytes, text/html)
2025-02-13 09:41 PST, Antoine Quint
no flags
Patch (7.99 KB, patch)
2025-02-17 09:31 PST, alan
no flags
[fast-cq]Patch (8.78 KB, patch)
2025-02-17 10:37 PST, alan
no flags
Antoine Quint
Comment 1 2025-02-13 09:41:14 PST
Radar WebKit Bug Importer
Comment 2 2025-02-13 09:42:49 PST
Antoine Quint
Comment 3 2025-02-17 02:57:51 PST
We're updating the affected WPT in https://bugs.webkit.org/show_bug.cgi?id=287790 to not use `margin`. We should however still fix this bug to achieve interoperability with Chrome and Firefox in this area.
alan
Comment 4 2025-02-17 09:31:27 PST
alan
Comment 5 2025-02-17 10:37:37 PST
Created attachment 474246 [details] [fast-cq]Patch
Ahmad Saleem
Comment 6 2025-02-17 10:50:32 PST
*** Bug 287765 has been marked as a duplicate of this bug. ***
EWS
Comment 7 2025-02-17 19:44:17 PST
Committed 290518@main (88cdc8fdb1bd): <https://commits.webkit.org/290518@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 474246 [details].
Note You need to log in before you can comment on or make changes to this bug.