RESOLVED FIXED279324
When moving past a left-hand scrollbar, don't jump way outside the content box
https://bugs.webkit.org/show_bug.cgi?id=279324
Summary When moving past a left-hand scrollbar, don't jump way outside the content box
Ahmad Saleem
Reported 2024-09-08 10:44:32 PDT
Hi Team, While going through Blink's test cases for scrolling to see, if we have still failing cases, I came across another failing test. Test Case: https://jsfiddle.net/fv1ymo2c/ ^ Safari Technology Preview 202 still fail two RTL cases, while both Chrome Canrary 130 and Firefox Nightly 132 pases both. Blink Commit: https://source.chromium.org/chromium/chromium/src/+/d457f863f78941ed376b463ee39476b1a1852797 I haven't checked whether we can merge it or not but just wanted to raise so we can track it. Thanks!
Attachments
Test Case - Attached as HTML (1.92 KB, text/html)
2024-09-09 12:10 PDT, Ahmad Saleem
no flags
Safari vs Other Browsers (Firefox & Chrome) (498.62 KB, image/png)
2024-09-09 12:13 PDT, Ahmad Saleem
no flags
Simon Fraser (smfr)
Comment 1 2024-09-09 12:07:32 PDT
https://jsfiddle.net/fv1ymo2c/ passes for me locally.
Ahmad Saleem
Comment 2 2024-09-09 12:10:44 PDT
Created attachment 472504 [details] Test Case - Attached as HTML
Ahmad Saleem
Comment 3 2024-09-09 12:13:34 PDT
Created attachment 472505 [details] Safari vs Other Browsers (Firefox & Chrome)
Radar WebKit Bug Importer
Comment 4 2024-09-15 10:45:14 PDT
Ahmad Saleem
Comment 5 2024-10-05 03:01:03 PDT
LayoutUnit RenderBox::verticalScrollbarWidthClampedToContentBox() const { LayoutUnit width(verticalScrollbarWidth()); ASSERT (width > LayoutUnit()); if (width) { LayoutUnit minimumWidth = logicalWidth() - borderAndPaddingLogicalWidth(); ASSERT(minimumWidth > LayoutUnit()); width = std::min(width, minimumWidth); } return width; } // Return the width of the vertical scrollbar, unless it's larger than the // logical width of the content box, in which case we'll return that instead. // Scrollbar handling is quite bad in such situations, and this method here // is just to make sure that left-hand scrollbars don't mess up // scrollWidth. LayoutUnit verticalScrollbarWidthClampedToContentBox() const; __ RenderBlockFlow::determineLogicalLeftPositionForChild from startPosition += (style().isLeftToRightDirection() ? 1 : -1) * verticalScrollbarWidth(); to startPosition += (style().isLeftToRightDirection() ? 1 : -1) * verticalScrollbarWidthClampedToContentBox(); ____ It progress first failing test `RTL scrollable with block-level child`, while I think other remaining failing is due to sub pixel inline layout.
Ahmad Saleem
Comment 7 2025-06-28 14:02:55 PDT
EWS
Comment 8 2025-07-28 10:55:15 PDT
Committed 297945@main (be03a3a56787): <https://commits.webkit.org/297945@main> Reviewed commits have been landed. Closing PR #47344 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.