Bug 1581773 - Fix disappearing bookmark edit panel when choosing folder under Wayland; r=stransky a=lizzard
authorJan Horak <jhorak@redhat.com>
Thu, 19 Sep 2019 09:28:28 +0000
changeset 552133 97f7c310e2473491261387e9cf16503ecab98bcf
parent 552132 256e2d1a8ed57f4c08ce5b2d6a8942171d3fdd96
child 552134 42b9ba8aa2c2a573c7f87495ae27921682612d49
push id12065
push userdvarga@mozilla.com
push dateSat, 28 Sep 2019 00:01:11 +0000
treeherdermozilla-beta@6601e4d9a980 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstransky, lizzard
bugs1581773
milestone70.0
Bug 1581773 - Fix disappearing bookmark edit panel when choosing folder under Wayland; r=stransky a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D46440
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -1154,26 +1154,35 @@ void nsWindow::HideWaylandPopupAndAllChi
     if (quit) break;
   }
 }
 
 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")) {
     return true;
   }
   return false;
 }