Bug 1449039 part 10 - Remove PredefinedCounterStyleTable. r=emilio

MozReview-Commit-ID: AeYqai3Nr72

--HG--
extra : rebase_source : d648c1334e6eb93e647c2da88b6c17100c1d48b1
This commit is contained in:
Xidorn Quan 2018-03-27 12:51:10 +11:00
parent 3575d0a179
commit db2509cfaf
2 changed files with 0 additions and 30 deletions

View File

@ -84,7 +84,6 @@ static int32_t gPropertyTableRefCount;
static nsStaticCaseInsensitiveNameTable* gPropertyTable;
static nsStaticCaseInsensitiveNameTable* gFontDescTable;
static nsStaticCaseInsensitiveNameTable* gCounterDescTable;
static nsStaticCaseInsensitiveNameTable* gPredefinedCounterStyleTable;
static nsDataHashtable<nsCStringHashKey,nsCSSPropertyID>* gPropertyIDLNameTable;
static const char* const kCSSRawFontDescs[] = {
@ -163,7 +162,6 @@ nsCSSProps::AddRefTable(void)
MOZ_ASSERT(!gPropertyTable, "pre existing array!");
MOZ_ASSERT(!gFontDescTable, "pre existing array!");
MOZ_ASSERT(!gCounterDescTable, "pre existing array!");
MOZ_ASSERT(!gPredefinedCounterStyleTable, "pre existing array!");
MOZ_ASSERT(!gPropertyIDLNameTable, "pre existing array!");
gPropertyTable = CreateStaticTable(
@ -171,9 +169,6 @@ nsCSSProps::AddRefTable(void)
gFontDescTable = CreateStaticTable(kCSSRawFontDescs, eCSSFontDesc_COUNT);
gCounterDescTable = CreateStaticTable(
kCSSRawCounterDescs, eCSSCounterDesc_COUNT);
gPredefinedCounterStyleTable = CreateStaticTable(
kCSSRawPredefinedCounterStyles,
ArrayLength(kCSSRawPredefinedCounterStyles));
gPropertyIDLNameTable = new nsDataHashtable<nsCStringHashKey,nsCSSPropertyID>;
for (nsCSSPropertyID p = nsCSSPropertyID(0);
@ -299,9 +294,6 @@ nsCSSProps::ReleaseTable(void)
delete gCounterDescTable;
gCounterDescTable = nullptr;
delete gPredefinedCounterStyleTable;
gPredefinedCounterStyleTable = nullptr;
delete gPropertyIDLNameTable;
gPropertyIDLNameTable = nullptr;
}
@ -460,24 +452,6 @@ nsCSSProps::LookupCounterDesc(const nsACString& aProperty)
return nsCSSCounterDesc(gCounterDescTable->Lookup(aProperty));
}
bool
nsCSSProps::IsPredefinedCounterStyle(const nsAString& aStyle)
{
MOZ_ASSERT(gPredefinedCounterStyleTable,
"no lookup table, needs addref");
return gPredefinedCounterStyleTable->Lookup(aStyle) !=
nsStaticCaseInsensitiveNameTable::NOT_FOUND;
}
bool
nsCSSProps::IsPredefinedCounterStyle(const nsACString& aStyle)
{
MOZ_ASSERT(gPredefinedCounterStyleTable,
"no lookup table, needs addref");
return gPredefinedCounterStyleTable->Lookup(aStyle) !=
nsStaticCaseInsensitiveNameTable::NOT_FOUND;
}
const nsCString&
nsCSSProps::GetStringValue(nsCSSPropertyID aProperty)
{

View File

@ -301,10 +301,6 @@ public:
static nsCSSCounterDesc LookupCounterDesc(const nsAString& aProperty);
static nsCSSCounterDesc LookupCounterDesc(const nsACString& aProperty);
// For predefined counter styles which need to be lower-cased during parse
static bool IsPredefinedCounterStyle(const nsAString& aStyle);
static bool IsPredefinedCounterStyle(const nsACString& aStyle);
// Given a property enum, get the string value
static const nsCString& GetStringValue(nsCSSPropertyID aProperty);
static const nsCString& GetStringValue(nsCSSFontDesc aFontDesc);