diff --git a/mozilla/embedding/qa/jstests/ComponentListTest.txt b/mozilla/embedding/qa/jstests/ComponentListTest.txt index f2fc31dcd72..0217a08e685 100644 --- a/mozilla/embedding/qa/jstests/ComponentListTest.txt +++ b/mozilla/embedding/qa/jstests/ComponentListTest.txt @@ -154,8 +154,7 @@ function getComponentList() "nsIHelperAppLauncherDialog", "nsILocalFile", "nsIObserver", - "nsIPrefBranch", - "nsIFontList"); + "nsIPrefBranch"); for (var m=0; m - \ No newline at end of file + diff --git a/mozilla/embedding/qa/jstests/nsIFontListTest.txt b/mozilla/embedding/qa/jstests/nsIFontListTest.txt deleted file mode 100644 index 4df00a6b8f1..00000000000 --- a/mozilla/embedding/qa/jstests/nsIFontListTest.txt +++ /dev/null @@ -1,231 +0,0 @@ - - - - nsIFontList Interface Test - - - - - - - - - - - - -
- - -
- - - - \ No newline at end of file diff --git a/mozilla/gfx/idl/Makefile.in b/mozilla/gfx/idl/Makefile.in index 3be4b92dd6b..a697d6184ab 100644 --- a/mozilla/gfx/idl/Makefile.in +++ b/mozilla/gfx/idl/Makefile.in @@ -48,7 +48,6 @@ GRE_MODULE = 1 XPIDLSRCS = \ nsIFontEnumerator.idl \ - nsIFontList.idl \ nsIScriptableRegion.idl \ gfxIFormats.idl \ gfxIImageFrame.idl \ diff --git a/mozilla/gfx/idl/nsIFontList.idl b/mozilla/gfx/idl/nsIFontList.idl deleted file mode 100755 index ecf14eef4fd..00000000000 --- a/mozilla/gfx/idl/nsIFontList.idl +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** 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.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2001 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Brian Stell - * - * Alternatively, the contents of this file may be used under the terms of - * either of 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 ***** */ - -#include "nsISupports.idl" - -interface nsISimpleEnumerator; - -/** - * The nsIFontList interface provides an application the - * necessary information so that the user can select the font to use - * as the default style sheet. This is used if the style sheet is - * missing or does not specify a font. - *

Font lists are specified per language group. - * - */ - -[scriptable, uuid(702909c6-1dd2-11b2-b833-8a740f643539)] -interface nsIFontList : nsISupports -{ - - /** - * Get the list of available fonts for a language group - * and for use as the given CSS generic font. - * - * @param aLangGroup limits the fonts to fonts in a language - * group; eg: x-western (American/Western European), - * ar (Arabic), el (Greek), he (Hebrew), ja (Japanese), - * ko (Korean), th (Thai), tr (Turkish), - * x-baltic (Baltic), x-central-euro (Eastern European), - * x-cyrillic (Russian), zh-CN (China), zh-TW (Taiwan) - * - * @param aFontType limits the fonts to the fonts with this CSS - * generic font type; eg: serif, sans-serif, cursive, - * fantasy, monospace. - * - * @return a simple enumerator of the available fonts for a - * language group / generic type. These strings are - * the text supplied by the operating system's font - * system. - */ - nsISimpleEnumerator availableFonts(in wstring aLangGroup, - in wstring aFontType); -}; - diff --git a/mozilla/gfx/public/nsGfxCIID.h b/mozilla/gfx/public/nsGfxCIID.h index 513743214f1..30787a76cd9 100644 --- a/mozilla/gfx/public/nsGfxCIID.h +++ b/mozilla/gfx/public/nsGfxCIID.h @@ -62,10 +62,6 @@ { 0xa6cf9115, 0x15b3, 0x11d2, \ { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } -#define NS_FONTLIST_CID \ -{ 0x6a8c0dd4, 0x1dd2, 0x11b2, \ -{ 0x9a, 0x8f, 0xf8, 0x2f, 0x9d, 0xf2, 0x5b, 0x07 } } - #define NS_REGION_CID \ { 0xe12752f0, 0xee9a, 0x11d1, \ { 0xa8, 0x2a, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } } @@ -82,9 +78,4 @@ { 0x199c7040, 0xcab0, 0x11d2, \ { 0xa8, 0x49, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } } -#define NS_FONTCATALOGSERVICE_CID \ -{ 0xa3057187, 0xc40f, 0x4ffa, \ -{ 0x91, 0x60, 0x2b, 0x16, 0x48, 0x20, 0x53, 0xb1 } } - - #endif diff --git a/mozilla/gfx/src/Makefile.in b/mozilla/gfx/src/Makefile.in index 2b78dae053a..36bbc188113 100644 --- a/mozilla/gfx/src/Makefile.in +++ b/mozilla/gfx/src/Makefile.in @@ -77,7 +77,6 @@ CPPSRCS = \ nsColorNames.cpp \ nsDeviceContext.cpp \ nsFont.cpp \ - nsFontList.cpp \ nsRect.cpp \ nsRegion.cpp \ nsTransform2D.cpp \ diff --git a/mozilla/gfx/src/beos/nsGfxFactoryBeOS.cpp b/mozilla/gfx/src/beos/nsGfxFactoryBeOS.cpp index ae99c685fe6..d6702890f57 100644 --- a/mozilla/gfx/src/beos/nsGfxFactoryBeOS.cpp +++ b/mozilla/gfx/src/beos/nsGfxFactoryBeOS.cpp @@ -46,7 +46,6 @@ #include "nsScriptableRegion.h" #include "nsDeviceContextBeOS.h" #include "nsImageBeOS.h" -#include "nsFontList.h" #include "gfxImageFrame.h" // objects that just require generic constructors @@ -58,7 +57,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsImageBeOS) NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlender) NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegionBeOS) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontEnumeratorBeOS) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontList) NS_GENERIC_FACTORY_CONSTRUCTOR(gfxImageFrame) @@ -146,11 +144,6 @@ static const nsModuleComponentInfo components[] = // "@mozilla.org/gfx/font_enumerator/beos;1", "@mozilla.org/gfx/fontenumerator;1", nsFontEnumeratorBeOSConstructor }, - { "Font List", - NS_FONTLIST_CID, - // "@mozilla.org/gfx/fontlist;1" - NS_FONTLIST_CONTRACTID, - nsFontListConstructor }, { "windows image frame", GFX_IMAGEFRAME_CID, "@mozilla.org/gfx/image/frame;2", diff --git a/mozilla/gfx/src/mac/nsGfxFactoryMac.cpp b/mozilla/gfx/src/mac/nsGfxFactoryMac.cpp index eb7b1cc5729..548abdeb7a3 100644 --- a/mozilla/gfx/src/mac/nsGfxFactoryMac.cpp +++ b/mozilla/gfx/src/mac/nsGfxFactoryMac.cpp @@ -39,9 +39,7 @@ #include "nscore.h" #include "nsIFactory.h" #include "nsISupports.h" -#include "nsIFontList.h" #include "nsGfxCIID.h" -#include "nsFontList.h" #include "nsFontMetricsMac.h" #include "nsRenderingContextMac.h" #include "nsImageMac.h" @@ -64,7 +62,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegionMac) NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlender) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDrawingSurfaceMac) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontEnumeratorMac) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontList) NS_GENERIC_FACTORY_CONSTRUCTOR(gfxImageFrame) static NS_IMETHODIMP @@ -118,10 +115,6 @@ static const nsModuleComponentInfo components[] = NS_FONT_ENUMERATOR_CID, "@mozilla.org/gfx/fontenumerator;1", nsFontEnumeratorMacConstructor }, - { "nsFontList", - NS_FONTLIST_CID, - "@mozilla.org/gfx/fontlist;1", - nsFontListConstructor }, { "windows image frame", GFX_IMAGEFRAME_CID, "@mozilla.org/gfx/image/frame;2", diff --git a/mozilla/gfx/src/nsFontList.cpp b/mozilla/gfx/src/nsFontList.cpp deleted file mode 100644 index b101969ef1b..00000000000 --- a/mozilla/gfx/src/nsFontList.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** 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) 2001 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Brian Stell - * - * Alternatively, the contents of this file may be used under the terms of - * either of 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 ***** */ - -/* - * Implementation of nsIFontList - */ - -#include "nsCOMPtr.h" -#include "nsXPCOM.h" -#include "nsFontList.h" -#include "nsGfxCIID.h" -#include "nsDependentString.h" -#include "nsIFontEnumerator.h" -#include "nsISimpleEnumerator.h" -#include "nsISupportsPrimitives.h" -#include "nsMemory.h" -#include "nsReadableUtils.h" -#include "nsXPIDLString.h" - -static NS_DEFINE_IID(kCFontEnumerator, NS_FONT_ENUMERATOR_CID); - -nsFontList::nsFontList() -{ -} - -nsFontList::~nsFontList() -{ -} - -NS_IMPL_ISUPPORTS1(nsFontList,nsIFontList) - -/* font list enumerator */ -class -nsFontListEnumerator : public nsISimpleEnumerator -{ - public: - nsFontListEnumerator(); - virtual ~nsFontListEnumerator(); - - // nsISupports interface - NS_DECL_ISUPPORTS - - // nsISimpleEnumerator interface - NS_DECL_NSISIMPLEENUMERATOR - - NS_IMETHOD Init(const PRUnichar *aLangGroup, const PRUnichar *aFontType); - - - protected: - PRUnichar **mFonts; - PRUint32 mCount; - PRUint32 mIndex; -}; - -nsFontListEnumerator::nsFontListEnumerator() : - mFonts(nsnull), mCount(0), mIndex(0) -{ -} - -nsFontListEnumerator::~nsFontListEnumerator() -{ - if (mFonts) { - PRUint32 i; - for (i=0; i fontEnumerator; - - fontEnumerator = do_CreateInstance(kCFontEnumerator, &rv); - if (NS_FAILED(rv)) - return rv; - - nsXPIDLCString langGroup; - langGroup.Adopt(ToNewUTF8String(nsDependentString(aLangGroup))); - nsXPIDLCString fontType; - fontType.Adopt(ToNewUTF8String(nsDependentString(aFontType))); - rv = fontEnumerator->EnumerateFonts(langGroup.get(), fontType.get(), - &mCount, &mFonts); - return rv; -} - -NS_IMETHODIMP -nsFontListEnumerator::HasMoreElements(PRBool *result) -{ - *result = (mIndex < mCount); - return NS_OK; -} - -NS_IMETHODIMP -nsFontListEnumerator::GetNext(nsISupports **aFont) -{ - NS_ENSURE_ARG_POINTER(aFont); - *aFont = nsnull; - if (mIndex >= mCount) { - return NS_ERROR_UNEXPECTED; - } - PRUnichar *fontName = mFonts[mIndex++]; - nsCOMPtr fontNameWrapper; - nsresult rv; - fontNameWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv); - NS_ENSURE_SUCCESS(rv, rv); - NS_ENSURE_TRUE(fontNameWrapper, NS_ERROR_OUT_OF_MEMORY); - fontNameWrapper->SetData(nsDependentString(fontName)); - *aFont = static_cast(fontNameWrapper); - NS_ADDREF(*aFont); - return NS_OK; -} - -NS_IMETHODIMP -nsFontList::AvailableFonts(const PRUnichar *aLangGroup, - const PRUnichar *aFontType, - nsISimpleEnumerator **aFontEnumerator) -{ - NS_ENSURE_ARG(aLangGroup); - NS_ENSURE_ARG(aFontType); - NS_ENSURE_ARG_POINTER(aFontEnumerator); - nsCOMPtr fontListEnum = new nsFontListEnumerator(); - NS_ENSURE_TRUE(fontListEnum.get(), NS_ERROR_OUT_OF_MEMORY); - - nsresult rv = fontListEnum->Init(aLangGroup, aFontType); - NS_ENSURE_SUCCESS(rv, rv); - - *aFontEnumerator = static_cast(fontListEnum); - NS_ADDREF(*aFontEnumerator); - return NS_OK; -} - diff --git a/mozilla/gfx/src/nsFontList.h b/mozilla/gfx/src/nsFontList.h deleted file mode 100644 index 05c495adaa2..00000000000 --- a/mozilla/gfx/src/nsFontList.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** 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) 2001 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Brian Stell - * - * Alternatively, the contents of this file may be used under the terms of - * either of 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 ***** */ - -/* - * Implementation of nsIFontList - */ - -#ifndef _nsFontList_H_ -#define _nsFontList_H_ - -#include "nsIFontList.h" -#include "gfxCore.h" - -#define NS_FONTLIST_CONTRACTID "@mozilla.org/gfx/fontlist;1" - - -class NS_GFX nsFontList : public nsIFontList -{ -public: - nsFontList(); - virtual ~nsFontList(); - - // nsISupports - NS_DECL_ISUPPORTS - - // nsIFontList - NS_DECL_NSIFONTLIST - -protected: - -}; - -#endif /* _nsFontList_H_ */ diff --git a/mozilla/gfx/src/photon/nsGfxFactoryPh.cpp b/mozilla/gfx/src/photon/nsGfxFactoryPh.cpp index 19d275a7982..c3146e516e4 100644 --- a/mozilla/gfx/src/photon/nsGfxFactoryPh.cpp +++ b/mozilla/gfx/src/photon/nsGfxFactoryPh.cpp @@ -50,7 +50,6 @@ #include "nsDeviceContextPh.h" #include "nsPrintOptionsPh.h" #include "nsPrintSession.h" -#include "nsFontList.h" #include "gfxImageFrame.h" // objects that just require generic constructors @@ -63,7 +62,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlender) NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegionPh) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecPh) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontEnumeratorPh) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontList) NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerPh) NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorPh) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintOptionsPh, Init) @@ -165,11 +163,6 @@ static const nsModuleComponentInfo components[] = "@mozilla.org/gfx/fontenumerator;1", nsFontEnumeratorPhConstructor }, - { "Font List", - NS_FONTLIST_CID, - NS_FONTLIST_CONTRACTID, - nsFontListConstructor }, - { "Ph Screen Manager", NS_SCREENMANAGER_CID, "@mozilla.org/gfx/screenmanager;1", diff --git a/mozilla/gfx/src/windows/nsGfxFactoryWin.cpp b/mozilla/gfx/src/windows/nsGfxFactoryWin.cpp index 8d924594546..5cd8af23a8e 100644 --- a/mozilla/gfx/src/windows/nsGfxFactoryWin.cpp +++ b/mozilla/gfx/src/windows/nsGfxFactoryWin.cpp @@ -46,7 +46,6 @@ #include "nsRegionWin.h" #include "nsBlender.h" #include "nsScriptableRegion.h" -#include "nsFontList.h" #include "nsIGenericFactory.h" #include "gfxImageFrame.h" @@ -60,7 +59,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlender) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDrawingSurfaceWin) //NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableRegion) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontEnumeratorWin) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontList) NS_GENERIC_FACTORY_CONSTRUCTOR(gfxImageFrame) PRBool @@ -185,11 +183,6 @@ static const nsModuleComponentInfo components[] = "@mozilla.org/gfx/fontenumerator;1", nsFontEnumeratorWinConstructor }, - { "nsFontList", - NS_FONTLIST_CID, - "@mozilla.org/gfx/fontlist;1", - nsFontListConstructor }, - { "windows image frame", GFX_IMAGEFRAME_CID, "@mozilla.org/gfx/image/frame;2",