RESOLVED FIXED 224409
initial horizontal scrollbar positions for RTL elements is wrong
https://bugs.webkit.org/show_bug.cgi?id=224409
Summary initial horizontal scrollbar positions for RTL elements is wrong
Cameron McCormack (:heycam)
Reported 2021-04-10 18:38:51 PDT
Scrollable elements that place their vertical scrollbar on the left (e.g. when they're `direction: rtl` or when the OS language is RTL and the relevant setting to always follow OS scrollbar side is used) have an incorrect scroll origin, which leads to creating a horizontal scrollbar with an incorrect initial offset. This is because RenderLayerScrollableArea::computeScrollDimensions runs prior to the scrollbars being created.
Attachments
Patch (10.73 KB, patch)
2021-04-10 18:57 PDT, Cameron McCormack (:heycam)
no flags
Cameron McCormack (:heycam)
Comment 1 2021-04-10 18:57:04 PDT
Darin Adler
Comment 2 2021-04-11 08:53:47 PDT
Comment on attachment 425693 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425693&action=review > Source/WebCore/rendering/RenderLayerScrollableArea.cpp:1032 > + m_hBar->offsetDidChange(); This is unconditionally called, even if the code above sets the origin to the same value it’s already set to. Should there be a check?
Cameron McCormack (:heycam)
Comment 3 2021-04-11 14:50:28 PDT
(In reply to Darin Adler from comment #2) > This is unconditionally called, even if the code above sets the origin to > the same value it’s already set to. Should there be a check? offsetDidChange() will do an almost equivalent check, when it recomputes its m_position based on the scroll offset, and avoid actually updating the thumb position. So I figured it's not necessary.
EWS
Comment 4 2021-04-11 15:53:57 PDT
Committed r275811 (236382@main): <https://commits.webkit.org/236382@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 425693 [details].
Radar WebKit Bug Importer
Comment 5 2021-04-11 15:54:25 PDT
Note You need to log in before you can comment on or make changes to this bug.