Skip to content

Commit

Permalink
Backed out changeset 0711ae54877b (bug 1719938) for bustages on media…
Browse files Browse the repository at this point in the history
…_features.rs. CLOSED TREE
  • Loading branch information
ncsoregi committed Sep 20, 2021
1 parent 27c5890 commit 592741b
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 3 deletions.
14 changes: 12 additions & 2 deletions browser/base/content/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,11 @@ toolbar:not(#TabsToolbar) > #personal-bookmarks {
#pageActionButton[multiple-children] ~ .urlbar-page-action {
display: none;
}
#pageActionButton[multiple-children] {
visibility: visible;

@media (-moz-proton) {
#pageActionButton[multiple-children] {
visibility: visible;
}
}
}
@media (max-width: 550px) {
Expand Down Expand Up @@ -1240,10 +1243,12 @@ toolbarpaletteitem[dragover] {
display: -moz-box;
}

@media (-moz-proton) {
#customization-lwtheme-button > .box-inherit > .button-menu-dropmarker,
#customization-uidensity-button > .box-inherit > .button-menu-dropmarker {
display: -moz-box;
}
} /*** END proton ***/

toolbarpaletteitem[place="palette"] {
-moz-box-orient: vertical;
Expand Down Expand Up @@ -1530,8 +1535,13 @@ toolbar[keyNav=true]:not([collapsed=true], [customizing=true]) toolbartabstop {
margin: 0;
padding: 0;
overflow-x: auto;
}

@media (-moz-proton) {
.dialogBox {
border-radius: 8px;
}
}

.dialogBox[resizable="true"] {
resize: both;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ ol {
border-top: 1px solid var(--in-content-border-color);
}

@media (-moz-proton) {
.login-list-item:not(.selected):hover {
background-color: var(--in-content-button-background-hover);
color: var(--in-content-button-text-color-hover);
Expand All @@ -132,6 +133,7 @@ ol {
.login-list-item:not(.selected):hover:active {
background-color: var(--in-content-button-background-active);
}
} /*** END proton ***/

.login-list-item.keyboard-selected {
border-inline-start-color: var(--in-content-border-color);
Expand Down
2 changes: 2 additions & 0 deletions browser/components/contextualidentity/content/usercontext.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@
-moz-box-align: center;
}

@media (-moz-proton) {
.tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-context-line {
background-color: var(--identity-icon-color);
height: 2px;
border-radius: 2px;
margin: -3px 2px 0;
}
} /*** END proton ***/

.userContext-icon-inprefs {
margin-inline: 4px 10px;
Expand Down
2 changes: 2 additions & 0 deletions browser/components/extensions/extension-linux-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* 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/. */

@media (-moz-proton) {
body {
border-radius: 8px;
}
}
6 changes: 6 additions & 0 deletions browser/components/extensions/extension-mac-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
* 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/. */

body {
border-radius: 3.5px;
}

@media (-moz-proton) {
body {
border-radius: 8px;
}
}
2 changes: 2 additions & 0 deletions browser/components/extensions/extension-win-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
}
}

@media (-moz-proton) {
body {
border-radius: 8px;
}
}
2 changes: 2 additions & 0 deletions browser/themes/linux/controlcenter/panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
outline: 1px dotted;
}

@media (-moz-proton) {
#identity-popup[type="arrow"][side="top"],
#identity-popup[type="arrow"][side="bottom"],
#notification-popup[type="arrow"][side="top"],
Expand Down Expand Up @@ -58,3 +59,4 @@
#protections-popup[type="arrow"][side="right"] {
margin-block: calc(-20px + 2 * var(--urlbar-container-padding));
}
} /** END Proton **/
2 changes: 2 additions & 0 deletions browser/themes/linux/customizableui/panelUI.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

%include ../../shared/customizableui/panelUI.inc.css

@media (-moz-proton) {
#customizationui-widget-panel[viewId="PanelUI-profiler"][type="arrow"][side="top"],
#customizationui-widget-panel[viewId="PanelUI-profiler"][type="arrow"][side="bottom"] {
margin-inline: -13px;
Expand All @@ -17,6 +18,7 @@
#notification-popup {
margin-block: -4px;
}
} /** END Proton **/

#PlacesToolbar menupopup,
#BMB_bookmarksPopup menupopup {
Expand Down
2 changes: 2 additions & 0 deletions browser/themes/osx/controlcenter/panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
box-shadow: var(--focus-ring-box-shadow);
}

@media (-moz-proton) {
#identity-popup[type="arrow"][side="top"],
#identity-popup[type="arrow"][side="bottom"],
#notification-popup[type="arrow"][side="top"],
Expand Down Expand Up @@ -45,3 +46,4 @@
#protections-popup[type="arrow"][side="right"] {
margin-block: calc(-16px + 2 * var(--urlbar-container-padding));
}
} /** END Proton **/
2 changes: 2 additions & 0 deletions browser/themes/shared/browser-custom-colors.inc.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

@media not (prefers-contrast) {
@media (-moz-proton) {
:root:not(:-moz-lwtheme) {
--button-primary-bgcolor: rgb(0,97,224);
--button-primary-hover-bgcolor: rgb(2,80,187);
Expand Down Expand Up @@ -66,4 +67,5 @@
--autocomplete-popup-highlight-color: rgb(21,20,26);
--autocomplete-popup-hover-background: rgb(240,240,244);
}
} /** END Proton **/
}
2 changes: 2 additions & 0 deletions browser/themes/windows/controlcenter/panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

%include ../../shared/controlcenter/panel.inc.css

@media (-moz-proton) {
#identity-popup[type="arrow"][side="top"],
#identity-popup[type="arrow"][side="bottom"],
#notification-popup[type="arrow"][side="top"],
Expand Down Expand Up @@ -37,6 +38,7 @@
#protections-popup[type="arrow"][side="right"] {
margin-block: calc(-20px + 2 * var(--urlbar-container-padding));
}
} /** END Proton **/

.protections-popup-tp-switch:-moz-focusring {
outline: 1px dotted;
Expand Down
2 changes: 2 additions & 0 deletions browser/themes/windows/customizableui/panelUI.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

%include ../../shared/customizableui/panelUI.inc.css

@media (-moz-proton) {
#customizationui-widget-panel[viewId="PanelUI-profiler"][type="arrow"][side="top"],
#customizationui-widget-panel[viewId="PanelUI-profiler"][type="arrow"][side="bottom"] {
margin-inline: -13px;
Expand All @@ -17,6 +18,7 @@
#notification-popup {
margin-block: -4px;
}
} /** END Proton **/

/* bookmark panel submenus */

Expand Down
3 changes: 2 additions & 1 deletion browser/themes/windows/searchbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
.searchbar-engine-one-off-item:-moz-focusring {
outline: none;
}
@media (-moz-os-version: windows-win10) {

@media (-moz-proton) and (-moz-os-version: windows-win10) {
#PopupSearchAutoComplete {
/* A border is necessary because the shadow is bottom-right */
border-color: var(--menu-border-color);
Expand Down
2 changes: 2 additions & 0 deletions layout/style/test/chrome/chrome-only-media-queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const CHROME_ONLY_TOGGLES = [
"-moz-gtk-csd-maximize-button",
"-moz-gtk-csd-close-button",
"-moz-gtk-csd-reversed-placement",
"-moz-proton",
"-moz-proton-places-tooltip",
];

// Non-parseable queries can be tested directly in
Expand Down
2 changes: 2 additions & 0 deletions servo/components/style/gecko/media_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -926,4 +926,6 @@ pub static MEDIA_FEATURES: [MediaFeatureDescription; 60] = [
lnf_int_feature!(atom!("-moz-gtk-csd-close-button"), GTKCSDCloseButton),
lnf_int_feature!(atom!("-moz-gtk-csd-reversed-placement"), GTKCSDReversedPlacement),
lnf_int_feature!(atom!("-moz-system-dark-theme"), SystemUsesDarkTheme),
bool_pref_feature!(atom!("-moz-proton"), "browser.proton.enabled"),
bool_pref_feature!(atom!("-moz-proton-places-tooltip"), "browser.proton.places-tooltip.enabled"),
];
2 changes: 2 additions & 0 deletions widget/nsXPLookAndFeel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ static constexpr struct {
widget::ThemeChangeKind::MediaQueriesOnly;
} kMediaQueryPrefs[] = {
{"browser.display.windows.native_menus"_ns},
{"browser.proton.enabled"_ns},
{"browser.proton.places-tooltip.enabled"_ns},
// This affects not only the media query, but also the native theme, so we
// need to re-layout.
{"browser.theme.toolbar-theme"_ns, widget::ThemeChangeKind::AllBits},
Expand Down
2 changes: 2 additions & 0 deletions xpcom/ds/StaticAtoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2229,6 +2229,8 @@
Atom("_moz_gtk_csd_maximize_button", "-moz-gtk-csd-maximize-button"),
Atom("_moz_gtk_csd_close_button", "-moz-gtk-csd-close-button"),
Atom("_moz_gtk_csd_reversed_placement", "-moz-gtk-csd-reversed-placement"),
Atom("_moz_proton", "-moz-proton"),
Atom("_moz_proton_places_tooltip", "-moz-proton-places-tooltip"),
Atom("_moz_toolbar_prefers_color_scheme", "-moz-toolbar-prefers-color-scheme"),
Atom("_moz_system_dark_theme", "-moz-system-dark-theme"),
# application commands
Expand Down

0 comments on commit 592741b

Please sign in to comment.