Bug 971956 - [Australis] fix styling of items in widget overflow list, r=mconley, a=sledru.
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 11 Mar 2014 20:13:55 -0400
changeset 177475 0d08a9e56086fbd731af92db1b8f1adc63659e44
parent 177474 7040d27132bc2bfe279a93f789861e4265d2fe07
child 177476 45108d8e898756db6fe3fa5e6b9431a49bd02217
push id5390
push usermconley@mozilla.com
push dateWed, 12 Mar 2014 00:29:21 +0000
treeherdermozilla-aurora@a04183bb3284 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, sledru
bugs971956
milestone29.0a2
Bug 971956 - [Australis] fix styling of items in widget overflow list, r=mconley, a=sledru.
browser/base/content/browser-places.js
browser/base/content/browser.xul
browser/themes/linux/browser.css
browser/themes/osx/browser.css
browser/themes/shared/customizableui/panelUIOverlay.inc.css
browser/themes/windows/browser.css
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -920,17 +920,16 @@ let PlacesToolbarHelper = {
     }
     let shouldWrapNow = this._getShouldWrap();
     if (this._shouldWrap != shouldWrapNow) {
       if (shouldWrapNow) {
         placeholder.setAttribute("wrap", "true");
       } else {
         placeholder.removeAttribute("wrap");
       }
-      placeholder.classList.toggle("toolbarbutton-1", shouldWrapNow);
       this._shouldWrap = shouldWrapNow;
     }
   },
 
   customizeDone: function PTH_customizeDone() {
     this._isCustomizing = false;
     this.init(true);
   },
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -923,16 +923,17 @@
              collapsed="true"
              customizable="true">
       <toolbaritem id="personal-bookmarks"
                    flex="1"
                    title="&bookmarksToolbarItem.label;"
                    cui-areatype="toolbar"
                    removable="true">
         <toolbarbutton id="bookmarks-toolbar-placeholder"
+                       class="toolbarbutton-1"
                        mousethrough="never"
                        label="&bookmarksToolbarItem.label;"
                        oncommand="PlacesToolbarHelper.onPlaceholderCommand();"/>
         <hbox flex="1"
               id="PlacesToolbar"
               context="placesContext"
               onclick="BookmarksEventHandler.onClick(event, this._placesView);"
               oncommand="BookmarksEventHandler.onCommand(event, this._placesView);"
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -76,17 +76,17 @@
 
 #urlbar:-moz-lwtheme:not([focused="true"]),
 .searchbar-textbox:-moz-lwtheme:not([focused="true"]) {
   opacity: .85;
 }
 
 /* Places toolbar */
 toolbarbutton.bookmark-item,
-#personal-bookmarks[cui-areatype="toolbar"] > #bookmarks-toolbar-placeholder {
+#personal-bookmarks[cui-areatype="toolbar"]:not([overflowedItem=true]) > #bookmarks-toolbar-placeholder {
   margin: 0;
   padding: 2px 3px;
 }
 
 toolbarbutton.bookmark-item:hover:active,
 toolbarbutton.bookmark-item[open="true"] {
   padding-top: 3px;
   padding-bottom: 1px;
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -155,25 +155,29 @@ toolbarbutton.chevron:-moz-locale-dir(rt
   toolbarbutton.chevron > .toolbarbutton-icon {
     width: 13px;
   }
 }
 
 /* ----- BOOKMARK BUTTONS ----- */
 
 toolbarbutton.bookmark-item:not(.subviewbutton):not(#bookmarks-menu-button),
-#personal-bookmarks[cui-areatype="toolbar"] > #bookmarks-toolbar-placeholder {
+#personal-bookmarks[cui-areatype="toolbar"]:not([overflowedItem=true]) > #bookmarks-toolbar-placeholder {
   font-weight: bold;
   color: #222;
   border: 0;
   border-radius: 10000px;
   padding: 1px 8px;
   margin: 0 0 1px;
 }
 
+#personal-bookmarks[cui-areatype="toolbar"]:not([overflowedItem=true]) > #bookmarks-toolbar-placeholder {
+  -moz-box-orient: horizontal;
+}
+
 .bookmark-item > .toolbarbutton-menu-dropmarker {
   list-style-image: url("chrome://browser/skin/places/folderDropArrow.png");
   -moz-image-region: rect(0, 7px, 5px, 0);
   margin-top: 1px;
   -moz-margin-start: 3px;
   -moz-margin-end: -2px;
 }
 
@@ -232,17 +236,17 @@ toolbarbutton.bookmark-item > menupopup 
 #personal-bookmarks[cui-areatype="toolbar"] > #bookmarks-toolbar-placeholder > .toolbarbutton-icon {
   width: 16px;
   min-height: 16px;
   max-height: 16px;
 }
 
 .bookmark-item > .toolbarbutton-icon[label]:not([label=""]),
 .bookmark-item > .toolbarbutton-icon[type="menu"],
-#personal-bookmarks[cui-areatype="toolbar"] > #bookmarks-toolbar-placeholder > .toolbarbutton-icon[label]:not([label=""]) {
+#personal-bookmarks[cui-areatype="toolbar"]:not([overflowedItem=true]) > #bookmarks-toolbar-placeholder > .toolbarbutton-icon[label]:not([label=""]) {
   -moz-margin-end: 5px;
 }
 
 .bookmark-item[container] {
   list-style-image: url("chrome://global/skin/tree/folder.png");
 }
 
 .bookmark-item[container][livemark] {
--- a/browser/themes/shared/customizableui/panelUIOverlay.inc.css
+++ b/browser/themes/shared/customizableui/panelUIOverlay.inc.css
@@ -324,16 +324,24 @@ toolbaritem[cui-areatype="menu-panel"][s
   */
   margin: 4px calc(@menuPanelButtonWidth@ / 2 - 23px);
 }
 
 toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
   -moz-box-flex: 1;
 }
 
+#personal-bookmarks[overflowedItem=true] > #bookmarks-toolbar-placeholder {
+  -moz-box-flex: 1;
+}
+
+#personal-bookmarks[cui-areatype="toolbar"][overflowedItem=true] > #bookmarks-toolbar-placeholder > .toolbarbutton-icon {
+  -moz-margin-end: 2px;
+}
+
 #edit-controls@inAnyPanel@ > #copy-button,
 #zoom-controls@inAnyPanel@ > #zoom-reset-button {
   border-left: none;
   border-right: none;
   border-radius: 0;
 }
 
 #zoom-in-button > .toolbarbutton-text,
@@ -835,32 +843,32 @@ toolbarpaletteitem[place="palette"] > #s
 
 #widget-overflow-list {
   width: @menuPanelWidth@;
   padding-left: 10px;
   padding-right: 10px;
 }
 
 toolbaritem[overflowedItem=true],
-toolbarbutton[overflowedItem=true] {
+.widget-overflow-list .toolbarbutton-1 {
   width: 100%;
   max-width: @menuPanelWidth@;
   min-height: 36px;
   background-repeat: no-repeat;
   background-position: 0 center;
 }
 
-#widget-overflow-list > toolbarbutton,
-#widget-overflow-list > toolbarbutton > toolbarbutton {
+.widget-overflow-list .toolbarbutton-1,
+.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-button {
   -moz-box-align: center;
   -moz-box-orient: horizontal;
 }
 
-#widget-overflow-list > toolbarbutton > .toolbarbutton-text,
-#widget-overflow-list > #bookmarks-menu-button > toolbarbutton > .toolbarbutton-text {
+.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-text,
+.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-text {
   text-align: start;
   -moz-padding-start: .5em;
 }
 
 #widget-overflow-list > .toolbaritem-combined-buttons {
   min-height: 28px;
 }
 
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -275,17 +275,17 @@
   #titlebar-min {
     -moz-margin-end: 2px;
   }
 }
 
 /* ::::: bookmark buttons ::::: */
 
 toolbarbutton.bookmark-item,
-#personal-bookmarks[cui-areatype="toolbar"] > #bookmarks-toolbar-placeholder {
+#personal-bookmarks[cui-areatype="toolbar"]:not([overflowedItem=true]) > #bookmarks-toolbar-placeholder {
   margin: 0;
   padding: 2px 3px;
 }
 
 toolbarbutton.bookmark-item:hover:active:not([disabled="true"]),
 toolbarbutton.bookmark-item[open="true"] {
   padding-top: 3px;
   padding-bottom: 1px;