Bug 1457802 part 1 - Remove nsCSSProps::GetColorName which is unused. r?heycam
MozReview-Commit-ID: GybpTh6GYYx
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -2088,33 +2088,16 @@ nsCSSProps::ValueToKeyword(int32_t aValu
if (keyword == eCSSKeyword_UNKNOWN) {
static nsDependentCString sNullStr("");
return sNullStr;
} else {
return nsCSSKeywords::GetStringValue(keyword);
}
}
-bool nsCSSProps::GetColorName(int32_t aPropValue, nsCString &aStr)
-{
- bool rv = false;
-
- // first get the keyword corresponding to the property Value from the color table
- nsCSSKeyword keyword = ValueToKeywordEnum(aPropValue, kColorKTable);
-
- // next get the name as a string from the keywords table
- if (keyword != eCSSKeyword_UNKNOWN) {
- nsCSSKeywords::AddRefTable();
- aStr = nsCSSKeywords::GetStringValue(keyword);
- nsCSSKeywords::ReleaseTable();
- rv = true;
- }
- return rv;
-}
-
const CSSPropFlags nsCSSProps::kFlagsTable[eCSSProperty_COUNT] = {
#define CSS_PROP_LONGHAND(name_, id_, method_, flags_, ...) flags_,
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, ...) flags_,
#include "mozilla/ServoCSSPropList.h"
#undef CSS_PROP_SHORTHAND
#undef CSS_PROP_LONGHAND
};
--- a/layout/style/nsCSSProps.h
+++ b/layout/style/nsCSSProps.h
@@ -95,20 +95,16 @@ public:
// Same but for @font-face descriptors
static nsCSSFontDesc LookupFontDesc(const nsAString& aProperty);
// Given a property enum, get the string value
static const nsCString& GetStringValue(nsCSSPropertyID aProperty);
static const nsCString& GetStringValue(nsCSSFontDesc aFontDesc);
static const nsCString& GetStringValue(nsCSSCounterDesc aCounterDesc);
- // Get a color name for a predefined color value like buttonhighlight or activeborder
- // Sets the aStr param to the name of the propertyID
- static bool GetColorName(int32_t aPropID, nsCString &aStr);
-
// Returns the index of |aKeyword| in |aTable|, if it exists there;
// otherwise, returns -1.
// NOTE: Generally, clients should call FindKeyword() instead of this method.
static int32_t FindIndexOfKeyword(nsCSSKeyword aKeyword,
const KTableEntry aTable[]);
// Find |aKeyword| in |aTable|, if found set |aValue| to its corresponding value.
// If not found, return false and do not set |aValue|.