mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1589826 - Remove the megabar's "focused & collapsed" state. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D49824 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
baac927898
commit
a9891da4c8
@ -302,7 +302,6 @@ class UrlbarController {
|
||||
this.view.close();
|
||||
} else {
|
||||
this.input.handleRevert();
|
||||
this.input.endLayoutExtend(true);
|
||||
}
|
||||
}
|
||||
event.preventDefault();
|
||||
|
@ -1009,11 +1009,11 @@ class UrlbarInput {
|
||||
}
|
||||
}
|
||||
|
||||
endLayoutExtend(force) {
|
||||
endLayoutExtend() {
|
||||
if (
|
||||
!this.hasAttribute("breakout-extend") ||
|
||||
this.view.isOpen ||
|
||||
(!force && this.getAttribute("focused") == "true")
|
||||
this.getAttribute("focused") == "true"
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@ -1746,10 +1746,11 @@ class UrlbarInput {
|
||||
// We handle mouse-based expansion events separately in _on_click.
|
||||
if (this._focusedViaMousedown) {
|
||||
this._focusedViaMousedown = false;
|
||||
} else if (this.inputField.hasAttribute("refocused-by-panel")) {
|
||||
this._maybeSelectAll(true);
|
||||
} else {
|
||||
this.startLayoutExtend();
|
||||
if (this.inputField.hasAttribute("refocused-by-panel")) {
|
||||
this._maybeSelectAll(true);
|
||||
}
|
||||
}
|
||||
|
||||
this._updateUrlTooltip();
|
||||
@ -1834,17 +1835,7 @@ class UrlbarInput {
|
||||
if (!UrlbarPrefs.get("ui.popup.disable_autohide")) {
|
||||
this.view.close();
|
||||
}
|
||||
|
||||
if (
|
||||
event.target.id == "tabs-newtab-button" ||
|
||||
event.target.id == "new-tab-button" ||
|
||||
event.target.classList.contains("tab-close-button")
|
||||
) {
|
||||
break;
|
||||
}
|
||||
|
||||
// We collapse the urlbar for any clicks outside of it.
|
||||
this.endLayoutExtend(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,6 @@ support-files =
|
||||
[browser_urlbar_blanking.js]
|
||||
support-files =
|
||||
file_blank_but_not_blank.html
|
||||
[browser_urlbar_collapseOnChromeMousedown.js]
|
||||
[browser_urlbar_content_opener.js]
|
||||
[browser_urlbar_copy_during_load.js]
|
||||
support-files =
|
||||
|
@ -1,39 +0,0 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const MEGABAR_PREF = "browser.urlbar.megabar";
|
||||
|
||||
add_task(async function() {
|
||||
Services.prefs.setBoolPref(MEGABAR_PREF, true);
|
||||
// We need to open a new window for the Megabar to kick in. This can be
|
||||
// removed when the Megabar is on by default.
|
||||
let win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
registerCleanupFunction(() => {
|
||||
BrowserTestUtils.closeWindow(win);
|
||||
Services.prefs.clearUserPref(MEGABAR_PREF);
|
||||
});
|
||||
|
||||
win.gURLBar.focus();
|
||||
Assert.ok(
|
||||
win.gURLBar.hasAttribute("breakout-extend"),
|
||||
"The Urlbar should have the breakout-extend attribute."
|
||||
);
|
||||
EventUtils.synthesizeMouseAtCenter(win.gURLBar.textbox, {}, win);
|
||||
Assert.ok(
|
||||
win.gURLBar.hasAttribute("breakout-extend"),
|
||||
"The Urlbar should have the breakout-extend attribute."
|
||||
);
|
||||
|
||||
// We just want a non-interactive part of the UI.
|
||||
let chromeTarget = win.gURLBar.textbox
|
||||
.closest("toolbar")
|
||||
.querySelector("toolbarspring");
|
||||
EventUtils.synthesizeMouseAtCenter(chromeTarget, {}, win);
|
||||
Assert.ok(
|
||||
!win.gURLBar.hasAttribute("breakout-extend"),
|
||||
"The Urlbar should not have the breakout-extend attribute."
|
||||
);
|
||||
Assert.ok(win.gURLBar.focused, "The Urlbar should be focused.");
|
||||
});
|
@ -377,7 +377,9 @@ notification[value="translation"] menulist > .menulist-dropmarker {
|
||||
.tab-drop-indicator {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png);
|
||||
margin-bottom: -9px;
|
||||
z-index: 3;
|
||||
/* The z-index needs to be big enough to trump other positioned UI pieces
|
||||
that we want to overlay. The expanded urlbar uses 3. */
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
/* All tabs menupopup */
|
||||
|
@ -614,7 +614,9 @@
|
||||
.tab-drop-indicator {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png);
|
||||
margin-top: -2px;
|
||||
z-index: 3;
|
||||
/* The z-index needs to be big enough to trump other positioned UI pieces
|
||||
that we want to overlay. The expanded urlbar uses 3. */
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
|
@ -607,7 +607,9 @@ menuitem.bookmark-item {
|
||||
.tab-drop-indicator {
|
||||
list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png);
|
||||
margin-bottom: -9px;
|
||||
z-index: 3;
|
||||
/* The z-index needs to be big enough to trump other positioned UI pieces
|
||||
that we want to overlay. The expanded urlbar uses 3. */
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
/* All tabs menupopup */
|
||||
|
Loading…
Reference in New Issue
Block a user