[OS X] Main frame scrollbars should appear on the left on RTL systems
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2016 22:05:30 +0000 (22:05 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2016 22:05:30 +0000 (22:05 +0000)
commit564f2c49588a8b5f51058966468627461a460339
treea3d998d001d393b66f48d0b5584a1010d162c0ea
parentc3857e2f16093ee37c1ad6ac954fa4ba861f89ba
[OS X] Main frame scrollbars should appear on the left on RTL systems
https://bugs.webkit.org/show_bug.cgi?id=155149

Reviewed by Simon Fraser.

Source/WebCore:

A helper function, ScrollableArea::systemLanguageIsRTL() is used to determine
if we should be in this new mode. Once we have determined we should be in
this new mode, there are some scattered places where the geometry math
needed to be updated.

Tests: fast/scrolling/rtl-scrollbars-simple.html
       fast/scrolling/rtl-scrollbars.html

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
* platform/mac/ScrollableAreaMac.mm:
(WebCore::ScrollableArea::systemLanguageIsRTL):
* platform/ScrollableArea.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::scrollCornerRect):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimator::scrollbarsAreRTL):
* platform/spi/mac/NSScrollerImpSPI.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::positionForClipLayer):

Tools:

Setting the volatile default needs to be done early, so it is
plumbed through the injected bundle's initialization routine.

Control of RTL scrollbars is handled by putting the string
<!-- webkit-test-runner [ rtlScrollbars=true ] -->
on the first line of a test.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::shouldUseRTLScrollbars):
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::generatePageConfiguration):
(WTR::updateTestOptionsFromTestHeader):
(WTR::TestController::getInjectedBundleInitializationUserData):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestOptions.h:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::viewSupportsOptions):

LayoutTests:

* fast/scrolling/rtl-scrollbars-expected.html: Added.
* fast/scrolling/rtl-scrollbars-simple-expected-mismatch.html: Added.
* fast/scrolling/rtl-scrollbars-simple.html: Added.
* fast/scrolling/rtl-scrollbars.html: Added.
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/scrolling/rtl-scrollbars-expected.html [new file with mode: 0644]
LayoutTests/fast/scrolling/rtl-scrollbars-simple-expected-mismatch.html [new file with mode: 0644]
LayoutTests/fast/scrolling/rtl-scrollbars-simple.html [new file with mode: 0644]
LayoutTests/fast/scrolling/rtl-scrollbars.html [new file with mode: 0644]
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/win/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollableArea.cpp
Source/WebCore/platform/ScrollableArea.h
Source/WebCore/platform/mac/ScrollableAreaMac.mm [new file with mode: 0644]
Source/WebCore/platform/spi/mac/NSScrollerImpSPI.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/TestOptions.h
Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm