Web Inspector: RTL: Sidebar borders are on the wrong side
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2017 23:09:26 +0000 (23:09 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2017 23:09:26 +0000 (23:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=168743

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-02-22
Reviewed by Matt Baker.

* UserInterface/Views/Sidebar.css:
(body[dir=ltr] .sidebar.right > .resizer, body[dir=rtl] .sidebar.left > .resizer):
(body[dir=ltr] .sidebar.left > .resizer, body[dir=rtl] .sidebar.right > .resizer):
(body[dir=ltr] .sidebar.left, body[dir=rtl] .sidebar.right):
(body[dir=ltr] .sidebar.right, body[dir=rtl] .sidebar.left):
(.sidebar.right > .resizer): Deleted.
(.sidebar.left > .resizer): Deleted.
(.sidebar.left): Deleted.
(.sidebar.right): Deleted.

* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.resizerDragging):
Reverse the change if the direction is RTL.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212855 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/Sidebar.css
Source/WebInspectorUI/UserInterface/Views/Sidebar.js

index 121646c..a2e497a 100644 (file)
@@ -1,3 +1,24 @@
+2017-02-22  Devin Rousso  <dcrousso+webkit@gmail.com>
+
+        Web Inspector: RTL: Sidebar borders are on the wrong side
+        https://bugs.webkit.org/show_bug.cgi?id=168743
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/Sidebar.css:
+        (body[dir=ltr] .sidebar.right > .resizer, body[dir=rtl] .sidebar.left > .resizer):
+        (body[dir=ltr] .sidebar.left > .resizer, body[dir=rtl] .sidebar.right > .resizer):
+        (body[dir=ltr] .sidebar.left, body[dir=rtl] .sidebar.right):
+        (body[dir=ltr] .sidebar.right, body[dir=rtl] .sidebar.left):
+        (.sidebar.right > .resizer): Deleted.
+        (.sidebar.left > .resizer): Deleted.
+        (.sidebar.left): Deleted.
+        (.sidebar.right): Deleted.
+
+        * UserInterface/Views/Sidebar.js:
+        (WebInspector.Sidebar.prototype.resizerDragging):
+        Reverse the change if the direction is RTL.
+
 2017-02-22  Brian Burg  <bburg@apple.com>
 
         Web Inspector: RTL: Settings tab labels need adjustment
index 235fc07..d4489af 100644 (file)
     display: block;
 }
 
-.sidebar.right > .resizer {
+body[dir=ltr] .sidebar.right > .resizer,
+body[dir=rtl] .sidebar.left > .resizer {
     left: -3px;
 }
 
-.sidebar.left > .resizer {
+body[dir=ltr] .sidebar.left > .resizer,
+body[dir=rtl] .sidebar.right > .resizer {
     right: -3px;
 }
 
     display: none;
 }
 
-.sidebar.left {
+body[dir=ltr] .sidebar.left,
+body[dir=rtl] .sidebar.right {
     border-right: 1px solid var(--border-color);
 }
 
-.sidebar.right {
+body[dir=ltr] .sidebar.right,
+body[dir=rtl] .sidebar.left {
     border-left: 1px solid var(--border-color);
 }
index 6071fa6..cda2daa 100644 (file)
@@ -254,6 +254,9 @@ WebInspector.Sidebar = class Sidebar extends WebInspector.View
         if (this._side === WebInspector.Sidebar.Sides.Left)
             positionDelta *= -1;
 
+        if (WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL)
+            positionDelta *= -1;
+
         var newWidth = positionDelta + this._widthBeforeResize;
         this.width = newWidth;
         this.collapsed = (newWidth < (this.minimumWidth / 2));