Bug 1033395 - Panels Should Be Anchored from the Same Height on the Toolbar. r=johannh

MozReview-Commit-ID: 6bhlfeD1esE
This commit is contained in:
Erica Wright
2017-09-13 15:49:32 -04:00
parent 85a417c111
commit 942200ccac
10 changed files with 94 additions and 23 deletions

View File

@@ -471,6 +471,10 @@ const PanelUI = {
CustomizableUI.addPanelCloseListeners(tempPanel);
tempPanel.addEventListener("popuphidden", panelRemover);
if (aAnchor.parentNode.id == "PersonalToolbar") {
tempPanel.classList.add("bookmarks-toolbar");
}
let anchor = this._getPanelAnchor(aAnchor);
if (aAnchor != anchor && aAnchor.id) {
@@ -846,6 +850,8 @@ const PanelUI = {
_getPanelAnchor(candidate) {
let iconAnchor =
document.getAnonymousElementByAttribute(candidate, "class",
"toolbarbutton-badge-stack") ||
document.getAnonymousElementByAttribute(candidate, "class",
"toolbarbutton-icon");
return iconAnchor || candidate;