зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1593659 - Put the search button behind a pref. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D51674 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
cd00782e41
Коммит
4dce9bbdfa
|
@ -326,6 +326,8 @@ pref("browser.urlbar.usepreloadedtopurls.expire_days", 14);
|
|||
|
||||
// Whether the quantum bar displays the major design update.
|
||||
pref("browser.urlbar.megabar", false);
|
||||
// Whether the megabar displays the permanent search icon.
|
||||
pref("browser.urlbar.searchIcon", false);
|
||||
pref("browser.urlbar.view.stripHttps", false);
|
||||
|
||||
pref("browser.urlbar.openViewOnFocus", false);
|
||||
|
|
|
@ -11,7 +11,7 @@ function test() {
|
|||
setup();
|
||||
}
|
||||
|
||||
const FALLBACK_ANCHOR = gURLBar.megabar
|
||||
const FALLBACK_ANCHOR = gURLBar.searchIcon
|
||||
? "urlbar-search-icon"
|
||||
: "identity-icon";
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"use strict";
|
||||
|
||||
function confirmDefaults() {
|
||||
if (gURLBar.megabar) {
|
||||
if (gURLBar.searchIcon) {
|
||||
is(
|
||||
getComputedStyle(document.getElementById("identity-box")).display,
|
||||
"none",
|
||||
|
|
|
@ -85,6 +85,10 @@ class UrlbarInput {
|
|||
if (this.megabar) {
|
||||
this.textbox.classList.add("megabar");
|
||||
this.textbox.parentNode.classList.add("megabar");
|
||||
this.searchIcon = UrlbarPrefs.get("searchIcon");
|
||||
if (this.searchIcon) {
|
||||
this.textbox.classList.add("searchIcon");
|
||||
}
|
||||
}
|
||||
|
||||
this.controller = new UrlbarController({
|
||||
|
|
|
@ -106,6 +106,9 @@ const PREF_URLBAR_DEFAULTS = new Map([
|
|||
// Whether the quantum bar displays the major design update.
|
||||
["megabar", false],
|
||||
|
||||
// Whether the megabar displays the permanent search icon.
|
||||
["searchIcon", false],
|
||||
|
||||
// One-off search buttons enabled status.
|
||||
["oneOffSearches", false],
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
padding-inline-start: 8px;
|
||||
}
|
||||
|
||||
#urlbar.megabar > #urlbar-input-container > #identity-box[pageproxystate="invalid"],
|
||||
#urlbar.searchIcon > #urlbar-input-container > #identity-box[pageproxystate="invalid"],
|
||||
#identity-box[pageproxystate="invalid"] > #permissions-granted-icon,
|
||||
#identity-box[pageproxystate="invalid"] > #blocked-permissions-container,
|
||||
#identity-box[pageproxystate="invalid"] > #notification-popup-box,
|
||||
|
@ -35,7 +35,7 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
#urlbar:not(.megabar) > #urlbar-input-container > #identity-box[pageproxystate="invalid"] {
|
||||
#urlbar:not(.searchIcon) > #urlbar-input-container > #identity-box[pageproxystate="invalid"] {
|
||||
pointer-events: none;
|
||||
-moz-user-focus: ignore;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@
|
|||
list-style-image: url(chrome://branding/content/identity-icons-brand.svg);
|
||||
}
|
||||
|
||||
#urlbar:not(.megabar) > #urlbar-input-container > #identity-box[pageproxystate="invalid"] > #identity-icon {
|
||||
#urlbar:not(.searchIcon) > #urlbar-input-container > #identity-box[pageproxystate="invalid"] > #identity-icon {
|
||||
list-style-image: url(chrome://browser/skin/search-glass.svg);
|
||||
fill-opacity: .4;
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
caret-color: transparent;
|
||||
}
|
||||
|
||||
#urlbar.megabar > #urlbar-input-container > #urlbar-search-icon {
|
||||
#urlbar.searchIcon > #urlbar-input-container > #urlbar-search-icon {
|
||||
width: @urlbarSearchIconWidth@;
|
||||
background-image: url(chrome://browser/skin/search-glass.svg);
|
||||
background-repeat: no-repeat;
|
||||
|
@ -140,7 +140,7 @@
|
|||
fill-opacity: var(--toolbarbutton-icon-fill-opacity);
|
||||
}
|
||||
|
||||
#urlbar.megabar > #urlbar-input-container[pageproxystate="invalid"] > #urlbar-search-icon {
|
||||
#urlbar.searchIcon > #urlbar-input-container[pageproxystate="invalid"] > #urlbar-search-icon {
|
||||
margin-inline-end: 6px;
|
||||
}
|
||||
|
||||
|
@ -162,8 +162,8 @@
|
|||
inset: 0;
|
||||
}
|
||||
|
||||
:root:not([chromehidden~="toolbar"]) #urlbar.megabar:not([breakout]) > #urlbar-background,
|
||||
:root:not([chromehidden~="toolbar"]) #urlbar.megabar:not([breakout-extend]) > #urlbar-background {
|
||||
:root:not([chromehidden~="toolbar"]) #urlbar.searchIcon:not([breakout]) > #urlbar-background,
|
||||
:root:not([chromehidden~="toolbar"]) #urlbar.searchIcon:not([breakout-extend]) > #urlbar-background {
|
||||
inset-inline-start: @urlbarSearchIconWidth@;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@
|
|||
padding-inline: calc(@urlbarMarginInline@ + @urlbarBreakoutExtend@);
|
||||
}
|
||||
|
||||
#urlbar[breakout][breakout-extend] > #urlbar-input-container > #urlbar-search-icon {
|
||||
#urlbar.searchIcon[breakout][breakout-extend] > #urlbar-input-container > #urlbar-search-icon {
|
||||
fill: currentColor;
|
||||
fill-opacity: .6;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче