Bug 1502731 - Remove @hudButton@ and @hudButtonPressed@. r=dao

Differential Revision: https://phabricator.services.mozilla.com/D10004

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tim Nguyen 2018-10-30 19:04:23 +00:00
parent 97ed5fb15c
commit 0a931bdeff
16 changed files with 56 additions and 69 deletions

View File

@ -106,17 +106,17 @@
</vbox>
<button id="tracking-action-unblock"
class="tracking-protection-button"
class="panel-button tracking-protection-button"
label="&trackingProtection.unblock4.label;"
accesskey="&trackingProtection.unblock4.accesskey;"
oncommand="ContentBlocking.disableForCurrentPage(); gIdentityHandler.recordClick('unblock');" />
<button id="tracking-action-unblock-private"
class="tracking-protection-button"
class="panel-button tracking-protection-button"
label="&trackingProtection.unblockPrivate4.label;"
accesskey="&trackingProtection.unblockPrivate4.accesskey;"
oncommand="ContentBlocking.disableForCurrentPage(); gIdentityHandler.recordClick('unblock_private');" />
<button id="tracking-action-block"
class="tracking-protection-button"
class="panel-button tracking-protection-button"
label="&trackingProtection.block5.label;"
accesskey="&trackingProtection.block5.accesskey;"
oncommand="ContentBlocking.enableForCurrentPage(); gIdentityHandler.recordClick('block');" />
@ -188,6 +188,7 @@
<button when-connection="secure-cert-user-overridden"
label="&identity.removeCertException.label;"
accesskey="&identity.removeCertException.accesskey;"
class="panel-button"
oncommand="gIdentityHandler.removeCertException()"/>
<!-- Connection is Not Secure -->
@ -230,10 +231,12 @@
<button when-mixedcontent="active-blocked"
label="&identity.disableMixedContentBlocking.label;"
accesskey="&identity.disableMixedContentBlocking.accesskey;"
class="panel-button"
oncommand="gIdentityHandler.disableMixedContentProtection()"/>
<button when-mixedcontent="active-loaded"
label="&identity.enableMixedContentBlocking.label;"
accesskey="&identity.enableMixedContentBlocking.accesskey;"
class="panel-button"
oncommand="gIdentityHandler.enableMixedContentProtection()"/>
</vbox>

View File

@ -641,15 +641,15 @@ var gEditItemOverlay = {
toggleFolderTreeVisibility() {
var expander = this._element("foldersExpander");
var folderTreeRow = this._element("folderTreeRow");
expander.classList.toggle("expander-up", folderTreeRow.collapsed);
expander.classList.toggle("expander-down", !folderTreeRow.collapsed);
if (!folderTreeRow.collapsed) {
expander.className = "expander-down";
expander.setAttribute("tooltiptext",
expander.getAttribute("tooltiptextdown"));
folderTreeRow.collapsed = true;
this._element("chooseFolderSeparator").hidden =
this._element("chooseFolderMenuItem").hidden = false;
} else {
expander.className = "expander-up";
expander.setAttribute("tooltiptext",
expander.getAttribute("tooltiptextup"));
folderTreeRow.collapsed = false;
@ -802,8 +802,9 @@ var gEditItemOverlay = {
var tagsSelector = this._element("tagsSelector");
var tagsSelectorRow = this._element("tagsSelectorRow");
var expander = this._element("tagsSelectorExpander");
expander.classList.toggle("expander-up", tagsSelectorRow.collapsed);
expander.classList.toggle("expander-down", !tagsSelectorRow.collapsed);
if (tagsSelectorRow.collapsed) {
expander.className = "expander-up";
expander.setAttribute("tooltiptext",
expander.getAttribute("tooltiptextup"));
tagsSelectorRow.collapsed = false;
@ -813,7 +814,6 @@ var gEditItemOverlay = {
tagsSelector.addEventListener("mousedown", this);
tagsSelector.addEventListener("keypress", this);
} else {
expander.className = "expander-down";
expander.setAttribute("tooltiptext",
expander.getAttribute("tooltiptextdown"));
tagsSelectorRow.collapsed = true;

View File

@ -29,7 +29,7 @@
control="editBMPanel_folderMenuList"/>
<hbox flex="1" align="center">
<menulist id="editBMPanel_folderMenuList"
class="folder-icon"
class="folder-icon panel-button"
flex="1"
oncommand="gEditItemOverlay.onFolderMenuListCommand(event).catch(Components.utils.reportError);">
<menupopup>
@ -48,7 +48,7 @@
</menupopup>
</menulist>
<button id="editBMPanel_foldersExpander"
class="expander-down"
class="expander-down panel-button"
tooltiptext="&editBookmarkOverlay.foldersExpanderDown.tooltip;"
tooltiptextdown="&editBookmarkOverlay.foldersExpanderDown.tooltip;"
tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;"
@ -98,7 +98,7 @@
placeholder="&editBookmarkOverlay.tagsEmptyDesc.label;"
onchange="gEditItemOverlay.onTagsFieldChange();"/>
<button id="editBMPanel_tagsSelectorExpander"
class="expander-down"
class="expander-down panel-button"
tooltiptext="&editBookmarkOverlay.tagsExpanderDown.tooltip;"
tooltiptextdown="&editBookmarkOverlay.tagsExpanderDown.tooltip;"
tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;"

View File

@ -2,7 +2,7 @@
* 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/. */
%include shared.inc
%include ../../../toolkit/themes/osx/global/shared.inc
%define toolbarButtonPressed :hover:active:not([disabled="true"]):not([cui-areatype="menu-panel"])
@namespace html url("http://www.w3.org/1999/xhtml");
@ -461,8 +461,6 @@ html|input.urlbar-input {
}
#editBMPanel_folderMenuList {
@hudButton@
background-clip: padding-box;
margin: 0;
min-height: 22px;
padding-top: 2px;
@ -475,18 +473,16 @@ html|input.urlbar-input {
box-shadow: var(--focus-ring-box-shadow);
}
#editBMPanel_folderMenuList[open="true"],
#editBMPanel_folderMenuList:hover:active {
@hudButtonPressed@
}
#editBMPanel_folderMenuList > .menulist-dropmarker {
-moz-appearance: none;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
fill-opacity: 0.8;
list-style-image: url("chrome://global/skin/icons/arrow-dropdown-12.svg");
display: -moz-box;
-moz-box-align: center;
padding-inline-end: 4px;
width: 7px;
list-style-image: url("chrome://global/skin/icons/panel-dropmarker.png");
}
/**** folder tree and tag selector ****/
@ -523,31 +519,16 @@ html|input.urlbar-input {
#editBookmarkPanel .expander-up,
#editBookmarkPanel .expander-down {
@hudButton@
-moz-appearance: none; /* override button.css */
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
fill-opacity: 0.8;
margin: 0;
margin-inline-start: 4px;
min-width: 27px;
min-height: 22px;
}
#editBookmarkPanel .expander-up:-moz-focusring,
#editBookmarkPanel .expander-down:-moz-focusring {
box-shadow: var(--focus-ring-box-shadow);
}
#editBookmarkPanel .expander-up:hover:active,
#editBookmarkPanel .expander-down:hover:active {
@hudButtonPressed@
}
#editBookmarkPanel .expander-up {
list-style-image: url("chrome://browser/skin/panel-expander-open.png");
}
#editBookmarkPanel .expander-down {
list-style-image: url("chrome://browser/skin/panel-expander-closed.png");
}
#editBookmarkPanel .expander-up > .button-box > .button-icon,
#editBookmarkPanel .expander-down > .button-box > .button-icon {
margin: 1px 0 0;
@ -558,19 +539,12 @@ html|input.urlbar-input {
display: none;
}
@media (min-resolution: 2dppx) {
#editBookmarkPanel .expander-up {
list-style-image: url("chrome://browser/skin/panel-expander-open@2x.png");
}
#editBookmarkPanel .expander-up {
list-style-image: url("chrome://global/skin/icons/arrow-up-12.svg");
}
#editBookmarkPanel .expander-down {
list-style-image: url("chrome://browser/skin/panel-expander-closed@2x.png");
}
#editBookmarkPanel .expander-up > .button-box > .button-icon,
#editBookmarkPanel .expander-down > .button-box > .button-icon {
width: 9px;
}
#editBookmarkPanel .expander-down {
list-style-image: url("chrome://global/skin/icons/arrow-dropdown-12.svg");
}
#editBMPanel_tagsField > moz-input-box > html|*.textbox-input::placeholder {

View File

@ -2,7 +2,6 @@
* 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/. */
%include ../shared.inc
%include ../../shared/controlcenter/panel.inc.css
.identity-popup-expander:-moz-focusring,
@ -12,15 +11,9 @@
.tracking-protection-button,
#identity-popup-securityView-body > button {
@hudButton@
min-height: 30px;
}
.tracking-protection-button:hover:active,
#identity-popup-securityView-body > button:hover:active {
@hudButtonPressed@
}
.tracking-protection-button:-moz-focusring,
#identity-popup-securityView-body > button:-moz-focusring {
box-shadow: var(--focus-ring-box-shadow);

View File

@ -80,3 +80,23 @@ menu.subviewbutton > .menu-right {
#PanelUI-remotetabs-tabslist {
padding-bottom: 4px;
}
.panel-button {
-moz-appearance: none;
border-radius: 2px;
background-color: var(--arrowpanel-dimmed);
color: inherit;
padding: 2px 6px;
}
.panel-button@buttonStateHover@ {
background-color: var(--arrowpanel-dimmed-further);
}
.panel-button@buttonStateActive@ {
background-color: var(--arrowpanel-dimmed-even-further);
}
.panel-button:-moz-focusring {
box-shadow: var(--focus-ring-box-shadow);
}

View File

@ -9,10 +9,6 @@ browser.jar:
* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
* skin/classic/browser/browser.css
* skin/classic/browser/compacttheme.css
skin/classic/browser/panel-expander-closed.png
skin/classic/browser/panel-expander-closed@2x.png
skin/classic/browser/panel-expander-open.png
skin/classic/browser/panel-expander-open@2x.png
skin/classic/browser/panel-plus-sign.png
* skin/classic/browser/pageInfo.css
* skin/classic/browser/searchbar.css

View File

@ -4,7 +4,7 @@
@import "chrome://global/skin/";
%include shared.inc
%include ../../../toolkit/themes/osx/global/shared.inc
#topBar {
-moz-appearance: toolbar;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

View File

@ -1,6 +0,0 @@
%include ../../../toolkit/themes/osx/global/shared.inc
%filter substitution
%define hudButton -moz-appearance: none; color: #434343; border-radius: 4px; border: 1px solid #b5b5b5; background: linear-gradient(#fff, #f2f2f2); box-shadow: inset 0 1px rgba(255,255,255,.8), inset 0 0 1px rgba(255,255, 255,.25), 0 1px rgba(255,255,255,.3); background-clip: padding-box; background-origin: padding-box; padding: 2px 6px;
%define hudButtonPressed box-shadow: inset 0 1px 4px -3px #000, 0 1px rgba(255,255,255,.3);

View File

@ -2,5 +2,5 @@
- 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" width="12" height="12" viewBox="0 0 12 12">
<path fill="context-fill" d="M6,9a1,1,0,0,1-.707-.293l-4-4A1,1,0,0,1,2.707,3.293L6,6.586,9.293,3.293a1,1,0,0,1,1.414,1.414l-4,4A1,1,0,0,1,6,9Z" />
<path fill="context-fill" fill-opacity="context-fill-opacity" d="M6 9a1 1 0 0 1-.707-.293l-3-3a1 1 0 0 1 1.414-1.414L6 6.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-3 3A1 1 0 0 1 6 9z"/>
</svg>

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 487 B

View File

@ -0,0 +1,6 @@
<!-- 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" width="12" height="12" viewBox="0 0 12 12">
<path fill="context-fill" fill-opacity="context-fill-opacity" d="M6 3a1 1 0 0 0-.707.293l-3 3a1 1 0 0 0 1.414 1.414L6 5.414l2.293 2.293a1 1 0 0 0 1.414-1.414l-3-3A1 1 0 0 0 6 3z"/>
</svg>

After

Width:  |  Height:  |  Size: 486 B

View File

@ -49,6 +49,7 @@ toolkit.jar:
skin/classic/global/icons/twisty-expanded.svg (../../shared/icons/twisty-expanded.svg)
skin/classic/global/icons/arrow-dropdown-12.svg (../../shared/icons/arrow-dropdown-12.svg)
skin/classic/global/icons/arrow-dropdown-16.svg (../../shared/icons/arrow-dropdown-16.svg)
skin/classic/global/icons/arrow-up-12.svg (../../shared/icons/arrow-up-12.svg)
skin/classic/global/icons/warning.svg (../../shared/icons/warning.svg)
skin/classic/global/illustrations/about-rights.svg (../../shared/illustrations/about-rights.svg)
skin/classic/global/icons/blocked.svg (../../shared/incontent-icons/blocked.svg)