<!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>[202183] 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/202183">202183</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-06-17 15:24:52 -0700 (Fri, 17 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web video playback controls should have RTL volume slider
https://bugs.webkit.org/show_bug.cgi?id=158856
&lt;rdar://problem/25971769&gt;

Patch by Antoine Quint &lt;graouts@apple.com&gt; on 2016-06-17
Reviewed by Tim Horton.

Source/WebCore:

We reproduce the system used to propagate the page scale factor from the WebPage to the media controls to
propagate the user interface layout direction.

The Page exposes a new setUserInterfaceLayoutDirection() method which is set by the WebPage. The Page
then notifies the Document of a change, which propagates down to registered media elements, and finally sets
the usesLTRUserInterfaceLayoutDirection property on the media controller object in the injected JavaScript.
Based on the value of that property we toggle a new .uses-ltr-user-interface-layout-direction CSS class on the
.volume-box which applies a translate to the right and flips the volume controls on the x axis.

Since we're setting a new JS property from HTMLMediaController, we refactor much of the code out of the existing
pageScaleFactorChanged() and setPageScaleFactorProperty() into the new setControllerJSProperty() method so that
can easily set a named JS property with a given JSValue.

For testing purposes, we expose the WebCore::Page::setUserInterfaceLayoutDirection() method through Internals.

Test: fullscreen/video-controls-rtl.html

* Modules/mediacontrols/mediaControlsApple.css:
(video:-webkit-full-screen::-webkit-media-controls-panel .volume-box:not(.uses-ltr-user-interface-layout-direction)):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.set usesLTRUserInterfaceLayoutDirection):
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::registerForUserInterfaceLayoutDirectionChangedCallbacks):
(WebCore::Document::unregisterForUserInterfaceLayoutDirectionChangedCallbacks):
(WebCore::Document::userInterfaceLayoutDirectionChanged):
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::unregisterWithDocument):
(WebCore::HTMLMediaElement::updatePageScaleFactorJSProperty):
(WebCore::HTMLMediaElement::updateUsesLTRUserInterfaceLayoutDirectionJSProperty):
(WebCore::HTMLMediaElement::setControllerJSProperty):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
(WebCore::HTMLMediaElement::pageScaleFactorChanged):
(WebCore::HTMLMediaElement::userInterfaceLayoutDirectionChanged):
(WebCore::setPageScaleFactorProperty): Deleted.
* html/HTMLMediaElement.h:
* page/Page.cpp:
(WebCore::Page::setUserInterfaceLayoutDirection):
* page/Page.h:
(WebCore::Page::userInterfaceLayoutDirection):
* platform/UserInterfaceLayoutDirection.h: Renamed from Source/WebKit2/UIProcess/UserInterfaceLayoutDirection.h.
* testing/Internals.cpp:
(WebCore::Internals::setUserInterfaceLayoutDirection):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

We now call setUserInterfaceLayoutDirection() on WebCore::Page to propagate
the user interface layout direction down to the Web content. To facilitate this,
the UserInterfaceLayoutDirection enum is now defined in WebCore.

* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(convertSystemLayoutDirection):
(toUserInterfaceLayoutDirection):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::toUserInterfaceLayoutDirection):
(WebKit::WebViewImpl::userInterfaceLayoutDirection):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::userInterfaceLayoutDirection):
(WebKit::WebPageProxy::setUserInterfaceLayoutDirection):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebView.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::userInterfaceLayoutDirection):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::userInterfaceLayoutDirection):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::isPhysicallySwipingLeft):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):
(WebKit::WebPage::setUserInterfaceLayoutDirection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performNonEditingBehaviorForSelector):

LayoutTests:

New test that checks that the volume box has the correct CSS class name and the expected
CSS transform value applied to it when the user interface layout direction is right-to-left
and that changing the user interface layout direction dynamically update the media element
shadow tree as expected.

* fullscreen/video-controls-rtl-expected.txt: Added.
* fullscreen/video-controls-rtl.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmachttptestsmediahlsvideocontrolslivestreamexpectedtxt">trunk/LayoutTests/platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacyosemitehttptestsmediahlsvideocontrolslivestreamexpectedtxt">trunk/LayoutTests/platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsApplecss">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsApplejs">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParametersh">trunk/Source/WebKit2/Shared/WebPageCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkPageClientImplh">trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplh">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplmm">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflWebViewh">trunk/Source/WebKit2/UIProcess/efl/WebView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSh">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacViewGestureControllerMacmm">trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfullscreenvideocontrolsrtlexpectedtxt">trunk/LayoutTests/fullscreen/video-controls-rtl-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfullscreenvideocontrolsrtlhtml">trunk/LayoutTests/fullscreen/video-controls-rtl.html</a></li>
<li><a href="#trunkSourceWebCoreplatformUserInterfaceLayoutDirectionh">trunk/Source/WebCore/platform/UserInterfaceLayoutDirection.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessUserInterfaceLayoutDirectionh">trunk/Source/WebKit2/UIProcess/UserInterfaceLayoutDirection.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/LayoutTests/ChangeLog        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-06-17  Antoine Quint  &lt;graouts@apple.com&gt;
+
+        Web video playback controls should have RTL volume slider
+        https://bugs.webkit.org/show_bug.cgi?id=158856
+        &lt;rdar://problem/25971769&gt;
+
+        Reviewed by Tim Horton.
+
+        New test that checks that the volume box has the correct CSS class name and the expected
+        CSS transform value applied to it when the user interface layout direction is right-to-left
+        and that changing the user interface layout direction dynamically update the media element
+        shadow tree as expected.
+
+        * fullscreen/video-controls-rtl-expected.txt: Added.
+        * fullscreen/video-controls-rtl.html: Added.
+
</ins><span class="cx"> 2016-06-17  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update LayoutTest fast/canvas/canvas-composite-text-alpha.html
</span></span></pre></div>
<a id="trunkLayoutTestsfullscreenvideocontrolsrtlexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fullscreen/video-controls-rtl-expected.txt (0 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fullscreen/video-controls-rtl-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fullscreen/video-controls-rtl-expected.txt        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+This tests that the video element's controls in full screen mode flip the layout of the volume controls in RTL mode.
+
+
+EVENT(webkitfullscreenchange)
+EXPECTED (shadowRoot = internals.shadowRoot(video) != 'null') OK
+EXPECTED (volumeBox = mediaControlsElement(shadowRoot.firstChild, '-webkit-media-controls-volume-slider-container') != 'null') OK
+EXPECTED (volumeBox.classList.contains('uses-ltr-user-interface-layout-direction') == 'true') OK
+EXPECTED (document.defaultView.getComputedStyle(volumeBox)['transform'] == 'none') OK
+EXPECTED (volumeBox.classList.contains('uses-ltr-user-interface-layout-direction') == 'false') OK
+EXPECTED (document.defaultView.getComputedStyle(volumeBox)['transform'] == 'matrix(-1, 0, 0, 1, 23, 0)') OK
+EXPECTED (volumeBox.classList.contains('uses-ltr-user-interface-layout-direction') == 'true') OK
+EXPECTED (document.defaultView.getComputedStyle(volumeBox)['transform'] == 'none') OK
+END OF TEST
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfullscreenvideocontrolsrtlhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fullscreen/video-controls-rtl.html (0 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fullscreen/video-controls-rtl.html                                (rev 0)
+++ trunk/LayoutTests/fullscreen/video-controls-rtl.html        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;body&gt;
+    &lt;p&gt;This tests that the video element's controls in full screen mode flip the layout of the volume controls in RTL mode.&lt;/p&gt;
+    &lt;video id=&quot;video&quot; width=&quot;300&quot;&gt;&lt;/video&gt;
+    &lt;script src=&quot;full-screen-test.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../media/media-controls.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        var callback;
+        var shadowRoot;
+        var volumeBox;
+        var video = document.getElementById('video');
+
+        waitForEvent(document, 'webkitfullscreenchange', function() {
+            if (window.internals) {
+                testExpected(&quot;shadowRoot = internals.shadowRoot(video)&quot;, null, &quot;!=&quot;);
+                testExpected(&quot;volumeBox = mediaControlsElement(shadowRoot.firstChild, '-webkit-media-controls-volume-slider-container')&quot;, null, &quot;!=&quot;);
+                testExpected(&quot;volumeBox.classList.contains('uses-ltr-user-interface-layout-direction')&quot;, true, &quot;==&quot;);
+                testExpected(&quot;document.defaultView.getComputedStyle(volumeBox)['transform']&quot;, 'none', &quot;==&quot;);
+
+                window.internals.setUserInterfaceLayoutDirection(&quot;RTL&quot;);
+                testExpected(&quot;volumeBox.classList.contains('uses-ltr-user-interface-layout-direction')&quot;, false, &quot;==&quot;);
+                testExpected(&quot;document.defaultView.getComputedStyle(volumeBox)['transform']&quot;, 'matrix(-1, 0, 0, 1, 23, 0)', &quot;==&quot;);
+
+                window.internals.setUserInterfaceLayoutDirection(&quot;LTR&quot;);
+                testExpected(&quot;volumeBox.classList.contains('uses-ltr-user-interface-layout-direction')&quot;, true, &quot;==&quot;);
+                testExpected(&quot;document.defaultView.getComputedStyle(volumeBox)['transform']&quot;, 'none', &quot;==&quot;);
+            } else
+                logResult(false, &quot;window.internals == undefined&quot;);
+
+            endTest();
+        });
+
+        runWithKeyDown(function() { video.webkitRequestFullScreen() });
+    &lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmachttptestsmediahlsvideocontrolslivestreamexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/LayoutTests/platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> -webkit-media-controls-play-button: classes: [paused]
</span><span class="cx"> -webkit-media-controls-status-display: classes: []
</span><span class="cx"> none: classes: [mute-box]
</span><del>--webkit-media-controls-volume-slider-container: classes: [volume-box]
</del><ins>+-webkit-media-controls-volume-slider-container: classes: [volume-box uses-ltr-user-interface-layout-direction]
</ins><span class="cx"> -webkit-media-controls-volume-slider-container-background: classes: []
</span><span class="cx"> -webkit-media-controls-volume-slider-container-tint: classes: []
</span><span class="cx"> -webkit-media-controls-volume-slider: classes: []
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacyosemitehttptestsmediahlsvideocontrolslivestreamexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/LayoutTests/platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> -webkit-media-controls-play-button: classes: [paused]
</span><span class="cx"> -webkit-media-controls-status-display: classes: []
</span><span class="cx"> none: classes: [mute-box]
</span><del>--webkit-media-controls-volume-slider-container: classes: [volume-box]
</del><ins>+-webkit-media-controls-volume-slider-container: classes: [volume-box uses-ltr-user-interface-layout-direction]
</ins><span class="cx"> -webkit-media-controls-volume-slider-container-background: classes: []
</span><span class="cx"> -webkit-media-controls-volume-slider-container-tint: classes: []
</span><span class="cx"> -webkit-media-controls-volume-slider: classes: []
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/ChangeLog        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -1,3 +1,59 @@
</span><ins>+2016-06-17  Antoine Quint  &lt;graouts@apple.com&gt;
+
+        Web video playback controls should have RTL volume slider
+        https://bugs.webkit.org/show_bug.cgi?id=158856
+        &lt;rdar://problem/25971769&gt;
+
+        Reviewed by Tim Horton.
+
+        We reproduce the system used to propagate the page scale factor from the WebPage to the media controls to
+        propagate the user interface layout direction.
+
+        The Page exposes a new setUserInterfaceLayoutDirection() method which is set by the WebPage. The Page
+        then notifies the Document of a change, which propagates down to registered media elements, and finally sets
+        the usesLTRUserInterfaceLayoutDirection property on the media controller object in the injected JavaScript.
+        Based on the value of that property we toggle a new .uses-ltr-user-interface-layout-direction CSS class on the
+        .volume-box which applies a translate to the right and flips the volume controls on the x axis.
+
+        Since we're setting a new JS property from HTMLMediaController, we refactor much of the code out of the existing
+        pageScaleFactorChanged() and setPageScaleFactorProperty() into the new setControllerJSProperty() method so that
+        can easily set a named JS property with a given JSValue.
+
+        For testing purposes, we expose the WebCore::Page::setUserInterfaceLayoutDirection() method through Internals.
+
+        Test: fullscreen/video-controls-rtl.html
+
+        * Modules/mediacontrols/mediaControlsApple.css:
+        (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box:not(.uses-ltr-user-interface-layout-direction)):
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.set usesLTRUserInterfaceLayoutDirection):
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/Document.cpp:
+        (WebCore::Document::registerForUserInterfaceLayoutDirectionChangedCallbacks):
+        (WebCore::Document::unregisterForUserInterfaceLayoutDirectionChangedCallbacks):
+        (WebCore::Document::userInterfaceLayoutDirectionChanged):
+        * dom/Document.h:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::registerWithDocument):
+        (WebCore::HTMLMediaElement::unregisterWithDocument):
+        (WebCore::HTMLMediaElement::updatePageScaleFactorJSProperty):
+        (WebCore::HTMLMediaElement::updateUsesLTRUserInterfaceLayoutDirectionJSProperty):
+        (WebCore::HTMLMediaElement::setControllerJSProperty):
+        (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
+        (WebCore::HTMLMediaElement::pageScaleFactorChanged):
+        (WebCore::HTMLMediaElement::userInterfaceLayoutDirectionChanged):
+        (WebCore::setPageScaleFactorProperty): Deleted.
+        * html/HTMLMediaElement.h:
+        * page/Page.cpp:
+        (WebCore::Page::setUserInterfaceLayoutDirection):
+        * page/Page.h:
+        (WebCore::Page::userInterfaceLayoutDirection):
+        * platform/UserInterfaceLayoutDirection.h: Renamed from Source/WebKit2/UIProcess/UserInterfaceLayoutDirection.h.
+        * testing/Internals.cpp:
+        (WebCore::Internals::setUserInterfaceLayoutDirection):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
</ins><span class="cx"> 2016-06-17  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         TouchEvent should have a constructor
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsmediaControlsApplecss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -764,6 +764,10 @@
</span><span class="cx">     border: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+video:-webkit-full-screen::-webkit-media-controls-panel .volume-box:not(.uses-ltr-user-interface-layout-direction) {
+    transform: translateX(23px) scaleX(-1);
+}
+
</ins><span class="cx"> video:-webkit-full-screen::-webkit-media-controls-volume-slider {
</span><span class="cx">     -webkit-transform: none;
</span><span class="cx">     background-color: transparent;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsmediaControlsApplejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -117,6 +117,7 @@
</span><span class="cx">         out: 'out',
</span><span class="cx">         pictureInPictureButton: 'picture-in-picture-button',
</span><span class="cx">         placeholderShowing: 'placeholder-showing',
</span><ins>+        usesLTRUserInterfaceLayoutDirection: 'uses-ltr-user-interface-layout-direction'
</ins><span class="cx">     },
</span><span class="cx">     KeyCodes: {
</span><span class="cx">         enter: 13,
</span><span class="lines">@@ -2236,6 +2237,11 @@
</span><span class="cx">         this._pageScaleFactor = newScaleFactor;
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    set usesLTRUserInterfaceLayoutDirection(usesLTRUserInterfaceLayoutDirection)
+    {
+        this.controls.volumeBox.classList.toggle(this.ClassNames.usesLTRUserInterfaceLayoutDirection, usesLTRUserInterfaceLayoutDirection);
+    },
+
</ins><span class="cx">     handleRootResize: function(event)
</span><span class="cx">     {
</span><span class="cx">         this.updateLayoutForDisplayedWidth();
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -2597,6 +2597,7 @@
</span><span class="cx">                 71A57DF2154BE25C0009D120 /* SVGPathUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A57DF0154BE25C0009D120 /* SVGPathUtilities.h */; };
</span><span class="cx">                 71B1E125164048F700B1880A /* InspectorLayerTreeAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 71B1E124164048CC00B1880A /* InspectorLayerTreeAgent.h */; };
</span><span class="cx">                 71B1E1261640491A00B1880A /* InspectorLayerTreeAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71B1E123164048CC00B1880A /* InspectorLayerTreeAgent.cpp */; };
</span><ins>+                71C916081D1483A300ACA47D /* UserInterfaceLayoutDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 71C916071D1483A300ACA47D /* UserInterfaceLayoutDirection.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 71CC7A20152A0BFE009EEAF9 /* SVGAnimatedEnumeration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71CC7A1F152A0BFE009EEAF9 /* SVGAnimatedEnumeration.cpp */; };
</span><span class="cx">                 71DCB7011568197600862271 /* JSSVGZoomAndPan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71DCB6FF1568197600862271 /* JSSVGZoomAndPan.cpp */; };
</span><span class="cx">                 71DCB7021568197600862271 /* JSSVGZoomAndPan.h in Headers */ = {isa = PBXBuildFile; fileRef = 71DCB7001568197600862271 /* JSSVGZoomAndPan.h */; };
</span><span class="lines">@@ -10244,6 +10245,7 @@
</span><span class="cx">                 71A57DF0154BE25C0009D120 /* SVGPathUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathUtilities.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 71B1E123164048CC00B1880A /* InspectorLayerTreeAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorLayerTreeAgent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 71B1E124164048CC00B1880A /* InspectorLayerTreeAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorLayerTreeAgent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                71C916071D1483A300ACA47D /* UserInterfaceLayoutDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInterfaceLayoutDirection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 71CC7A1F152A0BFE009EEAF9 /* SVGAnimatedEnumeration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedEnumeration.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 71DCB6FF1568197600862271 /* JSSVGZoomAndPan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGZoomAndPan.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 71DCB7001568197600862271 /* JSSVGZoomAndPan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGZoomAndPan.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -23080,6 +23082,7 @@
</span><span class="cx">                                 BCBD21AA0E417AD400A070F2 /* URLHash.h */,
</span><span class="cx">                                 868160D1187669C40021E79D /* UserActivity.cpp */,
</span><span class="cx">                                 868160D2187669C40021E79D /* UserActivity.h */,
</span><ins>+                                71C916071D1483A300ACA47D /* UserInterfaceLayoutDirection.h */,
</ins><span class="cx">                                 2E3BBF051162DA1100B9409A /* UUID.cpp */,
</span><span class="cx">                                 2E3BBF061162DA1100B9409A /* UUID.h */,
</span><span class="cx">                                 9A1142031832D134000BB8AD /* ValueToString.h */,
</span><span class="lines">@@ -28087,6 +28090,7 @@
</span><span class="cx">                                 A8EA800C0A19516E00A8EF5F /* StyleSheet.h in Headers */,
</span><span class="cx">                                 E4F9EEF3156DA00700D23E7E /* StyleSheetContents.h in Headers */,
</span><span class="cx">                                 A8EA800A0A19516E00A8EF5F /* StyleSheetList.h in Headers */,
</span><ins>+                                71C916081D1483A300ACA47D /* UserInterfaceLayoutDirection.h in Headers */,
</ins><span class="cx">                                 BC5EB5E50E81BF6D00B25965 /* StyleSurroundData.h in Headers */,
</span><span class="cx">                                 BC5EB8100E81F2CE00B25965 /* StyleTransformData.h in Headers */,
</span><span class="cx">                                 E4DEAA1817A93DC3000E0430 /* StyleTreeResolver.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/dom/Document.cpp        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -4877,6 +4877,22 @@
</span><span class="cx">     for (HTMLMediaElement* mediaElement : m_pageScaleFactorChangedElements)
</span><span class="cx">         mediaElement-&gt;pageScaleFactorChanged();
</span><span class="cx"> }
</span><ins>+
+void Document::registerForUserInterfaceLayoutDirectionChangedCallbacks(HTMLMediaElement&amp; element)
+{
+    m_userInterfaceLayoutDirectionChangedElements.add(&amp;element);
+}
+
+void Document::unregisterForUserInterfaceLayoutDirectionChangedCallbacks(HTMLMediaElement&amp; element)
+{
+    m_userInterfaceLayoutDirectionChangedElements.remove(&amp;element);
+}
+
+void Document::userInterfaceLayoutDirectionChanged()
+{
+    for (auto* mediaElement : m_userInterfaceLayoutDirectionChangedElements)
+        mediaElement-&gt;userInterfaceLayoutDirectionChanged();
+}
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void Document::setShouldCreateRenderers(bool f)
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/dom/Document.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -1038,6 +1038,9 @@
</span><span class="cx">     void registerForPageScaleFactorChangedCallbacks(HTMLMediaElement*);
</span><span class="cx">     void unregisterForPageScaleFactorChangedCallbacks(HTMLMediaElement*);
</span><span class="cx">     void pageScaleFactorChangedAndStable();
</span><ins>+    void registerForUserInterfaceLayoutDirectionChangedCallbacks(HTMLMediaElement&amp;);
+    void unregisterForUserInterfaceLayoutDirectionChangedCallbacks(HTMLMediaElement&amp;);
+    void userInterfaceLayoutDirectionChanged();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void registerForVisibilityStateChangedCallbacks(Element*);
</span><span class="lines">@@ -1607,6 +1610,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><span class="cx">     HashSet&lt;HTMLMediaElement*&gt; m_pageScaleFactorChangedElements;
</span><ins>+    HashSet&lt;HTMLMediaElement*&gt; m_userInterfaceLayoutDirectionChangedElements;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     HashSet&lt;Element*&gt; m_visibilityStateCallbackElements;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -596,6 +596,7 @@
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><span class="cx">     if (m_mediaControlsDependOnPageScaleFactor)
</span><span class="cx">         document.registerForPageScaleFactorChangedCallbacks(this);
</span><ins>+    document.registerForUserInterfaceLayoutDirectionChangedCallbacks(*this);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><span class="lines">@@ -630,6 +631,7 @@
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><span class="cx">     if (m_mediaControlsDependOnPageScaleFactor)
</span><span class="cx">         document.unregisterForPageScaleFactorChangedCallbacks(this);
</span><ins>+    document.unregisterForUserInterfaceLayoutDirectionChangedCallbacks(*this);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><span class="lines">@@ -6488,13 +6490,40 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void setPageScaleFactorProperty(JSC::ExecState* exec, JSC::JSValue controllerValue, float pageScaleFactor)
</del><ins>+void HTMLMediaElement::updatePageScaleFactorJSProperty()
</ins><span class="cx"> {
</span><ins>+    Page* page = document().page();
+    if (!page)
+        return;
+
+    setControllerJSProperty(&quot;pageScaleFactor&quot;, JSC::jsNumber(page-&gt;pageScaleFactor()));
+}
+
+void HTMLMediaElement::updateUsesLTRUserInterfaceLayoutDirectionJSProperty()
+{
+    Page* page = document().page();
+    if (!page)
+        return;
+
+    bool usesLTRUserInterfaceLayoutDirectionProperty = page-&gt;userInterfaceLayoutDirection() == UserInterfaceLayoutDirection::LTR;
+    setControllerJSProperty(&quot;usesLTRUserInterfaceLayoutDirection&quot;, JSC::jsBoolean(usesLTRUserInterfaceLayoutDirectionProperty));
+}
+
+void HTMLMediaElement::setControllerJSProperty(const char* propertyName, JSC::JSValue propertyValue)
+{
+    DOMWrapperWorld&amp; world = ensureIsolatedWorld();
+    ScriptController&amp; scriptController = document().frame()-&gt;script();
+    JSDOMGlobalObject* globalObject = JSC::jsCast&lt;JSDOMGlobalObject*&gt;(scriptController.globalObject(world));
+    JSC::ExecState* exec = globalObject-&gt;globalExec();
+    JSC::JSLockHolder lock(exec);
+
+    JSC::JSValue controllerValue = controllerJSValue(*exec, *globalObject, *this);
</ins><span class="cx">     JSC::PutPropertySlot propertySlot(controllerValue);
</span><span class="cx">     JSC::JSObject* controllerObject = controllerValue.toObject(exec);
</span><span class="cx">     if (!controllerObject)
</span><span class="cx">         return;
</span><del>-    controllerObject-&gt;methodTable()-&gt;put(controllerObject, exec, JSC::Identifier::fromString(exec, &quot;pageScaleFactor&quot;), JSC::jsNumber(pageScaleFactor), propertySlot);
</del><ins>+
+    controllerObject-&gt;methodTable()-&gt;put(controllerObject, exec, JSC::Identifier::fromString(exec, propertyName), propertyValue, propertySlot);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLMediaElement::didAddUserAgentShadowRoot(ShadowRoot* root)
</span><span class="lines">@@ -6571,7 +6600,8 @@
</span><span class="cx"> 
</span><span class="cx">     mediaControlsHostJSWrapperObject-&gt;putDirect(exec-&gt;vm(), controller, controllerValue, JSC::DontDelete | JSC::DontEnum | JSC::ReadOnly);
</span><span class="cx"> 
</span><del>-    setPageScaleFactorProperty(exec, controllerValue, page-&gt;pageScaleFactor());
</del><ins>+    updatePageScaleFactorJSProperty();
+    updateUsesLTRUserInterfaceLayoutDirectionJSProperty();
</ins><span class="cx"> 
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="cx">         exec-&gt;clearException();
</span><span class="lines">@@ -6635,20 +6665,12 @@
</span><span class="cx"> 
</span><span class="cx"> void HTMLMediaElement::pageScaleFactorChanged()
</span><span class="cx"> {
</span><del>-    Page* page = document().page();
-    if (!page)
-        return;
</del><ins>+    updatePageScaleFactorJSProperty();
+}
</ins><span class="cx"> 
</span><del>-    LOG(Media, &quot;HTMLMediaElement::pageScaleFactorChanged(%p) = %f&quot;, this, page-&gt;pageScaleFactor());
-    DOMWrapperWorld&amp; world = ensureIsolatedWorld();
-    ScriptController&amp; scriptController = document().frame()-&gt;script();
-    JSDOMGlobalObject* globalObject = JSC::jsCast&lt;JSDOMGlobalObject*&gt;(scriptController.globalObject(world));
-    JSC::ExecState* exec = globalObject-&gt;globalExec();
-    JSC::JSLockHolder lock(exec);
-
-    JSC::JSValue controllerValue = controllerJSValue(*exec, *globalObject, *this);
-
-    setPageScaleFactorProperty(exec, controllerValue, page-&gt;pageScaleFactor());
</del><ins>+void HTMLMediaElement::userInterfaceLayoutDirectionChanged()
+{
+    updateUsesLTRUserInterfaceLayoutDirectionJSProperty();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String HTMLMediaElement::getCurrentMediaControlsStatus()
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #include &quot;MediaElementSession.h&quot;
</span><span class="cx"> #include &quot;MediaProducer.h&quot;
</span><span class="cx"> #include &quot;PageThrottler.h&quot;
</span><ins>+#include &quot;UserInterfaceLayoutDirection.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx"> #include &quot;AudioTrack.h&quot;
</span><span class="lines">@@ -444,6 +445,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><span class="cx">     void pageScaleFactorChanged();
</span><ins>+    void userInterfaceLayoutDirectionChanged();
</ins><span class="cx">     WEBCORE_EXPORT String getCurrentMediaControlsStatus();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -781,6 +783,10 @@
</span><span class="cx"> 
</span><span class="cx">     void updateRenderer();
</span><span class="cx"> 
</span><ins>+    void updatePageScaleFactorJSProperty();
+    void updateUsesLTRUserInterfaceLayoutDirectionJSProperty();
+    void setControllerJSProperty(const char*, JSC::JSValue);
+
</ins><span class="cx">     Timer m_pendingActionTimer;
</span><span class="cx">     Timer m_progressEventTimer;
</span><span class="cx">     Timer m_playbackProgressTimer;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/page/Page.cpp        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -897,6 +897,21 @@
</span><span class="cx">     mainFrame().pageOverlayController().didChangeDeviceScaleFactor();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Page::setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection)
+{
+    if (m_userInterfaceLayoutDirection == userInterfaceLayoutDirection)
+        return;
+
+    m_userInterfaceLayoutDirection = userInterfaceLayoutDirection;
+#if ENABLE(MEDIA_CONTROLS_SCRIPT)
+    for (Frame* frame = &amp;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
+        if (!frame-&gt;document())
+            continue;
+        frame-&gt;document()-&gt;userInterfaceLayoutDirectionChanged();
+    }
+#endif
+}
+
</ins><span class="cx"> void Page::setTopContentInset(float contentInset)
</span><span class="cx"> {
</span><span class="cx">     if (m_topContentInset == contentInset)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/page/Page.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;ScrollTypes.h&quot;
</span><span class="cx"> #include &quot;SessionID.h&quot;
</span><span class="cx"> #include &quot;Supplementable.h&quot;
</span><ins>+#include &quot;UserInterfaceLayoutDirection.h&quot;
</ins><span class="cx"> #include &quot;ViewState.h&quot;
</span><span class="cx"> #include &quot;ViewportArguments.h&quot;
</span><span class="cx"> #include &quot;WheelEventTestTrigger.h&quot;
</span><span class="lines">@@ -281,6 +282,9 @@
</span><span class="cx">     WEBCORE_EXPORT void setPageScaleFactor(float scale, const IntPoint&amp; origin, bool inStableState = true);
</span><span class="cx">     float pageScaleFactor() const { return m_pageScaleFactor; }
</span><span class="cx"> 
</span><ins>+    UserInterfaceLayoutDirection userInterfaceLayoutDirection() const { return m_userInterfaceLayoutDirection; }
+    WEBCORE_EXPORT void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection);
+
</ins><span class="cx">     // The view scale factor is multiplied into the page scale factor by all
</span><span class="cx">     // callers of setPageScaleFactor.
</span><span class="cx">     WEBCORE_EXPORT void setViewScaleFactor(float);
</span><span class="lines">@@ -716,6 +720,7 @@
</span><span class="cx">     bool m_showAllPlugins { false };
</span><span class="cx">     bool m_controlledByAutomation { false };
</span><span class="cx">     bool m_resourceCachingDisabled { false };
</span><ins>+    UserInterfaceLayoutDirection m_userInterfaceLayoutDirection { UserInterfaceLayoutDirection::LTR };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline PageGroup&amp; Page::group()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformUserInterfaceLayoutDirectionhfromrev202182trunkSourceWebKit2UIProcessUserInterfaceLayoutDirectionh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/UserInterfaceLayoutDirection.h (from rev 202182, trunk/Source/WebKit2/UIProcess/UserInterfaceLayoutDirection.h) (0 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/UserInterfaceLayoutDirection.h                                (rev 0)
+++ trunk/Source/WebCore/platform/UserInterfaceLayoutDirection.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+/*
+ * 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * 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 APPLE INC. OR ITS 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.
+ */
+
+#ifndef UserInterfaceLayoutDirection_h
+#define UserInterfaceLayoutDirection_h
+
+namespace WebCore {
+
+enum class UserInterfaceLayoutDirection { LTR, RTL };
+
+} // namespace WebCore
+
+#endif // UserInterfaceLayoutDirection_h
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/testing/Internals.cpp        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -3339,4 +3339,17 @@
</span><span class="cx">     return GCObservation::create(value.getObject());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Internals::setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection)
+{
+    Document* document = contextDocument();
+    if (!document)
+        return;
+
+    Page* page = document-&gt;page();
+    if (!page)
+        return;
+
+    page-&gt;setUserInterfaceLayoutDirection(userInterfaceLayoutDirection == UserInterfaceLayoutDirection::LTR ? WebCore::UserInterfaceLayoutDirection::LTR : WebCore::UserInterfaceLayoutDirection::RTL);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/testing/Internals.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -486,6 +486,9 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;GCObservation&gt; observeGC(JSC::JSValue);
</span><span class="cx"> 
</span><ins>+    enum class UserInterfaceLayoutDirection { LTR, RTL };
+    void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection);
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit Internals(Document&amp;);
</span><span class="cx">     Document* contextDocument() const;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebCore/testing/Internals.idl        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -65,6 +65,11 @@
</span><span class="cx">     &quot;AutoFillButtonTypeCredentials&quot;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum UserInterfaceLayoutDirection {
+    &quot;LTR&quot;,
+    &quot;RTL&quot;
+};
+
</ins><span class="cx"> [
</span><span class="cx">     ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
</span><span class="cx">     NoInterfaceObject,
</span><span class="lines">@@ -458,4 +463,6 @@
</span><span class="cx">     boolean isProcessingUserGesture();
</span><span class="cx"> 
</span><span class="cx">     GCObservation observeGC(any observed);
</span><ins>+
+    void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/ChangeLog        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2016-06-17  Antoine Quint  &lt;graouts@apple.com&gt;
+
+        Web video playback controls should have RTL volume slider
+        https://bugs.webkit.org/show_bug.cgi?id=158856
+        &lt;rdar://problem/25971769&gt;
+
+        Reviewed by Tim Horton.
+
+        We now call setUserInterfaceLayoutDirection() on WebCore::Page to propagate
+        the user interface layout direction down to the Web content. To facilitate this,
+        the UserInterfaceLayoutDirection enum is now defined in WebCore.
+
+        * Shared/WebPageCreationParameters.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (convertSystemLayoutDirection):
+        (toUserInterfaceLayoutDirection):
+        * UIProcess/API/gtk/PageClientImpl.h:
+        * UIProcess/Cocoa/WebViewImpl.h:
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::toUserInterfaceLayoutDirection):
+        (WebKit::WebViewImpl::userInterfaceLayoutDirection):
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::userInterfaceLayoutDirection):
+        (WebKit::WebPageProxy::setUserInterfaceLayoutDirection):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/efl/WebView.h:
+        * UIProcess/ios/PageClientImplIOS.h:
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::userInterfaceLayoutDirection):
+        * UIProcess/mac/PageClientImpl.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::userInterfaceLayoutDirection):
+        * UIProcess/mac/ViewGestureControllerMac.mm:
+        (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
+        (WebKit::ViewGestureController::isPhysicallySwipingLeft):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::m_userInterfaceLayoutDirection):
+        (WebKit::WebPage::setUserInterfaceLayoutDirection):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::performNonEditingBehaviorForSelector):
+
</ins><span class="cx"> 2016-06-17  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION: Double tap to zoom does not work on yahoo finance
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include &quot;DrawingAreaInfo.h&quot;
</span><span class="cx"> #include &quot;LayerTreeContext.h&quot;
</span><span class="cx"> #include &quot;SessionState.h&quot;
</span><del>-#include &quot;UserInterfaceLayoutDirection.h&quot;
</del><span class="cx"> #include &quot;WebCoreArgumentCoders.h&quot;
</span><span class="cx"> #include &quot;WebPageGroupData.h&quot;
</span><span class="cx"> #include &quot;WebPreferencesStore.h&quot;
</span><span class="lines">@@ -39,6 +38,7 @@
</span><span class="cx"> #include &lt;WebCore/Pagination.h&gt;
</span><span class="cx"> #include &lt;WebCore/ScrollTypes.h&gt;
</span><span class="cx"> #include &lt;WebCore/SessionID.h&gt;
</span><ins>+#include &lt;WebCore/UserInterfaceLayoutDirection.h&gt;
</ins><span class="cx"> #include &lt;WebCore/ViewState.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx">     bool appleMailPaginationQuirkEnabled;
</span><span class="cx">     bool shouldScaleViewToFitDocument;
</span><span class="cx"> 
</span><del>-    UserInterfaceLayoutDirection userInterfaceLayoutDirection;
</del><ins>+    WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -377,11 +377,11 @@
</span><span class="cx"> {
</span><span class="cx">     switch (direction) {
</span><span class="cx">     case NSUserInterfaceLayoutDirectionLeftToRight:
</span><del>-        return static_cast&lt;uint32_t&gt;(WebCore::LTR);
</del><ins>+        return static_cast&lt;uint32_t&gt;(WebCore::UserInterfaceLayoutDirection::LTR);
</ins><span class="cx">     case NSUserInterfaceLayoutDirectionRightToLeft:
</span><del>-        return static_cast&lt;uint32_t&gt;(WebCore::RTL);
</del><ins>+        return static_cast&lt;uint32_t&gt;(WebCore::UserInterfaceLayoutDirection::RTL);
</ins><span class="cx">     }
</span><del>-    return static_cast&lt;uint32_t&gt;(WebCore::LTR);
</del><ins>+    return static_cast&lt;uint32_t&gt;(WebCore::UserInterfaceLayoutDirection::LTR);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -4303,18 +4303,18 @@
</span><span class="cx">     return (_WKWebViewPrintFormatter *)viewPrintFormatter;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static WebKit::UserInterfaceLayoutDirection toUserInterfaceLayoutDirection(UISemanticContentAttribute contentAttribute)
</del><ins>+static WebCore::UserInterfaceLayoutDirection toUserInterfaceLayoutDirection(UISemanticContentAttribute contentAttribute)
</ins><span class="cx"> {
</span><span class="cx">     auto direction = [UIView userInterfaceLayoutDirectionForSemanticContentAttribute:contentAttribute];
</span><span class="cx">     switch (direction) {
</span><span class="cx">     case UIUserInterfaceLayoutDirectionLeftToRight:
</span><del>-        return WebKit::UserInterfaceLayoutDirection::LTR;
</del><ins>+        return WebCore::UserInterfaceLayoutDirection::LTR;
</ins><span class="cx">     case UIUserInterfaceLayoutDirectionRightToLeft:
</span><del>-        return WebKit::UserInterfaceLayoutDirection::RTL;
</del><ins>+        return WebCore::UserInterfaceLayoutDirection::RTL;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><del>-    return WebKit::UserInterfaceLayoutDirection::LTR;
</del><ins>+    return WebCore::UserInterfaceLayoutDirection::LTR;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)setSemanticContentAttribute:(UISemanticContentAttribute)contentAttribute
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx">     bool decidePolicyForInstallMissingMediaPluginsPermissionRequest(InstallMissingMediaPluginsPermissionRequest&amp;) override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    UserInterfaceLayoutDirection userInterfaceLayoutDirection() override { return UserInterfaceLayoutDirection::LTR; }
</del><ins>+    WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() override { return WebCore::UserInterfaceLayoutDirection::LTR; }
</ins><span class="cx"> 
</span><span class="cx">     // Members of PageClientImpl class
</span><span class="cx">     GtkWidget* m_viewWidget;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -29,11 +29,11 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;PluginComplexTextInputState.h&quot;
</span><del>-#include &quot;UserInterfaceLayoutDirection.h&quot;
</del><span class="cx"> #include &quot;WKLayoutMode.h&quot;
</span><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="cx"> #include &quot;_WKOverlayScrollbarStyle.h&quot;
</span><span class="cx"> #include &lt;WebCore/TextIndicatorWindow.h&gt;
</span><ins>+#include &lt;WebCore/UserInterfaceLayoutDirection.h&gt;
</ins><span class="cx"> #include &lt;functional&gt;
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/WeakPtr.h&gt;
</span><span class="lines">@@ -486,7 +486,7 @@
</span><span class="cx">     void setRequiresUserActionForEditingControlsManager(bool requiresUserActionForEditingControlsManager) { m_requiresUserActionForEditingControlsManager = requiresUserActionForEditingControlsManager; }
</span><span class="cx">     bool requiresUserActionForEditingControlsManager() const { return m_requiresUserActionForEditingControlsManager; }
</span><span class="cx"> 
</span><del>-    UserInterfaceLayoutDirection userInterfaceLayoutDirection();
</del><ins>+    WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection();
</ins><span class="cx">     void setUserInterfaceLayoutDirection(NSUserInterfaceLayoutDirection);
</span><span class="cx"> 
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101200 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -4029,20 +4029,20 @@
</span><span class="cx">     return m_view.window.windowNumber != eventWindowNumber;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static UserInterfaceLayoutDirection toUserInterfaceLayoutDirection(NSUserInterfaceLayoutDirection direction)
</del><ins>+static WebCore::UserInterfaceLayoutDirection toUserInterfaceLayoutDirection(NSUserInterfaceLayoutDirection direction)
</ins><span class="cx"> {
</span><span class="cx">     switch (direction) {
</span><span class="cx">     case NSUserInterfaceLayoutDirectionLeftToRight:
</span><del>-        return UserInterfaceLayoutDirection::LTR;
</del><ins>+        return WebCore::UserInterfaceLayoutDirection::LTR;
</ins><span class="cx">     case NSUserInterfaceLayoutDirectionRightToLeft:
</span><del>-        return UserInterfaceLayoutDirection::RTL;
</del><ins>+        return WebCore::UserInterfaceLayoutDirection::RTL;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><del>-    return UserInterfaceLayoutDirection::LTR;
</del><ins>+    return WebCore::UserInterfaceLayoutDirection::LTR;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-UserInterfaceLayoutDirection WebViewImpl::userInterfaceLayoutDirection()
</del><ins>+WebCore::UserInterfaceLayoutDirection WebViewImpl::userInterfaceLayoutDirection()
</ins><span class="cx"> {
</span><span class="cx">     return toUserInterfaceLayoutDirection(m_view.userInterfaceLayoutDirection);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -27,12 +27,12 @@
</span><span class="cx"> #define PageClient_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ShareableBitmap.h&quot;
</span><del>-#include &quot;UserInterfaceLayoutDirection.h&quot;
</del><span class="cx"> #include &quot;WebColorPicker.h&quot;
</span><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="cx"> #include &quot;WebPopupMenuProxy.h&quot;
</span><span class="cx"> #include &lt;WebCore/AlternativeTextClient.h&gt;
</span><span class="cx"> #include &lt;WebCore/EditorClient.h&gt;
</span><ins>+#include &lt;WebCore/UserInterfaceLayoutDirection.h&gt;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -364,7 +364,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool windowIsFrontWindowUnderMouse(const NativeWebMouseEvent&amp;) { return false; }
</span><span class="cx"> 
</span><del>-    virtual UserInterfaceLayoutDirection userInterfaceLayoutDirection() = 0;
</del><ins>+    virtual WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() = 0;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessUserInterfaceLayoutDirectionh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/UserInterfaceLayoutDirection.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/UserInterfaceLayoutDirection.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/UserInterfaceLayoutDirection.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -1,35 +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:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * 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 APPLE INC. OR ITS 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.
- */
-
-#ifndef UserInterfaceLayoutDirection_h
-#define UserInterfaceLayoutDirection_h
-
-namespace WebKit {
-
-enum class UserInterfaceLayoutDirection { LTR, RTL };
-
-} // namespace WebKit
-
-#endif // UserInterfaceLayoutDirection_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -6307,12 +6307,12 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::SetResourceCachingDisabled(disabled), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-UserInterfaceLayoutDirection WebPageProxy::userInterfaceLayoutDirection()
</del><ins>+WebCore::UserInterfaceLayoutDirection WebPageProxy::userInterfaceLayoutDirection()
</ins><span class="cx"> {
</span><span class="cx">     return m_pageClient.userInterfaceLayoutDirection();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection)
</del><ins>+void WebPageProxy::setUserInterfaceLayoutDirection(WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -44,7 +44,6 @@
</span><span class="cx"> #include &quot;ProcessThrottler.h&quot;
</span><span class="cx"> #include &quot;SandboxExtension.h&quot;
</span><span class="cx"> #include &quot;ShareableBitmap.h&quot;
</span><del>-#include &quot;UserInterfaceLayoutDirection.h&quot;
</del><span class="cx"> #include &quot;UserMediaPermissionRequestManagerProxy.h&quot;
</span><span class="cx"> #include &quot;VisibleContentRectUpdateInfo.h&quot;
</span><span class="cx"> #include &quot;WKBase.h&quot;
</span><span class="lines">@@ -73,6 +72,7 @@
</span><span class="cx"> #include &lt;WebCore/SearchPopupMenu.h&gt;
</span><span class="cx"> #include &lt;WebCore/TextChecking.h&gt;
</span><span class="cx"> #include &lt;WebCore/TextGranularity.h&gt;
</span><ins>+#include &lt;WebCore/UserInterfaceLayoutDirection.h&gt;
</ins><span class="cx"> #include &lt;WebCore/ViewState.h&gt;
</span><span class="cx"> #include &lt;WebCore/VisibleSelection.h&gt;
</span><span class="cx"> #include &lt;memory&gt;
</span><span class="lines">@@ -1111,8 +1111,8 @@
</span><span class="cx">     bool isResourceCachingDisabled() const { return m_isResourceCachingDisabled; }
</span><span class="cx">     void setResourceCachingDisabled(bool);
</span><span class="cx"> 
</span><del>-    UserInterfaceLayoutDirection userInterfaceLayoutDirection();
-    void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection);
</del><ins>+    WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection();
+    void setUserInterfaceLayoutDirection(WebCore::UserInterfaceLayoutDirection);
</ins><span class="cx"> 
</span><span class="cx">     bool hasHadSelectionChangesFromUserInteraction() const { return m_hasHadSelectionChangesFromUserInteraction; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/WebView.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/WebView.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/efl/WebView.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -262,7 +262,7 @@
</span><span class="cx">     void beganExitFullScreen(const WebCore::IntRect&amp;, const WebCore::IntRect&amp;) override { }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    UserInterfaceLayoutDirection userInterfaceLayoutDirection() override { return UserInterfaceLayoutDirection::LTR; }
</del><ins>+    WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() override { return WebCore::UserInterfaceLayoutDirection::LTR; }
</ins><span class="cx"> 
</span><span class="cx">     EwkView* m_ewkView;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx"> 
</span><span class="cx">     void didRestoreScrollPosition() override;
</span><span class="cx"> 
</span><del>-    UserInterfaceLayoutDirection userInterfaceLayoutDirection() override;
</del><ins>+    WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() override;
</ins><span class="cx"> 
</span><span class="cx">     WKContentView *m_contentView;
</span><span class="cx">     WKWebView *m_webView;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -740,11 +740,11 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-UserInterfaceLayoutDirection PageClientImpl::userInterfaceLayoutDirection()
</del><ins>+WebCore::UserInterfaceLayoutDirection PageClientImpl::userInterfaceLayoutDirection()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_webView)
</span><del>-        return UserInterfaceLayoutDirection::LTR;
-    return ([UIView userInterfaceLayoutDirectionForSemanticContentAttribute:[m_webView semanticContentAttribute]] == UIUserInterfaceLayoutDirectionLeftToRight) ? UserInterfaceLayoutDirection::LTR : UserInterfaceLayoutDirection::RTL;
</del><ins>+        return WebCore::UserInterfaceLayoutDirection::LTR;
+    return ([UIView userInterfaceLayoutDirectionForSemanticContentAttribute:[m_webView semanticContentAttribute]] == UIUserInterfaceLayoutDirectionLeftToRight) ? WebCore::UserInterfaceLayoutDirection::LTR : WebCore::UserInterfaceLayoutDirection::RTL;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx">     void startWindowDrag() override;
</span><span class="cx">     NSWindow *platformWindow() override;
</span><span class="cx"> 
</span><del>-    UserInterfaceLayoutDirection userInterfaceLayoutDirection() override;
</del><ins>+    WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() override;
</ins><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">     NSView *inspectorAttachmentView() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -840,11 +840,11 @@
</span><span class="cx">     return m_impl-&gt;windowIsFrontWindowUnderMouse(event.nativeEvent());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-UserInterfaceLayoutDirection PageClientImpl::userInterfaceLayoutDirection()
</del><ins>+WebCore::UserInterfaceLayoutDirection PageClientImpl::userInterfaceLayoutDirection()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_view)
</span><del>-        return UserInterfaceLayoutDirection::LTR;
-    return (m_view.userInterfaceLayoutDirection == NSUserInterfaceLayoutDirectionLeftToRight) ? UserInterfaceLayoutDirection::LTR : UserInterfaceLayoutDirection::RTL;
</del><ins>+        return WebCore::UserInterfaceLayoutDirection::LTR;
+    return (m_view.userInterfaceLayoutDirection == NSUserInterfaceLayoutDirectionLeftToRight) ? WebCore::UserInterfaceLayoutDirection::LTR : WebCore::UserInterfaceLayoutDirection::RTL;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacViewGestureControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #import &quot;FrameLoadState.h&quot;
</span><span class="cx"> #import &quot;Logging.h&quot;
</span><span class="cx"> #import &quot;NativeWebWheelEvent.h&quot;
</span><del>-#import &quot;UserInterfaceLayoutDirection.h&quot;
</del><span class="cx"> #import &quot;ViewGestureControllerMessages.h&quot;
</span><span class="cx"> #import &quot;ViewGestureGeometryCollectorMessages.h&quot;
</span><span class="cx"> #import &quot;ViewSnapshotStore.h&quot;
</span><span class="lines">@@ -300,7 +299,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool willSwipeBack = false;
</span><span class="cx">     bool willSwipeForward = false;
</span><del>-    if (m_webPageProxy.userInterfaceLayoutDirection() == UserInterfaceLayoutDirection::LTR) {
</del><ins>+    if (m_webPageProxy.userInterfaceLayoutDirection() == WebCore::UserInterfaceLayoutDirection::LTR) {
</ins><span class="cx">         willSwipeBack = event.scrollingDeltaX &gt; 0 &amp;&amp; isPinnedToLeft &amp;&amp; m_webPageProxy.backForwardList().backItem();
</span><span class="cx">         willSwipeForward = event.scrollingDeltaX &lt; 0 &amp;&amp; isPinnedToRight &amp;&amp; m_webPageProxy.backForwardList().forwardItem();
</span><span class="cx">     } else {
</span><span class="lines">@@ -678,7 +677,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool ViewGestureController::isPhysicallySwipingLeft(SwipeDirection direction) const
</span><span class="cx"> {
</span><del>-    bool isLTR = m_webPageProxy.userInterfaceLayoutDirection() == UserInterfaceLayoutDirection::LTR;
</del><ins>+    bool isLTR = m_webPageProxy.userInterfaceLayoutDirection() == WebCore::UserInterfaceLayoutDirection::LTR;
</ins><span class="cx">     bool isSwipingForward = direction == SwipeDirection::Forward;
</span><span class="cx">     return isLTR != isSwipingForward;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -464,6 +464,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_page-&gt;setGroupName(m_pageGroup-&gt;identifier());
</span><span class="cx">     m_page-&gt;setDeviceScaleFactor(parameters.deviceScaleFactor);
</span><ins>+    m_page-&gt;setUserInterfaceLayoutDirection(m_userInterfaceLayoutDirection);
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     m_page-&gt;setTextAutosizingWidth(parameters.textAutosizingWidth);
</span><span class="cx"> #endif
</span><span class="lines">@@ -5371,7 +5372,8 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::setUserInterfaceLayoutDirection(uint32_t direction)
</span><span class="cx"> {
</span><del>-    m_userInterfaceLayoutDirection = static_cast&lt;UserInterfaceLayoutDirection&gt;(direction);
</del><ins>+    m_userInterfaceLayoutDirection = static_cast&lt;WebCore::UserInterfaceLayoutDirection&gt;(direction);
+    m_page-&gt;setUserInterfaceLayoutDirection(m_userInterfaceLayoutDirection);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx"> #include &quot;SandboxExtension.h&quot;
</span><span class="cx"> #include &quot;ShareableBitmap.h&quot;
</span><span class="cx"> #include &quot;UserData.h&quot;
</span><del>-#include &quot;UserInterfaceLayoutDirection.h&quot;
</del><span class="cx"> #include &quot;UserMediaPermissionRequestManager.h&quot;
</span><span class="cx"> #include &lt;WebCore/DictationAlternative.h&gt;
</span><span class="cx"> #include &lt;WebCore/DictionaryPopupInfo.h&gt;
</span><span class="lines">@@ -66,6 +65,7 @@
</span><span class="cx"> #include &lt;WebCore/TextIndicator.h&gt;
</span><span class="cx"> #include &lt;WebCore/UserActivity.h&gt;
</span><span class="cx"> #include &lt;WebCore/UserContentTypes.h&gt;
</span><ins>+#include &lt;WebCore/UserInterfaceLayoutDirection.h&gt;
</ins><span class="cx"> #include &lt;WebCore/UserScriptTypes.h&gt;
</span><span class="cx"> #include &lt;WebCore/ViewState.h&gt;
</span><span class="cx"> #include &lt;WebCore/ViewportConfiguration.h&gt;
</span><span class="lines">@@ -1470,7 +1470,7 @@
</span><span class="cx">     std::chrono::system_clock::time_point m_loadCommitTime;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    UserInterfaceLayoutDirection m_userInterfaceLayoutDirection { UserInterfaceLayoutDirection::LTR };
</del><ins>+    WebCore::UserInterfaceLayoutDirection m_userInterfaceLayoutDirection { WebCore::UserInterfaceLayoutDirection::LTR };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (202182 => 202183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2016-06-17 21:46:20 UTC (rev 202182)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2016-06-17 22:24:52 UTC (rev 202183)
</span><span class="lines">@@ -551,13 +551,13 @@
</span><span class="cx">     else if (selector == &quot;moveWordLeft:&quot;)
</span><span class="cx">         didPerformAction = scroll(m_page.get(), ScrollLeft, ScrollByPage);
</span><span class="cx">     else if (selector == &quot;moveToLeftEndOfLine:&quot;)
</span><del>-        didPerformAction = m_userInterfaceLayoutDirection == UserInterfaceLayoutDirection::LTR ? m_page-&gt;backForward().goBack() : m_page-&gt;backForward().goForward();
</del><ins>+        didPerformAction = m_userInterfaceLayoutDirection == WebCore::UserInterfaceLayoutDirection::LTR ? m_page-&gt;backForward().goBack() : m_page-&gt;backForward().goForward();
</ins><span class="cx">     else if (selector == &quot;moveRight:&quot;)
</span><span class="cx">         didPerformAction = scroll(m_page.get(), ScrollRight, ScrollByLine);
</span><span class="cx">     else if (selector == &quot;moveWordRight:&quot;)
</span><span class="cx">         didPerformAction = scroll(m_page.get(), ScrollRight, ScrollByPage);
</span><span class="cx">     else if (selector == &quot;moveToRightEndOfLine:&quot;)
</span><del>-        didPerformAction = m_userInterfaceLayoutDirection == UserInterfaceLayoutDirection::LTR ? m_page-&gt;backForward().goForward() : m_page-&gt;backForward().goBack();
</del><ins>+        didPerformAction = m_userInterfaceLayoutDirection == WebCore::UserInterfaceLayoutDirection::LTR ? m_page-&gt;backForward().goForward() : m_page-&gt;backForward().goBack();
</ins><span class="cx"> 
</span><span class="cx">     return didPerformAction;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>