<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[200116] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/200116">200116</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2016-04-26 18:25:26 -0700 (Tue, 26 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WK2] [OS X] Create API for switching RTL scrollbar policy
https://bugs.webkit.org/show_bug.cgi?id=156948
&lt;rdar://problem/25707757&gt;

Reviewed by Darin Adler.

Source/WebCore:

There are two schools of thought for where to put scrollbars in RTL environments.
The first is that we should obey the content's &quot;dir&quot; attribute, specified on each
element. The second is that we should be consistent with the platform (AppKit's)
behavior.

There are some situations where the placement should be done according to the
content. For example, this policy would be used in web browsers.

However, there are also places where web content is designed to fit seamlessly
amongst native content. In this situation, the placement of the scrollbars should
be done according to the view.

Because WebKit doesn't know which of these situations it is operating within, this
patch adds a new API property, userInterfaceDirectionPolicy, to
WKWebViewConfigurationPolicy. This allows clients to instruct us which policy to
abide by. It is plumbed to the web process inside the WebPreferencesStore and is
ultimately held inside the Page's Settings object.

This Setting is consulted by RenderLayerModelObject, which serves as a good
centralized place for this policy implementation. This is the class which decides
if we should be consulting its RenderStyle or the platform itself when we decide
where to put the scrollbars.

Putting this decision inside the renderer is important because ScrollableArea
often needs to know if scrollbars should be put on the left, but ScrollableArea
doesn't know anything about RenderStyles. Therefore, the renderer must be the
intermediary between ScrollableArea and the RenderStyle. (ScrollableArea also
doesn't directly know anything about renderers either; however, each of the
subclasses knows about an appropriate renderer.) Therefore, ScrollableArea gets
a new virtual method which is implemented by the RenderLayerModelObject.

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

* WebCore.xcodeproj/project.pbxproj: ScrollableAreaMac.mm is no longer necessary.
* page/FrameView.cpp:
(WebCore::FrameView::shouldPlaceBlockDirectionScrollbarOnLeft): Overridden
ScrollableArea function.
* page/FrameView.h:
* page/Settings.h:
* page/Settings.in:
* platform/ScrollView.cpp: Adding two new settings: One to know if we should
consult with the RenderStyle or the platform, and the other is whether or not
the platform considers itself to be RTL.
(WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin): Update to
use new mechanism.
(WebCore::ScrollView::updateScrollbars): Ditto.
(WebCore::ScrollView::scrollCornerRect): Ditto.
(WebCore::ScrollView::locationOfContents): Ditto.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::verticalScrollbarIsOnLeft): Deleted. This was the old
mechanism.
(WebCore::ScrollableArea::systemLanguageIsRTL): Deleted. Ditto.
* platform/ScrollableArea.h:
* platform/mac/ScrollableAreaMac.mm: Removed.
(WebCore::ScrollableArea::verticalScrollbarIsOnLeft): Deleted.
(WebCore::ScrollableArea::systemLanguageIsRTL): Deleted.
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::didCreateScrollerImp): Update to use new
mechanism.
* platform/text/WritingMode.h: These enums should match what's in WebKit2.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftOffsetForContent): Update to use new mechanism.
(WebCore::RenderBlock::logicalRightOffsetForContent): Ditto.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild): Ditto.
* rendering/RenderBox.cpp: Ditto.
(WebCore::RenderBox::contentBoxRect):
(WebCore::RenderBox::overflowClipRect):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBoxModelObject.cpp: Ditto.
(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize): Ditto.
(WebCore::cornerStart): Migrate to use references.
(WebCore::cornerRect): Ditto.
(WebCore::RenderLayer::scrollCornerRect): Ditto.
(WebCore::resizerCornerRect): Ditto.
(WebCore::RenderLayer::scrollCornerAndResizerRect): Ditto.
(WebCore::RenderLayer::verticalScrollbarStart): Update to use new mechanism.
(WebCore::RenderLayer::horizontalScrollbarStart): Ditto.
(WebCore::RenderLayer::offsetFromResizeCorner): Ditto.
(WebCore::RenderLayer::positionOverflowControls): Migrate to use references.
(WebCore::RenderLayer::computeScrollDimensions): Ditto.
(WebCore::RenderLayer::overflowControlsIntersectRect): Ditto.
(WebCore::RenderLayer::drawPlatformResizerImage): Update to use new mechanism.
(WebCore::RenderLayer::paintResizer): Migrate to use references.
(WebCore::RenderLayer::isPointInResizeControl): Ditto.
(WebCore::RenderLayer::hitTestOverflowControls): Ditto.
(WebCore::RenderLayer::hitTestResizerInFragments): Ditto.
* rendering/RenderLayer.h: ScrollableArea override
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::positionForClipLayer): Update to use new
mechanism.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft):
This is the meat of this patch. This is where we decide if we should be
interrogating the RenderStyle or the underlying platform.
* rendering/RenderLayerModelObject.h:
* rendering/RenderListBox.cpp: Update to use new mechanism.
(WebCore::RenderListBox::itemBoundingBoxRect):
(WebCore::RenderListBox::paintScrollbar):
(WebCore::RenderListBox::isPointInOverflowControl):
(WebCore::RenderListBox::listIndexAtOffset):
(WebCore::RenderListBox::controlClipRect):
(WebCore::RenderListBox::invalidateScrollbarRect):
(WebCore::RenderListBox::convertFromScrollbarToContainingView):
(WebCore::RenderListBox::convertFromContainingViewToScrollbar):
* rendering/RenderListBox.h:
* rendering/RenderView.cpp: Ditto.
(WebCore::RenderView::repaintViewRectangle):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::shouldPlaceBlockDirectionScrollbarOnLeft): This
function is now much dumber. It just inspects its own style.
* testing/InternalSettings.cpp: Allow mocking.
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::verticalScrollbarLocationPolicy):
(WebCore::InternalSettings::setVerticalScrollbarLocationPolicy):
(WebCore::InternalSettings::systemLayoutDirection):
(WebCore::InternalSettings::setSystemLayoutDirection):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit2:

Add the new API.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration encodeWithCoder:]):
(-[WKWebViewConfiguration initWithCoder:]):
(-[WKWebViewConfiguration copyWithZone:]):
* UIProcess/WebPageProxy.cpp:
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

LayoutTests:

Update tests to use new RTL scrollbar mechanism.

* fast/scrolling/rtl-scrollbars-animation-property.html:
* fast/scrolling/rtl-scrollbars-elementFromPoint-static.html:
* fast/scrolling/rtl-scrollbars-elementFromPoint.html:
* fast/scrolling/rtl-scrollbars-expected.html:
* fast/scrolling/rtl-scrollbars-iframe-offset-expected.html:
* fast/scrolling/rtl-scrollbars-iframe-offset.html:
* fast/scrolling/rtl-scrollbars-iframe-position-absolute.html:
* fast/scrolling/rtl-scrollbars-iframe-scrolled-expected.html:
* fast/scrolling/rtl-scrollbars-iframe-scrolled.html:
* fast/scrolling/rtl-scrollbars-iframe.html:
* fast/scrolling/rtl-scrollbars-listbox-expected.html:
* fast/scrolling/rtl-scrollbars-listbox-scroll-expected.html:
* fast/scrolling/rtl-scrollbars-listbox-scroll.html:
* fast/scrolling/rtl-scrollbars-listbox-select-left-expected.html:
* fast/scrolling/rtl-scrollbars-listbox-select-left.html:
* fast/scrolling/rtl-scrollbars-listbox-select-right-expected.html:
* fast/scrolling/rtl-scrollbars-listbox-select-right.html:
* fast/scrolling/rtl-scrollbars-listbox-simple-expected-mismatch.html:
* fast/scrolling/rtl-scrollbars-listbox-simple.html:
* fast/scrolling/rtl-scrollbars-listbox.html:
* fast/scrolling/rtl-scrollbars-overflow-contents-expected.html:
* fast/scrolling/rtl-scrollbars-overflow-contents.html:
* fast/scrolling/rtl-scrollbars-overflow-dir-rtl-expected.html:
* fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html:
* fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html:
* fast/scrolling/rtl-scrollbars-overflow-expected.html:
* fast/scrolling/rtl-scrollbars-overflow-padding-expected.html:
* fast/scrolling/rtl-scrollbars-overflow-padding.html:
* fast/scrolling/rtl-scrollbars-overflow-position-absolute-expected.html:
* fast/scrolling/rtl-scrollbars-overflow-position-absolute.html:
* fast/scrolling/rtl-scrollbars-overflow-simple-expected-mismatch.html:
* fast/scrolling/rtl-scrollbars-overflow-simple.html:
* fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled-expected.html:
* fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled.html:
* fast/scrolling/rtl-scrollbars-overflow.html:
* fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html:
* fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html:
* fast/scrolling/rtl-scrollbars-position-absolute-expected.html:
* fast/scrolling/rtl-scrollbars-position-absolute.html:
* fast/scrolling/rtl-scrollbars-position-fixed-expected.html:
* fast/scrolling/rtl-scrollbars-position-fixed.html:
* fast/scrolling/rtl-scrollbars-positioning-expected.html:
* fast/scrolling/rtl-scrollbars-positioning.html:
* fast/scrolling/rtl-scrollbars-simple-expected-mismatch.html:
* fast/scrolling/rtl-scrollbars-simple.html:
* fast/scrolling/rtl-scrollbars-sticky-document-2-expected.html:
* fast/scrolling/rtl-scrollbars-sticky-document-2.html:
* fast/scrolling/rtl-scrollbars-sticky-document-expected.html:
* fast/scrolling/rtl-scrollbars-sticky-document.html:
* fast/scrolling/rtl-scrollbars-sticky-iframe-2-expected.html:
* fast/scrolling/rtl-scrollbars-sticky-iframe-2.html:
* fast/scrolling/rtl-scrollbars-sticky-iframe-expected.html:
* fast/scrolling/rtl-scrollbars-sticky-iframe.html:
* fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2-expected.html:
* fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html:
* fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-expected.html:
* fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html:
* fast/scrolling/rtl-scrollbars-text-selection-expected.html:
* fast/scrolling/rtl-scrollbars-text-selection-scrolled-expected.html:
* fast/scrolling/rtl-scrollbars-text-selection-scrolled.html:
* fast/scrolling/rtl-scrollbars-text-selection.html:
* fast/scrolling/rtl-scrollbars.html:
* platform/mac/fast/scrolling/rtl-scrollbars-animation-property-expected.png: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsanimationpropertyhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-animation-property.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarselementFromPointstatichtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-elementFromPoint-static.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarselementFromPointhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-elementFromPoint.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsiframeoffsetexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-offset-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsiframeoffsethtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-offset.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsiframepositionabsolutehtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-position-absolute.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsiframescrolledexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-scrolled-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsiframescrolledhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-scrolled.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsiframehtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxscrollexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxscrollhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxselectleftexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-left-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxselectlefthtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-left.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxselectrightexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-right-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxselectrighthtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-right.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxsimpleexpectedmismatchhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-simple-expected-mismatch.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxsimplehtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-simple.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarslistboxhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowcontentsexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-contents-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowcontentshtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-contents.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowdirrtlexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-dir-rtl-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowdirrtlhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowelementFromPointhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowpaddingexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-padding-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowpaddinghtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-padding.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowpositionabsoluteexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-position-absolute-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowpositionabsolutehtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-position-absolute.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowsimpleexpectedmismatchhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-simple-expected-mismatch.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowsimplehtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-simple.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowtextselectionscrolledexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowtextselectionscrolledhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverflowhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverlaynopushcontentsexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsoverlaynopushcontentshtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarspositionabsoluteexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-absolute-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarspositionabsolutehtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-absolute.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarspositionfixedexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-fixed-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarspositionfixedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-fixed.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarspositioningexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-positioning-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarspositioninghtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-positioning.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarssimpleexpectedmismatchhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-simple-expected-mismatch.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarssimplehtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-simple.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickydocument2expectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-2-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickydocument2html">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-2.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickydocumentexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickydocumenthtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickyiframe2expectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-2-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickyiframe2html">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-2.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickyiframeexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickyiframehtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickyoverflowscroll2expectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickyoverflowscroll2html">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickyoverflowscrollexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarsstickyoverflowscrollhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarstextselectionexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarstextselectionscrolledexpectedhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarstextselectionscrolledhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarstextselectionhtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection.html</a></li>
<li><a href="#trunkLayoutTestsfastscrollingrtlscrollbarshtml">trunk/LayoutTests/fast/scrolling/rtl-scrollbars.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCorepageSettingsh">trunk/Source/WebCore/page/Settings.h</a></li>
<li><a href="#trunkSourceWebCorepageSettingsin">trunk/Source/WebCore/page/Settings.in</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollViewcpp">trunk/Source/WebCore/platform/ScrollView.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreacpp">trunk/Source/WebCore/platform/ScrollableArea.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreah">trunk/Source/WebCore/platform/ScrollableArea.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacScrollbarThemeMacmm">trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformwinPopupMenuWinh">trunk/Source/WebCore/platform/win/PopupMenuWin.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerh">trunk/Source/WebCore/rendering/RenderLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerModelObjectcpp">trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerModelObjecth">trunk/Source/WebCore/rendering/RenderLayerModelObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxcpp">trunk/Source/WebCore/rendering/RenderListBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxh">trunk/Source/WebCore/rendering/RenderListBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalSettingscpp">trunk/Source/WebCore/testing/InternalSettings.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalSettingsh">trunk/Source/WebCore/testing/InternalSettings.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalSettingsidl">trunk/Source/WebCore/testing/InternalSettings.idl</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesDefinitionsh">trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFDeprecatedPDFPluginh">trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundlemacInjectedBundleMacmm">trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestOptionsh">trunk/Tools/WebKitTestRunner/TestOptions.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacPlatformWebViewMacmm">trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacfastscrollingrtlscrollbarsanimationpropertyexpectedpng">trunk/LayoutTests/platform/mac/fast/scrolling/rtl-scrollbars-animation-property-expected.png</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformmacScrollableAreaMacmm">trunk/Source/WebCore/platform/mac/ScrollableAreaMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/ChangeLog        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,3 +1,77 @@
</span><ins>+2016-04-26  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [WK2] [OS X] Create API for switching RTL scrollbar policy
+        https://bugs.webkit.org/show_bug.cgi?id=156948
+        &lt;rdar://problem/25707757&gt;
+
+        Reviewed by Darin Adler.
+
+        Update tests to use new RTL scrollbar mechanism.
+
+        * fast/scrolling/rtl-scrollbars-animation-property.html:
+        * fast/scrolling/rtl-scrollbars-elementFromPoint-static.html:
+        * fast/scrolling/rtl-scrollbars-elementFromPoint.html:
+        * fast/scrolling/rtl-scrollbars-expected.html:
+        * fast/scrolling/rtl-scrollbars-iframe-offset-expected.html:
+        * fast/scrolling/rtl-scrollbars-iframe-offset.html:
+        * fast/scrolling/rtl-scrollbars-iframe-position-absolute.html:
+        * fast/scrolling/rtl-scrollbars-iframe-scrolled-expected.html:
+        * fast/scrolling/rtl-scrollbars-iframe-scrolled.html:
+        * fast/scrolling/rtl-scrollbars-iframe.html:
+        * fast/scrolling/rtl-scrollbars-listbox-expected.html:
+        * fast/scrolling/rtl-scrollbars-listbox-scroll-expected.html:
+        * fast/scrolling/rtl-scrollbars-listbox-scroll.html:
+        * fast/scrolling/rtl-scrollbars-listbox-select-left-expected.html:
+        * fast/scrolling/rtl-scrollbars-listbox-select-left.html:
+        * fast/scrolling/rtl-scrollbars-listbox-select-right-expected.html:
+        * fast/scrolling/rtl-scrollbars-listbox-select-right.html:
+        * fast/scrolling/rtl-scrollbars-listbox-simple-expected-mismatch.html:
+        * fast/scrolling/rtl-scrollbars-listbox-simple.html:
+        * fast/scrolling/rtl-scrollbars-listbox.html:
+        * fast/scrolling/rtl-scrollbars-overflow-contents-expected.html:
+        * fast/scrolling/rtl-scrollbars-overflow-contents.html:
+        * fast/scrolling/rtl-scrollbars-overflow-dir-rtl-expected.html:
+        * fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html:
+        * fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html:
+        * fast/scrolling/rtl-scrollbars-overflow-expected.html:
+        * fast/scrolling/rtl-scrollbars-overflow-padding-expected.html:
+        * fast/scrolling/rtl-scrollbars-overflow-padding.html:
+        * fast/scrolling/rtl-scrollbars-overflow-position-absolute-expected.html:
+        * fast/scrolling/rtl-scrollbars-overflow-position-absolute.html:
+        * fast/scrolling/rtl-scrollbars-overflow-simple-expected-mismatch.html:
+        * fast/scrolling/rtl-scrollbars-overflow-simple.html:
+        * fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled-expected.html:
+        * fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled.html:
+        * fast/scrolling/rtl-scrollbars-overflow.html:
+        * fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html:
+        * fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html:
+        * fast/scrolling/rtl-scrollbars-position-absolute-expected.html:
+        * fast/scrolling/rtl-scrollbars-position-absolute.html:
+        * fast/scrolling/rtl-scrollbars-position-fixed-expected.html:
+        * fast/scrolling/rtl-scrollbars-position-fixed.html:
+        * fast/scrolling/rtl-scrollbars-positioning-expected.html:
+        * fast/scrolling/rtl-scrollbars-positioning.html:
+        * fast/scrolling/rtl-scrollbars-simple-expected-mismatch.html:
+        * fast/scrolling/rtl-scrollbars-simple.html:
+        * fast/scrolling/rtl-scrollbars-sticky-document-2-expected.html:
+        * fast/scrolling/rtl-scrollbars-sticky-document-2.html:
+        * fast/scrolling/rtl-scrollbars-sticky-document-expected.html:
+        * fast/scrolling/rtl-scrollbars-sticky-document.html:
+        * fast/scrolling/rtl-scrollbars-sticky-iframe-2-expected.html:
+        * fast/scrolling/rtl-scrollbars-sticky-iframe-2.html:
+        * fast/scrolling/rtl-scrollbars-sticky-iframe-expected.html:
+        * fast/scrolling/rtl-scrollbars-sticky-iframe.html:
+        * fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2-expected.html:
+        * fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html:
+        * fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-expected.html:
+        * fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html:
+        * fast/scrolling/rtl-scrollbars-text-selection-expected.html:
+        * fast/scrolling/rtl-scrollbars-text-selection-scrolled-expected.html:
+        * fast/scrolling/rtl-scrollbars-text-selection-scrolled.html:
+        * fast/scrolling/rtl-scrollbars-text-selection.html:
+        * fast/scrolling/rtl-scrollbars.html:
+        * platform/mac/fast/scrolling/rtl-scrollbars-animation-property-expected.png: Added.
+
</ins><span class="cx"> 2016-04-26  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         ASSERTION FAILED: m_templateInsertionModes.isEmpty() in WebCore::HTMLTreeBuilder::finished
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsanimationpropertyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-animation-property.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-animation-property.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-animation-property.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true useMockScrollbars=false ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ useMockScrollbars=false ] --&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div style=&quot;width: 200px; height: 200px; position: relative; overflow: scroll;&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarselementFromPointstatichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-elementFromPoint-static.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-elementFromPoint-static.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-elementFromPoint-static.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="lines">@@ -14,4 +20,4 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarselementFromPointhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-elementFromPoint.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-elementFromPoint.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-elementFromPoint.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="lines">@@ -13,4 +19,4 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;height: 1000px; position: relative;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 0px; bottom: 0px;&quot;&gt;This test makes sure that rtl scrollbars are on the left of the main frame.&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsiframeoffsetexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-offset-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-offset-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-offset-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,10 +1,16 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div id=&quot;text&quot; style='position: absolute; left: 0px; top: 0px;'&gt;ABCD&lt;/div&gt;
</span><span class="cx"> &lt;div style='position: absolute; left: 0px; top: 25px;'&gt;DEFG&lt;/div&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 100px;&quot;&gt;This test makes sure that contents of iframes are not covered by an rtl scrollbar.&lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsiframeoffsethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-offset.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-offset.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-offset.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;iframe id=&quot;iframe&quot; style=&quot;position: absolute; width: 100px; height: 100px; left: -15px; top: 0px; margin: 0px; border: solid black 0px; padding: 0px;&quot;
</span><span class="lines">@@ -15,4 +21,4 @@
</span><span class="cx"> &lt;/html&gt;&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 100px;&quot;&gt;This test makes sure that contents of iframes are not covered by an rtl scrollbar.&lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsiframepositionabsolutehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-position-absolute.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-position-absolute.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-position-absolute.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;script src='../../resources/js-test-pre.js'&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="lines">@@ -28,4 +34,4 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src='../../resources/js-test-post.js'&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsiframescrolledexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-scrolled-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-scrolled-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-scrolled-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;iframe id=&quot;iframe&quot; style=&quot;position: absolute; width: 100px; height: 100px; left: 0px; top: 0px; margin: 0px; border: solid black 0px; padding: 0px;&quot;
</span><span class="lines">@@ -27,4 +33,4 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 100px;&quot;&gt;This test makes sure that hit testing in iframes works correctly.&lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsiframescrolledhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-scrolled.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-scrolled.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe-scrolled.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;iframe id=&quot;iframe&quot; style=&quot;position: absolute; width: 100px; height: 100px; left: 0px; top: 0px; margin: 0px; border: solid black 0px; padding: 0px;&quot;
</span><span class="lines">@@ -23,4 +29,4 @@
</span><span class="cx"> &lt;/html&gt;&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 100px;&quot;&gt;This test makes sure that hit testing in iframes works correctly.&lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsiframehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-iframe.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;script src='../../resources/js-test-pre.js'&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="lines">@@ -28,4 +34,4 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src='../../resources/js-test-post.js'&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -21,4 +21,4 @@
</span><span class="cx"> &lt;/select&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxscrollexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 200px;&quot;&gt;This test makes sure that list boxes obey RTL scrollbars.&lt;/div&gt;
</span><span class="lines">@@ -23,4 +29,4 @@
</span><span class="cx"> container.scrollTop = container.scrollHeight - container.clientHeight;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxscrollhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 200px;&quot;&gt;This test makes sure that list boxes obey RTL scrollbars.&lt;/div&gt;
</span><span class="lines">@@ -26,4 +32,4 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxselectleftexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-left-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-left-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-left-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 200px;&quot;&gt;This test makes sure that cliking on an LTR scrollbar doesn't select an item in a list box.&lt;/div&gt;
</span><span class="lines">@@ -23,4 +29,4 @@
</span><span class="cx"> container.focus();
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxselectlefthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-left.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-left.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-left.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 200px;&quot;&gt;This test makes sure that cliking on an LTR scrollbar doesn't select an item in a list box.&lt;/div&gt;
</span><span class="lines">@@ -26,4 +32,4 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxselectrightexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-right-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-right-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-right-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 200px;&quot;&gt;This test makes sure that cliking on the rightmost part of an item causes it to be selected.&lt;/div&gt;
</span><span class="lines">@@ -25,4 +31,4 @@
</span><span class="cx"> january.selected = true;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxselectrighthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-right.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-right.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-select-right.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 200px;&quot;&gt;This test makes sure that cliking on the rightmost part of an item causes it to be selected.&lt;/div&gt;
</span><span class="lines">@@ -26,4 +32,4 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxsimpleexpectedmismatchhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-simple-expected-mismatch.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-simple-expected-mismatch.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-simple-expected-mismatch.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -19,4 +19,4 @@
</span><span class="cx"> &lt;option&gt;December&lt;/option&gt;
</span><span class="cx"> &lt;/select&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxsimplehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-simple.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-simple.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-simple.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p&gt;This test makes sure that list boxes obey RTL scrollbars.&lt;/p&gt;
</span><span class="lines">@@ -19,4 +25,4 @@
</span><span class="cx"> &lt;option&gt;December&lt;/option&gt;
</span><span class="cx"> &lt;/select&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarslistboxhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 8px; top: 200px;&quot;&gt;This test makes sure that list boxes obey RTL scrollbars.&lt;/div&gt;
</span><span class="lines">@@ -21,4 +27,4 @@
</span><span class="cx"> &lt;/select&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowcontentsexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-contents-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-contents-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-contents-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -17,4 +17,4 @@
</span><span class="cx"> &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse a risus nisi. Maecenas ut metus gravida, tincidunt arcu nec, ultrices dui. Vivamus at pretium purus, in feugiat odio. Phasellus facilisis mi id condimentum congue. Aenean sollicitudin risus a accumsan facilisis. Sed ac fringilla felis. Morbi malesuada vehicula sapien.&lt;/p&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowcontentshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-contents.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-contents.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-contents.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div style=&quot;overflow: hidden; width: 700px; height: 500px; position: relative;&quot;&gt;
</span><span class="lines">@@ -19,4 +25,4 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowdirrtlexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-dir-rtl-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-dir-rtl-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-dir-rtl-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -24,4 +24,4 @@
</span><span class="cx"> selection.addRange(range);
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowdirrtlhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div style=&quot;overflow: hidden; width: 100%; height: 539px; position: relative;&quot;&gt;
</span><span class="lines">@@ -26,4 +32,4 @@
</span><span class="cx"> selection.addRange(range);
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowelementFromPointhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="lines">@@ -15,4 +21,4 @@
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div id=&quot;element&quot; style=&quot;overflow: scroll; width: 700px; height: 500px;&quot;&gt;
</span><span class="lines">@@ -21,4 +27,4 @@
</span><span class="cx"> element.scrollTop = 1000;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowpaddingexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-padding-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-padding-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-padding-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -24,4 +24,4 @@
</span><span class="cx"> selection.addRange(range);
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowpaddinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-padding.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-padding.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-padding.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div style=&quot;overflow: hidden; width: 100%; height: 539px; position: relative;&quot;&gt;
</span><span class="lines">@@ -26,4 +32,4 @@
</span><span class="cx"> selection.addRange(range);
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowpositionabsoluteexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-position-absolute-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-position-absolute-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-position-absolute-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> This test makes sure that position: absolute elements do not overlap the vertical scrollbar on RTL machines. The test passes if you see a green square and a red square below.
</span><span class="lines">@@ -10,4 +16,4 @@
</span><span class="cx"> &lt;div style=&quot;width: 1px; height: 3000px; position: absolute; left: 0px; top: 0px;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowpositionabsolutehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-position-absolute.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-position-absolute.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-position-absolute.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> This test makes sure that position: absolute elements do not overlap the vertical scrollbar on RTL machines. The test passes if you see a green square and a red square below.
</span><span class="lines">@@ -12,4 +18,4 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowsimpleexpectedmismatchhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-simple-expected-mismatch.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-simple-expected-mismatch.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-simple-expected-mismatch.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -17,4 +17,4 @@
</span><span class="cx"> &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse a risus nisi. Maecenas ut metus gravida, tincidunt arcu nec, ultrices dui. Vivamus at pretium purus, in feugiat odio. Phasellus facilisis mi id condimentum congue. Aenean sollicitudin risus a accumsan facilisis. Sed ac fringilla felis. Morbi malesuada vehicula sapien.&lt;/p&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowsimplehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-simple.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-simple.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-simple.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div id=&quot;element&quot; style=&quot;overflow: scroll; width: 700px; height: 500px;&quot;&gt;
</span><span class="lines">@@ -17,4 +23,4 @@
</span><span class="cx"> &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse a risus nisi. Maecenas ut metus gravida, tincidunt arcu nec, ultrices dui. Vivamus at pretium purus, in feugiat odio. Phasellus facilisis mi id condimentum congue. Aenean sollicitudin risus a accumsan facilisis. Sed ac fringilla felis. Morbi malesuada vehicula sapien.&lt;/p&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowtextselectionscrolledexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -16,4 +16,4 @@
</span><span class="cx"> selection.addRange(range);
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowtextselectionscrolledhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;overflow: hidden; width: 100%; height: 485px; position: absolute; left: -15px;&quot;&gt;
</span><span class="lines">@@ -21,4 +27,4 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverflowhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overflow.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div id=&quot;element&quot; style=&quot;overflow: scroll; width: 700px; height: 500px;&quot;&gt;
</span><span class="lines">@@ -26,4 +32,4 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverlaynopushcontentsexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,7 +1,13 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><ins>+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
+&lt;script&gt;
</ins><span class="cx"> if (window.internals)
</span><span class="cx">     internals.setUsesOverlayScrollbars(true);
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsoverlaynopushcontentshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,7 +1,13 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><ins>+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
+&lt;script&gt;
</ins><span class="cx"> if (window.internals)
</span><span class="cx">     internals.setUsesOverlayScrollbars(true);
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarspositionabsoluteexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-absolute-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-absolute-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-absolute-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div id=&quot;text&quot; style=&quot;font: 20px Ahem; position: absolute; left: 100px;&quot;&gt;pppppppppppppp&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarspositionabsolutehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-absolute.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-absolute.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-absolute.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div id=&quot;text&quot; style=&quot;font: 20px Ahem; position: absolute; left: 100px;&quot;&gt;pppppppppppppp&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarspositionfixedexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-fixed-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-fixed-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-fixed-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div id=&quot;text&quot; style=&quot;font: 20px Ahem; position: fixed; left: 100px;&quot;&gt;pppppppppppppp&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarspositionfixedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-fixed.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-fixed.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-position-fixed.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div id=&quot;text&quot; style=&quot;font: 20px Ahem; position: fixed; left: 100px;&quot;&gt;pppppppppppppp&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarspositioningexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-positioning-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-positioning-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-positioning-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;style&gt;
</span><span class="cx"> div {
</span><span class="cx">     font: 20px Ahem;
</span><span class="lines">@@ -19,4 +25,4 @@
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 0px; top: 210px;&quot;&gt;m&lt;/div&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 0px; top: 0px; width: 1px; height: 2000px;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarspositioninghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-positioning.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-positioning.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-positioning.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;style&gt;
</span><span class="cx"> div {
</span><span class="cx">     font: 20px Ahem;
</span><span class="lines">@@ -35,4 +41,4 @@
</span><span class="cx"> &lt;/html&gt;&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 0px; top: 0px; width: 1px; height: 2000px;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarssimpleexpectedmismatchhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-simple-expected-mismatch.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-simple-expected-mismatch.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-simple-expected-mismatch.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -5,4 +5,4 @@
</span><span class="cx"> &lt;body style=&quot;height: 1000px;&quot;&gt;
</span><span class="cx"> This test makes sure that rtl scrollbars are on the left of the main frame.
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarssimplehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-simple.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-simple.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-simple.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,8 +1,14 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;height: 1000px;&quot;&gt;
</span><span class="cx"> This test makes sure that rtl scrollbars are on the left of the main frame.
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickydocument2expectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-2-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-2-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-2-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -12,4 +18,4 @@
</span><span class="cx"> window.scroll(850, 0);
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickydocument2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-2.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-2.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-2.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -11,4 +17,4 @@
</span><span class="cx"> window.scroll(850, 0);
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickydocumentexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -9,4 +15,4 @@
</span><span class="cx">     &lt;div style=&quot;position: absolute; left: 685px; top: 0px; width: 100px; height: 100px; background: green;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickydocumenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-document.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -8,4 +14,4 @@
</span><span class="cx">     &lt;div style=&quot;display: inline-block; position: static; width: 800px; height: 100px; background: blue;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;display: inline-block; position: -webkit-sticky; left: 0px; right: 0px; width: 100px; height: 100px; background: green;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;display: inline-block; position: static; width: 800px; height: 100px; background: blue;&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickyiframe2expectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-2-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-2-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-2-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -18,4 +24,4 @@
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&quot;&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickyiframe2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-2.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-2.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-2.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -17,4 +23,4 @@
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&quot;&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickyiframeexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -15,4 +21,4 @@
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&quot;&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickyiframehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-iframe.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -14,4 +20,4 @@
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&quot;&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickyoverflowscroll2expectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -15,4 +21,4 @@
</span><span class="cx"> scrollingElement.scrollLeft = 1000;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickyoverflowscroll2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -14,4 +20,4 @@
</span><span class="cx"> scrollingElement.scrollLeft = 1000;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickyoverflowscrollexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -11,4 +17,4 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarsstickyoverflowscrollhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> This test makes sure that position-sticky obeys RTL scrollbars when positioning.
</span><span class="lines">@@ -10,4 +16,4 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarstextselectionexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div id=&quot;text&quot; style=&quot;font: 20px Ahem;&quot;&gt;pppppppppppppp&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarstextselectionscrolledexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled-expected.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled-expected.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled-expected.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div id=&quot;text&quot; style=&quot;font: 20px Ahem;&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;pppppppppppppp&lt;/div&gt;
</span><span class="lines">@@ -17,4 +23,4 @@
</span><span class="cx"> selection.addRange(range);
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarstextselectionscrolledhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection-scrolled.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,5 +1,11 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="lines">@@ -16,4 +22,4 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarstextselectionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-text-selection.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;margin: 0px;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;font: 20px Ahem;&quot;&gt;pppppppppppppp&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingrtlscrollbarshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars.html (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars.html        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars.html        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,6 +1,12 @@
</span><del>-&lt;!DOCTYPE html&gt;&lt;!-- webkit-test-runner [ rtlScrollbars=true ] --&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script&gt;
+if (window.internals) {
+    internals.settings.setUserInterfaceDirectionPolicy(&quot;View&quot;);
+    internals.settings.setSystemLayoutDirection(&quot;RTL&quot;);
+}
+&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body style=&quot;height: 1000px; position: relative;&quot;&gt;
</span><span class="cx"> &lt;div style=&quot;position: absolute; left: 0px; bottom: 0px;&quot;&gt;This test makes sure that rtl scrollbars are on the left of the main frame.&lt;/div&gt;
</span><span class="lines">@@ -13,4 +19,4 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastscrollingrtlscrollbarsanimationpropertyexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/fast/scrolling/rtl-scrollbars-animation-property-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/fast/scrolling/rtl-scrollbars-animation-property-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/ChangeLog        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,3 +1,135 @@
</span><ins>+2016-04-26  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [WK2] [OS X] Create API for switching RTL scrollbar policy
+        https://bugs.webkit.org/show_bug.cgi?id=156948
+        &lt;rdar://problem/25707757&gt;
+
+        Reviewed by Darin Adler.
+
+        There are two schools of thought for where to put scrollbars in RTL environments.
+        The first is that we should obey the content's &quot;dir&quot; attribute, specified on each
+        element. The second is that we should be consistent with the platform (AppKit's)
+        behavior.
+
+        There are some situations where the placement should be done according to the
+        content. For example, this policy would be used in web browsers.
+
+        However, there are also places where web content is designed to fit seamlessly
+        amongst native content. In this situation, the placement of the scrollbars should
+        be done according to the view.
+
+        Because WebKit doesn't know which of these situations it is operating within, this
+        patch adds a new API property, userInterfaceDirectionPolicy, to
+        WKWebViewConfigurationPolicy. This allows clients to instruct us which policy to
+        abide by. It is plumbed to the web process inside the WebPreferencesStore and is
+        ultimately held inside the Page's Settings object.
+
+        This Setting is consulted by RenderLayerModelObject, which serves as a good
+        centralized place for this policy implementation. This is the class which decides
+        if we should be consulting its RenderStyle or the platform itself when we decide
+        where to put the scrollbars.
+
+        Putting this decision inside the renderer is important because ScrollableArea
+        often needs to know if scrollbars should be put on the left, but ScrollableArea
+        doesn't know anything about RenderStyles. Therefore, the renderer must be the
+        intermediary between ScrollableArea and the RenderStyle. (ScrollableArea also
+        doesn't directly know anything about renderers either; however, each of the
+        subclasses knows about an appropriate renderer.) Therefore, ScrollableArea gets
+        a new virtual method which is implemented by the RenderLayerModelObject.
+
+        Tests: fast/scrolling/rtl-scrollbars*.html
+
+        * WebCore.xcodeproj/project.pbxproj: ScrollableAreaMac.mm is no longer necessary.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::shouldPlaceBlockDirectionScrollbarOnLeft): Overridden
+        ScrollableArea function.
+        * page/FrameView.h:
+        * page/Settings.h:
+        * page/Settings.in:
+        * platform/ScrollView.cpp: Adding two new settings: One to know if we should
+        consult with the RenderStyle or the platform, and the other is whether or not
+        the platform considers itself to be RTL.
+        (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin): Update to
+        use new mechanism.
+        (WebCore::ScrollView::updateScrollbars): Ditto.
+        (WebCore::ScrollView::scrollCornerRect): Ditto.
+        (WebCore::ScrollView::locationOfContents): Ditto.
+        * platform/ScrollableArea.cpp:
+        (WebCore::ScrollableArea::verticalScrollbarIsOnLeft): Deleted. This was the old
+        mechanism.
+        (WebCore::ScrollableArea::systemLanguageIsRTL): Deleted. Ditto.
+        * platform/ScrollableArea.h:
+        * platform/mac/ScrollableAreaMac.mm: Removed.
+        (WebCore::ScrollableArea::verticalScrollbarIsOnLeft): Deleted.
+        (WebCore::ScrollableArea::systemLanguageIsRTL): Deleted.
+        * platform/mac/ScrollbarThemeMac.mm:
+        (WebCore::ScrollbarThemeMac::didCreateScrollerImp): Update to use new
+        mechanism.
+        * platform/text/WritingMode.h: These enums should match what's in WebKit2.
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::logicalLeftOffsetForContent): Update to use new mechanism.
+        (WebCore::RenderBlock::logicalRightOffsetForContent): Ditto.
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild): Ditto.
+        * rendering/RenderBox.cpp: Ditto.
+        (WebCore::RenderBox::contentBoxRect):
+        (WebCore::RenderBox::overflowClipRect):
+        (WebCore::RenderBox::computePositionedLogicalWidth):
+        (WebCore::RenderBox::layoutOverflowRectForPropagation):
+        * rendering/RenderBoxModelObject.cpp: Ditto.
+        (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::resize): Ditto.
+        (WebCore::cornerStart): Migrate to use references.
+        (WebCore::cornerRect): Ditto.
+        (WebCore::RenderLayer::scrollCornerRect): Ditto.
+        (WebCore::resizerCornerRect): Ditto.
+        (WebCore::RenderLayer::scrollCornerAndResizerRect): Ditto.
+        (WebCore::RenderLayer::verticalScrollbarStart): Update to use new mechanism.
+        (WebCore::RenderLayer::horizontalScrollbarStart): Ditto.
+        (WebCore::RenderLayer::offsetFromResizeCorner): Ditto.
+        (WebCore::RenderLayer::positionOverflowControls): Migrate to use references.
+        (WebCore::RenderLayer::computeScrollDimensions): Ditto.
+        (WebCore::RenderLayer::overflowControlsIntersectRect): Ditto.
+        (WebCore::RenderLayer::drawPlatformResizerImage): Update to use new mechanism.
+        (WebCore::RenderLayer::paintResizer): Migrate to use references.
+        (WebCore::RenderLayer::isPointInResizeControl): Ditto.
+        (WebCore::RenderLayer::hitTestOverflowControls): Ditto.
+        (WebCore::RenderLayer::hitTestResizerInFragments): Ditto.
+        * rendering/RenderLayer.h: ScrollableArea override
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::positionForClipLayer): Update to use new
+        mechanism.
+        * rendering/RenderLayerModelObject.cpp:
+        (WebCore::RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft):
+        This is the meat of this patch. This is where we decide if we should be
+        interrogating the RenderStyle or the underlying platform.
+        * rendering/RenderLayerModelObject.h:
+        * rendering/RenderListBox.cpp: Update to use new mechanism.
+        (WebCore::RenderListBox::itemBoundingBoxRect):
+        (WebCore::RenderListBox::paintScrollbar):
+        (WebCore::RenderListBox::isPointInOverflowControl):
+        (WebCore::RenderListBox::listIndexAtOffset):
+        (WebCore::RenderListBox::controlClipRect):
+        (WebCore::RenderListBox::invalidateScrollbarRect):
+        (WebCore::RenderListBox::convertFromScrollbarToContainingView):
+        (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
+        * rendering/RenderListBox.h:
+        * rendering/RenderView.cpp: Ditto.
+        (WebCore::RenderView::repaintViewRectangle):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::shouldPlaceBlockDirectionScrollbarOnLeft): This
+        function is now much dumber. It just inspects its own style.
+        * testing/InternalSettings.cpp: Allow mocking.
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        (WebCore::InternalSettings::verticalScrollbarLocationPolicy):
+        (WebCore::InternalSettings::setVerticalScrollbarLocationPolicy):
+        (WebCore::InternalSettings::systemLayoutDirection):
+        (WebCore::InternalSettings::setSystemLayoutDirection):
+        * testing/InternalSettings.h:
+        * testing/InternalSettings.idl:
+
</ins><span class="cx"> 2016-04-26  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Web IDL] Specify default values for optional parameters of type 'unsigned long'
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -976,7 +976,6 @@
</span><span class="cx">                 1C81B95A0E97330800266E07 /* InspectorController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C81B9560E97330800266E07 /* InspectorController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C81B9570E97330800266E07 /* InspectorController.cpp */; };
</span><span class="cx">                 1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C81B9580E97330800266E07 /* InspectorClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                1C99542E1C92105200DBD226 /* ScrollableAreaMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C99542D1C92105200DBD226 /* ScrollableAreaMac.mm */; };
</del><span class="cx">                 1CA19E050DC255950065A994 /* EventLoopMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CA19E030DC255950065A994 /* EventLoopMac.mm */; };
</span><span class="cx">                 1CA19E160DC255CA0065A994 /* EventLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CA19E150DC255CA0065A994 /* EventLoop.h */; };
</span><span class="cx">                 1CAF34810A6C405200ABE06E /* WebScriptObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CAF347E0A6C405200ABE06E /* WebScriptObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -8426,7 +8425,6 @@
</span><span class="cx">                 1C81B9570E97330800266E07 /* InspectorController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C81B9580E97330800266E07 /* InspectorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C904DF90BA9D2C80081E9D0 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1C99542D1C92105200DBD226 /* ScrollableAreaMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollableAreaMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1CA19E030DC255950065A994 /* EventLoopMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventLoopMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1CA19E150DC255CA0065A994 /* EventLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventLoop.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1CAF347E0A6C405200ABE06E /* WebScriptObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptObject.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17918,7 +17916,6 @@
</span><span class="cx">                                 CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */,
</span><span class="cx">                                 CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */,
</span><span class="cx">                                 9380F47709A11ACC001FDB34 /* WidgetMac.mm */,
</span><del>-                                1C99542D1C92105200DBD226 /* ScrollableAreaMac.mm */,
</del><span class="cx">                         );
</span><span class="cx">                         path = mac;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -31201,7 +31198,6 @@
</span><span class="cx">                                 F55B3DCB1251F12D003EF269 /* RadioInputType.cpp in Sources */,
</span><span class="cx">                                 B658FFA51522EFAA00DD5595 /* RadioNodeList.cpp in Sources */,
</span><span class="cx">                                 93F19AB908245E59001E9ABC /* Range.cpp in Sources */,
</span><del>-                                1C99542E1C92105200DBD226 /* ScrollableAreaMac.mm in Sources */,
</del><span class="cx">                                 F55B3DCD1251F12D003EF269 /* RangeInputType.cpp in Sources */,
</span><span class="cx">                                 6E84E9E017668BEE00815B68 /* RasterShape.cpp in Sources */,
</span><span class="cx">                                 FD31603B12B0267600C1A359 /* RealtimeAnalyser.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/page/FrameView.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -4968,5 +4968,10 @@
</span><span class="cx">     // property on the root element.
</span><span class="cx">     return visibleContentRectIncludingScrollbars().size();
</span><span class="cx"> }
</span><ins>+
+bool FrameView::shouldPlaceBlockDirectionScrollbarOnLeft() const
+{
+    return renderView() &amp;&amp; renderView()-&gt;shouldPlaceBlockDirectionScrollbarOnLeft();
+}
</ins><span class="cx">     
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/page/FrameView.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -557,6 +557,8 @@
</span><span class="cx"> 
</span><span class="cx">     void show() override;
</span><span class="cx"> 
</span><ins>+    bool shouldPlaceBlockDirectionScrollbarOnLeft() const final;
+
</ins><span class="cx"> protected:
</span><span class="cx">     bool scrollContentsFastPath(const IntSize&amp; scrollDelta, const IntRect&amp; rectToScroll, const IntRect&amp; clipRect) override;
</span><span class="cx">     void scrollContentsSlowPath(const IntRect&amp; updateRect) override;
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/page/Settings.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &quot;TextFlags.h&quot;
</span><span class="cx"> #include &quot;Timer.h&quot;
</span><span class="cx"> #include &quot;URL.h&quot;
</span><ins>+#include &quot;WritingMode.h&quot;
</ins><span class="cx"> #include &lt;chrono&gt;
</span><span class="cx"> #include &lt;runtime/RuntimeFlags.h&gt;
</span><span class="cx"> #include &lt;unicode/uscript.h&gt;
</span><span class="lines">@@ -71,6 +72,11 @@
</span><span class="cx">     WheelEventHandlerRegion = 1 &lt;&lt; 1,
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum class UserInterfaceDirectionPolicy {
+    Content,
+    System
+};
+
</ins><span class="cx"> typedef unsigned DebugOverlayRegions;
</span><span class="cx"> 
</span><span class="cx"> class Settings : public RefCounted&lt;Settings&gt; {
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.in (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.in        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/page/Settings.in        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -251,3 +251,6 @@
</span><span class="cx"> # enforces all frame sandbox flags (see enum SandboxFlag in SecurityContext.h), and also disables &lt;meta http-equiv&gt;
</span><span class="cx"> # processing and subframe loading.
</span><span class="cx"> contentDispositionAttachmentSandboxEnabled initial=false
</span><ins>+
+userInterfaceDirectionPolicy type=UserInterfaceDirectionPolicy, initial=UserInterfaceDirectionPolicy::Content
+systemLayoutDirection type=TextDirection, initial=LTR
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollView.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/platform/ScrollView.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -405,7 +405,7 @@
</span><span class="cx"> ScrollPosition ScrollView::documentScrollPositionRelativeToViewOrigin() const
</span><span class="cx"> {
</span><span class="cx">     return scrollPosition() - IntSize(
</span><del>-        verticalScrollbarIsOnLeft() &amp;&amp; m_verticalScrollbar ? m_verticalScrollbar-&gt;occupiedWidth() : 0,
</del><ins>+        shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; m_verticalScrollbar ? m_verticalScrollbar-&gt;occupiedWidth() : 0,
</ins><span class="cx">         headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -719,7 +719,7 @@
</span><span class="cx">         int clientWidth = visibleWidth();
</span><span class="cx">         int pageStep = Scrollbar::pageStep(clientWidth);
</span><span class="cx">         IntRect oldRect(m_horizontalScrollbar-&gt;frameRect());
</span><del>-        IntRect hBarRect(verticalScrollbarIsOnLeft() &amp;&amp; m_verticalScrollbar ? m_verticalScrollbar-&gt;occupiedWidth() : 0,
</del><ins>+        IntRect hBarRect(shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; m_verticalScrollbar ? m_verticalScrollbar-&gt;occupiedWidth() : 0,
</ins><span class="cx">             height() - m_horizontalScrollbar-&gt;height(),
</span><span class="cx">             width() - (m_verticalScrollbar ? m_verticalScrollbar-&gt;occupiedWidth() : 0),
</span><span class="cx">             m_horizontalScrollbar-&gt;height());
</span><span class="lines">@@ -740,7 +740,7 @@
</span><span class="cx">         int clientHeight = visibleHeight();
</span><span class="cx">         int pageStep = Scrollbar::pageStep(clientHeight);
</span><span class="cx">         IntRect oldRect(m_verticalScrollbar-&gt;frameRect());
</span><del>-        IntRect vBarRect(verticalScrollbarIsOnLeft() ? 0 : width() - m_verticalScrollbar-&gt;width(),
</del><ins>+        IntRect vBarRect(shouldPlaceBlockDirectionScrollbarOnLeft() ? 0 : width() - m_verticalScrollbar-&gt;width(),
</ins><span class="cx">             topContentInset(),
</span><span class="cx">             m_verticalScrollbar-&gt;width(),
</span><span class="cx">             height() - topContentInset() - (m_horizontalScrollbar ? m_horizontalScrollbar-&gt;occupiedHeight() : 0));
</span><span class="lines">@@ -1134,14 +1134,14 @@
</span><span class="cx">     int heightTrackedByScrollbar = height() - topContentInset();
</span><span class="cx"> 
</span><span class="cx">     if (m_horizontalScrollbar &amp;&amp; width() - m_horizontalScrollbar-&gt;width() &gt; 0) {
</span><del>-        cornerRect.unite(IntRect(verticalScrollbarIsOnLeft() ? 0 : m_horizontalScrollbar-&gt;width(),
</del><ins>+        cornerRect.unite(IntRect(shouldPlaceBlockDirectionScrollbarOnLeft() ? 0 : m_horizontalScrollbar-&gt;width(),
</ins><span class="cx">             height() - m_horizontalScrollbar-&gt;height(),
</span><span class="cx">             width() - m_horizontalScrollbar-&gt;width(),
</span><span class="cx">             m_horizontalScrollbar-&gt;height()));
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_verticalScrollbar &amp;&amp; heightTrackedByScrollbar - m_verticalScrollbar-&gt;height() &gt; 0) {
</span><del>-        cornerRect.unite(IntRect(verticalScrollbarIsOnLeft() ? 0 : width() - m_verticalScrollbar-&gt;width(),
</del><ins>+        cornerRect.unite(IntRect(shouldPlaceBlockDirectionScrollbarOnLeft() ? 0 : width() - m_verticalScrollbar-&gt;width(),
</ins><span class="cx">             m_verticalScrollbar-&gt;height() + topContentInset(),
</span><span class="cx">             m_verticalScrollbar-&gt;width(),
</span><span class="cx">             heightTrackedByScrollbar - m_verticalScrollbar-&gt;height()));
</span><span class="lines">@@ -1502,7 +1502,7 @@
</span><span class="cx"> IntPoint ScrollView::locationOfContents() const
</span><span class="cx"> {
</span><span class="cx">     IntPoint result = location();
</span><del>-    if (verticalScrollbarIsOnLeft() &amp;&amp; m_verticalScrollbar)
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; m_verticalScrollbar)
</ins><span class="cx">         result.move(m_verticalScrollbar-&gt;occupiedWidth(), 0);
</span><span class="cx">     return result;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -689,16 +689,4 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if !PLATFORM(COCOA)
-bool ScrollableArea::verticalScrollbarIsOnLeft() const
-{
-    return false;
-}
-
-bool ScrollableArea::systemLanguageIsRTL()
-{
-    return false;
-}
-#endif
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/platform/ScrollableArea.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -315,8 +315,7 @@
</span><span class="cx">     virtual bool usesMockScrollAnimator() const { return false; }
</span><span class="cx">     virtual void logMockScrollAnimatorMessage(const String&amp;) const { };
</span><span class="cx"> 
</span><del>-    bool verticalScrollbarIsOnLeft() const;
-    static bool systemLanguageIsRTL();
</del><ins>+    virtual bool shouldPlaceBlockDirectionScrollbarOnLeft() const = 0;
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     WEBCORE_EXPORT ScrollableArea();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollableAreaMacmm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/mac/ScrollableAreaMac.mm (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollableAreaMac.mm        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/platform/mac/ScrollableAreaMac.mm        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All Rights Reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;ScrollableArea.h&quot;
-
-#if PLATFORM(MAC)
-#include &quot;NSScrollerImpSPI.h&quot;
-#endif
-
-namespace WebCore {
-
-// It's conceivable that in the future, we may want some scrollbars to be on the right while other scrollbars in the same document are on the left.
-// This non-static function on the ScrollableArea makes that possible.
-bool ScrollableArea::verticalScrollbarIsOnLeft() const
-{
-    return systemLanguageIsRTL();
-}
-
-bool ScrollableArea::systemLanguageIsRTL()
-{
-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101200
-    static bool result = [[NSScrollerImpPair class] respondsToSelector:@selector(scrollerLayoutDirection)] &amp;&amp; [NSScrollerImpPair scrollerLayoutDirection] == NSUserInterfaceLayoutDirectionRightToLeft;
-    return result;
-#else
-    return false;
-#endif
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollbarThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101200
</span><span class="cx">     NSScrollerImp *scrollerImp = painterForScrollbar(scrollbar);
</span><span class="cx">     ASSERT(scrollerImp);
</span><del>-    scrollerImp.userInterfaceLayoutDirection = scrollbar.scrollableArea().verticalScrollbarIsOnLeft() ? NSUserInterfaceLayoutDirectionRightToLeft : NSUserInterfaceLayoutDirectionLeftToRight;
</del><ins>+    scrollerImp.userInterfaceLayoutDirection = scrollbar.scrollableArea().shouldPlaceBlockDirectionScrollbarOnLeft() ? NSUserInterfaceLayoutDirectionRightToLeft : NSUserInterfaceLayoutDirectionLeftToRight;
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(scrollbar);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformwinPopupMenuWinh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/win/PopupMenuWin.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/win/PopupMenuWin.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/platform/win/PopupMenuWin.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -108,6 +108,7 @@
</span><span class="cx">     IntRect scrollableAreaBoundingBox(bool* = nullptr) const override;
</span><span class="cx">     bool updatesScrollLayerPositionOnMainThread() const override { return true; }
</span><span class="cx">     bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override { return false; }
</span><ins>+    bool shouldPlaceBlockDirectionScrollbarOnLeft() const final { return false; }
</ins><span class="cx"> 
</span><span class="cx">     // NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea.
</span><span class="cx">     void scrollTo(int offset);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -2280,7 +2280,7 @@
</span><span class="cx"> LayoutUnit RenderBlock::logicalLeftOffsetForContent(RenderRegion* region) const
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit logicalLeftOffset = style().isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop();
</span><del>-    if (style().shouldPlaceBlockDirectionScrollbarOnLeft())
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">         logicalLeftOffset += verticalScrollbarWidth();
</span><span class="cx">     if (!region)
</span><span class="cx">         return logicalLeftOffset;
</span><span class="lines">@@ -2291,7 +2291,7 @@
</span><span class="cx"> LayoutUnit RenderBlock::logicalRightOffsetForContent(RenderRegion* region) const
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit logicalRightOffset = style().isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop();
</span><del>-    if (style().shouldPlaceBlockDirectionScrollbarOnLeft())
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">         logicalRightOffset += verticalScrollbarWidth();
</span><span class="cx">     logicalRightOffset += availableLogicalWidth();
</span><span class="cx">     if (!region)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -828,7 +828,7 @@
</span><span class="cx"> void RenderBlockFlow::determineLogicalLeftPositionForChild(RenderBox&amp; child, ApplyLayoutDeltaMode applyDelta)
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit startPosition = borderStart() + paddingStart();
</span><del>-    if (style().shouldPlaceBlockDirectionScrollbarOnLeft())
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">         startPosition += (style().isLeftToRightDirection() ? 1 : -1) * verticalScrollbarWidth();
</span><span class="cx">     LayoutUnit totalAvailableLogicalWidth = borderAndPaddingLogicalWidth() + availableLogicalWidth();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -693,7 +693,7 @@
</span><span class="cx"> LayoutRect RenderBox::contentBoxRect() const
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit x = borderLeft() + paddingLeft();
</span><del>-    if (layer() &amp;&amp; layer()-&gt;verticalScrollbarIsOnLeft())
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">         x += verticalScrollbarWidth();
</span><span class="cx">     LayoutUnit y = borderTop() + paddingTop();
</span><span class="cx">     return LayoutRect(x, y, contentWidth(), contentHeight());
</span><span class="lines">@@ -1827,7 +1827,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Subtract out scrollbars if we have them.
</span><span class="cx">     if (layer()) {
</span><del>-        if (style().shouldPlaceBlockDirectionScrollbarOnLeft())
</del><ins>+        if (shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">             clipRect.move(layer()-&gt;verticalScrollbarWidth(relevancy), 0);
</span><span class="cx">         clipRect.contract(layer()-&gt;verticalScrollbarWidth(relevancy), layer()-&gt;horizontalScrollbarHeight(relevancy));
</span><span class="cx">     }
</span><span class="lines">@@ -3534,7 +3534,7 @@
</span><span class="cx">     computedValues.m_extent += bordersPlusPadding;
</span><span class="cx">     if (is&lt;RenderBox&gt;(containerBlock)) {
</span><span class="cx">         auto&amp; containingBox = downcast&lt;RenderBox&gt;(containerBlock);
</span><del>-        if (containingBox.layer() &amp;&amp; containingBox.layer()-&gt;verticalScrollbarIsOnLeft())
</del><ins>+        if (containingBox.shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">             computedValues.m_position += containingBox.verticalScrollbarWidth();
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -4907,7 +4907,7 @@
</span><span class="cx">     flipForWritingMode(rect);
</span><span class="cx">     // Subtract space occupied by scrollbars. They are at their physical edge in this coordinate
</span><span class="cx">     // system, so order is important here: first flip, then subtract scrollbars.
</span><del>-    if (style().shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; style().isLeftToRightDirection())
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; style().isLeftToRightDirection())
</ins><span class="cx">         rect.move(verticalScrollbarWidth(), 0);
</span><span class="cx">     rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight());
</span><span class="cx">     return rect;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -452,7 +452,7 @@
</span><span class="cx">         FloatPoint scrollOffset = FloatPoint() + enclosingClippingLayer-&gt;scrollOffset();
</span><span class="cx"> 
</span><span class="cx">         float scrollbarOffset = 0;
</span><del>-        if (enclosingClippingBox.hasLayer() &amp;&amp; enclosingClippingBox.style().shouldPlaceBlockDirectionScrollbarOnLeft())
</del><ins>+        if (enclosingClippingBox.hasLayer() &amp;&amp; enclosingClippingBox.shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">             scrollbarOffset = enclosingClippingBox.layer()-&gt;verticalScrollbarWidth(IgnoreOverlayScrollbarSize);
</span><span class="cx"> 
</span><span class="cx">         constrainingRect.setLocation(FloatPoint(scrollOffset.x() + scrollbarOffset, scrollOffset.y()));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -2689,7 +2689,7 @@
</span><span class="cx">     element-&gt;setMinimumSizeForResizing(minimumSize);
</span><span class="cx">     
</span><span class="cx">     LayoutSize adjustedOldOffset = LayoutSize(oldOffset.width() / zoomFactor, oldOffset.height() / zoomFactor);
</span><del>-    if (renderer-&gt;style().shouldPlaceBlockDirectionScrollbarOnLeft()) {
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft()) {
</ins><span class="cx">         newOffset.setWidth(-newOffset.width());
</span><span class="cx">         adjustedOldOffset.setWidth(-adjustedOldOffset.width());
</span><span class="cx">     }
</span><span class="lines">@@ -2791,34 +2791,34 @@
</span><span class="cx">     return page &amp;&amp; page-&gt;focusController().isActive();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static int cornerStart(const RenderLayer* layer, int minX, int maxX, int thickness)
</del><ins>+static int cornerStart(const RenderLayer&amp; layer, int minX, int maxX, int thickness)
</ins><span class="cx"> {
</span><del>-    if (layer-&gt;renderer().style().shouldPlaceBlockDirectionScrollbarOnLeft())
-        return minX + layer-&gt;renderer().style().borderLeftWidth();
-    return maxX - thickness - layer-&gt;renderer().style().borderRightWidth();
</del><ins>+    if (layer.shouldPlaceBlockDirectionScrollbarOnLeft())
+        return minX + layer.renderer().style().borderLeftWidth();
+    return maxX - thickness - layer.renderer().style().borderRightWidth();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static LayoutRect cornerRect(const RenderLayer* layer, const LayoutRect&amp; bounds)
</del><ins>+static LayoutRect cornerRect(const RenderLayer&amp; layer, const LayoutRect&amp; bounds)
</ins><span class="cx"> {
</span><span class="cx">     int horizontalThickness;
</span><span class="cx">     int verticalThickness;
</span><del>-    if (!layer-&gt;verticalScrollbar() &amp;&amp; !layer-&gt;horizontalScrollbar()) {
</del><ins>+    if (!layer.verticalScrollbar() &amp;&amp; !layer.horizontalScrollbar()) {
</ins><span class="cx">         // FIXME: This isn't right.  We need to know the thickness of custom scrollbars
</span><span class="cx">         // even when they don't exist in order to set the resizer square size properly.
</span><span class="cx">         horizontalThickness = ScrollbarTheme::theme().scrollbarThickness();
</span><span class="cx">         verticalThickness = horizontalThickness;
</span><del>-    } else if (layer-&gt;verticalScrollbar() &amp;&amp; !layer-&gt;horizontalScrollbar()) {
-        horizontalThickness = layer-&gt;verticalScrollbar()-&gt;width();
</del><ins>+    } else if (layer.verticalScrollbar() &amp;&amp; !layer.horizontalScrollbar()) {
+        horizontalThickness = layer.verticalScrollbar()-&gt;width();
</ins><span class="cx">         verticalThickness = horizontalThickness;
</span><del>-    } else if (layer-&gt;horizontalScrollbar() &amp;&amp; !layer-&gt;verticalScrollbar()) {
-        verticalThickness = layer-&gt;horizontalScrollbar()-&gt;height();
</del><ins>+    } else if (layer.horizontalScrollbar() &amp;&amp; !layer.verticalScrollbar()) {
+        verticalThickness = layer.horizontalScrollbar()-&gt;height();
</ins><span class="cx">         horizontalThickness = verticalThickness;
</span><span class="cx">     } else {
</span><del>-        horizontalThickness = layer-&gt;verticalScrollbar()-&gt;width();
-        verticalThickness = layer-&gt;horizontalScrollbar()-&gt;height();
</del><ins>+        horizontalThickness = layer.verticalScrollbar()-&gt;width();
+        verticalThickness = layer.horizontalScrollbar()-&gt;height();
</ins><span class="cx">     }
</span><span class="cx">     return LayoutRect(cornerStart(layer, bounds.x(), bounds.maxX(), horizontalThickness),
</span><del>-        bounds.maxY() - verticalThickness - layer-&gt;renderer().style().borderBottomWidth(),
</del><ins>+        bounds.maxY() - verticalThickness - layer.renderer().style().borderBottomWidth(),
</ins><span class="cx">         horizontalThickness, verticalThickness);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2833,14 +2833,14 @@
</span><span class="cx">     bool hasVerticalBar = m_vBar &amp;&amp; !m_vBar-&gt;isOverlayScrollbar();
</span><span class="cx">     bool hasResizer = renderer().style().resize() != RESIZE_NONE;
</span><span class="cx">     if ((hasHorizontalBar &amp;&amp; hasVerticalBar) || (hasResizer &amp;&amp; (hasHorizontalBar || hasVerticalBar)))
</span><del>-        return snappedIntRect(cornerRect(this, renderBox()-&gt;borderBoxRect()));
</del><ins>+        return snappedIntRect(cornerRect(*this, renderBox()-&gt;borderBoxRect()));
</ins><span class="cx">     return IntRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static LayoutRect resizerCornerRect(const RenderLayer* layer, const LayoutRect&amp; bounds)
</del><ins>+static LayoutRect resizerCornerRect(const RenderLayer&amp; layer, const LayoutRect&amp; bounds)
</ins><span class="cx"> {
</span><del>-    ASSERT(layer-&gt;renderer().isBox());
-    if (layer-&gt;renderer().style().resize() == RESIZE_NONE)
</del><ins>+    ASSERT(layer.renderer().isBox());
+    if (layer.renderer().style().resize() == RESIZE_NONE)
</ins><span class="cx">         return LayoutRect();
</span><span class="cx">     return cornerRect(layer, bounds);
</span><span class="cx"> }
</span><span class="lines">@@ -2852,7 +2852,7 @@
</span><span class="cx">         return LayoutRect();
</span><span class="cx">     LayoutRect scrollCornerAndResizer = scrollCornerRect();
</span><span class="cx">     if (scrollCornerAndResizer.isEmpty())
</span><del>-        scrollCornerAndResizer = resizerCornerRect(this, box-&gt;borderBoxRect());
</del><ins>+        scrollCornerAndResizer = resizerCornerRect(*this, box-&gt;borderBoxRect());
</ins><span class="cx">     return scrollCornerAndResizer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2996,7 +2996,7 @@
</span><span class="cx"> LayoutUnit RenderLayer::verticalScrollbarStart(int minX, int maxX) const
</span><span class="cx"> {
</span><span class="cx">     const RenderBox* box = renderBox();
</span><del>-    if (renderer().style().shouldPlaceBlockDirectionScrollbarOnLeft())
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">         return minX + box-&gt;borderLeft();
</span><span class="cx">     return maxX - box-&gt;borderRight() - m_vBar-&gt;width();
</span><span class="cx"> }
</span><span class="lines">@@ -3005,8 +3005,8 @@
</span><span class="cx"> {
</span><span class="cx">     const RenderBox* box = renderBox();
</span><span class="cx">     int x = minX + box-&gt;borderLeft();
</span><del>-    if (renderer().style().shouldPlaceBlockDirectionScrollbarOnLeft())
-        x += m_vBar ? m_vBar-&gt;width() : roundToInt(resizerCornerRect(this, box-&gt;borderBoxRect()).width());
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft())
+        x += m_vBar ? m_vBar-&gt;width() : roundToInt(resizerCornerRect(*this, box-&gt;borderBoxRect()).width());
</ins><span class="cx">     return x;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3270,7 +3270,7 @@
</span><span class="cx">     // Currently the resize corner is either the bottom right corner or the bottom left corner.
</span><span class="cx">     // FIXME: This assumes the location is 0, 0. Is this guaranteed to always be the case?
</span><span class="cx">     IntSize elementSize = size();
</span><del>-    if (renderer().style().shouldPlaceBlockDirectionScrollbarOnLeft())
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">         elementSize.setWidth(0);
</span><span class="cx">     IntPoint resizerPoint = IntPoint(elementSize);
</span><span class="cx">     IntPoint localPoint = roundedIntPoint(absoluteToContents(absolutePoint));
</span><span class="lines">@@ -3309,7 +3309,7 @@
</span><span class="cx">     if (m_scrollCorner)
</span><span class="cx">         m_scrollCorner-&gt;setFrameRect(scrollCorner);
</span><span class="cx">     if (m_resizer)
</span><del>-        m_resizer-&gt;setFrameRect(resizerCornerRect(this, borderBox));
</del><ins>+        m_resizer-&gt;setFrameRect(resizerCornerRect(*this, borderBox));
</ins><span class="cx"> 
</span><span class="cx">     if (isComposited())
</span><span class="cx">         backing()-&gt;positionOverflowControlsLayers();
</span><span class="lines">@@ -3376,7 +3376,7 @@
</span><span class="cx">     m_scrollSize.setHeight(overflowBottom() - overflowTop());
</span><span class="cx"> 
</span><span class="cx">     int scrollableLeftOverflow = overflowLeft() - box-&gt;borderLeft();
</span><del>-    if (box-&gt;style().isLeftToRightDirection() &amp;&amp; box-&gt;style().shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; m_vBar)
</del><ins>+    if (box-&gt;style().isLeftToRightDirection() &amp;&amp; box-&gt;shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; m_vBar)
</ins><span class="cx">         scrollableLeftOverflow -= m_vBar-&gt;occupiedWidth();
</span><span class="cx">     int scrollableTopOverflow = overflowTop() - box-&gt;borderTop();
</span><span class="cx">     setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
</span><span class="lines">@@ -3551,7 +3551,7 @@
</span><span class="cx">     if (scrollCornerRect().intersects(localRect))
</span><span class="cx">         return true;
</span><span class="cx">     
</span><del>-    if (resizerCornerRect(this, borderBox).intersects(localRect))
</del><ins>+    if (resizerCornerRect(*this, borderBox).intersects(localRect))
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     return false;
</span><span class="lines">@@ -3670,7 +3670,7 @@
</span><span class="cx">         cornerResizerSize = resizeCornerImage-&gt;size();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (renderer().style().shouldPlaceBlockDirectionScrollbarOnLeft()) {
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft()) {
</ins><span class="cx">         context.save();
</span><span class="cx">         context.translate(resizerCornerRect.x() + cornerResizerSize.width(), resizerCornerRect.y() + resizerCornerRect.height() - cornerResizerSize.height());
</span><span class="cx">         context.scale(FloatSize(-1.0, 1.0));
</span><span class="lines">@@ -3694,7 +3694,7 @@
</span><span class="cx">     RenderBox* box = renderBox();
</span><span class="cx">     ASSERT(box);
</span><span class="cx"> 
</span><del>-    LayoutRect absRect = resizerCornerRect(this, box-&gt;borderBoxRect());
</del><ins>+    LayoutRect absRect = resizerCornerRect(*this, box-&gt;borderBoxRect());
</ins><span class="cx">     absRect.moveBy(paintOffset);
</span><span class="cx">     if (!absRect.intersects(damageRect))
</span><span class="cx">         return;
</span><span class="lines">@@ -3736,7 +3736,7 @@
</span><span class="cx">     IntPoint localPoint = roundedIntPoint(absoluteToContents(absolutePoint));
</span><span class="cx"> 
</span><span class="cx">     IntRect localBounds(IntPoint(), snappedIntRect(box-&gt;frameRect()).size());
</span><del>-    return resizerCornerRect(this, localBounds).contains(localPoint);
</del><ins>+    return resizerCornerRect(*this, localBounds).contains(localPoint);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderLayer::hitTestOverflowControls(HitTestResult&amp; result, const IntPoint&amp; localPoint)
</span><span class="lines">@@ -3749,7 +3749,7 @@
</span><span class="cx">     
</span><span class="cx">     IntRect resizeControlRect;
</span><span class="cx">     if (renderer().style().resize() != RESIZE_NONE) {
</span><del>-        resizeControlRect = snappedIntRect(resizerCornerRect(this, box-&gt;borderBoxRect()));
</del><ins>+        resizeControlRect = snappedIntRect(resizerCornerRect(*this, box-&gt;borderBoxRect()));
</ins><span class="cx">         if (resizeControlRect.contains(localPoint))
</span><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="lines">@@ -5228,7 +5228,7 @@
</span><span class="cx"> 
</span><span class="cx">     for (int i = layerFragments.size() - 1; i &gt;= 0; --i) {
</span><span class="cx">         const LayerFragment&amp; fragment = layerFragments.at(i);
</span><del>-        if (fragment.backgroundRect.intersects(hitTestLocation) &amp;&amp; resizerCornerRect(this, snappedIntRect(fragment.layerBounds)).contains(hitTestLocation.roundedPoint()))
</del><ins>+        if (fragment.backgroundRect.intersects(hitTestLocation) &amp;&amp; resizerCornerRect(*this, snappedIntRect(fragment.layerBounds)).contains(hitTestLocation.roundedPoint()))
</ins><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderLayer.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -671,6 +671,8 @@
</span><span class="cx"> 
</span><span class="cx">     RenderLayer* enclosingFlowThreadAncestor() const;
</span><span class="cx"> 
</span><ins>+    bool shouldPlaceBlockDirectionScrollbarOnLeft() const final { return renderer().shouldPlaceBlockDirectionScrollbarOnLeft(); }
+
</ins><span class="cx"> private:
</span><span class="cx">     enum CollectLayersBehavior { StopAtStackingContexts, StopAtStackingContainers };
</span><span class="cx"> 
</span><span class="lines">@@ -997,7 +999,6 @@
</span><span class="cx"> 
</span><span class="cx">     RenderNamedFlowFragment* currentRenderNamedFlowFragment() const;
</span><span class="cx"> 
</span><del>-private:
</del><span class="cx">     // The bitfields are up here so they will fall into the padding from ScrollableArea on 64-bit.
</span><span class="cx"> 
</span><span class="cx">     const bool m_isRootLayer : 1;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1763,7 +1763,7 @@
</span><span class="cx">     FrameView&amp; frameView = m_renderView.frameView();
</span><span class="cx"> 
</span><span class="cx">     return FloatPoint(
</span><del>-        frameView.verticalScrollbarIsOnLeft() ? frameView.horizontalScrollbarIntrusion() : 0,
</del><ins>+        frameView.shouldPlaceBlockDirectionScrollbarOnLeft() ? frameView.horizontalScrollbarIntrusion() : 0,
</ins><span class="cx">         FrameView::yPositionForInsetClipLayer(frameView.scrollPosition(), frameView.topContentInset()));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderLayerCompositor.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><ins>+#include &quot;Settings.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -212,5 +213,22 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft() const
+{
+// RTL Scrollbars require some system support, and this system support does not exist on certain versions of OS X. iOS uses a separate mechanism.
+#if PLATFORM(IOS) || (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &lt; 101200)
+    return false;
+#else
+    switch (frame().settings().userInterfaceDirectionPolicy()) {
+    case UserInterfaceDirectionPolicy::Content:
+        return style().shouldPlaceBlockDirectionScrollbarOnLeft();
+    case UserInterfaceDirectionPolicy::System:
+        return frame().settings().systemLayoutDirection() == RTL;
+    }
+    ASSERT_NOT_REACHED();
+    return style().shouldPlaceBlockDirectionScrollbarOnLeft();
+#endif
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerModelObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerModelObject.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerModelObject.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderLayerModelObject.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -51,6 +51,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool isScrollableOrRubberbandableBox() const { return false; }
</span><span class="cx"> 
</span><ins>+    bool shouldPlaceBlockDirectionScrollbarOnLeft() const;
+
</ins><span class="cx"> protected:
</span><span class="cx">     RenderLayerModelObject(Element&amp;, RenderStyle&amp;&amp;, BaseTypeFlags);
</span><span class="cx">     RenderLayerModelObject(Document&amp;, RenderStyle&amp;&amp;, BaseTypeFlags);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -266,7 +266,7 @@
</span><span class="cx"> LayoutRect RenderListBox::itemBoundingBoxRect(const LayoutPoint&amp; additionalOffset, int index)
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit x = additionalOffset.x() + borderLeft() + paddingLeft();
</span><del>-    if (verticalScrollbarIsOnLeft() &amp;&amp; m_vBar)
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; m_vBar)
</ins><span class="cx">         x += m_vBar-&gt;occupiedWidth();
</span><span class="cx">     LayoutUnit y = additionalOffset.y() + borderTop() + paddingTop() + itemHeight() * (index - m_indexOffset);
</span><span class="cx">     return LayoutRect(x, y, contentWidth(), itemHeight());
</span><span class="lines">@@ -345,7 +345,7 @@
</span><span class="cx">     if (!m_vBar)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    LayoutUnit left = paintOffset.x() + (verticalScrollbarIsOnLeft() ? borderLeft() : width() - borderRight() - m_vBar-&gt;width());
</del><ins>+    LayoutUnit left = paintOffset.x() + (shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - m_vBar-&gt;width());
</ins><span class="cx">     LayoutUnit top = paintOffset.y() + borderTop();
</span><span class="cx">     LayoutUnit width = m_vBar-&gt;width();
</span><span class="cx">     LayoutUnit height = this-&gt;height() - (borderTop() + borderBottom());
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx">     if (!m_vBar || !m_vBar-&gt;shouldParticipateInHitTesting())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    LayoutUnit x = accumulatedOffset.x() + (verticalScrollbarIsOnLeft() ? borderLeft() : width() - borderRight() - m_vBar-&gt;width());
</del><ins>+    LayoutUnit x = accumulatedOffset.x() + (shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - m_vBar-&gt;width());
</ins><span class="cx">     LayoutUnit y = accumulatedOffset.y() + borderTop();
</span><span class="cx">     LayoutUnit width = m_vBar-&gt;width();
</span><span class="cx">     LayoutUnit height = this-&gt;height() - borderTop() - borderBottom();
</span><span class="lines">@@ -470,9 +470,9 @@
</span><span class="cx">         return -1;
</span><span class="cx"> 
</span><span class="cx">     int scrollbarWidth = m_vBar ? m_vBar-&gt;width() : 0;
</span><del>-    if (verticalScrollbarIsOnLeft() &amp;&amp; (offset.width() &lt; borderLeft() + paddingLeft() + scrollbarWidth || offset.width() &gt; width() - borderRight() - paddingRight()))
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; (offset.width() &lt; borderLeft() + paddingLeft() + scrollbarWidth || offset.width() &gt; width() - borderRight() - paddingRight()))
</ins><span class="cx">         return -1;
</span><del>-    if (!verticalScrollbarIsOnLeft() &amp;&amp; (offset.width() &lt; borderLeft() + paddingLeft() || offset.width() &gt; width() - borderRight() - paddingRight() - scrollbarWidth))
</del><ins>+    if (!shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; (offset.width() &lt; borderLeft() + paddingLeft() || offset.width() &gt; width() - borderRight() - paddingRight() - scrollbarWidth))
</ins><span class="cx">         return -1;
</span><span class="cx"> 
</span><span class="cx">     int newOffset = (offset.height() - borderTop() - paddingTop()) / itemHeight() + m_indexOffset;
</span><span class="lines">@@ -729,7 +729,7 @@
</span><span class="cx">     // Clip against the padding box, to give &lt;option&gt;s and overlay scrollbar some extra space
</span><span class="cx">     // to get painted.
</span><span class="cx">     LayoutRect clipRect = paddingBoxRect();
</span><del>-    if (verticalScrollbarIsOnLeft() &amp;&amp; (!layer() || !layer()-&gt;verticalScrollbarIsOnLeft()))
</del><ins>+    if (shouldPlaceBlockDirectionScrollbarOnLeft())
</ins><span class="cx">         clipRect.move(m_vBar-&gt;occupiedWidth(), 0);
</span><span class="cx">     clipRect.moveBy(additionalOffset);
</span><span class="cx">     return clipRect;
</span><span class="lines">@@ -744,14 +744,14 @@
</span><span class="cx"> void RenderListBox::invalidateScrollbarRect(Scrollbar&amp; scrollbar, const IntRect&amp; rect)
</span><span class="cx"> {
</span><span class="cx">     IntRect scrollRect = rect;
</span><del>-    scrollRect.move(verticalScrollbarIsOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width(), borderTop());
</del><ins>+    scrollRect.move(shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width(), borderTop());
</ins><span class="cx">     repaintRectangle(scrollRect);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IntRect RenderListBox::convertFromScrollbarToContainingView(const Scrollbar&amp; scrollbar, const IntRect&amp; scrollbarRect) const
</span><span class="cx"> {
</span><span class="cx">     IntRect rect = scrollbarRect;
</span><del>-    int scrollbarLeft = verticalScrollbarIsOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
</del><ins>+    int scrollbarLeft = shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
</ins><span class="cx">     int scrollbarTop = borderTop();
</span><span class="cx">     rect.move(scrollbarLeft, scrollbarTop);
</span><span class="cx">     return view().frameView().convertFromRendererToContainingView(this, rect);
</span><span class="lines">@@ -760,7 +760,7 @@
</span><span class="cx"> IntRect RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar&amp; scrollbar, const IntRect&amp; parentRect) const
</span><span class="cx"> {
</span><span class="cx">     IntRect rect = view().frameView().convertFromContainingViewToRenderer(this, parentRect);
</span><del>-    int scrollbarLeft = verticalScrollbarIsOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
</del><ins>+    int scrollbarLeft = shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
</ins><span class="cx">     int scrollbarTop = borderTop();
</span><span class="cx">     rect.move(-scrollbarLeft, -scrollbarTop);
</span><span class="cx">     return rect;
</span><span class="lines">@@ -769,7 +769,7 @@
</span><span class="cx"> IntPoint RenderListBox::convertFromScrollbarToContainingView(const Scrollbar&amp; scrollbar, const IntPoint&amp; scrollbarPoint) const
</span><span class="cx"> {
</span><span class="cx">     IntPoint point = scrollbarPoint;
</span><del>-    int scrollbarLeft = verticalScrollbarIsOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
</del><ins>+    int scrollbarLeft = shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
</ins><span class="cx">     int scrollbarTop = borderTop();
</span><span class="cx">     point.move(scrollbarLeft, scrollbarTop);
</span><span class="cx">     return view().frameView().convertFromRendererToContainingView(this, point);
</span><span class="lines">@@ -778,7 +778,7 @@
</span><span class="cx"> IntPoint RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar&amp; scrollbar, const IntPoint&amp; parentPoint) const
</span><span class="cx"> {
</span><span class="cx">     IntPoint point = view().frameView().convertFromContainingViewToRenderer(this, parentPoint);
</span><del>-    int scrollbarLeft = verticalScrollbarIsOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
</del><ins>+    int scrollbarLeft = shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
</ins><span class="cx">     int scrollbarTop = borderTop();
</span><span class="cx">     point.move(-scrollbarLeft, -scrollbarTop);
</span><span class="cx">     return point;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderListBox.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -156,6 +156,8 @@
</span><span class="cx">     void paintItemBackground(PaintInfo&amp;, const LayoutPoint&amp;, int listIndex);
</span><span class="cx">     void scrollToRevealSelection();
</span><span class="cx"> 
</span><ins>+    bool shouldPlaceBlockDirectionScrollbarOnLeft() const final { return RenderBlockFlow::shouldPlaceBlockDirectionScrollbarOnLeft(); }
+
</ins><span class="cx">     bool m_optionsChanged;
</span><span class="cx">     bool m_scrollToRevealSelectionAfterLayout;
</span><span class="cx">     bool m_inAutoscroll;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -642,7 +642,7 @@
</span><span class="cx">         // and the Renderer that contains the iframe. This transformation must account for a
</span><span class="cx">         // left scrollbar (if one exists).
</span><span class="cx">         FrameView&amp; frameView = this-&gt;frameView();
</span><del>-        if (frameView.verticalScrollbarIsOnLeft() &amp;&amp; frameView.verticalScrollbar())
</del><ins>+        if (frameView.shouldPlaceBlockDirectionScrollbarOnLeft() &amp;&amp; frameView.verticalScrollbar())
</ins><span class="cx">             adjustedRect.move(LayoutSize(frameView.verticalScrollbar()-&gt;occupiedWidth(), 0));
</span><span class="cx"> 
</span><span class="cx">         ownerBox-&gt;repaintRectangle(adjustedRect);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -2077,13 +2077,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool RenderStyle::shouldPlaceBlockDirectionScrollbarOnLeft() const
</span><span class="cx"> {
</span><del>-#if PLATFORM(MAC)
-    return ScrollableArea::systemLanguageIsRTL();
-#elif USE(RTL_SCROLLBAR)
</del><span class="cx">     return !isLeftToRightDirection() &amp;&amp; isHorizontalWritingMode();
</span><del>-#else
-    return false;
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalSettingscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/InternalSettings.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -106,6 +106,8 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
</span><span class="cx">     , m_indexedDBWorkersEnabled(RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
</span><span class="cx"> #endif
</span><ins>+    , m_userInterfaceDirectionPolicy(settings.userInterfaceDirectionPolicy())
+    , m_systemLayoutDirection(settings.systemLayoutDirection())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -176,6 +178,8 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
</span><span class="cx">     RuntimeEnabledFeatures::sharedFeatures().setIndexedDBWorkersEnabled(m_indexedDBWorkersEnabled);
</span><span class="cx"> #endif
</span><ins>+    settings.setUserInterfaceDirectionPolicy(m_userInterfaceDirectionPolicy);
+    settings.setSystemLayoutDirection(m_systemLayoutDirection);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class InternalSettingsWrapper : public Supplement&lt;Page&gt; {
</span><span class="lines">@@ -555,7 +559,60 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String InternalSettings::userInterfaceDirectionPolicy(ExceptionCode&amp; ec)
+{
+    InternalSettingsGuardForSettingsReturn(&quot;&quot;);
+    switch (settings()-&gt;userInterfaceDirectionPolicy()) {
+    case UserInterfaceDirectionPolicy::Content:
+        return ASCIILiteral(&quot;Content&quot;);
+    case UserInterfaceDirectionPolicy::System:
+        return ASCIILiteral(&quot;View&quot;);
+    }
+    ASSERT_NOT_REACHED();
+    return String();
+}
</ins><span class="cx"> 
</span><ins>+void InternalSettings::setUserInterfaceDirectionPolicy(const String&amp; policy, ExceptionCode&amp; ec)
+{
+    InternalSettingsGuardForSettings();
+    if (equalLettersIgnoringASCIICase(policy, &quot;content&quot;)) {
+        settings()-&gt;setUserInterfaceDirectionPolicy(UserInterfaceDirectionPolicy::Content);
+        return;
+    }
+    if (equalLettersIgnoringASCIICase(policy, &quot;view&quot;)) {
+        settings()-&gt;setUserInterfaceDirectionPolicy(UserInterfaceDirectionPolicy::System);
+        return;
+    }
+    ec = INVALID_ACCESS_ERR;
+}
+
+String InternalSettings::systemLayoutDirection(ExceptionCode&amp; ec)
+{
+    InternalSettingsGuardForSettingsReturn(&quot;&quot;);
+    switch (settings()-&gt;systemLayoutDirection()) {
+    case LTR:
+        return ASCIILiteral(&quot;LTR&quot;);
+    case RTL:
+        return ASCIILiteral(&quot;RTL&quot;);
+    }
+    ASSERT_NOT_REACHED();
+    return String();
+}
+
+void InternalSettings::setSystemLayoutDirection(const String&amp; direction, ExceptionCode&amp; ec)
+{
+    InternalSettingsGuardForSettings();
+    if (equalLettersIgnoringASCIICase(direction, &quot;ltr&quot;)) {
+        settings()-&gt;setSystemLayoutDirection(LTR);
+        return;
+    }
+    if (equalLettersIgnoringASCIICase(direction, &quot;rtl&quot;)) {
+        settings()-&gt;setSystemLayoutDirection(RTL);
+        return;
+    }
+    ec = INVALID_ACCESS_ERR;
+}
+
</ins><span class="cx"> // If you add to this list, make sure that you update the Backup class for test reproducability!
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalSettingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/InternalSettings.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/InternalSettings.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/testing/InternalSettings.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -34,6 +34,8 @@
</span><span class="cx"> #include &quot;IntSize.h&quot;
</span><span class="cx"> #include &quot;InternalSettingsGenerated.h&quot;
</span><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><ins>+#include &quot;Settings.h&quot;
+#include &quot;WritingMode.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -102,6 +104,8 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
</span><span class="cx">         bool m_indexedDBWorkersEnabled;
</span><span class="cx"> #endif
</span><ins>+        UserInterfaceDirectionPolicy m_userInterfaceDirectionPolicy;
+        TextDirection m_systemLayoutDirection;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     static Ref&lt;InternalSettings&gt; create(Page* page)
</span><span class="lines">@@ -150,6 +154,10 @@
</span><span class="cx">     void setAllowsInlineMediaPlayback(bool, ExceptionCode&amp;);
</span><span class="cx">     void setInlineMediaPlaybackRequiresPlaysInlineAttribute(bool, ExceptionCode&amp;);
</span><span class="cx">     void setIndexedDBWorkersEnabled(bool, ExceptionCode&amp;);
</span><ins>+    String userInterfaceDirectionPolicy(ExceptionCode&amp;);
+    void setUserInterfaceDirectionPolicy(const String&amp; policy, ExceptionCode&amp;);
+    String systemLayoutDirection(ExceptionCode&amp;);
+    void setSystemLayoutDirection(const String&amp; direction, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     explicit InternalSettings(Page*);
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalSettingsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/InternalSettings.idl (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/InternalSettings.idl        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebCore/testing/InternalSettings.idl        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -79,5 +79,10 @@
</span><span class="cx">     [RaisesException] void setInlineMediaPlaybackRequiresPlaysInlineAttribute(boolean requires);
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] void setIndexedDBWorkersEnabled(boolean requires);
</span><ins>+
+    [RaisesException] DOMString userInterfaceDirectionPolicy();
+    [RaisesException] void setUserInterfaceDirectionPolicy(DOMString policy);
+    [RaisesException] DOMString systemLayoutDirection();
+    [RaisesException] void setSystemLayoutDirection(DOMString direction);
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebKit2/ChangeLog        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2016-04-26  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [WK2] [OS X] Create API for switching RTL scrollbar policy
+        https://bugs.webkit.org/show_bug.cgi?id=156948
+        &lt;rdar://problem/25707757&gt;
+
+        Reviewed by Darin Adler.
+
+        Add the new API.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _initializeWithConfiguration:]):
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (-[WKWebViewConfiguration init]):
+        (-[WKWebViewConfiguration encodeWithCoder:]):
+        (-[WKWebViewConfiguration initWithCoder:]):
+        (-[WKWebViewConfiguration copyWithZone:]):
+        * UIProcess/WebPageProxy.cpp:
+        * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
</ins><span class="cx"> 2016-04-26  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Check to make sure shouldRequestCandidates() before requesting candidates
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -257,6 +257,8 @@
</span><span class="cx">     macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, WebCore::SecurityOrigin::BlockThirdPartyStorage, &quot;&quot;, &quot;&quot;) \
</span><span class="cx">     macro(JavaScriptRuntimeFlags, javaScriptRuntimeFlags, UInt32, uint32_t, 0, &quot;&quot;, &quot;&quot;) \
</span><span class="cx">     macro(DataDetectorTypes, dataDetectorTypes, UInt32, uint32_t, 0, &quot;&quot;, &quot;&quot;) \
</span><ins>+    macro(UserInterfaceDirection, userInterfaceDirection, UInt32, uint32_t, 0, &quot;&quot;, &quot;&quot;) \
+    macro(SystemLayoutDirection, systemLayoutDirection, UInt32, uint32_t, 0, &quot;&quot;, &quot;&quot;) \
</ins><span class="cx">     \
</span><span class="cx"> 
</span><span class="cx"> #define FOR_EACH_WEBKIT_DEBUG_BOOL_PREFERENCE(macro) \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -87,6 +87,8 @@
</span><span class="cx"> #import &lt;WebCore/NSTextFinderSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/PlatformScreen.h&gt;
</span><span class="cx"> #import &lt;WebCore/RuntimeApplicationChecks.h&gt;
</span><ins>+#import &lt;WebCore/Settings.h&gt;
+#import &lt;WebCore/WritingMode.h&gt;
</ins><span class="cx"> #import &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #import &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> #import &lt;wtf/NeverDestroyed.h&gt;
</span><span class="lines">@@ -359,6 +361,30 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+static uint32_t convertUserInterfaceDirectionPolicy(WKUserInterfaceDirectionPolicy policy)
+{
+    switch (policy) {
+    case WKUserInterfaceDirectionPolicyContent:
+        return static_cast&lt;uint32_t&gt;(WebCore::UserInterfaceDirectionPolicy::Content);
+    case WKUserInterfaceDirectionPolicySystem:
+        return static_cast&lt;uint32_t&gt;(WebCore::UserInterfaceDirectionPolicy::System);
+    }
+    return static_cast&lt;uint32_t&gt;(WebCore::UserInterfaceDirectionPolicy::Content);
+}
+
+#if PLATFORM(MAC)
+static uint32_t convertSystemLayoutDirection(NSUserInterfaceLayoutDirection direction)
+{
+    switch (direction) {
+    case NSUserInterfaceLayoutDirectionLeftToRight:
+        return static_cast&lt;uint32_t&gt;(WebCore::LTR);
+    case NSUserInterfaceLayoutDirectionRightToLeft:
+        return static_cast&lt;uint32_t&gt;(WebCore::RTL);
+    }
+    return static_cast&lt;uint32_t&gt;(WebCore::LTR);
+}
+#endif
+
</ins><span class="cx"> - (void)_initializeWithConfiguration:(WKWebViewConfiguration *)configuration
</span><span class="cx"> {
</span><span class="cx">     if (!configuration)
</span><span class="lines">@@ -408,11 +434,17 @@
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::shouldConvertPositionStyleOnCopyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _convertsPositionStyleOnCopy]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::httpEquivEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsMetaRefresh]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::allowUniversalAccessFromFileURLsKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowUniversalAccessFromFileURLs]));
</span><ins>+
+    pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::userInterfaceDirectionKey(), WebKit::WebPreferencesStore::Value(convertUserInterfaceDirectionPolicy([_configuration userInterfaceDirectionPolicy])));
</ins><span class="cx">     
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::showsURLsInToolTipsEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _showsURLsInToolTips]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::serviceControlsEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _serviceControlsEnabled]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::imageControlsEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _imageControlsEnabled]));
</span><ins>+    // We are in the View's initialization routine, so our client hasn't had time to set our user interface direction.
+    // Therefore, according to the docs[1], &quot;this property contains the value reported by the app’s userInterfaceLayoutDirection property.&quot;
+    // [1] http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/index.html#//apple_ref/doc/uid/20000014-SW222
+    pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::systemLayoutDirectionKey(), WebKit::WebPreferencesStore::Value(convertSystemLayoutDirection(self.userInterfaceLayoutDirection)));
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -422,6 +454,7 @@
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::inlineMediaPlaybackRequiresPlaysInlineAttributeKey(), WebKit::WebPreferencesStore::Value(!![_configuration _inlineMediaPlaybackRequiresPlaysInlineAttribute]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::allowsPictureInPictureMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration allowsPictureInPictureMediaPlayback] &amp;&amp; shouldAllowPictureInPictureMediaPlayback()));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::requiresUserGestureForMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration requiresUserActionForMediaPlayback]));
</span><ins>+    pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::systemLayoutDirectionKey(), WebKit::WebPreferencesStore::Value(static_cast&lt;uint32_t&gt;(WebCore::LTR)));
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::requiresUserGestureForVideoPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration _requiresUserActionForVideoPlayback]));
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -73,6 +73,20 @@
</span><span class="cx">     WKDataDetectorTypeAll = NSUIntegerMax
</span><span class="cx"> } WK_ENUM_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> 
</span><ins>+
+/*! @enum WKUserInterfaceDirectionPolicy
+ @abstract The mechanism by which vertical scrollbars obey an RTL environment
+ @constant WKUserInterfaceDirectionPolicyContent Scrollbar placement obeys CSS / HTML / XHTML specifications.
+ @constant WKUserInterfaceDirectionPolicySystem Scrollbar placement obeys system platform specifications.
+ @discussion When WKUserInterfaceDirectionPolicyContent is specified, the placement of vertical scrollbars is
+ affected by the &quot;dir&quot; element or the &quot;direction&quot; CSS property. When WKUserInterfaceDirectionPolicySystem is
+ specified, the placement of vertical scrollbars is affected by the direction of the view.
+*/
+typedef NS_ENUM(NSInteger, WKUserInterfaceDirectionPolicy) {
+    WKUserInterfaceDirectionPolicyContent = 0,
+    WKUserInterfaceDirectionPolicySystem = 1,
+} WK_ENUM_AVAILABLE(WK_MAC_TBA, NA);
+
</ins><span class="cx"> /*! A WKWebViewConfiguration object is a collection of properties with
</span><span class="cx">  which to initialize a web view.
</span><span class="cx">  @helps Contains properties used to configure a @link WKWebView @/link.
</span><span class="lines">@@ -124,6 +138,12 @@
</span><span class="cx">  */
</span><span class="cx"> @property (nonatomic) WKDataDetectorTypes dataDetectorTypes WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> 
</span><ins>+/*! @abstract The placement behavior of vertical scrollbars.
+ @discussion Possible values are described in WKUserInterfaceDirectionPolicy.
+ The default value is WKUserInterfaceDirectionPolicyContent.
+ */
+@property (nonatomic) WKUserInterfaceDirectionPolicy userInterfaceDirectionPolicy WK_AVAILABLE(WK_MAC_TBA, NA);
+
</ins><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> /*! @abstract A Boolean value indicating whether HTML5 videos play inline
</span><span class="cx">  (YES) or use the native full-screen controller (NO).
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -140,6 +140,7 @@
</span><span class="cx">     _mediaDataLoadsAutomatically = NO;
</span><span class="cx"> #else
</span><span class="cx">     _mediaDataLoadsAutomatically = YES;
</span><ins>+    _userInterfaceDirectionPolicy = WKUserInterfaceDirectionPolicyContent;
</ins><span class="cx"> #endif
</span><span class="cx">     _requiresUserActionForVideoPlayback = NO;
</span><span class="cx">     _requiresUserActionForAudioPlayback = NO;
</span><span class="lines">@@ -198,6 +199,7 @@
</span><span class="cx">     [coder encodeObject:self.applicationNameForUserAgent forKey:@&quot;applicationNameForUserAgent&quot;];
</span><span class="cx">     [coder encodeBool:self.allowsAirPlayForMediaPlayback forKey:@&quot;allowsAirPlayForMediaPlayback&quot;];
</span><span class="cx">     [coder encodeInteger:self.dataDetectorTypes forKey:@&quot;dataDetectorTypes&quot;];
</span><ins>+    [coder encodeInteger:self.userInterfaceDirectionPolicy forKey:@&quot;userInterfaceDirectionPolicy&quot;];
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     [coder encodeBool:self.allowsInlineMediaPlayback forKey:@&quot;allowsInlineMediaPlayback&quot;];
</span><span class="lines">@@ -221,6 +223,9 @@
</span><span class="cx">     self.applicationNameForUserAgent = [coder decodeObjectForKey:@&quot;applicationNameForUserAgent&quot;];
</span><span class="cx">     self.allowsAirPlayForMediaPlayback = [coder decodeBoolForKey:@&quot;allowsAirPlayForMediaPlayback&quot;];
</span><span class="cx">     self.dataDetectorTypes = [coder decodeIntegerForKey:@&quot;dataDetectorTypes&quot;];
</span><ins>+    auto userInterfaceDirectionPolicyCandidate = static_cast&lt;WKUserInterfaceDirectionPolicy&gt;([coder decodeIntegerForKey:@&quot;userInterfaceDirectionPolicy&quot;]);
+    if (userInterfaceDirectionPolicyCandidate == WKUserInterfaceDirectionPolicyContent || userInterfaceDirectionPolicyCandidate == WKUserInterfaceDirectionPolicySystem)
+        self.userInterfaceDirectionPolicy = userInterfaceDirectionPolicyCandidate;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     self.allowsInlineMediaPlayback = [coder decodeBoolForKey:@&quot;allowsInlineMediaPlayback&quot;];
</span><span class="lines">@@ -266,6 +271,8 @@
</span><span class="cx">     configuration-&gt;_requiresUserActionForAudioPlayback = self-&gt;_requiresUserActionForAudioPlayback;
</span><span class="cx">     configuration-&gt;_mainContentUserGestureOverrideEnabled = self-&gt;_mainContentUserGestureOverrideEnabled;
</span><span class="cx"> 
</span><ins>+    configuration-&gt;_userInterfaceDirectionPolicy = self-&gt;_userInterfaceDirectionPolicy;
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     configuration-&gt;_allowsInlineMediaPlayback = self-&gt;_allowsInlineMediaPlayback;
</span><span class="cx">     configuration-&gt;_inlineMediaPlaybackRequiresPlaysInlineAttribute = self-&gt;_inlineMediaPlaybackRequiresPlaysInlineAttribute;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -100,6 +100,7 @@
</span><span class="cx"> #include &quot;WebPopupItem.h&quot;
</span><span class="cx"> #include &quot;WebPopupMenuProxy.h&quot;
</span><span class="cx"> #include &quot;WebPreferences.h&quot;
</span><ins>+#include &quot;WebPreferencesKeys.h&quot;
</ins><span class="cx"> #include &quot;WebProcessMessages.h&quot;
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><span class="cx"> #include &quot;WebProcessProxy.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFDeprecatedPDFPluginh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -111,6 +111,8 @@
</span><span class="cx"> 
</span><span class="cx">     CGFloat scaleFactor() const;
</span><span class="cx"> 
</span><ins>+    bool shouldPlaceBlockDirectionScrollbarOnLeft() const override { return false; }
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit PDFPlugin(WebFrame*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -3072,6 +3072,13 @@
</span><span class="cx"> 
</span><span class="cx">     settings.setShouldDispatchJavaScriptWindowOnErrorEvents(true);
</span><span class="cx"> 
</span><ins>+    auto userInterfaceDirectionCandidate = static_cast&lt;WebCore::UserInterfaceDirectionPolicy&gt;(store.getUInt32ValueForKey(WebPreferencesKey::userInterfaceDirectionKey()));
+    if (userInterfaceDirectionCandidate == WebCore::UserInterfaceDirectionPolicy::Content || userInterfaceDirectionCandidate == WebCore::UserInterfaceDirectionPolicy::System)
+        settings.setUserInterfaceDirectionPolicy(!store.getUInt32ValueForKey(WebPreferencesKey::userInterfaceDirectionKey()) ? UserInterfaceDirectionPolicy::Content : UserInterfaceDirectionPolicy::System);
+    TextDirection systemLayoutDirectionCandidate = static_cast&lt;TextDirection&gt;(store.getUInt32ValueForKey(WebPreferencesKey::systemLayoutDirectionKey()));
+    if (systemLayoutDirectionCandidate == WebCore::LTR || systemLayoutDirectionCandidate == WebCore::RTL)
+        settings.setSystemLayoutDirection(systemLayoutDirectionCandidate);
+
</ins><span class="cx"> #if USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> #include &lt;WebKitAdditions/WebPagePreferences.cpp&gt;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundlemacInjectedBundleMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -38,18 +38,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTR {
</span><span class="cx"> 
</span><del>-static bool shouldUseRTLScrollbars(WKTypeRef initializationUserData)
-{
-    if (!initializationUserData || WKGetTypeID(initializationUserData) != WKDictionaryGetTypeID())
-        return false;
-
-    WKTypeRef item = WKDictionaryGetItemForKey(static_cast&lt;WKDictionaryRef&gt;(initializationUserData), adoptWK(WKStringCreateWithUTF8CString(&quot;UseRTLScrollbars&quot;)).get());
-    if (!item || WKGetTypeID(item) != WKBooleanGetTypeID())
-        return false;
-
-    return WKBooleanGetValue(static_cast&lt;WKBooleanRef&gt;(item));
-}
-
</del><span class="cx"> void InjectedBundle::platformInitialize(WKTypeRef initializationUserData)
</span><span class="cx"> {
</span><span class="cx">     static const int NoFontSmoothing = 0;
</span><span class="lines">@@ -95,13 +83,6 @@
</span><span class="cx">         @&quot;com.apple.swipescrolldirection&quot;: @1,
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    if (shouldUseRTLScrollbars(initializationUserData)) {
-        NSMutableDictionary *newDictionary = [dict mutableCopy];
-        [newDictionary setValue:@YES forKey:@&quot;AppleTextDirection&quot;];
-        [newDictionary setValue:@YES forKey:@&quot;NSForceRightToLeftWritingDirection&quot;];
-        dict = [newDictionary autorelease];
-    }
-
</del><span class="cx">     [[NSUserDefaults standardUserDefaults] setVolatileDomain:dict forName:NSArgumentDomain];
</span><span class="cx"> 
</span><span class="cx">     // Make NSFont use the new defaults.
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -953,8 +953,6 @@
</span><span class="cx">             testOptions.useFlexibleViewport = parseBooleanTestHeaderValue(value);
</span><span class="cx">         if (key == &quot;useDataDetection&quot;)
</span><span class="cx">             testOptions.useDataDetection = parseBooleanTestHeaderValue(value);
</span><del>-        if (key == &quot;rtlScrollbars&quot;)
-            testOptions.useRTLScrollbars = parseBooleanTestHeaderValue(value);
</del><span class="cx">         if (key == &quot;useMockScrollbars&quot;)
</span><span class="cx">             testOptions.useMockScrollbars = parseBooleanTestHeaderValue(value);
</span><span class="cx">         pairStart = pairEnd + 1;
</span><span class="lines">@@ -1480,13 +1478,6 @@
</span><span class="cx"> 
</span><span class="cx"> WKRetainPtr&lt;WKTypeRef&gt; TestController::getInjectedBundleInitializationUserData()
</span><span class="cx"> {
</span><del>-    if (m_currentInvocation-&gt;options().useRTLScrollbars) {
-        WKRetainPtr&lt;WKStringRef&gt; key = adoptWK(WKStringCreateWithUTF8CString(&quot;UseRTLScrollbars&quot;));
-        WKRetainPtr&lt;WKBooleanRef&gt; value = adoptWK(WKBooleanCreate(true));
-        const WKStringRef keyArray[] = { key.get() };
-        const WKTypeRef valueArray[] = { value.get() };
-        return adoptWK(WKDictionaryCreate(keyArray, valueArray, WTF_ARRAY_LENGTH(keyArray)));
-    }
</del><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestOptions.h (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestOptions.h        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Tools/WebKitTestRunner/TestOptions.h        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx">     bool isSVGTest { false };
</span><span class="cx">     bool isHiDPITest { false };
</span><span class="cx">     bool useDataDetection { false };
</span><del>-    bool useRTLScrollbars { false };
</del><span class="cx">     bool useMockScrollbars { true };
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;String&gt; overrideLanguages;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacPlatformWebViewMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (200115 => 200116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm        2016-04-27 00:47:45 UTC (rev 200115)
+++ trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm        2016-04-27 01:25:26 UTC (rev 200116)
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool PlatformWebView::viewSupportsOptions(const TestOptions&amp; options) const
</span><span class="cx"> {
</span><del>-    if (m_options.useThreadedScrolling != options.useThreadedScrolling || m_options.overrideLanguages != options.overrideLanguages || m_options.useRTLScrollbars != options.useRTLScrollbars || m_options.useMockScrollbars != options.useMockScrollbars)
</del><ins>+    if (m_options.useThreadedScrolling != options.useThreadedScrolling || m_options.overrideLanguages != options.overrideLanguages || m_options.useMockScrollbars != options.useMockScrollbars)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     return true;
</span></span></pre>
</div>
</div>

</body>
</html>