Title: [213205] trunk/Source/WebInspectorUI
Revision
213205
Author
commit-qu...@webkit.org
Date
2017-02-28 21:29:32 -0800 (Tue, 28 Feb 2017)

Log Message

Web Inspector: RTL: expose the Layout Direction setting in Production builds, keep using LTR by default
https://bugs.webkit.org/show_bug.cgi?id=168999

Patch by Devin Rousso <dcrousso+web...@gmail.com> on 2017-02-28
Reviewed by Brian Burg.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.prototype.layout):
Remove the WebInspector.isDebugUIEnabled() check around the Layout Direction setting.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (213204 => 213205)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-03-01 03:55:41 UTC (rev 213204)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-03-01 05:29:32 UTC (rev 213205)
@@ -1,5 +1,17 @@
 2017-02-28  Devin Rousso  <dcrousso+web...@gmail.com>
 
+        Web Inspector: RTL: expose the Layout Direction setting in Production builds, keep using LTR by default
+        https://bugs.webkit.org/show_bug.cgi?id=168999
+
+        Reviewed by Brian Burg.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Views/SettingsTabContentView.js:
+        (WebInspector.SettingsTabContentView.prototype.layout):
+        Remove the WebInspector.isDebugUIEnabled() check around the Layout Direction setting.
+
+2017-02-28  Devin Rousso  <dcrousso+web...@gmail.com>
+
         Web Inspector: It is possible to get the New Tab button in addition to the seven expected tabs
         https://bugs.webkit.org/show_bug.cgi?id=168976
 

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (213204 => 213205)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2017-03-01 03:55:41 UTC (rev 213204)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2017-03-01 05:29:32 UTC (rev 213205)
@@ -456,8 +456,10 @@
 localizedStrings["Layers"] = "Layers";
 localizedStrings["Layout"] = "Layout";
 localizedStrings["Layout & Rendering"] = "Layout & Rendering";
+localizedStrings["Layout Direction:"] = "Layout Direction:";
 localizedStrings["Layout Invalidated"] = "Layout Invalidated";
 localizedStrings["Left"] = "Left";
+localizedStrings["Left to Right (LTR)"] = "Left to Right (LTR)";
 localizedStrings["Letter"] = "Letter";
 localizedStrings["Ligatures"] = "Ligatures";
 localizedStrings["Line %d"] = "Line %d";
@@ -650,6 +652,7 @@
 localizedStrings["Reveal in Original Resource"] = "Reveal in Original Resource";
 localizedStrings["Reveal in Resources Tab"] = "Reveal in Resources Tab";
 localizedStrings["Right"] = "Right";
+localizedStrings["Right to Left (RTL)"] = "Right to Left (RTL)";
 localizedStrings["Role"] = "Role";
 localizedStrings["Rule"] = "Rule";
 localizedStrings["Samples"] = "Samples";
@@ -762,6 +765,7 @@
 localizedStrings["Styles \u2014 Visual"] = "Styles \u2014 Visual";
 localizedStrings["Stylesheet"] = "Stylesheet";
 localizedStrings["Stylesheets"] = "Stylesheets";
+localizedStrings["System Default"] = "System Default";
 localizedStrings["Tab width:"] = "Tab width:";
 localizedStrings["Tabs"] = "Tabs";
 localizedStrings["Take snapshot"] = "Take snapshot";

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js (213204 => 213205)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js	2017-03-01 03:55:41 UTC (rev 213204)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js	2017-03-01 05:29:32 UTC (rev 213205)
@@ -191,30 +191,28 @@
             });
         });
 
-        if (WebInspector.isDebugUIEnabled()) {
-            this.element.appendChild(document.createElement("br"));
+        this.element.appendChild(document.createElement("br"));
 
-            createContainer(WebInspector.unlocalizedString("Layout Direction:"), (valueControllerContainer) => {
-                let selectElement = valueControllerContainer.appendChild(document.createElement("select"));
-                selectElement.addEventListener("change", (event) => {
-                    WebInspector.setLayoutDirection(selectElement.value);
-                });
+        createContainer(WebInspector.UIString("Layout Direction:"), (valueControllerContainer) => {
+            let selectElement = valueControllerContainer.appendChild(document.createElement("select"));
+            selectElement.addEventListener("change", (event) => {
+                WebInspector.setLayoutDirection(selectElement.value);
+            });
 
-                let currentLayoutDirection = WebInspector.settings.layoutDirection.value;
-                let options = new Map([
-                    [WebInspector.LayoutDirection.System, WebInspector.unlocalizedString("System Default")],
-                    [WebInspector.LayoutDirection.LTR, WebInspector.unlocalizedString("Left to Right (LTR)")],
-                    [WebInspector.LayoutDirection.RTL, WebInspector.unlocalizedString("Right to Left (RTL)")],
-                ]);
+            let currentLayoutDirection = WebInspector.settings.layoutDirection.value;
+            let options = new Map([
+                [WebInspector.LayoutDirection.System, WebInspector.UIString("System Default")],
+                [WebInspector.LayoutDirection.LTR, WebInspector.UIString("Left to Right (LTR)")],
+                [WebInspector.LayoutDirection.RTL, WebInspector.UIString("Right to Left (RTL)")],
+            ]);
 
-                for (let [key, value] of options) {
-                    let optionElement = selectElement.appendChild(document.createElement("option"));
-                    optionElement.value = key;
-                    optionElement.textContent = value;
-                    optionElement.selected = currentLayoutDirection === key;
-                }
-            });
-        }
+            for (let [key, value] of options) {
+                let optionElement = selectElement.appendChild(document.createElement("option"));
+                optionElement.value = key;
+                optionElement.textContent = value;
+                optionElement.selected = currentLayoutDirection === key;
+            }
+        });
     }
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to