Bug 1593664 - Add urlbar.megabar.expandTextOnFocus pref and increase font size to the equivalent of 15px on focus. r=dao
authorHarry Twyford <htwyford@mozilla.com>
Thu, 21 Nov 2019 09:15:21 +0000
changeset 503242 a7abb046cb61c8ec2177bb099261d951ecc241e4
parent 503241 44656d71c60682d8c85f6e8380ada7c00073564b
child 503243 5fe975a91529160a1e9c7b7a15f61e101a0511e6
push id101211
push userhtwyford@mozilla.com
push dateFri, 22 Nov 2019 00:24:35 +0000
treeherderautoland@a7abb046cb61 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1593664
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1593664 - Add urlbar.megabar.expandTextOnFocus pref and increase font size to the equivalent of 15px on focus. r=dao Differential Revision: https://phabricator.services.mozilla.com/D53723
browser/app/profile/firefox.js
browser/themes/linux/browser.css
browser/themes/osx/browser.css
browser/themes/windows/browser.css
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -321,16 +321,18 @@ pref("browser.urlbar.switchTabs.adoptInt
 pref("browser.urlbar.openintab", false);
 
 // This is disabled until Bug 1340663 figures out the remaining requirements.
 pref("browser.urlbar.usepreloadedtopurls.enabled", false);
 pref("browser.urlbar.usepreloadedtopurls.expire_days", 14);
 
 // Whether the quantum bar displays the major design update.
 pref("browser.urlbar.megabar", false);
+// Whether we expand the font size when the megabar is focused.
+pref("browser.urlbar.megabar.expandTextOnFocus", 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);
 pref("browser.urlbar.eventTelemetry.enabled", false);
 
 pref("browser.altClickSave", false);
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -276,16 +276,26 @@ notification[value="translation"] menuli
   --urlbar-popup-url-color: -moz-nativehyperlinktext;
   --urlbar-popup-action-color: -moz-nativehyperlinktext;
 }
 
 .urlbarView {
   font-size: 1.05em;
 }
 
+@supports -moz-bool-pref("browser.urlbar.megabar.expandTextOnFocus") {
+  .urlbarView {
+    font-size: inherit;
+  }
+
+  #urlbar[breakout-extend] {
+    font-size: 1.14em;
+  }
+}
+
 /* Bookmarking panel */
 
 %include ../shared/places/editBookmarkPanel.inc.css
 
 /* Content area */
 
 %include ../shared/sidebar.inc.css
 
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -295,16 +295,26 @@
   /* Set custom disabled text color since native graytext is too faint on macOS 10.14+. */
   --panel-disabled-color: #737373;
 }
 
 .urlbarView {
   font-size: 14px;
 }
 
+@supports -moz-bool-pref("browser.urlbar.megabar.expandTextOnFocus") {
+  .urlbarView {
+    font-size: inherit;
+  }
+
+  #urlbar[breakout-extend] {
+    font-size: 1.36em;
+  }
+}
+
 #BMB_bookmarksPopup[side="top"],
 #BMB_bookmarksPopup[side="bottom"] {
   margin-left: -26px;
   margin-right: -26px;
 }
 
 #BMB_bookmarksPopup[side="left"],
 #BMB_bookmarksPopup[side="right"] {
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -549,16 +549,22 @@ menuitem.bookmark-item {
 
 @media (-moz-windows-default-theme: 0) {
   :root {
     --urlbar-popup-url-color: -moz-nativehyperlinktext;
     --urlbar-popup-action-color: -moz-nativehyperlinktext;
   }
 }
 
+@supports -moz-bool-pref("browser.urlbar.megabar.expandTextOnFocus") {
+  #urlbar[breakout-extend] {
+    font-size: 1.25em;
+  }
+}
+
 /* bookmarking panel */
 
 %include ../shared/places/editBookmarkPanel.inc.css
 
 /* ::::: content area ::::: */
 
 %include ../shared/sidebar.inc.css