Bug 70714 - visited link doesn't change color in embedding apps. The patch turns on the building of the embed-lite component which implements global history with less footprint and is exported to Embed dist. r=chak/sr=alecf

This commit is contained in:
ccarlen%netscape.com 2003-01-11 03:02:33 +00:00
parent 720143a97b
commit 19f4beea9f
7 changed files with 18 additions and 23 deletions

View File

@ -25,6 +25,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk
DIRS = base components browser DIRS = base components browser lite
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk

View File

@ -76,6 +76,7 @@ endif
fi fi
$(NSINSTALL) -t $(srcdir)/installed-chrome.txt $(DIST)/Embed/chrome $(NSINSTALL) -t $(srcdir)/installed-chrome.txt $(DIST)/Embed/chrome
$(NSINSTALL) -t $(srcdir)/readme.html $(DIST)/Embed $(NSINSTALL) -t $(srcdir)/readme.html $(DIST)/Embed
$(NSINSTALL) -t $(topsrcdir)/embedding/lite/$(LIB_PREFIX)embed_lite$(DLL_SUFFIX) $(DIST)/Embed/components
ifeq ($(OS_ARCH),WINNT) ifeq ($(OS_ARCH),WINNT)
ifeq ($(WINAPP),mfcembed) ifeq ($(WINAPP),mfcembed)
$(NSINSTALL) -t $(DIST)/bin/mfcembed.exe $(DIST)/Embed $(NSINSTALL) -t $(DIST)/bin/mfcembed.exe $(DIST)/Embed

View File

@ -40,6 +40,7 @@ REQUIRES = xpcom \
xpconnect \ xpconnect \
js \ js \
xuldoc \ xuldoc \
appcomps \
$(NULL) $(NULL)
CPPSRCS = \ CPPSRCS = \
@ -49,7 +50,7 @@ CPPSRCS = \
$(NULL) $(NULL)
# bring in the chrome protocol handler # bring in the chrome protocol handler
LOBJS = $(topsrcdir)/rdf/chrome/src/nsChromeProtocolHandler.$(OBJ_SUFFIX) # LOBJS = $(topsrcdir)/rdf/chrome/src/nsChromeProtocolHandler.$(OBJ_SUFFIX)
LOCAL_INCLUDES = -I$(DEPTH)/rdf/chrome/src LOCAL_INCLUDES = -I$(DEPTH)/rdf/chrome/src

View File

@ -216,7 +216,6 @@ nsEmbedChromeRegistry::ReadChromeRegistry()
nsresult nsresult
nsEmbedChromeRegistry::ProcessNewChromeBuffer(char* aBuffer, PRInt32 aLength) nsEmbedChromeRegistry::ProcessNewChromeBuffer(char* aBuffer, PRInt32 aLength)
{ {
nsresult rv = NS_OK;
while (aLength > 0) { while (aLength > 0) {
PRInt32 processedBytes = ProcessChromeLine(aBuffer, aLength); PRInt32 processedBytes = ProcessChromeLine(aBuffer, aLength);
aBuffer += processedBytes; aBuffer += processedBytes;
@ -347,17 +346,13 @@ nsEmbedChromeRegistry::Canonify(nsIURI* aChromeURI)
} }
NS_IMETHODIMP NS_IMETHODIMP
nsEmbedChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL, char** aResult) nsEmbedChromeRegistry::ConvertChromeURL(nsIURI* aChromeURL, nsACString& aResult)
{ {
nsresult rv; nsresult rv;
nsCAutoString finalURL; rv = aChromeURL->GetSpec(aResult);
rv = aChromeURL->GetSpec(finalURL);
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
*aResult = ToNewCString(finalURL);
if (!*aResult) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK; return NS_OK;
} }

View File

@ -41,7 +41,7 @@
#include "nsIObserverService.h" #include "nsIObserverService.h"
#include "nsWeakReference.h" #include "nsWeakReference.h"
#include "nsAppDirectoryServiceDefs.h" #include "nsAppDirectoryServiceDefs.h"
#include "nsHashTable.h" #include "nsHashtable.h"
#include "nsInt64.h" #include "nsInt64.h"
#include "prtypes.h" #include "prtypes.h"
#include "nsFixedSizeAllocator.h" #include "nsFixedSizeAllocator.h"
@ -93,7 +93,7 @@ public:
{ mWritten = PR_TRUE; } { mWritten = PR_TRUE; }
// Memory management stuff // Memory management stuff
static void* operator new(size_t size); static void* operator new(size_t size) CPP_THROW_NEW;
static void operator delete(void *p, size_t size); static void operator delete(void *p, size_t size);
// Must be called when done with all HistoryEntry objects // Must be called when done with all HistoryEntry objects
@ -111,7 +111,7 @@ nsFixedSizeAllocator *HistoryEntry::sPool;
//***************************************************************************** //*****************************************************************************
void* HistoryEntry::operator new(size_t size) void* HistoryEntry::operator new(size_t size) CPP_THROW_NEW
{ {
if (size != sizeof(HistoryEntry)) if (size != sizeof(HistoryEntry))
return ::operator new(size); return ::operator new(size);
@ -168,9 +168,7 @@ NS_IMPL_ISUPPORTS3(nsEmbedGlobalHistory, nsIGlobalHistory, nsIObserver, nsISuppo
nsEmbedGlobalHistory::nsEmbedGlobalHistory() : nsEmbedGlobalHistory::nsEmbedGlobalHistory() :
mDataIsLoaded(PR_FALSE), mEntriesAddedSinceFlush(0), mDataIsLoaded(PR_FALSE), mEntriesAddedSinceFlush(0),
mURLTable(nsnull) mURLTable(nsnull)
{ {
NS_INIT_REFCNT();
LL_I2L(mExpirationInterval, kDefaultExpirationIntervalDays); LL_I2L(mExpirationInterval, kDefaultExpirationIntervalDays);
LL_MUL(mExpirationInterval, mExpirationInterval, kMSecsPerDay); LL_MUL(mExpirationInterval, mExpirationInterval, kMSecsPerDay);
} }

View File

@ -87,7 +87,7 @@ protected:
protected: protected:
PRBool mDataIsLoaded; PRBool mDataIsLoaded;
PRUint32 mEntriesAddedSinceFlush; PRInt32 mEntriesAddedSinceFlush;
nsCOMPtr<nsILocalFile> mHistoryFile; nsCOMPtr<nsILocalFile> mHistoryFile;
nsHashtable *mURLTable; nsHashtable *mURLTable;
PRInt64 mExpirationInterval; PRInt64 mExpirationInterval;

View File

@ -42,27 +42,27 @@
#include "nsEmbedGlobalHistory.h" #include "nsEmbedGlobalHistory.h"
#include "nsChromeProtocolHandler.h" #include "nsChromeProtocolHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsEmbedChromeRegistry, Init) //NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsEmbedChromeRegistry, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsEmbedGlobalHistory, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsEmbedGlobalHistory, Init)
static const nsModuleComponentInfo components[] = static const nsModuleComponentInfo components[] =
{ {
#if 1 // Don't hook up until implementation is finished #if 0 // Don't hook up until implementation is finished
{ "Chrome Registry", { "Chrome Registry",
NS_EMBEDCHROMEREGISTRY_CID, NS_EMBEDCHROMEREGISTRY_CID,
"@mozilla.org/chrome/chrome-registry;1", "@mozilla.org/chrome/chrome-registry;1",
nsEmbedChromeRegistryConstructor, nsEmbedChromeRegistryConstructor,
}, },
{ "Chrome Protocol Handler",
NS_CHROMEPROTOCOLHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "chrome",
nsChromeProtocolHandler::Create
},
#endif #endif
{ "Global History", { "Global History",
NS_EMBEDGLOBALHISTORY_CID, NS_EMBEDGLOBALHISTORY_CID,
"@mozilla.org/browser/global-history;1", "@mozilla.org/browser/global-history;1",
nsEmbedGlobalHistoryConstructor, nsEmbedGlobalHistoryConstructor,
},
{ "Chrome Protocol Handler",
NS_CHROMEPROTOCOLHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "chrome",
nsChromeProtocolHandler::Create
} }
}; };