From 52ad6d17433e079221e48a20b03023c1a82022bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Fri, 9 Jan 2009 10:57:57 +0100 Subject: [PATCH] Bug 471921 - use proper CSS instead of first-tab, last-tab and afterselected attributes. r=gavin --- toolkit/content/widgets/tabbox.xml | 10 +++++++--- toolkit/themes/pinstripe/global/tabbox.css | 12 ++++++------ toolkit/themes/winstripe/global/tabbox.css | 14 +++++++------- widget/src/xpwidgets/nsWidgetAtomList.h | 2 -- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/toolkit/content/widgets/tabbox.xml b/toolkit/content/widgets/tabbox.xml index 26bc4f9021b..fd9b887deff 100644 --- a/toolkit/content/widgets/tabbox.xml +++ b/toolkit/content/widgets/tabbox.xml @@ -639,10 +639,14 @@ tab[beforeselected=true] { -moz-margin-end: -2px; } -tabbox.tabs-bottom > tabs > tab:not([selected=true])[first-tab=true], -tabs.tabs-bottom > tab:not([selected=true])[first-tab=true] { +tabbox.tabs-bottom > tabs > tab:first-of-type:not([selected=true]), +tabs.tabs-bottom > tab:first-of-type:not([selected=true]) { -moz-border-start: 4px solid transparent; } -tabbox.tabs-bottom > tabs > tab[selected=true][first-tab=true], -tabs.tabs-bottom > tab[selected=true][first-tab=true] { +tabbox.tabs-bottom > tabs > tab:first-of-type[selected=true], +tabs.tabs-bottom > tab:first-of-type[selected=true] { -moz-margin-start: 2px; } diff --git a/toolkit/themes/winstripe/global/tabbox.css b/toolkit/themes/winstripe/global/tabbox.css index fd15d2a039c..b48d492e233 100644 --- a/toolkit/themes/winstripe/global/tabbox.css +++ b/toolkit/themes/winstripe/global/tabbox.css @@ -106,19 +106,19 @@ tab:focus > .tab-middle { outline: 1px dotted; } -tab[beforeselected="true"], -tab[afterselected="true"][chromedir="rtl"] { +tab[beforeselected="true"]:not([chromedir="rtl"]), +tab[selected="true"][chromedir="rtl"] + tab { border-right: none; -moz-border-radius-topright: 0; } -tab[afterselected="true"], +tab[selected="true"]:not([chromedir="rtl"]) + tab, tab[beforeselected="true"][chromedir="rtl"] { border-left: none; -moz-border-radius-topleft: 0; } -tab[first-tab="true"][selected="true"] { +tab:first-of-type[selected="true"] { padding-right: 5px; padding-left: 5px; } @@ -148,12 +148,12 @@ tab[first-tab="true"][selected="true"] { padding: 4px 6px 1px 6px; } -.tab-bottom[beforeselected="true"], -.tab-bottom[afterselected="true"][chromedir="rtl"] { +.tab-bottom[beforeselected="true"]:not([chromedir="rtl"]), +.tab-bottom[selected="true"][chromedir="rtl"] + .tab-bottom { -moz-border-radius-bottomright: 0; } -.tab-bottom[afterselected="true"], +.tab-bottom[selected="true"]:not([chromedir="rtl"]) + .tab-bottom, .tab-bottom[beforeselected="true"][chromedir="rtl"] { -moz-border-radius-bottomleft: 0; } diff --git a/widget/src/xpwidgets/nsWidgetAtomList.h b/widget/src/xpwidgets/nsWidgetAtomList.h index 309a05a7744..376fb72c15b 100644 --- a/widget/src/xpwidgets/nsWidgetAtomList.h +++ b/widget/src/xpwidgets/nsWidgetAtomList.h @@ -72,7 +72,6 @@ WIDGET_ATOM(descending, "descending") WIDGET_ATOM(dir, "dir") WIDGET_ATOM(disabled, "disabled") WIDGET_ATOM(_false, "false") -WIDGET_ATOM(firsttab, "first-tab") WIDGET_ATOM(focused, "focused") WIDGET_ATOM(Forward, "Forward") WIDGET_ATOM(Home, "Home") @@ -85,7 +84,6 @@ WIDGET_ATOM(image, "image") WIDGET_ATOM(input, "input") WIDGET_ATOM(key, "key") // The key element / attribute WIDGET_ATOM(label, "label") -WIDGET_ATOM(lasttab, "last-tab") WIDGET_ATOM(max, "max") WIDGET_ATOM(maxpos, "maxpos") WIDGET_ATOM(menu, "menu") // Represents an XP menu