Bug 1388832 - Fix right-click on searchbar when in overflow menu. r=jaws

* Swap margins for paddings around the searchbar when in a menu. Elements that could precede and follow the searchbar all have margin: 0, and define top/bottom padding as 4px, so this seems reasonable
* Harden the loop that looks up a matching ancestor - break before we hit the document

MozReview-Commit-ID: LuniL3gdLWR

--HG--
extra : rebase_source : 2101be3215ff85f2cf15ba624fad5256c92e40e8
This commit is contained in:
Sam Foster 2017-09-19 15:40:56 -07:00
Родитель 665aea48f1
Коммит 24fd9f4d45
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -5430,7 +5430,8 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
} else if (toolbarItem && toolbarItem.localName != "toolbar") {
while (toolbarItem && toolbarItem.parentNode) {
let parent = toolbarItem.parentNode;
if ((parent.classList && parent.classList.contains("customization-target")) ||
if (parent.nodeType !== Node.ELEMENT_NODE ||
(parent.classList && parent.classList.contains("customization-target")) ||
parent.getAttribute("overflowfortoolbar") || // Needs to work in the overflow list as well.
parent.localName == "toolbarpaletteitem" ||
parent.localName == "toolbar")

Просмотреть файл

@ -1622,8 +1622,8 @@ toolbarpaletteitem[place="palette"] > .toolbarbutton-1 > .toolbarbutton-menubutt
}
#search-container[cui-areatype="menu-panel"] {
margin-top: 6px;
margin-bottom: 6px;
padding-top: 6px;
padding-bottom: 6px;
}
toolbarpaletteitem[place="palette"] > #search-container {