代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/firefox 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -1155,6 +1155,28 @@
}
}
+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"))) {
+ 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;
+}
+
// Wayland keeps strong popup window hierarchy. We need to track active
// (visible) popup windows and make sure we hide popup on the same level
// before we open another one on that level. It means that every open
@@ -1211,10 +1233,14 @@
LOG(("...[%p] GetParentMenuWidget() = %p\n", (void*)this, parentWindow));
// If the popup is a regular menu but GetParentMenuWidget() returns
- // nullptr which means it's connected non-menu parent
- // (bookmark toolbar for instance).
+ // nullptr which means is not a submenu of any other menu.
// In this case use a parent given at nsWindow::Create().
- if (!parentWindow && !menuPopupFrame->IsContextMenu()) {
+ // But we have to avoid using mToplevelParentWindow in case the popup
+ // is in 'popupnotificationcontent' element or autocomplete popup,
+ // otherwise the popupnotification would disappear when for
+ // example opening a popup with microphone selection.
+ if (!parentWindow && !menuPopupFrame->IsContextMenu() &&
+ !IsPopupWithoutToplevelParent(menuPopupFrame)) {
parentWindow =
get_window_for_gtk_widget(GTK_WIDGET(mToplevelParentWindow));
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。