Bug 1581773 - Fix disappearing bookmark edit panel when choosing folder under Wayland; r=stransky

Differential Revision: https://phabricator.services.mozilla.com/D46440

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan Horak 2019-09-19 09:28:28 +00:00
Родитель cda779b4c4
Коммит f1f19846f0
1 изменённых файлов: 14 добавлений и 5 удалений

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

@ -1163,16 +1163,25 @@ bool IsPopupWithoutToplevelParent(nsMenuPopupFrame* aMenuPopupFrame) {
// Check if the popup is autocomplete (like tags autocomplete
// in the bookmark edit popup).
nsAtom* popupId = aMenuPopupFrame->GetContent()->GetID();
if (popupId && popupId->Equals(NS_LITERAL_STRING("PopupAutoComplete"))) {
if (popupId &&
popupId->Equals(NS_LITERAL_STRING("editBMPanel_tagsAutocomplete"))) {
return true;
}
nsIFrame* parentFrame = aMenuPopupFrame->GetParent();
if (!parentFrame) {
return false;
}
// Check if the popup is in the folder menu list
nsAtom* parentId = parentFrame->GetContent()->GetID();
if (parentId &&
parentId->Equals(NS_LITERAL_STRING("editBMPanel_folderMenuList"))) {
return true;
}
// Check if the popup is in popupnotificationcontent (like choosing capture
// device when starting webrtc session).
nsIFrame* parentFrame = aMenuPopupFrame->GetParent();
if (!parentFrame) {
return false;
}
parentFrame = parentFrame->GetParent();
if (parentFrame && parentFrame->GetContent()->NodeName().EqualsLiteral(
"popupnotificationcontent")) {