Bug 1677247 - Replace :not(:is(X)) with :not(X) in the codebase. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D97943
This commit is contained in:
Kartik Gautam 2020-11-25 04:23:25 +00:00
Родитель b18d8167d2
Коммит b95d37ecfb
12 изменённых файлов: 58 добавлений и 59 удалений

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

@ -1444,7 +1444,7 @@ var PanelView = class extends AssociatedToNode {
// Non-hidden <label> or <description> elements that also aren't empty
// and also don't have a value attribute can be multiline (if their
// text content is long enough).
let isMultiline = ":not(:is([hidden],[value],:empty))";
let isMultiline = ":not([hidden],[value],:empty)";
let selector = [
"description" + isMultiline,
"label" + isMultiline,

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

@ -43,20 +43,20 @@
display: none;
}
.download-state:not(:is([state="6"], /* Blocked (parental) */
[state="8"], /* Blocked (dirty) */
[state="9"]) /* Blocked (policy) */)
.downloadBlockedBadge,
.download-state:not([state="6"],/* Blocked (parental) */
[state="8"],/* Blocked (dirty) */
[state="9"] /* Blocked (policy) */)
.downloadBlockedBadge,
.download-state:not(:is([state="-1"],/* Starting (initial) */
[state="5"], /* Starting (queued) */
[state="0"], /* Downloading */
[state="4"], /* Paused */
[state="7"]) /* Scanning */)
.downloadProgress,
.download-state:not([state="-1"],/* Starting (initial) */
[state="5"], /* Starting (queued) */
[state="0"], /* Downloading */
[state="4"], /* Paused */
[state="7"] /* Scanning */)
.downloadProgress,
.download-state:not( [state="0"] /* Downloading */)
.downloadPauseMenuItem,
.downloadPauseMenuItem,
.download-state:not( [state="4"] /* Paused */)
.downloadResumeMenuItem,
@ -68,30 +68,30 @@
.download-state[state="8"]:not(.temporary-block)
.downloadUnblockMenuItem,
.download-state:not(:is([state="1"], /* Finished */
[state="2"], /* Failed */
[state="3"], /* Canceled */
[state="6"], /* Blocked (parental) */
[state="8"], /* Blocked (dirty) */
[state="9"]) /* Blocked (policy) */)
.downloadRemoveFromHistoryMenuItem,
.download-state:not([state="1"], /* Finished */
[state="2"], /* Failed */
[state="3"], /* Canceled */
[state="6"], /* Blocked (parental) */
[state="8"], /* Blocked (dirty) */
[state="9"] /* Blocked (policy) */)
.downloadRemoveFromHistoryMenuItem,
.download-state:not(:is([state="-1"],/* Starting (initial) */
[state="0"], /* Downloading */
[state="1"], /* Finished */
[state="4"], /* Paused */
[state="5"]) /* Starting (queued) */)
.downloadShowMenuItem,
.download-state:not([state="-1"],/* Starting (initial) */
[state="0"], /* Downloading */
[state="1"], /* Finished */
[state="4"], /* Paused */
[state="5"] /* Starting (queued) */)
.downloadShowMenuItem,
.download-state[state="1"]:not([exists])
.downloadShowMenuItem,
.download-state:not(:is([state="-1"],/* Starting (initial) */
[state="0"], /* Downloading */
[state="1"], /* Finished */
[state="4"], /* Paused */
[state="5"], /* Starting (queued) */
[state="8"]) /* Blocked (dirty) */)
.downloadCommandsSeparator,
.download-state:not([state="-1"],/* Starting (initial) */
[state="0"], /* Downloading */
[state="1"], /* Finished */
[state="4"], /* Paused */
[state="5"], /* Starting (queued) */
[state="8"] /* Blocked (dirty) */)
.downloadCommandsSeparator,
.download-state[state="1"]:not([exists])
.downloadCommandsSeparator,
.download-state[state="8"]:not(.temporary-block)
@ -108,19 +108,18 @@
/*** Visibility of download button labels ***/
.download-state:not(:is([state="-1"],/* Starting (initial) */
[state="5"], /* Starting (queued) */
[state="0"], /* Downloading */
[state="4"]) /* Paused */)
.download-state:not([state="-1"],/* Starting (initial) */
[state="5"], /* Starting (queued) */
[state="0"], /* Downloading */
[state="4"] /* Paused */)
.downloadCancel,
.download-state:not(:is([state="2"], /* Failed */
[state="3"]) /* Canceled */)
.download-state:not([state="2"], /* Failed */
[state="3"] /* Canceled */)
.downloadRetry,
.download-state:not( [state="1"] /* Finished */)
.downloadShow
{
.downloadShow {
display: none;
}

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

@ -123,7 +123,7 @@
}
/* Draw the bottom border of the tabs toolbar when titlebar isn't using vibrancy */
:root:not(:is([inFullscreen], [tabsintitlebar])) #nav-bar:not([tabs-hidden="true"]),
:root:not([inFullscreen], [tabsintitlebar]) #nav-bar:not([tabs-hidden="true"]),
#nav-bar:not([tabs-hidden="true"]):-moz-lwtheme {
box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--tabs-border-color);
}

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

@ -35,7 +35,7 @@ panelmultiview .toolbaritem-combined-buttons > spacer.before-label {
margin-inline-start: 18px;
}
.subviewbutton:not(:is([image],[targetURI],.bookmark-item)) > .menu-iconic-left {
.subviewbutton:not([image],[targetURI],.bookmark-item) > .menu-iconic-left {
display: none;
}

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

@ -13,8 +13,8 @@
% There's no calc() here (and therefore lots of calc() where this is used) because
% we don't support nested calc(): https://bugzilla.mozilla.org/show_bug.cgi?id=968761
%define menuPanelButtonWidth (@menuPanelWidth@ / 3 - 0.1px)
%define buttonStateHover :not(:is([disabled],[open],:active)):is(:hover,:focus)
%define menuStateHover :not(:is([disabled],:active))[_moz-menuactive]
%define buttonStateHover :not([disabled],[open],:active):is(:hover,:focus)
%define menuStateHover :not([disabled],:active)[_moz-menuactive]
%define buttonStateActive :not([disabled]):is([open],:hover:active)
%define menuStateActive :not([disabled])[_moz-menuactive]:active
%define menuStateMenuActive :not([disabled])[_moz-menuactive]

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

@ -174,7 +174,7 @@ toolbar[brighttext] .toolbaritem-combined-buttons > separator {
#PersonalToolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover,
#tabbrowser-arrowscrollbox:not([scrolledtostart=true])::part(scrollbutton-up):hover,
#tabbrowser-arrowscrollbox:not([scrolledtoend=true])::part(scrollbutton-down):hover,
.findbar-button:not(:is([checked="true"],[disabled="true"])):hover,
.findbar-button:not([checked="true"],[disabled="true"]):hover,
toolbarbutton.bookmark-item:not(.subviewbutton):hover:not([disabled="true"]):not([open]),
toolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-icon,
toolbar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-text,

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

@ -114,12 +114,12 @@ input[type="checkbox"] {
* If we're not sharing either the screen or the window, we can
* hide the entire display sharing section.
*/
:root:not(:is([sharingscreen],[sharingwindow])) > body > #display-share,
:root:not(:is([sharingscreen],[sharingwindow])) > body > #display-share + .separator,
:root:not([sharingscreen],[sharingwindow]) > body > #display-share,
:root:not([sharingscreen],[sharingwindow]) > body > #display-share + .separator,
:root:not([sharingvideo]) > body > #device-share > #camera-mute-toggle,
:root:not([sharingaudio]) > body > #device-share > #microphone-mute-toggle,
:root:not(:is([sharingvideo],[sharingaudio])) > body > #device-share,
:root:not(:is([sharingvideo],[sharingaudio])) > body > #device-share + .separator {
:root:not([sharingvideo],[sharingaudio]) > body > #device-share,
:root:not([sharingvideo],[sharingaudio]) > body > #device-share + .separator {
display:none;
}

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

@ -59,11 +59,11 @@
/* Selectable button which is unchecked. */
.devtools-toolbarbutton[label]:not(:is([checked=true],[disabled])):hover {
.devtools-toolbarbutton[label]:not([checked=true],[disabled]):hover {
background-color: var(--toolbarbutton-hover-background);
}
.devtools-toolbarbutton:not(:is([checked=true],[disabled]))[label]:focus {
.devtools-toolbarbutton:not([checked=true],[disabled])[label]:focus {
background-color: var(--toolbarbutton-focus-background);
color: var(--toolbarbutton-focus-color);
}

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

@ -485,7 +485,7 @@ strong {
width: 100%;
}
.tooltip-container[type="doorhanger"] .menuitem > .command:not(:is([disabled],[open],:active)):is(:hover,:focus) {
.tooltip-container[type="doorhanger"] .menuitem > .command:not([disabled],[open],:active):is(:hover,:focus) {
background-color: var(--theme-arrowpanel-dimmed);
}

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

@ -30,7 +30,7 @@ button {
/* .......... hover state .......... */
button:hover:not(:is(:active,[disabled="true"],[open="true"],[checked="true"],[default="true"])) {
button:hover:not(:active,[disabled="true"],[open="true"],[checked="true"],[default="true"]) {
color: -moz-buttonhovertext;
}

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

@ -745,7 +745,7 @@
}
.pip-wrapper:is([small-video],[has-used]) > .pip-expanded,
.pip-wrapper[position="right"]:not(:is([small-video],[has-used])) > .pip-icon {
.pip-wrapper[position="right"]:not([small-video],[has-used]) > .pip-icon {
display: none;
}
@ -786,18 +786,18 @@
pointer-events: none;
}
.pip-wrapper:not(:is([small-video],[has-used])) > .pip-expanded {
.pip-wrapper:not([small-video],[has-used]) > .pip-expanded {
opacity: 1;
scale: 1;
pointer-events: auto;
}
.pip-wrapper:not(:is([small-video],[has-used])).hovering > .pip-expanded {
.pip-wrapper:not([small-video],[has-used]).hovering > .pip-expanded {
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
.pip-wrapper:not(:is([small-video],[has-used])) > .pip-small {
.pip-wrapper:not([small-video],[has-used]) > .pip-small {
opacity: 0;
transition: opacity 200ms;
}
@ -844,7 +844,7 @@
@media (prefers-reduced-motion) {
.pip-wrapper,
.pip-expanded,
.pip-wrapper:not(:is([small-video],[has-used])) > .pip-small,
.pip-wrapper:not([small-video],[has-used]) > .pip-small,
.pip-explainer {
transition: none;
}

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

@ -44,7 +44,7 @@ button:-moz-focusring {
default, hovered or focused state. However, if these states overlap with
the active, disabled, open or checked state, the appearance reverts back
to the default background. */
button:is([default="true"],:hover,:focus):not(:is(:active,[disabled="true"],[open="true"],[checked="true"])) {
button:is([default="true"],:hover,:focus):not(:active,[disabled="true"],[open="true"],[checked="true"]) {
color: HighlightText;
}
}