43457: change the mutable style context APIs, disable style context sharing, implement style data sharing. r=waterson.

git-svn-id: svn://10.0.0.236/trunk@93798 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pierre%netscape.com
2001-05-03 13:20:48 +00:00
parent f92784da06
commit 287fc1dc9e
53 changed files with 9721 additions and 4961 deletions

View File

@@ -37,6 +37,7 @@
#include "nsICSSStyleSheet.h"
#include "nsNetUtil.h"
#include "nsIStyleRuleSupplier.h"
#include "nsISizeOfHandler.h"
#ifdef MOZ_PERF_METRICS
#include "nsITimeRecorder.h"
@@ -49,18 +50,8 @@
#define STYLESET_STOP_TIMER(a) ((void)0)
#endif
#include "nsISizeOfHandler.h"
static NS_DEFINE_IID(kIStyleFrameConstructionIID, NS_ISTYLE_FRAME_CONSTRUCTION_IID);
// - fast cache uses a CRC32 on the style context to quickly find sharing candidates.
// Enabling it by defining USE_FAST_CACHE makes style sharing significantly faster
// but introduces more code and logic, and is thus potentially more error-prone
// - Enabled by default: disable to determine if there are problems in the fast-cache
// NOTE: make sure the define COMPUTE_STYLEDATA_CRC is ON in nsStyleContext.cpp for
// this to be affective...
#define USE_FAST_CACHE
#ifdef USE_FAST_CACHE
///////////////////////////////////////
// DEBUG defines for the fast cache:
@@ -78,6 +69,7 @@ static NS_DEFINE_IID(kIStyleFrameConstructionIID, NS_ISTYLE_FRAME_CONSTRUCTION_I
#ifdef USE_FAST_CACHE
#include "nsHashtable.h"
PRBool PR_CALLBACK HashTableEnumDestroy(nsHashKey *aKey, void *aData, void* closure);
PRBool PR_CALLBACK HashTableEnumDump(nsHashKey *aKey, void *aData, void* closure);
PRBool PR_CALLBACK HashTableEnumTickle(nsHashKey *aKey, void *aData, void* closure);