RTL fixes for views::ScrollView
When scrolling with layers, flip the viewport with layer transforms under RTL. This is necessary because the layer-backed scrolling machinery is not privy to the automatic UI flipping done in toolkit-views. ScrollOffsets must be positive, so scrolling horizontally in RTL currently moves the contents to the left. Flipping the viewport layer resolves this and scrolls to the right but reverses the text, so flip the contents to compensate. Testing exposed a quirk of View::ScrollRectToVisible() under RTL on all platforms. It seems only Views::TreeView uses ScrollRectToVisible() to affect horizontal scrolling, but it's currently broken (see http://crbug.com/840236). Fix it so we can use it in the test. Bug: 840236, 828361 Change-Id: Ib16724ff73829a6383be82e7bd11893b3a7e2ffc Reviewed-on: https://chromium-review.googlesource.com/999076Reviewed-by:Scott Violet <sky@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#557778}
Showing
This diff is collapsed.
Please register or sign in to comment