Bug 222654: global/scrollbars.css for native scrollbars different on Mac (many Firefox themes break scrollbars on Mac). Use nativescrollbars.css and xulscrollbars.css and ship both files on all platforms. r=neil, kevin, sr=bz

This commit is contained in:
steffen.wilberg%web.de 2005-08-14 16:23:37 +00:00
Родитель 12199852d5
Коммит 8f0dcbee49
13 изменённых файлов: 36 добавлений и 359 удалений

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

@ -47,7 +47,8 @@
<?xml-stylesheet href="chrome://global/skin/menubutton.css"?>
<?xml-stylesheet href="chrome://global/skin/menulist.css"?>
<?xml-stylesheet href="chrome://global/skin/radio.css"?>
<?xml-stylesheet href="chrome://global/skin/scrollbars.css"?>
<?xml-stylesheet href="chrome://global/skin/nativescrollbars.css"?>
<?xml-stylesheet href="chrome://global/skin/xulscrollbars.css"?>
<?xml-stylesheet href="chrome://global/skin/splitter.css"?>
<?xml-stylesheet href="chrome://global/skin/tabcontrol.css"?>
<?xml-stylesheet href="chrome://global/skin/tasksOverlay.css"?>

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

@ -80,12 +80,19 @@ nsLayoutStylesheetCache::ScrollbarsSheet()
if (!gStyleCache->mScrollbarsSheet) {
nsCOMPtr<nsIURI> sheetURI;
NS_NewURI(getter_AddRefs(sheetURI),
NS_LITERAL_CSTRING("chrome://global/skin/scrollbars.css"));
#ifdef XP_MACOSX
NS_LITERAL_CSTRING("chrome://global/skin/nativescrollbars.css"));
#else
NS_LITERAL_CSTRING("chrome://global/skin/xulscrollbars.css"));
#endif
if (sheetURI)
LoadSheet(sheetURI, gStyleCache->mScrollbarsSheet);
NS_ASSERTION(gStyleCache->mScrollbarsSheet, "Could not load scrollbars.css.");
#ifdef XP_MACOSX
NS_ASSERTION(gStyleCache->mScrollbarsSheet, "Could not load nativescrollbars.css.");
#else
NS_ASSERTION(gStyleCache->mScrollbarsSheet, "Could not load xulscrollbars.css.");
#endif
}
return gStyleCache->mScrollbarsSheet;

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

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
/* ===== scrollbars.css =================================================
/* ===== nativescrollbars.css ===========================================
== Styles used by native scrollbar-related elements.
======================================================================= */

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

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
/* ===== scrollbars.css =================================================
/* ===== xulscrollbars.css ==============================================
== Styles used by XUL scrollbar-related elements.
======================================================================= */

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

@ -142,8 +142,6 @@ classic.jar:
skin/classic/global/preview.gif (global/mac/preview.gif)
skin/classic/global/progressmeter.css (global/mac/progressmeter.css)
skin/classic/global/radio.css (global/mac/radio.css)
# use native scrollbars over xul scrollbars for mac classic skin.
skin/classic/global/scrollbars.css (global/mac/nativescrollbars.css)
skin/classic/global/scrollbox.css (global/mac/scrollbox.css)
skin/classic/global/spinbuttons.css (global/mac/spinbuttons.css)
skin/classic/global/splitter.css (global/mac/splitter.css)
@ -255,7 +253,6 @@ classic.jar:
skin/classic/global/menulist.css (global/win/menulist.css)
skin/classic/global/popup.css (global/win/popup.css)
skin/classic/global/progressmeter.css (global/win/progressmeter.css)
skin/classic/global/scrollbars.css (global/win/scrollbars.css)
skin/classic/global/scrollbox.css (global/win/scrollbox.css)
skin/classic/global/spinbuttons.css (global/win/spinbuttons.css)
skin/classic/global/splitter.css (global/win/splitter.css)
@ -294,6 +291,10 @@ classic.jar:
skin/classic/global/netError.css (global/netError.css)
skin/classic/global/plugins.css (global/plugins.css)
skin/classic/global/printing.css (global/printing.css)
# chrome://global/skin/nativescrollbars.css is used on Mac
skin/classic/global/nativescrollbars.css (global/mac/nativescrollbars.css)
# chrome://global/skin/xulscrollbars.css is used on non-Mac platforms
skin/classic/global/xulscrollbars.css (global/win/scrollbars.css)
skin/classic/global/filepicker/blank.gif (global/filepicker/blank.gif)
skin/classic/global/filepicker/dir-closed.gif (global/filepicker/dir-closed.gif)
skin/classic/global/filepicker/dir-open.gif (global/filepicker/dir-open.gif)

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

@ -170,7 +170,10 @@ modern.jar:
skin/modern/global/toolbar.css (global/toolbar.css)
skin/modern/global/dialog.css (global/dialog.css)
skin/modern/global/browser.css (global/browser.css)
skin/modern/global/scrollbars.css (global/scrollbars.css)
# referenced as chrome://global/skin/nativescrollbars.css on Mac
skin/modern/global/nativescrollbars.css (global/scrollbars.css)
# referenced as chrome://global/skin/xulscrollbars.css on non-Mac platforms
skin/modern/global/xulscrollbars.css (global/scrollbars.css)
skin/modern/global/scrollbars-mini.css (global/scrollbars-mini.css)
skin/modern/global/arrow/arrow-dn-dis.gif (global/arrow/arrow-dn-dis.gif)
skin/modern/global/arrow/arrow-dn.gif (global/arrow/arrow-dn.gif)

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

@ -39,7 +39,10 @@ classic.jar:
+ skin/classic/global/progressmeter.css
+ skin/classic/global/radio.css
+ skin/classic/global/richlistbox.css
+ skin/classic/global/scrollbars.css
# chrome://global/skin/nativescrollbars.css is used on Mac
+ skin/classic/global/nativescrollbars.css
# chrome://global/skin/xulscrollbars.css is used on non-Mac platforms
+ skin/classic/global/xulscrollbars.css (../../winstripe/global/xulscrollbars.css)
+ skin/classic/global/scrollbox.css
+ skin/classic/global/spinbuttons.css
+ skin/classic/global/splitter.css

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

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
/* ===== scrollbars.css =================================================
/* ===== nativescrollbars.css ===========================================
== Styles used by native scrollbar-related elements.
======================================================================= */

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

@ -1,82 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Joe Hewitt (hewitt@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* ===== scrollbars.css =================================================
== Styles used by native scrollbar-related elements.
======================================================================= */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
/* ::::: scrollbar ::::: */
scrollbar {
-moz-appearance: scrollbar;
-moz-binding: url(chrome://global/content/bindings/nativescrollbar.xml#scrollbar);
min-width: 16px;
cursor: default;
background-color: white;
}
/* ::::: square at the corner of two scrollbars ::::: */
scrollcorner {
-moz-binding: url(chrome://global/content/bindings/scrollbar.xml#scrollbar-base);
cursor: default;
background-color: white;
}
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
/* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
@media print {
html|div scrollbar {
-moz-appearance: scrollbar;
-moz-binding: url(chrome://global/content/bindings/nativescrollbar.xml#scrollbar);
min-width: 16px;
cursor: default;
}
}
/* ::::: slider ::::: */
thumb {
background: url("chrome://global/skin/icons/thumb.png") transparent center no-repeat;
min-width: 15px;
}

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

@ -35,7 +35,10 @@ classic.jar:
skin/classic/global/progressmeter.css
skin/classic/global/radio.css
skin/classic/global/richlistbox.css
skin/classic/global/scrollbars.css
# referenced as chrome://global/skin/nativescrollbars.css on Mac
skin/classic/global/nativescrollbars.css (scrollbars.css)
# referenced as chrome://global/skin/xulscrollbars.css on non-Mac platforms
skin/classic/global/xulscrollbars.css (scrollbars.css)
skin/classic/global/scrollbox.css
skin/classic/global/spinbuttons.css
skin/classic/global/splitter.css

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

@ -28,7 +28,10 @@ classic.jar:
skin/classic/global/progressmeter.css
skin/classic/global/radio.css
skin/classic/global/richlistbox.css
skin/classic/global/scrollbars.css
# chrome://global/skin/nativescrollbars.css is used on Mac
skin/classic/global/nativescrollbars.css (../../pinstripe/global/nativescrollbars.css)
# chrome://global/skin/xulscrollbars.css is used on non-Mac platforms
skin/classic/global/xulscrollbars.css
skin/classic/global/scrollbox.css
skin/classic/global/spinbuttons.css
skin/classic/global/splitter.css

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

@ -1,262 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998-2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Joe Hewitt (hewitt@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* ===== scrollbars.css =================================================
== Styles used by XUL scrollbar-related elements.
======================================================================= */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */
/* ::::: scrollbar ::::: */
scrollbar {
-moz-appearance: scrollbartrack-horizontal;
-moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar");
cursor: default;
background: url("chrome://global/skin/scrollbar/slider.gif") scrollbar;
}
scrollbar[orient="vertical"]
{
-moz-appearance: scrollbartrack-vertical;
}
/* ::::: borders for thumb and buttons ::::: */
thumb,
scrollbarbutton {
border: 2px solid;
-moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
background-color: -moz-Dialog;
}
/* ::::: thumb (horizontal) ::::: */
thumb {
-moz-appearance: scrollbarthumb-vertical;
min-height: 8px;
}
thumb[orient="horizontal"] {
-moz-appearance: scrollbarthumb-horizontal;
min-width: 8px;
}
thumb > gripper {
-moz-appearance: scrollbargripper-vertical;
}
thumb[orient="horizontal"] > gripper {
-moz-appearance: scrollbargripper-horizontal;
}
/* ::::: scrollbar button ::::: */
scrollbarbutton {
background: -moz-Dialog no-repeat 0px 1px;
min-width: 16px;
min-height: 16px;
}
scrollbarbutton:hover:active {
-moz-border-top-colors: ThreeDShadow -moz-Dialog;
-moz-border-right-colors: ThreeDShadow -moz-Dialog;
-moz-border-bottom-colors: ThreeDShadow -moz-Dialog;
-moz-border-left-colors: ThreeDShadow -moz-Dialog;
background-position: 1px 2px;
}
/* ::::: square at the corner of two scrollbars ::::: */
scrollcorner {
-moz-binding: url(chrome://global/content/bindings/scrollbar.xml#scrollbar-base);
cursor: default;
background-color: -moz-Dialog;
}
/* ..... increment .... */
scrollbarbutton[type="increment"] {
-moz-appearance: scrollbarbutton-right;
background-image: url("chrome://global/skin/arrow/arrow-rit.gif")
}
scrollbarbutton[type="increment"][disabled="true"] {
background-image: url("chrome://global/skin/arrow/arrow-rit-dis.gif")
}
scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] {
-moz-appearance: scrollbarbutton-down;
background-image: url("chrome://global/skin/arrow/arrow-dn.gif")
}
scrollbar[orient="vertical"] > scrollbarbutton[type="increment"][disabled="true"] {
background-image: url("chrome://global/skin/arrow/arrow-dn-dis.gif")
}
/* ..... decrement .... */
scrollbarbutton[type="decrement"] {
-moz-appearance: scrollbarbutton-left;
background-image: url("chrome://global/skin/arrow/arrow-lft.gif")
}
scrollbarbutton[type="decrement"][disabled="true"] {
background-image: url("chrome://global/skin/arrow/arrow-lft-dis.gif")
}
scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
-moz-appearance: scrollbarbutton-up;
background-image: url("chrome://global/skin/arrow/arrow-up.gif")
}
scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"][disabled="true"] {
background-image: url("chrome://global/skin/arrow/arrow-up-dis.gif")
}
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
/* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */
/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
@media print {
/* ::::: scrollbar ::::: */
html|div scrollbar {
-moz-appearance: scrollbartrack-horizontal;
-moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar");
cursor: default;
background: url("chrome://global/skin/scrollbar/slider.gif") scrollbar;
}
html|div scrollbar[orient="vertical"]
{
-moz-appearance: scrollbartrack-vertical;
}
/* ::::: borders for thumb and buttons ::::: */
html|div thumb,
html|div scrollbarbutton {
border: 2px solid;
-moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
background-color: -moz-Dialog;
}
/* ::::: thumb (horizontal) ::::: */
html|div thumb {
-moz-appearance: scrollbarthumb-vertical;
min-height: 8px;
}
html|div thumb[orient="horizontal"] {
-moz-appearance: scrollbarthumb-horizontal;
min-width: 8px;
}
html|div thumb > gripper {
-moz-appearance: scrollbargripper-vertical;
}
html|div thumb[orient="horizontal"] > gripper {
-moz-appearance: scrollbargripper-horizontal;
}
/* ::::: scrollbar button ::::: */
html|div scrollbarbutton {
background: -moz-Dialog no-repeat 0px 1px;
min-width: 16px;
min-height: 16px;
}
html|div scrollbarbutton:hover:active {
-moz-border-top-colors: ThreeDShadow -moz-Dialog;
-moz-border-right-colors: ThreeDShadow -moz-Dialog;
-moz-border-bottom-colors: ThreeDShadow -moz-Dialog;
-moz-border-left-colors: ThreeDShadow -moz-Dialog;
background-position: 1px 2px;
}
/* ..... increment .... */
html|div scrollbarbutton[type="increment"] {
-moz-appearance: scrollbarbutton-right;
background-image: url("chrome://global/skin/arrow/arrow-rit.gif")
}
html|div scrollbarbutton[type="increment"][disabled="true"] {
background-image: url("chrome://global/skin/arrow/arrow-rit-dis.gif")
}
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] {
-moz-appearance: scrollbarbutton-down;
background-image: url("chrome://global/skin/arrow/arrow-dn.gif")
}
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="increment"][disabled="true"] {
background-image: url("chrome://global/skin/arrow/arrow-dn-dis.gif")
}
/* ..... decrement .... */
html|div scrollbarbutton[type="decrement"] {
-moz-appearance: scrollbarbutton-left;
background-image: url("chrome://global/skin/arrow/arrow-lft.gif")
}
html|div scrollbarbutton[type="decrement"][disabled="true"] {
background-image: url("chrome://global/skin/arrow/arrow-lft-dis.gif")
}
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
-moz-appearance: scrollbarbutton-up;
background-image: url("chrome://global/skin/arrow/arrow-up.gif")
}
html|div scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"][disabled="true"] {
background-image: url("chrome://global/skin/arrow/arrow-up-dis.gif")
}
}

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

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
/* ===== scrollbars.css =================================================
/* ===== xulscrollbars.css ==============================================
== Styles used by XUL scrollbar-related elements.
======================================================================= */