[webkit-changes] [WebKit/WebKit] d7611e: Horizontal scrollbars unusable with rtl element
Simon Fraser
noreply at github.com
Fri Dec 22 17:08:50 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d7611e7b6b1a052b3d55fefc52f620a45b6089ed
https://github.com/WebKit/WebKit/commit/d7611e7b6b1a052b3d55fefc52f620a45b6089ed
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-12-22 (Fri, 22 Dec 2023)
Changed paths:
M LayoutTests/platform/ios/TestExpectations
A LayoutTests/scrollbars/scrollbar-drag-thumb-rtl-expected.txt
A LayoutTests/scrollbars/scrollbar-drag-thumb-rtl.html
M Source/WebCore/platform/ScrollableArea.cpp
M Source/WebCore/platform/Scrollbar.cpp
M Source/WebCore/rendering/RenderListBox.cpp
M Source/WebCore/rendering/RenderListBox.h
Log Message:
-----------
Horizontal scrollbars unusable with rtl element
https://bugs.webkit.org/show_bug.cgi?id=256995
rdar://109858866
Reviewed by Aditya Keerthi and Antti Koivisto.
Fix scroll offset/position confusion in ScrollableArea::scrollToOffsetWithoutAnimation().
In RTL, the offset is zero-based, but the position is relative to the scroll origin.
This also revealed offset/position confusion in RenderListBox, breaking vertical-rl
tests. Fix that code to do proper offset/position conversions.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/scrollbars/scrollbar-drag-thumb-rtl-expected.txt: Added.
* LayoutTests/scrollbars/scrollbar-drag-thumb-rtl.html: Added.
* Source/WebCore/platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
* Source/WebCore/platform/Scrollbar.cpp:
(WebCore::Scrollbar::moveThumb):
* Source/WebCore/rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollToRevealElementAtListIndex):
(WebCore::RenderListBox::scrollToPosition):
(WebCore::RenderListBox::setLogicalScrollTop):
* Source/WebCore/rendering/RenderListBox.h:
Canonical link: https://commits.webkit.org/272466@main
More information about the webkit-changes
mailing list