Modified: trunk/Source/WebInspectorUI/ChangeLog (212694 => 212695)
--- trunk/Source/WebInspectorUI/ChangeLog 2017-02-21 02:23:39 UTC (rev 212694)
+++ trunk/Source/WebInspectorUI/ChangeLog 2017-02-21 02:32:38 UTC (rev 212695)
@@ -1,5 +1,28 @@
2017-02-20 Brian Burg <[email protected]>
+ Web Inspector: RTL: back/forward navigation buttons should not be flipped
+ https://bugs.webkit.org/show_bug.cgi?id=168275
+ <rdar://problem/30506897>
+
+ Reviewed by Matt Baker.
+
+ The leading button is always "back" and the trailing button is always "forward", but
+ in RTL the icons are swapped so that it still looks like '< >' from left-to-right.
+
+ Rename the two arrows in the SVG to "left" and "right" arrows, and use them appropriately
+ in ContentBrowser for back-forward icons based on the layout direction.
+
+ * UserInterface/Images/BackForwardArrows.svg:
+ * UserInterface/Views/ContentBrowser.js:
+ (WebInspector.ContentBrowser):
+ * UserInterface/Views/FindBanner.css:
+ (.find-banner > button.segmented.left > .glyph):
+ (.find-banner > button.segmented.left:active:not(:disabled) > .glyph):
+ (.find-banner > button.segmented.right > .glyph):
+ (.find-banner > button.segmented.right:active:not(:disabled) > .glyph):
+
+2017-02-20 Brian Burg <[email protected]>
+
Web Inspector: RTL: hierarchical path components need spacing and icon adjustments
https://bugs.webkit.org/show_bug.cgi?id=168581
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/BackForwardArrows.svg (212694 => 212695)
--- trunk/Source/WebInspectorUI/UserInterface/Images/BackForwardArrows.svg 2017-02-21 02:23:39 UTC (rev 212694)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/BackForwardArrows.svg 2017-02-21 02:32:38 UTC (rev 212695)
@@ -20,15 +20,15 @@
</style>
<defs>
- <symbol id="back-arrow-symbol" viewBox="0 0 10 16"><path fill="inherit" d="M 3.20540064 7.75983283 L 9.3448 1.6244 L 7.7388 0.0174 L -0.0002 7.7514 L 0.0091993759 7.76080523 L 0.0018 7.7682 L 7.7358 15.5072 L 9.3428 13.9012 L 3.20540064 7.75983283 Z"/></symbol>
- <symbol id="forward-arrow-symbol" viewBox="0 0 10 16"><path fill="inherit" d="M 6.13924933 7.75978283 L 0.0018 13.9012 L 1.6088 15.5072 L 9.3428 7.7682 L 9.33545066 7.76085523 L 9.3449 7.7514 L 1.6059 0.0174 L -0.0001 1.6244 L 6.13924933 7.75978283 Z"/></symbol>
+ <symbol id="left-arrow-symbol" viewBox="0 0 10 16"><path fill="inherit" d="M 3.20540064 7.75983283 L 9.3448 1.6244 L 7.7388 0.0174 L -0.0002 7.7514 L 0.0091993759 7.76080523 L 0.0018 7.7682 L 7.7358 15.5072 L 9.3428 13.9012 L 3.20540064 7.75983283 Z"/></symbol>
+ <symbol id="right-arrow-symbol" viewBox="0 0 10 16"><path fill="inherit" d="M 6.13924933 7.75978283 L 0.0018 13.9012 L 1.6088 15.5072 L 9.3428 7.7682 L 9.33545066 7.76085523 L 9.3449 7.7514 L 1.6059 0.0174 L -0.0001 1.6244 L 6.13924933 7.75978283 Z"/></symbol>
</defs>
- <svg id="back-arrow-mask"><use fill="currentColor" xlink:href=""
- <svg id="back-arrow-normal"><use xlink:href=""
- <svg id="back-arrow-active"><use xlink:href=""
+ <svg id="left-arrow-mask"><use fill="currentColor" xlink:href=""
+ <svg id="left-arrow-normal"><use xlink:href=""
+ <svg id="left-arrow-active"><use xlink:href=""
- <svg id="forward-arrow-mask"><use fill="currentColor" xlink:href=""
- <svg id="forward-arrow-normal"><use xlink:href=""
- <svg id="forward-arrow-active"><use xlink:href=""
+ <svg id="right-arrow-mask"><use fill="currentColor" xlink:href=""
+ <svg id="right-arrow-normal"><use xlink:href=""
+ <svg id="right-arrow-active"><use xlink:href=""
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js (212694 => 212695)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js 2017-02-21 02:23:39 UTC (rev 212694)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js 2017-02-21 02:32:38 UTC (rev 212695)
@@ -42,12 +42,17 @@
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);
- this._backButtonNavigationItem = new WebInspector.ButtonNavigationItem("back", WebInspector.UIString("Back (%s)").format(this._backKeyboardShortcut.displayName), "Images/BackForwardArrows.svg#back-arrow-mask", 8, 13);
+ let leftArrow = "Images/BackForwardArrows.svg#left-arrow-mask";
+ let rightArrow = "Images/BackForwardArrows.svg#right-arrow-mask";
+ let backButtonImage = WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL ? rightArrow : leftArrow;
+ let forwardButtonImage = WebInspector.resolvedLayoutDirection() === WebInspector.LayoutDirection.RTL ? leftArrow : rightArrow;
+
+ this._backButtonNavigationItem = new WebInspector.ButtonNavigationItem("back", WebInspector.UIString("Back (%s)").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);
- this._forwardButtonNavigationItem = new WebInspector.ButtonNavigationItem("forward", WebInspector.UIString("Forward (%s)").format(this._forwardKeyboardShortcut.displayName), "Images/BackForwardArrows.svg#forward-arrow-mask", 8, 13);
+ this._forwardButtonNavigationItem = new WebInspector.ButtonNavigationItem("forward", WebInspector.UIString("Forward (%s)").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);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FindBanner.css (212694 => 212695)
--- trunk/Source/WebInspectorUI/UserInterface/Views/FindBanner.css 2017-02-21 02:23:39 UTC (rev 212694)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FindBanner.css 2017-02-21 02:32:38 UTC (rev 212695)
@@ -160,11 +160,11 @@
}
.find-banner > button.segmented.left > .glyph {
- background-image: url(../Images/BackForwardArrows.svg#back-arrow-normal);
+ background-image: url(../Images/BackForwardArrows.svg#left-arrow-normal);
}
.find-banner > button.segmented.left:active:not(:disabled) > .glyph {
- background-image: url(../Images/BackForwardArrows.svg#back-arrow-active);
+ background-image: url(../Images/BackForwardArrows.svg#left-arrow-active);
}
.find-banner > button.segmented.right {
@@ -175,12 +175,12 @@
}
.find-banner > button.segmented.right > .glyph {
- background-image: url(../Images/BackForwardArrows.svg#forward-arrow-normal);
+ background-image: url(../Images/BackForwardArrows.svg#right-arrow-normal);
margin-left: 1px;
}
.find-banner > button.segmented.right:active:not(:disabled) > .glyph {
- background-image: url(../Images/BackForwardArrows.svg#forward-arrow-active);
+ background-image: url(../Images/BackForwardArrows.svg#right-arrow-active);
}
.find-banner > button.segmented {