Skip to content

Commit

Permalink
Backed out changeset 99db9921183c (bug 1796940) for bc failures on br…
Browse files Browse the repository at this point in the history
…owser_parsable_css.js. CLOSED TREE
  • Loading branch information
CosminSabou committed Nov 17, 2022
1 parent 2a31521 commit b1b874a
Show file tree
Hide file tree
Showing 17 changed files with 275 additions and 134 deletions.
9 changes: 2 additions & 7 deletions browser/base/content/browser-places.js
Original file line number Diff line number Diff line change
Expand Up @@ -1281,12 +1281,8 @@ var PlacesToolbarHelper = {
submenu.setAttribute("data-l10n-id", "managed-bookmarks-subfolder");
}
submenu.setAttribute("container", "true");
submenu.setAttribute(
"class",
"menu-iconic bookmark-item subviewbutton"
);
submenu.setAttribute("class", "menu-iconic bookmark-item");
let submenupopup = document.createXULElement("menupopup");
submenupopup.setAttribute("placespopup", "true");
submenu.appendChild(submenupopup);
menu.appendChild(submenu);
this.addManagedBookmarks(submenupopup, entry.children);
Expand All @@ -1298,7 +1294,7 @@ var PlacesToolbarHelper = {
menuitem.setAttribute("image", "page-icon:" + preferredURI.spec);
menuitem.setAttribute(
"class",
"menuitem-iconic bookmark-item menuitem-with-favicon subviewbutton"
"menuitem-iconic bookmark-item menuitem-with-favicon"
);
menuitem.link = preferredURI.spec;
menu.appendChild(menuitem);
Expand Down Expand Up @@ -2269,7 +2265,6 @@ var BookmarkingUI = {
is: "places-popup",
});
otherBookmarksPopup.setAttribute("placespopup", "true");
otherBookmarksPopup.setAttribute("type", "arrow");
otherBookmarksPopup.setAttribute("context", "placesContext");
otherBookmarksPopup.id = "OtherBookmarksPopup";

Expand Down
12 changes: 12 additions & 0 deletions browser/base/content/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,18 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > .toolbarbut
display: none;
}

/* Give these menupopups an arrow panel styling */
#BMB_bookmarksPopup,
#PlacesToolbar menupopup {
background: transparent;
border: none;
}

#BMB_bookmarksPopup,
#BMB_bookmarksPopup menupopup {
appearance: none;
}

@media (-moz-panel-animations) and (prefers-reduced-motion: no-preference) {
@media (-moz-platform: macos) {
/* On Mac, use the properties "-moz-window-transform" and "-moz-window-opacity"
Expand Down
1 change: 0 additions & 1 deletion browser/base/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,6 @@ var gBrowserInit = {
);
managedBookmarksPopup.setAttribute("placespopup", "true");
managedBookmarksPopup.setAttribute("is", "places-popup");
managedBookmarksPopup.setAttribute("type", "arrow");
managedBookmarksButton.appendChild(managedBookmarksPopup);

gNavToolbox.palette.appendChild(managedBookmarksButton);
Expand Down
1 change: 0 additions & 1 deletion browser/base/content/navigator-toolbox.inc.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@
<menupopup id="PlacesChevronPopup"
is="places-popup"
placespopup="true"
type="arrow"
tooltip="bhTooltip" popupsinherittooltip="true"
context="placesContext"/>
</toolbarbutton>
Expand Down
2 changes: 2 additions & 0 deletions browser/components/places/content/browserPlacesViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ PlacesViewBase.prototype = {
let type = aPlacesNode.type;
if (type == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR) {
element = document.createXULElement("menuseparator");
element.setAttribute("class", "small-separator");
} else {
if (type == Ci.nsINavHistoryResultNode.RESULT_TYPE_URI) {
element = document.createXULElement("menuitem");
Expand Down Expand Up @@ -2106,6 +2107,7 @@ PlacesPanelMenuView.prototype = {
let button;
if (type == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR) {
button = document.createXULElement("toolbarseparator");
button.setAttribute("class", "small-separator");
} else {
button = document.createXULElement("toolbarbutton");
button.className = "bookmark-item";
Expand Down
8 changes: 8 additions & 0 deletions browser/themes/linux/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ menuitem.bookmark-item {
margin-block: 0;
}

.bookmark-item > .menu-iconic-left > .menu-iconic-icon {
padding-inline-start: 0;
}

/* Bookmark drag and drop styles */
.bookmark-item[dragover-into="true"] {
background: SelectedItem !important;
Expand All @@ -100,6 +104,10 @@ menuitem.bookmark-item {
opacity: 0.7;
}

#PlacesToolbar menu menupopup {
margin-top: -12px;
}

/* Address bar */
#urlbar,
#searchbar {
Expand Down
15 changes: 15 additions & 0 deletions browser/themes/linux/customizableui/panelUI.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,26 @@

@import "chrome://browser/skin/customizableui/panelUI-shared.css";

#PlacesToolbar menupopup {
color: var(--arrowpanel-color);
--panel-background: var(--arrowpanel-background);
--panel-border-color: var(--arrowpanel-border-color);
}

menupopup::part(drop-indicator) {
/* To account for the shadow margin + border of the panel */
margin-inline-start: 5px;
}

/* Styled differently to allow for user interaction with menu separator */
#PlacesToolbar menupopup[placespopup="true"] menuseparator {
appearance: none !important;
}

menuitem.subviewbutton {
appearance: none !important;
}

.subviewradio > .radio-label-box {
appearance: none;
}
13 changes: 13 additions & 0 deletions browser/themes/osx/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,19 @@
list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.svg");
}

#PlacesToolbar menupopup[placespopup=true]::part(content) {
border: 1px solid var(--arrowpanel-border-color) !important;
}

#PlacesToolbar menupopup > menu .menu-iconic-icon,
#PlacesToolbar menupopup > menuitem .menu-iconic-icon {
margin-inline-end: 0;
}

#PlacesToolbar menu menupopup {
margin-top: -8px;
}

/* Inactive elements are faded out on OSX */
.toolbarbutton-1:not(:hover):-moz-window-inactive,
.bookmark-item:not(:hover):-moz-window-inactive,
Expand Down
14 changes: 14 additions & 0 deletions browser/themes/osx/customizableui/panelUI.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@
display: none;
}

#BMB_bookmarksPopup .subviewbutton > .menu-iconic-left {
margin-inline-end: 3px;
}

#BMB_bookmarksPopup .subviewbutton > .menu-iconic-text {
padding-inline-start: 0;
}

/* Override OSX-specific toolkit styles for the bookmarks panel */
menu.subviewbutton > .menu-right {
margin-inline-end: -4px;
appearance: none;
}

.PanelUI-remotetabs-clientcontainer > label[itemtype="client"] {
padding-inline-start: 6px;
}
Expand Down
Loading

0 comments on commit b1b874a

Please sign in to comment.