Bug 1586778 - Never end address bar layout extension if the view is open. r=dao

This fixes the cases where we may end urlbar layout extension when the panel is open, causing it to appear as if it has a transparent background.
On dragstart the view is closed, but layout extension is no more ended, because there's no more risk of overlapping toolbar items.
Additionally it stops clearing results when ui.popup.disable_autohide is enabled, so they can be analyzed from the Browser Toolbox.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Marco Bonardo 2019-10-23 15:10:04 +00:00
Родитель 76263eb7c7
Коммит 690feb6b83
3 изменённых файлов: 9 добавлений и 6 удалений

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

@ -1303,8 +1303,8 @@ var gIdentityHandler = {
dt.setData("text/html", htmlString);
dt.setDragImage(canvas, 16, 16);
// Make sure we don't cover the tab bar or other potential drop targets.
gURLBar.endLayoutExtend(true);
// Don't cover potential drop targets on the toolbars or in content.
gURLBar.view.close();
},
onLocationChange() {

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

@ -1005,7 +1005,8 @@ class UrlbarInput {
endLayoutExtend(force) {
if (
!this.hasAttribute("breakout-extend") ||
(!force && (this.view.isOpen || this.getAttribute("focused") == "true"))
this.view.isOpen ||
(!force && this.getAttribute("focused") == "true")
) {
return;
}
@ -2075,8 +2076,8 @@ class UrlbarInput {
return;
}
// Make sure we don't cover the tab bar or other potential drop targets.
this.endLayoutExtend(true);
// Don't cover potential drop targets on the toolbars or in content.
this.view.close();
// Only customize the drag data if the entire value is selected and it's a
// loaded URI. Use default behavior otherwise.

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

@ -1380,7 +1380,9 @@ class UrlbarView {
// When switching to another browser window, open tabs, history or other
// data sources are likely to change, so make sure we don't re-show stale
// results when switching back.
this.clear();
if (!UrlbarPrefs.get("ui.popup.disable_autohide")) {
this.clear();
}
}
_on_TabSelect() {