adding new XBL form widget stylesheets. a=ben@netscape.com

This commit is contained in:
hyatt%netscape.com 2000-12-01 08:47:19 +00:00
parent 7eedb69301
commit 89a3b213f3
15 changed files with 187 additions and 2 deletions

View File

@ -931,6 +931,7 @@ sub InstallNonChromeResources()
my($builtin_dir) = "$resource_dir" . "builtin:";
MakeAlias(":mozilla:layout:xbl:builtin:htmlbindings.xml", "$builtin_dir");
MakeAlias(":mozilla:layout:xbl:builtin:mac:platformHTMLBindings.xml", "$builtin_dir");
MakeAlias(":mozilla:layout:xbl:builtin:mac:xbl-forms.css", "$builtin_dir");
print("--- End Resource copying ----\n");
}

View File

@ -77,12 +77,14 @@
#include "nsInt64.h"
#include "nsIDirectoryService.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsIPref.h"
static char kChromePrefix[] = "chrome://";
static char kAllPackagesName[] = "all-packages.rdf";
static char kAllSkinsName[] = "all-skins.rdf";
static char kAllLocalesName[] = "all-locales.rdf";
static char kInstalledChromeFileName[] = "installed-chrome.txt";
static char kUseXBLFormsPref[] = "nglayout.debug.enable_xbl_forms";
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
@ -91,6 +93,7 @@ static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID);
static NS_DEFINE_CID(kImageManagerCID, NS_IMAGEMANAGER_CID);
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);
class nsChromeRegistry;
@ -222,6 +225,13 @@ nsChromeRegistry::nsChromeRegistry()
mInstallInitialized = PR_FALSE;
mProfileInitialized = PR_FALSE;
mUseXBLForms = PR_FALSE;
nsCOMPtr<nsIPref> prefService(do_GetService(kPrefServiceCID));
if (prefService)
prefService->GetBoolPref(kUseXBLFormsPref, &mUseXBLForms);
mDataSourceTable = nsnull;
nsresult rv;
@ -2462,7 +2472,8 @@ nsresult nsChromeRegistry::GetUserSheetURL(PRBool aIsChrome, nsCString & aURL)
nsresult nsChromeRegistry::GetFormSheetURL(nsCString& aURL)
{
aURL = "resource:/res/forms.css"; // XXX This is going to get complicated.
aURL = mUseXBLForms ? "resource:/res/builtin/xbl-forms.css" : "resource:/res/forms.css";
return NS_OK;
}

View File

@ -138,6 +138,9 @@ private:
protected:
PRBool mInstallInitialized;
PRBool mProfileInitialized;
PRBool mUseXBLForms;
nsCString mProfileRoot;
nsCString mInstallRoot;

View File

@ -0,0 +1,25 @@
/*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/**
Styles for Macintosh form widgets implemented in XBL
**/

View File

@ -30,3 +30,4 @@ include $(topsrcdir)/config/rules.mk
install:: $(TARGETS)
$(INSTALL) $(srcdir)/platformHTMLBindings.xml $(DIST)/bin/res/builtin
$(INSTALL) $(srcdir)/xbl-forms.css $(DIST)/bin/res/builtin

View File

@ -0,0 +1,25 @@
/*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/**
Styles for Windows form widgets implemented in XBL
**/

View File

@ -25,6 +25,8 @@ include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) platformHTMLBindings.xml $(DIST)\bin\res\builtin
$(MAKE_INSTALL) xbl-forms.css $(DIST)\bin\res\builtin
clobber::
rm -f $(DIST)\bin\res\builtin\platformHTMLBindings.xml
rm -f $(DIST)\bin\res\builtin\xbl-forms.css

View File

@ -0,0 +1,25 @@
/*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/**
Styles for Windows form widgets implemented in XBL
**/

View File

@ -0,0 +1,25 @@
/*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/**
Styles for Macintosh form widgets implemented in XBL
**/

View File

@ -30,3 +30,4 @@ include $(topsrcdir)/config/rules.mk
install:: $(TARGETS)
$(INSTALL) $(srcdir)/platformHTMLBindings.xml $(DIST)/bin/res/builtin
$(INSTALL) $(srcdir)/xbl-forms.css $(DIST)/bin/res/builtin

View File

@ -0,0 +1,25 @@
/*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/**
Styles for Windows form widgets implemented in XBL
**/

View File

@ -25,6 +25,8 @@ include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) platformHTMLBindings.xml $(DIST)\bin\res\builtin
$(MAKE_INSTALL) xbl-forms.css $(DIST)\bin\res\builtin
clobber::
rm -f $(DIST)\bin\res\builtin\platformHTMLBindings.xml
rm -f $(DIST)\bin\res\builtin\xbl-forms.css

View File

@ -0,0 +1,25 @@
/*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/**
Styles for Windows form widgets implemented in XBL
**/

View File

@ -77,12 +77,14 @@
#include "nsInt64.h"
#include "nsIDirectoryService.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsIPref.h"
static char kChromePrefix[] = "chrome://";
static char kAllPackagesName[] = "all-packages.rdf";
static char kAllSkinsName[] = "all-skins.rdf";
static char kAllLocalesName[] = "all-locales.rdf";
static char kInstalledChromeFileName[] = "installed-chrome.txt";
static char kUseXBLFormsPref[] = "nglayout.debug.enable_xbl_forms";
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
@ -91,6 +93,7 @@ static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID);
static NS_DEFINE_CID(kImageManagerCID, NS_IMAGEMANAGER_CID);
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);
class nsChromeRegistry;
@ -222,6 +225,13 @@ nsChromeRegistry::nsChromeRegistry()
mInstallInitialized = PR_FALSE;
mProfileInitialized = PR_FALSE;
mUseXBLForms = PR_FALSE;
nsCOMPtr<nsIPref> prefService(do_GetService(kPrefServiceCID));
if (prefService)
prefService->GetBoolPref(kUseXBLFormsPref, &mUseXBLForms);
mDataSourceTable = nsnull;
nsresult rv;
@ -2462,7 +2472,8 @@ nsresult nsChromeRegistry::GetUserSheetURL(PRBool aIsChrome, nsCString & aURL)
nsresult nsChromeRegistry::GetFormSheetURL(nsCString& aURL)
{
aURL = "resource:/res/forms.css"; // XXX This is going to get complicated.
aURL = mUseXBLForms ? "resource:/res/builtin/xbl-forms.css" : "resource:/res/forms.css";
return NS_OK;
}

View File

@ -138,6 +138,9 @@ private:
protected:
PRBool mInstallInitialized;
PRBool mProfileInitialized;
PRBool mUseXBLForms;
nsCString mProfileRoot;
nsCString mInstallRoot;