Web Inspector: RTL: navigation sidebar section disclosure triangles and tree element icons should be aligned right
https://bugs.webkit.org/show_bug.cgi?id=168284

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

* UserInterface/Views/TreeOutline.css:
(.tree-outline,):
(.tree-outline.large .item):
(body[dir=ltr] .tree-outline .item :matches(.disclosure-button, .icon)):
(body[dir=rtl] .tree-outline .item :matches(.disclosure-button, .icon)):
(body[dir=ltr] .tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon):
(body[dir=rtl] .tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon):
(.tree-outline .item .disclosure-button):
(body[dir=rtl] .tree-outline .item .disclosure-button):
(.tree-outline .item .icon):
(body[dir=ltr] .tree-outline .item .icon):
(body[dir=rtl] .tree-outline .item .icon):
(.tree-outline.large .item .icon):
(.tree-outline .item .status):
(body[dir=ltr] .tree-outline .item .status):
(body[dir=rtl] .tree-outline .item .status):
(.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon): Deleted.

* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline._generateStyleRulesIfNeeded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@212910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js
index 34a45e0..e309d44 100644
--- a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js
+++ b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js
@@ -651,7 +651,13 @@
             // Keep all the elements at the same depth once the maximum is reached.
             childrenSubstring += i === maximumTreeDepth ? " .children" : " > .children";
             styleText += `.${WebInspector.TreeOutline.ElementStyleClassName}:not(.${WebInspector.TreeOutline.CustomIndentStyleClassName})${childrenSubstring} > .item { `;
-            styleText += "padding-left: " + (baseLeftPadding + (depthPadding * i)) + "px; }\n";
+
+            if (WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL)
+                styleText += "padding-right: ";
+            else
+                styleText += "padding-left: ";
+
+            styleText += (baseLeftPadding + (depthPadding * i)) + "px; }\n";
         }
 
         WebInspector.TreeOutline._styleElement.textContent = styleText;