mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 773296 - Part 14: Add an nsCSSProps::IsInherited function. r=dbaron
Add a helper function to nsCSSProps to look up whether a given nsCSSProperty lives in a style struct for inherited properties.
This commit is contained in:
parent
ee52e01c4a
commit
83df25c044
@ -349,6 +349,15 @@ nsCSSProps::ReleaseTable(void)
|
||||
// Length of the "var-" custom property name prefix.
|
||||
#define VAR_PREFIX_LENGTH 4
|
||||
|
||||
/* static */ bool
|
||||
nsCSSProps::IsInherited(nsCSSProperty aProperty)
|
||||
{
|
||||
MOZ_ASSERT(!IsShorthand(aProperty));
|
||||
|
||||
nsStyleStructID sid = kSIDTable[aProperty];
|
||||
return nsCachedStyleData::IsInherited(sid);
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
nsCSSProps::IsCustomPropertyName(const nsACString& aProperty)
|
||||
{
|
||||
|
@ -270,6 +270,9 @@ public:
|
||||
return (aProperty >= eCSSProperty_COUNT_no_shorthands);
|
||||
}
|
||||
|
||||
// Must be given a longhand property.
|
||||
static bool IsInherited(nsCSSProperty aProperty);
|
||||
|
||||
// Same but for @font-face descriptors
|
||||
static nsCSSFontDesc LookupFontDesc(const nsAString& aProperty);
|
||||
static nsCSSFontDesc LookupFontDesc(const nsACString& aProperty);
|
||||
|
Loading…
Reference in New Issue
Block a user