<!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>[214514] trunk/Source/WebInspectorUI</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/214514">214514</a></dd>
<dt>Author</dt> <dd>bburg@apple.com</dd>
<dt>Date</dt> <dd>2017-03-28 18:56:16 -0700 (Tue, 28 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: RTL: keyboard shortcuts with directionality need to be flipped (forward/back, etc)
https://bugs.webkit.org/show_bug.cgi?id=165761

Reviewed by Matt Baker.

Original patch by Devin Rousso.

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):
Flip the functionality of keyboard shortcuts when in RTL so that the action of
pressing the left or right arrows/curly braces matches what happens when the
corresponding left or right buttons are clicked.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._keyDown):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._keyDown):
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline.prototype._treeKeyDown):
Flip the Left and Right keyboard shortcuts to expand/collapse the selected item when in RTL.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserjs">trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDataGridjs">trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTabBrowserjs">trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTreeOutlinejs">trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (214513 => 214514)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2017-03-29 01:32:01 UTC (rev 214513)
+++ trunk/Source/WebInspectorUI/ChangeLog        2017-03-29 01:56:16 UTC (rev 214514)
</span><span class="lines">@@ -1,5 +1,30 @@
</span><span class="cx"> 2017-03-28  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: RTL: keyboard shortcuts with directionality need to be flipped (forward/back, etc)
+        https://bugs.webkit.org/show_bug.cgi?id=165761
+
+        Reviewed by Matt Baker.
+
+        Original patch by Devin Rousso.
+
+        * UserInterface/Views/ContentBrowser.js:
+        (WebInspector.ContentBrowser):
+        * UserInterface/Views/TabBrowser.js:
+        (WebInspector.TabBrowser):
+        Flip the functionality of keyboard shortcuts when in RTL so that the action of
+        pressing the left or right arrows/curly braces matches what happens when the
+        corresponding left or right buttons are clicked.
+
+        * UserInterface/Views/DataGrid.js:
+        (WebInspector.DataGrid.prototype._keyDown):
+        * UserInterface/Views/LogContentView.js:
+        (WebInspector.LogContentView.prototype._keyDown):
+        * UserInterface/Views/TreeOutline.js:
+        (WebInspector.TreeOutline.prototype._treeKeyDown):
+        Flip the Left and Right keyboard shortcuts to expand/collapse the selected item when in RTL.
+
+2017-03-28  Brian Burg  &lt;bburg@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: Add &quot;Disable Caches&quot; option that only applies to the inspected page while Web Inspector is open
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=169865
</span><span class="cx">         &lt;rdar://problem/31250573&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js (214513 => 214514)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js        2017-03-29 01:32:01 UTC (rev 214513)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js        2017-03-29 01:56:16 UTC (rev 214514)
</span><span class="lines">@@ -39,23 +39,30 @@
</span><span class="cx">         this.addSubview(this._contentViewContainer);
</span><span class="cx"> 
</span><span class="cx">         if (!disableBackForward) {
</span><del>-            this._backKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Left, this._backButtonClicked.bind(this), this.element);
-            this._forwardKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Right, this._forwardButtonClicked.bind(this), this.element);
</del><ins>+            let isRTL = WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL;
</ins><span class="cx"> 
</span><ins>+            let goBack = () =&gt; { this.goBack(); };
+            let goForward = () =&gt; { this.goForward(); };
+
+            let backShortcutKey = isRTL ? WebInspector.KeyboardShortcut.Key.Right : WebInspector.KeyboardShortcut.Key.Left;
+            let forwardShortcutKey = isRTL ? WebInspector.KeyboardShortcut.Key.Left : WebInspector.KeyboardShortcut.Key.Right;
+            this._backKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, backShortcutKey, goBack, this.element);
+            this._forwardKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, forwardShortcutKey, goForward, this.element);
+
</ins><span class="cx">             let leftArrow = &quot;Images/BackForwardArrows.svg#left-arrow-mask&quot;;
</span><span class="cx">             let rightArrow = &quot;Images/BackForwardArrows.svg#right-arrow-mask&quot;;
</span><del>-            let backButtonImage = WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL ? rightArrow : leftArrow;
-            let forwardButtonImage = WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL ? leftArrow : rightArrow;
</del><ins>+            let backButtonImage = isRTL ? rightArrow : leftArrow;
+            let forwardButtonImage = isRTL ? leftArrow : rightArrow;
</ins><span class="cx"> 
</span><del>-            this._backButtonNavigationItem = new WebInspector.ButtonNavigationItem(&quot;back&quot;, WebInspector.UIString(&quot;Back (%s)&quot;).format(this._backKeyboardShortcut.displayName), backButtonImage, 8, 13);
-            this._backButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._backButtonClicked, this);
-            this._backButtonNavigationItem.enabled = false;
-            this._navigationBar.addNavigationItem(this._backButtonNavigationItem);
</del><ins>+            this._backNavigationItem = new WebInspector.ButtonNavigationItem(&quot;back&quot;, WebInspector.UIString(&quot;Back (%s)&quot;).format(this._backKeyboardShortcut.displayName), backButtonImage, 8, 13);
+            this._backNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, goBack);
+            this._backNavigationItem.enabled = false;
+            this._navigationBar.addNavigationItem(this._backNavigationItem);
</ins><span class="cx"> 
</span><del>-            this._forwardButtonNavigationItem = new WebInspector.ButtonNavigationItem(&quot;forward&quot;, WebInspector.UIString(&quot;Forward (%s)&quot;).format(this._forwardKeyboardShortcut.displayName), forwardButtonImage, 8, 13);
-            this._forwardButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._forwardButtonClicked, this);
-            this._forwardButtonNavigationItem.enabled = false;
-            this._navigationBar.addNavigationItem(this._forwardButtonNavigationItem);
</del><ins>+            this._forwardNavigationItem = new WebInspector.ButtonNavigationItem(&quot;forward&quot;, WebInspector.UIString(&quot;Forward (%s)&quot;).format(this._forwardKeyboardShortcut.displayName), forwardButtonImage, 8, 13);
+            this._forwardNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, goForward);
+            this._forwardNavigationItem.enabled = false;
+            this._navigationBar.addNavigationItem(this._forwardNavigationItem);
</ins><span class="cx"> 
</span><span class="cx">             this._navigationBar.addNavigationItem(new WebInspector.DividerNavigationItem);
</span><span class="cx">         }
</span><span class="lines">@@ -282,16 +289,6 @@
</span><span class="cx"> 
</span><span class="cx">     // Private
</span><span class="cx"> 
</span><del>-    _backButtonClicked(event)
-    {
-        this.goBack();
-    }
-
-    _forwardButtonClicked(event)
-    {
-        this.goForward();
-    }
-
</del><span class="cx">     _findBannerDidShow(event)
</span><span class="cx">     {
</span><span class="cx">         var currentContentView = this.currentContentView;
</span><span class="lines">@@ -363,11 +360,11 @@
</span><span class="cx"> 
</span><span class="cx">     _updateBackForwardButtons()
</span><span class="cx">     {
</span><del>-        if (!this._backButtonNavigationItem || !this._forwardButtonNavigationItem)
</del><ins>+        if (!this._backNavigationItem || !this._forwardNavigationItem)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        this._backButtonNavigationItem.enabled = this.canGoBack();
-        this._forwardButtonNavigationItem.enabled = this.canGoForward();
</del><ins>+        this._backNavigationItem.enabled = this.canGoBack();
+        this._forwardNavigationItem.enabled = this.canGoForward();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _updateContentViewNavigationItems()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDataGridjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (214513 => 214514)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js        2017-03-29 01:32:01 UTC (rev 214513)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js        2017-03-29 01:56:16 UTC (rev 214514)
</span><span class="lines">@@ -1371,6 +1371,8 @@
</span><span class="cx">         if (!this.selectedNode || event.shiftKey || event.metaKey || event.ctrlKey || this._editing)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><ins>+        let isRTL = WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL;
+
</ins><span class="cx">         var handled = false;
</span><span class="cx">         var nextSelectedNode;
</span><span class="cx">         if (event.keyIdentifier === &quot;Up&quot; &amp;&amp; !event.altKey) {
</span><span class="lines">@@ -1383,7 +1385,7 @@
</span><span class="cx">             while (nextSelectedNode &amp;&amp; !nextSelectedNode.selectable)
</span><span class="cx">                 nextSelectedNode = nextSelectedNode.traverseNextNode(true);
</span><span class="cx">             handled = nextSelectedNode ? true : false;
</span><del>-        } else if (event.keyIdentifier === &quot;Left&quot;) {
</del><ins>+        } else if ((!isRTL &amp;&amp; event.keyIdentifier === &quot;Left&quot;) || (isRTL &amp;&amp; event.keyIdentifier === &quot;Right&quot;)) {
</ins><span class="cx">             if (this.selectedNode.expanded) {
</span><span class="cx">                 if (event.altKey)
</span><span class="cx">                     this.selectedNode.collapseRecursively();
</span><span class="lines">@@ -1398,7 +1400,7 @@
</span><span class="cx">                 } else if (this.selectedNode.parent)
</span><span class="cx">                     this.selectedNode.parent.collapse();
</span><span class="cx">             }
</span><del>-        } else if (event.keyIdentifier === &quot;Right&quot;) {
</del><ins>+        } else if ((!isRTL &amp;&amp; event.keyIdentifier === &quot;Right&quot;) || (isRTL &amp;&amp; event.keyIdentifier === &quot;Left&quot;)) {
</ins><span class="cx">             if (!this.selectedNode.revealed) {
</span><span class="cx">                 this.selectedNode.reveal();
</span><span class="cx">                 handled = true;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js (214513 => 214514)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js        2017-03-29 01:32:01 UTC (rev 214513)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js        2017-03-29 01:56:16 UTC (rev 214514)
</span><span class="lines">@@ -737,6 +737,8 @@
</span><span class="cx"> 
</span><span class="cx">     _keyDown(event)
</span><span class="cx">     {
</span><ins>+        let isRTL = WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL;
+
</ins><span class="cx">         if (this._keyboardShortcutCommandA.matchesEvent(event))
</span><span class="cx">             this._commandAWasPressed(event);
</span><span class="cx">         else if (this._keyboardShortcutEsc.matchesEvent(event))
</span><span class="lines">@@ -745,9 +747,9 @@
</span><span class="cx">             this._upArrowWasPressed(event);
</span><span class="cx">         else if (event.keyIdentifier === &quot;Down&quot;)
</span><span class="cx">             this._downArrowWasPressed(event);
</span><del>-        else if (event.keyIdentifier === &quot;Left&quot;)
</del><ins>+        else if ((!isRTL &amp;&amp; event.keyIdentifier === &quot;Left&quot;) || (isRTL &amp;&amp; event.keyIdentifier === &quot;Right&quot;))
</ins><span class="cx">             this._leftArrowWasPressed(event);
</span><del>-        else if (event.keyIdentifier === &quot;Right&quot;)
</del><ins>+        else if ((!isRTL &amp;&amp; event.keyIdentifier === &quot;Right&quot;) || (isRTL &amp;&amp; event.keyIdentifier === &quot;Left&quot;))
</ins><span class="cx">             this._rightArrowWasPressed(event);
</span><span class="cx">         else if (event.keyIdentifier === &quot;Enter&quot; &amp;&amp; event.metaKey)
</span><span class="cx">             this._commandEnterWasPressed(event);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTabBrowserjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js (214513 => 214514)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js        2017-03-29 01:32:01 UTC (rev 214513)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js        2017-03-29 01:56:16 UTC (rev 214514)
</span><span class="lines">@@ -54,16 +54,27 @@
</span><span class="cx">         let showNextTab = () =&gt; { this._showNextTab(); };
</span><span class="cx">         let showPreviousTab = () =&gt; { this._showPreviousTab(); };
</span><span class="cx"> 
</span><del>-        this._showNextTabKeyboardShortcut1 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, WebInspector.KeyboardShortcut.Key.RightCurlyBrace, showNextTab);
-        this._showPreviousTabKeyboardShortcut1 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, WebInspector.KeyboardShortcut.Key.LeftCurlyBrace, showPreviousTab);
-        this._showNextTabKeyboardShortcut2 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Tab, showNextTab);
-        this._showPreviousTabKeyboardShortcut2 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Control | WebInspector.KeyboardShortcut.Modifier.Shift, WebInspector.KeyboardShortcut.Key.Tab, showPreviousTab);
</del><ins>+        let isRTL = WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL;
</ins><span class="cx"> 
</span><del>-        this._showNextTabKeyboardShortcut3 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, WebInspector.KeyboardShortcut.Key.Right, this._showNextTabCheckingForEditableField.bind(this));
-        this._showNextTabKeyboardShortcut3.implicitlyPreventsDefault = false;
-        this._showPreviousTabKeyboardShortcut3 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, WebInspector.KeyboardShortcut.Key.Left, this._showPreviousTabCheckingForEditableField.bind(this));
-        this._showPreviousTabKeyboardShortcut3.implicitlyPreventsDefault = false;
</del><ins>+        let nextKey1 = isRTL ? WebInspector.KeyboardShortcut.Key.LeftCurlyBrace : WebInspector.KeyboardShortcut.Key.RightCurlyBrace;
+        let previousKey1 = isRTL ? WebInspector.KeyboardShortcut.Key.RightCurlyBrace : WebInspector.KeyboardShortcut.Key.LeftCurlyBrace;
</ins><span class="cx"> 
</span><ins>+        this._showNextTabKeyboardShortcut1 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, nextKey1, showNextTab);
+        this._showPreviousTabKeyboardShortcut1 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, previousKey1, showPreviousTab);
+
+        let nextModifier2 = isRTL ? WebInspector.KeyboardShortcut.Modifier.Shift : 0;
+        let previousModifier2 = isRTL ? 0 : WebInspector.KeyboardShortcut.Modifier.Shift;
+
+        this._showNextTabKeyboardShortcut2 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Control | nextModifier2, WebInspector.KeyboardShortcut.Key.Tab, showNextTab);
+        this._showPreviousTabKeyboardShortcut2 = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Control | previousModifier2, WebInspector.KeyboardShortcut.Key.Tab, showPreviousTab);
+
+        let previousTabKey = isRTL ? WebInspector.KeyboardShortcut.Key.Right : WebInspector.KeyboardShortcut.Key.Left;
+        let nextTabKey = isRTL ? WebInspector.KeyboardShortcut.Key.Left : WebInspector.KeyboardShortcut.Key.Right;
+        this._previousTabKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, previousTabKey, this._showPreviousTabCheckingForEditableField.bind(this));
+        this._previousTabKeyboardShortcut.implicitlyPreventsDefault = false;
+        this._nextTabKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, nextTabKey, this._showNextTabCheckingForEditableField.bind(this));
+        this._nextTabKeyboardShortcut.implicitlyPreventsDefault = false;
+
</ins><span class="cx">         this._tabBar.addEventListener(WebInspector.TabBar.Event.TabBarItemSelected, this._tabBarItemSelected, this);
</span><span class="cx">         this._tabBar.addEventListener(WebInspector.TabBar.Event.TabBarItemAdded, this._tabBarItemAdded, this);
</span><span class="cx">         this._tabBar.addEventListener(WebInspector.TabBar.Event.TabBarItemRemoved, this._tabBarItemRemoved, this);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTreeOutlinejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js (214513 => 214514)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js        2017-03-29 01:32:01 UTC (rev 214513)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js        2017-03-29 01:56:16 UTC (rev 214514)
</span><span class="lines">@@ -482,6 +482,8 @@
</span><span class="cx">         if (!this.selectedTreeElement || event.shiftKey || event.metaKey || event.ctrlKey)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><ins>+        let isRTL = WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL;
+
</ins><span class="cx">         var handled = false;
</span><span class="cx">         var nextSelectedElement;
</span><span class="cx">         if (event.keyIdentifier === &quot;Up&quot; &amp;&amp; !event.altKey) {
</span><span class="lines">@@ -494,7 +496,7 @@
</span><span class="cx">             while (nextSelectedElement &amp;&amp; !nextSelectedElement.selectable)
</span><span class="cx">                 nextSelectedElement = nextSelectedElement.traverseNextTreeElement(true);
</span><span class="cx">             handled = nextSelectedElement ? true : false;
</span><del>-        } else if (event.keyIdentifier === &quot;Left&quot;) {
</del><ins>+        } else if ((!isRTL &amp;&amp; event.keyIdentifier === &quot;Left&quot;) || (isRTL &amp;&amp; event.keyIdentifier === &quot;Right&quot;)) {
</ins><span class="cx">             if (this.selectedTreeElement.expanded) {
</span><span class="cx">                 if (event.altKey)
</span><span class="cx">                     this.selectedTreeElement.collapseRecursively();
</span><span class="lines">@@ -511,7 +513,7 @@
</span><span class="cx">                 } else if (this.selectedTreeElement.parent)
</span><span class="cx">                     this.selectedTreeElement.parent.collapse();
</span><span class="cx">             }
</span><del>-        } else if (event.keyIdentifier === &quot;Right&quot;) {
</del><ins>+        } else if ((!isRTL &amp;&amp; event.keyIdentifier === &quot;Right&quot;) || (isRTL &amp;&amp; event.keyIdentifier === &quot;Left&quot;)) {
</ins><span class="cx">             if (!this.selectedTreeElement.revealed()) {
</span><span class="cx">                 this.selectedTreeElement.reveal();
</span><span class="cx">                 handled = true;
</span></span></pre>
</div>
</div>

</body>
</html>