From 670ff6c170eee89c33e8d999978bedcf3c9414b5 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Thu, 19 Aug 2010 15:33:44 -0400 Subject: [PATCH] Bug 576044 (6/12): remove vestiges of nsCSSType. r=dbaron a2.0=dbaron --- .../canvas/src/nsCanvasRenderingContext2D.cpp | 3 +- js/src/xpconnect/src/nsCSSPropertiesQS.h | 18 +- layout/style/Declaration.cpp | 132 +++---- layout/style/Declaration.h | 8 +- layout/style/nsCSSDataBlock.cpp | 273 +++++--------- layout/style/nsCSSDataBlock.h | 74 ++-- layout/style/nsCSSParser.cpp | 20 +- layout/style/nsCSSPropList.h | 337 +++--------------- layout/style/nsCSSProperty.h | 10 +- layout/style/nsCSSProps.cpp | 21 +- layout/style/nsCSSProps.h | 1 - layout/style/nsDOMCSSDeclaration.cpp | 16 +- layout/style/nsRuleData.cpp | 10 +- layout/style/nsRuleData.h | 7 +- layout/style/nsRuleNode.cpp | 42 +-- layout/style/nsStyleAnimation.cpp | 80 +---- layout/style/nsStyleAnimation.h | 15 +- layout/style/nsTransitionManager.cpp | 4 +- layout/style/test/ListCSSProperties.cpp | 4 +- 19 files changed, 318 insertions(+), 757 deletions(-) diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp index b0e23870d76..892988c5628 100644 --- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -2327,8 +2327,7 @@ nsCanvasRenderingContext2D::SetFont(const nsAString& font) // We know the declaration is not !important, so we can use // GetNormalBlock(). const nsCSSValue *fsaVal = - declaration->GetNormalBlock()-> - ValueStorageFor(eCSSProperty_font_size_adjust); + declaration->GetNormalBlock()->ValueFor(eCSSProperty_font_size_adjust); if (!fsaVal || (fsaVal->GetUnit() != eCSSUnit_None && fsaVal->GetUnit() != eCSSUnit_System_Font)) { // We got an all-property value or a syntax error. The spec says diff --git a/js/src/xpconnect/src/nsCSSPropertiesQS.h b/js/src/xpconnect/src/nsCSSPropertiesQS.h index 4de04f43bbe..6f8218d326f 100644 --- a/js/src/xpconnect/src/nsCSSPropertiesQS.h +++ b/js/src/xpconnect/src/nsCSSPropertiesQS.h @@ -39,22 +39,22 @@ #include "nsICSSDeclaration.h" -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ - kwtable_, stylestruct_, stylestructoffset_, animtype_) \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ static const nsCSSProperty QS_CSS_PROP_##method_ = eCSSProperty_##id_; #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, X, X) + CSS_PROP(name_, id_, method_, flags_, X, X, X, X, X, X) #include "nsCSSPropList.h" // Aliases -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) +CSS_PROP(X, opacity, MozOpacity, X, X, X, X, X, X, X) +CSS_PROP(X, outline, MozOutline, X, X, X, X, X, X, X) +CSS_PROP(X, outline_color, MozOutlineColor, X, X, X, X, X, X, X) +CSS_PROP(X, outline_style, MozOutlineStyle, X, X, X, X, X, X, X) +CSS_PROP(X, outline_width, MozOutlineWidth, X, X, X, X, X, X, X) +CSS_PROP(X, outline_offset, MozOutlineOffset, X, X, X, X, X, X, X) #undef CSS_PROP_SHORTHAND #undef CSS_PROP_LIST_EXCLUDE_INTERNAL diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index aa111b0ec68..be0f6bd7b31 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -129,17 +129,12 @@ PRBool Declaration::AppendValueToString(nsCSSProperty aProperty, nsCSSCompressedDataBlock *data = GetValueIsImportant(aProperty) ? mImportantData : mData; - const void *storage = data->StorageFor(aProperty); - if (!storage) { + const nsCSSValue *val = data->ValueFor(aProperty); + if (!val) { return PR_FALSE; } - switch (nsCSSProps::kTypeTable[aProperty]) { - case eCSSType_Value: - static_cast(storage)-> - AppendToString(aProperty, aResult); - break; - } + val->AppendToString(aProperty, aResult); return PR_TRUE; } @@ -184,27 +179,20 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const continue; } ++totalCount; - const void *storage = mData->StorageFor(*p); - NS_ASSERTION(!storage || !mImportantData || !mImportantData->StorageFor(*p), + const nsCSSValue *val = mData->ValueFor(*p); + NS_ASSERTION(!val || !mImportantData || !mImportantData->ValueFor(*p), "can't be in both blocks"); - if (!storage && mImportantData) { + if (!val && mImportantData) { ++importantCount; - storage = mImportantData->StorageFor(*p); + val = mImportantData->ValueFor(*p); } - if (!storage) { + if (!val) { // Case (1) above: some subproperties not specified. return; } - nsCSSUnit unit; - switch (nsCSSProps::kTypeTable[*p]) { - case eCSSType_Value: { - const nsCSSValue *val = static_cast(storage); - unit = val->GetUnit(); - } break; - } - if (unit == eCSSUnit_Inherit) { + if (val->GetUnit() == eCSSUnit_Inherit) { ++inheritCount; - } else if (unit == eCSSUnit_Initial) { + } else if (val->GetUnit() == eCSSUnit_Initial) { ++initialCount; } } @@ -236,11 +224,6 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const case eCSSProperty_border_width: { const nsCSSProperty* subprops = nsCSSProps::SubpropertyEntryFor(aProperty); - NS_ASSERTION(nsCSSProps::kTypeTable[subprops[0]] == eCSSType_Value && - nsCSSProps::kTypeTable[subprops[1]] == eCSSType_Value && - nsCSSProps::kTypeTable[subprops[2]] == eCSSType_Value && - nsCSSProps::kTypeTable[subprops[3]] == eCSSType_Value, - "type mismatch"); NS_ASSERTION(nsCSSProps::GetStringValue(subprops[0]).Find("-top") != kNotFound, "first subprop must be top"); NS_ASSERTION(nsCSSProps::GetStringValue(subprops[1]).Find("-right") != @@ -249,10 +232,10 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const kNotFound, "third subprop must be bottom"); NS_ASSERTION(nsCSSProps::GetStringValue(subprops[3]).Find("-left") != kNotFound, "fourth subprop must be left"); - const nsCSSValue &topValue = *data->ValueStorageFor(subprops[0]); - const nsCSSValue &rightValue = *data->ValueStorageFor(subprops[1]); - const nsCSSValue &bottomValue = *data->ValueStorageFor(subprops[2]); - const nsCSSValue &leftValue = *data->ValueStorageFor(subprops[3]); + const nsCSSValue &topValue = *data->ValueFor(subprops[0]); + const nsCSSValue &rightValue = *data->ValueFor(subprops[1]); + const nsCSSValue &bottomValue = *data->ValueFor(subprops[2]); + const nsCSSValue &leftValue = *data->ValueFor(subprops[3]); NS_ASSERTION(topValue.GetUnit() != eCSSUnit_Null, "null top"); topValue.AppendToString(subprops[0], aValue); @@ -279,10 +262,10 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const const nsCSSProperty* subprops = nsCSSProps::SubpropertyEntryFor(aProperty); const nsCSSValue* vals[4] = { - data->ValueStorageFor(subprops[0]), - data->ValueStorageFor(subprops[1]), - data->ValueStorageFor(subprops[2]), - data->ValueStorageFor(subprops[3]) + data->ValueFor(subprops[0]), + data->ValueFor(subprops[1]), + data->ValueFor(subprops[2]), + data->ValueFor(subprops[3]) }; // For compatibility, only write a slash and the y-values @@ -325,10 +308,10 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const subprops < subprops_end; ++subprops) { // Check only the first four subprops in each table, since the // others are extras for dimensional box properties. - const nsCSSValue *firstSide = data->ValueStorageFor((*subprops)[0]); + const nsCSSValue *firstSide = data->ValueFor((*subprops)[0]); for (PRInt32 side = 1; side < 4; ++side) { const nsCSSValue *otherSide = - data->ValueStorageFor((*subprops)[side]); + data->ValueFor((*subprops)[side]); if (*firstSide != *otherSide) match = PR_FALSE; } @@ -350,16 +333,12 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const case eCSSProperty_outline: { const nsCSSProperty* subprops = nsCSSProps::SubpropertyEntryFor(aProperty); - NS_ASSERTION(nsCSSProps::kTypeTable[subprops[0]] == eCSSType_Value && - nsCSSProps::kTypeTable[subprops[1]] == eCSSType_Value && - nsCSSProps::kTypeTable[subprops[2]] == eCSSType_Value, - "type mismatch"); NS_ASSERTION(StringEndsWith(nsCSSProps::GetStringValue(subprops[2]), NS_LITERAL_CSTRING("-color")) || StringEndsWith(nsCSSProps::GetStringValue(subprops[2]), NS_LITERAL_CSTRING("-color-value")), "third subprop must be the color property"); - const nsCSSValue *colorValue = data->ValueStorageFor(subprops[2]); + const nsCSSValue *colorValue = data->ValueFor(subprops[2]); PRBool isMozUseTextColor = colorValue->GetUnit() == eCSSUnit_Enumerated && colorValue->GetIntValue() == NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR; @@ -410,25 +389,25 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const // background-origin that are different and not the default // values. (We omit them if they're both default.) const nsCSSValueList *image = - data->ValueStorageFor(eCSSProperty_background_image)-> + data->ValueFor(eCSSProperty_background_image)-> GetListValue(); const nsCSSValueList *repeat = - data->ValueStorageFor(eCSSProperty_background_repeat)-> + data->ValueFor(eCSSProperty_background_repeat)-> GetListValue(); const nsCSSValueList *attachment = - data->ValueStorageFor(eCSSProperty_background_attachment)-> + data->ValueFor(eCSSProperty_background_attachment)-> GetListValue(); const nsCSSValuePairList *position = - data->ValueStorageFor(eCSSProperty_background_position)-> + data->ValueFor(eCSSProperty_background_position)-> GetPairListValue(); const nsCSSValueList *clip = - data->ValueStorageFor(eCSSProperty_background_clip)-> + data->ValueFor(eCSSProperty_background_clip)-> GetListValue(); const nsCSSValueList *origin = - data->ValueStorageFor(eCSSProperty_background_origin)-> + data->ValueFor(eCSSProperty_background_origin)-> GetListValue(); const nsCSSValuePairList *size = - data->ValueStorageFor(eCSSProperty_background_size)-> + data->ValueFor(eCSSProperty_background_size)-> GetPairListValue(); for (;;) { if (size->mXValue.GetUnit() != eCSSUnit_Auto || @@ -515,27 +494,27 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const // systemFont might not be present; the others are guaranteed to be // based on the shorthand check at the beginning of the function const nsCSSValue *systemFont = - data->ValueStorageFor(eCSSProperty__x_system_font); + data->ValueFor(eCSSProperty__x_system_font); const nsCSSValue &style = - *data->ValueStorageFor(eCSSProperty_font_style); + *data->ValueFor(eCSSProperty_font_style); const nsCSSValue &variant = - *data->ValueStorageFor(eCSSProperty_font_variant); + *data->ValueFor(eCSSProperty_font_variant); const nsCSSValue &weight = - *data->ValueStorageFor(eCSSProperty_font_weight); + *data->ValueFor(eCSSProperty_font_weight); const nsCSSValue &size = - *data->ValueStorageFor(eCSSProperty_font_size); + *data->ValueFor(eCSSProperty_font_size); const nsCSSValue &lh = - *data->ValueStorageFor(eCSSProperty_line_height); + *data->ValueFor(eCSSProperty_line_height); const nsCSSValue &family = - *data->ValueStorageFor(eCSSProperty_font_family); + *data->ValueFor(eCSSProperty_font_family); const nsCSSValue &stretch = - *data->ValueStorageFor(eCSSProperty_font_stretch); + *data->ValueFor(eCSSProperty_font_stretch); const nsCSSValue &sizeAdjust = - *data->ValueStorageFor(eCSSProperty_font_size_adjust); + *data->ValueFor(eCSSProperty_font_size_adjust); const nsCSSValue &featureSettings = - *data->ValueStorageFor(eCSSProperty_font_feature_settings); + *data->ValueFor(eCSSProperty_font_feature_settings); const nsCSSValue &languageOverride = - *data->ValueStorageFor(eCSSProperty_font_language_override); + *data->ValueFor(eCSSProperty_font_language_override); if (systemFont && systemFont->GetUnit() != eCSSUnit_None && @@ -601,9 +580,9 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const break; case eCSSProperty_overflow: { const nsCSSValue &xValue = - *data->ValueStorageFor(eCSSProperty_overflow_x); + *data->ValueFor(eCSSProperty_overflow_x); const nsCSSValue &yValue = - *data->ValueStorageFor(eCSSProperty_overflow_y); + *data->ValueFor(eCSSProperty_overflow_y); if (xValue == yValue) xValue.AppendToString(eCSSProperty_overflow_x, aValue); break; @@ -618,13 +597,13 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const } case eCSSProperty_transition: { const nsCSSValue &transProp = - *data->ValueStorageFor(eCSSProperty_transition_property); + *data->ValueFor(eCSSProperty_transition_property); const nsCSSValue &transDuration = - *data->ValueStorageFor(eCSSProperty_transition_duration); + *data->ValueFor(eCSSProperty_transition_duration); const nsCSSValue &transTiming = - *data->ValueStorageFor(eCSSProperty_transition_timing_function); + *data->ValueFor(eCSSProperty_transition_timing_function); const nsCSSValue &transDelay = - *data->ValueStorageFor(eCSSProperty_transition_delay); + *data->ValueFor(eCSSProperty_transition_delay); NS_ABORT_IF_FALSE(transDuration.GetUnit() == eCSSUnit_List || transDuration.GetUnit() == eCSSUnit_ListDep, @@ -696,11 +675,11 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const case eCSSProperty_marker: { const nsCSSValue &endValue = - *data->ValueStorageFor(eCSSProperty_marker_end); + *data->ValueFor(eCSSProperty_marker_end); const nsCSSValue &midValue = - *data->ValueStorageFor(eCSSProperty_marker_mid); + *data->ValueFor(eCSSProperty_marker_mid); const nsCSSValue &startValue = - *data->ValueStorageFor(eCSSProperty_marker_start); + *data->ValueFor(eCSSProperty_marker_start); if (endValue == midValue && midValue == startValue) AppendValueToString(eCSSProperty_marker_end, aValue); break; @@ -724,8 +703,7 @@ Declaration::GetValueIsImportant(nsCSSProperty aProperty) const if (!mImportantData) return PR_FALSE; - // Calling StorageFor is inefficient, but we can assume '!important' - // is rare. + // Calling ValueFor is inefficient, but we can assume '!important' is rare. if (nsCSSProps::IsShorthand(aProperty)) { CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(p, aProperty) { @@ -733,14 +711,14 @@ Declaration::GetValueIsImportant(nsCSSProperty aProperty) const // The system_font subproperty doesn't count. continue; } - if (!mImportantData->StorageFor(*p)) { + if (!mImportantData->ValueFor(*p)) { return PR_FALSE; } } return PR_TRUE; } - return mImportantData->StorageFor(aProperty) != nsnull; + return mImportantData->ValueFor(aProperty) != nsnull; } /* static */ void @@ -782,8 +760,8 @@ Declaration::ToString(nsAString& aString) const nsCSSCompressedDataBlock *systemFontData = GetValueIsImportant(eCSSProperty__x_system_font) ? mImportantData : mData; - const nsCSSValue *systemFont = - systemFontData->ValueStorageFor(eCSSProperty__x_system_font); + const nsCSSValue *systemFont = + systemFontData->ValueFor(eCSSProperty__x_system_font); const PRBool haveSystemFont = systemFont && systemFont->GetUnit() != eCSSUnit_None && systemFont->GetUnit() != eCSSUnit_Null; @@ -850,10 +828,8 @@ Declaration::ToString(nsAString& aString) const // (2) its value is the hidden system font value and it matches // the hidden system font subproperty in importance, and // we output the system font subproperty. - NS_ASSERTION(nsCSSProps::kTypeTable[property] == eCSSType_Value, - "not a value typed subproperty"); const nsCSSValue *val = - systemFontData->ValueStorageFor(property); + systemFontData->ValueFor(property); if (property == eCSSProperty__x_system_font || (haveSystemFont && val && val->GetUnit() == eCSSUnit_System_Font)) { doneProperty = PR_TRUE; diff --git a/layout/style/Declaration.h b/layout/style/Declaration.h index ca5d247fe92..196b742a74b 100644 --- a/layout/style/Declaration.h +++ b/layout/style/Declaration.h @@ -164,7 +164,7 @@ public: * May only be called when not expanded, and the caller must call * EnsureMutable first. */ - void* SlotForValue(nsCSSProperty aProperty, PRBool aIsImportant) { + nsCSSValue* SlotForValue(nsCSSProperty aProperty, PRBool aIsImportant) { AssertMutable(); NS_ABORT_IF_FALSE(mData, "called while expanded"); @@ -177,11 +177,11 @@ public: return nsnull; } - void *slot = block->SlotForValue(aProperty); + nsCSSValue *slot = block->SlotForValue(aProperty); #ifdef DEBUG { nsCSSCompressedDataBlock *other = aIsImportant ? mData : mImportantData; - NS_ABORT_IF_FALSE(!slot || !other || !other->StorageFor(aProperty), + NS_ABORT_IF_FALSE(!slot || !other || !other->ValueFor(aProperty), "Property both important and not?"); } #endif @@ -190,7 +190,7 @@ public: PRBool HasNonImportantValueFor(nsCSSProperty aProperty) const { NS_ABORT_IF_FALSE(!nsCSSProps::IsShorthand(aProperty), "must be longhand"); - return !!mData->StorageFor(aProperty); + return !!mData->ValueFor(aProperty); } /** diff --git a/layout/style/nsCSSDataBlock.cpp b/layout/style/nsCSSDataBlock.cpp index 5b9b391d1d2..2fd0de4f4b8 100644 --- a/layout/style/nsCSSDataBlock.cpp +++ b/layout/style/nsCSSDataBlock.cpp @@ -52,18 +52,8 @@ namespace css = mozilla::css; /* * nsCSSCompressedDataBlock holds property-value pairs corresponding - * to CSS declaration blocks. The value is stored in one of the three - * CSS data types: nsCSSValue, nsCSSValueList, and nsCSSValuePairList, - * which each correspond to a value of the nsCSSType enumeration. - * - * The storage strategy uses the CDB*Storage structs below to help - * ensure that all the types remain properly aligned. nsCSSValue's - * alignment requirements cannot be weaker than any others, since it - * contains a pointer and an enumeration. - * - * nsCSSValue objects are stored directly in the block; list types - * have only a pointer to the first element in the list stored in the - * block. + * to CSS declaration blocks. Each pair is stored in a CDBValueStorage + * object; these objects form an array at the end of the data block. */ struct CDBValueStorage { @@ -179,55 +169,43 @@ nsCSSCompressedDataBlock::MapRuleInfoInto(nsRuleData *aRuleData) const "out of range"); if (nsCachedStyleData::GetBitForSID(nsCSSProps::kSIDTable[iProp]) & aRuleData->mSIDs) { - void *prop = aRuleData->StorageFor(iProp); - switch (nsCSSProps::kTypeTable[iProp]) { - case eCSSType_Value: { - nsCSSValue* target = static_cast(prop); - if (target->GetUnit() == eCSSUnit_Null) { - const nsCSSValue *val = ValueAtCursor(cursor); - NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, "oops"); - if (ShouldStartImageLoads(aRuleData, iProp)) { - TryToStartImageLoad(*val, doc, iProp); - } - *target = *val; - if (iProp == eCSSProperty_font_family) { - // XXX Are there other things like this? - aRuleData->mFontData->mFamilyFromHTML = PR_FALSE; - } - if (nsCSSProps::PropHasFlags(iProp, - CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED) && - ShouldIgnoreColors(aRuleData)) - { - if (iProp == eCSSProperty_background_color) { - // Force non-'transparent' background - // colors to the user's default. - if (target->IsNonTransparentColor()) { - target->SetColorValue(aRuleData-> - mPresContext-> - DefaultBackgroundColor()); - } - } else { - // Ignore 'color', 'border-*-color', etc. - *target = nsCSSValue(); - } + nsCSSValue* target = aRuleData->ValueFor(iProp); + if (target->GetUnit() == eCSSUnit_Null) { + const nsCSSValue *val = ValueAtCursor(cursor); + NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, "oops"); + if (ShouldStartImageLoads(aRuleData, iProp)) { + TryToStartImageLoad(*val, doc, iProp); + } + *target = *val; + if (iProp == eCSSProperty_font_family) { + // XXX Are there other things like this? + aRuleData->mFontData->mFamilyFromHTML = PR_FALSE; + } + if (nsCSSProps::PropHasFlags(iProp, + CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED) && + ShouldIgnoreColors(aRuleData)) + { + if (iProp == eCSSProperty_background_color) { + // Force non-'transparent' background + // colors to the user's default. + if (target->IsNonTransparentColor()) { + target->SetColorValue(aRuleData->mPresContext-> + DefaultBackgroundColor()); } + } else { + // Ignore 'color', 'border-*-color', etc. + *target = nsCSSValue(); } - cursor += CDBValueStorage_advance; - } break; - } - } else { - switch (nsCSSProps::kTypeTable[iProp]) { - case eCSSType_Value: { - cursor += CDBValueStorage_advance; - } break; + } } } + cursor += CDBValueStorage_advance; } NS_ASSERTION(cursor == cursor_end, "inconsistent data"); } -const void* -nsCSSCompressedDataBlock::StorageFor(nsCSSProperty aProperty) const +const nsCSSValue* +nsCSSCompressedDataBlock::ValueFor(nsCSSProperty aProperty) const { NS_PRECONDITION(!nsCSSProps::IsShorthand(aProperty), "Don't call for shorthands"); @@ -247,17 +225,9 @@ nsCSSCompressedDataBlock::StorageFor(nsCSSProperty aProperty) const NS_ASSERTION(0 <= iProp && iProp < eCSSProperty_COUNT_no_shorthands, "out of range"); if (iProp == aProperty) { - switch (nsCSSProps::kTypeTable[iProp]) { - case eCSSType_Value: { - return ValueAtCursor(cursor); - } - } - } - switch (nsCSSProps::kTypeTable[iProp]) { - case eCSSType_Value: { - cursor += CDBValueStorage_advance; - } break; + return ValueAtCursor(cursor); } + cursor += CDBValueStorage_advance; } NS_ASSERTION(cursor == cursor_end, "inconsistent data"); @@ -282,16 +252,11 @@ nsCSSCompressedDataBlock::Clone() const "out of range"); PropertyAtCursor(result_cursor) = iProp; - switch (nsCSSProps::kTypeTable[iProp]) { - case eCSSType_Value: { - const nsCSSValue* val = ValueAtCursor(cursor); - NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, "oops"); - nsCSSValue *result_val = ValueAtCursor(result_cursor); - new (result_val) nsCSSValue(*val); - cursor += CDBValueStorage_advance; - result_cursor += CDBValueStorage_advance; - } break; - } + const nsCSSValue* val = ValueAtCursor(cursor); + nsCSSValue *result_val = ValueAtCursor(result_cursor); + new (result_val) nsCSSValue(*val); + cursor += CDBValueStorage_advance; + result_cursor += CDBValueStorage_advance; } NS_ASSERTION(cursor == cursor_end, "inconsistent data"); @@ -311,14 +276,10 @@ nsCSSCompressedDataBlock::~nsCSSCompressedDataBlock() NS_ASSERTION(0 <= iProp && iProp < eCSSProperty_COUNT_no_shorthands, "out of range"); - switch (nsCSSProps::kTypeTable[iProp]) { - case eCSSType_Value: { - const nsCSSValue* val = ValueAtCursor(cursor); - NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, "oops"); - val->~nsCSSValue(); - cursor += CDBValueStorage_advance; - } break; - } + const nsCSSValue* val = ValueAtCursor(cursor); + NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, "oops"); + val->~nsCSSValue(); + cursor += CDBValueStorage_advance; } NS_ASSERTION(cursor == cursor_end, "inconsistent data"); } @@ -331,22 +292,14 @@ nsCSSCompressedDataBlock::CreateEmptyBlock() return result; } -/* static */ void -nsCSSCompressedDataBlock::MoveValue(void *aSource, void *aDest, - nsCSSProperty aPropID, - PRBool* aChanged) +/* static */ PRBool +nsCSSCompressedDataBlock::MoveValue(nsCSSValue *aSource, nsCSSValue *aDest) { - switch (nsCSSProps::kTypeTable[aPropID]) { - case eCSSType_Value: { - nsCSSValue *source = static_cast(aSource); - nsCSSValue *dest = static_cast(aDest); - if (*source != *dest) - *aChanged = PR_TRUE; - dest->~nsCSSValue(); - memcpy(dest, source, sizeof(nsCSSValue)); - new (source) nsCSSValue(); - } break; - } + PRBool changed = (*aSource != *aDest); + aDest->~nsCSSValue(); + memcpy(aDest, aSource, sizeof(nsCSSValue)); + new (aSource) nsCSSValue(); + return changed; } /*****************************************************************************/ @@ -363,7 +316,7 @@ nsCSSExpandedDataBlock::~nsCSSExpandedDataBlock() const size_t nsCSSExpandedDataBlock::kOffsetTable[] = { - #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ offsetof(nsCSSExpandedDataBlock, m##datastruct_.member_), #include "nsCSSPropList.h" @@ -389,22 +342,17 @@ nsCSSExpandedDataBlock::DoExpand(nsCSSCompressedDataBlock *aBlock, SetPropertyBit(iProp); if (aImportant) SetImportantBit(iProp); - void *prop = PropertyAt(iProp); - switch (nsCSSProps::kTypeTable[iProp]) { - case eCSSType_Value: { - const nsCSSValue* val = ValueAtCursor(cursor); - nsCSSValue* dest = static_cast(prop); - NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, "oops"); - NS_ASSERTION(dest->GetUnit() == eCSSUnit_Null, - "expanding into non-empty block"); + const nsCSSValue* val = ValueAtCursor(cursor); + nsCSSValue* dest = PropertyAt(iProp); + NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, "oops"); + NS_ASSERTION(dest->GetUnit() == eCSSUnit_Null, + "expanding into non-empty block"); #ifdef NS_BUILD_REFCNT_LOGGING - dest->~nsCSSValue(); + dest->~nsCSSValue(); #endif - memcpy(dest, val, sizeof(nsCSSValue)); - cursor += CDBValueStorage_advance; - } break; - } + memcpy(dest, val, sizeof(nsCSSValue)); + cursor += CDBValueStorage_advance; } NS_ASSERTION(cursor == cursor_end, "inconsistent data"); @@ -439,24 +387,12 @@ nsCSSExpandedDataBlock::ComputeSize() nsCSSProperty iProp = nsCSSPropertySet::CSSPropertyAt(iHigh, iLow); NS_ASSERTION(0 <= iProp && iProp < eCSSProperty_COUNT_no_shorthands, "out of range"); -#ifdef DEBUG - void *prop = PropertyAt(iProp); -#endif - PRUint32 increment = 0; - switch (nsCSSProps::kTypeTable[iProp]) { - case eCSSType_Value: { -#ifdef DEBUG - nsCSSValue* val = static_cast(prop); - NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, - "null value while computing size"); -#endif - increment = CDBValueStorage_advance; - } break; - } + NS_ASSERTION(PropertyAt(iProp)->GetUnit() != eCSSUnit_Null, + "null value while computing size"); if (mPropertiesImportant.HasPropertyAt(iHigh, iLow)) - result.important += increment; + result.important += CDBValueStorage_advance; else - result.normal += increment; + result.normal += CDBValueStorage_advance; } } return result; @@ -505,25 +441,20 @@ nsCSSExpandedDataBlock::Compress(nsCSSCompressedDataBlock **aNormalBlock, nsCSSProperty iProp = nsCSSPropertySet::CSSPropertyAt(iHigh, iLow); NS_ASSERTION(0 <= iProp && iProp < eCSSProperty_COUNT_no_shorthands, "out of range"); - void *prop = PropertyAt(iProp); PRBool important = mPropertiesImportant.HasPropertyAt(iHigh, iLow); char *&cursor = important ? cursor_important : cursor_normal; nsCSSCompressedDataBlock *result = important ? result_important : result_normal; - switch (nsCSSProps::kTypeTable[iProp]) { - case eCSSType_Value: { - nsCSSValue* val = static_cast(prop); - NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, - "Null value while compressing"); - CDBValueStorage *storage = - reinterpret_cast(cursor); - storage->property = iProp; - memcpy(&storage->value, val, sizeof(nsCSSValue)); - new (val) nsCSSValue(); - cursor += CDBValueStorage_advance; - } break; - } + nsCSSValue* val = PropertyAt(iProp); + NS_ASSERTION(val->GetUnit() != eCSSUnit_Null, + "Null value while compressing"); + CDBValueStorage *storage = + reinterpret_cast(cursor); + storage->property = iProp; + memcpy(&storage->value, val, sizeof(nsCSSValue)); + new (val) nsCSSValue(); + cursor += CDBValueStorage_advance; result->mStyleBits |= nsCachedStyleData::GetBitForSID(nsCSSProps::kSIDTable[iProp]); } @@ -582,49 +513,45 @@ nsCSSExpandedDataBlock::ClearLonghandProperty(nsCSSProperty aPropID) ClearPropertyBit(aPropID); ClearImportantBit(aPropID); - - void *prop = PropertyAt(aPropID); - switch (nsCSSProps::kTypeTable[aPropID]) { - case eCSSType_Value: { - nsCSSValue* val = static_cast(prop); - val->Reset(); - } break; - } + PropertyAt(aPropID)->Reset(); } -void +PRBool nsCSSExpandedDataBlock::TransferFromBlock(nsCSSExpandedDataBlock& aFromBlock, nsCSSProperty aPropID, PRBool aIsImportant, PRBool aOverrideImportant, PRBool aMustCallValueAppended, - css::Declaration* aDeclaration, - PRBool* aChanged) + css::Declaration* aDeclaration) { - if (nsCSSProps::IsShorthand(aPropID)) { - CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(p, aPropID) { - DoTransferFromBlock(aFromBlock, *p, aIsImportant, aOverrideImportant, - aMustCallValueAppended, aDeclaration, aChanged); + if (!nsCSSProps::IsShorthand(aPropID)) { + return DoTransferFromBlock(aFromBlock, aPropID, + aIsImportant, aOverrideImportant, + aMustCallValueAppended, aDeclaration); } - } else { - DoTransferFromBlock(aFromBlock, aPropID, aIsImportant, aOverrideImportant, - aMustCallValueAppended, aDeclaration, aChanged); - } + + PRBool changed = PR_FALSE; + CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(p, aPropID) { + changed |= DoTransferFromBlock(aFromBlock, *p, + aIsImportant, aOverrideImportant, + aMustCallValueAppended, aDeclaration); + } + return changed; } -void +PRBool nsCSSExpandedDataBlock::DoTransferFromBlock(nsCSSExpandedDataBlock& aFromBlock, nsCSSProperty aPropID, PRBool aIsImportant, PRBool aOverrideImportant, PRBool aMustCallValueAppended, - css::Declaration* aDeclaration, - PRBool* aChanged) + css::Declaration* aDeclaration) { + PRBool changed = PR_FALSE; NS_ASSERTION(aFromBlock.HasPropertyBit(aPropID), "oops"); if (aIsImportant) { if (!HasImportantBit(aPropID)) - *aChanged = PR_TRUE; + changed = PR_TRUE; SetImportantBit(aPropID); } else { if (HasImportantBit(aPropID)) { @@ -635,9 +562,9 @@ nsCSSExpandedDataBlock::DoTransferFromBlock(nsCSSExpandedDataBlock& aFromBlock, // overwrite the property. if (!aOverrideImportant) { aFromBlock.ClearLonghandProperty(aPropID); - return; + return PR_FALSE; } - *aChanged = PR_TRUE; + changed = PR_TRUE; ClearImportantBit(aPropID); } } @@ -654,9 +581,9 @@ nsCSSExpandedDataBlock::DoTransferFromBlock(nsCSSExpandedDataBlock& aFromBlock, * the destination, copying memory directly, and then using placement * new. */ - void *v_source = aFromBlock.PropertyAt(aPropID); - void *v_dest = PropertyAt(aPropID); - nsCSSCompressedDataBlock::MoveValue(v_source, v_dest, aPropID, aChanged); + changed |= nsCSSCompressedDataBlock::MoveValue(aFromBlock.PropertyAt(aPropID), + PropertyAt(aPropID)); + return changed; } #ifdef DEBUG @@ -667,14 +594,8 @@ nsCSSExpandedDataBlock::DoAssertInitialState() mPropertiesImportant.AssertIsEmpty("not initial state"); for (PRUint32 i = 0; i < eCSSProperty_COUNT_no_shorthands; ++i) { - void *prop = PropertyAt(nsCSSProperty(i)); - switch (nsCSSProps::kTypeTable[i]) { - case eCSSType_Value: { - nsCSSValue* val = static_cast(prop); - NS_ASSERTION(val->GetUnit() == eCSSUnit_Null, - "not initial state"); - } break; - } + NS_ASSERTION(PropertyAt(nsCSSProperty(i))->GetUnit() == eCSSUnit_Null, + "not initial state"); } } #endif diff --git a/layout/style/nsCSSDataBlock.h b/layout/style/nsCSSDataBlock.h index e361715fcda..02b7085b7df 100644 --- a/layout/style/nsCSSDataBlock.h +++ b/layout/style/nsCSSDataBlock.h @@ -82,30 +82,19 @@ public: /** * Return the location at which the *value* for the property is * stored, or null if the block does not contain a value for the - * property. This is either an |nsCSSValue*|, |nsCSSRect*|, or an - * |nsCSSValueList**|, etc. + * property. * * Inefficient (by design). * * Must not be called for shorthands. */ - const void* StorageFor(nsCSSProperty aProperty) const; + const nsCSSValue* ValueFor(nsCSSProperty aProperty) const; /** * As above, but provides mutable access to a value slot. */ - void* SlotForValue(nsCSSProperty aProperty) { - return const_cast(StorageFor(aProperty)); - } - - /** - * A set of slightly more typesafe helpers for the above. All - * return null if the value is not present. - */ - const nsCSSValue* ValueStorageFor(nsCSSProperty aProperty) const { - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - return static_cast(StorageFor(aProperty)); + nsCSSValue* SlotForValue(nsCSSProperty aProperty) { + return const_cast(ValueFor(aProperty)); } /** @@ -120,16 +109,12 @@ public: /** * Does a fast move of aSource to aDest. The previous value in - * aDest is cleanly destroyed, and aSource is cleared. *aChanged - * is set true if, before the copy, the value at aSource compares - * unequal to the value at aDest. - * - * This can only be used for non-shorthand properties. The caller - * must make sure that the source and destination locations point - * to the right kind of objects for the property id. + * aDest is cleanly destroyed, and aSource is cleared. Returns + * true if, before the copy, the value at aSource compared unequal + * to the value at aDest; false otherwise. */ - static void MoveValue(void *aSource, void *aDest, nsCSSProperty aPropID, - PRBool* aChanged); + static PRBool MoveValue(nsCSSValue* aSource, nsCSSValue* aDest); + private: PRInt32 mStyleBits; // the structs for which we have data, according to @@ -228,18 +213,16 @@ public: * existing !important property regardless of its own importance * if |aOverrideImportant| is true. * - * Sets |*aChanged| to true if something changed, leaves it - * unmodified otherwise. Calls |ValueAppended| on |aDeclaration| - * if the property was not previously set, or in any case if - * |aMustCallValueAppended| is true. + * Returns true if something changed, false otherwise. Calls + * |ValueAppended| on |aDeclaration| if the property was not + * previously set, or in any case if |aMustCallValueAppended| is true. */ - void TransferFromBlock(nsCSSExpandedDataBlock& aFromBlock, - nsCSSProperty aPropID, - PRBool aIsImportant, - PRBool aOverrideImportant, - PRBool aMustCallValueAppended, - mozilla::css::Declaration* aDeclaration, - PRBool* aChanged); + PRBool TransferFromBlock(nsCSSExpandedDataBlock& aFromBlock, + nsCSSProperty aPropID, + PRBool aIsImportant, + PRBool aOverrideImportant, + PRBool aMustCallValueAppended, + mozilla::css::Declaration* aDeclaration); void AssertInitialState() { #ifdef DEBUG @@ -262,13 +245,12 @@ private: /** * Worker for TransferFromBlock; cannot be used with shorthands. */ - void DoTransferFromBlock(nsCSSExpandedDataBlock& aFromBlock, - nsCSSProperty aPropID, - PRBool aIsImportant, - PRBool aOverrideImportant, - PRBool aMustCallValueAppended, - mozilla::css::Declaration* aDeclaration, - PRBool* aChanged); + PRBool DoTransferFromBlock(nsCSSExpandedDataBlock& aFromBlock, + nsCSSProperty aPropID, + PRBool aIsImportant, + PRBool aOverrideImportant, + PRBool aMustCallValueAppended, + mozilla::css::Declaration* aDeclaration); #ifdef DEBUG void DoAssertInitialState(); @@ -293,12 +275,12 @@ private: public: /* * Return the storage location within |this| of the value of the - * property (i.e., either an |nsCSSValue*|, |nsCSSRect*|, or - * |nsCSSValueList**| (etc.). + * property |aProperty|. */ - void* PropertyAt(nsCSSProperty aProperty) { + nsCSSValue* PropertyAt(nsCSSProperty aProperty) { size_t offset = nsCSSExpandedDataBlock::kOffsetTable[aProperty]; - return reinterpret_cast(reinterpret_cast(this) + offset); + return reinterpret_cast(reinterpret_cast(this) + + offset); } void SetPropertyBit(nsCSSProperty aProperty) { diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 9455c60969e..072b74e2bee 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -1124,15 +1124,15 @@ CSSParserImpl::ParseProperty(const nsCSSProperty aPropID, // same importance level, then we can just copy our parsed value // directly into the declaration without going through the whole // expand/compress thing. - void* valueSlot = aDeclaration->SlotForValue(aPropID, aIsImportant); + nsCSSValue* valueSlot = aDeclaration->SlotForValue(aPropID, aIsImportant); if (valueSlot) { - nsCSSCompressedDataBlock::MoveValue(mTempData.PropertyAt(aPropID), - valueSlot, aPropID, aChanged); + *aChanged = nsCSSCompressedDataBlock:: + MoveValue(mTempData.PropertyAt(aPropID), valueSlot); mTempData.ClearPropertyBit(aPropID); } else { aDeclaration->ExpandTo(&mData); - mData.TransferFromBlock(mTempData, aPropID, aIsImportant, PR_TRUE, - PR_FALSE, aDeclaration, aChanged); + *aChanged = mData.TransferFromBlock(mTempData, aPropID, aIsImportant, + PR_TRUE, PR_FALSE, aDeclaration); aDeclaration->CompressFrom(&mData); } CLEAR_ERROR(); @@ -4031,9 +4031,10 @@ CSSParserImpl::ParseDeclaration(css::Declaration* aDeclaration, return PR_FALSE; } - mData.TransferFromBlock(mTempData, propID, status == ePriority_Important, - PR_FALSE, aMustCallValueAppended, - aDeclaration, aChanged); + *aChanged |= mData.TransferFromBlock(mTempData, propID, + status == ePriority_Important, + PR_FALSE, aMustCallValueAppended, + aDeclaration); return PR_TRUE; } @@ -4997,9 +4998,6 @@ CSSParserImpl::AppendValue(nsCSSProperty aPropID, const nsCSSValue& aValue) { NS_ASSERTION(0 <= aPropID && aPropID < eCSSProperty_COUNT_no_shorthands, "property out of range"); - NS_ASSERTION(nsCSSProps::kTypeTable[aPropID] == eCSSType_Value, - nsPrintfCString(64, "type error (property=\'%s\')", - nsCSSProps::GetStringValue(aPropID).get()).get()); nsCSSValue& storage = *static_cast(mTempData.PropertyAt(aPropID)); storage = aValue; diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 005885b2409..fd466cf01e4 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -73,23 +73,20 @@ 6. 'member' gives the name of the member variable in the nsRuleData struct. - 7. 'type' gives the |nsCSSType| of the data in the nsRuleData struct - and in the css::Declaration backend. - - 8. 'kwtable', which is either nsnull or the name of the appropriate + 7. 'kwtable', which is either nsnull or the name of the appropriate keyword table member of class nsCSSProps, for use in nsCSSProps::LookupPropertyValue. - 9. 'stylestruct_' [used only for CSS_PROP, not CSS_PROP_*] gives the + 8. 'stylestruct_' [used only for CSS_PROP, not CSS_PROP_*] gives the name of the style struct. Can be used to make nsStyle##stylestruct_ and eStyleStruct_##stylestruct_ - 10. 'stylestructoffset_' [not used for CSS_PROP_BACKENDONLY] gives the + 9. 'stylestructoffset_' [not used for CSS_PROP_BACKENDONLY] gives the result of offsetof(nsStyle*, member). Ignored (and generally CSS_PROP_NO_OFFSET, or -1) for properties whose animtype_ is eStyleAnimType_None. - 11. 'animtype_' [not used for CSS_PROP_BACKENDONLY] gives the + 10. 'animtype_' [not used for CSS_PROP_BACKENDONLY] gives the animation type (see nsStyleAnimType) of this property. CSS_PROP_SHORTHAND only takes 1-4. @@ -118,35 +115,35 @@ #ifdef CSS_PROP #define USED_CSS_PROP -#define CSS_PROP_FONT(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Font, stylestructoffset_, animtype_) -#define CSS_PROP_COLOR(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Color, stylestructoffset_, animtype_) -#define CSS_PROP_BACKGROUND(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Background, stylestructoffset_, animtype_) -#define CSS_PROP_LIST(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, List, stylestructoffset_, animtype_) -#define CSS_PROP_POSITION(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Position, stylestructoffset_, animtype_) -#define CSS_PROP_TEXT(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Text, stylestructoffset_, animtype_) -#define CSS_PROP_TEXTRESET(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, TextReset, stylestructoffset_, animtype_) -#define CSS_PROP_DISPLAY(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Display, stylestructoffset_, animtype_) -#define CSS_PROP_VISIBILITY(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Visibility, stylestructoffset_, animtype_) -#define CSS_PROP_CONTENT(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Content, stylestructoffset_, animtype_) -#define CSS_PROP_QUOTES(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Quotes, stylestructoffset_, animtype_) -#define CSS_PROP_USERINTERFACE(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, UserInterface, stylestructoffset_, animtype_) -#define CSS_PROP_UIRESET(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, UIReset, stylestructoffset_, animtype_) -#define CSS_PROP_TABLE(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Table, stylestructoffset_, animtype_) -#define CSS_PROP_TABLEBORDER(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, TableBorder, stylestructoffset_, animtype_) -#define CSS_PROP_MARGIN(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Margin, stylestructoffset_, animtype_) -#define CSS_PROP_PADDING(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Padding, stylestructoffset_, animtype_) -#define CSS_PROP_BORDER(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Border, stylestructoffset_, animtype_) -#define CSS_PROP_OUTLINE(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Outline, stylestructoffset_, animtype_) -#define CSS_PROP_XUL(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, XUL, stylestructoffset_, animtype_) -#define CSS_PROP_COLUMN(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, Column, stylestructoffset_, animtype_) -#define CSS_PROP_SVG(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, SVG, stylestructoffset_, animtype_) -#define CSS_PROP_SVGRESET(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, SVGReset, stylestructoffset_, animtype_) +#define CSS_PROP_FONT(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Font, stylestructoffset_, animtype_) +#define CSS_PROP_COLOR(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Color, stylestructoffset_, animtype_) +#define CSS_PROP_BACKGROUND(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Background, stylestructoffset_, animtype_) +#define CSS_PROP_LIST(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, List, stylestructoffset_, animtype_) +#define CSS_PROP_POSITION(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Position, stylestructoffset_, animtype_) +#define CSS_PROP_TEXT(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Text, stylestructoffset_, animtype_) +#define CSS_PROP_TEXTRESET(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, TextReset, stylestructoffset_, animtype_) +#define CSS_PROP_DISPLAY(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Display, stylestructoffset_, animtype_) +#define CSS_PROP_VISIBILITY(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Visibility, stylestructoffset_, animtype_) +#define CSS_PROP_CONTENT(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Content, stylestructoffset_, animtype_) +#define CSS_PROP_QUOTES(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Quotes, stylestructoffset_, animtype_) +#define CSS_PROP_USERINTERFACE(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, UserInterface, stylestructoffset_, animtype_) +#define CSS_PROP_UIRESET(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, UIReset, stylestructoffset_, animtype_) +#define CSS_PROP_TABLE(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Table, stylestructoffset_, animtype_) +#define CSS_PROP_TABLEBORDER(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, TableBorder, stylestructoffset_, animtype_) +#define CSS_PROP_MARGIN(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Margin, stylestructoffset_, animtype_) +#define CSS_PROP_PADDING(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Padding, stylestructoffset_, animtype_) +#define CSS_PROP_BORDER(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Border, stylestructoffset_, animtype_) +#define CSS_PROP_OUTLINE(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Outline, stylestructoffset_, animtype_) +#define CSS_PROP_XUL(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, XUL, stylestructoffset_, animtype_) +#define CSS_PROP_COLUMN(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, Column, stylestructoffset_, animtype_) +#define CSS_PROP_SVG(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, SVG, stylestructoffset_, animtype_) +#define CSS_PROP_SVGRESET(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, SVGReset, stylestructoffset_, animtype_) // For properties that are stored in the CSS backend but are not // computed. An includer may define this in addition to CSS_PROP, but // otherwise we treat it as the same. #ifndef CSS_PROP_BACKENDONLY -#define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, BackendOnly, CSS_PROP_NO_OFFSET, eStyleAnimType_None) +#define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, datastruct_, member_, kwtable_) CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, kwtable_, BackendOnly, CSS_PROP_NO_OFFSET, eStyleAnimType_None) #define DEFINED_CSS_PROP_BACKENDONLY #endif @@ -157,100 +154,100 @@ // ignored. #ifndef CSS_PROP_FONT -#define CSS_PROP_FONT(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_FONT(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_FONT #endif #ifndef CSS_PROP_COLOR -#define CSS_PROP_COLOR(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_COLOR(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_COLOR #endif #ifndef CSS_PROP_BACKGROUND -#define CSS_PROP_BACKGROUND(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_BACKGROUND(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_BACKGROUND #endif #ifndef CSS_PROP_LIST -#define CSS_PROP_LIST(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_LIST(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_LIST #endif #ifndef CSS_PROP_POSITION -#define CSS_PROP_POSITION(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_POSITION(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_POSITION #endif #ifndef CSS_PROP_TEXT -#define CSS_PROP_TEXT(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_TEXT(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_TEXT #endif #ifndef CSS_PROP_TEXTRESET -#define CSS_PROP_TEXTRESET(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_TEXTRESET(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_TEXTRESET #endif #ifndef CSS_PROP_DISPLAY -#define CSS_PROP_DISPLAY(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_DISPLAY(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_DISPLAY #endif #ifndef CSS_PROP_VISIBILITY -#define CSS_PROP_VISIBILITY(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_VISIBILITY(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_VISIBILITY #endif #ifndef CSS_PROP_CONTENT -#define CSS_PROP_CONTENT(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_CONTENT(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_CONTENT #endif #ifndef CSS_PROP_QUOTES -#define CSS_PROP_QUOTES(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_QUOTES(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_QUOTES #endif #ifndef CSS_PROP_USERINTERFACE -#define CSS_PROP_USERINTERFACE(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_USERINTERFACE(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_USERINTERFACE #endif #ifndef CSS_PROP_UIRESET -#define CSS_PROP_UIRESET(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_UIRESET(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_UIRESET #endif #ifndef CSS_PROP_TABLE -#define CSS_PROP_TABLE(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_TABLE(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_TABLE #endif #ifndef CSS_PROP_TABLEBORDER -#define CSS_PROP_TABLEBORDER(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_TABLEBORDER(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_TABLEBORDER #endif #ifndef CSS_PROP_MARGIN -#define CSS_PROP_MARGIN(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_MARGIN(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_MARGIN #endif #ifndef CSS_PROP_PADDING -#define CSS_PROP_PADDING(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_PADDING(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_PADDING #endif #ifndef CSS_PROP_BORDER -#define CSS_PROP_BORDER(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_BORDER(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_BORDER #endif #ifndef CSS_PROP_OUTLINE -#define CSS_PROP_OUTLINE(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_OUTLINE(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_OUTLINE #endif #ifndef CSS_PROP_XUL -#define CSS_PROP_XUL(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_XUL(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_XUL #endif #ifndef CSS_PROP_COLUMN -#define CSS_PROP_COLUMN(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_COLUMN(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_COLUMN #endif #ifndef CSS_PROP_SVG -#define CSS_PROP_SVG(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_SVG(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_SVG #endif #ifndef CSS_PROP_SVGRESET -#define CSS_PROP_SVGRESET(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_, stylestructoffset_, animtype_) /* nothing */ +#define CSS_PROP_SVGRESET(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) /* nothing */ #define DEFINED_CSS_PROP_SVGRESET #endif #ifndef CSS_PROP_BACKENDONLY -#define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, datastruct_, member_, type_, kwtable_) /* nothing */ +#define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, datastruct_, member_, kwtable_) /* nothing */ #define DEFINED_CSS_PROP_BACKENDONLY #endif @@ -297,7 +294,6 @@ CSS_PROP_DISPLAY( 0, Display, mAppearance, - eCSSType_Value, kAppearanceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -313,7 +309,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderRadius.mTopLeft, - eCSSType_Value, nsnull, offsetof(nsStyleBorder, mBorderRadius), eStyleAnimType_Corner_TopLeft) @@ -324,7 +319,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderRadius.mTopRight, - eCSSType_Value, nsnull, offsetof(nsStyleBorder, mBorderRadius), eStyleAnimType_Corner_TopRight) @@ -335,7 +329,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderRadius.mBottomRight, - eCSSType_Value, nsnull, offsetof(nsStyleBorder, mBorderRadius), eStyleAnimType_Corner_BottomRight) @@ -346,7 +339,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderRadius.mBottomLeft, - eCSSType_Value, nsnull, offsetof(nsStyleBorder, mBorderRadius), eStyleAnimType_Corner_BottomLeft) @@ -362,7 +354,6 @@ CSS_PROP_OUTLINE( 0, Margin, mOutlineRadius.mTopLeft, - eCSSType_Value, nsnull, offsetof(nsStyleOutline, mOutlineRadius), eStyleAnimType_Corner_TopLeft) @@ -373,7 +364,6 @@ CSS_PROP_OUTLINE( 0, Margin, mOutlineRadius.mTopRight, - eCSSType_Value, nsnull, offsetof(nsStyleOutline, mOutlineRadius), eStyleAnimType_Corner_TopRight) @@ -384,7 +374,6 @@ CSS_PROP_OUTLINE( 0, Margin, mOutlineRadius.mBottomRight, - eCSSType_Value, nsnull, offsetof(nsStyleOutline, mOutlineRadius), eStyleAnimType_Corner_BottomRight) @@ -395,7 +384,6 @@ CSS_PROP_OUTLINE( 0, Margin, mOutlineRadius.mBottomLeft, - eCSSType_Value, nsnull, offsetof(nsStyleOutline, mOutlineRadius), eStyleAnimType_Corner_BottomLeft) @@ -406,7 +394,6 @@ CSS_PROP_TEXT( 0, Text, mTabSize, - eCSSType_Value, nsnull, offsetof(nsStyleText, mTabSize), eStyleAnimType_None) @@ -418,7 +405,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mSystemFont, - eCSSType_Value, kFontKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -430,7 +416,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mAzimuth, - eCSSType_Value, kAzimuthKTable) CSS_PROP_SHORTHAND( background, @@ -445,7 +430,6 @@ CSS_PROP_BACKGROUND( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Color, mBackAttachment, - eCSSType_Value, kBackgroundAttachmentKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -457,7 +441,6 @@ CSS_PROP_BACKGROUND( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Color, mBackClip, - eCSSType_Value, kBackgroundOriginKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -469,7 +452,6 @@ CSS_PROP_BACKGROUND( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Color, mBackColor, - eCSSType_Value, nsnull, offsetof(nsStyleBackground, mBackgroundColor), eStyleAnimType_Color) @@ -483,7 +465,6 @@ CSS_PROP_BACKGROUND( CSS_PROPERTY_START_IMAGE_LOADS, Color, mBackImage, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -494,7 +475,6 @@ CSS_PROP_BACKGROUND( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Color, mBackInlinePolicy, - eCSSType_Value, kBackgroundInlinePolicyKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -506,7 +486,6 @@ CSS_PROP_BACKGROUND( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Color, mBackOrigin, - eCSSType_Value, kBackgroundOriginKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -518,7 +497,6 @@ CSS_PROP_BACKGROUND( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Color, mBackPosition, - eCSSType_Value, kBackgroundPositionKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -530,7 +508,6 @@ CSS_PROP_BACKGROUND( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Color, mBackRepeat, - eCSSType_Value, kBackgroundRepeatKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -542,7 +519,6 @@ CSS_PROP_BACKGROUND( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Color, mBackSize, - eCSSType_Value, kBackgroundSizeKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -553,7 +529,6 @@ CSS_PROP_DISPLAY( 0, Display, mBinding, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -575,7 +550,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderColor.mBottom, - eCSSType_Value, kBorderColorKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -587,7 +561,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderColors.mBottom, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -598,7 +571,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderStyle.mBottom, - eCSSType_Value, kBorderStyleKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // on/off will need reflow @@ -609,7 +581,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderWidth.mBottom, - eCSSType_Value, kBorderWidthKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -620,7 +591,6 @@ CSS_PROP_TABLEBORDER( 0, Table, mBorderCollapse, - eCSSType_Value, kBorderCollapseKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -647,7 +617,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderEndColor, - eCSSType_Value, kBorderColorKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -665,7 +634,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderEndStyle, - eCSSType_Value, kBorderStyleKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -683,7 +651,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderEndWidth, - eCSSType_Value, kBorderWidthKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -697,7 +664,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IMAGE_IS_IN_ARRAY_0, Margin, mBorderImage, - eCSSType_Value, kBorderImageKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -721,7 +687,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mBorderColor.mLeft, - eCSSType_Value, kBorderColorKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -734,7 +699,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderLeftColorLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -747,7 +711,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderLeftColorRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -760,7 +723,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderColors.mLeft, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -778,7 +740,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mBorderStyle.mLeft, - eCSSType_Value, kBorderStyleKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -790,7 +751,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mBorderLeftStyleLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -802,7 +762,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mBorderLeftStyleRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -821,7 +780,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mBorderWidth.mLeft, - eCSSType_Value, kBorderWidthKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -833,7 +791,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mBorderLeftWidthLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -845,7 +802,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mBorderLeftWidthRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -870,7 +826,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mBorderColor.mRight, - eCSSType_Value, kBorderColorKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -883,7 +838,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderRightColorLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -896,7 +850,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderRightColorRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -909,7 +862,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderColors.mRight, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -927,7 +879,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mBorderStyle.mRight, - eCSSType_Value, kBorderStyleKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -939,7 +890,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mBorderRightStyleLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -951,7 +901,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mBorderRightStyleRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -970,7 +919,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mBorderWidth.mRight, - eCSSType_Value, kBorderWidthKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -982,7 +930,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mBorderRightWidthLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -994,7 +941,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mBorderRightWidthRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1006,7 +952,6 @@ CSS_PROP_TABLEBORDER( 0, Table, mBorderSpacing, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) // XXX bug 3935 @@ -1028,7 +973,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderStartColor, - eCSSType_Value, kBorderColorKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1046,7 +990,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderStartStyle, - eCSSType_Value, kBorderStyleKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1064,7 +1007,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderStartWidth, - eCSSType_Value, kBorderWidthKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1087,7 +1029,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderColor.mTop, - eCSSType_Value, kBorderColorKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -1099,7 +1040,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBorderColors.mTop, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1110,7 +1050,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderStyle.mTop, - eCSSType_Value, kBorderStyleKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // on/off will need reflow @@ -1121,7 +1060,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mBorderWidth.mTop, - eCSSType_Value, kBorderWidthKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -1137,7 +1075,6 @@ CSS_PROP_POSITION( 0, Position, mOffset.mBottom, - eCSSType_Value, nsnull, offsetof(nsStylePosition, mOffset), eStyleAnimType_Sides_Bottom) @@ -1150,7 +1087,6 @@ CSS_PROP_BORDER( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mBoxShadow, - eCSSType_Value, kBoxShadowTypeKTable, offsetof(nsStyleBorder, mBoxShadow), eStyleAnimType_Shadow) @@ -1161,7 +1097,6 @@ CSS_PROP_POSITION( 0, Position, mBoxSizing, - eCSSType_Value, kBoxSizingKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -1172,7 +1107,6 @@ CSS_PROP_TABLEBORDER( 0, Table, mCaptionSide, - eCSSType_Value, kCaptionSideKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1183,7 +1117,6 @@ CSS_PROP_DISPLAY( 0, Display, mClear, - eCSSType_Value, kClearKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1194,7 +1127,6 @@ CSS_PROP_DISPLAY( 0, Display, mClip, - eCSSType_Value, nsnull, offsetof(nsStyleDisplay, mClip), eStyleAnimType_Custom) @@ -1206,7 +1138,6 @@ CSS_PROP_COLOR( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Color, mColor, - eCSSType_Value, nsnull, offsetof(nsStyleColor, mColor), eStyleAnimType_Color) @@ -1217,7 +1148,6 @@ CSS_PROP_COLUMN( 0, Column, mColumnCount, - eCSSType_Value, nsnull, offsetof(nsStyleColumn, mColumnCount), eStyleAnimType_Custom) @@ -1228,7 +1158,6 @@ CSS_PROP_COLUMN( 0, Column, mColumnWidth, - eCSSType_Value, nsnull, offsetof(nsStyleColumn, mColumnWidth), eStyleAnimType_Coord) @@ -1239,7 +1168,6 @@ CSS_PROP_COLUMN( 0, Column, mColumnGap, - eCSSType_Value, nsnull, offsetof(nsStyleColumn, mColumnGap), eStyleAnimType_Coord) @@ -1255,7 +1183,6 @@ CSS_PROP_COLUMN( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Column, mColumnRuleColor, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -1266,7 +1193,6 @@ CSS_PROP_COLUMN( 0, Column, mColumnRuleStyle, - eCSSType_Value, kBorderStyleKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1277,7 +1203,6 @@ CSS_PROP_COLUMN( 0, Column, mColumnRuleWidth, - eCSSType_Value, kBorderWidthKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -1288,7 +1213,6 @@ CSS_PROP_CONTENT( CSS_PROPERTY_START_IMAGE_LOADS, Content, mContent, - eCSSType_Value, kContentKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1299,7 +1223,6 @@ CSS_PROP_CONTENT( 0, Content, mCounterIncrement, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 137285 @@ -1310,7 +1233,6 @@ CSS_PROP_CONTENT( 0, Content, mCounterReset, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 137285 @@ -1326,7 +1248,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mCueAfter, - eCSSType_Value, nsnull) CSS_PROP_BACKENDONLY( cue-before, @@ -1335,7 +1256,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mCueBefore, - eCSSType_Value, nsnull) CSS_PROP_USERINTERFACE( cursor, @@ -1346,7 +1266,6 @@ CSS_PROP_USERINTERFACE( CSS_PROPERTY_IMAGE_IS_IN_ARRAY_0, UserInterface, mCursor, - eCSSType_Value, kCursorKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1357,7 +1276,6 @@ CSS_PROP_VISIBILITY( 0, Display, mDirection, - eCSSType_Value, kDirectionKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1368,7 +1286,6 @@ CSS_PROP_DISPLAY( 0, Display, mDisplay, - eCSSType_Value, kDisplayKTable, offsetof(nsStyleDisplay, mDisplay), eStyleAnimType_EnumU8) @@ -1379,7 +1296,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mElevation, - eCSSType_Value, kElevationKTable) CSS_PROP_TABLEBORDER( empty-cells, @@ -1388,7 +1304,6 @@ CSS_PROP_TABLEBORDER( 0, Table, mEmptyCells, - eCSSType_Value, kEmptyCellsKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1399,7 +1314,6 @@ CSS_PROP_DISPLAY( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Display, mFloat, - eCSSType_Value, kFloatKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1410,7 +1324,6 @@ CSS_PROP_BORDER( 0, Margin, mFloatEdge, - eCSSType_Value, kFloatEdgeKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -1426,7 +1339,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mFamily, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1437,7 +1349,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mFontFeatureSettings, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1448,7 +1359,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mFontLanguageOverride, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1459,7 +1369,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mSize, - eCSSType_Value, kFontSizeKTable, // Note that mSize is the correct place for *reading* the computed value, // but setting it requires setting mFont.size as well. @@ -1472,7 +1381,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mSizeAdjust, - eCSSType_Value, nsnull, offsetof(nsStyleFont, mFont.sizeAdjust), eStyleAnimType_float) @@ -1483,7 +1391,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mStretch, - eCSSType_Value, kFontStretchKTable, offsetof(nsStyleFont, mFont.stretch), eStyleAnimType_Custom) @@ -1494,7 +1401,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mStyle, - eCSSType_Value, kFontStyleKTable, offsetof(nsStyleFont, mFont.style), eStyleAnimType_EnumU8) @@ -1505,7 +1411,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mVariant, - eCSSType_Value, kFontVariantKTable, offsetof(nsStyleFont, mFont.variant), eStyleAnimType_EnumU8) @@ -1516,7 +1421,6 @@ CSS_PROP_FONT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Font, mWeight, - eCSSType_Value, kFontWeightKTable, offsetof(nsStyleFont, mFont.weight), eStyleAnimType_Custom) @@ -1527,7 +1431,6 @@ CSS_PROP_UIRESET( 0, UserInterface, mForceBrokenImageIcon, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // bug 58646 @@ -1538,7 +1441,6 @@ CSS_PROP_POSITION( 0, Position, mHeight, - eCSSType_Value, nsnull, offsetof(nsStylePosition, mHeight), eStyleAnimType_Coord) @@ -1549,7 +1451,6 @@ CSS_PROP_LIST( 0, List, mImageRegion, - eCSSType_Value, nsnull, offsetof(nsStyleList, mImageRegion), eStyleAnimType_Custom) @@ -1560,7 +1461,6 @@ CSS_PROP_UIRESET( 0, UserInterface, mIMEMode, - eCSSType_Value, kIMEModeKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1571,7 +1471,6 @@ CSS_PROP_POSITION( 0, Position, mOffset.mLeft, - eCSSType_Value, nsnull, offsetof(nsStylePosition, mOffset), eStyleAnimType_Sides_Left) @@ -1582,7 +1481,6 @@ CSS_PROP_TEXT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Text, mLetterSpacing, - eCSSType_Value, nsnull, offsetof(nsStyleText, mLetterSpacing), eStyleAnimType_Coord) @@ -1593,7 +1491,6 @@ CSS_PROP_TEXT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Text, mLineHeight, - eCSSType_Value, kLineHeightKTable, offsetof(nsStyleText, mLineHeight), eStyleAnimType_Coord) @@ -1609,7 +1506,6 @@ CSS_PROP_LIST( CSS_PROPERTY_START_IMAGE_LOADS, List, mImage, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1620,7 +1516,6 @@ CSS_PROP_LIST( 0, List, mPosition, - eCSSType_Value, kListStylePositionKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1631,7 +1526,6 @@ CSS_PROP_LIST( 0, List, mType, - eCSSType_Value, kListStyleKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1647,7 +1541,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mMargin.mBottom, - eCSSType_Value, nsnull, offsetof(nsStyleMargin, mMargin), eStyleAnimType_Sides_Bottom) @@ -1664,7 +1557,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mMarginEnd, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1683,7 +1575,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mMargin.mLeft, - eCSSType_Value, nsnull, offsetof(nsStyleMargin, mMargin), eStyleAnimType_Sides_Left) @@ -1695,7 +1586,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mMarginLeftLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1707,7 +1597,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mMarginLeftRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1726,7 +1615,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mMargin.mRight, - eCSSType_Value, nsnull, offsetof(nsStyleMargin, mMargin), eStyleAnimType_Sides_Right) @@ -1738,7 +1626,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mMarginRightLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1750,7 +1637,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mMarginRightRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1768,7 +1654,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mMarginStart, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1780,7 +1665,6 @@ CSS_PROP_MARGIN( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mMargin.mTop, - eCSSType_Value, nsnull, offsetof(nsStyleMargin, mMargin), eStyleAnimType_Sides_Top) @@ -1791,7 +1675,6 @@ CSS_PROP_CONTENT( 0, Content, mMarkerOffset, - eCSSType_Value, nsnull, offsetof(nsStyleContent, mMarkerOffset), eStyleAnimType_Coord) @@ -1802,7 +1685,6 @@ CSS_PROP_BACKENDONLY( 0, Page, mMarks, - eCSSType_Value, kPageMarksKTable) CSS_PROP_POSITION( max-height, @@ -1811,7 +1693,6 @@ CSS_PROP_POSITION( 0, Position, mMaxHeight, - eCSSType_Value, nsnull, offsetof(nsStylePosition, mMaxHeight), eStyleAnimType_Coord) @@ -1822,7 +1703,6 @@ CSS_PROP_POSITION( 0, Position, mMaxWidth, - eCSSType_Value, kWidthKTable, offsetof(nsStylePosition, mMaxWidth), eStyleAnimType_Coord) @@ -1833,7 +1713,6 @@ CSS_PROP_POSITION( 0, Position, mMinHeight, - eCSSType_Value, nsnull, offsetof(nsStylePosition, mMinHeight), eStyleAnimType_Coord) @@ -1844,7 +1723,6 @@ CSS_PROP_POSITION( 0, Position, mMinWidth, - eCSSType_Value, kWidthKTable, offsetof(nsStylePosition, mMinWidth), eStyleAnimType_Coord) @@ -1855,7 +1733,6 @@ CSS_PROP_DISPLAY( 0, Display, mOpacity, - eCSSType_Value, nsnull, offsetof(nsStyleDisplay, mOpacity), eStyleAnimType_float) // XXX bug 3935 @@ -1866,7 +1743,6 @@ CSS_PROP_BACKENDONLY( 0, Breaks, mOrphans, - eCSSType_Value, nsnull) CSS_PROP_SHORTHAND( outline, @@ -1880,7 +1756,6 @@ CSS_PROP_OUTLINE( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Margin, mOutlineColor, - eCSSType_Value, kOutlineColorKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -1891,7 +1766,6 @@ CSS_PROP_OUTLINE( 0, Margin, mOutlineStyle, - eCSSType_Value, kBorderStyleKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1902,7 +1776,6 @@ CSS_PROP_OUTLINE( 0, Margin, mOutlineWidth, - eCSSType_Value, kBorderWidthKTable, offsetof(nsStyleOutline, mOutlineWidth), eStyleAnimType_Coord) @@ -1913,7 +1786,6 @@ CSS_PROP_OUTLINE( 0, Margin, mOutlineOffset, - eCSSType_Value, nsnull, offsetof(nsStyleOutline, mOutlineOffset), eStyleAnimType_nscoord) @@ -1929,7 +1801,6 @@ CSS_PROP_DISPLAY( 0, Display, mOverflowX, - eCSSType_Value, kOverflowSubKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1940,7 +1811,6 @@ CSS_PROP_DISPLAY( 0, Display, mOverflowY, - eCSSType_Value, kOverflowSubKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1956,7 +1826,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mPadding.mBottom, - eCSSType_Value, nsnull, offsetof(nsStylePadding, mPadding), eStyleAnimType_Sides_Bottom) @@ -1973,7 +1842,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mPaddingEnd, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -1992,7 +1860,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mPadding.mLeft, - eCSSType_Value, nsnull, offsetof(nsStylePadding, mPadding), eStyleAnimType_Sides_Left) @@ -2004,7 +1871,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mPaddingLeftLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2016,7 +1882,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mPaddingLeftRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2035,7 +1900,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_REPORT_OTHER_NAME, Margin, mPadding.mRight, - eCSSType_Value, nsnull, offsetof(nsStylePadding, mPadding), eStyleAnimType_Sides_Right) @@ -2047,7 +1911,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mPaddingRightLTRSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2059,7 +1922,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_DIRECTIONAL_SOURCE, Margin, mPaddingRightRTLSource, - eCSSType_Value, kBoxPropSourceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2077,7 +1939,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mPaddingStart, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2089,7 +1950,6 @@ CSS_PROP_PADDING( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER, Margin, mPadding.mTop, - eCSSType_Value, nsnull, offsetof(nsStylePadding, mPadding), eStyleAnimType_Sides_Top) @@ -2100,7 +1960,6 @@ CSS_PROP_BACKENDONLY( 0, Breaks, mPage, - eCSSType_Value, nsnull) CSS_PROP_DISPLAY( page-break-after, @@ -2109,7 +1968,6 @@ CSS_PROP_DISPLAY( 0, Display, mBreakAfter, - eCSSType_Value, kPageBreakKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // temp fix for bug 24000 @@ -2120,7 +1978,6 @@ CSS_PROP_DISPLAY( 0, Display, mBreakBefore, - eCSSType_Value, kPageBreakKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // temp fix for bug 24000 @@ -2131,7 +1988,6 @@ CSS_PROP_BACKENDONLY( 0, Breaks, mPageBreakInside, - eCSSType_Value, kPageBreakInsideKTable) CSS_PROP_SHORTHAND( pause, @@ -2145,7 +2001,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mPauseAfter, - eCSSType_Value, nsnull) CSS_PROP_BACKENDONLY( pause-before, @@ -2154,7 +2009,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mPauseBefore, - eCSSType_Value, nsnull) CSS_PROP_BACKENDONLY( pitch, @@ -2163,7 +2017,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mPitch, - eCSSType_Value, kPitchKTable) CSS_PROP_BACKENDONLY( pitch-range, @@ -2172,7 +2025,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mPitchRange, - eCSSType_Value, nsnull) CSS_PROP_VISIBILITY( pointer-events, @@ -2181,7 +2033,6 @@ CSS_PROP_VISIBILITY( 0, Display, mPointerEvents, - eCSSType_Value, kPointerEventsKTable, offsetof(nsStyleVisibility, mPointerEvents), eStyleAnimType_EnumU8) @@ -2192,7 +2043,6 @@ CSS_PROP_DISPLAY( 0, Display, mPosition, - eCSSType_Value, kPositionKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2203,7 +2053,6 @@ CSS_PROP_QUOTES( 0, Content, mQuotes, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2214,7 +2063,6 @@ CSS_PROP_DISPLAY( 0, Display, mResize, - eCSSType_Value, kResizeKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2225,7 +2073,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mRichness, - eCSSType_Value, nsnull) CSS_PROP_POSITION( right, @@ -2234,7 +2081,6 @@ CSS_PROP_POSITION( 0, Position, mOffset.mRight, - eCSSType_Value, nsnull, offsetof(nsStylePosition, mOffset), eStyleAnimType_Sides_Right) @@ -2245,7 +2091,6 @@ CSS_PROP_BACKENDONLY( 0, Page, mSize, - eCSSType_Value, kPageSizeKTable) CSS_PROP_BACKENDONLY( speak, @@ -2254,7 +2099,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mSpeak, - eCSSType_Value, kSpeakKTable) CSS_PROP_BACKENDONLY( speak-header, @@ -2263,7 +2107,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mSpeakHeader, - eCSSType_Value, kSpeakHeaderKTable) CSS_PROP_BACKENDONLY( speak-numeral, @@ -2272,7 +2115,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mSpeakNumeral, - eCSSType_Value, kSpeakNumeralKTable) CSS_PROP_BACKENDONLY( speak-punctuation, @@ -2281,7 +2123,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mSpeakPunctuation, - eCSSType_Value, kSpeakPunctuationKTable) CSS_PROP_BACKENDONLY( speech-rate, @@ -2290,7 +2131,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mSpeechRate, - eCSSType_Value, kSpeechRateKTable) CSS_PROP_BACKENDONLY( stress, @@ -2299,7 +2139,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mStress, - eCSSType_Value, nsnull) CSS_PROP_TABLE( table-layout, @@ -2308,7 +2147,6 @@ CSS_PROP_TABLE( 0, Table, mLayout, - eCSSType_Value, kTableLayoutKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2319,7 +2157,6 @@ CSS_PROP_TEXT( 0, Text, mTextAlign, - eCSSType_Value, kTextAlignKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2330,7 +2167,6 @@ CSS_PROP_TEXTRESET( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Text, mDecoration, - eCSSType_Value, kTextDecorationKTable, offsetof(nsStyleTextReset, mTextDecoration), eStyleAnimType_EnumU8) @@ -2341,7 +2177,6 @@ CSS_PROP_TEXT( 0, Text, mTextIndent, - eCSSType_Value, nsnull, offsetof(nsStyleText, mTextIndent), eStyleAnimType_Coord) @@ -2354,7 +2189,6 @@ CSS_PROP_TEXT( CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, Text, mTextShadow, - eCSSType_Value, nsnull, offsetof(nsStyleText, mTextShadow), eStyleAnimType_Shadow) @@ -2365,7 +2199,6 @@ CSS_PROP_TEXT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Text, mTextTransform, - eCSSType_Value, kTextTransformKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2376,7 +2209,6 @@ CSS_PROP_DISPLAY( 0, Display, mTransform, - eCSSType_Value, kDisplayKTable, offsetof(nsStyleDisplay, mSpecifiedTransform), eStyleAnimType_Custom) @@ -2387,7 +2219,6 @@ CSS_PROP_DISPLAY( 0, Display, mTransformOrigin, - eCSSType_Value, kBackgroundPositionKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_Custom) @@ -2398,7 +2229,6 @@ CSS_PROP_POSITION( 0, Position, mOffset.mTop, - eCSSType_Value, nsnull, offsetof(nsStylePosition, mOffset), eStyleAnimType_Sides_Top) @@ -2414,7 +2244,6 @@ CSS_PROP_DISPLAY( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Display, mTransitionDelay, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2425,7 +2254,6 @@ CSS_PROP_DISPLAY( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Display, mTransitionDuration, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2436,7 +2264,6 @@ CSS_PROP_DISPLAY( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Display, mTransitionProperty, - eCSSType_Value /* list of CSS properties that have transitions ? */, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2447,7 +2274,6 @@ CSS_PROP_DISPLAY( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, Display, mTransitionTimingFunction, - eCSSType_Value, kTransitionTimingFunctionKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2458,7 +2284,6 @@ CSS_PROP_TEXTRESET( 0, Text, mUnicodeBidi, - eCSSType_Value, kUnicodeBidiKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2469,7 +2294,6 @@ CSS_PROP_USERINTERFACE( 0, UserInterface, mUserFocus, - eCSSType_Value, kUserFocusKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -2480,7 +2304,6 @@ CSS_PROP_USERINTERFACE( 0, UserInterface, mUserInput, - eCSSType_Value, kUserInputKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX ??? // XXX bug 3935 @@ -2491,7 +2314,6 @@ CSS_PROP_USERINTERFACE( 0, UserInterface, mUserModify, - eCSSType_Value, kUserModifyKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -2502,7 +2324,6 @@ CSS_PROP_UIRESET( 0, UserInterface, mUserSelect, - eCSSType_Value, kUserSelectKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -2516,7 +2337,6 @@ CSS_PROP_TEXTRESET( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Text, mVerticalAlign, - eCSSType_Value, kVerticalAlignKTable, offsetof(nsStyleTextReset, mVerticalAlign), eStyleAnimType_Coord) @@ -2527,7 +2347,6 @@ CSS_PROP_VISIBILITY( 0, Display, mVisibility, - eCSSType_Value, kVisibilityKTable, offsetof(nsStyleVisibility, mVisible), eStyleAnimType_EnumU8) // reflow for collapse @@ -2538,7 +2357,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mVoiceFamily, - eCSSType_Value, nsnull) CSS_PROP_BACKENDONLY( volume, @@ -2547,7 +2365,6 @@ CSS_PROP_BACKENDONLY( 0, Aural, mVolume, - eCSSType_Value, kVolumeKTable) CSS_PROP_TEXT( white-space, @@ -2556,7 +2373,6 @@ CSS_PROP_TEXT( 0, Text, mWhiteSpace, - eCSSType_Value, kWhitespaceKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2567,7 +2383,6 @@ CSS_PROP_BACKENDONLY( 0, Breaks, mWidows, - eCSSType_Value, nsnull) CSS_PROP_POSITION( width, @@ -2576,7 +2391,6 @@ CSS_PROP_POSITION( 0, Position, mWidth, - eCSSType_Value, kWidthKTable, offsetof(nsStylePosition, mWidth), eStyleAnimType_Coord) @@ -2587,7 +2401,6 @@ CSS_PROP_UIRESET( 0, UserInterface, mWindowShadow, - eCSSType_Value, kWindowShadowKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2598,7 +2411,6 @@ CSS_PROP_TEXT( CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE, Text, mWordSpacing, - eCSSType_Value, nsnull, offsetof(nsStyleText, mWordSpacing), eStyleAnimType_nscoord) @@ -2609,7 +2421,6 @@ CSS_PROP_TEXT( 0, Text, mWordWrap, - eCSSType_Value, kWordwrapKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2620,7 +2431,6 @@ CSS_PROP_POSITION( 0, Position, mZIndex, - eCSSType_Value, nsnull, offsetof(nsStylePosition, mZIndex), eStyleAnimType_Coord) @@ -2631,7 +2441,6 @@ CSS_PROP_XUL( 0, XUL, mBoxAlign, - eCSSType_Value, kBoxAlignKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -2642,7 +2451,6 @@ CSS_PROP_XUL( 0, XUL, mBoxDirection, - eCSSType_Value, kBoxDirectionKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -2653,7 +2461,6 @@ CSS_PROP_XUL( 0, XUL, mBoxFlex, - eCSSType_Value, nsnull, offsetof(nsStyleXUL, mBoxFlex), eStyleAnimType_float) // XXX bug 3935 @@ -2664,7 +2471,6 @@ CSS_PROP_XUL( 0, XUL, mBoxOrient, - eCSSType_Value, kBoxOrientKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -2675,7 +2481,6 @@ CSS_PROP_XUL( 0, XUL, mBoxPack, - eCSSType_Value, kBoxPackKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) // XXX bug 3935 @@ -2686,7 +2491,6 @@ CSS_PROP_XUL( 0, XUL, mBoxOrdinal, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2697,7 +2501,6 @@ CSS_PROP_XUL( 0, XUL, mStackSizing, - eCSSType_Value, kStackSizingKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2711,7 +2514,6 @@ CSS_PROP_FONT( 0, Font, mScriptLevel, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2722,7 +2524,6 @@ CSS_PROP_FONT( 0, Font, mScriptSizeMultiplier, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2733,7 +2534,6 @@ CSS_PROP_FONT( 0, Font, mScriptMinSize, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2747,7 +2547,6 @@ CSS_PROP_SVGRESET( 0, SVG, mClipPath, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2758,7 +2557,6 @@ CSS_PROP_SVG( 0, SVG, mClipRule, - eCSSType_Value, kFillRuleKTable, offsetof(nsStyleSVG, mClipRule), eStyleAnimType_EnumU8) @@ -2769,7 +2567,6 @@ CSS_PROP_SVG( 0, SVG, mColorInterpolation, - eCSSType_Value, kColorInterpolationKTable, offsetof(nsStyleSVG, mColorInterpolation), eStyleAnimType_EnumU8) @@ -2780,7 +2577,6 @@ CSS_PROP_SVG( 0, SVG, mColorInterpolationFilters, - eCSSType_Value, kColorInterpolationKTable, offsetof(nsStyleSVG, mColorInterpolationFilters), eStyleAnimType_EnumU8) @@ -2791,7 +2587,6 @@ CSS_PROP_SVGRESET( 0, SVG, mDominantBaseline, - eCSSType_Value, kDominantBaselineKTable, offsetof(nsStyleSVGReset, mDominantBaseline), eStyleAnimType_EnumU8) @@ -2802,7 +2597,6 @@ CSS_PROP_SVG( 0, SVG, mFill, - eCSSType_Value, nsnull, offsetof(nsStyleSVG, mFill), eStyleAnimType_PaintServer) @@ -2813,7 +2607,6 @@ CSS_PROP_SVG( 0, SVG, mFillOpacity, - eCSSType_Value, nsnull, offsetof(nsStyleSVG, mFillOpacity), eStyleAnimType_float) @@ -2824,7 +2617,6 @@ CSS_PROP_SVG( 0, SVG, mFillRule, - eCSSType_Value, kFillRuleKTable, offsetof(nsStyleSVG, mFillRule), eStyleAnimType_EnumU8) @@ -2835,7 +2627,6 @@ CSS_PROP_SVGRESET( 0, SVG, mFilter, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2846,7 +2637,6 @@ CSS_PROP_SVGRESET( 0, SVG, mFloodColor, - eCSSType_Value, nsnull, offsetof(nsStyleSVGReset, mFloodColor), eStyleAnimType_Color) @@ -2857,7 +2647,6 @@ CSS_PROP_SVGRESET( 0, SVG, mFloodOpacity, - eCSSType_Value, nsnull, offsetof(nsStyleSVGReset, mFloodOpacity), eStyleAnimType_float) @@ -2868,7 +2657,6 @@ CSS_PROP_SVG( 0, SVG, mImageRendering, - eCSSType_Value, kImageRenderingKTable, offsetof(nsStyleSVG, mImageRendering), eStyleAnimType_EnumU8) @@ -2879,7 +2667,6 @@ CSS_PROP_SVGRESET( 0, SVG, mLightingColor, - eCSSType_Value, nsnull, offsetof(nsStyleSVGReset, mLightingColor), eStyleAnimType_Color) @@ -2895,7 +2682,6 @@ CSS_PROP_SVG( 0, SVG, mMarkerEnd, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2906,7 +2692,6 @@ CSS_PROP_SVG( 0, SVG, mMarkerMid, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2917,7 +2702,6 @@ CSS_PROP_SVG( 0, SVG, mMarkerStart, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2928,7 +2712,6 @@ CSS_PROP_SVGRESET( 0, SVG, mMask, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -2939,7 +2722,6 @@ CSS_PROP_SVG( 0, SVG, mShapeRendering, - eCSSType_Value, kShapeRenderingKTable, offsetof(nsStyleSVG, mShapeRendering), eStyleAnimType_EnumU8) @@ -2950,7 +2732,6 @@ CSS_PROP_SVGRESET( 0, SVG, mStopColor, - eCSSType_Value, nsnull, offsetof(nsStyleSVGReset, mStopColor), eStyleAnimType_Color) @@ -2961,7 +2742,6 @@ CSS_PROP_SVGRESET( 0, SVG, mStopOpacity, - eCSSType_Value, nsnull, offsetof(nsStyleSVGReset, mStopOpacity), eStyleAnimType_float) @@ -2972,7 +2752,6 @@ CSS_PROP_SVG( 0, SVG, mStroke, - eCSSType_Value, nsnull, offsetof(nsStyleSVG, mStroke), eStyleAnimType_PaintServer) @@ -2983,7 +2762,6 @@ CSS_PROP_SVG( CSS_PROPERTY_VALUE_LIST_USES_COMMAS, SVG, mStrokeDasharray, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, /* property stored in 2 separate members */ eStyleAnimType_Custom) @@ -2994,7 +2772,6 @@ CSS_PROP_SVG( 0, SVG, mStrokeDashoffset, - eCSSType_Value, nsnull, offsetof(nsStyleSVG, mStrokeDashoffset), eStyleAnimType_Coord) @@ -3005,7 +2782,6 @@ CSS_PROP_SVG( 0, SVG, mStrokeLinecap, - eCSSType_Value, kStrokeLinecapKTable, offsetof(nsStyleSVG, mStrokeLinecap), eStyleAnimType_EnumU8) @@ -3016,7 +2792,6 @@ CSS_PROP_SVG( 0, SVG, mStrokeLinejoin, - eCSSType_Value, kStrokeLinejoinKTable, offsetof(nsStyleSVG, mStrokeLinejoin), eStyleAnimType_EnumU8) @@ -3027,7 +2802,6 @@ CSS_PROP_SVG( 0, SVG, mStrokeMiterlimit, - eCSSType_Value, nsnull, offsetof(nsStyleSVG, mStrokeMiterlimit), eStyleAnimType_float) @@ -3038,7 +2812,6 @@ CSS_PROP_SVG( 0, SVG, mStrokeOpacity, - eCSSType_Value, nsnull, offsetof(nsStyleSVG, mStrokeOpacity), eStyleAnimType_float) @@ -3049,7 +2822,6 @@ CSS_PROP_SVG( 0, SVG, mStrokeWidth, - eCSSType_Value, nsnull, offsetof(nsStyleSVG, mStrokeWidth), eStyleAnimType_Coord) @@ -3060,7 +2832,6 @@ CSS_PROP_SVG( 0, SVG, mTextAnchor, - eCSSType_Value, kTextAnchorKTable, offsetof(nsStyleSVG, mTextAnchor), eStyleAnimType_EnumU8) @@ -3071,7 +2842,6 @@ CSS_PROP_SVG( 0, SVG, mTextRendering, - eCSSType_Value, kTextRenderingKTable, offsetof(nsStyleSVG, mTextRendering), eStyleAnimType_EnumU8) @@ -3090,7 +2860,6 @@ CSS_PROP_VISIBILITY( 0, Display, mLang, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -3101,7 +2870,6 @@ CSS_PROP_TABLE( 0, Table, mCols, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) @@ -3112,7 +2880,6 @@ CSS_PROP_TABLE( 0, Table, mSpan, - eCSSType_Value, nsnull, CSS_PROP_NO_OFFSET, eStyleAnimType_None) diff --git a/layout/style/nsCSSProperty.h b/layout/style/nsCSSProperty.h index 3b26a5f3d47..824dce4289d 100644 --- a/layout/style/nsCSSProperty.h +++ b/layout/style/nsCSSProperty.h @@ -51,8 +51,8 @@ enum nsCSSProperty { eCSSProperty_UNKNOWN = -1, - #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ - kwtable_, stylestruct_, stylestructoffset_, animtype_) \ + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ + kwtable_, stylestruct_, stylestructoffset_, animtype_) \ eCSSProperty_##id_, #include "nsCSSPropList.h" #undef CSS_PROP @@ -79,12 +79,6 @@ enum nsCSSProperty { eCSSPropertyExtra_x_none_value }; -// The types of values that can be in the nsCSS*/nsRuleData* structs. -// See nsCSSPropList.h for uses. -enum nsCSSType { - eCSSType_Value -}; - // The "descriptors" that can appear in a @font-face rule. // They have the syntax of properties but different value rules. // Keep in sync with kCSSRawFontDescs in nsCSSProps.cpp and diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 59158fe5bbd..3330fa6be06 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -60,7 +60,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_, \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ #name_, #include "nsCSSPropList.h" @@ -1480,7 +1480,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_, \ + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ kwtable_, #include "nsCSSPropList.h" @@ -1520,20 +1520,11 @@ PRBool nsCSSProps::GetColorName(PRInt32 aPropValue, nsCString &aStr) return rv; } -// 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_, stylestructoffset_, animtype_) \ - type_, - #include "nsCSSPropList.h" - #undef CSS_PROP -}; - 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_, \ + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ eStyleStruct_##stylestruct_, @@ -1544,7 +1535,7 @@ const nsStyleStructID nsCSSProps::kSIDTable[eCSSProperty_COUNT_no_shorthands] = const nsStyleAnimType nsCSSProps::kAnimTypeTable[eCSSProperty_COUNT_no_shorthands] = { -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ animtype_, #include "nsCSSPropList.h" @@ -1553,7 +1544,7 @@ nsCSSProps::kAnimTypeTable[eCSSProperty_COUNT_no_shorthands] = { const ptrdiff_t nsCSSProps::kStyleStructOffsetTable[eCSSProperty_COUNT_no_shorthands] = { -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ stylestructoffset_, #include "nsCSSPropList.h" @@ -1561,7 +1552,7 @@ nsCSSProps::kStyleStructOffsetTable[eCSSProperty_COUNT_no_shorthands] = { }; const PRUint32 nsCSSProps::kFlagsTable[eCSSProperty_COUNT] = { -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ flags_, #include "nsCSSPropList.h" diff --git a/layout/style/nsCSSProps.h b/layout/style/nsCSSProps.h index 1e3b7e82b5f..f8ee9f709c5 100644 --- a/layout/style/nsCSSProps.h +++ b/layout/style/nsCSSProps.h @@ -184,7 +184,6 @@ public: // Ditto but as a string, return "" when not found. static const nsAFlatCString& ValueToKeyword(PRInt32 aValue, const PRInt32 aTable[]); - 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]; diff --git a/layout/style/nsDOMCSSDeclaration.cpp b/layout/style/nsDOMCSSDeclaration.cpp index cff7f170c56..89020d86230 100644 --- a/layout/style/nsDOMCSSDeclaration.cpp +++ b/layout/style/nsDOMCSSDeclaration.cpp @@ -337,7 +337,7 @@ nsDOMCSSDeclaration::RemoveProperty(const nsCSSProperty aPropID) // nsIDOMCSS2Properties -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ NS_IMETHODIMP \ nsDOMCSSDeclaration::Get##method_(nsAString& aValue) \ @@ -353,16 +353,16 @@ nsDOMCSSDeclaration::RemoveProperty(const nsCSSProperty aPropID) #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, X, X) + CSS_PROP(name_, id_, method_, flags_, X, X, X, X, X, X) #include "nsCSSPropList.h" // Aliases -CSS_PROP(X, opacity, MozOpacity, X, X, X, X, X, X, X, X) -CSS_PROP(X, outline, MozOutline, X, X, X, X, X, X, X, X) -CSS_PROP(X, outline_color, MozOutlineColor, X, X, X, X, X, X, X, X) -CSS_PROP(X, outline_style, MozOutlineStyle, X, X, X, X, X, X, X, X) -CSS_PROP(X, outline_width, MozOutlineWidth, X, X, X, X, X, X, X, X) -CSS_PROP(X, outline_offset, MozOutlineOffset, X, X, X, X, X, X, X, X) +CSS_PROP(X, opacity, MozOpacity, X, X, X, X, X, X, X) +CSS_PROP(X, outline, MozOutline, X, X, X, X, X, X, X) +CSS_PROP(X, outline_color, MozOutlineColor, X, X, X, X, X, X, X) +CSS_PROP(X, outline_style, MozOutlineStyle, X, X, X, X, X, X, X) +CSS_PROP(X, outline_width, MozOutlineWidth, X, X, X, X, X, X, X) +CSS_PROP(X, outline_offset, MozOutlineOffset, X, X, X, X, X, X, X) #undef CSS_PROP_SHORTHAND #undef CSS_PROP_LIST_EXCLUDE_INTERNAL diff --git a/layout/style/nsRuleData.cpp b/layout/style/nsRuleData.cpp index 47c95038e0c..f021f420099 100644 --- a/layout/style/nsRuleData.cpp +++ b/layout/style/nsRuleData.cpp @@ -50,9 +50,9 @@ struct PropertyOffsetInfo { const PropertyOffsetInfo kOffsetTable[eCSSProperty_COUNT_no_shorthands] = { #define CSS_PROP_BACKENDONLY(name_, id_, method_, flags_, datastruct_, \ - member_, type_, kwtable_) \ + member_, kwtable_) \ { size_t(-1), size_t(-1) }, - #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ + #define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ { offsetof(nsRuleData, m##datastruct_##Data), \ offsetof(nsRuleData##datastruct_, member_) }, @@ -63,8 +63,8 @@ const PropertyOffsetInfo kOffsetTable[eCSSProperty_COUNT_no_shorthands] = { } // anon namespace -void* -nsRuleData::StorageFor(nsCSSProperty aProperty) +nsCSSValue* +nsRuleData::ValueFor(nsCSSProperty aProperty) { NS_ABORT_IF_FALSE(aProperty < eCSSProperty_COUNT_no_shorthands, "invalid or shorthand property"); @@ -77,5 +77,5 @@ nsRuleData::StorageFor(nsCSSProperty aProperty) (reinterpret_cast(this) + offsets.struct_offset); NS_ABORT_IF_FALSE(cssstruct, "substructure pointer should never be null"); - return reinterpret_cast(cssstruct + offsets.member_offset); + return reinterpret_cast(cssstruct + offsets.member_offset); } diff --git a/layout/style/nsRuleData.h b/layout/style/nsRuleData.h index b48f5dacb79..caf8e731062 100644 --- a/layout/style/nsRuleData.h +++ b/layout/style/nsRuleData.h @@ -104,10 +104,11 @@ struct nsRuleData ~nsRuleData() {} /** - * Non-typesafe worker routine for the above five value retrieval - * functions. Avoid using. + * Return a pointer to the value object within |this| corresponding + * to property |aProperty|, or null if storage for that property has + * not been allocated. */ - void* StorageFor(nsCSSProperty aProperty); + nsCSSValue* ValueFor(nsCSSProperty aProperty); }; #endif diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 6970fa419c2..f6803d68acd 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -1365,10 +1365,8 @@ nsRuleNode::PropagateDependentBit(PRUint32 aBit, nsRuleNode* aHighestNode) struct PropertyCheckData { size_t offset; - // These duplicate the same data in nsCSSProps::kTypeTable and - // kFlagsTable, except that we have some extra entries for - // CSS_PROP_INCLUDE_NOT_CSS. - nsCSSType type; + // These duplicate the data in nsCSSProps::kFlagsTable, except that + // we have some extra entries for CSS_PROP_INCLUDE_NOT_CSS. PRUint32 flags; }; @@ -1494,8 +1492,8 @@ 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_, stylestructoffset_, animtype_) \ - { offsetof(nsRuleData##datastruct_, member_), type_, flags_ }, +#define CHECK_DATA_FOR_PROPERTY(name_, id_, method_, flags_, datastruct_, member_, kwtable_, stylestructoffset_, animtype_) \ + { offsetof(nsRuleData##datastruct_, member_), flags_ }, static const PropertyCheckData FontCheckProperties[] = { #define CSS_PROP_FONT CHECK_DATA_FOR_PROPERTY @@ -1735,20 +1733,12 @@ nsRuleNode::CheckSpecifiedProperties(const nsStyleStructID aSID, for (const PropertyCheckData *prop = structData->props, *prop_end = prop + structData->nprops; prop != prop_end; - ++prop) - switch (prop->type) { + ++prop) { - case eCSSType_Value: - ++total; - ExamineCSSValue(ValueAtOffset(aRuleDataStruct, prop->offset), - specified, inherited); - break; - - default: - NS_NOTREACHED("unknown type"); - break; - - } + ++total; + ExamineCSSValue(ValueAtOffset(aRuleDataStruct, prop->offset), + specified, inherited); + } #if 0 printf("CheckSpecifiedProperties: SID=%d total=%d spec=%d inh=%d.\n", @@ -2063,18 +2053,8 @@ UnsetPropertiesWithoutFlags(const nsStyleStructID aSID, *prop_end = prop + structData->nprops; prop != prop_end; ++prop) { - if ((prop->flags & aFlags) == aFlags) - // Don't unset the property. - continue; - - switch (prop->type) { - case eCSSType_Value: - ValueAtOffset(aRuleDataStruct, prop->offset).Reset(); - break; - default: - NS_NOTREACHED("unknown type"); - break; - } + if ((prop->flags & aFlags) != aFlags) + ValueAtOffset(aRuleDataStruct, prop->offset).Reset(); } } diff --git a/layout/style/nsStyleAnimation.cpp b/layout/style/nsStyleAnimation.cpp index 3230faf5346..4e1e0c93aa0 100644 --- a/layout/style/nsStyleAnimation.cpp +++ b/layout/style/nsStyleAnimation.cpp @@ -1738,93 +1738,67 @@ PRBool nsStyleAnimation::UncomputeValue(nsCSSProperty aProperty, nsPresContext* aPresContext, const Value& aComputedValue, - void* aSpecifiedValue) + nsCSSValue& aSpecifiedValue) { NS_ABORT_IF_FALSE(aPresContext, "null pres context"); switch (aComputedValue.GetUnit()) { case eUnit_Normal: - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - static_cast(aSpecifiedValue)->SetNormalValue(); + aSpecifiedValue.SetNormalValue(); break; case eUnit_Auto: - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - static_cast(aSpecifiedValue)->SetAutoValue(); + aSpecifiedValue.SetAutoValue(); break; case eUnit_None: - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - static_cast(aSpecifiedValue)->SetNoneValue(); + aSpecifiedValue.SetNoneValue(); break; case eUnit_Enumerated: case eUnit_Visibility: - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - static_cast(aSpecifiedValue)-> + aSpecifiedValue. SetIntValue(aComputedValue.GetIntValue(), eCSSUnit_Enumerated); break; case eUnit_Integer: - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - static_cast(aSpecifiedValue)-> + aSpecifiedValue. SetIntValue(aComputedValue.GetIntValue(), eCSSUnit_Integer); break; - case eUnit_Coord: { - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - nscoordToCSSValue(aComputedValue.GetCoordValue(), - *static_cast(aSpecifiedValue)); + case eUnit_Coord: + nscoordToCSSValue(aComputedValue.GetCoordValue(), aSpecifiedValue); break; - } case eUnit_Percent: - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - static_cast(aSpecifiedValue)-> - SetPercentValue(aComputedValue.GetPercentValue()); + aSpecifiedValue.SetPercentValue(aComputedValue.GetPercentValue()); break; case eUnit_Float: - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - static_cast(aSpecifiedValue)-> + aSpecifiedValue. SetFloatValue(aComputedValue.GetFloatValue(), eCSSUnit_Number); break; case eUnit_Color: // colors can be alone, or part of a paint server - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); - static_cast(aSpecifiedValue)-> - SetColorValue(aComputedValue.GetColorValue()); + aSpecifiedValue.SetColorValue(aComputedValue.GetColorValue()); break; case eUnit_CSSValuePair: { - NS_ABORT_IF_FALSE(nsCSSProps::kTypeTable[aProperty] == eCSSType_Value, - "type mismatch"); // Rule node processing expects pair values to be collapsed to a // single value if both halves would be equal, for most but not // all properties. At present, all animatable properties that // use pairs do expect collapsing. const nsCSSValuePair* pair = aComputedValue.GetCSSValuePairValue(); if (pair->mXValue == pair->mYValue) { - *static_cast(aSpecifiedValue) = pair->mXValue; + aSpecifiedValue = pair->mXValue; } else { - static_cast(aSpecifiedValue)-> - SetPairValue(pair); + aSpecifiedValue.SetPairValue(pair); } } break; case eUnit_CSSRect: { - nsCSSRect& rect = static_cast(aSpecifiedValue)-> - SetRectValue(); + nsCSSRect& rect = aSpecifiedValue.SetRectValue(); rect = *aComputedValue.GetCSSRectValue(); } break; case eUnit_Dasharray: case eUnit_Shadow: case eUnit_Transform: - static_cast(aSpecifiedValue)-> + aSpecifiedValue. SetDependentListValue(aComputedValue.GetCSSValueListValue()); break; case eUnit_CSSValuePairList: - static_cast(aSpecifiedValue)-> + aSpecifiedValue. SetDependentPairListValue(aComputedValue.GetCSSValuePairListValue()); break; default: @@ -1847,30 +1821,12 @@ nsStyleAnimation::UncomputeValue(nsCSSProperty aProperty, return PR_TRUE; } nsCSSValue val; - void *storage; - switch (nsCSSProps::kTypeTable[aProperty]) { - case eCSSType_Value: - storage = &val; - break; - default: - NS_ABORT_IF_FALSE(PR_FALSE, "unexpected case"); - storage = nsnull; - break; - } - if (!nsStyleAnimation::UncomputeValue(aProperty, aPresContext, - aComputedValue, storage)) { + aComputedValue, val)) { return PR_FALSE; } - switch (nsCSSProps::kTypeTable[aProperty]) { - case eCSSType_Value: - val.AppendToString(aProperty, aSpecifiedValue); - break; - default: - NS_ABORT_IF_FALSE(PR_FALSE, "unexpected case"); - return PR_FALSE; - } + val.AppendToString(aProperty, aSpecifiedValue); return PR_TRUE; } diff --git a/layout/style/nsStyleAnimation.h b/layout/style/nsStyleAnimation.h index 52804533b9b..8d68c6701fc 100644 --- a/layout/style/nsStyleAnimation.h +++ b/layout/style/nsStyleAnimation.h @@ -53,6 +53,7 @@ class nsIContent; class nsPresContext; class nsStyleContext; +class nsCSSValue; struct nsCSSValueList; struct nsCSSValuePair; struct nsCSSValuePairList; @@ -178,14 +179,10 @@ public: /** * Creates a specified value for the given computed value. * - * The first form fills in one of the nsCSSType types into the void*; - * for some types this means that the void* is pointing to memory - * owned by the nsStyleAnimation::Value. (For all complex types, the - * nsStyleAnimation::Value owns the necessary objects so that the - * caller does not need to do anything to free them. However, this - * means that callers using the void* variant must keep - * |aComputedValue| alive longer than the structure into which they've - * filled the value.) + * The first overload fills in an nsCSSValue object; the second + * produces a string. The nsCSSValue result may depend on objects + * owned by the |aComputedValue| object, so users of that variant + * must keep |aComputedValue| alive longer than |aSpecifiedValue|. * * @param aProperty The property whose value we're uncomputing. * @param aPresContext The presentation context for the document in @@ -197,7 +194,7 @@ public: static PRBool UncomputeValue(nsCSSProperty aProperty, nsPresContext* aPresContext, const Value& aComputedValue, - void* aSpecifiedValue); + nsCSSValue& aSpecifiedValue); static PRBool UncomputeValue(nsCSSProperty aProperty, nsPresContext* aPresContext, const Value& aComputedValue, diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp index 22f32ffc65f..cd8cdfc34f3 100644 --- a/layout/style/nsTransitionManager.cpp +++ b/layout/style/nsTransitionManager.cpp @@ -241,12 +241,12 @@ AnimValuesStyleRule::MapRuleInfoInto(nsRuleData* aRuleData) if (aRuleData->mSIDs & nsCachedStyleData::GetBitForSID( nsCSSProps::kSIDTable[cv.mProperty])) { - void *prop = aRuleData->StorageFor(cv.mProperty); + nsCSSValue *prop = aRuleData->ValueFor(cv.mProperty); #ifdef DEBUG PRBool ok = #endif nsStyleAnimation::UncomputeValue(cv.mProperty, aRuleData->mPresContext, - cv.mValue, prop); + cv.mValue, *prop); NS_ABORT_IF_FALSE(ok, "could not store computed value"); } } diff --git a/layout/style/test/ListCSSProperties.cpp b/layout/style/test/ListCSSProperties.cpp index 8ab0674ed0c..69cef07cbb5 100644 --- a/layout/style/test/ListCSSProperties.cpp +++ b/layout/style/test/ListCSSProperties.cpp @@ -48,7 +48,7 @@ struct PropertyInfo { const PropertyInfo gLonghandProperties[] = { -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ { #name_, #method_ }, @@ -66,7 +66,7 @@ const PropertyInfo gLonghandProperties[] = { const char* gLonghandPropertiesWithDOMProp[] = { #define CSS_PROP_LIST_EXCLUDE_INTERNAL -#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, type_, \ +#define CSS_PROP(name_, id_, method_, flags_, datastruct_, member_, \ kwtable_, stylestruct_, stylestructoffset_, animtype_) \ #name_,