mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Add fields to nsCSSPropList.h for style struct offset and animation type. (Bug 504652) r=bzbarsky
This commit is contained in:
parent
b8c5e7827d
commit
7b15f79138
@ -572,7 +572,7 @@ nsCSSExpandedDataBlock::kOffsetTable[eCSSProperty_COUNT_no_shorthands] = {
|
||||
{ offsetof(nsCSSExpandedDataBlock, m##datastruct_.member_), \
|
||||
size_t(-1), \
|
||||
size_t(-1) },
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) \
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
||||
{ offsetof(nsCSSExpandedDataBlock, m##datastruct_.member_), \
|
||||
offsetof(nsRuleData, m##datastruct_##Data), \
|
||||
offsetof(nsRuleData##datastruct_, member_) },
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -51,7 +51,7 @@
|
||||
enum nsCSSProperty {
|
||||
eCSSProperty_UNKNOWN = -1,
|
||||
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) eCSSProperty_##id_,
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) eCSSProperty_##id_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP
|
||||
|
||||
|
@ -59,7 +59,7 @@ extern const char* const kCSSRawProperties[];
|
||||
|
||||
// define an array of all CSS properties
|
||||
const char* const kCSSRawProperties[] = {
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) #name_,
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) #name_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP
|
||||
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) #name_,
|
||||
@ -1380,7 +1380,7 @@ nsCSSProps::ValueToKeyword(PRInt32 aValue, const PRInt32 aTable[])
|
||||
|
||||
/* static */ const PRInt32* const
|
||||
nsCSSProps::kKeywordTableTable[eCSSProperty_COUNT_no_shorthands] = {
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) kwtable_,
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) kwtable_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP
|
||||
};
|
||||
@ -1420,7 +1420,7 @@ PRBool nsCSSProps::GetColorName(PRInt32 aPropValue, nsCString &aStr)
|
||||
|
||||
// define array of all CSS property types
|
||||
const nsCSSType nsCSSProps::kTypeTable[eCSSProperty_COUNT_no_shorthands] = {
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) type_,
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) type_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP
|
||||
};
|
||||
@ -1429,20 +1429,36 @@ const nsStyleStructID nsCSSProps::kSIDTable[eCSSProperty_COUNT_no_shorthands] =
|
||||
// Note that this uses the special BackendOnly style struct ID
|
||||
// (which does need to be valid for storing in the
|
||||
// nsCSSCompressedDataBlock::mStyleBits bitfield).
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) eStyleStruct_##stylestruct_,
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) eStyleStruct_##stylestruct_,
|
||||
|
||||
#include "nsCSSPropList.h"
|
||||
|
||||
#undef CSS_PROP
|
||||
};
|
||||
|
||||
const nsStyleAnimType
|
||||
nsCSSProps::kAnimTypeTable[eCSSProperty_COUNT_no_shorthands] = {
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
||||
animtype_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP
|
||||
};
|
||||
|
||||
const ptrdiff_t
|
||||
nsCSSProps::kStyleStructOffsetTable[eCSSProperty_COUNT_no_shorthands] = {
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
||||
stylestructoffset_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP
|
||||
};
|
||||
|
||||
const PRUint32 nsCSSProps::kFlagsTable[eCSSProperty_COUNT] = {
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) flags_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP
|
||||
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) flags_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP_SHORTHAND
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) flags_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP
|
||||
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) flags_,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP_SHORTHAND
|
||||
};
|
||||
|
||||
static const nsCSSProperty gMozBorderRadiusSubpropTable[] = {
|
||||
@ -1893,7 +1909,7 @@ static const nsCSSProperty gMarkerSubpropTable[] = {
|
||||
|
||||
const nsCSSProperty *const
|
||||
nsCSSProps::kSubpropertyTable[eCSSProperty_COUNT - eCSSProperty_COUNT_no_shorthands] = {
|
||||
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) g##method_##SubpropTable,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP_SHORTHAND
|
||||
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) g##method_##SubpropTable,
|
||||
#include "nsCSSPropList.h"
|
||||
#undef CSS_PROP_SHORTHAND
|
||||
};
|
||||
|
@ -65,6 +65,13 @@
|
||||
// properties that have this set, but that's just special-cased.
|
||||
#define CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED (1<<4)
|
||||
|
||||
/**
|
||||
* Types of animatable values.
|
||||
*/
|
||||
enum nsStyleAnimType {
|
||||
eStyleAnimType_None /* property not animatable */
|
||||
};
|
||||
|
||||
class nsCSSProps {
|
||||
public:
|
||||
static void AddRefTable(void);
|
||||
@ -109,6 +116,9 @@ public:
|
||||
static const nsCSSType kTypeTable[eCSSProperty_COUNT_no_shorthands];
|
||||
static const nsStyleStructID kSIDTable[eCSSProperty_COUNT_no_shorthands];
|
||||
static const PRInt32* const kKeywordTableTable[eCSSProperty_COUNT_no_shorthands];
|
||||
static const nsStyleAnimType kAnimTypeTable[eCSSProperty_COUNT_no_shorthands];
|
||||
static const ptrdiff_t
|
||||
kStyleStructOffsetTable[eCSSProperty_COUNT_no_shorthands];
|
||||
|
||||
private:
|
||||
static const PRUint32 kFlagsTable[eCSSProperty_COUNT];
|
||||
|
@ -380,7 +380,7 @@ CSS2PropertiesTearoff::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
// nsIDOMCSS2Properties
|
||||
// nsIDOMNSCSS2Properties
|
||||
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) \
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
||||
NS_IMETHODIMP \
|
||||
CSS2PropertiesTearoff::Get##method_(nsAString& aValue) \
|
||||
{ \
|
||||
@ -395,16 +395,16 @@ CSS2PropertiesTearoff::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
|
||||
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_) \
|
||||
CSS_PROP(name_, id_, method_, flags_, X, X, X, X, X)
|
||||
CSS_PROP(name_, id_, method_, flags_, X, X, X, X, X, X, X)
|
||||
#include "nsCSSPropList.h"
|
||||
|
||||
// Aliases
|
||||
CSS_PROP(X, opacity, MozOpacity, 0, X, X, X, X, X)
|
||||
CSS_PROP(X, outline, MozOutline, 0, X, X, X, X, X)
|
||||
CSS_PROP(X, outline_color, MozOutlineColor, 0, X, X, X, X, X)
|
||||
CSS_PROP(X, outline_style, MozOutlineStyle, 0, X, X, X, X, X)
|
||||
CSS_PROP(X, outline_width, MozOutlineWidth, 0, X, X, X, X, X)
|
||||
CSS_PROP(X, outline_offset, MozOutlineOffset, 0, X, X, X, X, X)
|
||||
CSS_PROP(X, opacity, MozOpacity, 0, X, X, X, X, X, X, X)
|
||||
CSS_PROP(X, outline, MozOutline, 0, X, X, X, X, X, X, X)
|
||||
CSS_PROP(X, outline_color, MozOutlineColor, 0, X, X, X, X, X, X, X)
|
||||
CSS_PROP(X, outline_style, MozOutlineStyle, 0, X, X, X, X, X, X, X)
|
||||
CSS_PROP(X, outline_width, MozOutlineWidth, 0, X, X, X, X, X, X, X)
|
||||
CSS_PROP(X, outline_offset, MozOutlineOffset, 0, X, X, X, X, X, X, X)
|
||||
|
||||
#undef CSS_PROP_SHORTHAND
|
||||
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
|
@ -1156,7 +1156,7 @@ CheckTextCallback(const nsRuleDataStruct& aData,
|
||||
// structs but not nsCSS*
|
||||
#define CSS_PROP_INCLUDE_NOT_CSS
|
||||
|
||||
#define CHECK_DATA_FOR_PROPERTY(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_) \
|
||||
#define CHECK_DATA_FOR_PROPERTY(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) \
|
||||
{ offsetof(nsRuleData##datastruct_, member_), type_, flags_ },
|
||||
|
||||
static const PropertyCheckData FontCheckProperties[] = {
|
||||
|
@ -48,7 +48,7 @@ struct PropertyInfo {
|
||||
|
||||
const PropertyInfo gLonghandProperties[] = {
|
||||
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) \
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
||||
{ #name_, #method_ },
|
||||
|
||||
#include "nsCSSPropList.h"
|
||||
@ -65,7 +65,7 @@ const PropertyInfo gLonghandProperties[] = {
|
||||
const char* gLonghandPropertiesWithDOMProp[] = {
|
||||
|
||||
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_) \
|
||||
#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
||||
#name_,
|
||||
|
||||
#include "nsCSSPropList.h"
|
||||
|
Loading…
Reference in New Issue
Block a user