Bug 1387843 - Fix & Mirrored Library (Bookmarks & History) icons, on sidebar position changed. r=Gijs
authorjawad <ijawadak@gmail.com>
Mon, 11 Mar 2019 17:19:32 +0000
changeset 521407 7592f919079f
parent 521406 e5897543e5e6
child 521408 16b947cb279a
push id10866
push usernerli@mozilla.com
push dateTue, 12 Mar 2019 18:59:09 +0000
treeherdermozilla-beta@445c24a51727 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1387843
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1387843 - Fix & Mirrored Library (Bookmarks & History) icons, on sidebar position changed. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D22637
browser/components/customizableui/content/panelUI.inc.xul
browser/themes/shared/menupanel.inc.css
--- a/browser/components/customizableui/content/panelUI.inc.xul
+++ b/browser/components/customizableui/content/panelUI.inc.xul
@@ -411,17 +411,19 @@
     </panelview>
     <panelview id="PanelUI-history" flex="1">
       <vbox class="panel-subview-body">
         <toolbarbutton id="appMenuViewHistorySidebar"
                        label="&appMenuHistory.viewSidebar.label;"
                        type="checkbox"
                        class="subviewbutton subviewbutton-iconic"
                        key="key_gotoHistory"
-                       oncommand="SidebarUI.toggle('viewHistorySidebar');"/>
+                       oncommand="SidebarUI.toggle('viewHistorySidebar');">
+                       <observes element="sidebar-box" attribute="positionend"/>
+        </toolbarbutton>
         <toolbarbutton id="appMenuClearRecentHistory"
                        label="&appMenuHistory.clearRecent.label;"
                        class="subviewbutton subviewbutton-iconic"
                        command="Tools:Sanitize"/>
         <toolbarseparator/>
         <toolbarbutton id="appMenuRecentlyClosedTabs"
                        label="&historyUndoMenu.label;"
                        class="subviewbutton subviewbutton-iconic subviewbutton-nav"
@@ -461,17 +463,19 @@
           <vbox id="PanelUI-remotetabs-buttons">
             <toolbarbutton id="PanelUI-remotetabs-view-sidebar"
                            class="subviewbutton subviewbutton-iconic"
                            label="&appMenuRemoteTabs.sidebar.label;"
                            oncommand="SidebarUI.toggle('viewTabsSidebar');"/>
             <toolbarbutton id="PanelUI-remotetabs-view-managedevices"
                            class="subviewbutton subviewbutton-iconic"
                            label="&appMenuRemoteTabs.managedevices.label;"
-                           oncommand="gSync.openDevicesManagementPage('syncedtabs-menupanel');"/>
+                           oncommand="gSync.openDevicesManagementPage('syncedtabs-menupanel');">
+                           <observes element="sidebar-box" attribute="positionend"/>
+            </toolbarbutton>
             <toolbarbutton id="PanelUI-remotetabs-syncnow"
                            onmouseover="gSync.refreshSyncButtonsTooltip();"
                            class="subviewbutton subviewbutton-iconic"
                            oncommand="gSync.doSync();"
                            closemenu="none"/>
             <menuseparator id="PanelUI-remotetabs-separator"/>
           </vbox>
           <deck id="PanelUI-remotetabs-deck">
@@ -720,17 +724,19 @@
                        label-show="&addBookmarksMenu.label;"
                        label-hide="&removeBookmarksMenu.label;"
                        oncommand="BookmarkingUI.toggleMenuButtonInToolbar(this);"/>
         <toolbarbutton id="panelMenu_viewBookmarksSidebar"
                        class="subviewbutton subviewbutton-iconic"
                        label-show="&viewBookmarksSidebar2.label;"
                        label-hide="&hideBookmarksSidebar.label;"
                        key="viewBookmarksSidebarKb"
-                       oncommand="SidebarUI.toggle('viewBookmarksSidebar', this);"/>
+                       oncommand="SidebarUI.toggle('viewBookmarksSidebar', this);">
+                       <observes element="sidebar-box" attribute="positionend"/>
+        </toolbarbutton>
         <toolbarbutton id="panelMenu_viewBookmarksToolbar"
                        class="subviewbutton subviewbutton-iconic"
                        label-show="&viewBookmarksToolbar.label;"
                        label-hide="&hideBookmarksToolbar.label;"
                        oncommand="BookmarkingUI.toggleBookmarksToolbar();"/>
       </vbox>
     </panelview>
   </panelmultiview>
--- a/browser/themes/shared/menupanel.inc.css
+++ b/browser/themes/shared/menupanel.inc.css
@@ -92,16 +92,25 @@
 
 #PanelUI-remotetabs-view-managedevices {
   list-style-image: url("chrome://browser/skin/device-phone.svg");
 }
 
 #appMenuViewHistorySidebar,
 #PanelUI-remotetabs-view-sidebar,
 #panelMenu_viewBookmarksSidebar {
+  list-style-image: url("chrome://browser/skin/sidebars-right.svg");
+}
+
+#appMenuViewHistorySidebar:-moz-locale-dir(ltr):not([positionend]),
+#appMenuViewHistorySidebar:-moz-locale-dir(rtl)[positionend],
+#PanelUI-remotetabs-view-sidebar:-moz-locale-dir(ltr):not([positionend]),
+#PanelUI-remotetabs-view-sidebar:-moz-locale-dir(rtl)[positionend],
+#panelMenu_viewBookmarksSidebar:-moz-locale-dir(ltr):not([positionend]),
+#panelMenu_viewBookmarksSidebar:-moz-locale-dir(rtl)[positionend] {
   list-style-image: url("chrome://browser/skin/sidebars.svg");
 }
 
 #panelMenu_bookmarkingTools {
   list-style-image: url("chrome://browser/skin/developer.svg");
 }
 
 #panelMenu_viewBookmarksToolbar {