зеркало из https://github.com/mozilla/gecko-dev.git
Bug 966072 - [Linux] UITour highlight panel appears below the menu panel. r=Enn,Unfocused
[Australis]
This commit is contained in:
Родитель
2bc52fdc5d
Коммит
045941a17c
|
@ -422,6 +422,7 @@ this.UITour = {
|
|||
this.hideHighlight(aWindow);
|
||||
this.hideInfo(aWindow);
|
||||
aWindow.PanelUI.panel.removeAttribute("noautohide");
|
||||
this.recreatePopup(aWindow.PanelUI.panel);
|
||||
}
|
||||
|
||||
this.endUrlbarCapture(aWindow);
|
||||
|
@ -822,6 +823,10 @@ this.UITour = {
|
|||
|
||||
if (aMenuName == "appMenu") {
|
||||
aWindow.PanelUI.panel.setAttribute("noautohide", "true");
|
||||
// If the popup is already opened, don't recreate the widget as it may cause a flicker.
|
||||
if (aWindow.PanelUI.panel.state != "open") {
|
||||
this.recreatePopup(aWindow.PanelUI.panel);
|
||||
}
|
||||
aWindow.PanelUI.panel.addEventListener("popuphiding", this.hidePanelAnnotations);
|
||||
aWindow.PanelUI.panel.addEventListener("ViewShowing", this.hidePanelAnnotations);
|
||||
if (aOpenCallback) {
|
||||
|
@ -843,6 +848,7 @@ this.UITour = {
|
|||
if (aMenuName == "appMenu") {
|
||||
aWindow.PanelUI.panel.removeAttribute("noautohide");
|
||||
aWindow.PanelUI.hide();
|
||||
this.recreatePopup(aWindow.PanelUI.panel);
|
||||
} else if (aMenuName == "bookmarks") {
|
||||
closeMenuButton("bookmarks-menu-button");
|
||||
}
|
||||
|
@ -873,6 +879,14 @@ this.UITour = {
|
|||
UITour.appMenuOpenForAnnotation.clear();
|
||||
},
|
||||
|
||||
recreatePopup: function(aPanel) {
|
||||
// After changing popup attributes that relate to how the native widget is created
|
||||
// (e.g. @noautohide) we need to re-create the frame/widget for it to take effect.
|
||||
aPanel.hidden = true;
|
||||
aPanel.clientWidth; // flush
|
||||
aPanel.hidden = false;
|
||||
},
|
||||
|
||||
startUrlbarCapture: function(aWindow, aExpectedText, aUrl) {
|
||||
let urlbar = aWindow.document.getElementById("urlbar");
|
||||
this.urlbarCapture.set(aWindow, {
|
||||
|
|
Загрузка…
Ссылка в новой задаче