Web Inspector: RTL: inherit system layout direction by default
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Apr 2017 23:44:56 +0000 (23:44 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Apr 2017 23:44:56 +0000 (23:44 +0000)
commitf4ba244597b79c7dfa9072039e6a1600678f529d
treed10d5b050ecdd8538bed08ed7db024e7dfdccc18
parent1e6bd5055730f2b1c3d1e270d33f9cf2f043c027
Web Inspector: RTL: inherit system layout direction by default
https://bugs.webkit.org/show_bug.cgi?id=171402
<rdar://problem/30753626>

Reviewed by Joseph Pecoraro.

Web Inspector's layout direction should follow the system layout direction
by default now that most RTL bugs seem to be fixed. We are ready for more
feedback.

* UserInterface/Base/Main.js:
* UserInterface/Base/Setting.js:
Rename the existing "layout-direction" setting so that the new default
value is set properly even for people who have overridden the layout
direction while the setting was exposed to everyone.

* UserInterface/Views/GeneralSettingsView.js:
(WebInspector.GeneralSettingsView.prototype.initialLayout):
(WebInspector.GeneralSettingsView.prototype.layout):
(WebInspector.GeneralSettingsView):
Make the layout direction override setting only visible when DebugUI
is turned on. This remains only for engineers to quickly check layout bugs.

* UserInterface/Views/SettingsView.js:
(WebInspector.SettingsView.prototype.addGroupWithCustomSetting):
(WebInspector.SettingsView.prototype.addCustomSetting): Deleted.
Refactor the convenience method to return both the group and the
custom setting. This allows us to toggle .hidden on the entire
row for the Layout Direction setting (label and editor).

* Localizations/en.lproj/localizedStrings.js:
Unlocalize the setting strings since they are only shown in engineering builds now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Base/Setting.js
Source/WebInspectorUI/UserInterface/Views/GeneralSettingsView.js
Source/WebInspectorUI/UserInterface/Views/SettingsView.js