Skip to content

Commit c5240e7

Browse files
committed
Bug 1297157 - Abstract away the visuallyselected attribute on anonymous tab nodes. r=mconley
--HG-- extra : rebase_source : e8db1c7028db7b95f4fd94b73f5ce9af61ebeec5
1 parent dbb1f7d commit c5240e7

14 files changed

+107
-107
lines changed

browser/base/content/tabbrowser.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020

2121
.tab-close-button[pinned],
22-
.tabbrowser-tabs[closebuttons="activetab"] > * > * > * > .tab-close-button:not([visuallyselected="true"]),
22+
.tabbrowser-tabs[closebuttons="activetab"] > * > * > * > .tab-close-button:not([selected="true"]),
2323
.tab-icon-image:not([src]):not([pinned]):not([crashed])[selected],
2424
.tab-icon-image:not([src]):not([pinned]):not([crashed]):not([sharing]),
2525
.tab-icon-image[busy],

browser/base/content/tabbrowser.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6245,44 +6245,44 @@
62456245

62466246
<content context="tabContextMenu">
62476247
<xul:stack class="tab-stack" flex="1">
6248-
<xul:hbox xbl:inherits="pinned,selected,visuallyselected,fadein"
6248+
<xul:hbox xbl:inherits="pinned,selected=visuallyselected,fadein"
62496249
class="tab-background">
6250-
<xul:hbox xbl:inherits="pinned,selected,visuallyselected"
6250+
<xul:hbox xbl:inherits="pinned,selected=visuallyselected"
62516251
class="tab-background-start"/>
6252-
<xul:hbox xbl:inherits="pinned,selected,visuallyselected"
6252+
<xul:hbox xbl:inherits="pinned,selected=visuallyselected"
62536253
class="tab-background-middle"/>
6254-
<xul:hbox xbl:inherits="pinned,selected,visuallyselected"
6254+
<xul:hbox xbl:inherits="pinned,selected=visuallyselected"
62556255
class="tab-background-end"/>
62566256
</xul:hbox>
6257-
<xul:hbox xbl:inherits="pinned,selected,visuallyselected,titlechanged,attention"
6257+
<xul:hbox xbl:inherits="pinned,selected=visuallyselected,titlechanged,attention"
62586258
class="tab-content" align="center">
6259-
<xul:image xbl:inherits="fadein,pinned,busy,progress,selected,visuallyselected"
6259+
<xul:image xbl:inherits="fadein,pinned,busy,progress,selected=visuallyselected"
62606260
class="tab-throbber"
62616261
role="presentation"
62626262
layer="true" />
6263-
<xul:image xbl:inherits="src=image,fadein,pinned,selected,visuallyselected,busy,crashed,sharing"
6263+
<xul:image xbl:inherits="src=image,fadein,pinned,selected=visuallyselected,busy,crashed,sharing"
62646264
anonid="tab-icon-image"
62656265
class="tab-icon-image"
62666266
validate="never"
62676267
role="presentation"/>
6268-
<xul:image xbl:inherits="sharing,selected"
6268+
<xul:image xbl:inherits="sharing,selected=visuallyselected"
62696269
anonid="sharing-icon"
62706270
class="tab-sharing-icon-overlay"
62716271
role="presentation"/>
6272-
<xul:image xbl:inherits="crashed,busy,soundplaying,pinned,muted,visuallyselected"
6272+
<xul:image xbl:inherits="crashed,busy,soundplaying,pinned,muted,selected=visuallyselected"
62736273
anonid="overlay-icon"
62746274
class="tab-icon-overlay"
62756275
role="presentation"/>
62766276
<xul:label flex="1"
6277-
xbl:inherits="value=label,crop,accesskey,fadein,pinned,selected,visuallyselected,attention"
6277+
xbl:inherits="value=label,crop,accesskey,fadein,pinned,selected=visuallyselected,attention"
62786278
class="tab-text tab-label"
62796279
role="presentation"/>
6280-
<xul:image xbl:inherits="soundplaying,pinned,muted,visuallyselected"
6280+
<xul:image xbl:inherits="soundplaying,pinned,muted,selected=visuallyselected"
62816281
anonid="soundplaying-icon"
62826282
class="tab-icon-sound"
62836283
role="presentation"/>
62846284
<xul:toolbarbutton anonid="close-button"
6285-
xbl:inherits="fadein,pinned,selected,visuallyselected"
6285+
xbl:inherits="fadein,pinned,selected=visuallyselected"
62866286
class="tab-close-button close-icon"/>
62876287
</xul:hbox>
62886288
</xul:stack>

browser/themes/linux/browser-lightweightTheme.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
*/
1212

1313
/* Lightweight theme on tabs */
14-
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[visuallyselected=true]:-moz-lwtheme::before,
15-
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[visuallyselected=true]:-moz-lwtheme::before {
14+
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before,
15+
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before {
1616
background-attachment: scroll, fixed;
1717
background-color: transparent;
1818
background-image: @fgTabTextureLWT@;/*, lwtHeader;*/
1919
background-position: 0 0, right top;
2020
background-repeat: repeat-x, no-repeat;
2121
}
2222

23-
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[visuallyselected=true]:-moz-lwtheme {
23+
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme {
2424
background-attachment: scroll, scroll, fixed;
2525
background-color: transparent;
2626
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),

browser/themes/linux/browser.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,12 +1597,12 @@ html|span.ac-emphasize-text-url {
15971597
}
15981598

15991599
/* Tab close button */
1600-
.tab-close-button:not([visuallyselected]):not(:hover) {
1600+
.tab-close-button:not([selected]):not(:hover) {
16011601
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 64, 16, 48);
16021602
}
16031603

16041604
.tab-close-button:not(:hover):-moz-lwtheme-brighttext,
1605-
#TabsToolbar[brighttext] .tab-close-button:not([visuallyselected]):not(:hover) {
1605+
#TabsToolbar[brighttext] .tab-close-button:not([selected]):not(:hover) {
16061606
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 80, 16, 64);
16071607
}
16081608

browser/themes/linux/devedition.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
:root[devtoolstheme="dark"] .findbar-closebutton:not(:hover),
2323
:root[devtoolstheme="dark"] #sidebar-header > .close-icon:not(:hover),
24-
.tab-close-button[visuallyselected]:not(:hover) {
24+
.tab-close-button[selected]:not(:hover) {
2525
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 80, 16, 64);
2626
}
2727

browser/themes/osx/browser-lightweightTheme.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
*/
1111

1212
/* Lightweight theme on tabs */
13-
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[visuallyselected=true]:-moz-lwtheme::before,
14-
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[visuallyselected=true]:-moz-lwtheme::before {
13+
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-start[selected=true]:-moz-lwtheme::before,
14+
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-end[selected=true]:-moz-lwtheme::before {
1515
background-attachment: scroll, fixed;
1616
background-color: transparent;
1717
background-image: @fgTabTextureLWT@;/*, lwtHeader;*/
1818
background-position: 0 0, right top;
1919
background-repeat: repeat-x, no-repeat;
2020
}
2121

22-
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[visuallyselected=true]:-moz-lwtheme {
22+
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme {
2323
background-attachment: scroll, scroll, fixed;
2424
background-color: transparent;
2525
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle.png),
@@ -30,7 +30,7 @@
3030
}
3131

3232
@media (min-resolution: 2dppx) {
33-
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[visuallyselected=true]:-moz-lwtheme {
33+
#tabbrowser-tabs:not([movingtab]) > .tabbrowser-tab > .tab-stack > .tab-background > .tab-background-middle[selected=true]:-moz-lwtheme {
3434
background-image: url(chrome://browser/skin/tabbrowser/tab-active-middle@2x.png),
3535
@fgTabTextureLWT@;/*,
3636
lwtHeader;*/

browser/themes/osx/browser.css

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,30 +2489,30 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
24892489
url(chrome://browser/skin/tabbrowser/tab-background-start.png);
24902490
}
24912491

2492-
.tab-background-middle[visuallyselected=true]:-moz-window-inactive {
2492+
.tab-background-middle[selected=true]:-moz-window-inactive {
24932493
background-image: url(chrome://browser/skin/yosemite/tab-active-middle-inactive.png),
24942494
@fgTabTextureYosemiteInactive@,
24952495
none;
24962496
}
24972497

2498-
.tab-background-start[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(ltr)::after,
2499-
.tab-background-end[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(rtl)::after {
2498+
.tab-background-start[selected=true]:-moz-window-inactive:-moz-locale-dir(ltr)::after,
2499+
.tab-background-end[selected=true]:-moz-window-inactive:-moz-locale-dir(rtl)::after {
25002500
background-image: url(chrome://browser/skin/yosemite/tab-stroke-start-inactive.png);
25012501
}
25022502

2503-
.tab-background-end[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(ltr)::after,
2504-
.tab-background-start[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(rtl)::after {
2503+
.tab-background-end[selected=true]:-moz-window-inactive:-moz-locale-dir(ltr)::after,
2504+
.tab-background-start[selected=true]:-moz-window-inactive:-moz-locale-dir(rtl)::after {
25052505
background-image: url(chrome://browser/skin/yosemite/tab-stroke-end-inactive.png);
25062506
}
25072507

2508-
.tab-background-start[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(ltr):not(:-moz-lwtheme)::before,
2509-
.tab-background-end[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(rtl):not(:-moz-lwtheme)::before {
2508+
.tab-background-start[selected=true]:-moz-window-inactive:-moz-locale-dir(ltr):not(:-moz-lwtheme)::before,
2509+
.tab-background-end[selected=true]:-moz-window-inactive:-moz-locale-dir(rtl):not(:-moz-lwtheme)::before {
25102510
background-image: url(chrome://browser/skin/yosemite/tab-selected-start-inactive.svg);
25112511
background-size: 100% 100%;
25122512
}
25132513

2514-
.tab-background-end[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(ltr):not(:-moz-lwtheme)::before,
2515-
.tab-background-start[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(rtl):not(:-moz-lwtheme)::before {
2514+
.tab-background-end[selected=true]:-moz-window-inactive:-moz-locale-dir(ltr):not(:-moz-lwtheme)::before,
2515+
.tab-background-start[selected=true]:-moz-window-inactive:-moz-locale-dir(rtl):not(:-moz-lwtheme)::before {
25162516
background-image: url(chrome://browser/skin/yosemite/tab-selected-end-inactive.svg);
25172517
background-size: 100% 100%;
25182518
}
@@ -2536,25 +2536,25 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
25362536
url(chrome://browser/skin/tabbrowser/tab-background-start@2x.png);
25372537
}
25382538

2539-
.tab-background-middle[visuallyselected=true]:-moz-window-inactive {
2539+
.tab-background-middle[selected=true]:-moz-window-inactive {
25402540
background-image: url(chrome://browser/skin/yosemite/tab-active-middle-inactive@2x.png),
25412541
@fgTabTextureYosemiteInactive@,
25422542
none;
25432543
}
25442544

2545-
.tab-background-start[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(ltr)::after,
2546-
.tab-background-end[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(rtl)::after {
2545+
.tab-background-start[selected=true]:-moz-window-inactive:-moz-locale-dir(ltr)::after,
2546+
.tab-background-end[selected=true]:-moz-window-inactive:-moz-locale-dir(rtl)::after {
25472547
background-image: url(chrome://browser/skin/yosemite/tab-stroke-start-inactive@2x.png);
25482548
}
25492549

2550-
.tab-background-end[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(ltr)::after,
2551-
.tab-background-start[visuallyselected=true]:-moz-window-inactive:-moz-locale-dir(rtl)::after {
2550+
.tab-background-end[selected=true]:-moz-window-inactive:-moz-locale-dir(ltr)::after,
2551+
.tab-background-start[selected=true]:-moz-window-inactive:-moz-locale-dir(rtl)::after {
25522552
background-image: url(chrome://browser/skin/yosemite/tab-stroke-end-inactive@2x.png);
25532553
}
25542554
}
25552555
}
25562556

2557-
.tabbrowser-tab:not(:hover) > .tab-stack > .tab-content > .tab-icon-image:not([visuallyselected="true"]) {
2557+
.tabbrowser-tab:not(:hover) > .tab-stack > .tab-content > .tab-icon-image:not([selected="true"]) {
25582558
opacity: .9;
25592559
}
25602560

@@ -2566,7 +2566,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
25662566
opacity: 0.9999;
25672567
}
25682568

2569-
.tab-label:not([visuallyselected="true"]) {
2569+
.tab-label:not([selected="true"]) {
25702570
opacity: .7;
25712571
}
25722572

@@ -2658,12 +2658,12 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
26582658
cursor: default;
26592659
}
26602660

2661-
#TabsToolbar[brighttext] .tab-close-button.close-icon:not([visuallyselected=true]):not(:hover) {
2661+
#TabsToolbar[brighttext] .tab-close-button.close-icon:not([selected=true]):not(:hover) {
26622662
-moz-image-region: rect(0, 64px, 16px, 48px);
26632663
}
26642664

26652665
@media (min-resolution: 2dppx) {
2666-
#TabsToolbar[brighttext] .tab-close-button.close-icon:not([visuallyselected=true]):not(:hover) {
2666+
#TabsToolbar[brighttext] .tab-close-button.close-icon:not([selected=true]):not(:hover) {
26672667
-moz-image-region: rect(0, 128px, 32px, 96px);
26682668
}
26692669
}

browser/themes/osx/devedition.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@
108108
:root[devtoolstheme="dark"] .findbar-closebutton:not(:hover),
109109
/* Tab styling - make sure to use an inverted icon for the selected tab
110110
(brighttext only covers the unselected tabs) */
111-
.tab-close-button[visuallyselected=true]:not(:hover) {
111+
.tab-close-button[selected=true]:not(:hover) {
112112
-moz-image-region: rect(0, 64px, 16px, 48px);
113113
}
114114
@media (min-resolution: 2dppx) {
115115
:root[devtoolstheme="dark"] .findbar-closebutton:not(:hover),
116-
.tab-close-button[visuallyselected=true]:not(:hover) {
116+
.tab-close-button[selected=true]:not(:hover) {
117117
-moz-image-region: rect(0, 128px, 32px, 96px);
118118
}
119119
}

browser/themes/shared/devedition.inc.css

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,17 @@
118118
padding-inline-start: 0;
119119
}
120120

121-
.tab-background-start[visuallyselected=true]::after,
122-
.tab-background-start[visuallyselected=true]::before,
121+
.tab-background-start[selected=true]::after,
122+
.tab-background-start[selected=true]::before,
123123
.tab-background-start,
124124
.tab-background-end,
125-
.tab-background-end[visuallyselected=true]::after,
126-
.tab-background-end[visuallyselected=true]::before {
125+
.tab-background-end[selected=true]::after,
126+
.tab-background-end[selected=true]::before {
127127
width: 0;
128128
}
129129

130-
.tab-background-start[visuallyselected=true]::after,
131-
.tab-background-end[visuallyselected=true]::after {
130+
.tab-background-start[selected=true]::after,
131+
.tab-background-end[selected=true]::after {
132132
margin-inline-start: 0;
133133
}
134134
/* End override @tabCurveHalfWidth@ and @tabCurveWidth@ */
@@ -256,14 +256,14 @@ window:not([chromehidden~="toolbar"]) #urlbar-wrapper {
256256
pointer-events: auto;
257257
}
258258

259-
.tabbrowser-tab:-moz-any([image], [pinned]) > .tab-stack > .tab-content[attention]:not([visuallyselected="true"]),
260-
.tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([visuallyselected="true"]) {
259+
.tabbrowser-tab:-moz-any([image], [pinned]) > .tab-stack > .tab-content[attention]:not([selected="true"]),
260+
.tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([selected="true"]) {
261261
background-image: var(--pinned-tab-glow);
262262
background-position: center;
263263
background-size: 100%;
264264
}
265265

266-
.tabbrowser-tab[image] > .tab-stack > .tab-content[attention]:not([pinned]):not([visuallyselected="true"]) {
266+
.tabbrowser-tab[image] > .tab-stack > .tab-content[attention]:not([pinned]):not([selected="true"]) {
267267
background-position: left bottom var(--tab-toolbar-navbar-overlap);
268268
background-size: 34px 100%;
269269
}

0 commit comments

Comments
 (0)