Backed out changeset 338f8b736b41 (bug 1747429) as requested by sfoster.

This commit is contained in:
Alexandru Michis 2022-01-20 20:58:34 +02:00
Родитель d7dc1466d2
Коммит c5d4f89a03
5 изменённых файлов: 32 добавлений и 25 удалений

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

@ -1,4 +1,4 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46 46"><path id="bg" d="M7 42h32V5.1H7z" fill="context-stroke blue"/><g id="frame" transform="translate(0 6)"><path d="M40 5c.5 0 1 .4 1 1v24c0 .5-.5 1-1 1H6c-.6 0-1-.5-1-1V6c0-.6.4-1 1-1h34zM7 29h32V7H7v22z" fill="context-fill orange"/><path id="Fill-4" fill="context-fill red" d="M7 7h32V5H7z"/><path id="Fill-6" fill="context-fill red" d="M7 31h32v-2H7z"/></g><path id="dash" d="M38 11h1V9h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm-1 1h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-2-3H7v3h2v-1H8v-2zm-1-1h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1V9H7v2zm2-6H7v3h1V6h1V5zm1 1h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm5-1h-2v1h1v2h1V5z" fill="context-fill pink" opacity="0.5"/></svg>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46 46"><style>.st2{fill:context-fill}</style><path id="bg" d="M7 42h32V5.1H7z" fill="context-stroke"/><g id="frame" transform="translate(0 6)"><path d="M40 5c.5 0 1 .4 1 1v24c0 .5-.5 1-1 1H6c-.6 0-1-.5-1-1V6c0-.6.4-1 1-1h34zM7 29h32V7H7v22z" fill="context-fill"/><path id="Fill-4" class="st2" d="M7 7h32V5H7z"/><path id="Fill-6" class="st2" d="M7 31h32v-2H7z"/></g><path id="dash" d="M38 11h1V9h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm-1 1h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-2-3H7v3h2v-1H8v-2zm-1-1h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1V9H7v2zm2-6H7v3h1V6h1V5zm1 1h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm3 0h2V5h-2v1zm5-1h-2v1h1v2h1V5z" fill="context-fill" opacity="0.5"/></svg>

До

Ширина:  |  Высота:  |  Размер: 1.3 KiB

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

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

@ -1,4 +1,4 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46 46"><path d="M5 12c0-.6.5-1 1-1h34c.6 0 1 .5 1 1v24c0 .6-.5 1-1 1H6c-.6 0-1-.5-1-1V12zm2 23V13h32v22H7z" fill="context-fill"/><path d="M7 35h32V13H7z" fill="context-stroke blue"/><path id="dash" d="M38 19h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm-1 1h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-2-3H7v3h2v-1H8v-2zm-1-1h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm2-6H7v3h1v-2h1v-1zm1 1h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm5-1h-2v1h1v2h1v-3z" fill="context-fill" opacity="0.5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46 46"><path d="M5 12c0-.6.5-1 1-1h34c.6 0 1 .5 1 1v24c0 .6-.5 1-1 1H6c-.6 0-1-.5-1-1V12zm2 23V13h32v22H7z" fill="context-fill"/><path d="M7 35h32V13H7z" fill="context-stroke"/><path id="dash" d="M38 19h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm0 3h1v-2h-1v2zm-1 1h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-3 0h2v-1h-2v1zm-2-3H7v3h2v-1H8v-2zm-1-1h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm0-3h1v-2H7v2zm2-6H7v3h1v-2h1v-1zm1 1h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm3 0h2v-1h-2v1zm5-1h-2v1h1v2h1v-3z" fill="context-fill" opacity="0.5"/></svg>

До

Ширина:  |  Высота:  |  Размер: 1.0 KiB

После

Ширина:  |  Высота:  |  Размер: 1020 B

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

@ -1,13 +1,16 @@
%if 0
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%endif
%define urlbarMarginInline 5px
%define urlbarSearchButtonWidth calc(16px + 2 * var(--urlbar-icon-padding))
:root {
--toolbar-field-border-color: hsla(240,5%,5%,.25);
--toolbar-field-focus-border-color: var(--focus-outline-color);
--urlbar-container-padding: 1px;
--urlbar-margin-inline: 5px;
--urlbar-search-button-width: calc(16px + 2 * var(--urlbar-icon-padding));
}
@media not (prefers-contrast) {
@ -20,7 +23,7 @@
#urlbar-container,
#search-container {
padding-block: 4px;
margin-inline: var(--urlbar-margin-inline);
margin-inline: @urlbarMarginInline@;
}
#search-container[cui-areatype="menu-panel"] {
@ -141,7 +144,7 @@
}
#urlbar.searchButton > #urlbar-input-container > #urlbar-search-button {
width: var(--urlbar-search-button-width);
width: @urlbarSearchButtonWidth@;
background-image: url(chrome://global/skin/icons/search-glass.svg);
background-repeat: no-repeat;
background-position: center;
@ -173,7 +176,7 @@
:root:not([chromehidden~="toolbar"]) #urlbar.searchButton:not([breakout]) > #urlbar-background,
:root:not([chromehidden~="toolbar"]) #urlbar.searchButton:not([breakout-extend]) > #urlbar-background {
inset-inline-start: var(--urlbar-search-button-width);
inset-inline-start: @urlbarSearchButtonWidth@;
}
#urlbar-input-container {
@ -216,14 +219,14 @@
#urlbar[breakout][breakout-extend] {
top: 0;
left: calc(-1 * var(--urlbar-margin-inline));
width: calc(100% + 2 * var(--urlbar-margin-inline));
left: -@urlbarMarginInline@;
width: calc(100% + 2 * @urlbarMarginInline@);
}
#urlbar[breakout][breakout-extend] > #urlbar-input-container {
height: var(--urlbar-toolbar-height);
padding-block: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2 + var(--urlbar-container-padding));
padding-inline: calc(var(--urlbar-margin-inline) + var(--urlbar-container-padding));
padding-inline: calc(@urlbarMarginInline@ + var(--urlbar-container-padding));
}
#urlbar.searchButton[breakout][breakout-extend] > #urlbar-input-container > #urlbar-search-button {

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

@ -1,6 +1,13 @@
%if 0
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%endif
%filter substitution
%define urlbarViewPadding 4px
%define urlbarViewFaviconWidth 16px
%define urlbarViewIconMarginEnd (var(--urlbar-icon-padding) + var(--identity-box-margin-inline))
%include ../shared/urlbar/dynamicResults.inc.css
@ -13,9 +20,6 @@
--urlbarView-action-slide-in-distance: 200px;
--urlbarView-item-inline-padding: var(--urlbar-icon-padding);
--urlbarView-favicon-width: 16px;
--urlbarView-icon-margin-end: calc(var(--urlbar-icon-padding) + var(--identity-box-margin-inline));
}
:root:-moz-lwtheme {
@ -65,7 +69,7 @@
}
.urlbarView-results {
padding-block: 4px;
padding-block: @urlbarViewPadding@;
white-space: nowrap;
}
@ -114,7 +118,7 @@
padding-block-start: 18px;
/* Compensating for the 16px bottom margin on the tip elements. */
padding-block-end: calc(18px - 16px);
padding-inline-end: var(--urlbarView-icon-margin-end);
padding-inline-end: calc(@urlbarViewIconMarginEnd@);
}
.urlbarView-row-inner,
@ -142,7 +146,7 @@
/* We prioritize icons + title + action over the url, so they can grow freely,
but the url should never disappear when it's visible */
flex-shrink: 0;
max-width: calc(70% - 2 * (var(--urlbarView-favicon-width) + (6px + 2px)));
max-width: calc(70% - 2 * (@urlbarViewFaviconWidth@ + (6px + 2px)));
}
/* Wrap the url to a second line when the window is narrow. Do not wrap when the
@ -160,10 +164,10 @@
}
/* urlbarView-url is forced to be LTR for RTL locales, so set the padding based on the browser's directionality. */
.urlbarView-results[wrap] > .urlbarView-row[has-url] > .urlbarView-row-inner > .urlbarView-url:-moz-locale-dir(ltr) {
padding-left: calc(var(--urlbarView-item-inline-padding) + var(--identity-box-margin-inline) + var(--urlbarView-favicon-width));
padding-left: calc(var(--urlbarView-item-inline-padding) + var(--identity-box-margin-inline) + @urlbarViewFaviconWidth@);
}
.urlbarView-results[wrap] > .urlbarView-row[has-url] > .urlbarView-row-inner > .urlbarView-url:-moz-locale-dir(rtl) {
padding-right: calc(var(--urlbarView-item-inline-padding) + var(--identity-box-margin-inline) + var(--urlbarView-favicon-width));
padding-right: calc(var(--urlbarView-item-inline-padding) + var(--identity-box-margin-inline) + @urlbarViewFaviconWidth@);
}
/* Note: switchtab entries show the url only in override mode,
remotetab and sponsored ones only when selected or :hover. */
@ -178,7 +182,7 @@
}
.urlbarView-results[wrap] > .urlbarView-row[type=tabtosearch] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action {
flex-basis: 100%;
margin-inline-start: calc(var(--urlbarView-item-inline-padding) + var(--identity-box-margin-inline) + var(--urlbarView-favicon-width));
margin-inline-start: calc(var(--urlbarView-item-inline-padding) + var(--identity-box-margin-inline) + @urlbarViewFaviconWidth@);
}
}
@ -227,9 +231,9 @@
/* Favicon */
.urlbarView-favicon {
width: var(--urlbarView-favicon-width);
height: var(--urlbarView-favicon-width);
margin-inline-end: var(--urlbarView-icon-margin-end);
width: @urlbarViewFaviconWidth@;
height: @urlbarViewFaviconWidth@;
margin-inline-end: calc(@urlbarViewIconMarginEnd@);
background-repeat: no-repeat;
background-size: contain;
object-fit: contain;
@ -535,7 +539,7 @@
displayed width, favicon and title will collapse as different row, the style
will be broken. To avoid it, we specify the max displayable width for title
explicitly. */
flex-basis: calc(100% - var(--urlbarView-favicon-width) - var(--urlbarView-icon-margin-end));
flex-basis: calc(100% - @urlbarViewFaviconWidth@ - @urlbarViewIconMarginEnd@);
/* Move the title away from the action a little. This does not affect the
height of the row. */
margin-top: -0.3em;
@ -543,7 +547,7 @@
.urlbarView-row[firefox-suggest-sponsored] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action {
flex-basis: 100%;
margin-inline-start: calc(var(--urlbarView-favicon-width) + var(--urlbarView-icon-margin-end));
margin-inline-start: calc(@urlbarViewFaviconWidth@ + @urlbarViewIconMarginEnd@);
font-size: 0.73em;
/* This value + the bottom padding control the space between the bottom edge
of the favicon and the bottom edge of the row. The bottom padding is 1px,

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

@ -756,7 +756,7 @@ Result<Ok, PreXULSkeletonUIError> DrawSkeletonUI(
int menubarHeightDevPixels =
menubarShown ? CSSToDevPixels(28, sCSSToDevPixelScaling) : 0;
// defined in urlbar-searchbar.inc.css as --urlbar-margin-inline: 5px
// controlled by css variable urlbarMarginInline in urlbar-searchbar.inc.css
int urlbarMargin =
CSSToDevPixels(5, sCSSToDevPixelScaling) + horizontalOffset;