mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
adding new XBL form widget stylesheets. a=ben@netscape.com
This commit is contained in:
parent
7eedb69301
commit
89a3b213f3
@ -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");
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -138,6 +138,9 @@ private:
|
||||
protected:
|
||||
PRBool mInstallInitialized;
|
||||
PRBool mProfileInitialized;
|
||||
|
||||
PRBool mUseXBLForms;
|
||||
|
||||
nsCString mProfileRoot;
|
||||
nsCString mInstallRoot;
|
||||
|
||||
|
25
content/xbl/builtin/mac/xbl-forms.css
Normal file
25
content/xbl/builtin/mac/xbl-forms.css
Normal 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
|
||||
**/
|
||||
|
@ -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
|
||||
|
25
content/xbl/builtin/unix/xbl-forms.css
Normal file
25
content/xbl/builtin/unix/xbl-forms.css
Normal 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
|
||||
**/
|
||||
|
@ -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
|
||||
|
25
content/xbl/builtin/win/xbl-forms.css
Normal file
25
content/xbl/builtin/win/xbl-forms.css
Normal 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
|
||||
**/
|
||||
|
25
layout/xbl/builtin/mac/xbl-forms.css
Normal file
25
layout/xbl/builtin/mac/xbl-forms.css
Normal 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
|
||||
**/
|
||||
|
@ -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
|
||||
|
25
layout/xbl/builtin/unix/xbl-forms.css
Normal file
25
layout/xbl/builtin/unix/xbl-forms.css
Normal 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
|
||||
**/
|
||||
|
@ -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
|
||||
|
25
layout/xbl/builtin/win/xbl-forms.css
Normal file
25
layout/xbl/builtin/win/xbl-forms.css
Normal 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
|
||||
**/
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -138,6 +138,9 @@ private:
|
||||
protected:
|
||||
PRBool mInstallInitialized;
|
||||
PRBool mProfileInitialized;
|
||||
|
||||
PRBool mUseXBLForms;
|
||||
|
||||
nsCString mProfileRoot;
|
||||
nsCString mInstallRoot;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user